Commit graph

20672 commits

Author SHA1 Message Date
James R
ab42c47373 .gitignore: add CMakeUserPresets.json 2022-12-17 21:23:07 -08:00
Oni
6247d42971 Merge branch 'musicdef-update' into 'master'
First Musicdef changes in preparation for music test

See merge request KartKrew/Kart!812
2022-12-18 00:28:23 +00:00
Sal
60d2f250b7 Merge branch 'broly-ease' into 'master'
Use sinusoidial interpolation for Broly ki

See merge request KartKrew/Kart!811
2022-12-17 23:44:16 +00:00
Sal
b02aa713d3 Merge branch 'slightly-better-colorize' into 'master'
Slightly improve colorize's luminance method

See merge request KartKrew/Kart!810
2022-12-17 23:44:01 +00:00
toaster
ac423b3461 Further changes to musicdef based on discussion with Gunla
- Add "author" and "originalcomposers" fields
    - "author" is for remixes and original compositions, can be ommitted
    - "originalcomposers" will not be visible mid-game, but will be visible in music test. Stores original sound team info
- Store all strings as Zone memory instead of static arrays, since not every field will be relevant for every track
2022-12-17 17:36:44 +00:00
toaster
81fec17bb4 First Musicdef changes in preparation for music test
- Add `title` field, to permit seperation from `source`
- Store current displayed string as zone memory, to prevent repeated recalculation
2022-12-17 16:39:10 +00:00
Sally Coolatta
107ec27846 Go back to the old one, but gamma correct it
Did more research into the subject, the formula I used before was fine and was just expecting gamma correction.
2022-12-15 22:29:38 -05:00
Sally Coolatta
4feba88327 Slightly improve colorize's luminance method
Before I was using coefficents from another formula I forget the source of, but over time I've stopped liking how it looked -- just considers greens far too bright. Here I'm trying out BT.601 coefficents instead (https://en.wikipedia.org/wiki/Rec._601).

These are also the coefficients Doom itself used for invulnerability's invert effect (if you ignore the typo Carmack made :p), so this checks out.
2022-12-15 22:08:29 -05:00
Sally Coolatta
5ffcfb558f #define BOOL boolean -> #define boolean BOOL 2022-12-15 20:54:15 -05:00
Sal
1b4c910cbf Merge branch 'cmake-sources' into 'master'
Move sources list from Sourcefile to CMakeLists.txt

See merge request KartKrew/Kart!795
2022-12-16 01:08:40 +00:00
Sally Coolatta
3f2209b853 Newly added files to CMakeLists.txt 2022-12-15 19:55:29 -05:00
Sally Coolatta
38d8281a6b Merge branch 'master' into cmake-sources 2022-12-15 19:54:59 -05:00
Sal
03b37e2871 Merge branch 'deterministic-roulette' into 'master'
Deterministic roulette

See merge request KartKrew/Kart!808
2022-12-16 00:50:45 +00:00
Sal
aa29ac5ada Merge branch 'enable-cxx' into 'master'
Enable C++17 additionally with Catch2 unit testing

See merge request KartKrew/Kart!807
2022-12-15 22:54:27 +00:00
Sally Coolatta
05413eeb2d Add proper comments for each function
(I think this is the only code style I want to actively enforce :p)
2022-12-15 16:19:06 -05:00
James R
01f8fb3233 Use sinusoidial interpolation for Broly ki 2022-12-15 05:16:19 -08:00
James R
7f569fe168 Rename K_SpawnBrolyKi to Obj_SpawnBrolyKi, move to objects/broly.c, spawn MT_BROLY 2022-12-15 04:14:38 -08:00
Sally Coolatta
6554c8bfb1 Improve scope handling of the roulette
All of the player_t references are now full-const instead of const pointer after a certain point. This is because I've made two mistakes so far of modifying the player with this, when it's supposed to be safe to call for HUD as well.

Also uses this split to add a more efficient way to prevent multi-Shrink/SPB.

Also handles NULL player better, for the sake of Battle's K_CreatePaperItem.
2022-12-15 02:13:46 -05:00
Sally Coolatta
167df6cca7 Remove item roulette between maps 2022-12-15 01:44:09 -05:00
Sally Coolatta
ffe9d5cd1d Properly support small splitscreen itembox 2022-12-15 01:41:34 -05:00
Sally Coolatta
f7e53ec811 Cleanup lots of the older roulette code
- Most of it now requires a reference to itemroulette_t, rather than copying all of the variables over.
- Increased the effect of Frantic Items, as the old scaling was made extremely low because  item distance was exponential back then.
- A lot of variables are pre-calculated in itemroulette_t instead of redoing the calculations every time (player count, first place's dist, etc)
- Make most of these functions only accessible by k_roulette.c
- Even when single items get forced into your roulette, the Super Ring Debt effect can happen
- Make the game support setting single items from other gametypes (Pogo Spring-only races work now)
- Fix some item distances not accounting for scale
- Prevent multiple of certain items from rolling at once; Shrinks (not a big deal) and SPBs (OH GOD NO)
2022-12-15 01:23:23 -05:00
James R
c32134849f Merge branch 'clipping-rectangle' into 'master'
Clipping rectangle

See merge request KartKrew/Kart!806
2022-12-15 04:11:56 +00:00
Oni
f4ab4d753d Merge branch 'broly' into 'master'
Broly's ki on explosions

See merge request KartKrew/Kart!809
2022-12-15 03:56:39 +00:00
James R
b97c8cd176 Make explosions louder from a distance 2022-12-14 19:54:33 -08:00
James R
130953fc7e Add sfx to Broly ki 2022-12-14 19:54:33 -08:00
James R
9017ca1c20 Delay mine explosion sound until after Broly ki 2022-12-14 19:54:33 -08:00
James R
2d52e4a047 Colorize Broly ki to player color 2022-12-14 19:54:33 -08:00
James R
2ec29b2586 Adjust mine and explosion to center Broly ki 2022-12-14 19:54:33 -08:00
James R
34dec00539 Add K_SpawnBrolyKi, green circle shrinks during explosion hitlag 2022-12-14 19:54:31 -08:00
Sally Coolatta
8d43acccb7 Use predetermined roulette speed for Time Attack 2022-12-13 18:03:44 -05:00
Sally Coolatta
6b8a011aa1 Flicker other items when selecting
Makes the lerp back to the middle less jarring, since the items that were just there won't disappear.
2022-12-13 18:02:21 -05:00
Sally Coolatta
2a546df3fb Fix debugger breaking, reduce size 2022-12-13 12:44:11 -05:00
Sally Coolatta
c184567361 No longer dynamically allocate roulette list
Done with the issues trying to sync this memory over the wire, so now it's just a long static array...
2022-12-13 12:06:52 -05:00
Sally Coolatta
59ee8177d7 Try some things for roulette sync
- PU_STATIC instead of PU_LEVEL, since player_t is always kept around anyway.
- Don't alloc itemList when cap is 0
- Read/write 0 when itemList is NULL
2022-12-13 00:00:37 -05:00
Sally Coolatta
7713ce0ebb Fix speed being messed up near level start
Used the wrong constant, leftover from an earlier experiment that was only partially reverted. Fixes "ghost" roulettes.
2022-12-12 19:41:33 -05:00
Sally Coolatta
8534703de6 Further improve item debugger visibility
- Half the scale of the item graphics, and reduce the spacing, so more of the reel can fit in one column.
- Move the item table text over to the right, depending on how many columns were drawn.
- Display the item roulette speed, as well.
2022-12-12 17:43:32 -05:00
Eidolon
51e0bed20a c++: add finally RAII utility
This mirrors the `finally` utility in Guidelines Support Library for
ensuring that a cleanup function is always called when the utility
object leaves scope, even when unwinding the stack from an exception.
This is to aid in transitioning malloc/free pairs in function bodies to
be more exception-safe.
2022-12-12 16:40:56 -06:00
Eidolon
15acefcc33 c++: Make some defines C++-valid 2022-12-12 16:38:25 -06:00
Eidolon
dceeadd3aa Don't preproc. define inline in C++ 2022-12-12 16:34:26 -06:00
Eidolon
7423b05f46 Redefine boolean for C++ compatibility 2022-12-12 16:34:25 -06:00
Eidolon
5139d1276b cmake: Add Catch2 unit testing 2022-12-12 16:31:45 -06:00
Eidolon
7bdcb5883d cmake: Enable C++ 17 and C11 2022-12-12 16:31:35 -06:00
Sally Coolatta
a73e62c163 Re-add roulette itemList user
Turns out the Z_Free error is something else in r_patch.c, seems unrelated to what I made.
2022-12-12 16:59:29 -05:00
Sally Coolatta
b0537de79e Re-implement debugitemodds 2022-12-12 16:44:24 -05:00
Sally Coolatta
9e3ded610d Get rid of my TODO notes
I implemented it, lol
2022-12-12 16:19:45 -05:00
Eidolon
b9f277df66 cmake: Fix png and openmpt builds in clean envs
In environments without zlib installed, png would fail to build since
it can't find zlib.h. The zlib build's generated public include dir
needs zlib.h to work.

openmpt fails to build because it can't find Rpcrt4, which is not a
necessary link under mingw, but exists in some mingw-w64 toolchains.
It is only needed for MSVC.

(cherry picked from commit fcf69001ada08077f82d3fc8510dcd24b4433e64)
2022-12-12 13:27:09 -06:00
Eidolon
1f9b97a0a8 cmake: Use MAME YM2612 emu in GME
(cherry picked from commit fb0f0c5e6c161b4b88439cda84c8b6cae9d236cc)
2022-12-12 13:27:09 -06:00
Eidolon
0d49cc1768 Cherry-pick internal zlib MR from SRB2/next
cmake: build zlib manually in internal build

See merge request STJr/SRB2!1856

(cherry picked from commit 3597957af13878854c02305a0aec5ca744209ef2)

# Conflicts:
#	thirdparty/CMakeLists.txt
2022-12-12 13:18:17 -06:00
Sally Coolatta
63f6b18d59 No user for roulette itemlist
Fixes the occasional Z_Free complaint
2022-12-12 11:55:28 -05:00
Sally Coolatta
8d2eb9220d Make Super Ring flood happen at 0 rings too 2022-12-12 11:46:03 -05:00