Commit graph

1380 commits

Author SHA1 Message Date
James R
c503ef9492 Merge branch 'warn-duplicate-texture-names' into 'master'
Warn about duplicate textures in data files

Closes #456

See merge request KartKrew/Kart!1044
2023-03-18 11:09:28 +00:00
James R
a08c0d478c signal_handler_child: call G_DirtyGameData for NEWSIGNALHANDLER too 2023-03-17 22:27:35 -07:00
toaster
3e900d7f57 G_DirtyGameData: Dirty bit only applied in I_Error and signal handlers, nowhere else
- Unfortunately, the way this system previously worked, the unlock was given to you for free if you accidentially opened two copies of the game at once.
- Instead, open the file in r+ mode, shimmy along 5 bytes, and write a `true` to be read later.
- Far more memory safe than rewriting the entire gamedata out on crash.

ALSO:
- crashflags has been split into boolean evercrashed and UINT8 musicflags.
    - We don't need to track if the LAST session was a crash, at least not right now.
    - Opens the floor up to other music like Loser Club happening on the Challenges menu.
2023-03-17 14:42:06 +00:00
James R
666837c620 Call R_PrintTextureDuplicates on I_Quit too
Fixes crash from thread terminating if the program exits
before the title screen.
2023-03-16 23:23:16 -07:00
toaster
b3e803a294 Merge branch 'hotswap-legacy-gl' into 'master'
Restore renderer swapping to and from legacy GL

See merge request KartKrew/Kart!1026
2023-03-14 22:56:02 +00:00
toaster
2e1efaff0c Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into conditions-cascading
# Conflicts:
#	src/k_battle.c
#	src/k_hud_track.cpp
#	src/k_kart.c
#	src/p_inter.c
2023-03-14 21:59:19 +00:00
Oni
9f4c080964 Merge branch 'dynamic-controllers' into 'master'
Handle gamepads from interface dynamically

Closes #397

See merge request KartKrew/Kart!1018
2023-03-13 07:56:34 +00:00
James R
ab26a66602 Merge branch 'new-sound-musicdef' into 'master'
Implement musicdef volume in new mixer

See merge request KartKrew/Kart!1029
2023-03-12 03:43:58 +00:00
Eidolon
17c1e69ed5 Recreate GL context on renderer swap
Restores renderer swapping to legacy GL
2023-03-11 11:08:49 -06:00
toaster
c67412f6ef Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into conditions-cascading 2023-03-11 12:42:55 +00:00
Eidolon
901ebdb5b0 Implement musicdef volume in new mixer 2023-03-09 15:12:24 -06:00
James R
ed551114d5 Windows: add -noexchndl, disables loading exchndl.dll 2023-03-08 17:11:05 -08:00
James R
afa62f2402 I_Error if exchndl.dll is missing for Windows builds 2023-03-07 17:52:10 -08:00
Sally Coolatta
edd5398373 G_PlayerAnalogInput cleanup
Emergency keyboard keys work again, and the input code is more straight-forward.
2023-03-07 05:01:26 -05:00
Eidolon
86a9579e16 Handle gamepads from interface dynamically
Fixes numerous issues with hotswapping, gamepad assignment, and menu
responsiveness.
2023-03-07 00:07:47 -06:00
toaster
53ce2e4287 Gamedata-related changes + Crash tracking
- Combine multiple adjacent saves
    - Generally could happen during game ticking, combined via gamedata->deferredstate
    - DEFINITELY happened in splitscreen PWR handling, adjust those loops directly
- Write "dirty" state via gamedata->crashflags on everything except safe, intentful unloads
    - Add UC_CRASH, which unlocks dependent on the above "dirty" state being present at gamedata load
    - We can use this for something more useful and less funny later.
- Play "O_LOSERC" on the menu, starting with the Challenges screen, if a UC_CRASH condition has been met.
2023-03-03 13:38:31 +00:00
Eidolon
11fecebc47 Make AVRecorder WebM an optional part of the build 2023-02-26 20:18:05 -06:00
Eidolon
d855d96a10 hwr2: Add hardware 2D rendering 2023-02-26 18:47:42 -06:00
James R
fa0071e785 sdl/new_sound.cpp: record audio with AVRecorder 2023-02-24 19:21:01 -08:00
James R
d8ad8eb5d5 Enable seg fault on I_Error ifdef DEVELOP
This produces a backtrace for I_Errors.
2023-02-19 22:02:37 -08:00
James R
1d688c3417 sdl/i_system.c: add -nofork option to disable forking signal handler 2023-02-14 04:16:57 -08:00
Oni
d42fdd0346 Merge branch 'music-debug' into 'master'
Music debugging, devmode music

