Commit graph

1313 commits

Author SHA1 Message Date
James R.
2d9d06e267 Let window be resizable 2023-09-30 16:09:10 -07:00
James R.
18efb35602 SDLSetMode: render immediately after resolution change to avoid 1-frame of texture presented at wrong size 2023-09-30 16:07:53 -07:00
Eidolon
2bad8126ac Delete outdated memcpy optimization
The libc memcpy is faster
2023-09-24 18:32:22 -05:00
James R.
acbe0b270c s_sound.c: consolidate music volume related functions, always use cvars internally 2023-09-22 02:00:50 -07:00
toaster
de60a2dbba new_sound.cpp: Compilation fix for non-TRACY 2023-09-19 18:46:23 +01:00
Eidolon
01240b1bd6 Tracy instrument new audio callback 2023-09-18 16:18:51 -05:00
Eidolon
17f6f9297a Add Tracy memory instrumentation
Does not capture C++17 aligned new/delete.
2023-09-18 16:17:04 -05:00
Eidolon
42e5646c15 Add Tracy frame time instrumentation 2023-09-18 16:16:08 -05:00
James R
6c0b042eed Refactor cvar definitions completely, move everything to cvars.cpp
- No need to call CV_RegisterVar
- Cvar definitions live in only one file, easier to locate
- Organized into sections -- netvars, cheats, etc.
- Use builder pattern to initialize cvars
- Still need to extern if you want to read the cvar value
2023-08-25 17:22:40 -07:00
James R
c5e341769b Remove unused cvars
- growmusicfade
- invincmusicfade
- music_resync_powerups_only
- music_resync_threshold
- renderstats (wasn't even registered in the console!)
- resetspecialmusic
- resume
- samplerate
- stretch
- tailspickup
2023-08-24 04:52:41 -07:00
toaster
ba7d319457 Make bios.pk3 consistent filename
Removes all reference to main.kart, not just the obvious ones.
2023-08-20 22:06:11 +01:00
James R
c6db634635 Completely refactor G_BuildTiccmd into many smaller pieces 2023-08-13 17:08:12 -07:00
Oni
713cb57486 Merge branch 'vape-mode' into 'master'
Slow down level music in Encore - "vape mode"

See merge request KartKrew/Kart!1359
2023-08-03 14:11:40 +00:00
James R
b681fe226a Add Resampler to music filter chain, let I_SetSongSpeed do something 2023-08-01 19:04:30 -07:00
AJ Martinez
c9cf1e4673 Add our custom controller mappings before init 2023-07-28 16:57:15 -07:00
toaster
277f7c51a3 V_ScaledWordWrap
Moves WordWrap to the font/V_GetFontSpecification system.

Much healthier long-term for our purposes, including the possibility of changing fonts for various contexts freely.
2023-07-12 09:00:29 +01:00
Sally Coolatta
c486ec19af SECRET_COLOR 2023-04-25 14:19:52 +01:00
Sal
40e9fd9644 Merge branch 'revert-revert-ignore-os-repeats' into 'master'
Ignore OS Repeats

See merge request KartKrew/Kart!1137
2023-04-17 04:16:53 +00:00
SteelT
bdfccb4478 Change static buffer size to 2048, fixes the "directive output may be truncated writing up to" error 2023-04-12 14:31:50 -04:00
toaster
fa48fa421b Guarantee initialisation of event.data2 to 0 for controller button event 2023-04-12 18:49:23 +01:00
toaster
3210b7b80c Revert "Revert "Ignore OS key repeats for game controls""
This reverts commit b6b5175bbee451579dc7d364cb40787e29b25a83.
2023-04-12 18:42:16 +01:00
toaster
74247d8100 Permit compiling with LOGMESSAGES disabled (and accomodate a crash early enough in the startup before the log is made, too) 2023-04-12 15:08:17 +01:00
toaster
adc2adb5c8 I_ShowErrorMessageBox for SDL interface
Handles showing the error message box on quit.
- Polite communication that the game fell over and that you (probably) didn't do anything wrong
- Accomodates pointing you to UNIXBACKTRACE and _WIN32 exchndl crash logs if relevant
- Points you to the specific dated and timed log file that contains the error
- Tells you that the vague and often confusing error message (like I_Error) is for a programmer, server host, or add-on creator
- Hee Ho!
2023-04-12 14:59:12 +01:00
Eidolon
91a6bcf8be Merge branch 'shader-postproc' into 'master'
Shader-based postimg effects

See merge request KartKrew/Kart!1138
2023-04-04 03:37:43 +00:00
Eidolon
356e3317df hwr2: Do postimg in hardware
Depends on updated shaders
2023-04-02 19:46:21 -05:00
Eidolon
769ce2ef65 Add I_GamepadRumble, I_GamepadRumbleTriggers 2023-04-02 21:56:39 +01:00
Eidolon
a9fcff852d rhi: Rewrite shader loading
Multiple shader sources, simpler macro definition, and slightly more
data driven.
2023-04-01 17:32:34 -05:00
James R
da004414a3 Play a goofy sound when I_Erroring
Reorders shutdown in I_Error a little bit so the message
box displays before I_ShutdownSound and SDL_Quit (so the
sound can continue playing while the message box is open).
This should not have any other effects and
I_ShutdownGraphics is still done beforehand, which closes
the main game window.
2023-03-30 17:13:55 -07:00
Eidolon
4210b45a41 Load gamecontroller(_user).txt gamepad mappings 2023-03-24 14:19:58 -05:00
Eidolon
aa0673c43f Print the device name and GUID for connected pads 2023-03-23 22:55:46 -05:00
Oni
b9bbb6cb8a Merge branch 'conditions-cascading' into 'master'
Conditions Cascading

Closes #366

See merge request KartKrew/Kart!1053
2023-03-23 23:51:30 +00:00
toaster
5a7f7b58f0 HandleGamepadDeviceEvents: Call at all junctures where event_t are digested
Permits controllers to actually be added when starting with -server
2023-03-19 17:27:23 +00:00
toaster
4c0077e07c Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into conditions-cascading 2023-03-19 13:01:06 +00:00
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