Commit graph

21253 commits

Author SHA1 Message Date
Sal
5ede1e5a18 Merge branch 'find-musicdef' into 'master'
Add S_FindMusicDef, function to find musicdef by name

See merge request KartKrew/Kart!860
2023-01-05 21:56:47 +00:00
toaster
89b77b6569 opendir: initialise dd_dta struct 2023-01-05 21:44:14 +00:00
toaster
99808d7a4c filesrch.c: Initialise struct stat 2023-01-05 21:35:24 +00:00
Sal
b46caf4a7a Merge branch 'addons-menu-addons-folder' into 'master'
Go to addons folder by default in addons menu

Closes #373

See merge request KartKrew/Kart!853
2023-01-05 20:51:28 +00:00
toaster
b0a8a0efad Update comment for K_TERRAINLumpParser 2023-01-05 20:50:34 +00:00
toaster
2d95c177ea K_InitBrightmapsPwad: Also use guaranteed null-terminated data copy ala K_InitTerrain 2023-01-05 20:50:13 +00:00
Sal
14b6ebd25a Merge branch 'rulesify-item-odds' into 'master'
Fix Battle item spawning odds

See merge request KartKrew/Kart!852
2023-01-05 20:43:59 +00:00
Sal
292a747a17 Merge branch 'unlock-menu-extra' into 'master'
Challenges polish

See merge request KartKrew/Kart!855
2023-01-05 20:29:10 +00:00
Sal
6e6a799b1e Merge branch 'refactor-get-item-odds' into 'master'
Refactor K_KartGetItemOdds

See merge request KartKrew/Kart!851
2023-01-05 20:25:54 +00:00
Sal
3b53396103 Merge branch 'fix-distribution-debugger' into 'master'
Fix crash in item distribution debugger

See merge request KartKrew/Kart!862
2023-01-05 20:23:44 +00:00
toaster
496cc2fa0b CV_palette_OnChange: do not reload colour cube until LOADED_CONFIG is complete
No substitute for an actual mutex on the palette, but this does at least prevent 21 redundant calls to palette reinitialisation
2023-01-05 20:21:46 +00:00
toaster
afafdea14b readfollower: Fix plenty of memory unsafety
- Fix uninitialised memory usage caused by goofy delayed strcpy
- Use strlcpy instead of strcpy for unknown length sources, just for additional memory safety
- Remove opportunity for printing a number of more than one digit into a buffer only two chars long
2023-01-05 19:31:49 +00:00
toaster
4520d56fa3 K_InitTerrain: Do what ANIMDEFs parsing does and create a copy of the TERRAIN lump with a guaranteed null terminator 2023-01-05 18:10:42 +00:00
toaster
b35c33a1b5 M_GetToken: check whether startPos is beyond string length BEFORE using it as string index 2023-01-05 18:09:50 +00:00
James R
d56a5041aa Use K_GetCachedItemPatch for distribution debugger
Fixes crash from patch array mismatch.
2023-01-05 05:13:18 -08:00
James R
e7af4a5084 Resize menudemo_t filepath to fix -Wformat-truncation 2023-01-05 04:24:37 -08:00
James R
e78625455e Resize downloaddir to fix -Wformat-truncation 2023-01-05 04:24:37 -08:00
James R
dfd8a36f8f sdl/i_main.cpp: fix -Wliteral-suffix 2023-01-05 03:51:04 -08:00
James R
24e7e4231d Print musicdef along with tunes -show 2023-01-04 23:38:59 -08:00
James R
0bf821447e Add S_FindMusicDef, function to find musicdef by name
Use this function wherever the musicdef list is walked.
2023-01-04 23:34:45 -08:00
James R
78fa572df0 SDL: only react to window focus changes if state actually changes
Because the state carries over for each call to
Impl_HandleWindowEvent, once the window has been focused,
events that do not change the focus state behave as if the
window was just refocused, anyway.

On linux i3wm, some such window events propogate
constantly in fullscreen mode.
2023-01-04 23:11:15 -08:00
James R
d2569dc3af Pass uint64_t literal to std::max
On 32-bit system, uint64_t is typedef to unsigned long long.
On 64-bit system, uint64_t is typedef to unsigned long.

unsigned long and unsigned long long are distinctly
separate types, which causes std::max template to fail.
2023-01-04 18:32:07 -08:00
Eidolon
4522b4953e core: change SRB2WADDIR var to RINGRACERSWADDIR 2023-01-04 19:36:33 -06:00
Eidolon
d53efbdace core: load exchndl.dll at runtime
This allows the game to run without exchndl.dll present.
2023-01-04 19:34:41 -06:00
Eidolon
4a7463d134 Merge branch 'split-cpm-scripts' into 'master'
Split cpm scripts