See merge request KartKrew/Kart!885
2023-01-25 00:14:42 +00:00
toaster
b6be0ef6e8 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into music-debug
# Conflicts:
#	src/audio/xmp.cpp
#	src/audio/xmp_player.cpp
#	src/sdl/new_sound.cpp
2023-01-22 15:20:14 +00:00
SteelT
aef982c8d5 Fix XPM window icon not being used 2023-01-21 18:47:29 -05:00
James R
dfd13b5a7a Merge branch 'fix-nosound' into 'master'
Fix -nosound command line option not disabling sound effects

Closes #405

See merge request KartKrew/Kart!883
2023-01-21 20:26:51 +00:00
Eidolon
ccc10eadd0 hwr2: Reformat C++ code 2023-01-14 19:59:41 -06:00
Eidolon
fcb4dfe3d7 hwr2: Restore legacy OpenGL temporarily 2023-01-14 19:52:33 -06:00
Eidolon
b932607359 hwr2: Remove sw testing state from sdl video 2023-01-14 19:52:10 -06:00
Eidolon
01ddbf6dcf (WIP) hardware: add render hardware interface 2023-01-14 18:40:26 -06:00
James R
d5302d9e5d Merge branch 'clang-format-adjustments' into 'master'
cxx: clang-format adjustments

See merge request KartKrew/Kart!880
2023-01-12 19:09:41 -08:00
James R
49c5c785bf Remove musictype_t, S_MusicType and I_SongType return implementation string
Lua API change: S_MusicType now returns string instead of number
2023-01-12 02:50:02 -08:00
James R
eb8d03f479 Do not disable and reenable sounds entirely when window focus changes
Sounds are not started if the window is unfocused,
regardless of sound_disabled.

Fixes -nosound not working (sounds would always be
reenabled if window comes into focus).
2023-01-11 18:22:06 -08:00
Eidolon
f43de07fd1 cxx: clang-format adjustments 2023-01-09 20:02:19 -06:00
Eidolon
9f649d7701 audio: conditionally shutdown SFX/Music players
Fixes a potential segfault during startup where the sound hasn't been
initialized yet, but an I_Error occurs while loading data.
2023-01-09 14:58:59 -06:00
James R
9be7563353 sdl/i_video.cpp: fix -Wsign-compare 2023-01-07 07:51:54 -08:00
Eidolon
b57c92efd3 cxx: Convert sdl/i_video.cpp 2023-01-07 01:24:55 -06:00
Sal
99e6301365 Merge branch 'fix-window-refocus' into 'master'
SDL: only react to window focus changes if state actually changes

See merge request KartKrew/Kart!859
2023-01-06 02:29:13 +00:00
James R
16ac11d76e sdl/i_main.cpp: guard entire init_exchndl behind _WIN32
Fixes -Wunused-function
2023-01-05 18:06:52 -08:00
Eidolon
1094f844a6 Merge branch 'loadlibrary-exchndl' into 'master'
core: load exchndl.dll at runtime, RINGRACERSWADDIR

See merge request KartKrew/Kart!857
2023-01-05 23:30:23 +00:00
James R
dfd8a36f8f sdl/i_main.cpp: fix -Wliteral-suffix 2023-01-05 03:51:04 -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
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
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
be021baa02 Add extern "C" in C++ to all headers 2022-12-30 19:26:16 -06:00
James R
5395194ed6 cmake: generate config.h at build time, always rebuild comptime.c 2022-12-27 00:59:28 -08:00
Sally Coolatta
38d8281a6b Merge branch 'master' into cmake-sources 2022-12-15 19:54:59 -05:00
Sal
dbf11e228d Merge branch 'vsync-default-off' into 'master'
Make vsync default to off

See merge request KartKrew/Kart!794
2022-12-02 05:06:25 +00:00