See merge request KartKrew/Kart!856
2023-01-05 01:31:26 +00:00
Eidolon
81d1aa79c2 cmake: Split common deps setup scripts 2023-01-04 17:30:45 -06:00
Eidolon
dd182cd0a1 cmake: Separate cpm discordrpc setup 2023-01-04 17:30:45 -06:00
Eidolon
ac7ca10061 cmake: Separate cpm xmp-lite setup 2023-01-04 17:30:45 -06:00
Eidolon
181a159f33 Merge branch 'new-audio-mixer' into 'master'
New Audio Mixer

See merge request KartKrew/Kart!847
2023-01-04 22:52:50 +00:00
Eidolon
b95fd459b9 cmake: Remove SDL2_mixer and OpenMPT
Libraries superceded by libxmp-lite and new mixer.
2023-01-04 16:51:12 -06:00
Eidolon
8c259487b2 audio: Add pure-ISO C++17 audio mixer and backend
This replaces SDL2_mixer.
2023-01-04 16:51:12 -06:00
Eidolon
ba109d8981 core: Catch and I_Error uncaught exceptions in main 2023-01-04 16:51:12 -06:00
Eidolon
9806df5883 cmake: Add stb-vorbis
This is a lightweight single-file Ogg Vorbis decoder which will be used
for Ogg playback instead of libogg/libvorbis.
2023-01-04 16:51:12 -06:00
Eidolon
210b513c8b cmake: Add xmp-lite
This is a very lightweight module playback engine which will replace
OpenMPT.
2023-01-04 16:51:12 -06:00
Eidolon
25e3b4239c io: Allow span and vec stream to seek past end 2023-01-04 16:51:12 -06:00
Eidolon
2a0e183340 legal: Add copyright notice to io/streams 2023-01-04 16:51:12 -06:00
toaster
91a4026871 Remove now-unused definition for challengesbordercolor 2023-01-04 18:04:38 +00:00
toaster
c628014c47 Add an extra guard for unlock condition string drawing to prevent hypothetical out of bounds read 2023-01-04 17:52:28 +00:00
toaster
6274b1f31f Fast forward through the unlock sequence by holding the Extra button.
Based on VC complaints.
2023-01-04 17:45:24 +00:00
toaster
20b6a8389b Challenge grid population improvement
* Correctly identify that two columns with only one major unlock will have 6 empty tile slots, not two. This will result in less underutilised Challenges grid space.
2023-01-04 17:28:45 +00:00
toaster
06e7eb3567 Add a funny little rotating question mark ala SA1 character select 2023-01-04 17:23:18 +00:00
toaster
f9e0c0a444 Challenges menu visual adjustment
* Use the new background
* Use clipped rectangles instead of black pixel overdraw, so pre-baked darkened areas in the new background can be visible instead
2023-01-04 17:22:57 +00:00
toaster
2786c2095e More incorrect/inconsistent frees 2023-01-04 14:22:04 +00:00
James R
5ed30012ed cv_addons_option: rename RINGRACERS to IWAD
This maps to the srb2path folder, which is where the IWAD
is located.
2023-01-04 00:09:58 -08:00
James R
8b96612e43 Default addons menu to addons folder 2023-01-04 00:08:30 -08:00
James R
5c51ad77f6 Use P_SaveBufferFree everywhere
- Fixes PR_SaveProfiles calling stdlib free on zone
memory.
- Also touched g_demo.c
2023-01-03 23:23:34 -08:00
James R
66e2f3a8e9 Reduce stair janking loss of control if momentum angle drifts too far from facing 2023-01-03 22:43:58 -08:00
toaster
11b4fcdc1c Remove heinous pointer-sent-over-the-network hack remnants
This used to be used for `P_RelinkPointers()`, but was superseded by the far saner mobjnum. HOWEVER, its lingering effect was to leave `mobj->info` in an invalid state until a later `P_FinishMobjs()` was called. This is memory unsafety :D

After removing the last remnants of this ancient hack, it is now once again possible to connect to a server without crashing immediately. However, I did get a crash after a few seconds, so there is definitely still *something* nasty going on under the hood.
2023-01-03 20:20:22 +00:00
toaster
80d19a8458 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into save_p-unglobal-alt
# Conflicts:
#	src/g_demo.c
2023-01-03 19:45:18 +00:00
toaster
b573b6efbc Don't tie restoring mobj/waypoint pointers on player struct to existence of player object 2023-01-03 19:41:46 +00:00