Compare commits

...
4683 Commits
Author SHA1 Message Date
alufolie91 ce198f2bd1 fix G_GetDemoDate
forgor to change this back oopsie
2026-11-07 13:51:58 +01:00
alufolie91 5808f5d367 (hopefully) make replay date stuff more thread safe
dont do locale stuff from thread, use localtime_r && localtime_r as localtime is not threadsafe either
G_GetDemoDate returns malloc´d buffer again, tho not strictly necessary
also, fix dates not always being initialized in all cases and type issue with G_GetCreationTime
2026-11-06 16:14:28 +01:00
alufolie91 128d2ea329 fix blendmodes and line translucency on polyobject sides in gl
this is also how vanilla kart handled this code eitherways
2026-11-05 15:37:38 +01:00
alufolie91 d291431cb7 add checks for missing bsp lumps
not sure why there werent any, the other map lumps have those, and a corrupted file may have those missing also which would just crash instead of telling you wtf is wrong
2026-11-05 15:33:40 +01:00
alufolie91 394f406a1a use "rawlinedef" when checking for seg issues
smth smth byte order or whatever but is consistent with the rest of the code anyways
2026-11-05 15:32:22 +01:00
alufolie91 9bbb551cc6 "fix" skywalls on hadal trench and candy lake
this whole sky handling is just incredibly stupid and wouldve been such an easy fix, but here we go
this is just more stupid hacks but i really dont feel bad here since the code already hacked around a bunch of shit
just hoping this wont cause any issues on some maps and needs testing
sigh
2026-11-05 15:31:25 +01:00
alufolie91 082af23535 add compile flag for building with thread sanitizer
indev noticed thats a thing that exists
wouldve been quite useful a bunch of times before lol
also some fixes for the other sanitizer flags
2026-11-04 01:41:52 +01:00
alufolie91 cab9d950f7 Zzz 2026-11-04 00:49:02 +01:00
alufolie91 a87e0709dd remove "flatcheck" from HWR_PrecacheLevelFlats
in practice this did nothing really
would be more useful for encore but that aint working for us so whatever
2026-11-04 00:18:52 +01:00
alufolie91 7c830cb4b1 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2026-11-04 00:04:41 +01:00
alufolie91 31de37a6de fix some holes and cracks in the gl renderer on some maps
hopefully...
this is adapted from the large refactor but that was slow as shit
needs testing to see if this messes with something
2026-11-03 23:50:31 +01:00
indev 3adcf608c3 (Hopefully) fix race condition in replay hut
It was probably caused by menupath being modified when replay load
thread is in the middle of checking it, now the check for "valid"
replay load thread is simpler. Also as comment says, there still are
few reported data races for replaynamesloaded but i THINK it should be
fine, since the only "data race" that could be harmful here is
replaynamesloaded switching from true to false, which would mean
demolist_all is suddenly invalidated, and that shouldn't be possible
because we only switch replaynamesloaded from true to false inside main
thread while also locking the "search mutex"
(this is so wordy lol)
2026-11-04 01:06:18 +03:00
indev 9682ab59c9 Make M_CheckParm thread-safe, it is called from different thread in http-mserv.c for example 2026-11-03 23:56:22 +03:00
alufolie91 51adf8869c HWR_PrecacheLevelTextures should also skip texture number 0
whoopsie
2026-11-02 14:58:55 +01:00
alufolie91 e5d5ac884a HWR_PrecacheLevelTextures should also skip texture number 0
whoopsie
2026-11-02 14:58:40 +01:00
alufolie91 5183baed44 make HWR_ApplyDispoffset a little less ugly lol 2026-11-02 14:41:09 +01:00
alufolie91 e5c6cb635d make teleporter handling in P_ProcessLineSpecial a little less ugly lulul 2026-11-02 14:41:06 +01:00
alufolie91 b783913649 make teleporter handling in P_ProcessLineSpecial a little less ugly lulul 2026-11-02 14:40:48 +01:00
alufolie91 d980dc04da make HWR_ApplyDispoffset a little less ugly lol 2026-11-02 14:40:01 +01:00
alufolie91 1ba4fe99a7 fix fof noencore ceiling checks being flipped in opengl renderer
matches software now
even if most  custom maps were made with opengl in mind, stuff did not work anyways for years so this shouldnt hopefully cause any issues
2026-11-02 14:38:56 +01:00
alufolie91 83cc7a55ce fix fof noencore ceiling checks being flipped in opengl renderer
matches software now
even if most  custom maps were made with opengl in mind, stuff did not work anyways for years so this shouldnt hopefully cause any issues
2026-11-02 14:38:38 +01:00
alufolie91 c44d6f6aeb update HWR precache stuff
not much but matches stuff i did for blan
2026-11-02 14:32:12 +01:00
alufolie91 3cbc94b5ed update HWR precache stuff
not much but matches stuff i did for blan
2026-11-02 14:32:02 +01:00
alufolie91 07427b391e dont run horizonline code on fofs in opengl
this currently does NOT work anyways and just wastes time for nothing on some maps
2026-11-02 00:15:38 +01:00
alufolie91 a4014d8ad7 dont run horizonline code on fofs in opengl
this currently does NOT work anyways and just wastes time for nothing on some maps
2026-11-01 17:28:30 +01:00
alufolie91 2210bd4e2d opengl: fix opaque fof planes checking the wrong sector for encore remap
it should check its own "master" sector for remap behavior NOT the sector it resides in
note: i did not change the ceiling/floor behavior here as i noticed there might be more issues than this with fofs
2026-10-31 12:51:01 +01:00
alufolie91 f4ac08d09f some smaller mobj related things
mostly cleanup and correctness fixes for phobos build
2026-10-31 12:50:18 +01:00
alufolie91 090580badf replace number with COM_SPLITSCREEN 2026-10-31 12:50:14 +01:00
alufolie91 136c8b30e6 fix opaque fofs checking the wrong sector for encore remap
it should check its own "master" sector for remap behavior NOT the sector it resides in
note: i did not change the ceiling/floor behavior here as i noticed there might be more issues than this with fofs
2026-10-31 12:49:45 +01:00
alufolie91 a4a36f2536 some smaller mobj related things
mostly cleanup and correctness fixes for phobos build
2026-10-31 12:46:47 +01:00
alufolie91 1b781c747e make this more clear 2026-10-17 17:17:49 +02:00
SteelT 0eacda7494 discord.c: Fix joinSecret memory leak 2026-10-17 16:26:33 +02:00
SteelT 4d5d9cae68 discord.c: Fix joinSecret memory leak 2026-10-17 16:26:07 +02:00
alufolie91 e131f1b903 ensure skin models are ALWAYS initialized
if smth sets nomd2s those werent set up correctly and enabling models just ended up drawing nothing instead

ideally nomd2s == false should just completely disable the model system but im too lazy for that currently
2026-10-17 16:06:11 +02:00
alufolie91 22be75449c fix compile with discordrpc 2026-10-17 00:05:46 +02:00
alufolie91 4400b0140b fix buffer overflow with skinnumbers in R_ParseSpriteInfo
this was always too small and would just cause a buffer overflow if youd reached the skinlimit and then attempt to load localskins
2026-10-16 15:20:19 +02:00
alufolie91 424729d5f0 remove localskin limit 2026-10-16 15:05:29 +02:00
alufolie91 6c1195d551 move translationtablecache to skin_t
last remaining static buffer for localskins
now we can remove the limit completely
there are still some static arrays for normal skins remaining, removing those will take a bit more work im currently waaaaay too lazy for
2026-10-16 15:05:05 +02:00
alufolie91 6adf80e146 fix some skinnumber bound checks
gotta stay within "numskins" now instead of maxskins
2026-10-16 15:03:48 +02:00
alufolie91 14df9c01fa send over less mobj stuff in savegame on mobjscaled maps in some cases for phobos build
none of this ever accounted for mapobjectscale
sadly not vanilla compatible but oh well
from https://gitlab.com/kart-krew-dev/ring-racers/-/commit/c4cca8c8b703b4bb23e27be4c3bfd37b9d092215
2026-10-15 16:25:51 +02:00
alufolie91 40f4a4d76d send over less mobj stuff in savegame on mobjscaled maps in some cases for phobos build
none of this ever accounted for mapobjectscale
sadly not vanilla compatible but oh well
from https://gitlab.com/kart-krew-dev/ring-racers/-/commit/c4cca8c8b703b4bb23e27be4c3bfd37b9d092215
2026-10-15 16:25:40 +02:00
alufolie91 a69fc07dcf fix smoldering smoke not accounting for mapobject scale (but vanilla compatible)
:chaosleep:
2026-10-15 16:17:33 +02:00
alufolie91 ad1d00a03d fix smoldering smoke not accounting for mapobject scale (but vanilla compatible)
:chaosleep:
2026-10-15 16:17:18 +02:00
alufolie91 cea97226d5 fix driftdust and respawn lasers not accounting for mapobjectscale (but vanilla compatible)
super annoying, but at least it looks right like that
2026-10-15 14:52:49 +02:00
alufolie91 634c470502 fix driftdust and respawn lasers not accounting for mapobjectscale (but vanilla compatible)
super annoying, but at least it looks right like that
2026-10-15 14:51:33 +02:00
alufolie91 19a7a4c5c1 remove duped copyright 2026-10-15 10:15:51 +02:00
alufolie91 98d4ab3e9d do not attempt to netsync locally spawned mobjs
it is generally not really advised to locally load addons as a host as that might cause issues
2026-10-15 10:15:48 +02:00
alufolie91 424496595d remove duped copyright 2026-10-15 10:12:52 +02:00
alufolie91 c346f40cbf do not attempt to netsync locally spawned mobjs
it is generally not really advised to locally load addons as a host as that might cause issues
2026-10-15 10:12:24 +02:00
alufolie91 1700db48b4 make player gravstretch and squish properly account for mapobjscale 2026-10-15 09:30:13 +02:00
alufolie91 ba3429f497 software: add helper for getting "wall lights"
slightly less ugly
2026-10-15 09:28:10 +02:00
alufolie91 11b9fecd84 make player gravstretch an squish properly account for mapobjscale 2026-10-15 09:27:52 +02:00
alufolie91 05f628d4bd smol style fix gravstretch stuff 2026-10-15 08:57:55 +02:00
alufolie91 35963c2142 software: add helper for getting "wall lights"
slightly less ugly
2026-10-15 08:57:27 +02:00
Alug 3b98d6c44f addfilelocal/autoload: fix showing wrong error when file was not found
W_CheckFileContains returns -1 if file was not found which still triggered those conditions
so just handle if file was not found to skip doing other stuff in those cases
2026-10-14 13:56:31 +02:00
Alug 74963229c1 addfilelocal/autoload: fix showing wrong error when file was not found
W_CheckFileContains returns -1 if file was not found which still triggered those conditions
so just handle if file was not found to skip doing other stuff in those cases
2026-10-14 13:56:15 +02:00
alufolie91 6d0cae9bd5 fixup localskin lua stuff
i hope and pray this does not explode
localskin lookup per skinnumber straight up did not work and also technically could cause issues if someone would load localskins before other skins
and generally localskins are now ONLY exposed if luaimmersion is enabled
2026-10-12 17:43:11 +02:00
alufolie91 ae41feafd3 cleanup localskin md2 handling 2026-10-12 16:23:05 +02:00
alufolie91 8a49388bba remove now unnecessary mobj skin_t casts
no more void pointers for this stuff!
2026-10-12 15:52:52 +02:00
alufolie91 3183ec58ab simpler fix for localskin minimap angle display crash 2026-10-12 15:13:38 +02:00
alufolie91 fb61c474e8 simpler fix for localskin minimap angle display crash 2026-10-12 15:12:23 +02:00
alufolie91 a061d72a8d simplify skin helper functions a bit 2026-10-12 15:12:03 +02:00
alufolie91 46a72bda8e fix crash when applying localskin midgame 2026-10-08 09:24:30 +02:00
alufolie91 c6f9458e4f fix crash when applying localskin midgame 2026-10-08 09:21:40 +02:00
alufolie91 a464e1ee5d fix another "0 as null pointer" case 2026-10-08 09:07:01 +02:00
alufolie91 9cacbb1067 dynamically allocate skin/localskins
based on https://gitlab.com/kart-krew-dev/ring-racers/-/commit/255570cfca8ac6a2700098036085a48a10a3a84b

this also extends to localskins and some other things that were static arrays before, like the faceprefixes and md2 models
those are now part of the skin_t structs aswell

TODO: dynamic allocate the translationtablecaches so we can completely remove the localskin limits and maybe further cleanup localskin handling

also cleans up a few parts of the localskin handling
and might reduce general memory usage slightly in some cases

this gave me an intense headache ngl
2026-10-08 09:06:13 +02:00
alufolie91 156400ffc2 fix arithmetic on NULL pointer when drawing 3d models
caused by localskin code.... sigh......
noticed this while messing with dynamic allocated (local)skins
2026-10-07 20:25:56 +02:00
alufolie91 d2ffe7ff23 fix faulty arithmetic on NULL pointer when drawing 3d models
caused by localskin code.... sigh......
noticed this while messing with dynamic allocated (local)skins
2026-10-07 20:24:35 +02:00
alufolie91 116fbd93d0 cleanup squishdance stuff a bit
we dont need all those things saved per player really lol
2026-10-07 09:58:20 +02:00
alufolie91 30affaf451 cleanup saltyhop a little, move it to player struct 2026-10-07 09:58:20 +02:00
alufolie91 88bf570d26 cleanup squishdance stuff a bit
we dont need all those things saved per player really lol
2026-10-07 09:50:16 +02:00
alufolie91 0a5851bb34 cleanup saltyhop a litte, move it to player struct 2026-10-07 09:42:51 +02:00
alufolie91 a4d3e807a9 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2026-10-04 00:59:13 +02:00
alufolie91 d66020e3a9 fix localskin menu not showing localskin 3d models
this should use the skins localnumber not the "actual" skinnumber
yeah localskin code still sucks....
fixes https://github.com/Indev450/SRB2Kart-Saturn/issues/230
2026-10-04 00:56:25 +02:00
alufolie91 f40780e93a have Z_IsMobjValid2 print an error in console
if mobj pointer is invalid
the callee should handle the behavior
2026-10-02 18:11:47 +02:00
alufolie91 9e80be5d47 add code to check for mobj pointer validity
as we use the pool allocator we may check if a mobj points into the address range of the level pool specific to mobj allocations (g_level_large_pool)
this may help in debugging stuff without the need to run things like ASAN or valgrind
2026-10-02 18:07:32 +02:00
alufolie91 4749d1a108 OpenGL: prefer GL_RGBA for fbo texture
as recommended per https://wikis.khronos.org/opengl/Common_Mistakes
2026-10-01 19:30:09 +02:00
alufolie91 6edfdd34a3 OpenGL: prefer GL_RGBA for water screen copy
as per recommended https://wikis.khronos.org/opengl/Common_Mistakes
2026-10-01 19:29:46 +02:00
alufolie91 f3a0b02861 OpenGL: prefer GL_RGBA for fbo texture
as recommended per https://wikis.khronos.org/opengl/Common_Mistakes
2026-10-01 19:29:07 +02:00
alufolie91 36d13734f6 v10.1 2026-09-27 17:53:52 +02:00
alufolie91 3fc5f572bb fix CMake again............ 2026-09-27 17:35:05 +02:00
alufolie91 d65319a9fc fix "Modulative" blendmode in software
forgot to account it when the gamma correction stuff was ported
2026-09-27 17:15:42 +02:00
alufolie91 94e7061f5e fix "Modulative" blendmode in software
forgot to account it when the gamma correction stuff was ported
2026-09-27 17:15:19 +02:00
alufolie91 ce6c69de89 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2026-09-26 15:16:24 +02:00
alufolie91 1d8b066a64 fix desynchs with vanilla on Sewer System
read the sectornode list stuff
this means we reuse old stale data in some cases, which also causes strange bugs with orbiting items in some cases, but thats what vanilla does and we HAVE to keep vanilla compat after all
i really hope this does not cause any fun impossible to debug crashes, but what can you do
2026-09-26 15:12:28 +02:00
alufolie91 e6033322c6 disable phobos in cmake
stupid copy paste error
2026-09-26 12:03:05 +02:00
alufolie91 e4cc4fda60 disable phobos in cmake
stupid copy paste error
2026-09-26 12:02:57 +02:00
alufolie91 d988876bca change version number for phobos
phobos is NOT vanilla compatible and is not meant to be
this should prevent the game be able to connect to vanilla servers hopefully
2026-09-26 11:57:33 +02:00
alufolie91 c5968f7535 change version number for phobos
phobos is NOT vanilla compatible and is not meant to be
this should prevent the game be able to connect to vanilla servers hopefully
2026-09-26 11:57:23 +02:00
alufolie91 7e92482ced add orbit mobj check into K_MoveHeldObjects 2026-09-25 22:07:09 +02:00
alufolie91 d851368c7a add orbit mobj check into K_MoveHeldObjects 2026-09-25 22:06:46 +02:00
alufolie91 fa753c3694 Revert "cleanup and make safer, orbit item handling in K_MoveHeldObjects"
This reverts commit 5e1ae2155f.
2026-09-25 22:03:03 +02:00
alufolie91 6398b2d542 Revert "cleanup and make safer, orbit item handling in K_MoveHeldObjects"
This reverts commit 21c61f6bca.
2026-09-25 22:02:39 +02:00
indev 58403cf4a5 Revert "Prevent orbit from being freed by using P_SetTarget in K_RepairOrbitChain"
This reverts commit 13241d1880.
2026-09-25 22:04:15 +03:00
indev 13241d1880 Prevent orbit from being freed by using P_SetTarget in K_RepairOrbitChain 2026-09-25 21:54:49 +03:00
alufolie91 91f016fd0c remove inline from P_TagDamage
not only this is basically unused its also quite huge
so no need to inline this at all
2026-09-25 20:34:49 +02:00
alufolie91 0e5b939dd4 remove inline from P_TagDamage
not only this is basically unused its also quite huge
so no need to inline this at all
2026-09-25 20:34:34 +02:00
alufolie91 5e1ae2155f cleanup and make safer, orbit item handling in K_MoveHeldObjects
based on https://gitlab.com/kart-krew-dev/ring-racers/-/commit/4e9d2295c9da30888fea77825c276bac831aecb3
2026-09-25 20:32:31 +02:00
alufolie91 21c61f6bca cleanup and make safer, orbit item handling in K_MoveHeldObjects
based on https://gitlab.com/kart-krew-dev/ring-racers/-/commit/4e9d2295c9da30888fea77825c276bac831aecb3
2026-09-25 20:30:48 +02:00
alufolie91 dd2a227529 mobj hnext/hprev list fixes for phobos build
too lazy to cherry pick so
https://gitlab.com/kart-krew-dev/ring-racers/-/commit/a392996a5437742d5b7a91d0fce9da49c3a8bd76
and
https://gitlab.com/kart-krew-dev/ring-racers/-/commit/8b5bd645ca5d8ef9269aa6ccf4375337bd0c1672

both of which might change behavior so phobos only
2026-09-25 19:03:46 +02:00
alufolie91 e836652e0d mobj hnext/hprev list fixes for phobos build
too lazy to cherry pick so
https://gitlab.com/kart-krew-dev/ring-racers/-/commit/a392996a5437742d5b7a91d0fce9da49c3a8bd76
and
https://gitlab.com/kart-krew-dev/ring-racers/-/commit/8b5bd645ca5d8ef9269aa6ccf4375337bd0c1672

both of which might change behavior so phobos only
2026-09-25 18:41:29 +02:00
alufolie91 9521183eb3 cast this to boolean
no effective change just wanna be more explicit there
2026-09-23 19:17:13 +02:00
alufolie91 a0c493fd3b cast this to boolean
no effective change just wanna be more explicit there
2026-09-23 19:16:56 +02:00
alufolie91 56bb20f4e1 cleanup controller menu stuff a little more 2026-09-23 18:31:49 +02:00
alufolie91 2756888997 cleanup controller menu stuff a little more 2026-09-23 18:31:40 +02:00
alufolie91 604fa7281b dont reset JoyInfo in I_InitJoystick
seems to fix wonky behavior when changing controllers per player
2026-09-23 18:24:44 +02:00
alufolie91 7bbbf93d7f dont reset JoyInfo in I_InitJoystick
seems to fix wonky behavior when changing controllers per player
2026-09-23 18:24:30 +02:00
indev fb70f46398 20 2026-09-21 21:47:38 +02:00
indev 2c9a82e2d3 20 2026-09-21 22:36:41 +03:00
alufolie91 4f7e296885 fun times with M_DoAssignJoystick
my tired ass forgor cv_usejoystick gets reassinged within this, so the cvar string also changes
2026-09-21 20:41:01 +02:00
alufolie91 9e8dbdc83b fun times with M_DoAssignJoystick
my tired ass forgor cv_usejoystick gets reassinged within this, so the cvar string also changes
2026-09-21 20:40:50 +02:00
indev c917708184 Actually change command name to useprefcolor, so its a bit more intuitive 2026-09-21 20:57:18 +03:00
indev 110e93f4ed Add command to change skin color to prefcolor 2026-09-21 20:53:44 +03:00
orbitalviolet a0d6d452a0 Fix regression #1507 2026-09-21 18:41:10 +02:00
orbitalviolet 8c9ee523f4 Fix regression #1507 2026-09-21 18:35:05 +02:00
alufolie91 7fb3f7a1aa YES THANKS MICHEALSOFT VERY COOL 2026-09-21 17:32:08 +02:00
alufolie91 e6407419f4 YES THANKS MICHEALSOFT VERY COOL 2026-09-21 17:31:24 +02:00
alufolie91 da04d7f55a wipe all the lua crap
cba fixing any of this or breaking shit really
2026-09-21 17:23:48 +02:00
Roberto Ierusalimschy 7e906074ec keep memory-error message in the global state, so that its use
does not depend on Lua internalizing strings to avoid a string
creation on memory errors
2026-09-21 17:14:21 +02:00
alufolie91 9a4a4e061d point2uint for blua interning string cache 2026-09-21 17:01:54 +02:00
alufolie91 c257f18bf2 move memerrmsg 2026-09-21 16:54:19 +02:00
alufolie91 2ac97457bf use strnlen in W_CheckNumForNamePwad
we clamped this to a length of 8 eitherways
so might aswell just use strnlen which is safer in any case
2026-09-21 16:45:14 +02:00
alufolie91 de35e086d3 use strnlen in W_CheckNumForNamePwad
we clamped this to a length of 8 eitherways
so might aswell just use strnlen which is safer in any case
2026-09-21 16:44:56 +02:00
alufolie91 295b35b23a cleanup p_mobj + more safety
big cleanups and more mobj checks
needs to be rechecked since its quite a lot
2026-09-21 16:38:54 +02:00
alufolie91 a5b6dad8f3 cleanup p_enemy + more safety
add a crapton of checks for removed mobjs
copy pasted from srb2 mainly
2026-09-21 16:37:40 +02:00
alufolie91 d024992144 clean up Command_connect 2026-09-21 16:34:33 +02:00
alufolie91 3df604e8b6 expand sector flags
include gravflip, heatwave, noclipcam and invertencore
is a bit cleaner
may also add the special flags at some point to clean things up a bit more
2026-09-21 16:33:21 +02:00
alufolie91 080f586c19 simplify W_CheckNumForNamePwad
pretty much what blankart does
avoids doing a bunch of string work
2026-09-21 16:31:18 +02:00
alufolie91 5d788c34d1 Merge remote-tracking branch 'origin/lua-no-zzone' into lugstuff 2026-09-21 16:26:27 +02:00
indev 0e62afd348 Count lua memory for total usage in memfree command 2026-09-21 17:24:43 +03:00
indev 648d3c439b Change lua to not use z_zone allocator 2026-09-21 17:24:43 +03:00
NepDisk 1dd3e90363 Make memdump show block tags 2026-09-21 16:22:22 +02:00
NepDisk c78c0d1657 Fix memory block not being moved to correct taglist with Z_ChangeTag
I didn't even notice this one at first, whoops! Also added proper checking to prevent this from happening again.
2026-09-21 16:22:01 +02:00
NepDisk 838d05eef7 Convert Z_Zone head into a list similar to thinkerlists
I was thinking to myself about how 2.1 and before did thinkers and how 2.2 made it into thinker lists and thought "wait isn't memory allocated similar to that?" and well here we are.
2026-09-21 16:21:40 +02:00
indev 72288e2bae Count lua memory for total usage in memfree command 2026-09-21 17:14:43 +03:00
alufolie91 3c3e8dd986 use Z_TotalUsage for memory debug display 2026-09-19 21:09:20 +02:00
alufolie91 5e2b4fd115 use Z_TotalUsage for memory debug display 2026-09-19 21:08:57 +02:00
alufolie91 a9d0afc3e2 cleanup p_mobj + more safety
big cleanups and more mobj checks
needs to be rechecked since its quite a lot
2026-09-17 11:48:07 +02:00
alufolie91 49717e1129 cleanup p_enemy + more safety
add a crapton of checks for removed mobjs
copy pasted from srb2 mainly
2026-09-17 11:45:51 +02:00
alufolie91 2d79ff9606 few more smoler style cleanups 2026-09-17 11:44:15 +02:00
alufolie91 3c5a905e8d few more smoler style cleanups 2026-09-17 11:44:06 +02:00
alufolie91 70f4207e02 smol fix for pm´s in DoSayCommand
sending a pm might change the length of the string which we need to reconsider when sending the cmd
2026-09-17 11:40:52 +02:00
alufolie91 fdbe428f82 smol fix for pm´s in DoSayCommand
sending a pm might change the length of the string which we need to reconsider when sending the cmd
2026-09-17 11:40:41 +02:00
alufolie91 242754f811 disable flat precaching in opengl in encoremode
this appears to mess up remapping behavior in certain cases (ex. sneaker/spring panels)
since i cba looking into properly fixing this, ill just disable this for now
2026-09-12 16:53:26 +02:00
alufolie91 b93f300e21 disable flat precaching in opengl in encoremode
this appears to mess up remapping behavior in certain cases (ex. sneaker/spring panels)
since i cba looking into properly fixing this, ill just disable this for now
2026-09-12 16:53:14 +02:00
alufolie91 2608d4ab17 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2026-09-08 09:12:58 +02:00
indev 56ba376c4d Change lua to not use z_zone allocator 2026-09-07 17:11:13 +02:00
indev 0e7460009e Change lua to not use z_zone allocator 2026-09-07 18:03:50 +03:00
alufolie91 521544f6ba raise skinlimit to 1024 for phobos build
not thoroughly tested by me, so might still be incomplete
2026-09-03 19:34:56 +02:00
alufolie91 efc0681e01 make PHOBOS_BUILD a compile flag
pass PHOBOS_BUILD=1 to build
2026-09-03 19:30:55 +02:00
alufolie91 4c3fa7d826 raise numlap limit to 255 for phobos client
idk but this was wanted
2026-09-03 19:21:18 +02:00
alufolie91 ac87678708 rename COMPAT_VANILLA to PHOBOS_BUILD
have a distinct name for that build "Phobos", as a nod to Doom
also invert the flag, as it should make adding stuff less headachey
will make this a compiler flag later but too lazy atm
2026-09-03 18:47:45 +02:00
alufolie91 a6e5edabd2 fix M_TextInputSetString not null terminating in some cases
if input string is longer than the buffer this may never be null terminated properly
2026-09-02 15:05:43 +02:00
alufolie91 f847d63f04 fix M_TextInputSetString not null terminating in some cases
if input string is longer than the buffer this may never be null terminated properly
2026-09-02 15:05:32 +02:00
alufolie91 24e5b1d84b fix buffer overflow when opening "Advanced Color Options"
idk if this is the intended thing, but works fine
2026-09-02 14:40:49 +02:00
alufolie91 a714366517 fix buffer overflow when opening "Advanced Color Options"
idk if this is the intended thing, but works fine
2026-09-02 14:40:40 +02:00
alufolie91 ade7db9004 fix replayhut exploding due to sega fishe
"sega_bass_fishin" is exactly 16 characters which caused stuff to not be terminated
2026-09-02 14:09:33 +02:00
alufolie91 763a9c6329 fix replayhut exploding due to sega fishe
"sega_bass_fishin" is exactly 16 characters which caused stuff to not be terminated
2026-09-02 14:09:23 +02:00
alufolie91 8e80b0f7c2 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2026-08-28 07:58:38 +02:00
indev 819b171d90 Do a full garbage collection after LUA_InvalidateLevel 2026-08-28 00:44:49 +03:00
GenericHeroGuy 882716e911 Make Valgrind builds usable when not running with Valgrind + cleanup 2026-08-24 11:34:55 +02:00
alufolie91 5644036d25 macrofy Z_CheckHeap errors
stuff was slightly ugly and unwieldy.
making it a macro also makes adding new errors less messy
2026-08-24 10:30:28 +02:00
NepDisk b9508caed1 Make memdump show block tags 2026-08-24 10:27:57 +02:00
NepDisk fe2f2fcfdc Fix memory block not being moved to correct taglist with Z_ChangeTag
I didn't even notice this one at first, whoops! Also added proper checking to prevent this from happening again.
2026-08-24 10:26:18 +02:00
GenericHeroGuy f2d5c14519 Make Valgrind builds usable when not running with Valgrind + cleanup 2026-08-24 10:24:35 +02:00
alufolie91 a364ca8d95 macrofy Z_CheckHeap errors
stuff was slightly ugly and unwieldy.
making it a macro also makes adding new errors less messy
2026-08-24 10:20:03 +02:00
alufolie91 de74c9251f make HWR_AddPolyObjectPlanes a little less ugly 2026-08-23 16:40:31 +02:00
alufolie91 66f091e52b make HWR_AddPolyObjectPlanes a little less ugly 2026-08-23 16:40:22 +02:00
alufolie91 1d19841500 fix gravflip bruh moment 2026-08-23 16:32:32 +02:00
alufolie91 39dd3813a0 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2026-08-23 16:23:17 +02:00
alufolie91 1552b1808f "about" 2026-08-21 16:51:04 +02:00
NepDisk dd70d5ae63 Fix missed use of INT32_MAX instead of NUM_PURGETAGS-1 2026-08-21 03:40:32 +02:00
NepDisk 28665bfee4 Convert Z_Zone head into a list similar to thinkerlists
I was thinking to myself about how 2.1 and before did thinkers and how 2.2 made it into thinker lists and thought "wait isn't memory allocated similar to that?" and well here we are.
2026-08-20 12:36:55 +02:00
alufolie91 fd349e2b37 netsync mobj pmomz in non vanilla compat builds
may help with some join desynchs
2026-08-18 17:39:19 +02:00
alufolie91 0cf1cabcc2 basic 32 player support
can just be enabled per MAXPLAYERS define in doomdef
this will also auto undefine COMPAT_VANILLA
no support for tab rankings or intermission rankings at all yet
will port those over eventually from saturn 32p or blankart and clean stuff up
please note this may have bugs since not everything is ported over yet
2026-08-18 17:39:19 +02:00
alufolie91 9470bb5e6a netsync mobj pmomz in non vanilla compat builds
may help with some join desynchs
2026-08-18 17:34:26 +02:00
alufolie91 11bd5c5397 basic 32 player support
can just be enabled per MAXPLAYERS define in doomdef
this will also auto undefine COMPAT_VANILLA
no support for tab rankings or intermission rankings at all yet
will port those over eventually from saturn 32p or blankart and clean stuff up
2026-08-18 17:32:58 +02:00
alufolie91 bcbe765b9d fix potential buffer underflow in portal handling
P_FindSpecialLineFromTag may return -1 in some cases
2026-08-17 19:19:51 +02:00
alufolie91 22cfd67b87 fix potential buffer underflow in portal handling
P_FindSpecialLineFromTag may return -1 in some cases
2026-08-17 19:19:18 +02:00
alufolie91 eca3effb3b raise version to v10
was originally be 9.3 but this update is too massive to be a minor version update
2026-08-17 18:47:42 +02:00
alufolie91 237880eb1d ack 2026-08-17 18:43:45 +02:00
Gustaf Alhäll f1380a276e Fix buffer overflow when running map scripts 2026-08-17 18:43:08 +02:00
James R 8ffeab1646 Reset wait period for COM_BufInsertText 2026-08-17 16:39:27 +02:00
alufolie91 2eb175c356 few more smaller code cleanups 2026-08-17 16:39:23 +02:00
alufolie91 782bd09d56 few more smaller code cleanups 2026-08-17 16:39:12 +02:00
Gustaf Alhäll 463011363e Fix buffer overflow when running map scripts 2026-08-17 16:30:53 +02:00
James R 31f7a86d82 Reset wait period for COM_BufInsertText 2026-08-17 16:27:59 +02:00
alufolie91 ebf2f7b672 a 2026-08-10 20:01:47 +02:00
alufolie91 4e606fc7de fix indentation 2026-08-10 15:50:35 +02:00
Gustaf Alhäll c5116dea1a Add support for OpenBSD 2026-08-10 15:50:32 +02:00
alufolie91 7800dde794 fix indentation 2026-08-10 15:50:25 +02:00
Gustaf Alhäll d85f915707 Add support for OpenBSD 2026-08-10 15:48:46 +02:00
alufolie91 924f9c2151 put directory changing and getting stuff into functions
from https://gitlab.com/kart-krew-dev/ring-racers/-/commit/7ef40f5d743bf6bf251e2edc89cda23e8fb36ee5

changed a bit so windows also can print the "warning" on failure
2026-08-10 15:38:31 +02:00
alufolie91 308f7f93ee put directory changing and getting stuff into functions
from https://gitlab.com/kart-krew-dev/ring-racers/-/commit/7ef40f5d743bf6bf251e2edc89cda23e8fb36ee5

changed a bit so windows also can print the "warning" on failure
2026-08-10 15:35:52 +02:00
alufolie91 e0fa53e4df demonames apparently should write one less character
better keep it like this
2026-08-10 15:33:40 +02:00
alufolie91 625192af56 demonames apparently should write one less character
better keep it like this
2026-08-10 15:32:46 +02:00
alufolie91 eeb7d48a6f one more snprintf replacement for next branch 2026-08-09 17:51:39 +02:00
alufolie91 df291710d8 replace a few more length magic numbers with sizeof
just to be sure really
2026-08-09 17:49:34 +02:00
alufolie91 16577877d3 replace all sprintf with snprintf
some of this was taken from https://gitlab.com/kart-krew-dev/ring-racers/-/commit/59f23dfa181327ed5c00f55688840d39e3583569 so thx!
should fix apple clang warnings and is alot safer to have all this crap be bounded
theres prob alot more other stuff, and id love to eventually replace all the strcpy family functions with snprintf and equivalent
2026-08-09 17:49:31 +02:00
alufolie91 a7bcaf7351 replace a few more length magic numbers with sizeof
just to be sure really
2026-08-09 17:49:23 +02:00
alufolie91 b595a3a663 replace all sprintf with snprintf
some of this was taken from https://gitlab.com/kart-krew-dev/ring-racers/-/commit/59f23dfa181327ed5c00f55688840d39e3583569 so thx!
should fix apple clang warnings and is alot safer to have all this crap be bounded
theres prob alot more other stuff, and id love to eventually replace all the strcpy family functions with snprintf and equivalent
2026-08-09 16:50:18 +02:00
alufolie91 309d459a70 fix apple clang warning for music test
define this as constant otherwise compiler may treat the array as being variable in size for some reason
2026-08-09 15:00:52 +02:00
alufolie91 be97384b01 fix apple clang warning for music test
define this as constant otherwise compiler may treat the array as being variable in size for some reason
2026-08-09 15:00:44 +02:00
alufolie91 e1430f7bc7 replace magic number with sizeof 2026-08-08 19:07:56 +02:00
alufolie91 756f1783ed replace magic number with sizeof 2026-08-08 19:07:48 +02:00
alufolie91 bf70beb88a cleanup SV_SendServerInfo a little
mostly just make it more readable by using ptr
2026-08-08 19:03:31 +02:00
alufolie91 4de859ea1b cleanup SV_SendServerInfo a little
mostly just make it more readable by using ptr
2026-08-08 19:03:24 +02:00
alufolie91 a951622f6a ensure serverinfo "application" is null terminated
not strictly needed but better be safe than sorry
2026-08-08 19:00:13 +02:00
alufolie91 9ca1776f1a ensure serverinfo "application" is null terminated
not strictly needed but better be safe than sorry
2026-08-08 19:00:03 +02:00
alufolie91 d7db0d68dc ensure serverinfo mapname is null terminated
forgor back then
2026-08-08 18:53:55 +02:00
alufolie91 771b2b602c ensure serverinfo mapname is null terminated
forgor back then
2026-08-08 18:53:39 +02:00
alufolie91 2b9224cc3f forgor to update player names comment 2026-08-08 18:09:45 +02:00
alufolie91 361b9007a4 forgor to update player names comment 2026-08-08 18:09:35 +02:00
alufolie91 0a750cd3bc cleanup gl shadow checks
just move em into the function to be less ugly
2026-08-08 17:38:20 +02:00
alufolie91 835b6832d8 cleanup gl shadow checks
just move em into the function to be less ugly
2026-08-08 17:38:11 +02:00
alufolie91 0463a72329 commit the crappy "sky line" code for gl
forgor if that was even functional or not, but its been on my repo since months
may come back to it some time, maybe not
2026-08-08 17:36:26 +02:00
alufolie91 d02d5067f7 a 2026-08-08 17:34:13 +02:00
alufolie91 0e8a32612f move player_name init to D_RegisterServerCommands
runs before registering client commands and is for everything server + client needs
2026-08-08 17:31:27 +02:00
Monster Iestyn 3c6882203b Initialise player_names[] in D_RegisterClientCommands such that we don't need to have to manually update it if MAXPLAYERS ever changed 2026-08-08 17:31:23 +02:00
alufolie91 79273881ff move player_name init to D_RegisterServerCommands
runs before registering client commands and is for everything server + client needs
2026-08-08 17:26:33 +02:00
Monster Iestyn 029f5ffd28 Initialise player_names[] in D_RegisterClientCommands such that we don't need to have to manually update it if MAXPLAYERS ever changed 2026-08-08 17:25:10 +02:00
alufolie91 0464a8b0c7 attempt to mitigate "palette" cvar allowing random lumps to be used as palette
if theres a proper way to check for actual palettes pls tell me thx
2026-08-07 20:14:48 +02:00
alufolie91 6deb89cac4 attempt to mitigate "palette" cvar allowing random lumps to be used as palette
if theres a proper way to check for actual palettes pls tell me thx
2026-08-07 20:14:31 +02:00
alufolie91 599eda96aa fix M_ScrollString not null terminating its output
this caused music test to have non terminated strings
2026-08-07 19:36:51 +02:00
alufolie91 0abf47f9c4 fix M_ScrollString not null terminating its output
tried to set null byte one after output size
this caused music test to have non terminated strings
2026-08-07 19:32:41 +02:00
alufolie91 421d735052 fix compiler complains when compiling with valgrind support 2026-08-06 22:16:50 +02:00
alufolie91 73bc64f9da fix clamp assert in HWR_SplitWall
idk man it really hates if lo > hi apparently lol
2026-08-06 22:16:48 +02:00
alufolie91 058bf8bc24 fix clamp assert in HWR_SplitWall
idk man it really hates if lo > hi apparently lol
2026-08-06 22:16:15 +02:00
alufolie91 4d8e33cebf fix compiler complains when compiling with valgrind support 2026-08-06 22:15:29 +02:00
alufolie91 5d807d65e5 smol style fix
less confusing
2026-08-06 17:43:15 +02:00
alufolie91 66d6b976b3 smol style fix
less confusing
2026-08-06 17:43:07 +02:00
alufolie91 88d86a6e60 fix NOMUMBLE compile
idk how and why this breaks, but I_OutputMsg is in  doomdef anyways for god knows why
2026-08-06 17:05:09 +02:00
alufolie91 d2eba3d0b1 fix NOMUMBLE compile
idk how and why this breaks, but I_OutputMsg is in  doomdef anyways for god knows why
2026-08-06 17:05:00 +02:00
alufolie91 b2cdbaae60 fix protocol register thingie 2026-08-06 16:58:07 +02:00
alufolie91 9160431556 fix compile for android bionic c lib 2026-08-06 16:58:01 +02:00
alufolie91 37d4d67403 fix protocol register thingie 2026-08-06 16:57:42 +02:00
alufolie91 a74a8c48b2 fix compile for android bionic c lib 2026-08-06 16:57:32 +02:00
alufolie91 2f9a400cf3 cmake flag for mumble
stimky
2026-08-06 16:51:51 +02:00
alufolie91 8afce81576 cmake flag for mumble
stimky
2026-08-06 16:48:23 +02:00
alufolie91 c39073dd9e fix arm compile
idk why i added this, if this is ever needed for whatever pls yell at me
2026-08-06 15:09:48 +02:00
alufolie91 c6726b43f6 fix arm compile
idk why i added this, if this is ever needed for whatever pls yell at me
2026-08-06 15:09:17 +02:00
alufolie91 ec1888e3f5 clean up Command_connect 2026-08-05 22:55:35 +02:00
alufolie91 f03692b840 delet duped MobjThinker check 2026-08-05 22:50:11 +02:00
MIDIMan 617e8fdd55 Manually set NetVars's hook_type
Also adds a 2.3 TODO comment for MF_AMBIENT
2026-08-05 22:49:53 +02:00
MIDIMan 1dd7d917a2 Manually set NetVars's hook_type
Also adds a 2.3 TODO comment for MF_AMBIENT
2026-08-05 22:49:27 +02:00
alufolie91 f0bb9ca2d6 delet duped MobjThinker check 2026-08-05 22:46:49 +02:00
alufolie91 d5252bd3b3 fix an oopsie in p_mobj.c
prob did that while sleep deprived, P_WeaponOrPanel includes a few more things than intended to be there
doubt we even use any of those, but i dont want to cause any potential issues agaion
2026-07-28 20:49:23 +02:00
alufolie91 b575225530 expand sector flags
include gravflip, heatwave, noclipcam and invertencore
is a bit cleaner
may also add the special flags at some point to clean things up a bit more
2026-07-25 09:28:27 +02:00
alufolie91 94f46c3ce6 also prevent "local" pushable mobjs from executing linedef actions
missed when i did the other, pushables have a seperate executor special
2026-07-25 09:24:59 +02:00
alufolie91 1d4da6f9a2 also prevent "local" pushable mobjs from executing linedef actions
missed when i did the other, pushables have a seperate executor special
2026-07-25 09:24:25 +02:00
alufolie91 e3363b88a0 delet this 2026-07-25 09:21:01 +02:00
alufolie91 c3e709231d Merge branch 'luaprofile' into Saturn-Next 2026-07-24 16:18:59 +02:00
alufolie91 7878e01e3f update copyrights for "core" folder 2026-07-24 16:15:56 +02:00
alufolie91 2983f97f73 update copyrights for "core" folder 2026-07-24 16:15:48 +02:00
alufolie91 4631844c9f revert removing the slopelanding dupe
dont think this would cause any issues at all, but i dont feel like maybe causing some dumbass edge cases anywhere really
can test this further after v10 release since its already taking ages
2026-07-24 16:07:28 +02:00
alufolie91 3f340cbe26 revert removing the slopelanding dupe
dont think this would cause any issues at all, but i dont feel like maybe causing some dumbass edge cases anywhere really
can test this further after v10 release since its already taking ages
2026-07-24 16:07:14 +02:00
alufolie91 0c440d240c can pass char to this now
no need to reconvert this stuff from const char to std::string and back to const char really lol
2026-07-24 15:54:50 +02:00
alufolie91 df0b875210 can pass const char to this now
no need to reconvert this stuff from const char to std::string and back to const char really lol
2026-07-24 15:54:37 +02:00
alufolie91 5c7be85977 fix cmake
.ch..........
2026-07-24 15:50:35 +02:00
alufolie91 0a02505595 fix cmake
.ch..........
2026-07-24 15:50:26 +02:00
alufolie91 c401926c0b fix lua hook profiler drawing out of screen bounds in some cases
this omits alot of hooks in the profiler, tho not sure if anyone should even care about those back in the list
maybe just have it have multiple pages like perfstats, or better just integrate it into perfstats......
2026-07-24 15:48:57 +02:00
alufolie91 0f769c114b ack readd closing bracket
idk where that went lol
2026-07-24 15:48:27 +02:00
alufolie91 e0e8be8d46 perfstats thinkframe maxpage fix from blan
+ also yoink the ps types to get rid of magic numbers
just prevents the cvar being set to a page that does not exist
2026-07-24 15:47:44 +02:00
alufolie91 2fbffae518 perfstats thinkframe maxpage fix from blan
+ also yoink the ps types to get rid of magic numbers
just prevents the cvar being set to a page that does not exist
2026-07-24 15:47:35 +02:00
alufolie91 f7d0987d1d fix lua hook profiler drawing out of screen bounds in some cases
this omits alot of hooks in the profiler, tho not sure if anyone should even care about those back in the list
maybe just have it have multiple pages like perfstats, or better just integrate it into perfstats......
2026-07-24 15:43:50 +02:00
alufolie91 957d3f7229 delet fmt for lua hook profiler
i dont want another stinky library
this would just be an arsepain to include in windoze builds

TODO: make this drawer less of a mess, maybe integrate into perfstats instead?
2026-07-24 15:31:16 +02:00
alufolie91 fa011eea6f delet fmt for lua hook profiler
i dont want another stinky library
this would just be an arsepain to include in windoze builds

TODO: make this drawer less of a mess, maybe integrate into perfstats instead?
2026-07-24 15:30:56 +02:00
alufolie91 7e47b9b6ba fix crash in K_drawKartMinimapHead if player mobj was removed 2026-07-24 07:36:47 +02:00
romoney5 6e91e00289 Ignore scenery thinker for player objects
Prevents Lua from being able to remove player objects using MF_SCENERY
and causing potential crashes
2026-07-24 07:36:43 +02:00
alufolie91 27aede7d1f fix crash in K_drawKartMinimapHead if player mobj was removed 2026-07-24 07:36:04 +02:00
romoney5 ffa7b27a9e Ignore scenery thinker for player objects
Prevents Lua from being able to remove player objects using MF_SCENERY
and causing potential crashes
2026-07-24 07:34:44 +02:00
alufolie91 a539f38e72 add more safety checks to some maploading stuff
+ rename things to make more sense
2026-07-21 20:33:46 +02:00
alufolie91 7099e4d739 add more safety checks to some maploading stuff
+ rename things to make more sense
2026-07-21 20:32:58 +02:00
alufolie91 4f21d8f983 dont apply lua rumble during replay playback
same as non lua rumble
2026-07-21 16:05:11 +02:00
alufolie91 213600c8b8 dont apply lua rumble during replay playback
same as non lua rumble
2026-07-21 16:05:03 +02:00
alufolie91 f423d3244e Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2026-07-21 15:59:48 +02:00
alufolie91 31517ebebe smol fbo stuff cleanup
was from the water branch
2026-07-21 15:54:18 +02:00
alufolie91 3a2e009d01 have the musiccredit "box" style be colourized 2026-07-21 15:52:02 +02:00
alufolie91 38e50a3cfb bit more p_mobj cleanup
more unnesting stuffs
2026-07-21 15:31:33 +02:00
alufolie91 7511540a9b bit more p_mobj cleanup
more unnesting stuffs
2026-07-21 15:31:11 +02:00
alufolie91 97555bc263 remove trailing whitespaces from musicdef fields
mostly just to prevent the warning popping from those, but also why not lol
2026-07-21 15:03:38 +02:00
alufolie91 848115d105 print the unedited musicdef field for whitespace warning
otherwise this may just show whitespaces where they arent ones originally
2026-07-21 15:03:27 +02:00
alufolie91 6187ab4a24 remove trailing whitespaces from musicdef fields
mostly just to prevent the warning popping from those, but also why not lol
2026-07-21 15:03:07 +02:00
alufolie91 049c483d10 print the unedited musicdef field for whitespace warning
otherwise this may just show whitespaces where they arent ones originally
2026-07-21 14:53:13 +02:00
alufolie91 3668c2c4f3 more code cleanups
+ remove duped slopelanding stuff
mostly just unnesting stuffs, some mobj checks, etc
2026-07-21 14:44:56 +02:00
alufolie91 4603749fae more code cleanups
+ remove duped slopelanding stuff
mostly just unnesting stuffs
2026-07-21 14:40:09 +02:00
alufolie91 d5f68bf2aa fix compiler warning for sound stuff.....
:chaosleep:
2026-07-20 16:33:51 +02:00
alufolie91 87a70707be fix compiler warning for sound stuff.....
:chaosleep:
2026-07-20 16:33:42 +02:00
alufolie91 3ae968f060 smol random cleanups 2026-07-20 16:08:55 +02:00
alufolie91 9523a911cf smol random cleanups 2026-07-20 16:08:48 +02:00
alufolie91 d73f79509e actually reduce pointinsubsector in P_SpawnMapThings in some cases lol
bunch of vanilla maps have rings and stuff present lul
2026-07-20 16:05:04 +02:00
alufolie91 5ed6302f2a actually reduce pointinsubsector in P_SpawnMapThings in some cases lol
bunch of vanilla maps have rings and stuff present lul
2026-07-20 16:04:55 +02:00
MIDIMan 19e9eedce3 Fix NiGHTS hoops crashing the game for mid-level netgame joiners 2026-07-20 15:50:16 +02:00
alufolie91 8880057ff2 fix and cleanup P_SpawnMapThings
-split emeraldhunt handling into its own function
-merge hoop spawn loop into the main mapthing spawnloop
-continue early for things like rings and coins
- reduce the amount of R_PointInSubsector on maps with nights hoops
hopefully reduces levelload time slightly
2026-07-20 15:50:13 +02:00
MIDIMan 94ba01b208 Fix NiGHTS hoops crashing the game for mid-level netgame joiners 2026-07-20 15:44:50 +02:00
alufolie91 6643dc7ad0 fix and cleanup P_SpawnMapThings
-split emeraldhunt handling into its own function
-merge hoop spawn loop into the main mapthing spawnloop
-continue early for things like rings and coins
- reduce the amount of R_PointInSubsector on maps with nights hoops
hopefully reduces levelload time slightly
2026-07-20 15:35:36 +02:00
alufolie91 abf9885564 Revert "port over "sfxfree" from srb2"
This reverts commit b18994dcc2.
2026-07-20 11:30:16 +02:00
alufolie91 9692484d2e fix issues with sound freeslotting
this "works" with a skinlimit of 255
but would cause hard to debug crashes with raised skinlimits and was generally really unsafe and could cause soundnames to not be null terminated aswell as buffer overflows from blind strcpy
the sprintf fix is from Indev originally for neptune
NOTE: if the skinlimit is ever raised above 1024 then freeslotnames NEEDS to be atleast one byte bigger to not truncuate stuff
NOTE2: pretty sure localskins are fucked if any are loaded in servers with 255 skins loaded, but i dont care atm
2026-07-20 11:29:19 +02:00
alufolie91 61720d6c14 fix issues with sound freeslotting
this "works" with a skinlimit of 255
but would cause hard to debug crashes with raised skinlimits and was generally really unsafe and could cause soundnames to not be null terminated aswell as buffer overflows from blind strcpy
the sprintf fix is from Indev originally for neptune
NOTE: if the skinlimit is ever raised above 1024 then freeslotnames NEEDS to be atleast one byte bigger to not truncuate stuff
NOTE2: pretty sure localskins are fucked if any are loaded in servers with 255 skins loaded, but i dont care atm
2026-07-20 10:39:14 +02:00
alufolie91 b18994dcc2 port over "sfxfree" from srb2
didnt feel like cherry picking this since we have most of this already - https://git.do.srb2.org/STJr/SRB2/-/commit/5f8671b1002eea61c1e7e00a9b91f30d732ce261
this means sound test wont have a gaziliion thok sounds anymore, aswell as S_AddSoundFx doesent have to iterate through a huuuuuge list of sounds each time a sound is getting added (if not a skinsound) which might speed up addon load a bit
2026-07-20 09:40:14 +02:00
alufolie91 df3a64339c fix skin search command overflow
when using localskins and going over the skinlimit
this should use numskins not numallskins there
no i dont feel like supporting localskins here the other skin commands also dont care
2026-07-20 01:01:09 +02:00
alufolie91 84a9129185 fix skin search command overflow
when using localskins and going over the skinlimit
this should use numskins not numallskins there
no i dont feel like supporting localskins here the other skin commands also dont care
2026-07-20 01:00:57 +02:00
indev 5a966aa317 Re-add playernode check 2026-07-20 01:54:47 +03:00
alufolie91 420028541f Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2026-07-20 00:48:02 +02:00
indev a132db9e6e Attempt to fix server locking up when trying to kick player that has left already 2026-07-19 23:41:19 +03:00
alufolie91 5148b874ea fix shit :chaosleep:
i hate this game man
2026-07-19 06:17:02 +02:00
alufolie91 0acfc96812 attempt to fix kick/ban commands causing dedicated servers to self destruct
if a player was specified which was not being in game
this is what caused dedis to sometimes go to the main menu
2026-07-19 06:16:50 +02:00
alufolie91 b82959d897 guard Got_KickCmd against malformed pnum
not sure if that can happen by itself (nametonum stupidly clamps this to maxplayer range), but a malicious client definitely could cause a buffer overflow there
2026-07-19 05:31:38 +02:00
alufolie91 3bee6bfaff attempt to fix kick/ban commands causing dedicated servers to self destruct
if a player was specified which was not being in game
this is what caused dedis to sometimes go to the main menu
2026-07-19 04:32:49 +02:00
alufolie91 f09c61cee9 only play stairjank sound if we have its visuals enabled 2026-07-19 02:42:18 +02:00
alufolie91 9dc179aba4 only play stairjank sound if we have its visuals enabled 2026-07-19 02:42:10 +02:00
alufolie91 a536a9b63c a 2026-07-19 02:40:56 +02:00
alufolie91 735c4b67dc move stairjank particles into K_MoveKartPlayer
to where we also rotate the player
also means we now use K_AltFlip :p
also means the visual toggle now actually does prevent spawning them
2026-07-19 02:40:17 +02:00
alufolie91 267a758447 fix up dedi i_system 2026-07-19 02:36:16 +02:00
alufolie91 1684367982 fix up dedi i_system 2026-07-19 02:36:08 +02:00
alufolie91 caa6d92219 move stairjank particles into K_MoveKartPlayer
to where we also rotate the player
also means we now use K_AltFlip :p
2026-07-19 02:35:47 +02:00
alufolie91 75a1debb6e Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2026-07-19 02:33:35 +02:00
indev 6892c212d1 Comment out stairjank particles for now, since spawning mobjs during P_TryMove may mess up some global variables 2026-07-19 03:31:09 +03:00
alufolie91 a1127068df fix wireframe potentially not disabling on toggle
netupdate sucks ass
2026-07-17 22:43:23 +02:00
alufolie91 96ed5c7785 dont draw refraction planes in wireframe mode
idk but this prob just fucks shit up
2026-07-17 22:43:15 +02:00
alufolie91 d6f3379e3f fix wireframe potentially not disabling on toggle
netupdate sucks ass
2026-07-17 22:42:24 +02:00
alufolie91 a5676a0a19 tweak ripple and refraction shaders
this much much more closely resembles the software effect
i manually tweaked this until it looked very similar
its still not quite perfect probably, but in many cases its a close match
2026-07-17 08:39:18 +02:00
alufolie91 6c19632a80 smol change to GL_DrawWaterPolygon
this doesent need anything, its basically just a blank polygon, so can save some work and also pass less stuff to this
2026-07-16 20:20:09 +02:00
alufolie91 7ee93d889e remove this from polyvertex_t
was used for optimization but not used anymore
2026-07-16 20:16:42 +02:00
alufolie91 8367d26f64 remove this from polyvertex_t
was used for optimization but not used anymore
2026-07-16 20:16:33 +02:00
alufolie91 2976c90c6e remove horizonline handling for refraction planes
forgot those wont work with fofs anyways
still need to look into that sometime
but thisll save some perf
2026-07-16 18:27:34 +02:00
alufolie91 faac3cb6c4 clean up the refraction shader a bit
most stuff wasnt needed, forgot to remove it earlier
2026-07-16 18:18:28 +02:00
alufolie91 7ab0fd15a0 change how water refraction is handled
split it into its own pass
we will draw "refraction planes" before drawing anything translucent
this way we wont cause any draw order issues or anything like that
this is also a bit faster and more sane than the other approach
only caveat: translucent stuff behind water planes is unaffected by refraction
but better than it was before, and sure better than trying to copy the screen per plane or shit like that lol
like this, this should be mostly feasible to actually use, the skybox water stuff kinda was a non issue since i noticed even just normal water does not draw over the map geometry (must have misremembered that part since software does do that), but still might be worth looking into at some point
2026-07-16 17:56:48 +02:00
alufolie91 f59bb59c97 dedupe GL_DrawWaterPolygon 2026-07-14 13:46:07 +02:00
alufolie91 ee9c9e2839 hack: fix paletterender stuff not applying to screenshots/gifs when using downsampling fbo
this sucks
but the final screen texture with the palette render postprocess step will not be in the downsample fbo
so we have to redraw it there with the postprocess step......
this is still better than drawing another screen texture when using paletterender which costs perf
2026-07-14 11:28:49 +02:00
alufolie91 6640146521 hack: fix paletterender stuff not applying to screenshots/gifs when using downsampling fbo
this sucks
but the final screen texture with the palette render postprocess step will not be in the downsample fbo
so we have to redraw it there with the postprocess step......
this is still better than drawing another screen texture when using paletterender which costs perf
2026-07-14 11:28:40 +02:00
alufolie91 7254fb170d remove pointless skybox check here
if skybox then newview->sky will be false there which R_DrawSkyPlanes will check for
2026-07-14 09:46:29 +02:00
alufolie91 bf292917a2 remove viewsky which doesent exist lol 2026-07-14 09:46:26 +02:00
alufolie91 b85a4b3034 WIP: OpenGL water refraction
tries to replicate the effect from software renderer
this is quite a mess, but finally feel like pushing this since i finally figured out the depth testing stuff
this still has some issues:
-map geometry in front of skybox water will just draw over it completely (not super sure how to fix this other than deferring water rendering after rendering both skybox and normal scene)
-translucent geometry is not included in refraction (and may draw in front of it?), software also suffers from this in certain cases, i just hope its not that visible

this really needs a cleanup at some point
and due to how this is setup for floor and ceiling planes this also costs quite a lot of gpu time (atleast on the cpu side this costs barely anything)
2026-07-14 09:46:19 +02:00
alufolie91 28c4061a26 remove viewsky which doesent exist lol 2026-07-14 09:40:37 +02:00
alufolie91 d0f02f1530 remove pointless skybox check here
if skybox then newview->sky will be false there which R_DrawSkyPlanes will check for
2026-07-14 09:40:35 +02:00
alufolie91 3d0b3e9471 conflict fix 2026-07-14 08:56:11 +02:00
alufolie91 137828d224 Revert "refactor fbo stuff to accept multiple fbos"
This reverts commit c8a197b936.
2026-07-14 08:55:21 +02:00
alufolie91 d01a60494e Revert "fix fbo support checks"
This reverts commit 288f13105b.
2026-07-14 08:54:32 +02:00
alufolie91 1bc51e8b26 Revert "GL_FBO_BindMainFramebuffer does not need arguments"
This reverts commit 27495e5c84.
2026-07-14 08:54:20 +02:00
alufolie91 53fbbecbcd fix incrementing garbage in Portal_AddSkyboxPortals 2026-07-14 03:00:42 +02:00
alufolie91 b79f8b6568 fix incrementing garbage in Portal_AddSkyboxPortals 2026-07-14 01:32:51 +02:00
alufolie91 d083f5e550 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2026-07-14 01:00:30 +02:00
indev 587f24ae85 Add empty I_OpenURL into dedicated server build 2026-07-13 23:56:53 +03:00
alufolie91 ba0b414062 fix paletterender toggle calling setpalette during startup 2026-07-13 20:31:30 +02:00
alufolie91 b885495f16 fix paletterender toggle calling setpalette during startup 2026-07-13 20:31:20 +02:00
alufolie91 a0a5cd05b8 a 2026-07-13 07:49:34 +02:00
alufolie91 b27b4bfd7a software: fix cv_spriteclip
scaled sprites should be excluded from the simple viewwindow checks
also R_CheckSpriteVisible should be done AFTER portal adjustments
2026-07-13 07:47:51 +02:00
alufolie91 7971f76885 software: cleanup sky hacks
still horrid, but atleast this wont give me braindamage each time i have to look at it
this also read stale data from the previous frames and was just insanely messy
this still sucks ass but oh well
2026-07-13 07:47:48 +02:00
alufolie91 7048eeacc3 Portal_AddSkybox can be static
its unused anyways
also adds plane bounds check which was missing
2026-07-13 07:44:47 +02:00
alufolie91 8a62f4e978 software: move hom removal to R_RenderPlayerView
gl also has it there so why not
2026-07-13 07:44:38 +02:00
Eidolon f5fdf917bd Support >4GB sys mem in memfree for linux, win32, macOS sys mem counts
Also includes memory counts for the extended allocation functionality
2026-07-13 07:44:33 +02:00
alufolie91 47f2e4d5e6 software: fix cv_spriteclip
scaled sprites should be excluded from the simple viewwindow checks
also R_CheckSpriteVisible should be done AFTER portal adjustments
2026-07-13 07:43:33 +02:00
alufolie91 0b0f1f4652 software: cleanup sky hacks
still horrid, but atleast this wont give me braindamage each time i have to look at it
this also read stale data from the previous frames and was just insanely messy
this still sucks ass but oh well
2026-07-13 07:42:38 +02:00
alufolie91 045e46134c this can be static
its unused anyways
also adds plane bounds check which was missing
2026-07-13 07:41:01 +02:00
alufolie91 3da59dc2f4 software: move hom removal to R_RenderPlayerView
gl also has it there so why not
2026-07-13 07:40:13 +02:00
Eidolon e4d8a438a9 Support >4GB sys mem in memfree for linux, win32, macOS sys mem counts
Also includes memory counts for the extended allocation functionality
2026-07-13 07:34:37 +02:00
alufolie91 b9ac91c74f fix eggbox crap
:chaosleep:
2026-07-09 23:49:16 +02:00
alufolie91 da81a0c0c2 fix eggbox crap
:chaosleep:
2026-07-09 23:49:07 +02:00
indev b408a098bd Fix netxcmdnames missing one name 2026-07-09 13:01:13 +03:00
alufolie91 90ab1f4994 cleanup opengl wipe stuff a little
split it like srb2.2
2026-07-09 06:47:26 +02:00
alufolie91 96484c94db fix & cleanup hw_bsp
this basically brings it to the latest state from Doom-Legacy before the big refactor (which i had previously ported and tested as well) + some extra stuff from it
sadly this does not seem to fix plane holes, but its a bit cleaner and more accurate in some places
while the big refactor did fix issues with plane holes, it also introduced a few new issues, like z-fighting sneaker panels and significantly longer loading times
may as well just wait at this point for what (or rather if) RR will be doing
2026-07-09 06:47:26 +02:00
alufolie91 c805fa9f33 remove a bunch of unused crap 2026-07-09 06:46:27 +02:00
alufolie91 2ea14f6b79 cleanup opengl wipe stuff a little
split it like srb2.2
2026-07-09 06:45:03 +02:00
alufolie91 a0c8c7b04f fix & cleanup hw_bsp
this basically brings it to the latest state from Doom-Legacy before the big refactor (which i had previously ported and tested as well)
sadly this does not seem to fix plane holes, but its a bit cleaner and more accurate in some places
while the big refactor did fix issues with plane holes, it also introduced a few new issues, like z-fighting sneaker panels and significantly longer loading times
may as well just wait at this point for what (or rather if) RR will be doing
2026-07-09 06:43:57 +02:00
alufolie91 3fce2b5ecb remove a bunch of unused crap 2026-07-09 06:34:38 +02:00
alufolie91 5c3bb0d323 wipe hw_bsp crap
causes some zfight issues and longer load times
i will look into another solution sometime to try and plug the plane holes
maybe can reuse some parts of this in the original implementation
2026-07-08 22:56:25 +02:00
alufolie91 29159ca5cd whoopsie
sleeby....
2026-07-08 20:37:16 +02:00
alufolie91 f7164ee831 whoopsie
sleeby....
2026-07-08 20:37:09 +02:00
alufolie91 b6b70ae8f0 Add "Report an Issue" button in the Saturn Menu
yoinked from SRB2-Legacy
2026-07-08 20:33:24 +02:00
alufolie91 2b0e4b7468 have fallback if SDL_OpenURL fails or does not exist on the Error box 2026-07-08 20:33:20 +02:00
alufolie91 f2f81d3898 Add "Report an Issue" button in the Saturn Menu
yoinked from SRB2-Legacy
2026-07-08 20:33:07 +02:00
alufolie91 a4c77d09c7 have fallback if SDL_OpenURL fails or does not exist on the Errorbox 2026-07-08 20:31:56 +02:00
alufolie91 c374bd75fc menu for controller rumble stuff 2026-07-07 13:10:05 +02:00
alufolie91 addec5e3bc menu for controller rumble stuff 2026-07-07 13:09:57 +02:00
alufolie91 d143268541 only apply LUA controller rumble and led color to local players
what my dumb ass was meaning to do with 2ae1e0f56e
displayplayer[0] does not necessarily map to a local player!
2026-07-06 04:59:46 +02:00
alufolie91 ec70e8aa29 only apply LUA controller rumble and led color to local players
what my dumb ass was meaning to do with 2ae1e0f56e
displayplayer[0] does not necessarily map to a local player!
2026-07-06 04:59:33 +02:00
alufolie91 3ad6159e85 make controller rumble types toggable separately
needs a proper menu, but too lazy for that currently
2026-07-05 22:51:29 +02:00
alufolie91 62262246b7 make rumble types toggable separately
needs a proper menu, but too lazy for that currently
2026-07-05 22:51:04 +02:00
alufolie91 2ae1e0f56e only rumble controllers for local players
also not in replays
2026-07-05 22:25:39 +02:00
alufolie91 e60eb3f23f only rumble controllers for local players
also not in replays
2026-07-05 22:25:33 +02:00
alufolie91 2302d4efbd mark R_ThingIsFullBrightT as static 2026-07-05 21:36:51 +02:00
alufolie91 be08c9cd1f changes to some saturn specific visual effects
most of those were added cause they´re cool to look at, but without much thought about potentially giving players that enable such features an "unfair" advantage over others.
- eggboxes wont be rotated while stationary and on the ground anymore (they are meant to deceive players, being rotated makes them stand out alot!)
- players that are about to explode due to eggboxes wont spawn extra red speedlines anymore
- option to show driftlevel per speedlines has been removed
2026-07-05 21:36:48 +02:00
alufolie91 35af5b24cc mark R_ThingIsFullBrightT as static 2026-07-05 21:36:11 +02:00
alufolie91 92d07dd680 changes to some saturn specific visual effects
most of those were added cause they´re cool to look at, but without much thought about potentially giving players that enable such features an "unfair" advantage over others.
- eggboxes wont be rotated while stationary and on the ground anymore (they are meant to deceive players, being rotated makes them stand out alot!)
- players that are about to explode due to eggboxes wont spawn extra red speedlines anymore
- option to show driftlevel per speedlines has been removed
2026-07-05 21:35:52 +02:00
alufolie91 7b91666db9 clean up some frameflags stuff
mfw no FF_VERTICALFLIP
2026-07-04 20:17:03 +02:00
alufolie91 aa4ec45829 clean up some frameflags stuff
mfw no FF_VERTICALFLIP
2026-07-04 20:16:54 +02:00
alufolie91 ba5c85ba8a :chaosleep: 2026-07-04 06:21:06 +02:00
alufolie91 a98b408ba2 :chaosleep: 2026-07-04 06:20:59 +02:00
alufolie91 66d46273c4 Revert "add warning if theres no music lump for musicdef"
This reverts commit 3e27a6f47b.
2026-07-03 19:16:42 +02:00
alufolie91 05e8771fbc Revert "add warning if theres no music lump for musicdef"
This reverts commit 59b7b0529f.
very fun if the music lumps were split into some other file!
2026-07-03 19:08:54 +02:00
alufolie91 59b7b0529f add warning if theres no music lump for musicdef
if theyre left over or typo´d (which prevents them from showing up)
2026-07-03 19:01:10 +02:00
alufolie91 3e27a6f47b add warning if theres no music lump for musicdef
if theyre left over or typo´d (which prevents them from showing up)
2026-07-03 19:01:02 +02:00
alufolie91 3fa8ab442a print warning if whitespaces are encountered in musicdef fields
technically that is a non issue for saturn but vanilla will completely explode from this
2026-07-03 18:27:49 +02:00
alufolie91 dabedcfba2 print warning if whitespaces are encountered in musicdef fields
technically that is a non issue for saturn but vanilla will completely explode from this
2026-07-03 18:27:39 +02:00
indev c487d5fa89 Fix 'attack or protect' text being offcentered on certain resolutions 2026-07-03 14:12:30 +02:00
indev fdd8381258 Fix 'attack or protect' text being offcentered on certain resolutions 2026-07-03 15:10:08 +03:00
alufolie91 41cbce3ed3 hack for kartdebugcheckpoint display
see comment
2026-07-02 19:43:06 +02:00
alufolie91 bbc53964ae hack for kartdebugcheckpoint display
see comment
2026-07-02 19:42:58 +02:00
alufolie91 63e4c5a63d use viewsin and viewcos for spherefrustum checks in gl
dont need all those yaw vars, since they effectively map to gl_viewsin and -gl_viewcos respectively
while those are less accurate due to being fixed point, there appears to be no visual issues from this and seems to even slightly improve performance in some cases
2026-07-02 18:34:32 +02:00
alufolie91 bba86fe4af fix DRAWONLYFORX sprite visability handling
this effectively didnt do anything and had a typo for the player 3 case anyways
2026-07-02 18:34:29 +02:00
alufolie91 1dee3060dd add some more mobj checks to p_map
cross-checked against srb2 next branch
2026-07-02 18:34:22 +02:00
alufolie91 56c2178bde cleanup COMPAT_VANILLA mobj checks
move stuff into a helper func, which just returns if mo != NULL in vanilla compat mode, otherwise returns P_MobjWasRemoved
reasoning for this crap is in the comment above said helper
2026-07-02 18:34:19 +02:00
alufolie91 e445669521 cleanup stuff a bit for unused gametypes
wish could just remove all of this but gotta keep it for compat reasons ig
2026-07-02 18:34:06 +02:00
alufolie91 c7b8b4c5e1 add some more mobj checks to p_map
cross-checked against srb2 next branch
2026-07-02 18:31:02 +02:00
alufolie91 a60bd806ca cleanup COMPAT_VANILLA mobj checks
move stuff into a helper func, which just returns if mo != NULL in vanilla compat mode, otherwise returns P_MobjWasRemoved
reasoning for this crap is in the comment above said helper
2026-07-02 18:21:17 +02:00
alufolie91 f0f956d649 cleanup stuff a bit for unused gametypes
wish could just remove all of this but gotta keep it for compat reasons ig
2026-07-02 18:17:42 +02:00
alufolie91 0dce0b55f2 fix DRAWONLYFORX sprite visability handling
this effectively didnt do anything and had a typo for the player 3 case anyways
2026-07-02 18:10:07 +02:00
alufolie91 385b95f87c use viewsin and viewcos for spherefrustum checks in gl
dont need all those yaw vars, since they effectively map to gl_viewsin and -gl_viewcos respectively
while those are less accurate due to being fixed point, there appears to be no visual issues from this and seems to even slightly improve performance in some cases
2026-07-02 18:09:20 +02:00
alufolie91 7a309bc0b8 make this less messy 2026-07-01 22:45:37 +02:00
alufolie91 b8a490b319 make this less messy 2026-07-01 22:45:17 +02:00
indev bf0db67131 Disable writing to replay query while replays are loading 2026-07-01 22:29:59 +02:00
alufolie91 8b6ebfbad4 promote those null checks again.....
sigh......
atleast this should be right this time
2026-07-01 22:26:50 +02:00
indev 5775c12b16 Disable writing to replay query while replays are loading 2026-07-01 23:23:04 +03:00
alufolie91 e1b2904b44 promote those null checks again.....
sigh......
atleast this should be right this time
2026-07-01 22:06:07 +02:00
alufolie91 cf4ff2b71b plompack intro sfx 2026-07-01 21:05:54 +02:00
alufolie91 7b459f330f add cookie country intro sfx here
for classic the sound is rather short and the music is less "intense" so can let music play during it
2026-07-01 20:36:24 +02:00
alufolie91 78ebc14d88 print performance warning for lua scripts using mobj hooks without specific mobjtype
thx indev for help <3
these may trash performance quite hard at times
and are not visible from just perfstats most of the time
2026-07-01 19:21:41 +02:00
alufolie91 c6fc75c379 print performance warning for lua scripts using mobj hooks without specific mobjtype
thx indev for help <3
these may trash performance quite hard at times
and are not visible from just perfstats most of the time
2026-07-01 19:21:32 +02:00
alufolie91 38a248193e make lua hook profiler kinda work
very scuffed up since we dont have the srb2::Draw lib
so it may display stuff out of screen bounds
i also rather not use fmt here but va since i dont want another dependency
needs to be fixed up sometime
2026-07-01 18:15:38 +02:00
James R 934f2d347c Add basic profiling for Lua hooks (except HUD hooks)
- Add lua_profile cheat: calculate average time spent in
  hooks over a period
- Show hook times in a sorted table, along with lump name,
  script line number and hook type
- Show cumulative time spent in game logic hooks and
  percentage of overhead to game logic
2026-07-01 18:13:51 +02:00
alufolie91 551d7d4d89 add V_DrawRightAlignedSmallStringAtFixed
idk but might be useful
2026-07-01 18:08:56 +02:00
alufolie91 a2184d2bef move cv_audbuffersize register
this stuff kinda grouped some cvars together, makes more sense there
2026-07-01 18:08:53 +02:00
alufolie91 d638baeda6 change mobj hook detection again
so we can restore the actual correct behavior for the HurtMsg hook, which nothing even uses lol
2026-07-01 18:08:50 +02:00
alufolie91 c585ec2c01 move cv_audbuffersize register
this stuff kinda grouped some cvars together, makes more sense there
2026-07-01 18:08:06 +02:00
alufolie91 43eeb1e15f add V_DrawRightAlignedSmallStringAtFixed
idk but might be useful
2026-07-01 18:07:31 +02:00
alufolie91 87e9c8aa56 port RR´s lua hook profiling stuff
very scuffed up since we dont have the srb2::Draw lib
so it may display stuff out of screen bounds
needs to be fixed up sometime
2026-07-01 18:07:05 +02:00
alufolie91 de624bd217 change mobj hook detection again
so we can restore the actual correct behavior for the HurtMsg hook, which nothing even uses lol
2026-07-01 17:57:20 +02:00
alufolie91 4a06e8a6d1 fix map replacement checks for pwads added on startup
stuff added per -file or whatever
this incorrectly rechecked the iwads again instead of the pwads themselves, which let to the game flagging vanilla maps as replaced, setting the game to be modified
2026-06-30 18:37:04 +02:00
alufolie91 bbc0fa1356 fix map replacement checks for pwads added on startup
stuff added per -file or whatever
this incorrectly rechecked the iwads again instead of the pwads themselves, which let to the game flagging vanilla maps as replaced, setting the game to be modified
2026-06-30 18:36:56 +02:00
alufolie91 e2a3992787 make online hud / chat menu scrollable
yes i checked green res....
it barely fits like this........
2026-06-29 22:02:18 +02:00
alufolie91 3e3f69d7e4 make online hud / chat menu scrollable
yes i checked green res....
it barely fits like this........
2026-06-29 22:01:54 +02:00
alufolie91 98f7d7431a Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2026-06-29 19:47:52 +02:00
indev ec06150432 This todo is done :3 2026-06-29 20:45:45 +03:00
indev 2413a3503c Add stairjank particle effect using drift dust 2026-06-29 20:44:30 +03:00
alufolie91 d9e339cb56 toggable sound effect for stair jank
not the biggest fan of it but idk how to make this better on stairs with lots of steps
so this will do for now
2026-06-29 18:13:30 +02:00
alufolie91 a74ffb0b5b toggable sound effect for stair jank
not the biggest fan of it but idk how to make this better on stairs with lots of steps
so this will do for now
2026-06-29 18:13:17 +02:00
alufolie91 408db7a2eb use G_KeynumToString for local addon menu key info
just in case we change them dont have to change them everywhere
2026-06-29 15:46:11 +02:00
alufolie91 7d264acd51 use G_KeynumToString for local addon menu key info
just in case we change them dont have
2026-06-29 15:42:29 +02:00
alufolie91 e12ecabcf0 revert some P_IsObjectOnGround
pretty sure none of those cause issues currently, but rather not risk stuff as that condition might change from smth else in those cases
its not an expensive call anyways really
2026-06-29 15:35:45 +02:00
alufolie91 92ad3b6e0a revert some P_IsObjectOnGround
pretty sure none of those cause issues currently, but rather not risk stuff as that condition might change from smth else in those cases
its not an expensive call anyways really
2026-06-29 15:35:37 +02:00
alufolie91 240f20e9d9 a 2026-06-29 14:43:52 +02:00
alufolie91 65c2d2733d clear deathmatch and ctf spawnpoints aswell
prob wont matter much for us but still better to not leave those dangling after map change
2026-06-29 14:43:04 +02:00
alufolie91 00aa023e9e cleanup p_setup a bit again 2026-06-29 14:42:58 +02:00
alufolie91 d404d20d69 clear deathmatch and ctf spawnpoints aswell
prob wont matter much for us but still better to not leave those dangling after map change
2026-06-29 14:40:43 +02:00
alufolie91 45b4905257 cleanup p_setup a bit again 2026-06-29 14:39:18 +02:00
alufolie91 f43a4a2eb6 have gametype i_error actually print the invalid gametype
bit more informative ig?
2026-06-29 02:14:53 +02:00
alufolie91 75c22fa04e have gametype i_error actually print the invalid gametype
bit more informative ig?
2026-06-29 02:14:45 +02:00
alufolie91 4eb108e0a6 add sound thing for reference
does nothing cause it sucks
maybe someone else has a better idea what to do here
2026-06-29 02:13:59 +02:00
alufolie91 cc9ed3f639 add sound thing for reference
does nothing cause it sucks
maybe someone else has a better idea what to do here
2026-06-29 02:13:47 +02:00
alufolie91 ea76af5a81 seenames is stupid
keep that ashnal utils breaks without this crap
2026-06-29 01:46:39 +02:00
alufolie91 740cd17436 seenames is stupid
keep that ashnal utils breaks without this crap
2026-06-29 01:46:30 +02:00
alufolie91 5d81fa7d7f WIP: rework music intro skipping
needs to be seperate lump
ive just hardcoded sounds we´ve found for now
this whole thing sucks, but idk how else to detect things
ideally would just move intro sounds to the sound system entirely instead of relying on the stupid play sfx line special, but oh well cant do anything about it now
2026-06-28 23:45:00 +02:00
alufolie91 4b8f998c85 cast this crap 2026-06-28 22:58:20 +02:00
alufolie91 94ca9efcc5 cast this crap 2026-06-28 22:58:11 +02:00
alufolie91 d687be4997 change K_GetSpeedometerStyle to unsinged
does not need be signed
most other things will cache this into an uint8 eitherway
2026-06-28 22:34:09 +02:00
alufolie91 95e6bb9ac4 change K_GetSpeedometerStyle to unsinged
does not need be signed
most other things will cache this into an uint8 eitherway
2026-06-28 22:34:02 +02:00
alufolie91 1bcadf3c46 fix the lap emblem animation thingie 2026-06-28 22:23:32 +02:00
alufolie91 5dc7965155 fix the lap emblem animation thingie 2026-06-28 22:23:25 +02:00
alufolie91 80e4d02c51 dont skip intro sounds if music is disabled 2026-06-28 21:13:28 +02:00
alufolie91 352d1faacf forgor cv_chat_showlimit :chaosleep: 2026-06-28 18:59:28 +02:00
alufolie91 855b39b396 forgor cv_chat_showlimit :chaosleep: 2026-06-28 18:59:21 +02:00
alufolie91 7f9d70285d add new chat stuff to menus + show chat box when hovering over some things
very ugly but i dont care, the hud stuff is done similar
just hoping this doesent explode or whatever
2026-06-28 18:53:28 +02:00
alufolie91 655e2a38db add new chat stuff to menus + show chat box when hovering over some things
very ugly but i dont care, the hud stuff is done similar
just hoping this doesent explode or whatever
2026-06-28 18:53:14 +02:00
alufolie91 496477fa9a chatbgtint does actually not apply to the chatbox
but only to the also confusingly named "mini chat"
2026-06-28 18:37:11 +02:00
alufolie91 be890d0aa2 chatbgtint does actually not apply to the chatbox
but only to the also confusingly named "mini chat"
2026-06-28 18:37:02 +02:00
alufolie91 530bb50709 ig "style" is the better word here
lulul
2026-06-28 17:53:57 +02:00
alufolie91 1257ca13bc ig "style" is the better word here
lulul
2026-06-28 17:53:47 +02:00
alufolie91 8bb04a68a8 ass well 2026-06-28 17:52:53 +02:00
alufolie91 5ec45007ff ass well 2026-06-28 17:52:44 +02:00
alufolie91 820ab4b2bc block "addfilelocal" from adding files that contains maps
now we have a more accessible menu for addfile local
i really dont want to risk stuff
2026-06-28 16:25:31 +02:00
alufolie91 36c2c1711e block "addfilelocal" from adding files that contains maps
now we have a more accessible menu for addfile local
i really dont want to risk stuff
2026-06-28 16:25:08 +02:00
alufolie91 af6abb5458 better check for map data within autoloaded files
before this flagged every file with lumps that contained the MAP as string somewhere, like palettes and such

this is kinda messy but i really do not want to dupe this huge block of code, neither do i want to convert this to ceepeepee again to mess about with templates
oh well
2026-06-28 16:23:24 +02:00
alufolie91 bf5eef569d better check for map data within autoloaded files
before this flagged every file with lumps that contained the MAP as string somewhere, like palettes and such

this is kinda messy but i really do not want to dupe this huge block of code, neither do i want to convert this to ceepeepee again to mess about with templates
oh well
2026-06-28 16:14:42 +02:00
alufolie91 5c373b6251 demote those to asserts
never seen srb2, saturn, RR or blan or anything else have this return null
there is a possibility but whatever
just continuing in such cases was wrong eitherways as it wouldve just corrupted the vres thing
2026-06-28 16:05:14 +02:00
alufolie91 24bac9c133 actually print a different message for localskins with lua
tell ppl that this may cause issues
2026-06-28 16:05:11 +02:00
alufolie91 56ab093f93 demote those to asserts
never seen srb2, saturn, RR or blan or anything else have this return null
there is a possibility but whatever
just continuing in such cases was wrong eitherways as it wouldve just corrupted the vres thing
2026-06-28 16:04:58 +02:00
alufolie91 aaba83669f actually print a different message for localskins with lua
tell ppl that this may cause issues
2026-06-28 15:09:06 +02:00
alufolie91 73c7a5a0c4 add better description for skip intro music stuff 2026-06-28 00:40:54 +02:00
alufolie91 b547e77738 add better description for skip intro music stuff 2026-06-28 00:40:46 +02:00
alufolie91 49d6374505 have local skin message account for "KCL" prefix
for skins with lua
2026-06-28 00:27:02 +02:00
GLide KS 2ba4757c6a Hopefully a cleaner implementation of Local Addon switch 2026-06-28 00:26:59 +02:00
romoney5 3606b0ae66 Don't disable console on resync 2026-06-28 00:26:56 +02:00
romoney5 ba75523d48 Print a warning when archiving an invalid Lua value 2026-06-28 00:26:54 +02:00
alufolie91 6ace8dda45 have local skin message account for "KCL" prefix
for skins with lua
2026-06-28 00:24:19 +02:00
GLide KS d41c41433b Hopefully a cleaner implementation of Local Addon switch 2026-06-28 00:20:27 +02:00
romoney5 a22fbfcfdb Don't disable console on resync 2026-06-27 23:52:56 +02:00
romoney5 b39e3c7276 Print a warning when archiving an invalid Lua value 2026-06-27 23:51:37 +02:00
alufolie91 71640202ed better polyobj count error for savegame
from Banpyura
gonna look into their return to menu instead of i_error stuff sometime
2026-06-27 23:42:16 +02:00
alufolie91 eca01cbc39 better polyobj count error for savegame
from Banpyura
gonna look into their return to menu instead of i_error stuff sometime
2026-06-27 23:42:01 +02:00
alufolie91 5fb5af05be this is P_NetUnArchiveThinkers lululul 2026-06-27 23:39:32 +02:00
alufolie91 c889a979ca this is P_NetUnArchiveThinkers lululul 2026-06-27 23:39:23 +02:00
alufolie91 9818da61bf Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2026-06-27 23:17:59 +02:00
indev 4f036c9312 Fix setupm_ip going out of textbox when its not being edited 2026-06-28 00:14:56 +03:00
alufolie91 d99c272a79 have textboxes "reserve" space for cursor
so it wont draw outside the textbox but rather scrolls
2026-06-27 23:14:40 +02:00
alufolie91 f694b4fac1 have textboxes "reserve" space for cursor
so it wont draw outside the textbox but rather scrolls
2026-06-27 23:14:32 +02:00
alufolie91 c4ed75fbc6 port over some chat stuff from SRB2-Banpyura
per https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2784

chat offsets and character count
offsets are added to the base offset like we do for hud stuff, the og pr will directly use the cvar values for this, but wanna keep consistent with our rest
needs to be added in the menu somewhere but idk where
2026-06-27 22:43:57 +02:00
alufolie91 983f720e57 port over some chat stuff from SRB2-Banpyura
per https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2784

chat offsets and character count
offsets are added to the base offset like we do for hud stuff, the og pr will directly use the cvar values for this, but wanna keep consistent with our rest
needs to be added in the menu somewhere but idk where
2026-06-27 22:42:20 +02:00
alufolie91 91927e324b ,
this menu been broken since 4 months lol
2026-06-27 20:40:33 +02:00
alufolie91 81885c4540 ,
this menu been broken since 4 months lol
2026-06-27 20:40:20 +02:00
alufolie91 13dc0db9a9 add stairjank and skydome stuff to menu
pls someone gib a better description for skydome idk ingles
2026-06-27 20:29:19 +02:00
alufolie91 bdd045d30e add stairjank and skydome stuff to menu
pls someone gib a better description for skydome idk ingles
2026-06-27 20:29:02 +02:00
alufolie91 8aafde4c9d "less" 2026-06-27 20:05:51 +02:00
alufolie91 8e55c04562 "less" 2026-06-27 20:05:43 +02:00
alufolie91 266a4effb7 fix fogblock not accounting for fake contrast
super old oopsie lulul
2026-06-27 14:18:13 +02:00
alufolie91 948c9399de fix HWR_SplitWall again..
theres guards just above this which should just skip shit but for some reason the clamps still do stuff, idk man
fixes the weird grass fof in green hill
2026-06-27 14:18:10 +02:00
alufolie91 db4aedf498 readd missing setblend for sky bg
oopsie forgor to copy this back
2026-06-27 14:18:04 +02:00
alufolie91 3b93454af8 fix fogblock not accounting for fake contrast
super old oopsie lulul
2026-06-27 14:10:25 +02:00
alufolie91 2750f6741f fix HWR_SplitWall again..
theres guards just above this which should just skip shit but for some reason the clamps still do stuff, idk man
fixes the weird grass fof in green hill
2026-06-27 14:08:38 +02:00
alufolie91 400ceae8de readd missing setblend for sky bg
oopsie forgor to copy this back
2026-06-27 14:05:32 +02:00
alufolie91 f12d5a246d just dont set shader for this ig
otherwise this breaks when you disable the hud for whatever reason
looks the same so whatever
2026-06-26 19:54:20 +02:00
alufolie91 ffd4c669b7 just dont set shader for this ig
otherwise this breaks when you disable the hud for whatever reason
looks the same so whatever
2026-06-26 19:54:12 +02:00
alufolie91 6efe56808a make sky "dome/barreling" toggable
per "skydome" cvar
using karts old sky code for gl since it appears to differ a bit from srb2 and id want to keep this "authentic" to old kart
2026-06-26 17:44:40 +02:00
alufolie91 ec047151e3 toggable stair "jank" visuals
akin to RR, just toned down for smaller kart chars
also toggable ofc
theres not that many stairs in kart but this looks cute with smol bumps in the road
wish this would work on slopes but theyre kinda messed up lol
2026-06-26 17:44:37 +02:00
alufolie91 2da3264908 make sky "dome/barreling" toggable
per "skydome" cvar
using karts old sky code for gl since it appears to differ a bit from srb2 and id want to keep this "authentic" to old kart
2026-06-26 17:43:27 +02:00
alufolie91 95fdb52f06 toggable stair "jank" visuals
akin to RR, just toned down for smaller kart chars
also toggable ofc
theres not that many stairs in kart but this looks cute with smol bumps in the road
wish this would work on slopes but theyre kinda messed up lol
2026-06-23 19:38:14 +02:00
alufolie91 b1100d6215 add mobj "temprollangle" field
same as rollangle but resets at beginning on each tic
i dont feel like exposing this to lua atm, so if someone wants to or if even needed at all
2026-06-23 18:24:27 +02:00
alufolie91 18df3b895d add mobj "temprollangle" field
same as rollangle but resets at beginning on each tic
i dont feel like exposing this to lua atm, so if someone wants to or if even needed at all
2026-06-23 18:24:16 +02:00
alufolie91 cb8df4c3d0 change how banana rotation throw stuff works
noticed sloperoll does not properly work from certain angles
so just reset rollangle if needed in K_RollMobjBySlopes since couldnt find a better place tbh
2026-06-23 18:21:04 +02:00
alufolie91 0fb457b1e4 change how banana rotation throw stuff works
noticed sloperoll does not properly work from certain angles
so just reset rollangle if needed in K_RollMobjBySlopes since couldnt find a better place tbh
2026-06-23 18:20:31 +02:00
alufolie91 07d914e12b push all this crap 2026-06-23 00:12:44 +02:00
alufolie91 fbae43f61a move spinoutroll to k_hud
hud thing for minimap so should be in there
2026-06-23 00:11:47 +02:00
alufolie91 4adbe051aa move spinoutroll to k_hud
hud thing for minimap so should be in there
2026-06-23 00:10:25 +02:00
mazmazz 7ea95b4495 Fix OSX null-pointer-arithmetic error 2026-06-22 23:14:51 +02:00
mazmazz 3cd0ec0336 Fix OSX null-pointer-arithmetic error 2026-06-22 23:14:36 +02:00
alufolie91 07c780dc9c add missing null terminator for player name on server info screen 2026-06-22 23:10:36 +02:00
alufolie91 c44b3f3f9b add missing null terminator for player name on server info screen 2026-06-22 23:10:28 +02:00
alufolie91 f6d3ab1f3a more random style cleanup
had those lying around in lugstuff branch
2026-06-22 21:05:10 +02:00
alufolie91 2c8099e228 make builds with more than 16 players undefine COMPAT_VANILLA 2026-06-22 20:57:24 +02:00
alufolie91 7c84dd5661 raise NUMMOBJFREESLOTS to 4096 on non vanilla compat build 2026-06-22 20:57:21 +02:00
alufolie91 cabd8baae5 some P_MobjWasRemoved for non COMPAT_VANILLA builds 2026-06-22 20:57:10 +02:00
alufolie91 593540a3f9 add flag "COMPAT_VANILLA"
undefine to enable features that are not vanilla compatible
2026-06-22 20:56:53 +02:00
alufolie91 407af1d25c Merge branch 'maperrors2' into Saturn-Next 2026-06-22 20:54:53 +02:00
alufolie91 029c21eae8 correct map issues clientside
but be loud about it instead of I_Error´ing
most of those would be fatal anyways, so screw vanilla desyncing if they crash eitherways
2026-06-22 20:53:49 +02:00
entryway 568f29ed1c Check for blockmap overflow in P_BlockLinesIterator. Under RANGECHECK define. 2026-06-22 20:52:49 +02:00
alufolie91 2dacc333b5 just set backsector to NULL
if not in vanilla doom compat mode/overflow emulation GetSectorAtNullAddress will just return NULL, so we can do so aswell
2026-06-22 20:52:42 +02:00
alufolie91 363612c488 port more checks from dsda-doom for invalid map data
decided to have it i_error for now, not sure what exactly is the best approach here
should we just "correct" some of those instead?
vanilla probably just crashes anyways
2026-06-22 20:52:19 +02:00
alufolie91 d8ffffd86e replace non valid sidenum magic number
with what dsda-doom uses
2026-06-22 20:52:11 +02:00
alufolie91 3fe4399656 correct map issues clientside
but be loud about it instead of I_Error´ing
most of those would be fatal anyways, so screw vanilla desyncing if they crash eitherways
2026-06-22 20:49:21 +02:00
alufolie91 e9d395c494 revert lzf crap
kept forger but that caused some issues with ub/asan
2026-06-22 18:27:51 +02:00
alufolie91 0a7d424b4c make builds with more than 16 players undefine COMPAT_VANILLA 2026-06-21 23:41:13 +02:00
alufolie91 770a41cf46 raise NUMMOBJFREESLOTS to 4096 on non vanilla compat build 2026-06-21 23:40:32 +02:00
alufolie91 4b2a13defb cleanup K_DropItems a bit
move "paperitem" spawn to its separate function like RR
2026-06-21 23:30:20 +02:00
alufolie91 99b9bc8e0f cleanup K_DropItems a bit
move "paperitem" spawn to its separate function like RR
2026-06-21 23:29:59 +02:00
alufolie91 52ed19b642 some P_MobjWasRemoved for non COMPAT_VANILLA builds 2026-06-21 23:13:39 +02:00
alufolie91 9cc74d8b17 use P_MobjWasRemoved for P_MoveChaseCamera
dont need to care about synch safety here....
2026-06-21 23:07:20 +02:00
alufolie91 066adb972e add some more mobj null checks to P_MobjThinker
from srb2 ig
2026-06-21 23:07:17 +02:00
alufolie91 0f1ad8a086 few more smaller cleanups 2026-06-21 23:07:12 +02:00
alufolie91 d6b90f0ec7 few more smaller cleanups 2026-06-21 23:06:53 +02:00
alufolie91 7469931549 add some more mobj null checks to P_MobjThinker
from srb2 ig
2026-06-21 23:05:53 +02:00
alufolie91 d43e97c5e3 use P_MobjWasRemoved for P_MoveChaseCamera
dont need to care about synch safety here....
2026-06-21 23:04:36 +02:00
alufolie91 40537eca81 cleanup P_KillMobj a little 2026-06-21 23:03:45 +02:00
alufolie91 50ff14fcf7 cleanup P_KillMobj a little 2026-06-21 23:03:24 +02:00
AJ Martinez 0cff3c23f3 Don't attempt itemamount correction after orbitals self-destruct 2026-06-21 22:35:20 +02:00
AJ Martinez 88dbdad1dd Don't attempt itemamount correction after orbitals self-destruct 2026-06-21 22:34:45 +02:00
alufolie91 9bdda66a0c rename this to D_CheckMapReplacements 2026-06-21 19:14:22 +02:00
alufolie91 3332f9f7a1 rename this to D_CheckMapReplacements 2026-06-21 19:14:15 +02:00
alufolie91 3b6a09da9b oops 2026-06-21 19:04:48 +02:00
alufolie91 f594fc2040 oops 2026-06-21 19:04:42 +02:00
Zwip-Zwap Zapony c275555678 Draw the input prompt while the console is moving 2026-06-21 19:00:10 +02:00
Zwip-Zwap Zapony fc588f8046 Make con_height adjustable on the fly 2026-06-21 19:00:07 +02:00
Zwip-Zwap Zapony e7639a8796 Make con_height adjustable on the fly 2026-06-21 18:59:38 +02:00
Zwip-Zwap Zapony 565fbb34b2 Draw the input prompt while the console is moving 2026-06-21 18:53:22 +02:00
alufolie91 17093e8022 add command to list unused map slots
less pain for server owners
hope this is sufficient
2026-06-21 18:03:50 +02:00
alufolie91 9a00542d01 add command to list unused map slots
less pain for server owners
hope this is sufficient
2026-06-21 18:03:40 +02:00
entryway 892f99f3a8 Check for blockmap overflow in P_BlockLinesIterator. Under RANGECHECK define. 2026-06-20 17:14:10 +02:00
alufolie91 47f895fa5d quick port of mbf sky transfer line
TODO: gl support :chaosleep:
2026-06-20 01:36:26 +02:00
alufolie91 ea83f2c727 just set backsector to NULL
if not in vanilla doom compat mode/overflow emulation GetSectorAtNullAddress will just return NULL, so we can do so aswell
2026-06-19 19:07:35 +02:00
alufolie91 80be424ecc add flag "COMPAT_VANILLA"
undefine to enable features that are not vanilla compatible
2026-06-19 18:33:26 +02:00
alufolie91 3ffde62458 port more checks from dsda-doom for invalid map data
decided to have it i_error for now, not sure what exactly is the best approach here
should we just "correct" some of those instead?
vanilla probably just crashes anyways
2026-06-19 16:52:33 +02:00
alufolie91 c218c958f7 replace non valid sidenum magic number
with what dsda-doom uses
2026-06-19 16:42:33 +02:00
alufolie91 b575c288fa allow page up/down to scroll through chat
like in console
2026-06-18 17:31:36 +02:00
alufolie91 4073c2b699 :chaosleep: 2026-06-18 17:31:06 +02:00
alufolie91 1b6bfda501 tiny cleanup some stuff 2026-06-18 16:47:27 +02:00
alufolie91 8de01bf5fe Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2026-06-18 16:35:20 +02:00
alufolie91 9e766b0b44 allow page up/down to scroll through chat
like in console
2026-06-18 16:34:51 +02:00
indev f9a6702219 Fix player node staying muted when player leaves 2026-06-18 17:28:27 +03:00
indev cfda853e6f Add console variant for mute command, also fix it applying mute for players that are not in game 2026-06-18 16:35:48 +03:00
alufolie91 14ac3ca9b0 ;;... 2026-06-16 20:05:12 +02:00
alufolie91 c4bd8ef706 ;;... 2026-06-16 20:05:04 +02:00
alufolie91 e94fecf56d cleanup even more style issues
also should fix R_InitSprites printing the wrong spritename in some cases
2026-06-16 19:08:04 +02:00
alufolie91 3e33862ceb cleanup even more style issues
also should fix R_InitSprites printing the wrong spritename in some cases
2026-06-16 19:07:54 +02:00
alufolie91 51d9aa6197 add credit to bayer dither shader sources
completely forgot about this (sry!)
the original implementation was mostly based on hughsk´s 8x8 bayer shader while the current is mostly adapted from the libretro 4x4 bayer shader
2026-06-16 12:32:02 +02:00
alufolie91 da71b42453 add credit to bayer dither shader sources
completely forgot about this (sry!)
the original implementation was mostly based on hughsk´s 8x8 bayer shader while the current is mostly adapted from the libretro 4x4 bayer shader
2026-06-16 12:31:53 +02:00
alufolie91 96a29abc62 move this back
might change behavior of this, which may desynch in rare cases
2026-06-15 14:53:59 +02:00
alufolie91 b321f89d78 move this back
might change behavior of this, which may desynch in rare cases
2026-06-15 14:53:50 +02:00
alufolie91 fa1b797a44 handle interrupt signals during CONS_Error
also move stuff into smol inline function
2026-06-15 14:51:35 +02:00
alufolie91 a1ae482174 handle interrupt signals during CONS_Error
also move stuff into smol inline function
2026-06-15 14:48:21 +02:00
alufolie91 e1061ab4b4 add PARANOIA cases for reject and blockmap stuff
also see comment
2026-06-13 15:11:41 +02:00
alufolie91 71dce3d410 add PARANOIA cases for reject and blockmap stuff
also see comment
2026-06-13 15:11:15 +02:00
alufolie91 ab0d071d35 use sizeu1 instead of %lu
windoze.......
2026-06-13 13:41:06 +02:00
alufolie91 8129b89034 port P_VerifyBlockMap from dsda-doom
to check for blockmap issues that might cause crashes
2026-06-13 13:37:21 +02:00
alufolie91 97f9c2fb68 port P_VerifyBlockMap from dsda-doom
to check for blockmap issues that might cause crashes
2026-06-13 13:36:55 +02:00
alufolie91 14aaba7a87 make reject matrix print an error instead of warning
better on 2nd thought as this may crash vanilla clients that use nametags
2026-06-13 13:20:54 +02:00
alufolie91 2c1bb6c268 smol optimize fof checks in P_CheckSight
check if fof is solid before height comparisons, also split initial height comparisons to save on some height checks in some cases
2026-06-13 13:20:51 +02:00
alufolie91 d8e8d8106a make reject matrix print an error instead of warning
better on 2nd thought as this may crash vanilla clients that use nametags
2026-06-13 13:20:43 +02:00
alufolie91 fb702b0530 smol optimize fof checks in P_CheckSight
check if fof is solid before height comparisons, also split initial height comparisons to save on some height checks in some cases
2026-06-13 13:06:37 +02:00
alufolie91 cc6437285f check for missized rejectmatrix´s on load, pad them if needed
this is what dsda-doom/prboom does
ensures we wont crash from oob reads and makes us print a warning
2026-06-13 13:00:00 +02:00
alufolie91 5c2420ef69 check for missized rejectmatrix´s on load, pad them if needed
this is what dsda-doom/prboom does
ensures we wont crash from oob reads and makes us print a warning
2026-06-13 12:58:29 +02:00
indev b24f6683b7 Use SKINCOLOR_NONE for ROULETTECOLOR_NONE instead of TC_DEFAULT 2026-06-13 02:25:43 +03:00
indev 5f559af29c Add more options to roulettecolor 2026-06-13 02:12:23 +03:00
indev eef1c55549 Add option for item roulette to use 'local' colors instead of player color 2026-06-13 01:40:14 +03:00
alufolie91 3c227ec532 P_CheckSight: fix rare overflow in rejectmatrix check
didnt think this could overflow here but well it does
wish there was a better way to bounds check heap arrays in C
2026-06-12 22:06:57 +02:00
alufolie91 bba8ef5b9a P_CheckSight: fix rare overflow in rejectmatrix check
didnt think this could overflow here but well it does
wish there was a better way to bounds check heap arrays in C
2026-06-12 22:06:47 +02:00
indev ee1b5e8ea0 Fix JoyAxis and InputDown inputs being off by one, this fixes lookback only working for p1 (ty lug <3) 2026-06-12 15:50:59 +02:00
indev 50f839e1ad Fix JoyAxis and InputDown inputs being off by one, this fixes lookback only working for p1 (ty lug <3) 2026-06-12 16:47:55 +03:00
indev 3e10b4f5f6 Allow lookback in replays (currently only works for player 1) 2026-06-12 15:40:25 +02:00
indev 8db399be9b Allow lookback in replays (currently only works for player 1) 2026-06-12 16:38:32 +03:00
alufolie91 5d1795e7fd cleanup g_demo a little 2026-06-09 09:31:47 +02:00
alufolie91 68851c357a simplify W_CheckNumForNamePwad
pretty much what blankart does
avoids doing a bunch of string work
2026-06-09 09:30:54 +02:00
alufolie91 8cb321993e restore functionality to set zipper/speed pad sounds
set using the front side upper texture field like the play sound special per "DSXXXX"
the parsing part already was there but not the actual code to make it use the specified sound for some reason lul
shouldnt break anything and is vanilla compatible!
2026-06-08 10:04:14 +02:00
alufolie91 b1df798d1c restore functionality to set zipper/speed pad sounds
per upper front texture
shouldnt break anything but might be funny
2026-06-08 09:57:17 +02:00
alufolie91 b4cad08ad3 cleanup p_spec/p_setup a bit 2026-06-08 09:44:36 +02:00
alufolie91 cf593c2d30 cleanup p_spec/p_setup a bit 2026-06-08 09:44:19 +02:00
alufolie91 fa899d3970 fix a few more style issues 2026-06-07 07:07:56 +02:00
alufolie91 c3ec96f19a fix a few more style issues 2026-06-07 07:06:34 +02:00
alufolie91 b955fdb47d cleanup s_sound a little 2026-06-05 23:07:29 +02:00
James R 4686e8e112 Do not play invalid sfx 2026-06-05 23:07:26 +02:00
alufolie91 50fb49fbec cleanup s_sound a little 2026-06-05 23:07:18 +02:00
James R 1b95b0ff15 Do not play invalid sfx 2026-06-05 23:00:19 +02:00
alufolie91 667c67a61a also avoid strcpy for PutFileNeeded 2026-06-05 20:43:37 +02:00
alufolie91 edb9c76a8b also avoid strcpy for PutFileNeeded 2026-06-05 20:43:11 +02:00
alufolie91 df9a23a6c7 CL_CheckFiles: avoid using strcpy
wadfile->filename has not a fixed size, so it theoretically might be bigger than wadfilename buffer
this probably wont ever happen but better be safe than sorry honestly
2026-06-05 20:20:38 +02:00
alufolie91 16b1bbc069 CL_CheckFiles: avoid using strcpy
wadfile->filename has not a fixed size, so it theoretically might be bigger than wadfilename buffer
this probably wont ever happen but better be safe than sorry honestly
2026-06-05 20:20:20 +02:00
alufolie91 8e1baf2ab0 SV_SendFile: check if I_GetNodeAddress is set before use 2026-06-05 20:07:56 +02:00
alufolie91 5275b9eec4 optimize CL_CheckFiles a bit
the "already loaded" check will not first compare the md5sum, which is a very simple memcmp, and only then it will do string copies, nameonly mutation and name compare should the md5sum match
this should save quite a few unnecessary string operations since the md5 match case will rarely ever hit
2026-06-05 20:07:56 +02:00
alufolie91 a3f557f4df SV_SendFile: check if I_GetNodeAddress is set before use 2026-06-05 20:07:43 +02:00
alufolie91 1ac029edc6 optimize CL_CheckFiles a bit
the "already loaded" check will not first compare the md5sum, which is a very simple memcmp, and only then it will do string copies, nameonly mutation and name compare should the md5sum match
this should save quite a few unnecessary string operations since the md5 match case will rarely ever hit
2026-06-05 20:07:43 +02:00
alufolie91 761766d353 whitespace fix 2026-06-05 16:19:02 +02:00
alufolie91 aaf8755ab0 whitespace fix 2026-06-05 16:18:49 +02:00
alufolie91 72d3360711 delet this
this doesent exist anymore lol
2026-06-05 15:59:55 +02:00
alufolie91 57190712d1 delet this
this doesent exist anymore lol
2026-06-05 15:59:47 +02:00
alufolie91 709f3bd47f Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2026-06-05 15:43:34 +02:00
alufolie91 ac52ec2c48 print netcmd name for SendNetXCmdForPlayer warnings
makes those prints a little more useful for debug
2026-06-05 14:50:46 +02:00
alufolie91 a8b6a6e08f print netcmd name for SendNetXCmdForPlayer warnings
makes those prints a little more useful for debug
2026-06-05 14:50:38 +02:00
alufolie91 956bc3f7df hw renderer cleanups from lugstuff branch
mostly just code dedupe with ceepeepee lambdas
had checked in the past those didnt cause any real noticeable perf changes
2026-06-05 13:07:57 +02:00
alufolie91 540c1fee08 force inline hw render lambdas
didnt knew you could do that lul
also changes some of them to avoid any external capture by passing everything directly
this completely eliminates ALL overhead that may have been caused, which is like 3-5fps or smth lul
2026-06-05 13:06:06 +02:00
alufolie91 746a8cec8b hw_main: make HWR_SkyWallList_Add realloc check a little safer
stuff like that should always be checked per equals/greater than just equals
in practice this shouldnt have caused any issues but its just better practice to check for greater
2026-06-05 12:21:27 +02:00
alufolie91 83e305a8c1 call PingUpdate more often
not for 9.3 but a later version
this is so mindelay is actually useful at all, since it relies on this, and updating this once per second is just not fast enough to make this really viable online to stabilize unstable ping
2026-06-04 09:24:11 +02:00
alufolie91 f7a32b5f85 init "savegamename"
global that was missed
2026-06-04 09:21:38 +02:00
alufolie91 bd30ab8fb7 delet JoyType_t
palyer[sic]......
2026-06-04 09:21:36 +02:00
alufolie91 4140f93e41 update pingdisplay only once per second
this will make sense later......
2026-06-04 09:21:33 +02:00
alufolie91 d8f2d44eb9 update pingdisplay only once per second
this will make sense later......
2026-06-04 09:21:20 +02:00
alufolie91 03c9212bb3 init "savegamename"
global that was missed
2026-06-04 08:35:59 +02:00
alufolie91 72dc73fab1 delet JoyType_t
palyer[sic]......
2026-06-04 08:35:36 +02:00
alufolie91 8ae6f71578 bunch of smaller optimizations and cleanups
mostly avoiding needless work as per usual
2026-06-02 11:31:56 +02:00
alufolie91 d5083ac66c cleanup and split K_MoveKartPlayer
item stuff split into K_PlayerItemThink
2026-06-02 11:24:49 +02:00
alufolie91 62be792a0d cleanup K_KartDrift a bit 2026-06-02 11:23:47 +02:00
alufolie91 d125ca6f0a bunch of smaller optimizations and cleanups
mostly avoiding needless work as per usual
2026-06-02 11:14:55 +02:00
alufolie91 a5817a9096 cleanup and split K_MoveKartPlayer
item stuff split into K_PlayerItemThink
2026-05-31 14:29:13 +02:00
alufolie91 9fbf6e95b7 cleanup K_KartDrift a bit 2026-05-31 13:28:05 +02:00
alufolie91 80ac5a02ac Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2026-05-31 07:09:33 +02:00
alufolie91 c34346cb9a Saturn Icon for mac 2026-05-30 07:29:30 +02:00
alufolie91 d7803ecdcf fix cmake build 2026-05-30 06:05:52 +02:00
alufolie91 10f89ab10e fix cmake build 2026-05-30 06:05:45 +02:00
alufolie91 1a2a487a93 change cmake title to "Saturn" 2026-05-30 05:42:54 +02:00
alufolie91 bed6306cdf p_sight: let P_CrossSubsecPolyObj also use "fast" P_DivlineCrossed
for P_CheckSight on polyobjects
2026-05-30 05:42:51 +02:00
alufolie91 7521b3abd2 tiny optimize PIT_RadiusAttack in some cases
by checking simpler things before distance checks which may avoid two P_AproxDistance/FixedHypot calls
2026-05-30 05:42:48 +02:00
alufolie91 58d5bab181 tiny optimization K_SpawnKartMissile
by avoiding "min/max" reevaluation
2026-05-30 05:42:46 +02:00
alufolie91 ea6fab159d change cmake title to "Saturn" 2026-05-30 05:42:34 +02:00
alufolie91 570ee21f52 tiny optimize PIT_RadiusAttack in some cases
by checking simpler things before distance checks which may avoid two P_AproxDistance/FixedHypot calls
2026-05-30 05:36:47 +02:00
alufolie91 8ba50a1f3a tiny optimization K_SpawnKartMissile
by avoiding "min/max" reevaluation
2026-05-30 05:36:47 +02:00
alufolie91 faa55f571b p_sight: let P_CrossSubsecPolyObj also use "fast" P_DivlineCrossed
for P_CheckSight on polyobjects
2026-05-30 05:30:31 +02:00
Roberto Ierusalimschy bf18ea802c detail (string cache a bit smaller by default) 2026-05-27 20:12:08 +02:00
Roberto Ierusalimschy da6553831f code for string cache generalized for "associative sets" (compiler
will optimize away or inline the extra loops)
2026-05-27 13:55:02 +02:00
Roberto Ierusalimschy f3613ed0f7 'clearapihash' -> 'luaS_clearcache' and moved to 'lstring.c' (which
keeps all code related to this cache)
2026-05-27 13:52:40 +02:00
Roberto Ierusalimschy 80bfd2891c new cache for interning strings 2026-05-27 13:51:09 +02:00
Roberto Ierusalimschy 80330ccb58 keep memory-error message in the global state, so that its use
does not depend on Lua internalizing strings to avoid a string
creation on memory errors
2026-05-27 13:40:17 +02:00
alufolie91 2bffe443ed simplify analogue throwdir stuff in K_drawInput 2026-05-25 17:11:18 +02:00
alufolie91 f34574071f simplify analogue throwdir stuff in K_drawInput 2026-05-25 17:10:55 +02:00
alufolie91 261c02f4b6 few more hw_ file cleanups 2026-05-22 23:12:56 +02:00
alufolie91 dd521f2d6a few more hw_ file cleanups 2026-05-22 23:12:42 +02:00
Alug d59ac7d01b fix weird gap in opengl options menu 2026-05-20 19:03:41 +02:00
Alug 3cca53e750 fix weird gap in opengl options menu 2026-05-20 19:03:28 +02:00
alufolie91 b4b08a068c Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2026-05-19 14:00:45 +02:00
indev ac86f36186 Skip empty lines in renderer.txt 2026-05-18 20:32:59 +03:00
alufolie91 b5c7fd5a2b HWR_Subsector: check for sub->polyList instead of numpolys
numpolys sometimes might not get reset, checking for sub->polyList is what was actually intended
2026-05-18 18:21:00 +02:00
alufolie91 da103f54d6 hw_main: reorder plane stuff in HWR_Subsector
check for subsector validcount first, then if its a sky plane
so we can skip checking sector heights for sky planes, which may save a bit of maths on maps with many slopes
2026-05-18 18:20:58 +02:00
alufolie91 f755be018a HWR_Subsector: check for sub->polyList instead of numpolys
numpolys sometimes might not get reset, checking for sub->polyList is what was actually intended
2026-05-18 18:00:40 +02:00
alufolie91 7c61455770 hw_main: reorder plane stuff in HWR_Subsector
check for subsector validcount first, then if its a sky plane
so we can skip checking sector heights for sky planes, which may save a bit of maths on maps with many slopes
2026-05-17 14:55:25 +02:00
alufolie91 27495e5c84 GL_FBO_BindMainFramebuffer does not need arguments
oops
2026-05-16 02:30:26 +02:00
alufolie91 0219e127ff add support for glBlitFramebuffer 2026-05-16 02:30:26 +02:00
alufolie91 288f13105b fix fbo support checks
technically checking if 0 was fine, and so was setting to  "false", but FBOext_NONE is the thing to check for correctness
2026-05-16 02:30:26 +02:00
alufolie91 c8a197b936 refactor fbo stuff to accept multiple fbos 2026-05-16 02:30:26 +02:00
alufolie91 74a0a6a333 blua: readd fast track for gettable operations again
this time properly
the set ones are pretty much incompatible with usedindex, so cant use them
2026-05-15 19:12:33 +02:00
alufolie91 f82d138482 cleanup some things 2026-05-15 13:00:30 +02:00
alufolie91 f8a545b50e cleanup some things 2026-05-15 13:00:24 +02:00
alufolie91 e7332a3efe Revert "Blua: implementation of fast track for gettable operations"
This reverts commit e4e51f0f80.
2026-05-15 11:54:10 +02:00
alufolie91 bd27a62769 Revert "Blua: fast track for 'settable'"
This reverts commit bdae0ef4ae.
2026-05-15 11:53:59 +02:00
alufolie91 2b650e4b61 Revert "Blua: 'Protect' in table operations is not needed in the fast track"
This reverts commit 537a50b9b3.
2026-05-15 11:53:53 +02:00
alufolie91 8e82256827 Revert "Blua: 'luaV_fastget' only treats the real fast case (table with a non-nil value at given key, so that it does not need to check metamethods)"
This reverts commit 019812db08.
2026-05-15 11:53:46 +02:00
alufolie91 4fa937728b Revert "Blua: OP_SELF can use 'luaV_fastget' specialized for strings, as it is applied only to string keys"
This reverts commit 0fb752b745.
2026-05-15 11:53:42 +02:00
alufolie91 9f9e6450f2 Revert "Blua: opcode OP_SELF operate only with string keys, so they can use fast-track table access"
This reverts commit 7684e6aa07.
2026-05-15 11:53:33 +02:00
alufolie91 1c75dd0401 Revert "blua: fix copy paste error for "slow path" in auxgetstr/lua_getfield"
This reverts commit b652d802f5.
2026-05-15 11:53:26 +02:00
alufolie91 422b01049d Revert "Blua: implementation of fast track for gettable operations"
This reverts commit 211153aac0.
2026-05-15 11:53:07 +02:00
alufolie91 4e25328d64 Revert "Blua: fast track for 'settable'"
This reverts commit bdae0ef4ae.
2026-05-15 11:53:03 +02:00
alufolie91 27e15fbe47 Revert "Blua: 'Protect' in table operations is not needed in the fast track"
This reverts commit 537a50b9b3.
2026-05-15 11:52:48 +02:00
alufolie91 6fa3005e34 Revert "Blua: 'luaV_fastget' only treats the real fast case (table with a non-nil value at given key, so that it does not need to check metamethods)"
This reverts commit 019812db08.
2026-05-15 11:52:34 +02:00
alufolie91 d4ab749fba Revert "Blua: OP_SELF can use 'luaV_fastget' specialized for strings, as it is applied only to string keys"
This reverts commit 7aa4bd6990.
2026-05-15 11:52:29 +02:00
alufolie91 6ddc0f2c44 Revert "Blua: opcode OP_SELF operate only with string keys, so they can use fast-track table access"
This reverts commit 31a0433255.
2026-05-15 11:52:24 +02:00
alufolie91 e9838e8bcd Revert "blua: fix copy paste error for "slow path" in auxgetstr/lua_getfield"
This reverts commit 2162c49f9d.
2026-05-15 11:52:06 +02:00
alufolie91 b3c7ee528d Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2026-05-15 03:27:25 +02:00
alufolie91 e854096ca0 revert back to number based player names fallbacks
well need our player 1-16 not player a-z :chonkbuncle:
2026-05-15 03:11:52 +02:00
alufolie91 e83866566d revert back to number based player names fallbacks
well need our player 1-16 not player a-z :chonkbuncle:
2026-05-15 03:11:43 +02:00
toaster d4e6ee2fa0 Some fixes for bad player info on joining servers.
* Don't overwrite the first player's name when joining with multiple local splitscreen players. (resolves #151)
* The defaults for unprovided names are now consistently "Player A/B/C/D" as opposed to some being letter-based and some being number-based.
* Send local player info once per local splitscreen player, rather than n^2 times (where n is the number of local splitscreen players).
* Since the packet *requires* four names to be sent every time you join a server, send dummy names for local splitscreen players who aren't connecting, instead of your actual cvars (no data leakage you didn't ask for!)
2026-05-15 03:11:40 +02:00
toaster 4c2cda8be0 EnsurePlayerNameIsGood: Remove trailing whitespace, instead of just failing on it
Interesting error with its recursive duplication resolving exposed by the previous commit!
2026-05-15 03:11:35 +02:00
toaster 83a60ea857 Some fixes for bad player info on joining servers.
* Don't overwrite the first player's name when joining with multiple local splitscreen players. (resolves #151)
* The defaults for unprovided names are now consistently "Player A/B/C/D" as opposed to some being letter-based and some being number-based.
* Send local player info once per local splitscreen player, rather than n^2 times (where n is the number of local splitscreen players).
* Since the packet *requires* four names to be sent every time you join a server, send dummy names for local splitscreen players who aren't connecting, instead of your actual cvars (no data leakage you didn't ask for!)
2026-05-15 03:11:03 +02:00
toaster 3d9d14b353 EnsurePlayerNameIsGood: Remove trailing whitespace, instead of just failing on it
Interesting error with its recursive duplication resolving exposed by the previous commit!
2026-05-15 03:11:00 +02:00
alufolie91 24c9f88262 make snacpending error print player number
bit more informative :chaosleep:
2026-05-15 01:28:02 +02:00
alufolie91 0ff44f6401 make snacpending error print player number
bit more informative :chaosleep:
2026-05-15 01:27:55 +02:00
alufolie91 b652d802f5 blua: fix copy paste error for "slow path" in auxgetstr/lua_getfield
lets hope this fixes the random crashes from gc sometime
stimky from https://github.com/Indev450/SRB2Kart-Saturn/pull/223/changes/e4e51f0f80fb7deb9213c72bb374d0a7e4c3f03b
2026-05-15 01:09:19 +02:00
alufolie91 2162c49f9d blua: fix copy paste error for "slow path" in auxgetstr/lua_getfield
lets hope this fixes the random crashes from gc sometime
stimky from https://github.com/Indev450/SRB2Kart-Saturn/pull/223/changes/e4e51f0f80fb7deb9213c72bb374d0a7e4c3f03b
2026-05-15 01:09:08 +02:00
alufolie91 459beeb000 fix oopsie from https://github.com/Indev450/SRB2Kart-Saturn/commit/093ed023ef36bb2e8608116ef39d7710366ccf84 2026-05-15 00:36:36 +02:00
alufolie91 3a563e40c4 fix oopsie from https://github.com/Indev450/SRB2Kart-Saturn/commit/093ed023ef36bb2e8608116ef39d7710366ccf84 2026-05-15 00:36:22 +02:00
indev a28d798189 Remove some redundant mo != NULL asserts if they are followed by !P_MobjWasRemoved(mo) asserts 2026-05-15 01:24:14 +03:00
indev e75a696ee5 Remove outdated PARANOIA assert in P_SetMobjState, it uses P_SetPlayerMobjState automatically for players now 2026-05-15 01:06:04 +03:00
alufolie91 e113027ce6 d_netcmd: fix snacpending stuff
also move all of it behind PARANOIA define, since nothing else was using it eitherway
2026-05-14 21:25:53 +02:00
alufolie91 ee89a86359 d_netcmd: fix snacpending stuff
also move all of it behind PARANOIA define, since nothing else was using it eitherway
2026-05-14 21:25:06 +02:00
alufolie91 a08a76b2c7 reorder seg_t struct a bit
fixes a 4byte hole so we can fit everything important into cacheline 1
even when compiled without HWRENDER this should be a better layout
checked per pahole
2026-05-14 18:56:55 +02:00
alufolie91 2ce4e866e3 reorder seg_t struct a bit
fixes a 4byte hole so we can fit everything important into cacheline 1
even when compiled without HWRENDER this should be a better layout
checked per pahole
2026-05-14 18:56:43 +02:00
alufolie91 6cc9026a85 fix checking for fbo completeness too early
this should come after everything apparently
all this shit really needs to be cleaned up again
2026-05-12 21:02:34 +02:00
alufolie91 55a57a1036 fix checking for fbo completeness too early
this should come after everything apparently
all this shit really needs to be cleaned up again
2026-05-12 21:02:15 +02:00
alufolie91 6aabdc86c0 P_TryMove: reduce the amount of R_PointInSubsector per call
and also P_PlayerTouchingSectorSpecial
since either are in a loop that often runs multiple times per call
improves perf a bit per usual testing
2026-05-12 15:38:43 +02:00
alufolie91 60f845bf9e P_TryMove: reduce the amount of R_PointInSubsector per call
and also P_PlayerTouchingSectorSpecial
since either are in a loop that often runs multiple times per call
2026-05-12 15:38:13 +02:00
indev 58c7dfa1ac Don't break non-string keys in ArchiveTables when printing error message 2026-05-12 02:59:37 +02:00
indev 9aaa7cc5bf Don't break non-string keys in ArchiveTables when printing error message 2026-05-12 03:52:56 +03:00
alufolie91 d6946d4d44 fix HWR_RenderPolyObjectPlane
smol oopsie that was supposed to be float
fixes the rotating skybox thing in Zero Space
2026-05-11 15:08:14 +02:00
alufolie91 18eac04b28 fix HWR_RenderPolyObjectPlane
smol oopsie that was supposed to be float
fixes the rotating skybox thing in Zero Space
2026-05-11 15:07:51 +02:00
alufolie91 a868844bdf remove outdated comment about precipmobj 2026-05-10 20:15:28 +02:00
alufolie91 39fd31c4b9 p_mobj: potentially save a few more floor/ceiling z checks in some cases
+ some other crap
2026-05-10 20:15:24 +02:00
alufolie91 eea6bb5c1a remove outdated comment about precipmobj 2026-05-10 20:14:33 +02:00
alufolie91 cb93530c5a p_mobj: potentially save a few more floor/ceiling z checks in some cases
+ some other crap
2026-05-10 20:13:49 +02:00
alufolie91 54f3d7b5e0 move lua_tostring out of the loop in mapheaderinfo_get
does not need to be reevaluated constantly
2026-05-10 16:57:45 +02:00
alufolie91 e524f6941f move lua_tostring out of the loop in mapheaderinfo_get
does not need to be reevaluated constantly
2026-05-10 16:53:15 +02:00
alufolie91 88116368bb fix potential null pointer deref in P_LineOpening
again ive never seen this hit, but the mobj gets checked right below its radius get dereferenced within the floorz/ceilingz functions which kinda annoyed me lol
as a fallback i just the floor/ceiling sectorheights, which were used before the addition of slopes
2026-05-09 20:00:19 +02:00
alufolie91 9328825a7c fix potential null pointer deref in P_MobjFloorZ/CeilingZ
dont think this ever really hit, but boundsec indeed can be null
it also gets checked if its null above anyways, so why not here?
2026-05-09 20:00:07 +02:00
alufolie91 a082f57fd3 fix potential null pointer deref in P_LineOpening
again ive never seen this hit, but the mobj gets checked right below its radius get dereferenced within the floorz/ceilingz functions
as a fallback i just the floor/ceiling sectorheights, which were used before the addition of slopes
2026-05-09 19:59:51 +02:00
alufolie91 efeb3512e9 fix potential null pointer deref in P_MobjFloorZ/CeilingZ
dont think this ever really hit, but boundsec indeed can be null
it also gets checked if its null above anyways, so why not here?
2026-05-09 19:59:51 +02:00
alufolie91 f825ca32cc add "HAVE_IPV6" to passtrough compiler flags
to allow compiling with ipv6 support
to note this is unsupported from our side, as purely ipv6 servers are unreachable from vanilla clients
2026-05-09 15:33:48 +02:00
alufolie91 2a9a491944 add "HAVE_IPV6" to passtrough compiler flags
to allow compiling with ipv6 support
2026-05-09 15:31:51 +02:00
alufolie91 ce982d170f change "important" hook_state field to be bool type
matches the others
prob no diff in practice at all
2026-05-08 14:38:57 +02:00
alufolie91 1b3050028e save a few mobjfloorz/ceilingz calls in some cases
gave a small speedup on my test setup (+~3fps)
on slopes those are rather expensive
2026-05-08 14:38:47 +02:00
alufolie91 b21285bac4 change "important" field to be bool type
matches the others
prob no diff in practice at all
2026-05-08 14:38:40 +02:00
alufolie91 277d6f6f57 save a few mobjfloorz/ceilingz calls in some cases
gave a small speedup on my test setup (+~3fps)
on slopes those are rather expensive
2026-05-08 14:36:42 +02:00
alufolie91 2344552ba8 Opengl: enable stencil testing only when portals are used
maybe a bit of perf on non portal maps, prob neglible but why not
2026-05-07 16:26:42 +02:00
alufolie91 7b1b2fdf43 enable stencil testing only when portals are used
maybe a bit of perf on non portal maps, prob neglible but why not
2026-05-07 16:26:30 +02:00
alufolie91 e30685baf2 OpenGL: only enable stencil testing during level render
not 100% sure if this is the most correct thing, but this causes issues with Nvidia Gpu´s under x11
should fix https://github.com/Indev450/SRB2Kart-Saturn/issues/226
2026-05-06 16:29:44 +02:00
alufolie91 50c1263e7d OpenGL: only enable stencil testing during level render
not 100% sure if this is the most correct thing, but this causes issues with Nvidia Gpu´s under x11
should fix https://github.com/Indev450/SRB2Kart-Saturn/issues/226
2026-05-06 12:28:08 +02:00
alufolie91 f1ded99262 some code style cleanups 2026-05-06 12:28:05 +02:00
alufolie91 0b7c67de2d some code style cleanups 2026-05-06 12:25:50 +02:00
alufolie91 b1620a3fce delet I_ShutdownConsole spam
without process forking I_ShutdownSystem will handle it, otherwise the parent process calls it before exiting
2026-05-04 23:02:04 +02:00
alufolie91 d0ea4d20d0 fix parent process being killed before child per interrupt/terminate signals
by ignoring those signals
otherwise the terminal will be left in a weird state, aswell as the parent exit stuff wont be properly run
this was "fine" before https://github.com/Indev450/SRB2Kart-Saturn/commit/f4dc161831a988e725e8639b9674984ebdf5f6bb but now needs to be handled like this
2026-05-04 23:02:01 +02:00
alufolie91 66abc28b2a delet I_ShutdownConsole spam
without process forking I_ShutdownSystem will handle it, otherwise the parent process calls it before exiting
2026-05-04 23:01:43 +02:00
alufolie91 3b42afa34d fix parent process being killed before child per interrupt/terminate signals
by ignoring those signals
otherwise the terminal will be left in a weird state, aswell as the parent exit stuff wont be properly run
this was "fine" before https://github.com/Indev450/SRB2Kart-Saturn/commit/f4dc161831a988e725e8639b9674984ebdf5f6bb but now needs to be handled like this
2026-05-04 22:59:39 +02:00
alufolie91 7f4804f98c fix super rare underflow within FixedHypot if input is -2147483648
this has an insanely rare chance of happening in certain cases (train rush map has a few spots where this is somewhat likely)
abs does not really handle -2147483648 and its result is pretty much implementation defined/ub, since we compile with fwrapv flag it would just return -2147483648 which will cause this to try and access tantoangle at a negative index
we can just return INT32_MAX here since treating either as 2147483647 would return 2147483647 eitherways
2026-05-04 14:10:49 +02:00
alufolie91 391bd7bdcf fix super rare underflow within FixedHypot if input is -2147483648
this has an insanely rare chance of happening in certain cases (train rush map has a few spots where this is somewhat likely)
abs does not really handle -2147483648 and its result is pretty much implementation defined/ub, since we compile with fwrapv flag it would just return -2147483648 which will cause this to try and access tantoangle at a negative index
we can just return INT32_MAX here since treating either as 2147483647 would return 2147483647 eitherways
2026-05-04 14:10:39 +02:00
alufolie91 91d4388623 fallback to srb2back instead of hoping the map is still loaded for intermission bg
timescale and replay fastforward caused stuff to crash and well this is better than a whitescreen ig
2026-05-04 10:28:41 +02:00
alufolie91 4fe3495652 fallback to srb2back instead of hoping the map is still loaded for intermission bg
timescale and replay fastforward caused stuff to crash and well this is better than a whitescreen ig
2026-05-04 10:28:32 +02:00
alufolie91 3c409b4a46 detect kill signal when printing signal from signalhandler
bit more informative than "signal number 9"
2026-05-04 10:01:26 +02:00
alufolie91 43cf634519 detect kill signal when printing signal from signalhandler
bit more informative than "signal number 9"
2026-05-04 10:01:14 +02:00
alufolie91 45067e00a5 fix compiler warnings + "support" gcc16 2026-05-04 08:04:08 +02:00
alufolie91 01ca77f618 fix compiler warnings + "support" gcc16 2026-05-04 08:04:00 +02:00
alufolie91 370ed1583b comment out unused spritescale/offset fields from gl_vissprite_t
yes those are in fact unused
not deleting since they might be useful for something sometime....
2026-05-02 21:02:50 +02:00
alufolie91 9b74ca31d9 comment out unused spritescale/offset fields from gl_vissprite_t
yes those are in fact unused
not deleting since they might be useful for something sometime....
2026-05-02 21:02:38 +02:00
alufolie91 535c2073f1 move palshader code out of HWR_DrawScreenFinalTexture
and make the whole handling safer so we have less chance of ending up with blackscreens should the palette render shader fail
2026-05-01 03:51:28 +02:00
alufolie91 1cc94f379d move palshader code out of HWR_DrawScreenFinalTexture
and make the whole handling safer so we have less chance of ending up with blackscreens should the palette render shader fail
2026-05-01 03:49:55 +02:00
alufolie91 6460ae94f1 remove magic number for P_CalculatePrecipFloor stuff 2026-04-29 17:55:16 +02:00
alufolie91 093ed023ef cleanup CL_DrawConnectionStatus a little 2026-04-29 17:55:13 +02:00
minenice55 1bada2810a cap download size to total size in the connection UI 2026-04-29 17:55:10 +02:00
alufolie91 9df7f3cd3f dont let saltyhop overwrite the players spriteyoffset
let it add to it instead
otherwise if we ever use it for smth else in hardcode saltyhop will work with it
2026-04-29 17:55:04 +02:00
alufolie91 010b6c0361 use destructor attribute for W_Shutdown
makes sure this is always called in any case
also just simpler
2026-04-29 17:55:01 +02:00
alufolie91 dbf67a9670 remove some branch hints in some places
should really only use those for things that are basically dead but gotta be kept for compat reasons and such
2026-04-29 17:54:58 +02:00
alufolie91 8868445c3c S_UpdateSounds: init listenmobj
not sure why but ubsan did complain about it sometimes
S_StartSoundAtVolume also just memsets it so why not do the same here anyways
2026-04-29 17:54:55 +02:00
alufolie91 2b9d9b2fdd dont let saltyhop overwrite the players spriteyoffset
let it add to it instead
otherwise if we ever use it for smth else in hardcode saltyhop will work with it
2026-04-29 17:54:25 +02:00
alufolie91 989f404ea2 use destructor attribute for W_Shutdown
makes sure this is always called in any case
also just simpler
2026-04-29 17:52:23 +02:00
alufolie91 f8f178e9d3 remove some branch hints in some places
should really only use those for things that are basically dead but gotta be kept for compat reasons and such
2026-04-29 17:51:34 +02:00
alufolie91 83fac1585e S_UpdateSounds: init listenmobj
not sure why but ubsan did complain about it sometimes
S_StartSoundAtVolume also just memsets it so why not do the same here anyways
2026-04-29 17:49:42 +02:00
alufolie91 c8e84b6e2e cleanup CL_DrawConnectionStatus a little 2026-04-29 17:47:55 +02:00
minenice55 5650c54776 cap download size to total size in the connection UI 2026-04-29 17:44:49 +02:00
alufolie91 f6a6d71ba5 remove magic number for P_CalculatePrecipFloor stuff 2026-04-29 17:43:10 +02:00
alufolie91 568cb8b8c7 check I_GetNodeAddress is set before use
this might´ve not been init yet at that point
2026-04-27 22:02:43 +02:00
alufolie91 3b00a69615 prevent buffer underflow within holepunching 2026-04-27 22:02:39 +02:00
alufolie91 51f70e9a97 check I_GetNodeAddress is set before use
this might´ve not been init yet at that point
2026-04-27 22:01:50 +02:00
alufolie91 5a4819f482 prevent buffer underflow within holepunching 2026-04-27 22:00:36 +02:00
alufolie91 6949ce82ab k_hud: fix achii speedometer not being properly coloured with colourhud
oopsie smol oversight from me
2026-04-23 10:07:40 +02:00
alufolie91 c343c52477 remove "extra3" hud stuff
decided to finally make smol stickers for the beta hud
this was never a really great solution since it made things look pretty bad at certain resolutions/scales
still keep the loading code for convenience but honestly not needed aswell at this point
2026-04-23 10:07:35 +02:00
alufolie91 8108f9e22e remove "extra3" hud stuff
decided to finally make smol stickers for the beta hud
this was never a really great solution since it made things look pretty bad at certain resolutions/scales
still keep the loading code for convenience but honestly not needed aswell at this point
2026-04-23 10:07:14 +02:00
alufolie91 33fe1d971c k_hud: fix achii speedometer not being properly coloured with colourhud
oopsie smol oversight from me
2026-04-23 10:03:36 +02:00
alufolie91 7931a82b23 attempt to fix a plethora of buffer overflows when trying to connect to a server that does not exist
ex: if you typo´d the serveraddress
this really aint pretty but idk how to make things not turn into limbo hell otherwise
2026-04-21 20:52:15 +02:00
alufolie91 18826e035b attempt to fix a plethora of buffer overflows when trying to connect to a server that does not exist
ex: if you typo´d the serveraddress
this really aint pretty but idk how to make things not turn into limbo hell otherwise
2026-04-21 20:51:04 +02:00
alufolie91 31ccf9c34a optimize K_CheckOffroadCollide further
also makes this alot more readable
like this most of the time we dont have to ever check the players floorz nor ceilingz at all since we check if the sector the players mobj is in is even offroad at all
nothing super big but i did see an improvement of around 1fps in my usual benchmark
2026-04-18 18:46:58 +02:00
alufolie91 5ab7a6c903 optimize K_CheckOffroadCollide further
also makes this alot more readable
like this most of the time we dont have to ever check the players floorz nor ceilingz at all since we check if the sector the players mobj is in is even offroad at all
nothing super big but i did see an improvement of around 1fps in my usual benchmark
2026-04-18 18:45:35 +02:00
alufolie91 ff3b73c49e fix offroad oopsie causing desynch
ye def not confusing at all to suddenly switch the meaning of floor and ceiling
2026-04-17 20:53:24 +02:00
alufolie91 c2589d9ef1 fix offroad oopsie causing desynch
ye def not confusing at all to suddenly switch the meaning of floor and ceiling
2026-04-17 20:53:16 +02:00
alufolie91 64bed71509 add toggle to allow controllers to control the game while window is unfocused
can be toggled with "gamepadunfocused" or in the focus options
2026-04-17 18:54:18 +02:00
alufolie91 7d71f2a360 add toggle to allow controllers to control the game while window is unfocused
can be toggled with "gamepadunfocused" or in the focus options
2026-04-17 18:54:10 +02:00
alufolie91 eed5943b0b optimize K_CheckOffroadCollide a little bit
no need to always check both the mobjs floor and ceiling z coordinates, those are surprisingly complicated checks on slopes
2026-04-17 17:46:17 +02:00
alufolie91 4f9ddffe2a d_cliserv: check for splitscreen nodes first in clientcmd handler
so we dont always have to check a bunch of things that most of the time wont apply anyways
2026-04-17 17:46:17 +02:00
alufolie91 a73f3a073c hw_main: dont need to do sprite billboarding stuff with shearing enabled within HWR_SplitSprite 2026-04-17 17:46:17 +02:00
alufolie91 eff3990a02 small optimize K_CheckOffroadCollide a little bit
no need to always check both the mobjs floor and ceiling z coordinates, those are surprisingly complicated checks on slopes
2026-04-17 17:42:48 +02:00
alufolie91 71c2873572 d_cliserv: check for splitscreen nodes first in clientcmd handler 2026-04-17 17:40:41 +02:00
alufolie91 9b0fe3c40c hw_main: dont need to do this with shearing enabled 2026-04-17 17:39:50 +02:00
alufolie91 a59928221b few more cleanups and super tiny optimizations k_hud 2026-04-16 17:39:13 +02:00
alufolie91 b0a07e49a3 few more cleanups and super tiny optimizations k_hud 2026-04-16 17:39:01 +02:00
Eidolon b46e5cb577 gl: Fix sky dome VBO leak 2026-04-15 23:51:15 +02:00
alufolie91 bb62fbfc12 add "USEJEMALLOC" make flag to link against "jemalloc" allocator
on my linux system and usual benchmark setup this improves performance quite significantly (+~12fps)
this relies on jemalloc to be installed as a separate library for now and is more a convenience thing
2026-04-15 23:51:15 +02:00
Eidolon 496454b3b5 gl: Fix sky dome VBO leak 2026-04-15 23:46:56 +02:00
GenericHeroGuy 81f46224e1 Fix asan error when pressing shift and arrow key
Also fix addons menu ignoring shift when capslock is on!
Also also fix capslock+rshift still typing uppercase letters!
2026-04-15 18:08:03 +02:00
GenericHeroGuy 4e499e553f Fix asan error when pressing shift and arrow key
Also fix addons menu ignoring shift when capslock is on!
Also also fix capslock+rshift still typing uppercase letters!
2026-04-15 18:06:43 +02:00
NepDisk 6c58c0de41 Add support for using custom SDL2 mappings 2026-04-14 20:25:31 +02:00
NepDisk b7ac1625d5 Add support for using custom SDL2 mappings 2026-04-14 20:25:03 +02:00
alufolie91 4edc102d67 hack: fix intermission background becoming white after resolution change 2026-04-12 15:23:53 +02:00
alufolie91 f70f7daa7b hack: fix intermission background becoming white after resolution change 2026-04-12 15:23:45 +02:00
alufolie91 e0bf663157 Hack: fix intermission screen displaying whitescreen in some cases
does not fix whitescreen when switching resolutions while in intermission screen, but oh well
lets hope there will be no issues with calling D_Renderview in intermission state, but it seems to work from quick testing lul
2026-04-12 15:05:51 +02:00
alufolie91 62a2e011c6 Hack: fix intermission screen sometimes not displaying background in some cases
does not fix whitescreen when switching resolutions while in intermission screen, but oh well
lets hope there will be no issues with calling D_Renderview in intermission state, but it seems to work from quick testing lul
2026-04-12 15:05:17 +02:00
alufolie91 eccc3eb33f print opengl extensions in new lines for ogllog
otherwise this may still get truncated and lots of text editor also complain about a super long single line of text
also fix null ptr dereferencing into strtok should strdup return null
2026-04-12 14:30:49 +02:00
alufolie91 58d59a4ef5 print opengl extensions in new lines for ogllog
otherwise this may still get truncated and lots of text editor also complain about a super long single line of text
also fix null ptr dereferencing into strtok should strdup return null
2026-04-12 14:30:20 +02:00
indev 1217089d81 G_UseContinue is unused, delet it 2026-04-11 21:53:15 +03:00
alufolie91 e5c0967a3f BLUA: simplify lua number hash 2026-04-11 16:49:19 +02:00
alufolie91 7e29360203 BLUA: simplify lua number hash 2026-04-11 16:34:32 +02:00
alufolie91 0f8d8eeef0 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2026-04-09 18:51:30 +02:00
indev 27f22e4b5b Use case insensitive string hashing and compare functions for cvar hashtable 2026-04-09 19:09:37 +03:00
alufolie91 c039d14efc remove even more unused stuff 2026-04-08 22:42:34 +02:00
alufolie91 71a0b25e32 remove old and unused menu player description stuff
hope ignorelines is the correct thing to well ignore lines lol
2026-04-08 22:42:31 +02:00
alufolie91 4f85fd6a0b remove even more unused stuff 2026-04-08 22:42:16 +02:00
alufolie91 a1a39a6bec remove old and unused menu player description stuff
hope ignorelines is the correct thing to well ignore lines lol
2026-04-08 22:37:01 +02:00
alufolie91 8c2132a98c remove a few more unused things 2026-04-08 21:54:32 +02:00
alufolie91 3d1e22b16d remove a few more unused things 2026-04-08 21:53:44 +02:00
alufolie91 898bcd336d should be
:chonkbuncle:
2026-04-08 18:53:43 +02:00
alufolie91 e5994774fb should be
:chonkbuncle:
2026-04-08 18:53:35 +02:00
alufolie91 5461a6dcbe cleanup skinselect menu stuff slightly 2026-04-08 14:56:44 +02:00
alufolie91 d957bddc1f update opengl dithering shader
now works more like i intended too by more or less scaling the pattern to be roughly the same size on each resolution and trying to reduce precision issues by using floor to convert float values to integer range
2026-04-08 14:39:09 +02:00
alufolie91 e09ee2a5b1 cleanup skinselect menu stuff slightly 2026-04-08 14:39:01 +02:00
alufolie91 557cef0956 update opengl dithering shader
now works more like i intended too by more or less scaling the pattern to be roughly the same size on each resolution and trying to reduce precision issues by using floor to convert float values to integer range
2026-04-08 13:46:27 +02:00
alufolie91 7177a9f57f raise version to v9.3 2026-04-07 17:53:11 +02:00
alufolie91 e5c233ac5c let it be affected by cv_softcyancut
forgot that cvar existed
disabling it may slightly improve performance
2026-04-05 20:38:08 +02:00
alufolie91 4ccf3dfaf9 software: make R_DrawWallColumn being able to render "holey" textures
not the most efficient but idk a better solution to this, and clipping code may cause some other undesired effects, but well were not supposed to be drawing textures with holes on single sided walls eitherways, but here we are
basically this copies columns into a buffer filled with cyan pixels, so the holes become cyan instead of nothing, which we can cut again using the twomultipatch drawers
fixes the "melt" effect on some things like spelunky or music plant (and well reading/writing oob)
2026-04-05 20:37:24 +02:00
alufolie91 b7662f100a ok dont cache the holecols
stuffs a mess and waste of memory honestly, just use a vector to avoid reallocations, caching them didnt really bring much benefit eitherwas
2026-04-05 20:05:47 +02:00
indev 489a58f9fd Allocate all colormaps with PU_STATIC 2026-04-05 18:31:55 +02:00
alufolie91 b26effa241 Merge pull request #223 from Indev450/bluaopti2
Some optimizations and fixes for BLUA from LUA
2026-04-05 18:28:50 +02:00
alufolie91 efd8c20d26 enable lto by default on makefile builds
change flag to NOLTO to disable lto
at this point we shouldnt have any issues anymore since the utter crapton of bugfixes
2026-04-05 18:26:16 +02:00
alufolie91 4b32484aea enable lto by default on makefile builds
change flag to NOLTO to disable lto
at this point we shouldnt have any issues anymore since the utter crapton of bugfixes
2026-04-05 18:25:59 +02:00
alufolie91 c885ecef39 cache holey columns for R_DrawWallColumn
kinda wasteful memory wise, and didnt even give that much of a speedup, so idk
maybe should just keep doing it at runtime and use vector storage or smth to avoid reallocs
2026-04-04 18:49:14 +02:00
alufolie91 03b85aa00e Merge pull request #225 from Indev450/optifindvar
Speed up CV_Findvar & CV_FindNetVar with hashtable
2026-04-04 17:05:25 +02:00
indev e6434c24ec Fix spelling in server addon info tooltip 2026-04-04 18:01:10 +03:00
indev 52e23e7b08 Merge pull request #224 from Indev450/addon-download-info
Addon download info
2026-04-04 14:49:38 +00:00
indev b84e6d89e2 Add toggle for server addons info hud into settings 2026-04-04 17:24:58 +03:00
indev 42fa435a0b Add toggle for server addon info 2026-04-04 17:17:11 +03:00
indev 873cff4474 Display information about addon types loaded on server when joining (WIP) 2026-04-04 17:17:09 +03:00
indev e543599598 Add option to hide skin name from stat display 2026-04-04 16:54:17 +03:00
alufolie91 c083a12c71 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2026-04-04 15:47:34 +02:00
alufolie91 9d75bb1405 hw_main: reorder things, mark const, remove pointless check for polyobject planes
like normal planes, polyobject planes will just reallocate their vertex buffer eitherways according to size, so that check does not make much sense, srb2 also did remove it a while ago
2026-04-04 15:47:02 +02:00
alufolie91 293e3d03f3 hw_main: reorder things, mark const, remove pointless check for polyobject planes
like normal planes, polyobject planes will just reallocate their vertex buffer eitherways according to size, so that check does not make much sense, srb2 also did remove it a while ago
2026-04-04 15:46:51 +02:00
indev 7b0e3269b3 Add option to hide finished players from minimap 2026-04-04 16:37:15 +03:00
alufolie91 12169bfb38 controllers:check if controller supports addressable led and rumble 2026-03-29 13:50:13 +02:00
alufolie91 4dd5957f19 cache islocalplayer in P_SpectatorJoinGame 2026-03-29 13:50:10 +02:00
alufolie91 0fadfe0f72 dehacked: fixup lua_enumlib_sprintf_upper
apparently reusing a va list like that is ub, so we should just copy it if we want to reuse it
also fix the resize check, since vsnprintf return does not include 0 terminator which we need to account for

also make this part of dehacked.c a bit more readable lol
2026-03-29 10:58:51 +02:00
alufolie91 01fe8da48c dehacked: fixup lua_enumlib_sprintf_upper
apparently reusing a va list like that is ub, so we should just copy it if we want to reuse it
also fix the resize check, since vsnprintf return does not include 0 terminator which we need to account for

also make this part of dehacked.c a bit more readable lol
2026-03-29 10:58:29 +02:00
alufolie91 67edfde87c Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2026-03-28 23:41:44 +01:00
alufolie91 621df7e296 v_video: make stringwidth loops safer 2026-03-28 23:39:21 +01:00
alufolie91 17d72e02fe cleanup some redundant/dead code 2026-03-28 23:39:17 +01:00
alufolie91 cd76660314 restore intended behavior for cvar menu categories
for onchange functions
2026-03-28 23:39:01 +01:00
alufolie91 8bdceaf27d restore intended behavior for cvar menu categories
for onchange functions
2026-03-28 23:38:45 +01:00
alufolie91 f5f9fbcda2 cleanup some redundant/dead code 2026-03-28 23:37:51 +01:00
alufolie91 f270940cc5 v_video: make stringwidth loops safer 2026-03-28 23:36:10 +01:00
alufolie91 06a9ab785e add misssing break K_SpawnBattlePoints
oopsie, somehow this seems to never caused any issues?
2026-03-28 23:06:10 +01:00
alufolie91 f7ab0b699a add misssing break K_SpawnBattlePoints
oopsie, somehow this seems to never caused any issues?
2026-03-28 22:59:30 +01:00
indev 6760546bcd I thought i reverted debug print aaaaaaaa 2026-03-29 00:34:11 +03:00
indev b44e003ab9 This is intended to be empty string, this way it reads the rest of the string including '=' :p 2026-03-29 00:29:38 +03:00
alufolie91 d94f44c14d software: always use multipatch drawer if not "fuzzy"
means we always "cut" cyan pixels, like opengl
2026-03-28 16:40:08 +01:00
alufolie91 5d9706e700 software: make R_DrawWallColumn able to render "holey" textures
horrific, but seems to work....
2026-03-28 10:37:55 +01:00
alufolie91 33d4cb81d6 software:dont use column flushers for multipatch columns
prelim for smth
hope this does not break anything, i honestly forgor how this crap works lmao
2026-03-28 10:25:09 +01:00
alufolie91 4287510e03 remove columncontext global
we dont use it for anything
2026-03-28 10:24:21 +01:00
alufolie91 6a1c907aa4 bunch of random fixes
-handle more memory allocation failures
-fix null pointer dereferences
-prevent writing out of bounds while writing filenames for D_ParseFileneeded
-prevent reading out of bounds while checking for new target in director
-fix Update_MS checking against an unitialized value in some cases
-fix assert for AddLumpToCache since strlen on non null terminated strings is UB
-cleanup and rearrange R_DrawColumn
-cleanup musicdef parser a little

all in one commit cause idk would be ugly if those were seperate ig
2026-03-28 00:45:15 +01:00
alufolie91 a1ae695c08 bunch of random fixes
-handle more memory allocation failures
-fix null pointer dereferences
-prevent writing out of bounds while writing filenames for D_ParseFileneeded
-prevent reading out of bounds while checking for new target in director
-fix Update_MS checking against an unitialized value in some cases
-fix assert for AddLumpToCache since strlen on non null terminated strings is UB
-cleanup and rearrange R_DrawColumn
-cleanup musicdef parser a little

all in one commit cause idk would be ugly if those were seperate ig
2026-03-28 00:44:48 +01:00
indev fded8cc562 Crash fix for super tiny resolutions
Not really sure if anyone would actually want to play on something that
is lower than 320x200 but this prevents zero division in V_Recalc at least
2026-03-27 22:05:11 +03:00
alufolie91 43465c0e3f add debug print for fallback flashpals 2026-03-26 18:29:46 +01:00
alufolie91 5828cc51f5 add debug print for fallback flashpals 2026-03-26 18:29:31 +01:00
alufolie91 e7cfac5dec hw_bsp:fixes, cleanups, optimizations
- disable POLYTILE, since it does not bring any benefit and causes smaller visual issues (see silvercloud island)
- optimize find_close_polyvertex for debug/O0 builds
- add fallback case for portal and horizonline checks if cv_glpolyshape == 0
2026-03-25 22:24:44 +01:00
alufolie91 7fb21c35ba Experiment: speed up CV_FindVar and CV_FindNetVar
oftentimes lua scripts call CV_FindVar a fuckton of times during runtime, with many cvars this can actually tank performance more than one might think
ideally lua scripts should cache the result, but with so much stuff and servers we cant expect everyone to go through all scripts to do that
using a hashtable for CV_FindNetVar might improve join times aswell, but needs further testing to confirm
2026-03-25 19:35:20 +01:00
alufolie91 f6a0430a40 use constructor for W_Startup
never liked having this inside i_system
2026-03-25 19:35:17 +01:00
alufolie91 ab209448d1 Introduce GNU constructor and destructor attributes
The constructor attribute causes the function to be called automatically before execution enters main (). Similarly, the destructor attribute causes the function to be called automatically after main () has completed or exit () has been called. Functions with these attributes are useful for initializing data that will be used implicitly during the execution of the program.

added "used" attribute aswell so compiler does not omit non referenced functions (i hope)
gotta test this a bit but seems cool for stuff like verstable maps
2026-03-25 19:35:14 +01:00
alufolie91 9334b86f6e console print for playing demos from replayhut
might be useful
perhaps this should be put into g_doplaydemo instead?
2026-03-25 19:34:56 +01:00
alufolie91 6022966d69 G_DoPlayDemo: fix demoname becoming garbage when replay restarts/rewinds
only used in the error paths, which we shouldnt reach
but im not a fan of having a chance of putting garbo in the console
2026-03-25 19:34:54 +01:00
alufolie91 2127b08e05 console print for playing demos from replayhut
might be useful
perhaps this should be put into g_doplaydemo instead?
2026-03-25 19:32:42 +01:00
alufolie91 43d2ad7b78 G_DoPlayDemo: fix demoname becoming garbage when replay restarts/rewinds
only used in the error paths, which we shouldnt reach
but im not a fan of having a chance of putting garbo in the console
2026-03-25 19:28:29 +01:00
alufolie91 fbc46f0b23 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2026-03-25 19:09:13 +01:00
indev 6c7db705c7 Strip colors from demo titles for replay search 2026-03-25 21:05:39 +03:00
alufolie91 c13161d156 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2026-03-25 18:26:43 +01:00
indev ce3d17de68 Simplify R_DoPlayerFade crash fix a bit and rename playerdist to otherplayerdist 2026-03-25 20:24:37 +03:00
alufolie91 404d88a536 remove some dead code 2026-03-24 01:07:07 +01:00
alufolie91 b351dd643f remove some dead code 2026-03-24 01:06:50 +01:00
indev 4f28f574bb Fix rare crash in R_DoPlayerFade when viewplayerdist is too low 2026-03-24 00:20:28 +03:00
alufolie91 2a8b21c052 Experiment: speed up CV_FindVar and CV_FindNetVar
oftentimes lua scripts call CV_FindVar a fuckton of times during runtime, with many cvars this can actually tank performance more than one might think
ideally lua scripts should cache the result, but with so much stuff and servers we cant expect everyone to go through all scripts to do that
using a hashtable for CV_FindNetVar might improve join times aswell, but needs further testing to confirm
2026-03-23 21:05:39 +01:00
alufolie91 5ebbf32731 use constructor for W_Startup
never liked having this inside i_system
2026-03-23 20:39:16 +01:00
alufolie91 78545cfb99 Introduce GNU constructor and destructor attributes
The constructor attribute causes the function to be called automatically before execution enters main (). Similarly, the destructor attribute causes the function to be called automatically after main () has completed or exit () has been called. Functions with these attributes are useful for initializing data that will be used implicitly during the execution of the program.

added "used" attribute aswell so compiler does not omit non referenced functions (i hope)
gotta test this a bit but seems cool for stuff like verstable maps
2026-03-23 20:38:21 +01:00
alufolie91 654895dcff fix timedemo not accounting for level and addon loading
apparently demos used to send a mapcmd before instead of directly calling G_InitNew, so this function was never called which meant that timedemos always returned a wrong result first time
2026-03-23 19:05:37 +01:00
alufolie91 0b5282f956 fix timedemo not accounting for level and addon loading
apparently demos used to send a mapcmd before instead of directly calling G_InitNew, so this function was never called which meant that timedemos always returned a wrong result first time
2026-03-23 19:04:44 +01:00
alufolie91 8af43a55c9 split CONS_Printf
so both CONS_Alert and CONS_Debug dont have to handle and copy the varargs twice
probably makes no actual difference in practice, but i prefer it to not do pointless work
2026-03-22 22:29:21 +01:00
alufolie91 4f1762b694 split CONS_Printf
so both CONS_Alert and CONS_Debug dont have to handle and copy the varargs twice
probably makes no actual difference in practice, but i prefer it to not do pointless work
2026-03-22 22:29:10 +01:00
alufolie91 0d20ebb01f delet P_CyclePlayerMobjState
P_SetMobjState already handles player case and forwards it to P_SetPlayerMobjState
so this is just duped code
2026-03-22 22:17:45 +01:00
alufolie91 40701988e2 delet P_CyclePlayerMobjState
P_SetMobjState already handles player case and forwards it to P_SetPlayerMobjState
so this is just duped code
2026-03-22 22:17:36 +01:00
alufolie91 538bc2774e Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2026-03-22 22:15:46 +01:00
alufolie91 1c74b37026 unify console shift handling
both the non AZERTY and AZERTY functions basically did the exact same thing so can just get rid of one
also simplify some checks
2026-03-22 22:14:19 +01:00
alufolie91 bfd5d35191 Merge remote-tracking branch 'origin/lugstuff' into lugstuff 2026-03-22 22:13:45 +01:00
alufolie91 f764448c44 unify console shift handling
both the non AZERTY and AZERTY functions basically did the exact same thing so can just get rid of one
also simplify some checks
2026-03-22 22:13:37 +01:00
indev 6721f534cc Fix Got_Saycmd not skipping null terminator when message has maximum length 2026-03-22 22:16:55 +03:00
indev bb3414d603 Fix /pm and emote suggestions overlapping 2026-03-21 23:10:48 +03:00
alufolie91 b6b7bae8c5 h 2026-03-21 04:07:23 +01:00
alufolie91 e4cd9b6cc6 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2026-03-19 06:12:35 +01:00
indev e13cb1ca92 Remove few remaining flashpal things in opengl menu 2026-03-17 19:00:38 +03:00
Alug 28681ca018 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2026-03-17 03:38:04 +01:00
Alug fda5448e6c Merge remote-tracking branch 'origin/Saturn-Testing' into lugstuff 2026-03-17 03:37:47 +01:00
indev a0dffd0670 Fix listemotes calculating incorrect number of pages 2026-03-16 04:07:48 +03:00
Alug 7684e6aa07 Blua: opcode OP_SELF operate only with string keys, so they can use fast-track table access
https://github.com/lua/lua/commit/cb3d5dce30089512085f78a0bef79e30ef732e30
2026-03-15 18:19:06 +01:00
Alug 0fb752b745 Blua: OP_SELF can use 'luaV_fastget' specialized for strings, as it is applied only to string keys
https://github.com/lua/lua/commit/257961c601fdec1ea1f9640d460e0d31c39333a1
2026-03-15 18:19:03 +01:00
Alug c418fe3ef8 Blua: 'luaV_fastget' only treats the real fast case (table with a non-nil value at given key, so that it does not need to check metamethods)
https://github.com/lua/lua/commit/1a44e822009752513ce895b9eabc51a4ee4a195a
2026-03-15 18:18:59 +01:00
Alug fdccc80260 Blua: 'Protect' in table operations is not needed in the fast track
https://github.com/lua/lua/commit/df8b996bccd3830d6fe9d7ba80e8fccd6ac3cabf
2026-03-15 18:18:57 +01:00
Alug 84be9096b1 Blua: fast track for 'settable'
https://github.com/lua/lua/commit/3b795541c488c7e633567897c9112312007a20a0
https://github.com/lua/lua/commit/b91bc93fd33f2158745b37c9e091c6fa4d1a4fd5

had to adjust some things, hope this doesent explode lmao
2026-03-15 18:18:54 +01:00
Alug e4e51f0f80 Blua: implementation of fast track for gettable operations
https://github.com/lua/lua/commit/e247c3ada3ff47a1352927e797263137f4e02e0e

lets hope i converted this properly lul
2026-03-15 18:18:51 +01:00
Alug 31a0433255 Blua: opcode OP_SELF operate only with string keys, so they can use fast-track table access
https://github.com/lua/lua/commit/cb3d5dce30089512085f78a0bef79e30ef732e30
2026-03-15 18:04:41 +01:00
Alug 7aa4bd6990 Blua: OP_SELF can use 'luaV_fastget' specialized for strings, as it is applied only to string keys
https://github.com/lua/lua/commit/257961c601fdec1ea1f9640d460e0d31c39333a1
2026-03-15 18:04:02 +01:00
Alug 019812db08 Blua: 'luaV_fastget' only treats the real fast case (table with a non-nil value at given key, so that it does not need to check metamethods)
https://github.com/lua/lua/commit/1a44e822009752513ce895b9eabc51a4ee4a195a
2026-03-15 18:02:58 +01:00
Alug 537a50b9b3 Blua: 'Protect' in table operations is not needed in the fast track
https://github.com/lua/lua/commit/df8b996bccd3830d6fe9d7ba80e8fccd6ac3cabf
2026-03-15 17:59:44 +01:00
Alug bdae0ef4ae Blua: fast track for 'settable'
https://github.com/lua/lua/commit/3b795541c488c7e633567897c9112312007a20a0
https://github.com/lua/lua/commit/b91bc93fd33f2158745b37c9e091c6fa4d1a4fd5

had to adjust some things, hope this doesent explode lmao
2026-03-15 17:56:27 +01:00
Alug 211153aac0 Blua: implementation of fast track for gettable operations
https://github.com/lua/lua/commit/e247c3ada3ff47a1352927e797263137f4e02e0e

lets hope i converted this properly lul
2026-03-15 17:49:31 +01:00
alufolie91 8897c4ddfd wipe this 2026-03-15 17:45:34 +01:00
alufolie91 7c0f296fcf testing branch 2026-03-13 19:14:01 +01:00
indev 11f78bc21f Allocate all colormaps with PU_STATIC 2026-03-13 19:13:27 +01:00
alufolie91 b84e3cdb7c Merge remote-tracking branch 'origin/addon-download-info' into Saturn-Testing 2026-03-13 19:13:22 +01:00
alufolie91 e551c1c1ff Merge branch 'bluaopti2' into Saturn-Testing 2026-03-13 19:12:58 +01:00
alufolie91 9cadd991f9 Merge branch 'vidmodestuff' into Saturn-Testing 2026-03-13 19:12:54 +01:00
Alug 9087fd8377 lua hooklib: use NUMMOBJTYPES to detect mobj hooks
removes the "force_mobj" field, gives a suprising perf boost from my timedemo testing +6-7fps (164 - 169/170fps)
this does however will prevent the generic hook from being called if the mobj being passed ever should be NULL
This shouldnt ever happen, vanilla assumes this aswell and way worse things would happen there, but just wanted to note
2026-03-13 19:09:38 +01:00
Alug 1aa37be676 p_user: cache kartspeed value within P_3dMovement
its result shouldnt change there, so no need to always recompute stuff, even if its not heavy work
2026-03-13 19:09:26 +01:00
Alug 04f63b23ff software: hack for bogus height walls
as per comment, this is merely a shitty workaround for a chain reaction of bad fixed point maths
since im honestly not feeling like rewriting most of the software renderer to either operate on 64bit or float maths, we just skip drawing anything that seems completely unreasonable
2026-03-13 19:09:18 +01:00
Alug d6ed923f83 P_XYMovement: check for kart specific stuff first to determine friction apply
this stuff is much more common than the other stuff being checked, so more likely to return earlier and save a bunch of other checks
2026-03-13 19:09:08 +01:00
Alug c7845118c0 explicitly cast those 2026-03-13 19:08:50 +01:00
alufolie91 ffc6adde4c Merge branch 'servaddonsonly' into Saturn-Next 2026-03-13 19:08:21 +01:00
alufolie91 fed7020da1 hash_sparse: change length checks
dont early return on 0 len, let it be the falltrough case, this seems to help branch prediction
2026-03-13 18:58:49 +01:00
alufolie91 1a4255d9df luaS_newlstr: use hash also for checking strings
taken from raptorjit
we can check the hash first to skip quite a bunch of memcmps which should be faster in most cases (hopefully but quick timedemo tests confirmed that)
2026-03-13 18:58:39 +01:00
alufolie91 f6ead71f0c blua: handle 0 length strings in hash_sparse 2026-03-13 18:58:31 +01:00
Alug 966f60f590 Experiment: replace lua´s string hash with luajits ARX hash
the string hashing was the most hit and most spent in part of the whole game in alot of cases
replacing it with luajits algo absolutely massively improves lua performance (10-15fps in my bench timedemos!)
however idk how all this stuff exactly works so this needs alot of testing to make sure nothing breaks
ive rewritten the unaligned ptr access slightly to use memcpy for safety with some platforms that require stricter alignment
2026-03-13 18:58:21 +01:00
alufolie91 9afc018a45 Avoid computing invalid addresses
luaV_execute should compute 'ra' only when the instruction uses it.
Computing an illegal address is undefined behavior even if the address
is never dereferenced.
2026-03-13 18:58:05 +01:00
Alug 43608810da lua branching hint stuff
rechecked against lua 5.4
2026-03-13 18:56:18 +01:00
Alug 90b5f9050a Blua: small optimization in luaL_addlstring (avoid adding chars one by one)
https://github.com/lua/lua/commit/f292760f12022a83cf01e788482a264aeeb3c276
2026-03-13 18:55:55 +01:00
Alug edc10a35a1 Blua: better names for metamethods in debug information
https://github.com/lua/lua/commit/becf19feeffeb0bf2297e163da4ccc7b4b5e6b5c
2026-03-13 18:55:49 +01:00
Alug 91435fe1b2 Blua: small optimization (reorder of BinOpr enum to unify some cases in switches)
https://github.com/lua/lua/commit/d7872dcf91eb2075312a03973a6cdb489610c796
2026-03-13 18:55:42 +01:00
Alug a7ebc7e745 Blua: micro-optimization: avoid one API call in 'read_chars'
https://github.com/lua/lua/commit/f86f4116c82654d24faa4a32a909d0c27f3d4746
2026-03-13 18:55:37 +01:00
alufolie91 3cf3c1bb99 Merge pull request #219 from Indev450/netstuff
Netcode fixes, cleanups and optimizations
2026-03-13 18:45:18 +01:00
alufolie91 2c170f1956 Merge pull request #217 from Indev450/optimizewadlumps
Optimze Wad Lumps
2026-03-13 18:21:50 +01:00
indev ce0bddcbec Add toggle for server addon info 2026-03-11 17:26:12 +03:00
alufolie91 37923deda2 Port the updated OpenGL map preprocessor from Doom-Legacy
"this fixes numerous issues with holes in map geometry, misplaced sectors/planes, rare infinite loop hangs"
ive had ported this before but deemed it to be too slow, gonna test here again now that i also had ported it to blankart to fix udmf map rendering issues
needs some testing
2026-03-10 16:58:32 +01:00
alufolie91 98da654e02 Fix P_MakeMapMD5 printing incorrect time
:chonkbuncle:
2026-03-10 16:55:54 +01:00
alufolie91 af84105e40 better error for nodeless maps 2026-03-10 16:55:51 +01:00
alufolie91 9cd25eca1a better error for nodeless maps 2026-03-10 16:55:20 +01:00
alufolie91 5113ae6a74 Fix P_MakeMapMD5 printing incorrect time
:chonkbuncle:
2026-03-10 16:54:42 +01:00
alufolie91 7b5daf7cc8 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2026-03-10 16:39:27 +01:00
indev 9af6fc3b33 Display information about addon types loaded on server when joining (WIP) 2026-03-10 02:27:36 +03:00
alufolie91 95d68dd2a2 hw_main: reduce some code dupe
since this already is ceepeepee can just make use of lambdas to reduce a bit of duplicated code
hope i didnt miss anything there
2026-03-09 20:56:07 +01:00
indev 0c888509ff Hide offroad particles when player is doing saltyhop 2026-03-09 16:58:10 +01:00
alufolie91 6aa67c623e hw_main: make HWR_SkyWallList_Add realloc check a little safer
stuff like that should always be checked per equals/greater than just equals
in practice this shouldnt have caused any issues but its just better practice to check for greater
2026-03-09 16:58:05 +01:00
indev a1666704e5 Hide offroad particles when player is doing saltyhop 2026-03-09 14:53:30 +03:00
alufolie91 ae63763490 Revert "massive cleanup player related dead code"
This reverts commit 890a5810ae.
2026-03-03 18:40:06 +01:00
alufolie91 7b408a33d7 fix openmpt versions strings leaking
from https://lib.openmpt.org/doc/libopenmpt_c_overview.html "All strings returned from libopenmpt are dynamically allocated and must be freed with openmpt_free_string()."
didnt knew this tbh lol
2026-03-03 02:32:13 +01:00
alufolie91 9ee535066e OpenGL: initialize all FSurfaceInfo´s
seen this a bunch of times now that occasionally something tries to access uninit values from a surface info
since those are really small we just always init them now
2026-03-03 02:31:54 +01:00
alufolie91 dd6a1ffca2 OpenGL: initialize all FSurfaceInfo´s
seen this a bunch of times now that occasionally something tries to access uninit values from a surface info
since those are really small we just always init them now
2026-03-03 02:31:32 +01:00
alufolie91 878c8fbacc fix openmpt versions strings leaking
from https://lib.openmpt.org/doc/libopenmpt_c_overview.html "All strings returned from libopenmpt are dynamically allocated and must be freed with openmpt_free_string()."
didnt knew this tbh lol
2026-03-03 02:19:29 +01:00
alufolie91 1c435ad6ae Revert "Add ASAN memory poisoning checks"
This reverts commit a7ad32f606.
2026-03-03 01:45:03 +01:00
indev c76e378490 Allocate all colormaps with PU_STATIC 2026-03-03 03:24:08 +03:00
alufolie91 6430150b63 fix parts of png info text for screenshots not being null terminated in some cases 2026-03-02 17:53:24 +01:00
alufolie91 251ad613de fix parts of png info text for screenshots not being null terminated in some cases 2026-03-02 17:53:16 +01:00
alufolie91 16cf4ede89 v_video: generate missing flashpals instead
not sure if this is more sane than the huge ass array from before
but atleast this is more accurate and can basically generate flashpals from any palette while also still working with all the colour and gamma adjustments
prob needs some cleanup idk this is all rather messy lol
2026-03-02 17:23:11 +01:00
alufolie91 4cecd36c64 v_video: generate missing flashpals instead
not sure if this is more sane than the huge ass array from before
but atleast this is more accurate and can basically generate flashpals from any palette while also still working with all the colour and gamma adjustments
prob needs some cleanup idk this is all rather messy lol
2026-03-02 17:22:54 +01:00
alufolie91 efe8732188 fix flashpals throwing random garbage into the renderer in some cases
iirc, if the provided palette currently in use did not provide subpalettes, this will read past the bounds of allocated memory, which aint good lol
i just dumped the white flashpal and threw it into there since idk if -file or autoload gets called before the palette gets initialised, which would carry a risk of copying more garbage, hence this big ass array
2026-03-02 00:44:10 +01:00
alufolie91 e447e298c3 fix flashpals throwing random garbage into the renderer in some cases
iirc, if the provided palette currently in use did not provide subpalettes, this will read past the bounds of allocated memory, which aint good lol
i just dumped the white flashpal and threw it into there since idk if -file or autoload gets called before the palette gets initialised, which would carry a risk of copying more garbage, hence this big ass array
2026-03-02 00:43:33 +01:00
alufolie91 07fc0eb03a v_video: fix cv_palettenum bounds check
mhhm yeah
2026-03-02 00:35:19 +01:00
X.organic f2b46fd148 Fix myhashfgets-related buffer overflows in deh_soc.c 2026-03-02 00:35:16 +01:00
alufolie91 8247133966 w_wad: use strnlen to check lump length for map marker
lump name may not be null terminated here, so strlen may read out of bounds garbo
using strnlen ensures we read max 8 characters which is the name buffer size
2026-03-02 00:35:13 +01:00
alufolie91 397fb071e5 fix compiling with valgrind support 2026-03-02 00:35:11 +01:00
alufolie91 356d28b0fe v_video: fix cv_palettenum bounds check
mhhm yeah
2026-03-02 00:34:58 +01:00
Gustaf Alhäll a7ad32f606 Add ASAN memory poisoning checks 2026-03-01 22:03:25 +01:00
X.organic 0faf56ea06 Fix myhashfgets-related buffer overflows in deh_soc.c 2026-03-01 21:37:52 +01:00
alufolie91 9b53a4e87f w_wad: use strnlen to check lump length for map marker
lump name may not be null terminated here, so strlen may read out of bounds garbo
using strnlen ensures we read max 8 characters which is the name buffer size
2026-03-01 21:32:25 +01:00
alufolie91 bea274dbd8 fix compiling with valgrind support 2026-03-01 21:24:09 +01:00
alufolie91 60ee34734c Autoload: dont attempt to load directories
lol
2026-03-01 13:48:30 +01:00
alufolie91 e30a87b4fc D_AutoloadFile: add overflow safeguard 2026-03-01 13:48:26 +01:00
alufolie91 2dff538ee5 Autoload: fix incorrectly incrementing wad count
those should only be incremented if we actually add something to the filearray and not instantly execute or error out
2026-03-01 13:48:21 +01:00
alufolie91 1a9fa94cbd Autoload: dont attempt to load directories
lol
2026-03-01 01:04:14 +01:00
alufolie91 e8c7cc6a9b D_AutoloadFile: add overflow safeguard 2026-03-01 01:04:14 +01:00
alufolie91 5ca3ab5966 Autoload: fix incorrectly incrementing wad count
those should only be incremented if we actually add something to the filearray and not instantly execute or error out
2026-03-01 01:04:14 +01:00
alufolie91 c8e313865b Autoload: dont add wads that contain maps 2026-03-01 00:32:00 +01:00
indev 1cf04514b3 Fix W_MakeFileMD5 printing incorrect time 2026-03-01 02:31:11 +03:00
alufolie91 5577ba4c7a Autoload: dont add wads that contain maps 2026-03-01 00:03:19 +01:00
alufolie91 5d2b2d5fcd idk where this went lol 2026-02-28 18:32:45 +01:00
alufolie91 b198229ba5 delet this 2026-02-26 14:54:38 +01:00
alufolie91 890a5810ae massive cleanup player related dead code
huge amount of things in player struct and stuff related to it were basically unused
since those are technically exposed to lua and such this sure wont make it into the next saturn release
and needs a good amount of testing, if it ever makes the cut lol
prob messed stuff up somewhere but lul
2026-02-26 14:53:50 +01:00
alufolie91 6ff1cbf4b0 ok actually just remove keepmusic resume stuff
well now it just broke with dynmusic
this sucks, its probably fixable but the code was abysmal so shrug
2026-02-26 01:11:37 +01:00
alufolie91 c0697228ff ok actually just remove keepmusic resume stuff
well now it just broke with dynmusic
this sucks, its probably fixable but the code was abysmal so shrug
2026-02-26 01:11:03 +01:00
alufolie91 db4cd73912 fix keepmusic resuming not resetting with "tunes" command
this code sucks ass wtf was i cooking
if this breaks again i will just wipe it lmao
2026-02-26 01:05:18 +01:00
alufolie91 5249cb9a76 fix keepmusic resuming not resetting with "tunes" command
this code sucks ass wtf was i cooking
if this breaks again i will just wipe it lmao
2026-02-26 01:05:08 +01:00
alufolie91 3c70598aea lumpnumcache: W_LumpExists should return true or false
whoops was oversight by me
prob doesent really matter due to wraparound but its still incorrect
2026-02-25 22:38:46 +01:00
alufolie91 bd819181ae lumpnumcache: W_LumpExists should return true or false
whoops was oversight by me
prob doesent really matter due to wraparound but its still incorrect
2026-02-25 22:38:36 +01:00
alufolie91 1ec29c1c94 better flags for ASAN and UBSAN
compile with -O1 and -fno-omit-frame-pointer
-fno-common for ASAN
2026-02-25 21:30:23 +01:00
alufolie91 d69f2f3abb better flags for ASAN and UBSAN
compile with -O1 and -fno-omit-frame-pointer
-fno-common for ASAN
2026-02-25 21:27:02 +01:00
alufolie91 fedccd25b9 hw_cache: use verstable for HWR_PrecacheLevelFlats flatchecks + convert to C
replaces the unordered_set and doesent require c++
2026-02-25 18:04:45 +01:00
alufolie91 1e51365cad add comment about K_KartUpdatePosition 2026-02-25 17:45:07 +01:00
alufolie91 94026e4331 makefile: comment out all the "Wno" flags
we effectively fixed all of them, so this does not throw any warnings for me atleast
in case we may screw up id rather have those warnings appear
2026-02-25 17:45:05 +01:00
alufolie91 2e699ab7a4 makefile: comment out all the "Wno" flags
we effectively fixed all of them, so this does not throw any warnings for me atleast
in case we may screw up id rather have those warnings appear
2026-02-25 17:44:56 +01:00
alufolie91 3196face09 add comment about K_KartUpdatePosition 2026-02-25 17:43:08 +01:00
alufolie91 93731888ca remove dumbass K_KartUpdatePosition bug preserving optimization
this is ugly as hell, all since the original code has a bug for whichever player is last checking against itself kek
2026-02-25 17:28:55 +01:00
alufolie91 c29d380aa1 hw_md2: remove pointless float casts
durs and tics are int32.
and so is var2, anim_duration is uint16 but that still makes no sense lul
2026-02-25 17:10:36 +01:00
alufolie91 2084cdc6d5 hw_md2: remove pointless float casts
durs and tics are int32.
and so is var2, anim_duration is uint16 but that still makes no sense lul
2026-02-25 17:10:24 +01:00
alufolie91 1b22c3af19 those should be boolean
just for correctness!
2026-02-25 16:52:47 +01:00
alufolie91 df70c4072c those should be boolean
just for correctness!
2026-02-25 16:52:39 +01:00
alufolie91 3e327263c9 fix faulty papersprite flipping in opengl
lol
2026-02-25 16:46:58 +01:00
alufolie91 7c24d92613 delet V_GetSkincolorChar
this was unused and broken anyways
think this came from snowy kart or smth
2026-02-25 16:46:55 +01:00
alufolie91 ef2269774a fix faulty papersprite flipping in opengl
lol
2026-02-25 16:46:37 +01:00
alufolie91 85357fbf03 delet V_GetSkincolorChar
this was unused and broken anyways
think this came from snowy kart or smth
2026-02-25 16:45:17 +01:00
alufolie91 98a78ec18e FORCEINLINE is apparently used by windows already lmao 2026-02-24 16:13:11 +01:00
alufolie91 ba808307e9 FORCEINLINE is apparently used by windows already lmao 2026-02-24 16:10:54 +01:00
alufolie91 014a22e933 w_wad: replace unordered_map with verstable hashmap for lumpnumcache + convert back to C from C++
been rethinking this and been doing some digging online
the unordered_map was just a quick and simple fix for performance issues in blan, but came with caveats:
- unordered_map is simple to use but not particulary great in terms of performance during lookups especially
- we needed to convert w_wad to c++ just for the lumpnumcache
- due to needing to preserve the key since they gotta outlive the scope of the function that inserts things into the map, we effectively did a string copy on each map insert and lookup
after some research came across verstable, which is basically almost the exact same as unordered map but in C while being extremely fast (even more with its builtin string hash and comparisor)
only caveat with verstable is we need to rely on a new lib, though its just a single header file, and we gotta manage ensuring the input keys outlive functionscope ourselves, which we do with strdup in this case
good thing, verstable allows to call a "destructor" specified by us whenever it removes or replaces keys in the map
this also means we only need to copy strings on insert and not on lookup anymore
all in all this is much faster while giving us the simple usage of c++ unordered_map while staying in C

due to the strdup quirk i had to slightly modify verstable to allow to take const as inputs for the getter functions even if the keys themselves are not const marked with "KEY_GET_CONST"

Verstable can be found here: https://github.com/JacksonAllan/Verstable
and is licensed under MIT which is perfect!
2026-02-24 16:06:27 +01:00
alufolie91 3f3ba9e993 Merge branch 'Saturn-Next' into optimizewadlumps 2026-02-24 15:54:47 +01:00
indev e05ce8202d Move -Waggregate-return suppression inside verstable.h 2026-02-24 17:54:07 +03:00
alufolie91 86e7cd85e0 force inline all that stuff
rather do this than supressing inline failures from compiler lol
2026-02-24 15:53:09 +01:00
indev 5164722cd1 Suppress -Waggregate-return here 2026-02-24 17:38:32 +03:00
alufolie91 6e2f485b50 move W_Startup to I_StartupSystem
this needs to be init as early as possible before anything may call W_CheckNumForName
2026-02-24 15:31:59 +01:00
alufolie91 e3d4ca268a bruh pls 2026-02-24 15:22:47 +01:00
alufolie91 39408c3623 hw_cache: use verstable for flat precache checking + convert back to C 2026-02-24 15:11:33 +01:00
alufolie91 7b2e28ef84 w_wad: replace unordered_map with verstable hashmap for lumpnumcache + convert back to C from C++
been rethinking this and been doing some digging online
the unordered_map was just a quick and simple fix for performance issues in blan, but came with caveats:
- unordered_map is simple to use but not particulary great in terms of performance during lookups especially
- we needed to convert w_wad to c++ just for the lumpnumcache
- due to needing to preserve the key since they gotta outlive the scope of the function that inserts things into the map, we effectively did a string copy on each map insert and lookup
after some research came across verstable, which is basically almost the exact same as unordered map but in C while being extremely fast (even more with its builtin string hash and comparisor)
only caveat with verstable is we need to rely on a new lib, though its just a single header file, and we gotta manage ensuring the input keys outlive functionscope ourselves, which we do with strdup in this case
good thing, verstable allows to call a "destructor" specified by us whenever it removes or replaces keys in the map
this also means we only need to copy strings on insert and not on lookup anymore
all in all this is much faster while giving us the simple usage of c++ unordered_map while staying in C

due to the strdup quirk i had to slightly modify verstable to allow to take const as inputs for the getter functions even if the keys themselves are not const marked with "KEY_GET_CONST"

Verstable can be found here: https://github.com/JacksonAllan/Verstable
and is licensed under MIT which is perfect!
2026-02-24 15:10:42 +01:00
alufolie91 2f684bba95 ensure SIGINT/SIGTERM can quit out from wipes and serverconnection ticker 2026-02-24 12:34:21 +01:00
alufolie91 f3c6f53f1e ensure SIGINT/SIGTERM can quit out from wipes and serverconnection ticker 2026-02-24 12:34:11 +01:00
indev a287a6419f Use strncpy for zip entry filename because it might not be null-terminated inside zip 2026-02-23 22:53:23 +03:00
indev 8c33489441 Use strncpy for zip entry filename because it might not be null-terminated inside zip 2026-02-23 22:43:03 +03:00
alufolie91 6f2aba7ee3 Windows is such a cool Operating System
idk why we just dont use int32 there aswell and rely on whatever tf windows supplies which i dont trust ffs
2026-02-23 18:17:40 +01:00
alufolie91 8dd09f2095 Windows is such a cool Operating System 2026-02-23 18:10:05 +01:00
alufolie91 a9a0d4bed8 fix compiler warnings for glibc 2.43 and newer
this version changed so that many standard functions now propagate the constness of its input pointers
to not cause warnings for everyone on older versions this is now a really dumb macro lol
2026-02-23 17:58:53 +01:00
alufolie91 355c78e075 check for _GNU_SOURCE for nongnu_strcasestr
idk we dont need it and it throws warnings on new glibc so i dont want it tbh
2026-02-23 17:58:50 +01:00
alufolie91 4623f8aff2 explicitly set "std=gnu17"
we *rely* on a bunch of gnu extensions so its better to explicitly set this
yes in theory we fully comply with c23/gnu23 and saturn compiles fine under that, but since its still fairly new theres alot of maschines that still dont support it :chaosleep:
2026-02-23 17:58:36 +01:00
alufolie91 fa06d6ecec explicitly set "std=gnu17"
we *rely* on a bunch of gnu extensions so its better to explicitly set this
yes in theory we fully comply with c23/gnu23 and saturn compiles fine under that, but since its still fairly new theres alot of maschines that still dont support it :chaosleep:
2026-02-23 17:56:41 +01:00
alufolie91 ab589592d5 fix compiler warnings for glibc 2.43 and newer
this version changed so that many standard functions now propagate the constness of its input pointers
to not cause warnings for everyone on older versions this is now a really dumb macro lol
2026-02-23 17:54:51 +01:00
alufolie91 2312445276 check for _GNU_SOURCE for nongnu_strcasestr
idk we dont need it and it throws warnings on new glibc so i dont want it tbh
2026-02-23 17:51:06 +01:00
indev 1265bbba2e Rename I_LockMutex back into I_lock_mutex for now 2026-02-23 19:14:14 +03:00
alufolie91 fdccf868cc disable player fade if viewplayer is spectator
fixes some wonky stuff like players disappearing when they were close to the invisible spectator player and you werent watching someone else
2026-02-23 17:09:32 +01:00
alufolie91 1b5b85d083 disable player fade if viewplayer is spectator
fixes some wonky stuff like players disappearing when they were close to the invisible spectator player and you werent watching someone else
2026-02-23 17:09:21 +01:00
alufolie91 3204b5c3b4 Merge branch 'Saturn-Next' into netstuff 2026-02-23 17:02:32 +01:00
alufolie91 cd02242a01 fix splitscreen clients being unable to join saturn servers
lmao oops idk dumb copy paste sry
2026-02-23 17:02:13 +01:00
alufolie91 324748385b fix splitscreen clients being unable to join saturn servers
lmao oops idk dumb copy paste sry
2026-02-23 17:01:14 +01:00
alufolie91 e35dc9e097 fix g_in_exiting_signal_handler
every "flag" set by signal handlers must be of type "volatile sig_atomic_t"
everything else may fail to be correctly set, read or get optimized away which rendered this basically useless
2026-02-23 16:20:48 +01:00
alufolie91 b78922a364 fix g_in_exiting_signal_handler
every "flag" set by signal handlers must be of type "volatile sig_atomic_t"
everything else may fail to be correctly set, read or get optimized away which rendered this basically useless
2026-02-23 16:19:41 +01:00
alufolie91 f4dc161831 dont let SIGINT/SIGTERM do work in signal handler take 2
the earlier approach still raised the default signal within this, which basically just skipped everything and ended up NOT calling I_Quit at all
Basically this is to ensure we dont call I_Quit at all from a signal handler as it is NOT async safe and can cause serious issues like deadlocks and such, instead SIGINT and SIGTERM will just signal the main loop/thread to safely call I_Quit instead
2026-02-23 16:01:14 +01:00
alufolie91 50b0f32abc dont let SIGINT/SIGTERM do work in signal handler take 2
the earlier approach still raised the default signal within this, which basically just skipped everything and ended up NOT calling I_Quit at all
Basically this is to ensure we dont call I_Quit at all from a signal handler as it is NOT async safe and can cause serious issues like deadlocks and such, instead SIGINT and SIGTERM will just signal the main loop/thread to safely call I_Quit instead
2026-02-23 16:00:56 +01:00
alufolie91 1d6c27baca lua_pushlstring: prefer luaS_newlstr over luaS_new
the latter calls strlen which is not needed as the empty string has no length
2026-02-22 14:01:27 +01:00
alufolie91 009df228d6 fix memory leak when fetching masterserver rules
strdup returns a malloc´d string!
2026-02-22 13:33:57 +01:00
alufolie91 7746e494cf fix memory leak within http masterserver handling
errbuf gets malloc´d!
2026-02-22 13:33:54 +01:00
alufolie91 90a88983f1 k_hud: make the hud offset vars static 2026-02-22 13:33:49 +01:00
alufolie91 22a4fe63db Fix minimap angle display colour for skins that use non default startcolor
i.e. they use a different colour than "green" to remap their skincolor on
2026-02-22 13:33:46 +01:00
alufolie91 b70b2bef71 fix memory leak when fetching masterserver rules
strdup returns a malloc´d string!
2026-02-22 13:33:10 +01:00
alufolie91 454e34c117 fix memory leak within http masterserver handling
errbuf gets malloc´d!
2026-02-22 13:32:04 +01:00
alufolie91 316b530141 k_hud: make the hud offset vars static 2026-02-22 13:28:48 +01:00
alufolie91 9e4be7e2c8 Fix minimap angle display colour for skins that use non default startcolor
i.e. they use a different colour than "green" to remap their skincolor on
2026-02-22 13:28:00 +01:00
alufolie91 d48df0d2fc luaS_newlstr: use hash also for checking strings
taken from raptorjit
we can check the hash first to skip quite a bunch of memcmps which should be faster in most cases (hopefully but quick timedemo tests confirmed that)
2026-02-22 01:57:34 +01:00
alufolie91 cf76a4c25a blua: handle 0 length strings in hash_sparse 2026-02-21 23:12:44 +01:00
alufolie91 7905c9d7ae test 2026-02-16 19:32:49 +01:00
Alug d77508f481 init superactions global
was missed before
2026-02-16 19:27:56 +01:00
Alug 53321d33d5 mark some nightsmode stuff with likely/unlikely i missed
and in some cases move around the conditionals
i love backwards compat Zzz....
2026-02-16 19:27:52 +01:00
Alug c140513a40 Revert "fix new compiler warnings from new gcc version"
This reverts commit c976699230.
2026-02-16 19:05:55 +01:00
Alug 5c28f6afd8 Revert "fix new compiler warnings from new gcc version"
This reverts commit d49001143f.
2026-02-16 19:04:51 +01:00
Alug 014d83278e init superactions global
was missed before
2026-02-15 18:07:50 +01:00
Alug 5fdc5c6be4 fix c23 compile 2026-02-12 18:42:17 +01:00
Alug aa36cf7f04 replace this with fastncmp 2026-02-12 18:42:08 +01:00
Alug 8d22674d10 mark some nightsmode stuff with likely/unlikely i missed
and in some cases move around the conditionals
i love backwards compat Zzz....
2026-02-12 18:41:53 +01:00
Alug d49001143f fix new compiler warnings from new gcc version
just throw const at everything :blobthumbsup:
2026-02-11 17:48:16 +01:00
Alug c976699230 fix new compiler warnings from new gcc version
just throw const at everything :blobthumbsup:
2026-02-11 17:47:58 +01:00
Alug 7bf6779595 Experiment: replace lua´s string hash with luajits ARX hash
the string hashing was the most hit and most spent in part of the whole game in alot of cases
replacing it with luajits algo absolutely massively improves lua performance (10-15fps in my bench timedemos!)
however idk how all this stuff exactly works so this needs alot of testing to make sure nothing breaks
ive rewritten the unaligned ptr access slightly to use memcpy for safety with some platforms that require stricter alignment
2026-02-11 17:02:20 +01:00
Roberto Ierusalimschy 505f9d1f3c Avoid computing invalid addresses
luaV_execute should compute 'ra' only when the instruction uses it.
Computing an illegal address is undefined behavior even if the address
is never dereferenced.
2026-02-11 13:54:12 +01:00
Alug 314351652c lua branching hint stuff
rechecked against lua 5.4
2026-02-11 13:44:18 +01:00
Alug 6115eec990 P_XYMovement: check for kart specific stuff first to determine friction apply
this stuff is much more common than the other stuff being checked, so more likely to return earlier and save a bunch of other checks
2026-02-10 16:43:34 +01:00
Alug 3cb7896bf8 p_user: cache kartspeed value within P_3dMovement
its result shouldnt change there, so no need to always recompute stuff, even if its not heavy work
2026-02-10 16:41:46 +01:00
Alug 513e5a7e3f remove even more dead code lol 2026-02-10 16:38:37 +01:00
Alug 0046c66f4e remove even more dead code lol 2026-02-10 16:38:11 +01:00
Alug 88537c18aa fix dedi build on lugstuff 2026-02-09 19:52:58 +01:00
Alug 6f75fab7ff move gamepad led ticker after render logic
this does not really matter but save a tiny little amount of time before rendering a frame
2026-02-09 19:41:45 +01:00
Alug f4326efbdd move gamepad led ticker after render logic
this does not really matter but save a tiny little amount of time before rendering a frame
2026-02-09 19:40:53 +01:00
Alug ddd8ad4c37 framelimiter changes
- cap fps after rendering but before blitting (helps in cases where rendering takes a long time)
- attempt to resync fpslimiter with ticking after fpscap change to fix phase issues and potential display lag

this is shit so 9.3 will not have any of this, sad!
2026-02-09 18:36:58 +01:00
Alug 38fc6d6ba1 remove screen texture toggle from accessability menu + new tooltip 2026-02-09 16:09:26 +01:00
Alug 02f2464a00 HWR_CreateBlendedTexture: init a bunch of stuff 2026-02-08 23:13:16 +01:00
Alug c84724da37 make lumpnumcache case sensitive + optimize + replace quickncase hash with FNV1a
lumpnumcache can be case sensitive W_CheckNumForName should also look for uppercase stuff and W_LumpExists is case sensitive anyways
this avoids having to always account for case (toupper/tolower) during hash and string comparisons and even allows us to even directly compare our strings instead of using fastcmp (std::strings allow this!)
from some benchmarking externally this makes this faster quite a bit
2026-02-08 20:35:08 +01:00
Alug 4b91f91ca5 make lumpnumcache case sensitive + optimize + replace quickncase hash with FNV1a
lumpnumcache can be case sensitive W_CheckNumForName should also look for uppercase stuff and W_LumpExists is case sensitive anyways
this avoids having to always account for case (toupper/tolower) during hash and string comparisons and even allows us to even directly compare our strings instead of using fastcmp (std::strings allow this!)
from some benchmarking externally this makes this faster quite a bit
2026-02-08 20:30:19 +01:00
Alug 86b286fb0b fix few more cases of using potentially uninitialized garbage 2026-02-06 20:06:56 +01:00
Alug b472458215 fix few more cases of using potentially uninitialized garbage 2026-02-06 20:03:54 +01:00
Alug ecef8913b1 remove some more dead code
as reported by clang-tidy
2026-02-06 17:06:33 +01:00
Alug 277b202020 hooklib: init all the hook states
idk i aint trusting any of this lul
2026-02-06 17:06:04 +01:00
Alug 51863b59aa Revert "software renderer: "address" an absolute silly amount of overflowing fixed point maths"
This reverts commit 755afd9f29.
2026-02-06 16:55:49 +01:00
Alug 764276b6fb Revert "r_segs: use fixed point clamp in more places"
This reverts commit 28a6bc09af.
2026-02-06 16:55:43 +01:00
Alug 8205caa467 Revert "address some more software overflows"
This reverts commit 8595917b23.
2026-02-06 16:55:32 +01:00
Alug 1a1a23b02e remove some more dead code
as reported by clang-tidy
2026-02-06 16:42:43 +01:00
Alug 6ba97bc43c only do the anim texture maths if we need it
idk why but this showed up during profiling
best would be just to redo the whole system since it sucks lol
2026-02-05 23:31:19 +01:00
Alug 28df08940a hooklib: init all the hook states
idk i aint trusting any of this lul
2026-02-05 23:31:04 +01:00
Alug 50f09a03c4 only do the anim texture maths if we need it
idk why but this showed up during profiling
best would be just to redo the whole system since it sucks lol
2026-02-05 21:00:54 +01:00
Alug 0fbde146a9 remove some unused fields from precipmobj_t
we do not have animating precip nor do we cast it to mobj_t anymore, so we can just get rid of this stuff
reducing the struct size by 16bytes wowie
2026-02-05 20:07:44 +01:00
Alug 16e0c6f0f6 dont constantly fetch lookback joyaxis in p_ticker if replay recording is enabled
minuscule optimization lul
2026-02-05 20:07:41 +01:00
Alug 33b1e0885d remove some unused fields from precipmobj_t
we do not have animating precip nor do we cast it to mobj_t anymore, so we can just get rid of this stuff
reducing the struct size by 16bytes wowie
2026-02-05 20:07:28 +01:00
Alug 6e5ad859d5 dont constantly fetch lookback joyaxis in p_ticker if replay recording is enabled
minuscule optimization lul
2026-02-05 18:25:13 +01:00
Alug 58b766b907 remove the loop condition for framelimiter
this was for an older iteration where it ran the loop until it hit the target per condition, keeping like this may cause issue if the loop exits per condition instead of the return block
now we return from within the loop
2026-02-04 14:22:58 +01:00
Alug 485aab845e software: hack for bogus height walls
as per comment, this is merely a shitty workaround for a chain reaction of bad fixed point maths
since im honestly not feeling like rewriting most of the software renderer to either operate on 64bit or float maths, we just skip drawing anything that seems completely unreasonable
2026-02-04 13:02:27 +01:00
Alug 8546d27c75 rewrite the framerate limiter
this completely rewrites the old simple sleep based limiter with
whatever tf i came up with at 2am
this almost completely gets rid of any jitter, stutter, uneven framepacing and missing the cap
it might be slightly less efficient due to busy waiting more, but so far it seems to be about the same
2026-02-04 12:31:32 +01:00
Alug 467ecf8224 fix adding bogus resolutions into the resolution list when setting a new defaultres
CV_SetValue will call the callbacks each, which means when it sets the width, the height cvar will not be updated yet, which most definitely will not be in the modelist, so it will add it regardless
2026-02-03 22:02:17 +01:00
Alug 3475ce3fbe fix adding bogus resolutions into the resolution list when setting a new defaultres
CV_SetValue will call the callbacks each, which means when it sets the width, the height cvar will not be updated yet, which most definitely will not be in the modelist, so it will add it regardless
2026-02-03 22:02:01 +01:00
Alug 8cab07a4b2 add missing "ifdef LOGMESSAGES" 2026-02-03 15:59:53 +01:00
Alug b8b0c1ebcf Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2026-02-03 15:57:59 +01:00
Alug 02de662ca3 add missing "ifdef LOGMESSAGES" 2026-02-03 15:39:58 +01:00
Alug 8595917b23 address some more software overflows 2026-02-02 20:03:25 +01:00
Alug bcfaf92f3e this only exists since sdl 2.0.18 not 2.0.14! 2026-02-02 18:14:21 +01:00
Alug 674e3ea9b7 z_zone: add asserts if zone memory functions are called from non main thread
also taken from srb2classic thanks!
2026-02-02 18:11:33 +01:00
Alug 7168c5e503 do not use Zone Memory for masterserver rules
this gets called from within non main threads!
zone memory is not thread safe!
2026-02-02 17:21:36 +01:00
Alug 0985229077 refactor i_thread stuff
based on https://codeberg.org/srb2classic/srb2classic/commit/3670a7c1c193185cf4921de8955c96e63fbecc62
and other things from srb2classic
this also now allows to check if a thread failed to spawn and reduces duped stuff and such
2026-02-02 16:54:40 +01:00
Alug 2455ae9218 plug a potential memory leak in M_SaveConfig 2026-02-02 16:11:41 +01:00
Alug 28a6bc09af r_segs: use fixed point clamp in more places
replaces the old overflow clamping since we now have a function for this purpose
2026-02-02 16:11:11 +01:00
Alug 34f004c172 hw_clip: replace "RoundToInt" with lrint
prefer to use standard lib functions if possible
lrint does the same thing (well ofc as long as no one touches the rounding direction löl) and is even quite a lot faster (though this is negligible in this case)
2026-02-02 16:10:15 +01:00
Alug c482335df2 delet all the Z_Free checks
Z_Free already checks its input internally!
2026-02-01 21:52:55 +01:00
Alug 755afd9f29 software renderer: "address" an absolute silly amount of overflowing fixed point maths
honestly be better to just completely switch over to 64bit maths, or even better floats....
this is mostly just bandaids but seems to make software more "visually stable"
2026-02-01 20:55:52 +01:00
Alug d04603da1a r_plane: fix visplane hashing overflowing
shift into "int" to prevent super large values during multiply
2026-02-01 18:25:03 +01:00
Alug aa9ffbe8cd "fix" overflow in R_InitViewMapping with high resolutions 2026-02-01 17:07:10 +01:00
Alug 9ac5754e1d fix a few type issues 2026-02-01 16:27:16 +01:00
Alug 00bc8bc149 limit addon only stuff to server info screen
quite honestly everything else is awful and i dont want to bother with it
2026-01-27 18:23:51 +01:00
Alug b5424d89a5 limit addon only stuff to server info screen
quite honestly everything else is awful and i dont want to bother with it
2026-01-27 18:23:44 +01:00
Alug 7e9a4a52d7 rename addonsonly variable to cl_addonsonly
very generic name so add the prefix for whatever cl means
2026-01-27 18:09:39 +01:00
Alug f12b55f63b rename addonsonly variable to cl_addonsonly
very generic name so add the prefix for whatever cl means
2026-01-27 18:08:12 +01:00
Alug 3e476d7658 implement allowing to load addons and gamestate only instead of joining server
really messy, needs some cleanup, not sure if this is good at all
2026-01-27 18:06:22 +01:00
Alug 7bf3493f58 addononly stuff 2026-01-27 17:59:47 +01:00
Alug 792bc11387 add "USEJEMALLOC" make flag to link against "jemalloc" allocator
on my linux system and usual benchmark setup this improves performance quite significantly
i currently have no real means to check how windows behaves, since this does not work with wine
2026-01-27 15:04:56 +01:00
Alug e94e5beabf lua hooklib: use NUMMOBJTYPES to detect mobj hooks
removes the "force_mobj" field, gives a suprising perf boost from my timedemo testing +6-7fps (164 - 169/170fps)
this does however will prevent the generic hook from being called if the mobj being passed ever should be NULL
This shouldnt ever happen, vanilla assumes this aswell and way worse things would happen there, but just wanted to note
2026-01-26 17:30:09 +01:00
Alug b5f0f6853a explicitly cast those 2026-01-25 13:23:12 +01:00
Alug 903a4cebd4 software: fix drawseg xrange item coord type being too small
both sprite and drawseg coords are int32
might fix some clipping issues
2026-01-23 18:32:31 +01:00
Alug 09bb0aed05 fix few more implicit double/float conversions 2026-01-23 18:27:22 +01:00
Alug 4bddf1118c wipe a bunch of crap 2026-01-23 10:07:13 +01:00
Alug 6301389546 ceeemake conflict 2026-01-23 09:55:00 +01:00
Alug 35f4ff47e9 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2026-01-23 09:50:38 +01:00
Alug 41802df348 add "vid.udup" same as vid.dup but not scaled with "highreshudscale" 2026-01-22 14:25:33 +01:00
Alug 422c480a69 opengl: attempt to scale vhs effect "fuzzyness"
this makes it appear the same in all resolutions, similar to software, while also improving performance quite a bit on higher resolutions
2026-01-22 14:18:06 +01:00
Alug a37b7858b0 try to make the downsample shader less blurry
still a bit funky but whatever lel
2026-01-22 13:27:02 +01:00
Alug 53dead76fd opengl: make vhs effect bars be affected by "fuzzines"
makes stuff slightly slower, but matches the software effect
2026-01-22 13:26:27 +01:00
Alug ede85975a5 opengl: tiny optimiazation for vhs effect
dont call rand within the loop, use xorshift instead
while not massive, we dont need to call rand thousands of times, the xorshift is visually indistinguishable
this is still rather slow due to the crapton of draw calls and should best be replaced by a shader or something
2026-01-22 13:26:26 +01:00
Alug 7aab407017 delet this 2026-01-21 21:36:23 +01:00
Alug f423515440 fix rng desynch caused by lib_pPlayRinglossSound
mfw using p_islocalplayer with prng
thisll still desynch vanilly clients but should fix desynchs between saturn clients, oh well
2026-01-21 21:30:52 +01:00
Alug 6cbb8a36cf Merge branch 'Saturn-Next' into netstuff 2026-01-21 20:48:47 +01:00
Alug 7dbb08315c fix cmake 2026-01-21 20:48:04 +01:00
Alug b1ff1bb531 Merge branch 'Saturn-Next' into optimizewadlumps 2026-01-21 20:47:44 +01:00
Alug 8eaf4a73f4 Merge branch 'Saturn-Next' into optimizewadlumps 2026-01-21 20:46:55 +01:00
Alug aed147fc1b Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2026-01-21 20:12:02 +01:00
Alug cbf4de0a29 joy_open: make debug prints actually print the player number 2026-01-21 19:53:49 +01:00
Alug 287bb2bf13 simplify LUA_Alloc
Z_Realloc already handles everything internally, no need to manually free anything
2026-01-21 19:49:26 +01:00
Alug 9d92bca1fa Show report issue button also on I_Error
also make wrapper functions for everything, to reduce code dupe
2026-01-20 17:31:58 +01:00
Alug a6dba481c3 dont attempt to show sdl message box on non dedicated builds running as dedicated 2026-01-20 16:25:07 +01:00
Alug 346388f2dd V_DrawVhsEffect: fix scaling with highreshudscale, fix downwards bar going out of screen bounds
this shouldnt account for highreshudscale at all
on very high resolutions the bars are still only half size, but atleast they dont become minuscule or just dont draw at all
also ensures both bars are clamped, on some resolutions sometimes they just go out of visible screen range
2026-01-20 14:56:52 +01:00
Alug e17623216a Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2026-01-20 06:20:47 +01:00
Alug 38b5faa835 add reducevfx to accesability menu
If there are things that should be handled by that toggle def feel free to suggest them!
2026-01-19 14:35:02 +01:00
Alug a3ae5505c6 dont do controller led and rumble stuff if unsupported
skips doing a bunch of pointless crap
2026-01-18 07:42:17 +01:00
Alug fcac92b0f0 remove unused stuff from joyinfo 2026-01-18 07:39:45 +01:00
Alug d5ead75fcf m_menu: clean up the skin display stuff a little 2026-01-16 13:25:38 +01:00
Alug 3ec9ddfb87 Revert "get rid of calling "NetUpdate" in the renderer"
This reverts commit 5ee3b41969.
2026-01-15 21:20:17 +01:00
Alug 39dc3a878c push back models even further
bigger models still had parts being culled, hope this is generous enough idk
2026-01-12 19:13:08 +01:00
Alug f2e959a515 support the uhhh localskin setup with 3d models 2026-01-12 18:39:52 +01:00
Alug 193f9630ea tiny cleanup + warning fix 2026-01-12 18:26:32 +01:00
indev 381f006f31 Make glOrtho remap coordinates to vid.width and vid.height, this makes calculating coordinates in HWR_Draw2DModel easier 2026-01-12 20:14:17 +03:00
Alug 6da9e31df3 simplify skinnum bounds check
lul
2026-01-12 17:22:04 +01:00
Alug 6b4d314032 fix the culling issues
i hope this is right.......
2026-01-12 16:48:50 +01:00
indev 6c14138975 Make HWR_Draw2DModel not depend on resolution, make 3d skin select use skinselectspin cvar 2026-01-12 18:08:22 +03:00
Alug fdc651172f Merge remote-tracking branch 'origin/lugstuff' into lugstuff 2026-01-12 10:44:35 +01:00
Alug 3e012968e5 WIP: show 3d models in player setup
this is incredibly ugly and hacked together
theres some weird culling issues and shit doesent really "scale" with different resolutions which needs to be fixed
but it kinda works
2026-01-12 10:44:30 +01:00
Alug 9f5a88377b d_netfil: dont use zone memory in CURLGetFile 2026-01-11 19:46:34 +01:00
Alug 7410bd0640 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2026-01-11 19:41:15 +01:00
Alug f7ee814048 fix models 2026-01-10 09:22:13 +01:00
Gustaf Alhäll bf1aa47854 Simplify textcmd handling 2026-01-09 20:53:15 +01:00
Gustaf Alhäll ca771db2d8 Simplify textcmd handling 2026-01-09 20:52:57 +01:00
Alug 20db5a6892 disable midnight channel border flicker with "reducevfx" 2026-01-09 13:00:47 +01:00
Alug 605fb5d15d fix InitColorLUT 2026-01-09 11:08:10 +01:00
Alug c919ee2b86 leveltime be tic_t
:chaosleep:
2026-01-08 00:43:35 +01:00
Alug 5fffb5fa3b enable "Wzero-as-null-pointer-constant", fix cases of it
prevent ambiguity
shoutout blankart for making me aware this exists
2026-01-08 00:40:46 +01:00
Alug be423b2910 Merge branch 'Saturn-Next' into netstuff 2026-01-08 00:34:19 +01:00
Alug 3bf3bdf641 enable "Wzero-as-null-pointer-constant", fix cases of it
prevent ambiguity and bad practices, i like expressive and "correct" code
shoutout blankart for making me aware this exists
2026-01-08 00:34:15 +01:00
Alug e923777eb6 Acessability: add basic "reducevfx" toggle to disable/reduce certain effects
toggles certain effects, which may be troublesome to some players

-disabled hyudoro flashing, instead makes player translucent
- Makes rainbow colour effects, such as invul, change colours very slowly
- Disables underwater and heatwave screen effects
- Disables palette flashing
- Disables vhs effect

not the most pretty implementation, but im lazy and this works

feel free to suggest more things
2026-01-08 00:33:53 +01:00
Alug cf6eb0010e K_SpawnSparkleTrail: check for blend effect apply outside the loop
tiny optimization
2026-01-08 00:33:50 +01:00
Alug 5184115216 enable "Wzero-as-null-pointer-constant", fix cases of it
prevent ambiguity and bad practices, i like expressive and "correct" code
shoutout blankart for making me aware this exists
2026-01-08 00:33:43 +01:00
Alug 5528afaa35 K_SpawnSparkleTrail: check for blend effect apply outside the loop
tiny optimization
2026-01-08 00:27:06 +01:00
Alug 96e6990c38 Acessability: add basic "reducevfx" toggle to disable/reduce certain effects
toggles certain effects, which may be troublesome to some players

-disabled hyudoro flashing, instead makes player translucent
- Makes rainbow colour effects, such as invul, change colours very slowly
- Disables underwater and heatwave screen effects
- Disables palette flashing
- Disables vhs effect

not the most pretty implementation, but im lazy and this works

feel free to suggest more things
2026-01-08 00:26:02 +01:00
Alug 9b778f7358 initialize more globals that have been missed 2026-01-02 18:34:00 +01:00
Alug 33d701ffa1 fix wrong type for K_DriftSparkColor
all the colour stuff is still a bit of a mess, but generally its handled as an uint8
2026-01-02 18:31:02 +01:00
Alug 39a46e8f79 Revert "Remove tic provision (vanilla compat edition)"
This reverts commit 4a3c9ccfbb.
2025-12-30 01:09:14 +01:00
Alug 0d5571a429 d_cliserv: fix casts from nan to int type
in few cases the files totalsize might be 0, which results in a nan, casting that to int type is undefined behavior
2025-12-28 17:46:37 +01:00
Alug f4976688e9 properly handle getcwd error in IdentifyVersion
if getcwd fails, the buffer contents will be undefined
so we shall just overwrite it again with "."
2025-12-27 15:34:18 +01:00
Alug d9712cf85e Merge branch 'Saturn-Next' into netstuff 2025-12-27 15:13:50 +01:00
Alug 9ccd62b5cb Merge branch 'Saturn-Next' into optimizewadlumps 2025-12-27 15:13:42 +01:00
Alug 2077315f24 Merge branch 'Saturn-Next' into vidmodestuff 2025-12-27 15:13:31 +01:00
Alug 380a2f7d4a fix w_wad oopsie 2025-12-27 15:13:13 +01:00
Alug 9bea6eddbd fix dedi build missing I_CheckAboveDesktopRes 2025-12-27 15:09:38 +01:00
Alug 61d989b874 fix dedi build missing I_CheckAboveDesktopRes 2025-12-27 15:09:30 +01:00
Alug f4e5f7249c Merge branch 'Saturn-Next' into vidmodestuff 2025-12-27 15:09:02 +01:00
Alug 61892742fb fix dedicated server build warnings 2025-12-27 15:06:35 +01:00
Alug cf8cff2898 fix another -Wnull-dereference warning 2025-12-27 14:48:46 +01:00
Alug 0691e2d9e2 Merge branch 'Saturn-Next' into netstuff 2025-12-27 13:40:19 +01:00
Alug 4e0b7af62f fix gcc version detection fallback stuff
latest_gcc_version should always just be X.x not X.x.x
this broke some warning flags for me
2025-12-27 13:02:21 +01:00
Alug 43ed236e80 Signal Handler: Add button to report issues to github
mostly based on what srb2 does with some stuff from srb2-legacy
the button will attempt to open the issue page on the saturn git when a crash occurs
2025-12-27 12:40:50 +01:00
Alug 8e67e0bace Merge branch 'Saturn-Next' into optimizewadlumps 2025-12-27 10:53:10 +01:00
Alug c8b4aa656b fix some null pointer dereferences
and enable -Wnull-dereference by default
2025-12-27 10:51:36 +01:00
Alug 1b0c6d9c03 fix some shadowed variables, enable -Wshadow by default 2025-12-27 10:31:45 +01:00
LJ Sonic e0b5f67ef4 Do not archive table values for nil keys 2025-12-26 23:57:57 +01:00
Alug 1ccc707fa6 FBO: remove nvidia xwayland hack
this has been a non issue since a while now, so can remove this (we shouldnt work around driver bugs anyways)
2025-12-26 23:20:30 +01:00
Alug dfb4ef2e16 simplify opengl vsync set 2025-12-26 23:18:34 +01:00
PAS 08864e27b2 Fix double byte-swap in SV_MakeTic 2025-12-26 21:44:39 +01:00
Alug 4a3c9ccfbb Remove tic provision (vanilla compat edition)
based on https://codeberg.org/srb2classic/srb2classic/commit/7cf14fbe740998c3246dd190904f49a236b2ccec

seems to get rid of some jitter in localhost
2025-12-26 21:44:37 +01:00
Alug cedd789a27 Merge branch 'Saturn-Next' into netstuff 2025-12-26 21:44:34 +01:00
PAS ce1c3ced90 Fix double byte-swap in SV_MakeTic 2025-12-26 21:39:31 +01:00
Alug b5ec7f3f5a Remove tic provision (vanilla compat edition)
based on https://codeberg.org/srb2classic/srb2classic/commit/7cf14fbe740998c3246dd190904f49a236b2ccec

seems to get rid of some jitter in localhost
2025-12-26 21:36:29 +01:00
Alug bc6e530251 Fixup the doomednum lookup
properly match the old linear lookup by returning the FIRST match for doomednum
also shrinks the array, doomednum max is 4095, no need for such massive array, also fixed a off by
should fix some join desynchs and desynchs on certain maps
2025-12-26 18:58:27 +01:00
Alug 9ff68cdf17 G_GetDemoDate: make safer and use static memory
bunch of smaller issues before, no real checks for strltol and potential free on a null pointer lul
also skips replays with shorter than 10 char names and handles errors better
2025-12-24 00:06:05 +01:00
Alug 7357e03aca Remove pure attribute from fasticmp
While i assume this to be fine currently, i quite frankly dont trust the srb2 codebase enough aswell as preventing any future issues if there should ever be need to switch locales, since toupper WILL change behaviour in such cases which does not qualify as pure
2025-12-16 17:52:03 +01:00
Alug 8cf36252c0 Revert "dont call I_Quit from withing "quit_handler", let it signal main loop to quit"
This reverts commit d3f56c48d2.
2025-12-16 00:44:50 +01:00
indev 592fb226e9 Init playerinfo[i].node to 255 so if playerinfo packet gets lost, server join screen doesn't display empty player names 2025-12-11 20:10:04 +01:00
Alug c1d56c6ee4 fastcmp.h: mark fastcmp functions as pure
this might let the compiler optimize aways subsequent calls in some cases
strcmp etc from glibc also does it
2025-12-11 20:10:01 +01:00
Alug d929e3d0fb findfile: let files added with "-file" look in addon/downloads folders first
due to https://github.com/Indev450/SRB2Kart-Saturn/commit/956fc099adcd7f33993c43c8ee3aea64df3fe9b4
IWADS shouldnt use findfile anymore
If there should be such case we can always expose the startupiwad count to check if were currently searching for iwads iirc
2025-12-11 18:19:00 +01:00
Alug 0c4260cd57 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2025-12-11 16:13:31 +01:00
indev dde4c9bac4 Move lite steer and turn smoothing cvars into individual player controls menu 2025-12-11 15:40:24 +01:00
indev 1c3a466060 Add autoaccel into accessibility menu 2025-12-11 15:21:18 +01:00
Alug be8165c740 Accessability: Add "Auto Acceleration" feature
ported from hostmod
2025-12-11 14:26:49 +01:00
Alug b3f1a7a003 G_BuildLocalTiccmd: remove "moveinput" variable
checking both cmd->buttons aswell as cmd->driftturn already handles those cases
2025-12-11 14:10:28 +01:00
Alug 461f3e6bf5 Revert "Fix use-after-free when mobj is removed while still playing sounds"
This reverts commit 3bdc745bd1.
2025-12-11 02:58:45 +01:00
Alug 87923973e3 test: replace gl colormap mipmap linked list with unordered map for faster lookup
so far this seems to cut the time searching for an existing colormipmap in half, needs some testing as this is finicky code that may leak badly if not handled correctly

models currently broken, for reasons above
2025-12-10 19:19:50 +01:00
Alug b49a3e5875 HWR_ProcessSeg: port softwares code to skip rendering inner sides that are "joined" to other fofs
This seems to improve performance on maps with moderate to lots of fofs quite a bit.
On maps with only a few fofs, this makes no difference or has very very little regression
Need to test and check if there are any visual errors, but so far everything seems good
2025-12-09 18:14:59 +01:00
Alug fd2c208612 Merge branch 'Saturn-Next' into optimizewadlumps 2025-12-09 18:07:15 +01:00
Alug 8f91707164 Merge branch 'Saturn-Next' into netstuff 2025-12-09 18:07:06 +01:00
Alug 37eba186f5 netcode: replace some stuff with memsets + add a little bounds safety in some places 2025-12-09 18:07:02 +01:00
Alug ea0f5d11d3 netcode: replace some stuff with memsets + add a little bounds safety in some places 2025-12-09 18:06:48 +01:00
Gustaf Alhäll 1c3742629e Fix decompression warning when starting a server 2025-12-09 17:56:00 +01:00
Alug 5bf8559bca command.c: fix "alias" command crashing when no aliases were registered
if we dont have aliases how do we check the next aliases aswell?
2025-12-07 21:08:17 +01:00
Alug 5bf8feb660 fix dedicated build 2025-12-07 20:27:16 +01:00
Alug c21406c51d g_demo: check for maplump existance directly
cant really rely on mapheaderinfo to tell us if some map exists or not
2025-12-07 20:23:47 +01:00
Alug d3f56c48d2 dont call I_Quit from withing "quit_handler", let it signal main loop to quit
fixes an issue for me which led to having the game threads getting stuck when sending an interrupt signal to the game due to some thread issues with the sdl subsystems
2025-12-07 20:22:25 +01:00
Alug 4acd7c2dba i_system: "fix" recursive i_quit
well this still aint working all to great, but atleast this allows me to quit the game if it gets stuck without having to always send a kill signal to it

copy pasted from what the dedicated build does
2025-12-07 19:52:25 +01:00
Alug 8f3b7158e3 w_wad: kill longname support
we dont use it for anything, we also cannot use it for anything.
Due to massive amounts of unterminated string being passed to everything
So we dont need to waste memory and resources
2025-12-07 19:04:36 +01:00
Alug fd063e8ad0 g_demo: screw you LF2_EXISTSHACK 2025-12-07 19:03:26 +01:00
Alug 1ece17b2ff w_wad: kill longname support
we dont use it for anything, we also cannot use it for anything.
Due to massive amounts of unterminated string being passed to everything
So we dont need to waste memory and resources
2025-12-07 18:57:56 +01:00
Alug 8c1c80cf63 Revert "fuckit SDL3"
This reverts commit 8c7bbd8861.
2025-12-07 17:13:24 +01:00
Alug 435d6af214 Revert "port srb2classics sdl audio system"
This reverts commit 99afed6fd1.
2025-12-07 17:13:19 +01:00
Alug a5c45a42b7 Revert "fix a few warnings"
This reverts commit 0328b1c652.
2025-12-07 17:13:06 +01:00
Alug f24b092107 Revert "i_video: few type fixes for sdl3"
This reverts commit 105214ff2c.
2025-12-07 17:12:57 +01:00
Alug a9d10c41b1 Revert "fix startup playing a super loud bit of music"
This reverts commit 2398c6f5f3.
2025-12-07 17:12:50 +01:00
Alug 7fb866bf29 Revert "add few missing audiostream unlocks"
This reverts commit ed926c444f.
2025-12-07 17:12:43 +01:00
Alug f7131950fa Revert "pitch is a float"
This reverts commit 0c050a3dff.
2025-12-07 17:12:38 +01:00
Alug 487b5d4bd5 Revert "disable sound precache for sdl sound"
This reverts commit a40310aafa.
2025-12-07 17:12:32 +01:00
Alug 89e6c81bbd Revert "add "audiobuffersize" handling"
This reverts commit ca9b0147b2.
2025-12-07 17:12:26 +01:00
Alug 3370d14d97 Revert "lock audio stream in I_PlaySong"
This reverts commit 6f242f30e1.
2025-12-07 17:12:20 +01:00
Alug 4af1c24a3c Revert "make gme and tracker music slightly louder"
This reverts commit 1643e5ba43.
2025-12-07 17:12:14 +01:00
Alug 6bd4c83568 Revert "force 44100khz sample rate"
This reverts commit ab07a43c06.
2025-12-07 17:12:08 +01:00
Alug 3ff1f03158 Revert "add back "nearest" resampling from mixer"
This reverts commit fc9bda5b16.
2025-12-07 17:12:00 +01:00
Alug 7851d0def7 Revert "this shouldnt be in sourcefile oops"
This reverts commit 69cdee82d3.
2025-12-07 17:11:55 +01:00
Alug 800d414323 Revert "sdl_sound: fix -Wmaybe-uninitialized warning"
This reverts commit 8fdaf61d4d.
2025-12-07 17:11:41 +01:00
Alug b2ae5679ca Revert "a"
This reverts commit 7bec44fc33.
2025-12-07 17:11:30 +01:00
Alug ade77c7b00 Revert "makefile: move openmpt stuff to before sdl stuff"
This reverts commit 04148f7db8.
2025-12-07 17:11:20 +01:00
Alug 723dce4518 Revert "delet the bird music resynching stuff"
This reverts commit 92445b2fdc.
2025-12-07 17:10:05 +01:00
Alug 42f5407556 Revert "Implement MIDI seeking"
This reverts commit 0cb378425b.
2025-12-07 17:09:58 +01:00
Alug bb2769a79d Revert "Fine-tune volume settings"
This reverts commit 8486b7add6.
2025-12-07 17:09:52 +01:00
Alug e6cbd31e72 Revert "Fix Haiku build"
This reverts commit e716de35cc.
2025-12-07 17:09:48 +01:00
Alug a6ccb8491e Revert "Add chorus and reverb settings to MIDI"
This reverts commit 641439cbba.
2025-12-07 17:09:43 +01:00
Alug 38d6fc8112 Revert "Tweak audio settings"
This reverts commit fc53487698.
2025-12-07 17:09:38 +01:00
Alug 4d03509c4d Revert "Fix MIDI music looping"
This reverts commit 334a80cb49.
2025-12-07 17:09:34 +01:00
Alug fe6105713d Revert "add missing Fluidsynth ifdefs"
This reverts commit cf060499ca.
2025-12-07 17:09:26 +01:00
Alug db1d900ba0 Revert "sdl_sound: handle explicit float conversions"
This reverts commit 408344111a.
2025-12-07 17:09:22 +01:00
Alug 581e9f489f Revert "sdl_sound: attempt to fix sounds cutting off"
This reverts commit 5fcf32c909.
2025-12-07 17:09:16 +01:00
Alug e8e20bbfad Revert "Limit audio channels to 2"
This reverts commit a553bd1a9a.
2025-12-07 17:09:11 +01:00
Alug aea7fbb872 Revert "Fix music looping on digital"
This reverts commit fd8454c395.
2025-12-07 17:08:51 +01:00
Alug 265d949bf2 Revert "Update license info"
This reverts commit 5de55c24f5.
2025-12-07 17:08:48 +01:00
Gustaf Alhäll 5de55c24f5 Update license info 2025-12-06 19:37:40 +01:00
Gustaf Alhäll fd8454c395 Fix music looping on digital 2025-12-06 19:37:25 +01:00
Gustaf Alhäll 212994da20 Fix memory leak in AATree string trees 2025-12-06 19:35:40 +01:00
Gustaf Alhäll 22c5e90bc4 Fix use-after-free when mobj is removed while still playing sounds 2025-12-06 19:34:19 +01:00
Alug 42ffaa07d4 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2025-12-06 18:43:29 +01:00
Alug 63d6d58e56 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2025-12-05 22:16:44 +01:00
Alug 58c30d421f Menu: fix camera options from within accessability options returning to the main menu
really wonky setup, but some other menus do similar things...
2025-12-05 19:12:48 +01:00
Alug 083b1c7cc7 dont force disable freecam if you respawn
needs some testing if this changes behavior
2025-12-05 17:29:26 +01:00
Alug 4e7c974876 m_menu: do some cleanup - replay drawers 2025-12-05 17:28:53 +01:00
Alug 04cc7e4d9f Menu: show stats for current skin in Time Attack menu
+ some cleanup
2025-12-05 17:28:15 +01:00
Alug b41306dfa0 Menus: dont advertise encore toggle if its not unlocked yet!
this wont do anything anyways besides telling you you havent unlocked it yet
so can just hide it
2025-12-05 17:17:58 +01:00
Alug b76ce836a0 w_wad: optimize W_LumpExists
in two parts:
- Use our lumpcache lookup first (our unordered map), BUT since it is case insensitive we extract our lump out of it to do another case sensitive name compare
- In the manual lump seach falltthrough case, we can also check against the string lenghts and hash (its case insensitive but will still reject differing names, same with stringlenght)

this improves the performance of the leaderboard map browser quite a bit and everything else using v.patchExists
2025-12-05 16:06:13 +01:00
Alug b87920516b Revert "remove the wonky double tap input for controllers"
This reverts commit 75324afdab.
2025-12-05 15:03:15 +01:00
Alug fd1e415731 w_wad: use unordered map to cache wad start and end folders 2025-12-05 14:59:55 +01:00
Alug 41c887f2bf w_wad: comment out fullname lump hash for now
its unused and not particulary useful eitherway, save us a few hash generates and a struct field lul
2025-12-05 14:59:51 +01:00
Alug 8091d825d5 w_wad: use our lump fullnamelenght in W_CheckNumForFolderStartPK3 2025-12-05 14:59:47 +01:00
Alug 699113fb25 w_wad: replace lumpnumcache with unordered_map hash lookup
needs testing if actually better
but the old lumpnumcache was basically useless due to being incredibly small
even just booting up the game we have around 1000 entries already
this hopefully should still be faster than potentially going through ALL lumps in ALL wads we have loaded to find the lumpnums
not sure if longnames should get any special handling like before, but i dont think it really matters if theyre long honestly

thanks ceepeepeereference for the basis of this
2025-12-05 14:59:39 +01:00
Alug 3996abef36 convert w_wad to ceepeepee
prep for smth i might try
2025-12-05 14:59:36 +01:00
Alug 1c33aaec3d w_wad: optimize W_LumpExists
in two parts:
- Use our lumpcache lookup first (our unordered map), BUT since it is case insensitive we extract our lump out of it to do another case sensitive name compare
- In the manual lump seach falltthrough case, we can also check against the string lenghts and hash (its case insensitive but will still reject differing names, same with stringlenght)

this improves the performance of the leaderboard map browser quite a bit and everything else using v.patchExists
2025-12-05 14:51:58 +01:00
Alug 370c1dcf8c w_wad: use unordered map to cache wad start and end folders 2025-12-05 14:00:04 +01:00
Alug 905522dc19 p_spec: remove hardcoded animdefs table
srb2.srb includes an ANIMDEFS file which WILL override this anyways and includes any of these.
so no need to complicate the code with this
2025-12-05 13:52:37 +01:00
Alug fe11db4159 fix Flat loading code passing non null terminated strings to W_CheckNumForName 2025-12-05 13:49:26 +01:00
Alug ffc141461f w_wad: comment out fullname lump hash for now
its unused and not particulary useful eitherway, save us a few hash generates and a struct field lul
2025-12-05 13:47:21 +01:00
Alug a8388ecdd3 w_wad: use our lump fullnamelenght in W_CheckNumForFolderStartPK3 2025-12-05 13:45:24 +01:00
Alug 0b8361ca05 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2025-12-05 01:16:31 +01:00
Alug 110b540cc2 p_user: do some tiny cleanups 2025-12-05 01:05:51 +01:00
indev ae04e73f2c Ok i guess we still need old_z2 :ChonkBunckle: 2025-12-05 00:57:51 +01:00
Alug 230e731a25 mark debugfile with UNLIKELY
this is for debug, and esp network debug which barely anyone ever needs, so can tell compiler better branch hint
2025-12-05 00:32:19 +01:00
Alug 4a2f86e9bf k_kart: slightly cleanup driftrelease code 2025-12-05 00:28:55 +01:00
indev 9a93ea0918 Move ghost mobj old_x2 hack into P_SpawnGhostMobj to cover all cases where it would matter
ty lug <3
2025-12-05 00:02:07 +01:00
indev f3ed26b885 Experimental: remove mobj->old_x2, old_y2, etc fields 2025-12-04 23:48:50 +01:00
Gustaf Alhäll a553bd1a9a Limit audio channels to 2 2025-12-04 22:26:01 +01:00
Alug 1055f9dc74 w_wad: replace lumpnumcache with unordered_map hash lookup
needs testing if actually better
but the old lumpnumcache was basically useless due to being incredibly small
even just booting up the game we have around 1000 entries already
this hopefully should still be faster than potentially going through ALL lumps in ALL wads we have loaded to find the lumpnums
not sure if longnames should get any special handling like before, but i dont think it really matters if theyre long honestly

thanks ceepeepeereference for the basis of this
2025-12-04 20:31:54 +01:00
Alug 34245f242d convert w_wad to ceepeepee
prep for smth i might try
2025-12-04 18:58:33 +01:00
Alug 5fcf32c909 sdl_sound: attempt to fix sounds cutting off
i suck at explaining so just trust. :chonkbuncle:
Game sound handling has no idea which sound it is playing/checking, so a sound that ended frees its slot and it might get occupied again without the game knowing
so just encode the channel number into the sound so we can actually check
2025-12-04 16:31:44 +01:00
Alug 408344111a sdl_sound: handle explicit float conversions 2025-12-04 16:30:03 +01:00
Alug cf060499ca add missing Fluidsynth ifdefs 2025-12-04 15:42:31 +01:00
Gustaf Alhäll 334a80cb49 Fix MIDI music looping 2025-12-04 15:35:48 +01:00
Gustaf Alhäll fc53487698 Tweak audio settings 2025-12-04 15:35:36 +01:00
Gustaf Alhäll 641439cbba Add chorus and reverb settings to MIDI 2025-12-04 15:32:22 +01:00
Gustaf Alhäll e716de35cc Fix Haiku build 2025-12-04 15:29:05 +01:00
Gustaf Alhäll 8486b7add6 Fine-tune volume settings 2025-12-04 15:28:36 +01:00
Gustaf Alhäll 0cb378425b Implement MIDI seeking 2025-12-04 15:28:23 +01:00
Alug 92445b2fdc delet the bird music resynching stuff
idk who even wants this, its pain, and even more pain to adapt
2025-12-04 06:15:10 +01:00
Alug b28f3998e5 r_opengl: dont set model shader uniforms if we dont use them 2025-12-04 01:26:23 +01:00
Alug 5c4f86ffc1 fix the downsample shader not applying changed resolutions 2025-12-04 01:25:06 +01:00
Alug 37aa922aa0 fix model sprites freaking out 2025-12-04 01:24:22 +01:00
Alug cfa11330ef make those ternaries a little prettier lul 2025-12-04 01:23:10 +01:00
Alug 3b3562e77b hw_main: handle implicit float conversion cases explicitly 2025-12-04 01:22:58 +01:00
Alug d1b6743ec2 hw_main: cleanup and simplify HWR_RenderPolyObjectPlane 2025-12-03 23:39:58 +01:00
Alug 05fa856c45 Blua: supress "-Wcast-qual" warnings
from intentional casts
2025-12-03 20:09:24 +01:00
Alug 75b02ba663 Blua: opcode OP_SELF operate only with string keys, so they can use fast-track table access
https://github.com/lua/lua/commit/cb3d5dce30089512085f78a0bef79e30ef732e30
2025-12-03 19:28:57 +01:00
Alug 6528ecc978 Blua: OP_SELF can use 'luaV_fastget' specialized for strings, as it is applied only to string keys
https://github.com/lua/lua/commit/257961c601fdec1ea1f9640d460e0d31c39333a1
2025-12-03 19:25:24 +01:00
Alug 84b1671761 Blua: 'luaV_fastget' only treats the real fast case (table with a non-nil value at given key, so that it does not need to check metamethods)
https://github.com/lua/lua/commit/1a44e822009752513ce895b9eabc51a4ee4a195a
2025-12-03 19:21:36 +01:00
Alug 32b176653c Blua: 'Protect' in table operations is not needed in the fast track
https://github.com/lua/lua/commit/df8b996bccd3830d6fe9d7ba80e8fccd6ac3cabf
2025-12-03 19:12:59 +01:00
Alug 9ed2dca9a1 Blua: fast track for 'settable'
https://github.com/lua/lua/commit/3b795541c488c7e633567897c9112312007a20a0
https://github.com/lua/lua/commit/b91bc93fd33f2158745b37c9e091c6fa4d1a4fd5

had to adjust some things, hope this doesent explode lmao
2025-12-03 19:00:29 +01:00
Alug 8ebbc70395 Blua: implementation of fast track for gettable operations
https://github.com/lua/lua/commit/e247c3ada3ff47a1352927e797263137f4e02e0e

lets hope i converted this properly lul
2025-12-03 18:05:51 +01:00
Alug 881fb9b4f7 Blua: small optimization in luaL_addlstring (avoid adding chars one by one)
https://github.com/lua/lua/commit/f292760f12022a83cf01e788482a264aeeb3c276
2025-12-03 16:41:42 +01:00
Alug 995ffd7719 Blua: better names for metamethods in debug information
https://github.com/lua/lua/commit/becf19feeffeb0bf2297e163da4ccc7b4b5e6b5c
2025-12-03 16:40:51 +01:00
Alug f5c2af2bc7 Blua: small optimization (reorder of BinOpr enum to unify some cases in switches)
https://github.com/lua/lua/commit/d7872dcf91eb2075312a03973a6cdb489610c796
2025-12-03 16:39:56 +01:00
Alug fc2f3de182 Blua: micro-optimization: avoid one API call in 'read_chars'
https://github.com/lua/lua/commit/f86f4116c82654d24faa4a32a909d0c27f3d4746
2025-12-03 16:39:19 +01:00
indev 7a23c5c24e Add option to show current song credits in pause menu 2025-12-03 15:14:35 +01:00
Alug 7eb2ad1e35 slightly cleanup SV_AddWaitingPlayers 2025-12-02 23:23:41 +01:00
Alug f49e57a38c d_cliserv: Cleanup PT_ClientJoin
move refuse message handling into its own function
2025-12-02 23:23:38 +01:00
Alug 265f4a50ef readd check for node before SV_SendSaveGame
Apparently in some cases the server will connect to itself, in this case the server tries to send itself the savegame, leading to a crash in some cases. oops
2025-12-02 23:23:36 +01:00
Alug e83e2659a7 reorder packets again 2025-12-02 23:23:29 +01:00
Alug c680dd3222 fix some packet types not being correctly handled 2025-12-02 23:23:15 +01:00
Alug 96aaaf5261 merge SendNameAndColor & SendWeaponPref
TODO: make a bunch of player specific cvars arrays for splitscreen handling

- also cleanup some strlen usage
2025-12-02 23:23:07 +01:00
Alug efb29e6be5 d_cliserv: do some cleanups
- expose SAVEGAMESIZE
- pass node number to SV_AddWaitingPlayers (saves iterating through all 128 net nodes everytime a player joins) lifted from RR
- move all packet handling to the packet handlers
- Reorder packethandling switches a little, so common/important packets get checked first
- fix wrong clamp for realfirsttic that was too early
- add nowtime division by NEWTICRATERATIO (no change unless ticrate changes)
2025-12-02 23:23:02 +01:00
Alug a62529bd1c slightly cleanup SV_AddWaitingPlayers 2025-12-02 23:20:17 +01:00
Alug 35968c0692 d_cliserv: Cleanup PT_ClientJoin
move refuse message handling into its own function
2025-12-02 23:16:35 +01:00
indev 13fab64bc7 Add 'time per frame' argument for hud.setVoteBackground 2025-12-02 22:04:24 +01:00
Alug 09c3b8f615 readd check for node before SV_SendSaveGame
why? i dont know lol
2025-12-02 22:04:18 +01:00
Alug 6c7df2511d reorder packets again 2025-12-02 21:50:44 +01:00
Alug 06d8e7db9d dont call CON_Drawer during frameskip, just call CON_MoveConsole instead
fixes the issue at hand, without making the console flicker in gifs
sigh....
2025-12-02 20:49:47 +01:00
indev 8760044c90 Hide localskins menus immediately when option is changed
@Alug :blobhug:
2025-12-02 20:24:43 +01:00
Alug 4923e9c823 fix some packet types not being correctly handled 2025-12-02 20:24:39 +01:00
Alug b20022bc55 add toggle to let console prints show in main menus
if you want this for some reason
2025-12-02 20:07:46 +01:00
Alug e6f79c2356 m_menu: fix splitscreen players being unable to change the names from player setup
smol oversight :blobcatpats:
2025-12-02 19:42:54 +01:00
indev 3c5905d6f7 Print a warning when luaL_resourcetryagain force triggers garbage collector 2025-12-02 19:05:17 +01:00
indev 971c59bd20 Fix few possible multithreading bugs related to ReplayNamesLoadThread 2025-12-02 19:02:31 +01:00
Alug 0987aea01f suppress wrong "-Warray-bounds" warning in G_DeviceLEDTick
newer gcc does this for whatever reason, its fine
splitscreen will never call this out of its bounds
2025-12-02 18:40:14 +01:00
Alug bf8d6cd651 blua: attempt emergency garbo collection on file io operations if they fail
ports of
https://github.com/lua/lua/commit/e885dee5ab4dbee2457ee2023340e848fdabdef9

and

https://github.com/lua/lua/commit/3d838f635cc81ec3332f9a904992db1c6d8a46ad

prevents massive memory leaks and other issues due to faulty lua scripts
2025-12-02 18:31:01 +01:00
Alug 4a9cc411aa replayhut: fix race condition in M_ResetDemoList freeing the demolist vars
in rare cases this could free the data the thread is currently using
so we gotta wait for it to finish first
2025-12-02 14:59:02 +01:00
Alug 9e950e74e2 change freecam condition for awayview
shouldnt change the behavior much as we wont see anything without a camera, but this is explicit about what exactly is wanted (i.e. thiscam may be null, we only check due to null deref, we only care about if freecam is active)
2025-12-02 12:47:45 +01:00
Alug be4d1b7945 merge SendNameAndColor & SendWeaponPref
TODO: make a bunch of player specific cvars arrays for splitscreen handling

- also cleanup some strlen usage
2025-12-02 12:45:47 +01:00
Alug 2a08836886 d_cliserv: do some cleanups
- expose SAVEGAMESIZE
- pass node number to SV_AddWaitingPlayers (saves iterating through all 128 net nodes everytime a player joins) lifted from RR
- move all packet handling to the packet handlers
- Reorder packethandling switches a little, so common/important packets get checked first
- fix wrong clamp for realfirsttic that was too early
- add nowtime division by NEWTICRATERATIO (no change unless ticrate changes)
2025-12-02 12:42:22 +01:00
Alug 357dcb9543 ticcmd: replace magic numbers with constants
names lifted from RR
2025-12-02 12:38:11 +01:00
Alug 10ed1ac58a remove mlooky, rename mousesens to mousexsens, make mouse y sensitivity not be affected by x sensitivity
mlooky basically just took the place of mousey, which did nothing before, but is a better name
2025-12-02 00:55:39 +01:00
Alug 4e8284041f g_input: init some globals that were missed 2025-12-02 00:41:59 +01:00
Alug 125e598fa4 dont let splitplayers 3 and 4 input gamecontrols in the menu
oversight lul
2025-12-02 00:40:50 +01:00
Alug 75324afdab remove the wonky double tap input for controllers
finally figured out what occasionally messed up my bound controls lol
why in the world is this even a thing for controllers??
2025-12-02 00:40:05 +01:00
Alug 701de315e4 update saturn credits
phew so every line now has two names
otherwise we cannot fit everything and anyone into this anymore
this even allowed to put back the tooltip at the bottom
i still want to redo the credits completely at some point with some cool stuff though
2025-12-01 23:41:42 +01:00
indev b67ae49356 Fix M_ClearMenus being called too early in map command func 2025-12-01 22:55:11 +01:00
Alug e7998f46a9 fix more cases of dangerous PU_PATCH_LOWPRIORITY 2025-12-01 22:31:05 +01:00
Alug ee0c655d90 fix the credits freeing our HUD item patches
goddamit i hate PU_PATCH_LOWPRIORITY
2025-12-01 22:24:29 +01:00
indev faae598e9b Fix emotes being slightly offset in chat log 2025-12-01 22:06:30 +01:00
Alug fa17ef371c sdl_audio: use float M_PI for S_CURVE
meant for floats, prevents implicit double conversions
2025-12-01 21:59:21 +01:00
Alug fd8184e828 Fix some Serverbrowser issues
- Fix serverlist results not being properly reset, which lead to reopening/refreshing the serverlist to show the old state, selecting one of those "old" servers then lead to just connecting to nothing
- Fix the resfresh button making servers disappear if hit too often too fast (from srb2)

https://codeberg.org/srb2classic/srb2classic/commit/3acc312923da0fe5e07c0517d9bff9e8b657b1eb
2025-12-01 21:57:44 +01:00
Alug a99d843845 G_AdjustViewEx and macro for G_AdjustView
neppy likes it more which is fair so we do this too
2025-12-01 21:08:18 +01:00
Alug 3ee8ffe857 replays: always check if map is loaded not just in old 1.0 replays
cause like, otherwise it will just I_Error which is worse lol
like this we just get thrown back to titlescreen
2025-12-01 21:03:18 +01:00
Alug 9b1db55fb3 properly throw player back to titlescreen from replay error
fixes the game becoming stuck in limbo state if replay fails to start
2025-12-01 21:02:35 +01:00
indev f7b7e1d487 Expose cameras to lua outside of hud hooks 2025-12-01 20:17:49 +01:00
Alug d7d6d7e706 Fix record attack ghosts sometimes crashing
due to ghosts occasionally ending to early and game interpreting them as still valid uhhhhh
lets pray this wont explode or cause any weird issues......

credits to RR

REVERT THIS ONCE I GO AND FIXUP THE REPLAY MESS
2025-12-01 20:17:43 +01:00
Alug 6c9dffde63 add gdb_history to gitignore 2025-12-01 18:53:32 +01:00
Alug 695ddb803d dont reset freecam if the player you are "supposed to be watching" specs in replays
this aint pretty, but im too lazy to make it pretty sincerly
2025-12-01 18:23:06 +01:00
Alug aa5f90aaf1 dont force awayview when in freecam 2025-12-01 18:02:59 +01:00
Alug 04148f7db8 makefile: move openmpt stuff to before sdl stuff
seems to fix linking openmpt without mixer for some reason oh well
2025-12-01 16:34:25 +01:00
Alug 7bec44fc33 a 2025-12-01 16:03:12 +01:00
Alug 8fdaf61d4d sdl_sound: fix -Wmaybe-uninitialized warning 2025-12-01 02:37:51 +01:00
Alug 555a187ae8 hw_main: fix -Wmaybe-uninitialized warning 2025-12-01 02:37:32 +01:00
Alug 69cdee82d3 this shouldnt be in sourcefile oops 2025-12-01 02:33:42 +01:00
Alug fc9bda5b16 add back "nearest" resampling from mixer
sdls own resampler uses linear interpolation, which sounds super muffled to me
some may like this, but i dont want to change how the game "sounds"
2025-12-01 02:14:44 +01:00
Alug ab07a43c06 force 44100khz sample rate
sounds better to me honestly
2025-12-01 02:10:31 +01:00
Alug 1643e5ba43 make gme and tracker music slightly louder
prob needs some adjustment, but both were always quite quiet
2025-12-01 02:04:09 +01:00
Alug 6f242f30e1 lock audio stream in I_PlaySong
seems to fix weird crashes with gme
2025-12-01 02:03:19 +01:00
Alug ca9b0147b2 add "audiobuffersize" handling
uses the SDL_AUDIO_DEVICE_SAMPLE_FRAMES hint
2025-12-01 00:29:44 +01:00
Alug a40310aafa disable sound precache for sdl sound 2025-11-30 22:31:21 +01:00
Alug 0c050a3dff pitch is a float 2025-11-30 22:18:11 +01:00
Alug ed926c444f add few missing audiostream unlocks 2025-11-30 22:18:01 +01:00
Alug 2398c6f5f3 fix startup playing a super loud bit of music 2025-11-30 21:55:30 +01:00
Alug 105214ff2c i_video: few type fixes for sdl3 2025-11-30 21:42:15 +01:00
Alug a80b311aba remove hwr_shutdown call
honestly this didnt help with the issue i had, game should already release all the memory on quit anyways.
this just makes it take longer to quit
2025-11-30 20:28:35 +01:00
Alug 0328b1c652 fix a few warnings 2025-11-30 20:19:23 +01:00
Alug 99afed6fd1 port srb2classics sdl audio system
still needs a little work reimplementing everything we got

from: https://codeberg.org/srb2classic/srb2classic/pulls/177
2025-11-30 19:48:01 +01:00
Alug 8c7bbd8861 fuckit SDL3 2025-11-30 17:22:19 +01:00
Alug 5ee3b41969 get rid of calling "NetUpdate" in the renderer
almost convinced at this point this causes more issues than anything
2025-11-30 14:55:20 +01:00
Alug d8e23772cb HWR_RenderPlane: cleanup code that does nothing 2025-11-30 14:45:25 +01:00
Alug ef82bfaeb5 raise highreshudscale max to "1.66" 2025-11-30 14:44:35 +01:00
Alug 230a31e7b7 OpenGL: fix frustum culling not accounting for spritescales
also rename "this_scale" to "thing_scale" to be more descriptive

Fixes the comically large tree disappearing when it shouldnt on "Ethereal Crystal"
2025-11-30 14:43:45 +01:00
Alug 707dbab7e2 hw_main: cleanup HWR_RenderX stuff a bit 2025-11-30 14:41:19 +01:00
Alug 4c49ce0f9c hw_cache:rename some stuff
more in line with the rest of the code
2025-11-30 14:38:04 +01:00
Alug b03127578f Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2025-11-29 22:52:10 +01:00
Alug 9485da7b03 update numcontrollers before updating joymenu 2025-11-29 19:12:03 +01:00
Alug 4111ccc2cf m_menu: move onchages back to m_menu, get rid of nextmap onchange hack 2025-11-29 19:00:45 +01:00
Alug 44f07e1cf7 m_menu: cleanup gamepad menu stuff a little 2025-11-29 18:59:03 +01:00
Alug 1c024d30d9 allow lua replaced flats to animate aswell
bit sketchy, but this only sets up flat anims again if the replaced flat is "new"
2025-11-29 16:33:18 +01:00
Alug fd5cf11e99 ensure modelMatrix is initialized 2025-11-29 14:25:55 +01:00
Alug c50e55850e comment out unused dynslope member from levelinterpolator_t struct
this wont ever work with our thinkerless dynslopes
2025-11-28 18:37:27 +01:00
James R 78f8c1f2d4 Rename strcasestr to nongnu_strcasestr, macro strcasestr ifndef _GNU_SOURCE
Fix for GCC C++ compiler, which always defines _GNU_SOURCE.
2025-11-28 18:22:34 +01:00
Alug e103b7a3e7 HWR_Precache: lookup for flats that already have been precached
yes i used c++ unordered_set here, yes i suck with linked lists, lol
maybe speeds this process up a little
2025-11-28 18:06:44 +01:00
Alug 2a7ebe8da0 HWR_Precache: check against gl_numtextures not numtextures
in practice those should mostly be the same but the variable is for gl so
2025-11-28 16:51:24 +01:00
Alug 801bed23c4 OpenGL: add a little more checks during texture free
prob not necessary but feels better
2025-11-28 16:49:13 +01:00
Alug f6d2b363a4 fix this..
its commented out, but maybe its useful someday.......
2025-11-28 00:55:50 +01:00
Alug 9e13a4b695 Revert "port R_PointToPseudoAngle && gld_clipper_AngleToPseudo from dsda-doom"
This reverts commit 353589d13a.
2025-11-27 23:49:33 +01:00
Alug 353589d13a port R_PointToPseudoAngle && gld_clipper_AngleToPseudo from dsda-doom
somehow now this gives a neat little speedup in a bunch of maps
some of the heavier ones range from 10-20fps improvements
2025-11-27 22:52:55 +01:00
Alug cfa853d022 software: clip sprites that are out of view
similar to what the frustum cull does in opengl, clips sprites that are out of view in vertical direction
2025-11-27 22:07:55 +01:00
Alug 77af507b7a OpenGL: fixup spherefrustum calling and use it for sprites
clips sprites that are out of our view, especially with precip this may lead to significant speedup in certain cases
huge thanks to indev for helping with this <3
huge thanks to dsda-doom for the maths needed!
2025-11-27 22:03:05 +01:00
Alug 5ae1a04811 sprite gzt is float in opengl render........ 2025-11-27 18:57:12 +01:00
Alug 50b1d377ef Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2025-11-27 17:45:40 +01:00
Alug 2d3e4589f6 tiny optimizations k_kart 2025-11-27 17:43:05 +01:00
Alug ed53e3dc3b R_ProjectSprite: move fakeflat clipping before light maths
so if applicable we have slightly less work
2025-11-27 17:39:39 +01:00
Alug 9b2180b597 R_ProjectSprite: make sprite clipping work with sloped fake floors/ceilings
from eternity engine
2025-11-27 16:43:41 +01:00
Alug 645155f691 DoAddLine: add fast check for lines with same front and back sectors without middle tex
taken from dsda-doom
2025-11-27 16:26:50 +01:00
Alug dc4f3ae042 HWR_Subsector: avoid calling HWR_AddSprites on already processed sectors 2025-11-27 16:21:24 +01:00
Alug f14b3ba989 pass frontsector ceiling z to R_Prep3DFloors
in both cases "R_Subsector" already got the frontsectors ceiling z, so no need to get it again within R_Prep3DFloors
should save some P_GetSectorCeilingZAt per frame
2025-11-27 16:20:09 +01:00
Alug 4f2dbdf2ec r_bsp: move polyobj renderside check into R_AddPolyObjects
uneeded within R_AddLine as outside R_AddPolyObjects this will never be called if currecnt seg is a polyseg
2025-11-27 16:17:05 +01:00
Alug 75ff4544ed remove more unused/uneeded things
- delet hw_dll
- remove sector_t ceilspeed and floorspeed
- remove a bunch of stuff from viewvars_s
2025-11-27 16:15:13 +01:00
Alug 8c115ddf1d Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2025-11-27 04:52:43 +01:00
Alug 8b829d722c fix perfstats freaking out 2025-11-26 10:09:24 +01:00
Alug 03b0ae341b mark checkcoord as const 2025-11-26 10:08:53 +01:00
Alug 54088933ce move R_QuickCamDist to r_main
also mark it with PUREFUNC and R_QuickDist with FUNCMATH, so compiler may optimze it more agressively
2025-11-26 10:08:20 +01:00
Alug da57112086 kill whatever tf is going on in G_ReadDemoTiccmd
yeah.......
2025-11-25 22:49:43 +01:00
Alug d1a74e3d40 replace localangle assignments with P_ForceLocalAngle
just a little neater, there also was a function to force the player angle, but this most likely wouldve changed behavior
2025-11-25 22:49:16 +01:00
Alug 5d71043df6 some mobj interp fixes
copy pasted from RR thx
2025-11-25 21:18:26 +01:00
Alug 9952d9a036 . W
:mompie:
2025-11-25 20:25:18 +01:00
Alug f8a569457e fix compile with HAVE_DISCORDRPC 2025-11-25 20:21:32 +01:00
Alug c2c7bee94a init a few more globals that were missed
i love globals that are in the middle of files.....
2025-11-25 20:14:41 +01:00
Alug 1aacb506cf d_netcmd: use cleanup macro for map and localskin command
did Command_Map_f really leak memory all the time? lul
2025-11-25 19:18:53 +01:00
Alug 9dd6b74082 move M_ResetDemoList hack to G_InitNew 2025-11-25 19:15:25 +01:00
Alug 3c58056169 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2025-11-25 17:47:57 +01:00
Alug dc80539f3b bring back addon name scroll that was lost
oopsie
2025-11-25 17:46:49 +01:00
Alug e3a82e6cdf clean and fixup addon menu
Hopefully should finally fix addons not showing as loaded sometimes and other issues with warning windows being unclosable, etc

lets pray this doesent cause any issues....

add a tickroutine for menus aswell, which will be called in M_Ticker

courtesy of Ring Racers
https://gitlab.com/kart-krew-dev/ring-racers/-/commit/bc9f9d740a0262c249917a37e250ef0209185b12
https://gitlab.com/kart-krew-dev/ring-racers/-/commit/8312f12d6cae934ae8de7e46da231c311f4b4fde
https://gitlab.com/kart-krew-dev/ring-racers/-/commit/6e671d4894e56cd3af09d6e9af2635f030817361
2025-11-25 17:41:49 +01:00
Alug 7b260aebe0 do some more cleanup when shutting down graphics system
make sure we free all our opengl allocated stuff by calling HWR_Shutdown
make sure we also destroy our sdl texture, renderer and window if the exist
2025-11-25 16:38:05 +01:00
Alug 8c12767a0a delet more unused/empty sdl stuff
I_WaitVBL, I_BeginRead and I_EndReada
2025-11-25 15:55:04 +01:00
Alug e874d9aa6c delet some duped declarations 2025-11-25 13:15:29 +01:00
Alug bcd9559462 fix portal contents being culled erroneously also in software
also dont rember commenting those out in gl lul
2025-11-25 02:18:08 +01:00
Alug c179335512 HWR_BlendMidtextureSurface: add extra guard to check linedef alpha 2025-11-24 22:42:40 +01:00
Alug 65c4610fde fix performance regression in certain cases due to changed polygon order
wonky, needs testing as this may slow down other parts
2025-11-24 22:26:14 +01:00
Alug faada3db81 Dedicated: dont create or destroy ANY lua hud drawlist
not needed at all in dedi
2025-11-24 21:32:17 +01:00
Alug da727ef6d3 cache SRB2BACK patch on startup
this is used in a bunch of places while being pretty small, so just cache it on start
2025-11-24 21:25:26 +01:00
Alug 9aa5c30543 dont free PU_PATCH_LOWPRIORITY patches in render_none
also dont cache them either!
simply not needed at all
so save us a little work
2025-11-24 21:16:07 +01:00
Alug 3aaecc5822 Optimize: move a few strlen calls out of loops
when applicable and the input does not get modified within the loop
needs some testing incase i oversaw something
2025-11-24 20:51:53 +01:00
Alug a05413d925 fix erronous "Could not set custom resolution" warning on startup
the cvars may have not been initialised yet to anything
just return -2 and ignore
2025-11-24 20:49:45 +01:00
Alug df5cff8348 fix erronous "Could not set custom resolution" warning on startup
the cvars may have not been initialised yet to anything
just return -2 and ignore
2025-11-24 20:49:34 +01:00
Alug c43a309e5d Player Infoscreen: if availible, display player names in their skincolor
we hijack the playerinfo data field for this, and pray to the kart gods this is unused on the ms
2025-11-24 18:19:46 +01:00
Alug a77201bb20 R_QuickCamDist & R_QuickDist: turn into function and make it fixed point
since we mostly use it in fixed point maths, this just makes alot more sense
moving it into inline functions ensures that in C code this wont evaluate its arguments multiple times
2025-11-24 17:23:27 +01:00
Alug d53ecd2817 R_AllocateTextures: remove "reallocuser"
this just does... what Z_Realloc does anyways...
Z_Realloc already zeroes out the new memory it allocates
2025-11-24 17:21:46 +01:00
Alug 537b32a8a3 some misc cleanups
also account for a few more double evluations from min/max macros
and save a few angle to fixed conversions in spb handling
2025-11-24 17:01:26 +01:00
Alug 5988cc4470 Server Infoscreen: Show server kart speed instead of "Cheats"
effectively almost all servers will get flagges as having cheats enabled, so instead show the game speed
2025-11-24 16:57:27 +01:00
Alug 485ecdded5 ensure all our savebuffers are initialized
just some safety
2025-11-24 02:35:32 +01:00
Alug 028a288aff remove erronous P_RunDynamicSlopes call in P_PreTicker
we dont run preticker when we netjoin so.....
2025-11-24 01:02:36 +01:00
Alug 0bf5216e40 p_setup: move interpolator reset into P_FreeLevelState 2025-11-24 00:35:04 +01:00
Alug d62eb8cf9e move K_KartPlayerHUDUpdate to k_hud
how tf did i miss that lul
2025-11-24 00:34:31 +01:00
Alug 6ba40e3f05 K_PlayerEffectsShouldBlend: also apply when player has invulnerability 2025-11-24 00:30:11 +01:00
Alug 408528838b apply additive blending to ghosts aswell when using "playerblendeffects"
same conditions as the others
either be in sneakerboost, or go fast enough
2025-11-24 00:28:23 +01:00
Alug f64eb01775 remove erronous ";" 2025-11-24 00:15:47 +01:00
Alug 8a8cbffd12 I_CheckDesktopRes: use SDL_GetCurrentDisplayMode
instead of SDL_GetDesktopDisplayMode, as the former only returns the display mode from when the window was created, which might not reflect the actual current desktop mode.
Maybe fixes some resolutions being incorrectly reported asa having visual issues
2025-11-23 23:21:47 +01:00
Alug d038785afe I_CheckDesktopRes: use SDL_GetCurrentDisplayMode
instead of SDL_GetDesktopDisplayMode, as the former only returns the display mode from when the window was created, which might not reflect the actual current desktop mode.
Maybe fixes some resolutions being incorrectly reported asa having visual issues
2025-11-23 23:21:37 +01:00
Alug 1294f4b7c6 HACK: absuse batching system for sprites and drawnodes
use batching system without sorting for order sensitive things like sprites and transparent stuff
even despite not being "optimally" sorted, drawing them in one go, instead of directly still gives a nice speed increase in certain cases (on my ryzen 5600 i get around 120fps+ on teiai towers starting area!)
2025-11-23 23:07:51 +01:00
Alug 6afd129d32 dont free our titlescreen patches
ever...
Fixes a crash when you take ages on server join and timeout due to it.
2025-11-23 22:46:30 +01:00
Alug 447d7a8acb F_IntroDrawer: remove "highres" variable
this was ALWAYS true anyways
2025-11-23 22:06:21 +01:00
Alug 1daaa4d46a make Controller Rumble strength use changable
range from 0.25 to 4
to account for all types of controllers and such
base 1 was set around what felt good on my dualsense, not entirely sure if this is the best baseline to go with
otherwise it could still be adjusted
2025-11-23 18:49:09 +01:00
Alug a24e76d96c G_DeviceRumbleTick: get rid of magic numbers
use named constants instead
2025-11-23 18:01:05 +01:00
Alug 07664a4fd9 move gamepad led and rumble tickers into g_input
not entirely sure why i placed them in d_main and p_tick respectively
but they should be here
2025-11-23 17:49:08 +01:00
Alug 62a11b9762 HWR_BlendMidtextureSurface: fix major performance regression
big oopsie from my side
this caused textures that werent translucent to be marked with translucent in a bunch of cases, which led to them being rendered in a slower path
2025-11-23 15:46:51 +01:00
indev a451d9f495 emotes: change autocompletion behavior to work like console 2025-11-22 23:35:51 +01:00
Alug b10cd32dc0 LoadMobjThinker: revert faulty local player check 2025-11-22 21:54:46 +01:00
Alug 07f7705be6 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2025-11-22 21:25:40 +01:00
Alug 72c6ff930b HWR_ProcessSeg: fix cliphigh overflow 2025-11-21 19:50:44 +01:00
Alug 11e37ff7ca gaaah 2025-11-21 19:41:35 +01:00
Alug a48a17feee Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2025-11-21 19:41:13 +01:00
Alug d23876da88 pls 2025-11-21 19:40:04 +01:00
Alug c51e741b6f K_GetScreenCoords: fix signed overflow
why even cast that to signed......
2025-11-21 18:54:42 +01:00
Alug f811304271 fix signed integer overflow in polygon hash calculation
also gives a speedup on some maps lul
2025-11-21 17:40:06 +01:00
Alug b4d530b900 fix Wimplicit-const-int-float-conversion warning 2025-11-21 15:14:20 +01:00
Alug 1fb6c63097 fix dedi compile 2025-11-21 14:45:44 +01:00
Alug 678b085617 fix dedi compile 2025-11-21 14:44:49 +01:00
Alug b091e6f471 fix dedicated build not returning absolute path in I_LocateWad
also fixes it crashing from trying to free stack memory
since realpath/_fullpath returns mallocd memory
2025-11-21 14:44:40 +01:00
Alug d5c0c7f70a hw_batching: use polygon hash signbit to detect skywalls/horizonlines
in comparepolygons
gives a nice little performance bump of around 10-15fps in heavy cases
2025-11-20 17:27:51 +01:00
Alug ef51755096 r_opengl: smol micro optimizations
not much, mostly just avoiding redoing things
2025-11-20 16:36:12 +01:00
Alug 61f9b9d1d7 fix memoryleak when searching for iwads
I_LocateWad returns mallocd memory that needs to be freed
and our home search does not need a tmp ptr
just do as we did before and sprintf it into returnwadpath
also check home directory before the hardcoded lists like before (might speed up startup a little on nix)
also cleanup iwad search in dedi builds and apply everything there aswell
2025-11-20 02:28:19 +01:00
Alug 7a631da2b3 add missing HAVE_CURL 2025-11-20 01:35:53 +01:00
Alug 9693806b59 small fixes for gamepad indicator led stuff
- skincolors are uint8 type not uint16
- ensure desired colour is within skincolor range
- rename G_GetSkinColor to G_GetSkinColorForGamepad
- replace pointless array with single variable for current color in D_DeviceLEDTick
- remove pointless call to G_GetSkinColorForGamepad when hotplugging gamepads (G_SetPlayerGamepadIndicatorColor will call it itself when 0/skincolor_none is passed)
2025-11-19 23:31:26 +01:00
Alug b44ffd163a move this back oop 2025-11-19 22:44:26 +01:00
indev 6ed21357db Check if mobj was actually spawned before setting islocal 2025-11-19 20:18:01 +01:00
Alug a35828b7d2 OpenGL: keep around our drawnodes memory
no need to constantly reallocate new memory
we dont have renderer switch, and the next level will render drawnodes anyways
those wont grow super big also, so theres no big worry about wasting tons of memory
yes i like ceepeepee vectors, how can you tell
2025-11-19 19:12:40 +01:00
Alug d6860c2606 resize deez 2025-11-19 18:13:44 +01:00
Alug bc3f7849ac mark all batching variables with static
they are only used within this file, no need to advertise them as global
2025-11-19 18:07:10 +01:00
Alug d291b3f1e1 dont reinit our FOutVector for ogl "flashpal" 2025-11-19 18:07:10 +01:00
Alug f5c19fd3f3 simplify the vector buffer stuff
honestly doesent make that much sense in most cases to grow capacity * 2 (slightly misunderstood some stuff on implementation)
and in other cases dont need to manually check for resize
2025-11-19 02:26:08 +01:00
Alug 3519e4277d clean up some more render float maths
- dont use M_PIl in double or float maths
- dont use M_PI in float maths (use M_PIf)
- use tanf instead of tan
2025-11-19 02:13:28 +01:00
Alug b4ca919a64 reduce scope of some fps counter vars 2025-11-18 23:27:07 +01:00
Alug b2f7fc8b0d remove thread.h include, use "thread_local" for everything
we enforce c++ 17, thread_local is a c++11 extension, so this should work everywhere
2025-11-18 22:38:17 +01:00
Alug fcb2bf97e2 fix opengl portals (and its contents) being culled in some cases they shouldnt be
we do culling per our viewmatrix since a while, which wasnt properly set up for portals beforehand and used whatever was last which was then incorrectly applied to portal culling :chaobaba:
2025-11-18 22:01:59 +01:00
Alug 57e3a9eeb3 delet I_UpdateNoBlit
this didnt do anything anymore
2025-11-18 19:00:59 +01:00
Alug 9171ddf6f3 delet all the wonky timing related stuff here 2025-11-18 18:36:26 +01:00
Alug ecce53606f p_mobj: check for common mobjs first
players first, then kart items, shadows and then some srb2 things that are commonly used
makes more sense to check for all of those first everywhere, so we may skip a crapton of pointless checks in many cases
2025-11-18 16:20:19 +01:00
indev 67bf762b59 Emotes: only print 'too many frames' warning if we actually get non-empty frame 2025-11-18 12:59:06 +01:00
Alug c312380944 check if our desired screen res already is in the videomode list
before deciding to rebuild the whole list when changing the resolution cvars
2025-11-18 05:22:50 +01:00
Alug af2da11933 check if our desired screen res already is in the videomode list
before deciding to rebuild the whole list when changing the resolution cvars
2025-11-18 05:21:48 +01:00
Alug b5bb2b42bf I_FillScreenResolutionsList: shrink list if it is too large
we check against MAXMODEDESCS, which is the maximum of modes the videomode can list
just in case we really get a display with a fuckton of resolutions, which most likely wont ever be the case though
this just removes the smallest modes from the list (accounting for the canonicals), to keep things simple
2025-11-18 04:55:50 +01:00
Alug d074f375ca M_VideoModeMenu: make sure red marked modes take precedence 2025-11-18 04:55:45 +01:00
Alug 6fd14f0a80 M_VideoModeMenu: remove old video mode dupe check 2025-11-18 04:55:41 +01:00
Alug d6bbb2c1b3 use static buffer for windowedModes names
no need to worry about memory management here :chaosleep:
2025-11-18 04:55:36 +01:00
Alug fa66b87965 cmp_resolutions: compare by numbers directly
instead by comparing it with strings
2025-11-18 04:55:30 +01:00
Alug c59d5db03e Merge remote-tracking branch 'origin/Saturn-Next' into vidmodestuff 2025-11-18 04:55:22 +01:00
Alug 32a75d2fbc I_FillScreenResolutionsList: shrink list if it is too large
we check against MAXMODEDESCS, which is the maximum of modes the videomode can list
just in case we really get a display with a fuckton of resolutions, which most likely wont ever be the case though
this just removes the smallest modes from the list (accounting for the canonicals), to keep things simple
2025-11-18 04:54:25 +01:00
Alug 46c26a7237 M_VideoModeMenu: make sure red marked modes take precedence 2025-11-18 04:54:25 +01:00
Alug f43d2ef4d0 M_VideoModeMenu: remove old video mode dupe check 2025-11-18 04:54:25 +01:00
Alug 83c99719c3 use static buffer for windowedModes names
no need to worry about memory management here :chaosleep:
2025-11-18 04:54:25 +01:00
Alug 091ec82048 cmp_resolutions: compare by numbers directly
instead by comparing it with strings
2025-11-18 04:54:25 +01:00
Alug 8cf736ff73 G_DoPlayDemo: fix maybe unitialized warning
in this case this wouldve been fine, tho variables using the cleanup macro should always be initzialized for safety
2025-11-17 21:59:10 +01:00
Alug 71f4a8f77d Optimize: Use doomednum lookup also when (re)spawning mapthings
not just for loading savegame thinkers
Actually even provides slight runtime performance improvement, but mostly makes levelload faster
2025-11-17 20:07:04 +01:00
Alug 18bf1a117d remove old xcode stuff
apparently this does not work at all, and instead cmake can be used on macos
2025-11-17 04:42:02 +01:00
Alug 00f7f0aa36 remove sdlsound, provide dummy sound instead
sdl sound was completely broken, so just provide a blank dummy interface instead, when compiling without sdl or mixer
2025-11-17 04:33:11 +01:00
Alug 08aaf6929c Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2025-11-17 04:05:15 +01:00
Alug 8559e518fa bugger off sdl libs 2025-11-16 23:41:11 +01:00
Alug 4d31f9fd2c Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2025-11-16 23:38:10 +01:00
Alug a483d53c5e oopsie broke texture offsets 2025-11-16 15:25:21 +01:00
Alug f589c352b3 delet cv_birdmusic toggle
stuff was from ages ago, we can just check for the feature toggles instead
2025-11-16 15:03:34 +01:00
Alug 8ec431acb2 mixer_sound/s_sound: remove all the pointless "else"
+ some tiny optimizations here and there
2025-11-16 14:37:21 +01:00
Alug 7097e26a71 Renderer: port some texture skewing fixes from SRB2
- ffloors on the frontsector in opengl now support texture skewing like software
- alot of cleanups, simplifycation and optimizations
2025-11-15 19:31:33 +01:00
Alug e796465b7e hw_main: some smoller optimizations
- use sqrtf for fade/tint alpha for shaderless light calc
- save recalcing the cosine/sine from angle on angled flats 3 times in HWR_RenderPlane
- precalc float "int32 min/max "
2025-11-14 13:31:43 +01:00
Alug 751c03d4a8 fail loudly if sdl window/renderer/gl context creation fails
this will crash eitherways, so much rather get atleast a somewhat more informative error
2025-11-14 12:35:35 +01:00
Alug e8f2dc2695 fix some shadowed variables 2025-11-14 06:00:32 +01:00
Alug 2bc73180bb CMAKE:fixup bunch of stuff
- Add saturnpak, saturnjoin, screenfbo settings
- Add libbacktrace stuff (hope thats correct)
- set openmpt, discordrpc and libbacktrace as optional libs
- move asset hashes to d_main, fixing CMAKECONFIG (which fixes commit stuff)
- propely handle md5 sources
- set "-rdynamic" and "-g" (-g1 on non debug builds) so libbacktrace can get proper backtraces
2025-11-14 06:00:16 +01:00
Alug 903fffe934 our windoze lib directory is libs not thirdparty 2025-11-13 20:06:15 +01:00
Alug b5a3296276 copy pa- uuhh port blankarts cmake build stuff
it actually compiles an executable that even starts!!!
TODO:
- fix windoze lib stuff, we dont use cpm
- fix git commit related stuff (shows just "illegal" on titlescreen)
- readd saturn specific things like saturnpak, fbo etc
- fix  CMAKECONFIG
2025-11-13 19:52:35 +01:00
Alug e9d9013fa1 fix sourcefile for src dir 2025-11-13 19:48:06 +01:00
Alug 3fa5f3f99f CMake: add missing files to cmakelists
lol it actually almost compiles again
2025-11-13 19:01:02 +01:00
Alug 6e1570e443 PT_ReceivedGamestate: add missing SATURNPAK ifdef 2025-11-13 19:00:06 +01:00
Alug dc1495902f HWR_DoWipe: always draw a black screen if it returns early
otherwise this just flashes like crazy should there ever be any issue here
2025-11-13 17:38:27 +01:00
Alug f20cdbcf2c cleanup some wonky float/double maths 2025-11-13 17:37:30 +01:00
Alug ddd1cc1dcd HWR_SkyDomeVertex: tiny optimization
save a tiny bit of float division, use float sin and cos functions, handle implicit float conversions
2025-11-13 16:45:10 +01:00
Alug 0aa31d705f ensure byteColor_t is packed
make sure it is always sized 4 bytes and not padded at all since that is assumed to be the size
2025-11-12 19:04:26 +01:00
Alug 963697c6f5 initialize all remaining globals
well atleast all i can find lel
2025-11-12 16:49:16 +01:00
Alug 654740de0d GL_UpdateTexture: fix small oversight
from when i refactored it
GL_TEXFMT_AP_88 needs to increment the image data ptr even if chromakeyed
2025-11-11 22:39:13 +01:00
Alug 0b91751999 use clamp macro for output frac in I_GetTimeFrac 2025-11-11 17:12:26 +01:00
Alug 293cbb7646 absolutely horrific and ugly kart waypoint check optimization
dont constatnly recheck the uh input players distance to waypoints for all players to check against
saves around 50-350 distance checks per tic (depends on the map)
this is only so ugly and hacky because we need to preserve a vanilla bug that cuts the waypoint distance in half for the last player in the player arrays lmao
2025-11-11 17:11:15 +01:00
Alug b16db76f1e super ugly and wonky P_MobjCeiling/FloorZ optimization
cache the subsector if the test points didnt change between calls
2025-11-11 17:09:20 +01:00
Alug d8b2b8394a only call netkeepalive between calls during gl precache
this caused some crashes in blankart, hopefully this is fine though
2025-11-11 14:18:21 +01:00
Alug 6133a89220 gl_viewludsin/viewludcos is only needed for sprite billboarding
which is not needed with shearing
2025-11-11 14:17:41 +01:00
Alug 08750016b0 smol optimization R_NoEncore
reuse secspecial for invertencore check
2025-11-11 14:16:00 +01:00
Alug a27787b417 initialize most of our global variables
just to be safe, not really trusting the game at this point, maybe this helps with some obscure bugs or smth lel
2025-11-11 14:15:19 +01:00
Alug b6edc90553 mark resolutions listed above the current dektop resolution in red
as they lead to visual errors in openglmode without fbo support
2025-11-09 22:20:57 +01:00
Alug f4384f1af6 mark resolutions listed above the current dektop resolution in red
as they lead to visual errors in openglmode without fbo support
2025-11-09 22:20:47 +01:00
Alug b4c7a3bf15 raise MAXWINMODES to 128
YES WINDOWS THANKS VERY MUCH SUPER COOL OF YOU
2025-11-09 21:45:19 +01:00
Alug 8903963b79 make sure the default 320x200 mode exists 2025-11-09 21:45:15 +01:00
Alug 8bc3fe351b reduce the scope of this 2025-11-09 20:41:14 +01:00
Alug 23735121ff raise MAXWINMODES to 128
YES WINDOWS THANKS VERY MUCH SUPER COOL OF YOU
2025-11-09 20:40:03 +01:00
Alug 20950b698f make sure the default 320x200 mode exists 2025-11-09 20:39:58 +01:00
Alug 44df85d6a4 reduce the scope of this 2025-11-09 20:41:24 +01:00
Alug 42d53f1f6f Merge branch 'Saturn-Next' into vidmodestuff 2025-11-09 20:36:00 +01:00
Alug 48f2d0ff83 make sure our custom res fits within MAXVIDMODES
33 are alot so this probably will never be the case (i hope)
2025-11-09 20:21:30 +01:00
Alug a1266e7353 make sure our custom res fits within MAXVIDMODES
33 are alot so this probably will never be the case (i hope)
2025-11-09 20:21:21 +01:00
Alug 517723f9c1 handle custom res differently + make VID_NumModes return actual vidmodes
custom resolutions now will be put into the resolution list
which means they are selectable from the menu
2025-11-09 20:16:44 +01:00
Alug 889734446d handle custom res differently + make VID_NumModes return actual vidmodes
custom resolutions now will be put into the resolution list
which means they are selectable from the menu
2025-11-09 20:16:18 +01:00
Alug 6915077e0f refresh the video menu list if our resolution list changes
if you move the gamewindow to a different display, the video menu will now upadate to the new resolutions
2025-11-09 19:16:36 +01:00
Alug 35e3dea115 refresh the video menu list if our resolution list changes
if you move the gamewindow to a different display, the video menu will now upadate to the new resolutions
2025-11-09 19:16:04 +01:00
Alug 406dbf333d use a video_mode_t thing for our custom resolution
perhaps we may merge it into windowedmodes? not sure
but this works for now
2025-11-09 19:13:38 +01:00
Alug a730dfd212 fix checking for if display changed 2025-11-09 19:13:35 +01:00
Alug 3058d365f3 no need to call I_FillScreenResolutionsList everywhere
its fine after startup, and when we move our window
2025-11-09 19:13:31 +01:00
Alug ccc453e0b0 fix windowmoved never resetting 2025-11-09 19:13:28 +01:00
Alug c3d02090e4 WIP: remove hardcoded resolutions
much thanks dsda-doom for most of the code for this
TODO:
- resolution menu needs to refresh if the list changes
- clean up
- handle custom resolutions more sane
- figure out the best maximum resolution list size the menu can display
2025-11-09 19:13:25 +01:00
Alug 20cd7621c3 delet numVidModes
wasnt doing anything
2025-11-09 19:13:22 +01:00
Alug 8cfdff8bdc use a video_mode_t thing for our custom resolution
perhaps we may merge it into windowedmodes? not sure
but this works for now
2025-11-09 18:54:20 +01:00
Alug c348d3212f fix checking for if display changed 2025-11-09 18:53:26 +01:00
Alug 799ae9962f no need to call I_FillScreenResolutionsList everywhere
its fine after startup, and when we move our window
2025-11-09 18:52:53 +01:00
Alug 509fd7eaff fix windowmoved never resetting 2025-11-09 18:51:58 +01:00
Alug f1b5f9970b WIP: remove hardcoded resolutions
much thanks dsda-doom for most of the code for this
TODO:
- resolution menu needs to refresh if the list changes
- clean up
- handle custom resolutions more sane
- figure out the best maximum resolution list size the menu can display
2025-11-09 18:35:27 +01:00
Alug 553b6858c6 delet numVidModes
wasnt doing anything
2025-11-09 17:52:46 +01:00
Alug 392ec4288b delet duped gldebugmessage define
lel
2025-11-08 13:29:14 +01:00
Alug 2ae3049d8e enable software cyan pixel "cutting" for flats by default 2025-11-08 12:30:45 +01:00
Alug 95b01c9b43 call NetKeepAlive during ogl precache
should prevent timeouts on slower systems (*cough* *cough* windoze *cough*) hopefully
thx neppy for the idea!
2025-11-07 21:28:28 +01:00
Alug d7f9810b74 use early returns for "I_Finish" stuff
i like that more, less checks for stuff
2025-11-07 21:26:55 +01:00
Alug 3375cc5684 unconditionally clamp out timefrac
0 -  FRACUNIT range
2025-11-07 17:11:29 +01:00
Alug 6c1c713cac test: replace the timing system
i watched a random youtube video at 3am moment
this mostly gets rid of the global timestate in favor of tracking the time from gamestart to calling I_GetTime/Frac
this is more in line with most doom source ports handle it
2025-11-07 16:24:08 +01:00
Alug a4364c3de9 sound precache: add option to keep sounds cached but not precache them
ugh i suck so much at explaining
this is the default now pretty much
2025-11-06 20:40:28 +01:00
Alug 53d5a649b9 simplify srb2::floattofixed
my tired ass didnt think about just reusing shit kek
ty indev <3
2025-11-06 19:01:35 +01:00
indev 08ca1184b7 Push empty string instead of null if len == 0 in lua_pushlstring 2025-11-06 18:48:06 +01:00
Alug fd9ce29e6e lib_concat: fix zero lenght string case
continue the loop, not return, it might just be an empty line, so returning might break some luas
0 lenght would make realloc allocate nothing at all, so just skip it
2025-11-06 18:44:26 +01:00
Alug 249d2baf13 smol cleanup JoyAxis stuff & g_game 2025-11-06 17:37:04 +01:00
Alug d97742fce3 delet M_Memcpy
was just a wrapper for memcpy eitherway
so should make no difference other than avoid any confusion
figured i could just use "sed" command lel
2025-11-06 17:35:07 +01:00
Alug d85011cd0f software renderer: handle some float type related issues with slope drawers
there were a bunch of cases where inf and nan float results were casted and used with integer things, which well is undefined behavior in c

yes i did use ceepeepee for that crap, cause the cases i found both gladly were ceepeepee files and this wouldve been really annoying without templating types
if someone really wants that crap to use outside ceepeepee, feel free to make a bunch of wrappers cause im too lazy for that stuff
2025-11-05 23:42:06 +01:00
Alug 37c54d7abe R_AllocClippingTables & R_AllocTextureColumnTables: fix nullptr arithmetic 2025-11-05 22:53:10 +01:00
Alug c354be41bf R_DrawPlanes: dont increment garbage ptr
does not need to be there at all eitherways
2025-11-05 22:04:56 +01:00
Alug 838ed2a389 set "-Wno-cast-qual" for clang
see comment
2025-11-05 21:29:01 +01:00
Alug 453d96c939 fix SINT8 write macro, fix big endian READUINT32 macro 2025-11-05 21:28:24 +01:00
Alug 911b7c01a8 use "offsetof" for skydome vbo offsets
silences UBSAN complaining about accessing struct members through null ptr
2025-11-05 21:27:35 +01:00
Alug d3918d9281 Revert "simplify vhs effect interpolation"
This reverts commit e26fb91350.
2025-11-02 14:37:08 +01:00
Alug 0edbd768a8 fixup: replace stricmp with fasticmp
actually replace everything correctly
my dumbass forgor about the fast both strcmp and stricmp matter in sort stuff so we cannot use the fastcmp stuff there, which means we should not redifine stricmp as fasticmp in case something relies on that behaviour ugh
2025-11-01 23:24:03 +01:00
Alug c0cd51c6d2 do some smol cleanup r_skins
mostly style fixes, some minor caching for some things
2025-11-01 22:34:41 +01:00
Alug 9b19875516 fix wonky variable names 2025-11-01 20:57:55 +01:00
Alug d370094113 remove auto/postload check variables
we can just check our counts since D_FindAddonsToAutoload will never be called again
2025-11-01 20:53:21 +01:00
Alug 7a8614951e pass our file counts to W_InitMultipleFiles
smol opzimiation, skips some ptr deref
2025-11-01 20:48:30 +01:00
Alug 73726c4812 cleanup and optimize startup wad handling 2025-11-01 20:00:43 +01:00
Alug fc6ebca065 postautoloaded can be static
not used outside of d_main
2025-11-01 19:36:28 +01:00
Alug 1fd79aac62 throw motion blur effect stuff behind an ifdef
so we can get rid of the unused array
prob could just remove it at this point, but maybe ill fix it someday for the funnis
2025-11-01 19:28:41 +01:00
Alug 092e061092 optimize addon autoload handling 2025-11-01 19:20:04 +01:00
Alug b0fe13836b removed unused autoload variables
M_ConnectMenuModChecks been checking an uninitialized bool the whole time Zzz...
2025-11-01 18:28:58 +01:00
Gustaf Alhäll 7992888df6 Add -workdir 2025-11-01 18:13:56 +01:00
Alug 343b12e5ef make a toggle for using angleturn in replays
while this is more accurate to how the player experienced stuff in the actual game, this also can be somewhat jittery and stuttery depending on the net conditions the replay was recorded in, so make this toggable if someone wants it
2025-11-01 16:32:04 +01:00
Alug 33d2c2b2bb add cv_precachetextures to advanced video options 2025-11-01 16:25:43 +01:00
Alug 6c618fc796 dont precache anything ever in HWR_PrecacheLevel if disabled
before some cvar callbacks called this unconditionally
2025-11-01 16:12:05 +01:00
Alug c9c19deff9 HWR_PrecacheLevel: disable sprite precaching
in some cases this may lead to crashes, its mostly useless in gl eitherway due to how colourmapped sprites work
2025-11-01 15:39:21 +01:00
Alug fcb13f15c1 Mipmaps: fix translucent textures turning black
i.e. since we allow texture filtering on translucent textures now, the min filter may specifcy one of the mipmap filters, this means we NEED to call GL_GENERATE_MIPMAP and set the LODs for them, otherwise no texture will be generated
alternatively we could do a bunch of special cases for the mipmap filters, but this is simpler
2025-11-01 15:33:13 +01:00
Blue Staggo e28bbf1a62 Give midtextures filtering without ugly borders + Clean up padding code
Couldn't do proper translucent blending on midtextures because of wrapping.
2025-11-01 15:12:19 +01:00
Blue Staggo 63c1561b5a Oops, forgot to disable padding for nearest texture mode 2025-11-01 15:02:33 +01:00
Blue Staggo 7157ba77fe Optimise padding algorithm 2025-11-01 15:02:15 +01:00
Alug 9566a505a0 SV_StopServer: reset textcmdbuf
fixes an issue where in some rare cases, the game may get stuck in a weird limbo state due to the text command buffer being full and never be cleared, so netxcommands can never be executed
2025-11-01 03:00:19 +01:00
toaster f545acec82 SV_StopServer: Use G_SetGamestate instead of a direct write
An apparent oversight identified while working on the previous commit.
2025-11-01 02:16:33 +01:00
Alug f3a883f00b md5: raise block buffer size to 64k
did some benchmarking and this was more or less the best size in terms of performance, gaining around 20-25 mb/s on my system
2025-10-31 20:25:43 +01:00
Alug fc29240fc4 make this intent more clear for non GLENCORE compile 2025-10-31 02:26:50 +01:00
Alug 69a401c679 "delet" HWR_InitMapTextures
we currently dont need this, gl_textures were already initialized due to being "static" (still explicitly init it to NULL)
this would only be useful for renderer switching, which we dont have
2025-10-31 02:23:28 +01:00
Alug b7a204dbfa GL encore: use struct for encore texture handling
struct with two sets of maptextures, one for normal another for encore textures
functionally identical, hopefully also performancewise
more explicit than doing this with just one set and indexing stuff :bloblcatpats:
2025-10-31 02:20:53 +01:00
Alug 74a95ae012 HWR_PrecacheLevelFlats: only run flat encore case when having an "encoremap"
not when its just encore mode
might save some time on some maps, as we dont need to check for remapping
2025-10-31 02:01:30 +01:00
Alug 80275e61e6 Revert "i_tcp: reset errno in UDP_Bind and SOCK_Send"
This reverts commit 189ef47795.
2025-10-30 18:19:29 +01:00
Alug b70172f0a0 Revert "Have Lua_OnChange restore the stack to what it was before it was called."
This reverts commit b49a3c6c7d.
2025-10-30 18:03:04 +01:00
James R 4ebc8b54ec Pass const pointer to all netxcmd handlers
Ensure buffer data is read-only and not modified by
handler
2025-10-30 16:54:00 +01:00
Alug d9d6ce622f fix stuff from merge conflict 2025-10-30 16:13:19 +01:00
toaster d177f15790 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.
2025-10-30 16:00:27 +01:00
Alug 5194615c61 consolelib: fix some early returns not properly cleaning lua stack 2025-10-30 15:58:03 +01:00
James R e9c2c71352 Got_Luacmd: always read netxcmd data, even if command is not executed 2025-10-30 15:47:22 +01:00
Eidolon 8762604db3 Check Lua stack before pushing cons args
Prevents a Lua stack overrun when executing absurd console commands for
local-only lua commands.
2025-10-30 15:46:57 +01:00
James R 8299386664 Got_Luacmd: ensure lua stack is large enough for command arguments 2025-10-30 15:45:43 +01:00
Monster Iestyn c236cb495b Fixes for lib_cvRegisterVar (the Lua version of CV_RegisterVar):
* Make sure the consvar's properties are all initialised to zeros as defaults
* Error if the consvar is not given a name
* Error if the consvar has CV_CALL but no call function
* Error if the consvar has CV_NOINIT but not CV_CALL
2025-10-30 15:44:04 +01:00
GoldenTails b49a3c6c7d Have Lua_OnChange restore the stack to what it was before it was called.
So we don't get Luas with access to LUA_GetErrorMessage.
2025-10-30 15:42:07 +01:00
James R 132fa3a57c Replace LUA_PushLightUserdata with LUA_PushUserdata
See c92378fa and a7e20f70. I didn't realize that light
userdata's metatable is shared--like numbers or strings.
So it cannot be paired with a metatable.

I also made a few minor tweaks to Lua cvars, other than
accounting for the double pointer in the userdata.
2025-10-30 15:40:11 +01:00
Alug 1dd1852c72 LUA_RawPushUserdata
"Same as LUA_PushUserdata but don't set a metatable yet."
from RR
2025-10-30 15:33:42 +01:00
Alug 4d032b727e delet this
remove bluajit, theres no chance at this point of this ever returning
2025-10-30 15:25:01 +01:00
Alug 2b607ccd4a UDP_Bind: check socket send buffer size aswell
if to small than adjust, like receive buffer
2025-10-29 22:53:09 +01:00
Alug 189ef47795 i_tcp: reset errno in UDP_Bind and SOCK_Send
on non WINSOCK systems
2025-10-29 22:22:14 +01:00
Alug e97a8ae856 SOCK_GetAddr: freeaddrinfo does not need to be called on getaddrinfo failure 2025-10-29 16:24:44 +01:00
Gustaf Alhäll e1ba0a8a6f Fix buffer underflow when querying invalid nodes 2025-10-29 16:00:20 +01:00
Alug 4ab139f2a2 some i_tcp fixes
- SOCK_Get return true when receiving good packet from a lan player
- SOCK_GetAddr fix handling of ipv6 addresses

taken from srb2/classic
2025-10-29 15:59:45 +01:00
Alug 7fe054818f Merge remote-tracking branch 'origin/lugstuff' into lugstuff 2025-10-28 15:15:34 +01:00
Alug 8b11d5a453 simplify addonsonly reset a little
if we only load addons we always end up in the abort case, either by manual cancelling or by itself
2025-10-28 15:15:26 +01:00
Alug c3402f25b4 remove reduntant stuff from D_ClearState and G_StopDemo
we only need R_ExecuteSetViewSize from splitscreen_onchange, the rest doesent do anything due to SV_StopServer call earlier setting cl_mode to CL_ABORTED
SV_StopServer also calls Y_EndIntermission and Y_EndVote if necessary
2025-10-28 01:21:26 +01:00
Alug 2a71cefa89 P_TryMove: save one R_PointInSubsector call per player
by reusing the special sector calculated earlier, this didnt change for when its checked another time
also one fixedmul in P_SceneryTryMove in some cases
2025-10-28 00:47:12 +01:00
Alug 20788cb233 rename subsector variable in P_TryCameraMove to be more descriptive 2025-10-28 00:11:49 +01:00
Alug b80ce40f0d add NOHOLEPUNCH flag to disable holepunch entirely 2025-10-27 22:58:17 +01:00
Alug 862fb0e86a update ms listing if fakeseed was changed 2025-10-27 22:47:10 +01:00
Alug 4f86c84d04 add "Fake Seed" system
allow sending a fake player to the ms and serverbrowser when your dedicated server is empty
effectively functioning as a "seed" player without manual intervention and occupieng a server slot
2025-10-27 22:24:08 +01:00
Alug 610d2a0153 use strlcpy for filling playerinfo names
MAXPLAYERNAME+1 so it copies 21 and null terminates the last
2025-10-27 21:20:39 +01:00
Alug 4a2e6f183b use square button for controller
idk forgor wtf that is on non ps controllers lel
2025-10-27 19:32:10 +01:00
Alug 04bd9b5430 move map icon free into function to dedupe stuff 2025-10-27 19:27:54 +01:00
Alug d30b373b1f WIP: Button to only load addons instead of joiining a server
currently only implemented for the viewserver screen
menu handling absolutely sucks
2025-10-27 19:25:59 +01:00
Alug 42801eb924 make this stuff less stoopid lel 2025-10-27 18:16:33 +01:00
Alug da9281bd35 DrawTiltedSpan: more micro optimize
- do pointerdiff outside the loops, no need to do them 16 times per span
- cache tiltilighting and planezlight, mark as const and restrict, should help he compiler deciding on better optimizeations for this
2025-10-27 00:50:30 +01:00
Alug d20321f49b stupid ass netcode
ok lets try this mess again
makes netgames considerably less shitty somehow
2025-10-27 00:21:44 +01:00
Alug bf6500977f fix clang warnings 2025-10-26 14:04:50 +01:00
Alug 625b7192e8 drawspan: some type fixes, mark const and reordering 2025-10-26 14:04:38 +01:00
Alug ef76e08edb fix software hiding the wrong thing in video options 2025-10-26 02:19:25 +01:00
Alug 6cf86d6cb3 fix wipes sometimes not working
Zzz.....
forgor wipes do their own weird loop
2025-10-25 23:10:53 +02:00
Alug 03751e1b59 simplify vhs effect interpolation 2025-10-25 22:32:43 +02:00
Alug 0943e0ed3a rename most "gamma" vars to "brightness"
lots of confusion
but it does more brightness adjustment than gamma adjustments, yes this does some gamma correction but not user changable global gamma adjustments like globalgamma
uhhh
2025-10-25 22:16:35 +02:00
Alug d358cc264b Port RR´s gamma correction + split gamma and brightness
port of https://gitlab.com/kart-krew-dev/ring-racers/-/commit/e27506c660933e19dbcfe9ec776caf7819952e30
not cherry picked since it differs too much it would be hellish to untangle (sry!)
Gamma is split from brightness since both do somewhat different things in the context here
2025-10-25 22:01:22 +02:00
Alug c267e5f372 fix some tooltips issues, wording and inconsistencies
fbo also now supports from gl 2.1
2025-10-25 20:38:51 +02:00
Alug ee10559f67 fix oopsie that broke name change 2025-10-25 14:25:30 +02:00
Alug 9a6f0cebfb fix some messed up whitespaces lel 2025-10-24 21:57:28 +02:00
Alug 695e1b4a89 experiment: replace every strcasecmp with fasticmp
same as before, tho this is not twice as fast but atleast 1/3 faster
2025-10-24 21:50:12 +02:00
Alug ef709567ce experiment: replace every strcmp with fastcmp
did some profiling and in basically every single test fastcmp was twice as fast as strcmp
maybe this speeds up some things
2025-10-24 21:37:41 +02:00
Alug 863d9efbab remove those memsets
not needed anymore now
2025-10-24 18:29:08 +02:00
Alug 3e0ec834fd this can be alot smoler 2025-10-24 18:27:30 +02:00
Alug 225c589815 initialize input events to something 2025-10-24 18:26:42 +02:00
Alug c505281dc4 refactor controller dpad menu repeat handling
dont hack around manually checking for state checks
just use sdl provided stuff and poll if a dpad button currently is being held
2025-10-24 18:17:17 +02:00
Alug 6e1df09a20 forgor about localskin menu
Zzz....
2025-10-24 16:09:43 +02:00
Alug b47ee7b402 oop didnt mean to move this 2025-10-24 15:39:30 +02:00
indev 08c751a33d Skip repeating backslashes in HU_DoCEcho when printing to console 2025-10-24 15:38:40 +02:00
Alug 3b56e0dc4a dont double print kitchen sink message to log
we already handle this in HU_DoCEcho
2025-10-24 15:33:44 +02:00
Alug 3ed3c6a688 fix oob access in D_SetupVote
check if luamaps was set before
2025-10-24 14:24:08 +02:00
Alug 5bfa7f9c4c Revert "SDLSetMode: render immediately after resolution change to avoid 1-frame of texture presented at wrong size"
This reverts commit caed90392a.
2025-10-24 04:08:08 +02:00
Alug 3761d4d13b move those to D_ClearState 2025-10-24 03:47:50 +02:00
Alug 7845aa1437 do some cleanup g_demo
:shook:
use the CLEANUP macro everywhere
init some things that may not be initialized
and make this more readable
lets hope didnt break anything Zzz...
TODO: if there are still issues with demo records and stuff crashing might consider porting some of the fixes from RR
2025-10-24 03:37:03 +02:00
Alug 8c6452bf7c smol cleanup V_DrawVhsEffect
dont need to assign all the software stuff in gl mode
2025-10-24 03:35:25 +02:00
Alug b832ddde09 use D_ClearState in G_StopDemo
actually fixes issues with crashes AND palette reset
also resets a bunch of more stuff which def is good
2025-10-24 03:34:47 +02:00
James R. caed90392a SDLSetMode: render immediately after resolution change to avoid 1-frame of texture presented at wrong size 2025-10-24 01:54:07 +02:00
Alug ffb0927626 initialize sdl window,renderer and texture to something 2025-10-24 01:52:53 +02:00
Alug 898bb8f091 Merge remote-tracking branch 'origin/lua-check-local-addon' into lugstuff 2025-10-24 01:01:51 +02:00
Alug 9d944a2c68 forgor to revert this oops 2025-10-24 01:01:47 +02:00
Alug 5218a231b2 use strl instead of strn stuff to copy cecho text
ALOT safer than whatever this did before
2025-10-23 20:51:11 +02:00
Alug dd8f5b8dd8 fix CECHO text being overwritten with nothing
strlcat not strlcpy
2025-10-23 20:37:41 +02:00
Alug 7b5691c6e8 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2025-10-23 11:24:47 +02:00
Alug 9ff65e8c5e clean up controller dpad input handling
just treat them as "normal" buttons instead of manually polling for them
alot cleaner and gets rid of yet another polling loop
also clean up some other stuff
needs to be tested with multiple controllers in splitscreen but cba to do that atm
2025-10-23 10:53:41 +02:00
toaster f88b7a798d Simplify intermission timer code
- We had two ways of ending the intermission, but only one would actually be used, and it resulted in code duplication.
- Combine the two ways.
- Disable the reached-but-didn't-do-anything-before-now code path for setting endtic.
2025-10-22 23:08:15 +02:00
Alug 6c346bf362 cleanup + optimizations mixer_sound
thx indev for the better ms rounding code <3
2025-10-22 22:52:52 +02:00
Alug c2314e723e handle more memory allocation failure cases
reported with -Wformat-overflow
2025-10-22 16:02:24 +02:00
Alug bbace08475 fix namescrollbuf and mapmusic.name copies
ensure those are properly null terminated
as reported by ubsan
2025-10-22 15:34:24 +02:00
Alug 2626d2fb85 fix playersetup skin speen reading out of bounds
reported by ubsan
2025-10-22 15:33:09 +02:00
Alug 85b4eb3e3c uninline ctf resynch stuff
this wont ever be used and just makes lto and others complain occasionally (maybe frenmod uses ctf? forgor)
2025-10-22 15:32:38 +02:00
Alug f18b4b1d4d fix replays occasionally crashing when stopping
due to R_ReInitColormaps our extra_colormaps pointer may be freed
fixes crashes in software and palette render mode
2025-10-22 13:44:16 +02:00
AJ Martinez b83486af23 Fix unsteady camera movement in demos 2025-10-22 10:45:45 +02:00
toaster 805c8a5d35 Don't send a netxcmd when using addfile outside of netgame
Was supposed to be happening already, but `multiplayer` is a useless variable...
2025-10-22 10:40:04 +02:00
Alug a294f0aa95 remove erronous ";" 2025-10-22 10:38:22 +02:00
Alug 9b34e0f996 call R_SetupFreelook in R_ExecuteSetViewSize
to instantly update our now stale yslope pointer!
fixes random crashes when switching numbers of splitviews in replays
2025-10-21 19:26:01 +02:00
Alug 39df580e06 fix R_MakeSpans accessing "spanstart" out of bounds when in splitscreen
it gets allocated for viewheight not vid.height!
2025-10-21 19:24:56 +02:00
Alug f9cb09c1ba init few more things 2025-10-21 18:24:14 +02:00
Alug 85b5a6f5ed remove unused maskdraw_t struct 2025-10-21 18:00:54 +02:00
Alug 9bee113209 initialize a bunch of stuff that gets passed to realloc 2025-10-21 17:52:01 +02:00
Alug 29dcab257a Revert "Fix ghost hitlist causing zone errors (closes #118)"
This reverts commit 33147a188f.
2025-10-21 16:06:25 +02:00
Alug 3568b8511c fix 4th player background not drawin in gl in 3 player splitscreen 2025-10-21 15:42:23 +02:00
Alug 696616158a fix splitscreen view in gl 2025-10-21 15:25:33 +02:00
Alug 630c436b06 m_menu: add textinput special case for playername string
itself it already checks to not write out of bounds, this is mostly just to fix visual issues
kind hacky, but works for now
2025-10-21 14:44:43 +02:00
Alug 022fd09021 use "viewssnum" for shadowdir stuff 2025-10-21 05:48:37 +02:00
Alug db41ec7df7 use malloc for spawnstate mapdata copies
they might be somewhat large and get completely overwritten eitherway so save us the 0 init
2025-10-21 05:48:36 +02:00
indev 8c8cfb7c9e Fix possible buffer overflow in M_TextInputSetString when string length is greatter than buffer length 2025-10-21 00:49:16 +02:00
Alug c02e7aa637 rename 2025-10-21 00:49:05 +02:00
Alug 0397ff59d6 fix NIGHTS hoop hoopcenter
fixes visual issues when going through them
2025-10-20 19:48:18 +02:00
Alug acc05daa9a handle ceepeepee 2025-10-20 19:21:59 +02:00
Alug 8339ab9552 slightly clean up makefile
- pass "-g" on mingw builds generally after everything (needs testing)
-use "libs" instead of "LDFLAGS" (identical purpose)
- pass "mno-ms-bitfields" on gcc, shouldnt be really needed but just in case
2025-10-20 18:36:51 +02:00
Alug 72ce4eea35 R_FlushQuad: dont use 64bit/8byte copy on 32bit targets
on 32bit targets this will just compile into two 32bit copies which gcc cant optimize as well as it can with the byte copy (it seems to love to do some AVX stuff atleast in my tests)
so this is only useful for 64bit capable platforms (compiler does not seem to do 64bit copys for the byte copy case, so this ends up being faster)
2025-10-20 16:32:39 +02:00
Alug 119e022a55 R_FlushQuad: also check "source" for alignment 2025-10-20 16:03:52 +02:00
Alug 74aa7673c8 R_FlushQuad: fix column flush on odd width resolutions 2025-10-20 00:56:21 +02:00
Alug 919947fe25 remove unessecaary template branch in R_DrawColumnPixel 2025-10-19 22:59:39 +02:00
Alug 82e6fd2d3a no need to pass anything to R_InitViewBuffer 2025-10-19 22:19:11 +02:00
Alug b8374f2700 add USEUBSAN compiler flag
to compile with ubsan duh
2025-10-19 21:59:14 +02:00
Alug b1ee2f8f8b R_FlushQuad: fix unaligned memory access 2025-10-19 21:56:17 +02:00
Alug ea0c624d56 macrofy column function definitions 2025-10-19 21:02:04 +02:00
Alug d3bebe8522 those should be initialised to something 2025-10-19 20:57:39 +02:00
Alug 7dd3fb128b clear our column buffer after allocation 2025-10-19 20:57:19 +02:00
Alug f5c4c1bf24 use spawn sector and line tags for P_ReloadSaveLevelData
should speed up resynch a little, now that we properly save them
2025-10-18 23:10:51 +02:00
Alug 49f853749e init taglists in P_LoadMapData
no reason to init them in P_SpawnSpecials
fixes join crashes on some maps
2025-10-18 23:04:09 +02:00
Alug a60d897eb8 add guard to vid.screens free
not super necessary but better safe than sorry
2025-10-18 21:26:23 +02:00
Alug 39269648a9 use npow2 screen textures if GL_ARB_texture_non_power_of_two is supported
apparently some gl drivers may use a slower path for streamed textures that only get partly updated, this tricks them into thinking this did a "full update" and resulting in using a faster renderpath
2025-10-18 16:52:41 +02:00
Alug ffb0f456ca fix demo_slug compiler warning
Zzz....
2025-10-18 16:14:58 +02:00
NepDisk 71d63d5a69 Update Discord RPC
Based on some of the changes from RR.
Accounts for the fact discord does not have tags anymore and makes skin code easier to manage
2025-10-18 15:46:39 +02:00
NepDisk 3aa6b1a8d8 Use a constant for file path stuff 2025-10-17 21:07:44 +02:00
James R 51405d46eb Resize menudemo_t filepath to fix -Wformat-truncation 2025-10-17 20:55:26 +02:00
Alug 7ac79eeeab turnsmoothing splitscreen player support
i hate our menus Zzz....
2025-10-17 09:24:24 +02:00
Alug eb8b27a10a change wheel input "sensitivity"
200 maps perfectly to our turn values
so the wheel now actually better reflects the inputs and does not turn fully super early uhh
2025-10-16 23:15:33 +02:00
Alug 7a8be0f77a HACK: call texture precache when toggling a setting that flushes opengl textures
workaround for batching sort issues
should be good eitherway to reduce stutters after toggling them
2025-10-16 22:21:21 +02:00
Alug 0f45f62fa8 port "Lite Steer" from RR
took me a while to realize RR makes everything go though "analogue" input handlers
2025-10-16 21:53:24 +02:00
Alug 02b2723074 fix off by one when playing with controller sticks
also simplify driftturn handling
2025-10-16 21:28:48 +02:00
indev 441bd8ccad Use str.resize(size) instead of str = str.substr(0, size) (ty lug <3) 2025-10-16 14:19:18 +02:00
Alug 94403e67e3 fix UB in R_PointOnSide
by not shifting a 32bit int by 31 bits
this is more in line with the original function eitherways
2025-10-16 14:08:17 +02:00
Alug 2eca62db79 G_SaveDemo: fix oob reads/writes for replay names
demo.titlename has a size of 65! not 128!
also handles memory failure and checks bounds for the remaining lenght in the demo slug
2025-10-16 13:54:42 +02:00
Alug 3ddb525d7f let replays with empty name save
this does not crash for us
2025-10-16 13:52:05 +02:00
toaster d4124013c3 G_SaveDemo: Resolve memory errors that could result in crashes
- Empty `demo.titlename` case
    - Don't try to save demo of name `.lmp`
    - Doesn't fall back to anything, because emptying out the name field can be reasonably treated as not wanting to save
- `demo.titlename` consists only of invalid characters
    - Don't try to save demo of name `-.lmp`
    - Falls back to the default demo title, because the user clearly wanted to save and just happened to provide invalid text
2025-10-16 13:50:21 +02:00
Alug c6a946100d delet duped stuff from merge conflict lel 2025-10-16 13:40:03 +02:00
Alug f58067bac0 add allocation failure case in R_DrawMasked 2025-10-16 13:39:35 +02:00
Alug c10ee7b21d guard against null string in stringwidth functions
hud drawlists may actually pass null to them
2025-10-16 13:39:08 +02:00
Alug 2a696f7c77 pass rover directly to check_fof_offscreen 2025-10-16 13:38:24 +02:00
Alug 58190bfbd7 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2025-10-15 22:01:54 +02:00
Alug a977f45a9a prevent potential 0 division in CV_AddValue
as repoted by clang-tidy
2025-10-15 20:36:29 +02:00
Alug 5978a2d119 force inline savegame archive stuff 2025-10-15 17:02:24 +02:00
LJ Sonic 9c8af6fa9c Fix incorrect error message during Lua archiving 2025-10-15 16:59:42 +02:00
LJ Sonic 542a29647d Do not archive nil table keys 2025-10-15 16:57:05 +02:00
Alam Ed Arias a2b8f07ef6 set CURLOPT_MAXREDIRS to 30 2025-10-15 16:51:00 +02:00
Gustaf Alhäll 8a3d0cd41c Remove WINSOCK1 support
WINSOCK2 has been supported since Windows XP and is required for IPv6,
so I don't see a reason to support it anymore.
2025-10-15 10:27:51 +02:00
Alug e427633016 mark flush error functions with noreturn
silences clang
2025-10-15 06:28:39 +02:00
Alug dbc0b324f5 delet dead code ogl models 2025-10-15 06:16:18 +02:00
Alug b32a966171 remove dead renderer code
remove
- broken viewborder code (if we really want it back for some reason, we should rather port RR´s fixed version of it)
- remove console clipping code for software (this was broken eiherway)
- remove hud message clearing stuff
- remove renderscreen and linesize variables (they just pointed to vid.screen and vid.widht)
2025-10-15 06:16:18 +02:00
Alug 928c5f7584 use stdlibs abs for CompareDrawNodePlanes
we dont need our own abs for this
2025-10-15 06:16:18 +02:00
Alug af29fe1ecc delet gl_viewwidth, gl_viewheight, gl_baseviewwindowx, gl_baseviewwindowy gl_basewindowcenterx, gl_basewindowcentery
they were effectively unused
2025-10-15 06:16:18 +02:00
Hanicef 9e1707e7a4 Fix vertical aim being off when using lack of perspective 2025-10-14 22:25:45 +02:00
Alug f34c86628e move R_SetColumnContext call
we set this later to flush eitherway for non skybox draw
2025-10-13 21:26:53 +02:00
Alug dae87fe802 use std::vector for our image buffers
this is just to have it cleaner and less code bloat
the resizing loop will almost never trigger, 1meg is enough to even rotate gigantamax eevee without needing to grow
2025-10-13 19:19:33 +02:00
Eidolon 94fdae6f21 Calculate staging buffer maximum size in Picture_Convert 2025-10-13 18:18:05 +02:00
Alug c3547812de oops missed this case 2025-10-12 23:12:18 +02:00
Alug 570466a3f0 this does not need marked as restrict 2025-10-12 22:30:16 +02:00
Alug f6425a1efa smol style adjustment span stuff 2025-10-12 22:04:17 +02:00
Alug fda47e7b9c tiny optimization span drawers
if we dont "ripple" our spans, we dont need to increment an additional pointer for them
2025-10-12 22:04:17 +02:00
Alug 62e0c2540a dont update hud during skipped frames
this was to fix issues with some lua huds looking really bad during frameskip
but this causes issues with the hud flashing during gif recording
2025-10-09 19:13:00 +02:00
Alug e7eddb8aae fix buffer overflows in dedi build too 2025-10-09 18:16:57 +02:00
K J d122f1bf96 fix: multiple additional buffer overruns
found by Zwip-Zwap_Zapony
2025-10-09 18:08:36 +02:00
Alug 2af172877e unnest fsp counter and ping display stuff 2025-10-09 18:01:02 +02:00
Alug 04a7e7a4c3 check with "__SIZEOF_POINTER__" 2025-10-08 21:38:06 +02:00
Alug 113d58d3e5 inline R_ThingLightLevel
just points to thing->lightlevel field eitherway
2025-10-08 21:36:29 +02:00
Alug 41b8f23d7e ensure columnbuffer gets flushed during portal traversal
in worst case this does nothing btw
2025-10-08 20:46:27 +02:00
Alug ed6abf1abb Merge branch 'dsdacol' into lugstuff 2025-10-08 16:52:10 +02:00
Alug d28994894a Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2025-10-06 23:31:52 +02:00
James R e089ed8c04 Read only header bytes when creating textures list
R_LoadTextures was reading in the entirety of every
texture lump, now it only reads the 8 byte PNG header.
This saved more than 1 second for me (1.68 s -> 0.24 s).

PNG still need to be read in entirely to check their
dimensions; I didn't bother looking into optimizing it
since we don't have many PNG textures right now.
2025-10-05 20:52:59 +02:00
Alug ee07b22a36 add a print to Joinable_OnChange
also change the other cvar messages to CONS_NOTICE
2025-10-05 20:38:58 +02:00
Alug 48bf6d0fd3 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2025-10-05 20:14:43 +02:00
Alug 7ee642ca8a remove unused W_LumpLenghtPwad call 2025-10-05 20:08:20 +02:00
Alug 296a645609 fix uninitialized "i" counter in R_StoreWallRange 2025-10-05 18:33:54 +02:00
Alug 75603650a6 fix oopsie in R_GenerateTexture 2025-10-05 17:37:58 +02:00
Alug d0e3744aab fix oob access in CV_AddValue and M_CanShowLevelInList
lets hope this doesent break anything Zzz....
2025-10-05 17:14:31 +02:00
Alug 3478f1ae5c dont free levelstate in D_ClearState
Titledemos be damned!
2025-10-05 16:55:56 +02:00
James R 191f45194b Clear g_dc each frame
I was running into a memcpy of overlapping memory regions
in R_RenderMaskedSegRange.

- This is because of the reallocation of lightlists, which
  uses Z_Frame_Alloc.
- The memory pool that Z_Frame_Alloc draws from is cleared
  each frame.
- g_dc was not cleared though, so when the lightlists were
  reallocated, it'd try to copy from invalidated pointers.
- Access to invalid pointers within the memory pool does
  not cause a segfault directly (because the memory pool
  is allocated once). However, a memcpy involving such an
  invalid pointer leads to overlap, which may cause memory
  corruption.
2025-10-05 16:23:31 +02:00
Alug 978e5f2116 fix R_MarkSegBounds 2025-10-05 16:08:04 +02:00
Lactozilla 0e276beae3 Don't generate textures in R_GetColumn 2025-10-05 15:59:35 +02:00
Alug 8d24d3914e small fixups for r_segs 2025-10-05 15:36:01 +02:00
Alug 09d7486e1d add bounds check to R_GetLinedefTransTable 2025-10-05 04:05:45 +02:00
Alug 8b3e028d9a port "Use separate table for maskedtexturecol"
from: https://git.do.srb2.org/STJr/SRB2/-/commit/97311dc5b00ab232a6e898c085c20d2f6bdbfa3b

~~cherry-picking this would be horrendous sry~~
2025-10-05 04:05:32 +02:00
Alug 415dd8065d some fixes for texture generation
- Fix negative y offsets for both normal and y-flipped patches
- simplify column wrapping/nonpow2 handling
- Single-patch textures: print an error if patch header is missing, cease memory errors

sadly does not fix our invalid columns we get occasionally
2025-10-05 02:26:55 +02:00
Alug 6edc65a2ae Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2025-10-04 22:03:35 +02:00
Alug 1f9d5d8cd4 simplify titledlighting stuff for span drawers
- use a std::vector for the tiltlightbufffer, only for easier checking if it needs to be resized from resolution change
- move stuff into its own function
- simplify R_CalcTiltedLighting
no functional change, no performance improvement, just looks neater
2025-10-04 22:02:50 +02:00
Alug a7b015c4fe 💀 2025-10-03 17:38:11 +02:00
Alug 85271638bc tiny cleanup p_map
also save a little division and abs
2025-10-03 17:38:11 +02:00
Alug 7fa0d7abb4 add "SATURN_TESTING" define
currently to hide the commit string from titlescreen on release builds
could be used for other crap
wish could use comptime to autogenerate this, but it runs after compile & linking
2025-10-03 17:38:11 +02:00
Alug 3c68ee44bd oops all include guards 2025-10-03 17:38:11 +02:00
PAS 0334e39dc2 New M_Random implementation (backport of MR 1780)
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/1780
2025-10-03 17:38:11 +02:00
Alug 9f7065f7d9 a thousand curses upon you polyobjects! 2025-10-02 18:37:05 +02:00
Alug 3c571307b8 Merge remote-tracking branch 'origin/curl-cli-args' into lugstuff 2025-10-02 17:55:43 +02:00
indev 7edb530b8a Add -curl-proxy and -curl-header CLI arguments
-curl-proxy will set proxy used by curl for masterserver requests and
http downloads

-curl-header can receive multiple arguments (like -file), and can either
edit, replace or remove headers from http requests
(srb2kart -curl-header "New-Header: Some Value" "Accept: */*" "User-Agent:"
In this example, New-Header will be added, Accept header will be edited
and User-Agent header will be removed)
2025-10-02 18:52:13 +03:00
Alug 46d69667dc experiment: remove opengl adjusted segs
in theory this should improve levelload times and reduce memory usage?
gotta see if it really does, visually so far there seems to be no difference at all
2025-10-02 17:30:58 +02:00
Alug 0990a26d7a fix non polyvertex path for horizonlines
this was a typo all along, i somehow assumed its just like that, but its not kek
2025-10-02 16:43:01 +02:00
Alug d30388873b fix non polyvertex path for horizonlines
this was a typo all along, i somehow assumed its just like that, but its not kek
2025-10-02 16:42:52 +02:00
Alug 92525ce697 use floats for calculating ticratescaled
this does not need to be double lel
2025-10-02 16:21:12 +02:00
Alug b83cceaa68 use floats for calculating ticratescaled
this does not need to be double lel
2025-10-02 16:20:59 +02:00
Alug 79b65af251 reuse ticratescaled from I_UpdateTime
fixes major performance regression + prob shouldnt take this into account this later eitherway
2025-10-02 16:20:26 +02:00
Alug cb2be726f6 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2025-10-02 16:03:35 +02:00
Alug d203498583 smol micro optimizations hw_main
- dont check for polyflags (rendersides) inside HWR_Addline, move to HWR_AddPolyObjectSegs
- save some sector checks by assigning pointer HWR_RenderPlane
- check for numpolys instead of numPolyObjects in HWR_Subsector (will only be "true" if theres polyobjs in currently traversed subsector instead of when polyobjs are generally on the map)
2025-10-02 15:00:08 +02:00
Alug 51dabb91b6 add special case for "tilde" console key for native layout
not sure if to put this into main but i wanna be able to close the console with the same key i opened it
2025-10-01 14:28:19 +02:00
Alug 485ae2eb02 add toggle for frameskip
just in case someone wants to toggle that off for some reason
2025-10-01 14:20:21 +02:00
Alug 9ec13e5ac7 cleanup some stuff w_wad & filesrch
mostly delet some "dead" code
use pathisdirectory for filebrowser to declutter code
properly declare FUNCNORETURN and ATTRNORETURN for some quit functions
2025-10-01 14:19:48 +02:00
Alug 970633caa6 ensure ALL savebuffers use Zone memory
fixes a crash when sending an uncompressed save to clients
2025-09-30 22:07:21 +02:00
Alug 8ee375a6e4 delet BUGTRAP
psure this never worked anyways
2025-09-30 19:40:15 +02:00
Alug 5be5ae3f5f delet CLIENT_LOADINGSCREEN 2025-09-30 19:35:01 +02:00
Alug 508de14ad4 delet VANILLAJOINNEXTROUND 2025-09-30 19:33:13 +02:00
Alug 89ea943e6a delet NONET 2025-09-30 19:32:08 +02:00
Alug cf85910d5a delet JOININGAME 2025-09-30 19:12:56 +02:00
Alug c44ad231b8 fix dedicated build compile 2025-09-30 17:26:03 +02:00
Alug c4a2d77f78 Signal handler improvements
- Move the backtrace and signal stuff into one "block" in both i_system files
- print the current platform into the crashlog
- dedupe code a little
- make crash messages slightly more understandable
- handle more signals (if they exist)

mostly taken from https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2732
2025-09-30 17:23:59 +02:00
Alug 172d99312a fix precip not propely accounting for moving fofs (again)
idk if i want this outside of lugstuff since this may make precip run worse again
2025-09-29 14:13:15 +02:00
Alug 1ad92f021a only recalc precipfloor twice a second 2025-09-29 14:12:03 +02:00
Alug a521866956 rename this 2025-09-29 13:43:19 +02:00
Alug 17d92c07c2 smol changes R_ProjectSprite
- remove oldthing (idk what that was even for)
- properly account for localskins
- save a few FixedMuls during clipping
2025-09-29 11:51:42 +02:00
Alug 0f2efd0487 qs22j: handle cases with (0 or 1) elements to sort
avoid undefined behaviour and return early
if we only have 1 element we can skip all the crap since we dont need to sort anyways
2025-09-28 22:51:25 +02:00
Alug 66d163a10b dont draw the leveltitle card for each splitscreen player
they just overlap since they draw in the very same place
2025-09-28 21:38:23 +02:00
GenericHeroGuy 33147a188f Fix ghost hitlist causing zone errors (closes #118)
Beware the wrath of PU_LEVEL
2025-09-28 16:36:30 +02:00
Alug ba83680260 handle D_AutoloadFile better
only malloc stuff if we need it mallocd
2025-09-28 16:29:17 +02:00
Alug e0c03cdde0 another attempt to rectify engine timing issues
much more sane than spamming i_updatetime everywhere lmao
lets see if this still reduces interpolation jitters
2025-09-28 16:19:51 +02:00
Alug 2749d230d2 a 2025-09-28 16:16:51 +02:00
Alug 2935e8f930 port over most fixes from srb2classics clang-tidy pr
mostly taken from https://codeberg.org/srb2classic/srb2classic/pulls/156
manually done to ensure we only port things that are guaranteed to not cause any potential desynchs
we should probably run this ourselves sometimes aswell
2025-09-28 16:13:00 +02:00
Alug 129e927da1 remove localfile from wadfile struct
this was a leftover from localskins
we check for the "important" flag instead
2025-09-28 07:38:03 +02:00
Alug 8659d2099a revert localfile check hack in CL_CheckFiles
this was added ages ago and broke server joining with actual modifieng addons that were not added locally
W_InitFile should already handle this and mark local addons not as important, which would skip those checks eitherway
atleast thats what im hoping
2025-09-28 07:22:07 +02:00
Alug 46177650b8 handle W_VerifyNMUSlumps error in W_InitFile 2025-09-28 06:57:28 +02:00
Alug 89b50826ec redo native keyboard handling
instead of like, constantly checking stuff each frame
Now we check whenever we change the menu entry or open/close the chat or console instead and set sdl textinput mode directly and accordingly no more weird hacking around
this is similar to how srb2classic handles it, just a bit simplified (i dont wanna touch anything menu related if it can be avoided lmao)
this hopefully should resolve any weird remaining issues (lets hope i didnt miss some wonky edge case ugghhh)
TODO: update sdl2 lib on windows to fix issues on sdl side with certain layouts
2025-09-28 06:40:27 +02:00
Alug 50aaeb271b fix crash when theres no minimap patch
fall back to the "inaccurate" calc from before, so automap may still work
2025-09-27 20:30:24 +02:00
Alug 982f9abade fix some potential leaks 2025-09-27 18:15:58 +02:00
Alug b0f1524234 change comment for PU_PATCH_ROTATED 2025-09-27 16:33:44 +02:00
Alug c4c30eab44 merge vid dupx and dupy
they always contained the same value, so just remove it
2025-09-27 16:30:20 +02:00
Alug 16ee0d6df5 move the "video" stuff in i_video
so its mostly together in the file
2025-09-27 16:28:27 +02:00
Alug ccff92dfbd delet vid.buffer
unused memory allocation
2025-09-27 16:26:32 +02:00
Alug 104abe8531 cache this stuff
slight sprites optimization
2025-09-27 05:34:15 +02:00
Alug a998793ccd handle rotated patch img buffer allocations better
just always initally allocate it with 1mb size, this is enough for just about everything including gigantamax eevee
if thats not enough, just double our capacity until it fits what we need
this way we save effectively reallocating 99% of the time
2025-09-27 01:43:32 +02:00
Alug e3d4f62594 fix compiler warning 2025-09-27 00:30:43 +02:00
Alug d536ba3860 remove vid.rowbytes
it was just vid.width lel
2025-09-27 00:30:43 +02:00
GenericHeroGuy 097d118095 Fix VID_BlitLinearScreen's SSE version ignoring width (closes #128) 2025-09-27 00:14:21 +02:00
Alug 90e87cabb7 experiment: use batching for sprites
renderbatches just needs to be moved, sprite drawers already used preparepolygon
this seems to improve performance accross the board, no matter how many sprites there are, but the benefits becomes greater the more sprites there are
in some cases gaining up to 200fps! (precip especially benefits from this)
needs some testing to see if this may cause issues with sorting, etc
2025-09-26 21:46:46 +02:00
Alug bdb775c95a oops lmfao this got lost by accident
fixes models kek
2025-09-26 21:41:16 +02:00
Alug 15f22fea6c delet apng support
this never really worked so get rid of it
2025-09-26 20:12:18 +02:00
Alug 32c371b981 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2025-09-26 15:56:19 +02:00
Alug 733907f168 delet circleci too
non functional psure
2025-09-25 21:59:53 +02:00
Alug 667776a2e5 cleanup broken/old stuff
TODO: fix cmake
2025-09-25 21:34:59 +02:00
Alam Ed Arias 7804dbebd8 SDL2: use SDL_GetSystemRAM() to get total RAM 2025-09-25 16:06:13 +02:00
Alug 73dfacd416 make the game fail loud if some critical gl function cant be loaded
also add safety to the portal stencil stuff, if that fails
everything gl2.0 and newer is not critical and will just prevent some effects from working so that does not need to error loudly
2025-09-25 16:04:17 +02:00
Alug 89014e40ab enable fbo prints for ogllog file 2025-09-25 04:59:06 +02:00
Alug 3f59382659 fixup STATIC_OPENGL
probably should handle the fbo stuff a bit differently
not sure tho in which context STATIC_OPENGL may be ever used though
2025-09-25 04:43:31 +02:00
Alug d846a67482 ensure "rawconv" is nulled before reuse
otherwise there might be some leftovers from earlier calls
2025-09-25 03:43:28 +02:00
Alam Ed Arias d73e31e519 curl: add code to check the output of curl_multi_*() 2025-09-25 03:10:13 +02:00
Alam Ed Arias cc5168d4ca curl: add code to check the output of curl_easy_*() 2025-09-25 03:08:48 +02:00
Alug 46e08a405b add missing dummy makefile
dont think this compiles though
2025-09-25 02:33:01 +02:00
Alug f6cff2eae8 fix compile without HAVE_THREADS
we dont have gammacorrectedpalette
2025-09-25 02:32:56 +02:00
Alug 692bb89d96 remove erronous win_main.h include
this doesent exist since ages anymore lel
2025-09-25 02:32:53 +02:00
Alug f0a1896fdc kill off MSVC support completely
delet michealsoft
psure this was broken since quite a long time, now since we use quite a bunch of GNU extensions (and actually rely on the cleanup attribute), supporting this in any way is just too much, so remove everything to declutter the codebase
2025-09-24 21:24:40 +02:00
Alug ea013709a3 cleanup w_wad again
- add pfree for CLEANUP macro
- use CLEANUP everywhere applicable
- delet duped code
- make directory signatures static and const at file scope
2025-09-24 17:22:00 +02:00
Alug 1b66bafb5e ensure Addfile filehandle will always be properly closed 2025-09-23 23:58:55 +02:00
GenericHeroGuy 3381e9fd9b Introducing: __attribute__((__cleanup__))
I don't wanna hear about MSVC... or C++...
This fixes NUMEROUS memory leaks introduced by G_ReadDemoHeader,
which I was utterly oblivious to up until an hour ago
2025-09-23 23:49:38 +02:00
Alug 736c30849b fix md5checks breaking for pk3s 2025-09-23 20:16:54 +02:00
Alug b3ef8774b2 revert minimap bounds calculation back to vanilla karts (fixes https://github.com/Indev450/SRB2Kart-Saturn/issues/201) 2025-09-23 18:52:07 +02:00
Alug a2d737bfd8 port blankarts GLDEBUGMESSAGE stuff
credits GenericHeroGuy
switched to use CON_LogMessage for now, since console print functions may die during startup
2025-09-23 00:12:41 +02:00
Alug 8079fbdd18 keep some stuff for screentextures
prevent reinit, stack allocations and such
most of these never change and are readonly
this might slightly speedup rendering, though prob negligble
2025-09-22 23:59:45 +02:00
Alug da8d8f57c6 force disable fbo if it fails to create 2025-09-22 23:47:31 +02:00
Alug 2ac26275ea move fbo stuff to a better place in r_opengl 2025-09-22 23:44:17 +02:00
Alug 735e4a5f0a cleanup fbo stuff a bit 2025-09-22 23:37:14 +02:00
Alug 02efc0320f add backwards compat support for ogl 2.1 fbo extensions
this should allow older gpus to use the feature aswell, not super clean but seems to work
TODO: refactor this whole crap, switch to seperate read and draw to use blitting and make this multisampling compatible so we can get rid of the messy "downsample" code and have this active by default
2025-09-21 05:11:16 +02:00
Alug f6cf9cf73d add back toggle for mouse cursor visability behaviour 2025-09-20 18:51:44 +02:00
Alug 323a816b47 always interpolate weather when using interpolation
same here, a fix, not a feature
2025-09-20 18:07:58 +02:00
Alug 3c3887420e always account for mobjscale in precip
this is a fix not some feature honestly
2025-09-20 18:06:52 +02:00
Alug c167ece1ca add gba RR check for software cyan cut 2025-09-20 17:56:20 +02:00
Alug 2ce68e5556 dedupe and cleanup nights hoops spawn
most of the actual spawn is split into P_SpawnNiGHTSHoop, which takes arguments to determine if to spawn just a hoop or its collision detectors
(if you wonder why this takes a mobj pointer to pointer is due to collision detector need the former hoops last mobj to link into)
- also actually fixes midgame join crash (hoop hnext was directly nulled instead of using p_settarget)
- added some extra safety checks
- reduced the amounts of r_pointinsubsector calls for things that used to go through this function
2025-09-20 16:35:51 +02:00
Alug 2c9245ae62 move saltyhop stuff into seperate struct
no functional change, just as little cleaner lookin
+ reduce size by using stdbools boolean
2025-09-20 16:15:24 +02:00
Alug fc630317cb delet metal sonic replay code
massively cluttered the demo code
hope this aint used for some super obscure thing
guess we´ll see
2025-09-20 16:11:07 +02:00
Alug c619df60bd avoid constant reallocations for patch rotation
instead keep our buffers, resize em on need
improves perf a bit
2025-09-19 19:02:01 +02:00
Alug 51bc5695d8 allocate imgbuf for "to patch" conversions only if needed
should save around 64 megs on dedis
2025-09-19 17:47:26 +02:00
indev 53ec313ac0 Oops there's 1 more 2025-09-19 13:48:27 +02:00
indev c971195cce Fix smol oversight :3 2025-09-19 13:48:23 +02:00
Alug 7a7b97e282 fix most implicit float > double conversions 2025-09-19 13:48:03 +02:00
Alug 5debd64ec5 fix potential leak in protocol registering 2025-09-19 13:41:31 +02:00
Alug c834af7998 delet non triggerable bounds check 2025-09-19 13:40:57 +02:00
Alug c806e6b510 fix potential NULL deref of string in lua chatprint lib functions 2025-09-19 13:40:25 +02:00
Alug 045e871a7d fix some potential leaks in M_DrawSplitText 2025-09-19 13:37:56 +02:00
Alug ffaf7eec1e delet some double defined things 2025-09-19 13:36:49 +02:00
Alug 119e314ec7 rename "ffloor" global to "visffloor"
prevent name conflicts with a bunch of local variables named "ffloor"
2025-09-18 21:08:30 +02:00
Alug 4f7b4e1ab7 dedupe map replacement checks
the actual checks are in P_CheckMapReplacements
2025-09-18 18:20:10 +02:00
Alug b9eb6d8698 simplify startup map checks a little 2025-09-18 16:40:51 +02:00
Alug 115fed210e skip checking for replaced maps on start if no extra wads are loaded
~~technically this also should be done for autoload~~
2025-09-18 16:39:36 +02:00
Alug f83645804e remove erronous errors
W_InitFileError from within W_InitMultipleFiles will handle this
2025-09-18 16:38:19 +02:00
Alug 2ddeb3c432 use atof for LOOPMS
instead of whatever its doing now
2025-09-18 12:19:38 +02:00
Alug 56fb0ee32e make static, cleanup and delet dead code hw_cache 2025-09-18 10:51:49 +02:00
Alug 0e2f8aceaa allow freecam to work when chasecam is disabled 2025-09-18 10:48:54 +02:00
Alug 3cccacca23 simplify startedInFreePlay check 2025-09-18 10:48:20 +02:00
Alug e0445a9636 use P_SetupCamera for P_MoveCameraToSpawn
also modify P_SetupCamera to always just move the camera to the playerstarts
2025-09-18 10:48:07 +02:00
Alug a9fe2cfe77 delet P_Initsecnode
empty function now
2025-09-18 10:15:30 +02:00
Alug ea3a04ae59 only check cyan floor hack on flats that contain cyan
there was the remap loop that would already check this for us, so we can save a few calls to W_CheckNameForNum and memcmp
2025-09-18 10:14:40 +02:00
Alug 13d0a69eea Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2025-09-17 23:53:38 +02:00
Alug d40b636bbe move replay replayhut list free and reset into M_ResetDemoList
use it to free demolists from within levelload when you switched maps out of a replay
2025-09-17 23:32:21 +02:00
James R 7f996d4c1b R_GenerateBlendTables: allocate copy of palette for use in thread
The palette can be freed while this thread is still
running, which means the thread would end up reading from
freed memory.
2025-09-17 21:04:54 +02:00
James R 2cc0deb6f5 Send R_GenerateBlendTables number crunch to parallel thread 2025-09-17 20:53:52 +02:00
indev bfb7d7a405 Simplify G_ D/S cpyTiccmd, since n is always a multiple of sizeof(ticcmd_t) 2025-09-17 20:41:53 +02:00
Alug 0645e38467 fix signal handler stuff for worker threads
g_in_exiting_signal_handler needs to be set BEFORE it actually exits lol
2025-09-17 20:36:01 +02:00
Alug d57d1dd20b decouple precipmobj_t from mobj_t
vissprite_t now keeps pointer to precipmobj directly instead of just a simple boolean check
this has multiple benefits
the mobj_t struct now can be reorderer and modified as pleased without having to worry about precipmobj struct layouts since all precipmobj -> mobj casts are eliminated
this allows to remove a massive amount of fields from precipmobj struct which never were used massively reducing the footprint of a precipmobj thing
kinda wish there was a neat way to template function headers to take different types for the same arguments in C to reduce code duplication, but this glady is atleast a rather small case
2025-09-17 17:42:35 +02:00
Alug 85a7b1b25b remove precip blendmode visability check
this WILL never trigger since we neither can access precipmobjs nor do their translucency values ever change
so save us a little bit of work
2025-09-17 17:29:43 +02:00
Alug 22893a1952 fix precip translucency in software renderer
precipmobjs always spawned with AST_COPY blendmode which failed the check, but they are supposed to be translucent when rain
restore the correct behaviour
2025-09-17 04:24:59 +02:00
Alug ec3a30cb37 ensure deterministic order for P_Random stuff passed as arguments
the evaluation order is undefined, so its up to compiler in which order to call these
P_Random functions modify the randomseed each time theyre called, which can lead to different outcomes (thus desynchs) on different platforms, compilers, compiler versions etc.
so match up with the most common which is last to first (seemingly the order gcc on nix and windows handle it)
2025-09-17 03:26:13 +02:00
James R 5a780a1e35 Inflate only size out bytes
Saves time uncompressing an entire lump when only part of
it is needed.
2025-09-17 02:47:05 +02:00
Alug ea052fe82d explicitly cast those 2025-09-17 02:05:23 +02:00
Alug e189ae7943 move G_CopyTiccmd & G_MoveTiccmd back to g_game
accidentally misplaced those during g_demo split
2025-09-17 01:08:07 +02:00
Alug 60a0655726 add P_FreeLevelState + extra stuff for D_ClearState
this just takes out the cleanup code from P_SetupLevel so it can be called from within D_ClearState and all the mapdata will be freed when going back to the main menu
Not super crazy and really necessary in kart, but why not tbh
this is mostly based on what RR does
2025-09-17 01:04:23 +02:00
Alug 322463280d windoze bruh 2025-09-16 13:23:23 +01:00
Alug b5896f9dbd change type and name of var here 2025-09-16 14:47:17 +02:00
Gustaf Alhäll 8550a74073 Remove maxsend limits 2025-09-16 14:40:21 +02:00
Alug 1144d558d1 cleanup some unused stuff 2025-09-16 14:29:09 +02:00
Alug 08e91c1cc2 preconvert our polyvertex coords to fixed point
yes this is unironically faster, by atleast 5-10fps in the wandering falls test case
2025-09-16 02:27:25 +02:00
Alug 3e38faed2e remove floatlenght from seg_t
this will get converted to fixedpoint anyways and is only used in ONE function at all to determine texture x offsets in gl
yes this does get readjusted in adjustsegs if our glsegs differ, but this should be so marginal so save us the work at mapload
gotta test and see if i can ever see a difference
2025-09-16 02:10:19 +02:00
Alug abb4aa7af6 declare pv1 and pv2 properly as polyvertex_t
this most likely was done due to issues with header includes
this saves an absolute crapton of pointless casts and type conversions
2025-09-16 02:07:41 +02:00
Alug 10df0789e7 Revert "replace lzf with lzfx"
This reverts commit 4591e6ed87.
2025-09-15 20:57:15 +02:00
Alug 4591e6ed87 replace lzf with lzfx
this is from google before the snappy compression library, supposedly 100% compatible with existing lzf data both in compressing and decompressing
but supposedly alot faster doing both
2025-09-15 20:31:12 +02:00
Alug 88f1aab86f get rid of "spawn_" sector_t fields
we not make copies of lines, sectors and vertices on mapload that have the spawn state, so those fields are redundant now
also fix copy paste that prevented ceiling flat angle to check for the wrong thing
2025-09-15 20:00:39 +02:00
Alug 9b10073cab revert demo ghosttic hitlist resynch double free hack
now that we dont reload the map anymore during gamestate reload
2025-09-15 17:26:48 +02:00
Alug 9fcd35204e dont send server icon if current map is supposed to be hidden
in line with kart not sending maptitle to ms in the same case
2025-09-15 16:16:31 +02:00
Alug 2c0bf12441 fix filesearch oopsie
lulul
2025-09-15 15:08:55 +02:00
Alug 6e29652e60 fix functionnames in polyobject interp warnings for netunarchival 2025-09-15 14:49:39 +02:00
Alug 1893df6e28 add sector checks to netsave plane interpolators
seems like this may be null in a few cases
2025-09-15 14:46:47 +02:00
Alug b4bd815ef2 remove inline from SaveFireflickerThinker
doubt theres a single map in kart that uses those and even if it wont be so much that it needs to be inlined
2025-09-15 14:39:47 +02:00
Alug 50a89ba978 fix dedi build compile 2025-09-15 14:35:44 +02:00
Gustaf Alhäll b17ce88148 Rearrange mobj_t fields to reduce holes 2025-09-15 13:07:33 +02:00
Gustaf Alhäll 30aa913be8 Reduce size of memblock_t structure 2025-09-15 13:05:18 +02:00
Gustaf Alhäll 65404d3192 Do not store all states for recursion inside P_SetMobjState 2025-09-15 13:01:18 +02:00
Gustaf Alhäll f0a7bc21b7 Kill RESETDATA 2025-09-15 13:00:15 +02:00
Gustaf Alhäll 55d0502394 Fix crash on OS X on resolutions that are not multiples of 32 2025-09-15 12:52:55 +02:00
Alug 130554e851 we dont support gamecube wii or playstation lel 2025-09-14 23:20:32 +02:00
Alug df8eae1db0 delet mousegrabok 2025-09-14 23:20:18 +02:00
Alug 67a7cb6f37 handle native keyboard in a better way 2025-09-14 23:14:09 +02:00
Alug 583925dd7e add P_GetLocalPlayerNumForNum and P_IsLocalPlayerNum and cleanup a bunch of splitscreen checks
- P_GetLocalPlayerNumForNum returns the playernumber for a given index
- P_IsLocalPlayerNum returns if a playernum is local to the maschine
- replaced most if else chains from checking splitscreen things with loops using P_GetLocalPlayerNumForNum and P_GetLocalPlayerForNum
2025-09-14 21:30:33 +02:00
Alug c7ddda71ac clean up faster filesearch
-use parts of RR´s implementation to get rid of the windows specific code and generally simplify this
- also use SRB2´s  symlink detection as its simpler and saves one lstat call per searched file
2025-09-14 20:37:06 +02:00
Alug 5d0220acc3 bit of random cleanup + cache strlen in some places 2025-09-14 18:22:52 +02:00
Alug e59c97924a big cleanup levelloading code
- made levelfadecol a local variable
- renamed all the "Raw" functions
- moved axis mapthing spawn into the mapthing spawn function
- moved mapthing load to mapdata load, saves opening the THING virtual lump twice
- split out linedef init out of the loop it now gets done within linedef load code saving the hassle of iterating through all the lines twice
- removed a bunch of dead code and useless variables
- moved virtual resource free to after the mapdata has been loaded completely
- sidedef loop now increments pointer instead of reassinging it each iteration
- lastloadedmaplumpnum now gets checked for LUMPERROR instead of INT16_MAX since W_CheckNumForName returns LUMPERROR if lump was not found
2025-09-13 14:36:32 +02:00
indev 9afcdb4623 Attempt to fix some lua userdata being corrupted when allocated via PoolAllocator 2025-09-12 22:27:24 +02:00
Alug 8788ad9aa0 reset our gamepad colour in some cases
to account for mappalettes properly
2025-09-12 22:27:14 +02:00
Alug 9f27a41906 remove remaining field initalizing thats being taken care of by calloc 2025-09-12 18:32:49 +02:00
Alug f572e8e1a4 skip manually resetting some fields P_SetupLines
redundant due to earlier calloc
2025-09-12 18:28:47 +02:00
Alug 8dab4b6b6d remove uneeded memset 2025-09-12 18:21:19 +02:00
Alug dd5366d26c this already gets taken care of my the memset 2025-09-12 18:16:27 +02:00
Alug c57c8abb5a cache player pointer for P_LevelInitStuff 2025-09-12 18:09:38 +02:00
Alug c46629e7e9 fix taglist stuff on gamestate resend
got kinda lost here lulul
fixed diamond square elevator
2025-09-12 18:06:17 +02:00
Alug d36e1479bb cache our player and sector pointers for net un/archiving 2025-09-12 17:19:26 +02:00
Alug 49bdf5d9cd actually use our spawnside pointer 2025-09-12 17:08:19 +02:00
Alug 823118bb91 skip checking for "srb2.wad" and "patch.dta"
during server addon checking
both have never existed in kart and are from super old srb2 versions
so save us some string comparisons
2025-09-12 16:25:18 +02:00
Alug 2ca27b2928 use hash to determine if polygon state has changed
we do not use it in the polygon comparitors as it apparently may lay them out in a really unperformant way
2025-09-12 16:23:57 +02:00
Alug 004f178196 combine this block 2025-09-12 16:21:58 +02:00
Alug feb2fe48a1 Reload from spawnsectors/spawnlines/spawnsides (adjusted for kart)
from https://gitlab.com/kart-krew-dev/ring-racers/-/commit/4f77c9f228274afb9f0b5bf9b30e0eb22f9b385f
2025-09-12 15:50:54 +02:00
Alug ea8ca1a1ab copy initial map state on mapload for Netarchiving + cleanup
like this we dont have to reopen the mapdata 3 times each time we prepare a netsave
also allows us to directly compare sector and line properties
this should save a bit of time when someone joins or resynchs with gamestate system
this is based on some UDMF work from srb2
2025-09-12 15:36:58 +02:00
Sally Coolatta a5601ae2d9 Don't reload level on gamestate resend
The level will only reload during a gamestate reload if the map is horribly mismatched somehow. Minor differences in level state are already handled by other parts of the reload, so doing this on *every* reload wastes lots of time.
2025-09-12 14:10:10 +02:00
Eidolon 962ed1a364 Put seclist nodes in LevelPool memory
Replaces the old freelist solution with the LevelPool, which
dramatically reduces the number of allocations needed for mobj and
precip sector assignment. In measurement, this cuts down the time taken
for spawning precipitation by 50%.
2025-09-12 14:06:47 +02:00
Eidolon d53f25faee Add level pool allocator and use it for mobj, precip, thinkers
This should substantially reduce the number of malloc/free calls made to
create and destroy mobjs, especially during level load and net
save/load.

memory_resource standard header is not available on the OSX deployment
target we are using, so I had to write my own fixed size pool allocator.
2025-09-12 14:00:23 +02:00
Eidolon e35b86b360 Make the mouse cursor sane 2025-09-12 05:18:05 +02:00
Alug 5a9843b19e implement "startup" stuff for W_InitFileError
so it can I_Error if a wad file fails to load on startup
2025-09-12 04:55:09 +02:00
toaster 8b36e71920 W_VerifyNMUSlumps: Rewind back to beginning of file handle for WAD 2025-09-12 04:44:52 +02:00
toaster a8a7fc16de W_VerifyNMUSlumps: Clean up
- Bake W_VerifyFile in, since it was a stub never called anywhere else
- Make it operate off file handles, since the following locations quickly filesearch'd more than once in quick succession.
    - W_InitFile
    - Command_Addfile
- Remove spurious call from W_InitMultipleFiles for `-file` startup param
2025-09-12 04:44:27 +02:00
toaster f7120ec7a5 findfile aggressive optimisation: If srb2home and srb2path are the current working directory, don't search in them
srb2path will report "." while this optimisation is in play, but this can be disabled if necessary by modifying the small #if (1) in IdentifyVersion
2025-09-12 03:52:15 +02:00
Sally Coolatta 1c7d81ccdf Create doomednum lookup for loading mobjthinkers
Cuts off 10% of the time it takes to load mobj thinkers.
2025-09-12 03:43:50 +02:00
Alug 4c172be96c fix "missing initializer for member" warning 2025-09-12 03:38:29 +02:00
Alug a131e99a8a remove duped functions in r_fps
those didnt do anything different tbh
2025-09-12 03:37:25 +02:00
Alug 335229fe0d Set SDL_HINT_APP_NAME SDL hint 2025-09-12 03:36:05 +02:00
Eidolon 3b5cac173e Use std::vector for r_fps storage
This isn't an optimization for the mobj pointer list, but it is an
optimization for level interpolators, which previously made N
allocations for N non-mobj thinkers. Now those allocations are amortized
according to std::vector's storage.

This could still be further cleaned up to be more C++-ey.
2025-09-12 03:34:14 +02:00
Alug 8879cba11d ceepeepeefy r_fps 2025-09-12 03:27:58 +02:00
Alug 8a1ce4d61f fix tracker module playback going nuts when changing audio buffer size
forgor CV_CALL :chaosleep:
2025-09-10 13:08:47 +02:00
indev e64717d386 Revert stopping music in D_StartTitle and G_EndGame 2025-09-09 18:18:34 +02:00
Alug b8e20c01ff delet remaining "highcolor" stuff 2025-09-09 18:16:52 +02:00
Alug d813e36b59 Revert "fix music fade crash fix breaking music fades on very new sdl2 versions"
This reverts commit e7b9a28d70.
2025-09-08 19:49:36 +02:00
Alug 269e402a33 parentheses hell 2025-09-08 19:33:46 +02:00
Alug 7e47f10fe2 optimize gl vhseffect slightly
we dont need to remake our screen texture 3 times
also avoid combining float with interger maths esp in the loop
2025-09-08 19:28:08 +02:00
Gustaf Alhäll 251d7d7f81 Fix use-after-free when listing servers 2025-09-08 18:07:44 +02:00
Alug b9f329d959 rename local watertrail stuff to prevent conflicts with lua 2025-09-08 13:10:35 +02:00
indev 14203bdb3e Clear dangling pointers in VoteScreen struct after mapload 2025-09-05 20:06:52 +02:00
indev 03bbe1da50 Update vote background if hud.setVoteBackground was called on vote screen 2025-09-05 20:06:48 +02:00
Alug d72d1e8e3f some more micro optimizations p_mobj
dont revaluate P_GetSlopeZAt multiple times due to min/max
save a few abs calls by putting em in constants
remove pointless fixedmuls
2025-09-05 08:28:36 +02:00
Gustaf Alhäll 50c2080624 Refactor aatree_t to accept strings 2025-09-05 07:49:47 +02:00
indev 7c7e9529f8 Revert "wonky: cache and reuse our testpoint subsector for sloped mobj z checks"
This reverts commit 6f93299aaf.
2025-09-05 07:46:12 +02:00
indev 12053fd35b Revert "make sure subsec gets initalised to smth"
This reverts commit 32d8120516.
2025-09-05 07:46:10 +02:00
Alug 3c82c0023c (hopefully) fix replayhut calling waitingplayers drawer
due to server list setting netgame to true and never resetting it
also cleanup some mess here
lets hope this doesent break anything
2025-09-03 14:10:15 +02:00
Alug ea09ff74bf fixup building map title string for serverinfo
fixes numerous issues, like zonetitle not appearing on bots and serverinfo screen
and generally making this more sane by appending stuff if needed
also fixes "Zone" not displaying in serverinfo screen
2025-09-03 12:25:41 +02:00
Alug 64407708be make patch/pixel conversion account for padding data/no data
just set everything to transparent pixel 247 (0xf7)
so we neither write nor read garbage data and just can cut it out as transparent during pixel to patch conversion
2025-09-03 10:15:20 +02:00
Alug f8945a62aa cache patch width
just to avoid some cache misses in a rather tight lööp
2025-09-02 22:17:46 +02:00
indev 1064866711 Don't check for opengl in NOHW/DEDICATED builds 2025-09-02 22:03:45 +02:00
Alug 1be003911a add smol comment 2025-09-02 21:37:58 +02:00
Alug ddcf2cec22 implement map icon request counter/limit
tries 5 times then gives up
this is just since vanilla clients do not send anything back to us so this would endlessly retry which is pointless
can be adjusted if needed
2025-09-02 21:22:00 +02:00
Alug 4eac4b6882 port map icon packet for serverinfo screen
based on https://codeberg.org/srb2classic/srb2classic/pulls/134

with adjustments
many thanks for the help @indev450 ! <3
2025-09-02 21:20:08 +02:00
Alug 5a5cfd8935 inline P_PointOn stuff + fix declarations 2025-09-02 14:56:16 +02:00
indev 0f18988e6f Add offset for small nametags in opengl without shearing enabled 2025-09-02 05:35:52 +02:00
Gustaf Alhäll f7640e9ddb Refactor software blitting logic 2025-09-01 17:54:54 +02:00
Alug 47706b65b3 small cleanup PT_ServerTics 2025-09-01 11:03:18 +02:00
Alug 124331023a Revert "Always accept tics received from the server"
This reverts commit 8307d94443.
2025-09-01 10:54:46 +02:00
Alug 775d07e177 this went missing during merge 2025-08-31 13:31:35 +02:00
Alug 81cf16aa57 skip distance checks if we dont use interpolation
will also indirectly skip calling R_GetTimeFrac
2025-08-31 13:28:14 +02:00
Alug 4918a5388f use a macro for mobjtimefrac
just looks a little tidier
2025-08-31 13:25:56 +02:00
GenericHeroGuy b3817cc093 Fix interpolation going missing for freecam 2025-08-31 13:21:49 +02:00
GenericHeroGuy 73e968c156 Rework rendertimefrac and gate it behind a function
Fixes intermission background shifting when toggling fullscreen (yup)
and fixes audio caption text losing interp when paused
2025-08-31 13:16:41 +02:00
Alug f42607e830 check clientcfg packet length to skip potential garbage data
dont think this ever broke, but better safe than sorry
2025-08-30 14:38:55 +02:00
Alug 1a4a6654d6 replace strlcat and strlcpy with OpenBSD versions in "string.h"
those started throwing warnings on Windows, so just use the BSD ones, since those also match with what we got on nix
2025-08-28 17:46:23 +02:00
indev 1444ea7197 Make replay search textbox fit on all resolutions 2025-08-28 16:25:03 +02:00
Alug 4397c2394d replace those with P_GetLocalPlayerForNum 2025-08-28 16:24:55 +02:00
Alug 2b17181b24 precalculate linedef angles
so we dont have to recalc it runtime
the map is static and linedefs shouldnt be able to be moved so this should be fine
2025-08-28 16:21:11 +02:00
Alug 1270631c8a P_CheckCameraPosition can be static 2025-08-28 14:51:11 +02:00
Gustaf Alhäll 8307d94443 Always accept tics received from the server 2025-08-28 09:23:56 +02:00
indev d2853458ae Pass rgba or fadergba pointer into P_LoadSideColormapGL directly 2025-08-27 22:19:20 +02:00
indev 06520f9812 Revert using quick dist functions in lua hud, since some lua scripts need it to be precise (lua driftgauge for example) 2025-08-27 11:18:01 +02:00
Alug a241cd4ac1 make paletterender lightlevel shift less ambigous
that macro was from the older approach, but is uneeded now
this better shows whats going on here
2025-08-27 10:11:16 +02:00
Alug 4ad192e3ad smol optimizations by avoiding multiple revaluations
due to clamping macros, those may get reevaluated multiple times
nothing crazy
2025-08-27 10:07:13 +02:00
Alug 382bfaf72f make sure subsec gets initalised to smth 2025-08-27 09:01:25 +02:00
Alug b093cbbee1 dont recheck paletterendering state multiple times during opengl lighting calc 2025-08-26 19:33:19 +02:00
Alug e32f3de468 wonky: cache and reuse our testpoint subsector for sloped mobj z checks
its suprisingly common for the test coords to not change between calling those functions, so we can potentially save us alot of R_PointInSubsector calls
Need to check for branch prediction slowdowns, but from some quick timedemoing, this speeds up things a bunch
2025-08-26 17:49:00 +02:00
Alug 2c9149d5ab dont revaluate HighestOnLine twice for slope mobj z checks 2025-08-26 17:37:26 +02:00
Alug f2f2b40120 remove skipexclude variable
with the folderchange check this becomes erronous
2025-08-26 12:04:00 +02:00
Alug 620315be5b use GetFileAttributes for pathisdirectory on Windows
should slightly speedup gamestartup with autoloaded files
2025-08-26 10:42:33 +02:00
Alug c27bcb844e fix filesearch portability 2025-08-26 10:42:29 +02:00
Alug 417a3a6d92 fix windows compile 2025-08-26 10:42:26 +02:00
Alug 1e7a9c8000 simplyfied P_PointOn checks from prboom
should be functionally identical
2025-08-26 09:40:31 +02:00
Alug 49120846ef this ceepeepee 2025-08-25 16:10:33 +02:00
Alug f9d7d2b267 remove d_main include from filesrch 2025-08-25 16:10:24 +02:00
Alug 141728db8e just drop the connection instead of I_error if connection gets lost 2025-08-25 15:39:36 +02:00
Alug 5e8c0a892d try to fix nodes being occupied if connection didnt recieve any acks 2025-08-25 15:39:06 +02:00
Alug 67551833dd a2 2025-08-25 15:02:12 +02:00
Alug 1384ffd461 dont recheck if we should skip the folder if folder did not change
saves a whole lotta string comparisons and speeds this up even further
2025-08-25 12:55:53 +02:00
Alug 36cc77be0a dont evaluate strtol multiple times 2025-08-25 03:40:18 +02:00
Alug 553f9d341f a 2025-08-24 23:02:58 +02:00
Alug 91288f92ef target x86-64-v2 instead of nocona for 64bit windows
slightly newer target, should still be compatible enough with anything from 2009 and onwards
may help with compiler optimizations
needs some testing
32bit builds remain unchanged as they are intended purely for compatibility
2025-08-24 23:01:26 +02:00
Alug 8386014a14 always set this to 0
dont need to check this beforehand
2025-08-24 22:59:32 +02:00
Alug 8f762e0617 make lua string to number conversion consistent between platforms
effectively clamps it to 32bit range
maybe fixes some issues between windows and other builds
2025-08-24 22:53:27 +02:00
Alug ea61c7d357 use hash checks for W_CheckNumForName 2025-08-22 17:43:47 +02:00
Alug 573af709df dont try to make glpatch from nothing 2025-08-22 17:41:30 +02:00
Alug 3a01076b5b actually dont add any level interpolators on render_none 2025-08-21 18:32:57 +02:00
indev 09997027a4 Fix off-by-one in M_FindFirstMap 2025-08-20 19:31:56 +02:00
Alug 8c32b37598 Revert "test skip more splitwall crap"
This reverts commit 0f53cfe3d7.
2025-08-19 12:00:19 +02:00
Alug 35d3cb51fe fix shadows
make sure they also got the realscales set
2025-08-19 11:48:40 +02:00
Alug e985e924c3 dont add mobj and level interpolators on render_none
i dont think we need to interpolate anything on dedicated
this should improve performance a bit on maps with many mobjs/moving level stuff
2025-08-19 11:32:20 +02:00
Alug 236095c547 move sprite reset stuff into R_ResetMobjInterpolationState
this also gets called at the start of the tic
and sets a bunch of rendering crap eitherways
so we can save another thinker loop and a bunch of checks with this
bit of perf gain, 3-4fps on that awful hadal trench timedemo
2025-08-19 11:30:28 +02:00
Alug 0f53cfe3d7 test skip more splitwall crap 2025-08-18 17:55:36 +02:00
Alug e771e59c2f dont need to completely clamp those
we already check for the top coords right before
2025-08-18 17:55:17 +02:00
Alug e89915b3b5 Fix FOF intersections in multitagging for the renderer.
backport from srb2
2025-08-18 17:52:46 +02:00
Monster Iestyn 5dcc27f738 Fix FOF slopes briefly glitching on level load in software mode, by ensuring the FOFs' target sectors have hasslope set on creation 2025-08-18 17:47:57 +02:00
Alug 1333634332 move all of this stuff into the switch above it lel 2025-08-18 16:45:20 +02:00
Alug 70fa55d5a9 cleanup and splitup P_LoadSideColormaps 2025-08-18 16:44:34 +02:00
Alug 47e2b9456d remove bottommap,midmap and topmap stuff
was non functional anyways so get rid of it
2025-08-18 16:39:49 +02:00
Alug 7554c50165 fix softwareextra 3d floors
lmao was a copy paste oopsie from ages ago
2025-08-18 16:35:28 +02:00
Alug f0a3dd6d8c dont need to do this without viewmorph stuff 2025-08-18 00:57:12 +02:00
Alug 6ece97c4b3 move camera slidemove stuff behind ifndef NOCLIPCAM
dont think this is needed at all with camera noclip
2025-08-18 00:56:41 +02:00
Alug f8e788c27e mark stuff for blitting loop as const and with register
gives another 5-7fps or so for me
2025-08-17 18:18:53 +02:00
Alug cb04438961 port srb2classic´s sdl blitting stuff for software
all credits to hanicef
mostly from https://codeberg.org/srb2classic/srb2classic/commit/a1fa0b89dbf75ef8be17c9ca5c728cc9c1848582
and
https://codeberg.org/srb2classic/srb2classic/commit/a1cf54e66ad1cb66af99056bc940fc68dce24224

boosts my fps around 20-25 fps
2025-08-16 22:00:58 +02:00
Alug 4539d63893 fix rotating polyobject interpolation 2025-08-16 20:21:16 +02:00
Alug 38c6bb77d6 update comment for lightcontrast 2025-08-16 19:32:49 +02:00
Alug 74bd670c7c style fixes 2025-08-16 16:26:39 +02:00
Alug 7504922d7b smol cleanup r_data 2025-08-16 16:26:10 +02:00
Alug f219a25376 mark this with restrict 2025-08-16 16:25:16 +02:00
Alug 70f6baed71 fix Paranoia compile 2025-08-16 16:24:58 +02:00
Alug 4178f1a19b mark this with "noreturn"
clang kept yelling for some reason
2025-08-16 16:23:55 +02:00
indev 59e812ec85 Add tooltip for centered chat text 2025-08-15 22:15:10 +02:00
indev 7c95db3931 Add option to center text in chat (chatcentertext) 2025-08-15 22:01:33 +02:00
Hanicef 39762d9c3d Do not access memory on misaligned addresses 2025-08-15 10:09:18 +02:00
Alug 9f7d303862 fix -Wunused-value warnings
we dont do anything with this, so just skip both
2025-08-15 09:59:37 +02:00
Alug 3fc1f5c221 port RR´s c++ compatible byteptr macros
means we can also get rid of the mumble hack
2025-08-15 09:54:58 +02:00
Alug 5454008a0b TEST: compile with fwrapv
fixes clang desynchs with prng
maybe other stuff/platforms aswell
2025-08-15 09:54:13 +02:00
Alug 342f837fb6 fix "invert encore special"
R_NoEncore always checked for the wrong special "240"
we keep that behavior for compat, incase someone else figured it and used that
2025-08-15 07:59:57 +02:00
Alug e5461c5511 add USECLANG compile flag to force building with clang 2025-08-15 07:59:00 +02:00
Alug d1ed07cffb fix restrict being in wrong place in declaration R_DrawColumnPixel 2025-08-15 07:58:26 +02:00
Alug 1bf2ff0159 append those to LDFLAGS instead of libs
so they may be passed to other things
2025-08-15 07:57:31 +02:00
Alug 2fc22d3ef4 supress align and unkown pragma warnings in clang 2025-08-15 07:53:20 +02:00
Alug 5221bf75eb pass our compiler and ldflags to bluajit 2025-08-15 07:52:09 +02:00
Alug 1692efa5a9 dont need to realloc this
didnt see when i added realloc everywhere this doesent need to keep old data
2025-08-14 16:19:05 +02:00
Alug 15228a9c14 bruh 2025-08-14 14:10:52 +02:00
Alug 8baf99caff switch jit to my fork for testing lel 2025-08-14 14:06:19 +02:00
Gustaf Alhäll 83515a3f6d Fix pixel shift caused by negative pixel positioning in software 2025-08-13 22:42:58 +02:00
Alug 98381fe292 workaround for lua menu conrols for spectators
TODO: refactor all of this into one cmdbuilder and get rid of the codedupe in p_user for cameracmd
2025-08-13 22:40:36 +02:00
Alug a1262fd0cf port RR camera slope pitch stuff + make it toggable
"cam_pitch" this makes the camera pitch on upwards and downwards slopes a bit
2025-08-13 18:00:11 +02:00
Alug be7544627a hack for vanilla gba rr cyan floor in gl 2025-08-12 20:28:17 +02:00
Alug 69478aeadf move dedi idle stuff into function + port smol cleanup from srb2 2025-08-12 20:27:50 +02:00
Alug dfdc24f72f dont need to reinit those gl vars 2025-08-12 20:27:22 +02:00
Alug b810618f18 fix directional light stuff 2025-08-12 20:25:57 +02:00
Gustaf Alhäll 82d3e0a68c Simplify NetXCmd client distribution 2025-08-12 14:34:50 +02:00
Alug d0924c1e03 reduce scope of some more netstuff 2025-08-11 13:47:24 +02:00
Alug b2328ea3ed free minimap patch on mapload 2025-08-11 13:46:47 +02:00
Alug 1469802140 test: use faster distance and sight functions for hud hooks 2025-08-11 13:45:55 +02:00
Alug f8f18ea12f check if minimaphead exists
hopefully fixes a random crash there
2025-08-10 19:04:42 +02:00
Alug 726237b42c link stdc++. pthread and gcclib statically on windows
fixes the game throwing super cryptic errors when you dont have the right dlls
2025-08-10 01:53:31 +02:00
Alug 2d2956eb69 test: use SDL_GetDesktopDisplayMode instead of SDL_GetCurrentDisplayMode
this seems to fix some smol freezes for some
need to test this a bit
2025-08-09 22:24:21 +02:00
Alug 02f211eacc test: disable sdl textinput when not using native keyboard layout
this may fix issues on newer sdl2/-compat versions with dead keys on non us layouts
2025-08-09 22:22:14 +02:00
Alug 11c057d8a4 use GetFileAttributes instead of stat for filesearch on windows
this is slightly faster and the recommended way of doing this
apparently stat on windows has to emulate some POSIX stuff for that which may slow it down
2025-08-09 22:07:03 +02:00
Alug 24c87da71a use GetFileAttributes also for preparefilemenu
untested as of now
2025-08-09 22:05:28 +02:00
Alug 681d0e7370 use memcmp for legacy sky check
just gotta know if first three letters match it
2025-08-09 17:13:13 +02:00
Alug b7a6f4715a speedup addon search
by adding a blacklist of folders
logs, luafiles, replay etc shouldnt ever contain addons so those can be skipped entirely
this massively speeds up searching for addons on windows
also will make findfile try to search in the designated addon folders first so it doesent look in the home or kart folders before it
this is probably not the best way to do things
but idk what im even doing, im not a coder just some chao who likes to sleep all day
2025-08-09 17:10:41 +02:00
Alug 146a507a47 remove I_BaseTiccmd
just complicates things, can just memset our ticcmnds instead
psure this was used ages ago for smth but its not needed here at all
2025-08-09 16:29:49 +02:00
Alug e65436afb3 add P_GetLocalPlayerForNum
just to get rid of ternaries lel
2025-08-09 16:28:04 +02:00
Alug 15e9f7d36e change flow of K_drawKartStats a bit
nothing notable, just the non splitscreen path will return early now
2025-08-08 22:43:23 +02:00
Alug 788bc60385 disable pointless "Couldn't read mobj_t" warnings in replays
mobjs just cannot be unarchived in replays ever
so this will always spam those for something that WILL never work in kart
maybe if i decide to fix this for 32p or smth those become useful again
2025-08-08 21:50:13 +02:00
indev 5d553a1cfb Add -strict, -strict-soc and -strict-lua cli params
Both trigger I_Error if a warning occurs during addon load in a SOC or lua
script
2025-08-08 19:37:14 +02:00
indev eed5218fa4 Use NOLIBGME instead of NOGME 2025-08-08 19:36:41 +02:00
indev 378eb28ad1 Fix potential buffer overflow in DEH_LoadDehackedFile 2025-08-08 19:36:28 +02:00
indev 3b83c16cab Update dedicated/i_sound.c I_StartSound and I_UpdateSoundParams 2025-08-08 19:36:24 +02:00
indev 9851c1515e Add SetupVote hook 2025-08-08 19:36:20 +02:00
Alug db5796f116 move the windoze thing to windoze makefile 2025-08-08 17:53:13 +02:00
Alug 1dcfb2929e "reenable" midi support
well it was never really disabled, but like this we can atleast change its volume lel
menu entry is still disabled, i dont think theres a single map with midi music, so this would just clutter the menu
2025-08-08 00:48:41 +02:00
Alug 2e4eec174e fixup midi menu stuff
i love M_DrawSkyRoom
2025-08-08 00:34:33 +02:00
Alug 843a25740c save a few checks for st debug drawer
if we dont use it
2025-08-07 22:27:19 +02:00
Alug 09da13ee96 delet this 2025-08-07 22:25:08 +02:00
Alug 541136492a dont double free our vote patches
those may point to the same thing so uhhhh
2025-08-07 22:22:56 +02:00
Alug 8adc11a360 fix spacing in Z_CheckHeap errors 2025-08-07 22:09:43 +02:00
JugadorXEI 03816fbec8 Fix displayplayers.iterate hang when multiple viewports view the same player 2025-08-07 20:50:37 +02:00
Alug 599be118bd i love the votescreen lel 2025-08-07 20:44:24 +02:00
Alug ce673eeac1 use colourtranslaions for gametype colours
well depends on if ppl like this idea
2025-08-07 19:21:55 +02:00
Alug b3b2425658 add a bunch of spaces to hu_stuff lel 2025-08-07 18:19:37 +02:00
Alug ee9b81fe59 make slide songcredits box colour also match the rest of colour hud better
also make it ever so slightly more opague
2025-08-07 17:59:03 +02:00
Alug 744eb3669c make inputdisplay colour match the rest of colourhud better 2025-08-07 17:57:56 +02:00
Alug c1bf91cb9c make leveltitlecard be affected by colour hud 2025-08-07 17:46:03 +02:00
Alug fe158e15e6 smol refactor hwr precache
not faster or anything
real time consuming thing is he actual calls to getetxture and getflat
2025-08-07 13:15:16 +02:00
Alug f1748b705d make music toggle/volume handling less of a mess
based on work in srb2 from sphere
this gets rid of all the duplicated midi stuff
since we dont really have a whole midi soundtrack like srb2, S_GetMusicLumpNum will always prefer non midi music
2025-08-06 18:21:37 +02:00
Alug c7138a96f2 fix LoadElevatorThinker interp oopsie 2025-08-06 00:12:26 +02:00
Alug 5cd3953e31 fix levelstuff not being interpolated on netgame join or resynch
i love polyobjects
2025-08-06 00:03:31 +02:00
Alug f167a14120 dont compile with bluajit by default
add HAVE_BLUAJIT=1 to compile with it
2025-08-05 23:21:27 +02:00
indev 3bead2d9cc Reapply lug's bluajit changes :3 2025-08-05 22:57:01 +02:00
indev 4d63506b40 Change bluajit submodule branch to bluajit-install 2025-08-05 22:56:57 +02:00
indev 0228e8a6dc Convert libs/bluajit into git submodule 2025-08-05 22:56:46 +02:00
Alug 018e8db752 fix a desynch due to wrong assumption 2025-08-05 18:33:13 +02:00
indev b0cc64c8c8 Always try to rebuild bluajit in case something is changed in it's sources 2025-08-05 16:13:41 +02:00
Alug 21be69ef52 actually pass our compiler flags to jit 2025-08-04 19:57:10 +02:00
Alug d6d3c142a4 remove unused goto parse function 2025-08-04 19:27:26 +02:00
Alug cc959005d4 readd ref system compat 2025-08-04 19:27:12 +02:00
Alug 709828e40e Remove goto stuff from bluajit
this wasnt in the main repo
but kart does not have goto so we dont allow modders to screw things up
2025-08-04 19:25:17 +02:00
Alug e6f16fbda5 pass our main CFLAGS to bluajit
otherwise it would compile with O2 and stuff becoming super slow lol
2025-08-04 19:23:38 +02:00
Alug e55c1de0d6 Merge remote-tracking branch 'origin/ljtest2' into lugstuff 2025-08-04 18:49:18 +02:00
indev ba67d870a2 Automatically build bluajit 2025-08-04 19:42:11 +03:00
indev f4019ad5ea Move bluajit into libs 2025-08-04 19:10:37 +03:00
Alug 098779c924 fixup bluajit merge
this is the last state this had before wiping it
2025-08-04 15:15:32 +02:00
Alug 54b9c86d9d Merge remote-tracking branch 'origin/ljtest' into ljtest2 2025-08-04 15:06:23 +02:00
Alug 2e2fb187d0 check if __THROW is defined
Windows does not have it at all, so we gotta check this otherwise compile may fail
2025-08-03 20:12:25 +02:00
Alug 6ce758b083 make driftgauge stuff a bit more readable 2025-08-03 20:11:16 +02:00
Alug 722ee125bf inline prepare_hud_hook 2025-08-03 16:14:14 +02:00
Alug 4a8611bd0c h 2025-08-03 16:07:10 +02:00
Alug 7fc80bb338 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2025-08-03 16:05:12 +02:00
Alug 539a2aa896 move flat cyan check into a function
and also limit it to software renderer only
we dont need this anywhere else, so can save a bit of work
2025-08-03 15:57:28 +02:00
Alug 8b9bcfd2ab use R_GetFlat here
does the exact same thing
2025-08-03 15:53:47 +02:00
Alug 6224216e77 dont PU_CACHE our planeflats 2025-08-03 15:51:15 +02:00
Alug 35d055304e move rainbow color calc into K_Rainbowcolor 2025-08-03 14:42:37 +02:00
Alug a6231d4db1 clamp software lightlevels before shifting it
was a little oopsie porting this over
,after shifting we only get 32 lightlevels
decided to clamp this in range aswell, just incase
2025-08-02 19:13:15 +02:00
Alug cd9e819f11 h 2025-08-02 01:53:56 +02:00
Alug 03f7acafe3 fix the "is valid for C/ObjC but not for C++" warnings 2025-08-02 01:49:48 +02:00
Alug 531e41689e some tiny optimizations 2025-08-02 00:15:16 +02:00
Alug 61089b5552 dont need to reinit those ever 2025-08-02 00:09:07 +02:00
Alug 4dcc43acf3 add an Accessibility options menu
still a work in progress, feel free to suggest more things to add!
2025-08-01 22:25:51 +02:00
Alug fb9d37bb52 readd secbright to menu
into advanced video options menu
2025-08-01 21:27:14 +02:00
Alug f089fd60eb remove secbright from menu
need to slot it somewhere else but little too lazy atm
2025-08-01 21:07:03 +02:00
Alug f384e88cc3 fix windows being unable to link with LTO and openmpt
idk why this works but it does, mirrors how it was before the new makefiles
2025-08-01 21:04:50 +02:00
Alug e8af8b73c5 pass "-g" again for lto and asan on windows
for some weird reason it will omit all debug symbols otherwise, which we need for crashlogs and stuff
2025-08-01 21:04:47 +02:00
James R 7c7e6c4856 lua_hooklib.c: refactor HUD hook call 2025-08-01 21:04:02 +02:00
chromaticpipe 56100899be Configurable sector brightness in software 2025-08-01 21:00:58 +02:00
chromaticpipe bef610d3ff Clamp the lightlevel at the start of HWR_Lighting()
Allows secbright to work without shaders
2025-08-01 20:48:33 +02:00
Logan Aerl Arias 51725535bc Update lauxlib.h
lauxlib.h: mark luaL_error as a REPORT function
2025-08-01 20:46:49 +02:00
Alug 2aa06e3b27 mark this as unlikely
those will never run ever after displaying once
2025-08-01 20:41:50 +02:00
Alug 47e5fb286a who tf needs 999999999 sound channels
:chaobaba:
even 255 are kinda overkill lol
2025-08-01 04:51:38 +02:00
Alug 8a82c60470 we dont need cv_samplerate with sdl mixer 2025-08-01 04:46:29 +02:00
Alug 4305538df2 remove some unused stuff s_sound 2025-08-01 04:45:15 +02:00
Alug bf10ef46e9 rename buffersize to audiobuffersize
buffersize was not a good name lel
2025-08-01 04:44:32 +02:00
Alug 36923feef3 remove usefulness and volume from sfxinfo_struct struct
those are unused anyways, hope this doesent break shit lol
2025-08-01 04:00:00 +02:00
Alug 94e86dda50 init "lenght" in S_AddSoundFx
seems like this never init this lel
2025-08-01 03:58:32 +02:00
Alug 0b5299feb2 fix gme 2025-08-01 03:56:38 +02:00
Alug c661103701 missed those lines 2025-08-01 01:19:49 +02:00
Alug b8557df7a6 update md5 stuff
not much changed, mostly just some memory alingment stuff
well and i changed stuff to be all tabs since it was a hellish mischmasch before lul
2025-08-01 01:14:10 +02:00
Alug feb6053af9 indent deez 2025-07-31 23:33:48 +02:00
Alug 40af0b2098 memset listener outside the loop S_StartSoundAtVolume
same effect, but we dont need to call it multiple times and can be sure this is never unitialized
2025-07-31 19:55:19 +02:00
Alug 6a17bb052c add a configurable same sound limit
inspired by dsda-doom
in alot of cases the game may play a crapton of the same sound at once, becoming unbearably loud
2025-07-31 19:42:25 +02:00
Alug a42e6f24a3 restore mumble postional sounds for displayplayers
we essentially always passed 0 before lol
2025-07-31 19:05:52 +02:00
Alug 933dadd172 fix passing garbage to mumble outside of levels
this just deadass passed the unitialized listener array into mumble
2025-07-31 18:45:22 +02:00
Alug 905c7d665b inline HWR_GetTexturePalette
makes ui draw slightly faster from quick test
2025-07-30 15:29:28 +02:00
Alug a7bdb46dd7 smol changes k_hud
nothing crazy mostly just smol reordering
2025-07-30 14:55:27 +02:00
Alug 47ff1bd871 ack 2025-07-29 19:31:08 +02:00
Alug 6d2205a7a6 cache poly numpts
hope this is correct
2025-07-29 19:06:31 +02:00
Alug a4bf2b0c98 a 2025-07-29 18:54:54 +02:00
Alug 095a7634fa use hypotf for P_SegLengthFloat
well its hypot but for floats lel
2025-07-29 18:42:07 +02:00
Alug 382e164df3 HACK reset demo.inreplayhut on levelload when not in replay playback
this is really hacky, but M_QuitReplayHut will be skipped if we change maps, connect to a server or basically anything in that manner from within a replay that we started from the replayhut
which can lead to crashes or the replayhut to become nonfunctional
note, like this demolist is not freed, but that shouldnt matter much since it will be freed anyways the moment you open the replayhut again
2025-07-29 18:33:00 +02:00
Alug 1190303d5f forgor to reset horizonline check 2025-07-29 15:07:32 +02:00
Alug b2fcc26e07 remove erronous HWR_FreeExtraSubsectors call
this will be called from within HWR_CreatePlanePolygons anyways
2025-07-29 04:24:16 +02:00
Alug c3fcc69668 move horizonline check to hw_bsp
to where maps also get checked for portals
should speed up levelload slightly
2025-07-29 04:23:26 +02:00
Alug 1504684f7f fix the rare infinite loop hang in ogl (sunset hill map)
use new doom-legacies PointInSeg and add a selfref check to CutOutSubsecPoly
(somewhat related, but it appears this whole file is able to mess with the actual sector planes outside of rendering, this is not really good since it may actually lead to some super hard to debug desynchs)
2025-07-29 04:02:30 +02:00
Alug 0b28a728cd cleanup hw_bsp a little
mostly just get rid of debug bloat that isnt even used
adding some branching hints for the I_errors (never seen any one of them happen tbh lel)
and remove some redundant checks
2025-07-29 03:56:10 +02:00
Alug fa1bf7f67c Revert "obliterate hw_bsp and port over doom-legacy code"
This reverts commit 4390fc6830.
2025-07-29 02:59:05 +02:00
Alug 739ff482c6 Revert "fix polyobjects"
This reverts commit 80575d1709.
2025-07-29 02:57:08 +02:00
Alug 9041de5337 Revert "more fixes and cleanup"
This reverts commit e21cb06c5b.
2025-07-29 02:56:58 +02:00
Alug 9d1bdb34a8 Revert "remove unused stuff + more cleanup"
This reverts commit de762ca2f8.
2025-07-29 02:56:53 +02:00
Alug aee5c50c48 Revert "optimize hw_bsp stuff"
This reverts commit cc2d721bb1.
2025-07-29 02:56:48 +02:00
Alug 1d1e2e956f Revert "fix occasional crash"
This reverts commit 6e3dbb62d0.
2025-07-29 02:56:43 +02:00
Alug 7126b616db Revert "change back copyright header"
This reverts commit a8a638c5e6.
2025-07-29 02:56:38 +02:00
Alug 6ff3b1eda9 Revert "dont free our poly_subsectors twice"
This reverts commit b2d1771e79.
2025-07-29 02:56:32 +02:00
Alug 8adab30b5a Revert "0xffff moment"
This reverts commit 47bd2f2445.
2025-07-29 02:56:25 +02:00
Alug ff9b316215 a
comment those out like vanilla
2025-07-29 02:44:54 +02:00
Alug b74c8e9d4b oop 2025-07-29 02:36:37 +02:00
Alug 0201f276b6 camera noclip sec special is effectively unused in kart
its not even in the kart zb config
so mark it with unlikely
2025-07-29 02:35:48 +02:00
Alug 48f99181d7 delet this
shrug those rarely appear and are almost alwaysy fullbright anyways, this crap should honestly be replaced with brightmaps but cba
2025-07-29 01:22:42 +02:00
Alug cf1d3bce53 add slope check here
not necessary but may skip more uneeded checks and stuff
2025-07-29 01:21:12 +02:00
Alug 02a7175beb Revert "funneh wöter wäve shader"
This reverts commit d18567e0c4.
2025-07-29 01:13:34 +02:00
Alug 482658058e Revert "oop didnt push this"
This reverts commit 1bcaec582b.
2025-07-29 01:12:50 +02:00
Alug cf14959636 remove unecessary casts for colormap 2025-07-29 00:48:11 +02:00
chromaticpipe ec43430620 Fix OpenGL flash palettes ignoring saturation 2025-07-29 00:30:51 +02:00
chromaticpipe 7d7db4741f Fix brightness issues with blend textures in Pallette Rendering 2025-07-29 00:30:51 +02:00
Alug a7000dd6ef we dont need to clamp sprite lightlevels everywhere in ogl
theyre an int32 due to the directional light system stuff and get clamped in HWR_Lighting as a result
2025-07-29 00:30:51 +02:00
indev 6d1227f15a Move setting c++ standard bit below 2025-07-27 18:49:48 +02:00
Alug 436290019e readd std=c++17 to cxxflags 2025-07-27 18:42:37 +02:00
Alug c1f3c4cdbe Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2025-07-27 14:30:18 +02:00
Alug 4d5ceb1423 dont do this in dedi
dont need to, its pointless and prob causes more issues than anything
2025-07-27 14:18:30 +02:00
Alug 78f994eced Merge pull request #193 from chromaticpipe/borderlesswindowtoggle
Borderless window toggle
2025-07-26 23:46:45 +02:00
Alug 49c76b1eba reduce netbuffer scope even further 2025-07-26 16:17:58 +02:00
Alug 5e83b5a1f6 seenames stuff is always unlikely 2025-07-26 16:16:51 +02:00
Alug 4e30326ff8 move assignments after early returns ST_drawLevelTitle 2025-07-26 16:16:31 +02:00
Alug 091bbc2b8e get rid of some redundancy R_Frame stuff
R_SetupCommonFrame already checks the actual sector for us, so we dont need to do this before
2025-07-26 16:15:27 +02:00
Alug 236e5d7b06 get rid of code dupe for fpscapping stuff 2025-07-26 16:14:04 +02:00
Alug a4e1c7492f simplify this 2025-07-26 16:13:19 +02:00
Alug 10049f4e31 D_CleanFile can be static 2025-07-26 16:12:29 +02:00
Alug 0c8181f73e update link in addon menu to "mb.srb2.org/addons"
:chonkbuncle:
2025-07-24 23:47:23 +02:00
Gustaf Alhäll bf05136c9c Fix custom addon directory being ignored when downloading addons 2025-07-24 23:42:45 +02:00
Alug 7b3fd8488b delet this 2025-07-24 22:42:11 +02:00
Alug c6b3bf7e63 h 2025-07-24 22:34:35 +02:00
Alug 67429a71a0 add mobj islocal field
so we can skip the pushable trigger stuff for local mobjs for synch reasons
very sketchy
2025-07-24 22:28:05 +02:00
Alug 17968cda95 fix console taking minutes to open during frameskipping
prob not the best way to handle this, but its the simplest
the console should always be openable without issues unless during wipes, since in some cases you end up having to kill the game to do anything
2025-07-24 20:39:50 +02:00
Alug dd696cd29c fix https://github.com/Indev450/SRB2Kart-Saturn/issues/191
was an oversight when i cleaned up the gamepad stuff a bit
2025-07-24 15:37:52 +02:00
Alug 47bd2f2445 0xffff moment
lmao oops didnt pay attention at all
2025-07-24 14:59:39 +02:00
Alug b2d1771e79 dont free our poly_subsectors twice
also use calloc for em
2025-07-24 14:50:12 +02:00
Alug a8a638c5e6 change back copyright header
though keep the correct date
2025-07-23 22:35:54 +02:00
Alug 6e3dbb62d0 fix occasional crash
first side may be also null
2025-07-23 22:33:35 +02:00
Alug cc2d721bb1 optimize hw_bsp stuff
was a little slow before
2025-07-23 22:33:06 +02:00
Alug de762ca2f8 remove unused stuff + more cleanup 2025-07-23 21:25:47 +02:00
Alug e21cb06c5b more fixes and cleanup
ogl uses the "flenght" variable
and use hypotf instead of sqrt
2025-07-23 21:16:03 +02:00
Alug 80575d1709 fix polyobjects
lululu oops
2025-07-23 21:14:48 +02:00
Alug 4390fc6830 obliterate hw_bsp and port over doom-legacy code
fixes numerous issues with rendering in ogl
like the holes in pentagon paradise
or infinite loops in SolveTProblem (sunset hill)
2025-07-23 20:25:09 +02:00
Alug 7a4ddda94c few more things for hw renderer
just moving aaround some things and declaring more stuff as const
2025-07-23 17:05:24 +02:00
Alug 45daa4038c Revert "add "for_each" to srb2 threadpool"
This reverts commit a5a78425e7.
2025-07-23 15:48:26 +02:00
Alug a85b61e06a Revert "allocate tiltlighting buffer in R_AllocViewMemory again"
This reverts commit dbe32317b2.
2025-07-23 15:48:19 +02:00
Alug 2794f8bd5c Revert "omit realloc and use unique_ptr for our tiltlighting buffer"
This reverts commit 7e2a9abfda.
2025-07-23 15:48:07 +02:00
Alug c9ec0593b7 enable ZDEBUG by default
this is just quite useful honestly
2025-07-22 17:29:25 +02:00
Alug 4bcee6aadc move prints to ZDEBUG2
as it seems to be for this purpose
2025-07-22 17:29:10 +02:00
Alug 776608c1b4 move this stuff behind ZDEBUG 2025-07-22 17:24:43 +02:00
Alug 0aa991303c remove redundant R_SetColumnFunc call
this would only be needed if we had brightmap support, but like this it just sets the column function to what it already is
2025-07-21 19:10:47 +02:00
Alug 9fa9821972 Use R_RenderSegLoop if the back sector has any 3D floor planes
fixes issues in northern district zone
2025-07-21 18:32:37 +02:00
Alug 9a2f964d11 branch hints for nights and 2d stuff
gotta keep em for compat reasons Zzz..
2025-07-20 16:40:28 +02:00
Alug 61913b4fce move a bunch of stuff after early returns
+ add some branching instrincts to stuff

maybe saves a bit of time if we dont need the thing
2025-07-20 00:27:46 +02:00
Alug 5648977f24 add toggle for quake screenshake effects
TODO: make an accessability option menu for certain effects
2025-07-19 22:54:28 +02:00
Alug 8bf164f56a fix https://github.com/Indev450/SRB2Kart-Saturn/issues/190
doing it like this, so potentially wonky socked maps dont show up if its disabled
2025-07-19 22:42:00 +02:00
Alug e962b6c88f Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2025-07-19 12:17:19 +02:00
Alug e832e2d547 remove itemamount check here
replicate vanilla
even if this becomes negative
this does not seem to crash, so id rather do whatever vanilla does
2025-07-18 17:43:44 +02:00
Alug f265c89cbe Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2025-07-18 14:14:59 +02:00
Alug 74255ce5d3 Merge remote-tracking branch 'origin/Saturn-Next' into Saturn-Next 2025-07-18 14:12:37 +02:00
Alug 3fec850a75 h2 2025-07-18 11:02:11 +02:00
Alug ca49a90412 h 2025-07-18 11:02:08 +02:00
Alug 7f05e354fb simplify free block in P_RemoveMobj
should be functionally the same
2025-07-18 10:57:02 +02:00
Alug a722992c02 use branch instrincts for P_MobjThinker
based on observations from kart stuff
2025-07-18 10:56:32 +02:00
Alug 22d762b696 oop move this back
this is some global, dont wanna mess things up
2025-07-18 10:54:34 +02:00
Alug 69d8d9960b remove pointless var P_TryCameraMove 2025-07-17 00:28:03 +02:00
Alug 096c89470d store sector directly P_CheckPosition
hopefully this makes pointer access faster here
2025-07-17 00:23:28 +02:00
Alug 7843c882bf optimization K_KartUpdatePosition
this checked the distance to every single waypoint on the map always and unconditionally, but we dont need the distance unconditionally so only check if we need to
+5fps in techbatics hadal classic timedemo
2025-07-17 00:06:13 +02:00
Alug ece90fcf01 use branch instricts for blua
mostly just for error handling
similar to upstream lua and bluajit
hope this speeds this up a little
2025-07-16 23:00:11 +02:00
Alug b1d86f3abb cache those things 2025-07-16 21:52:18 +02:00
Alug cdd62bf26d h 2025-07-16 15:05:36 +02:00
Alug 34332dd744 copy paste oopsie 2025-07-15 19:55:02 +02:00
Alug c7d95b4e75 oop this was unsigned 2025-07-15 19:18:44 +02:00
Alug 3ec1a7c481 unmangle localskin menu mess a bit 2025-07-15 19:16:56 +02:00
Alug 1d047fbf42 few more things i missed 2025-07-15 18:56:18 +02:00
Alug 6b439a4de2 split m_menu definitions to m_menudefs
idk if this is a good idea lel
2025-07-15 18:47:15 +02:00
Alug 236dce0eb9 do some cleanup m_menu
gets rid of a bunch of duplicated splitscreen shit
unused srb2 stuff
commented out stuff aswell
we dont need any of this
this is def still far from tidy and itll never be like this
2025-07-15 18:19:45 +02:00
Alug 9d60ca0a88 discord rpc my butt 2025-07-15 17:04:06 +02:00
Alug 11b9f66b16 use the tooltips array in the menu_t struct for tooltips
so this was always there lel
2025-07-15 14:58:14 +02:00
GenericHeroGuy b2619b2eb1 bruh
Let's try that again, this time putting the camera in a local...
2025-07-15 14:00:27 +02:00
Alug b073673c07 💀 fix menu screentex toggle lel
thx neppy!
2025-07-15 13:59:17 +02:00
Alug d58e24cd84 declare all the kart "time" stuff as const
as far as i can see those never get overwritten and cant be overwritten
2025-07-15 13:56:44 +02:00
Alug 3b6f6a08cb dont apply player camfade when exiting or in freecam mode
also renames it and moves the check outside
2025-07-15 13:55:16 +02:00
Alug 552808e4f3 abuse c++ templates for Hwr_AddSprites
test this, but we can avoid a bunch of branching and functions calls like this when drawdist is inifite
2025-07-14 00:06:34 +02:00
Alug a5ad0e245d use c++ template for HWR_DrawSprites
works just as well without code dupe
2025-07-13 23:11:43 +02:00
Alug 5f5c83bcca register chasecam with the other cam vars
why dupe a loop
2025-07-13 21:45:26 +02:00
Alug 6822a8d113 remove prob pointless check
viewplayer will be the currently viewed displayplayer lel
2025-07-13 19:42:28 +02:00
Alug 2d6ed8cfbd add toggable player close to camera fade
similar to some other kartracers
only takes other players into account
2025-07-13 19:41:42 +02:00
Alug b4b0c78296 smol stuff i missed i_video 2025-07-13 16:31:49 +02:00
Alug 071009b68c clean up i_video.c a little
what a mess
this is still far from good
2025-07-13 16:16:41 +02:00
Alug 75d4739d9e delet windoze users
apparently this makes cross compile commit sudoku, need to test this on actual windoze and see if this breaks anything since idk how this file even works
thx nep for the tip!
2025-07-12 14:56:21 +02:00
Alug a2ef198e7b use I_Assert 2025-07-12 13:39:21 +02:00
Gustaf Alhäll 6a4e39a206 Do proper tree balancing in AATree 2025-07-12 13:37:39 +02:00
Alug d3cd7f4967 Revert "revert changes to m_aatree"
This reverts commit 28b332a4df.
2025-07-12 13:36:52 +02:00
Alug 5040666f97 readd R_PointInSubsectorFast
use it for camera, viewpoint, some precip and sound stuff and (visual) banana slope calc
after profiling it a bit, this may be 2-4x faster in most cases
2025-07-12 13:34:44 +02:00
Alug 0b145123c0 uninline R_IsPointInSubsector
this gets used like once or twice, we dont need that inlined
2025-07-12 13:30:52 +02:00
indev 94013752d7 Strip colors from server name when searching through server list 2025-07-11 22:19:49 +02:00
indev fcf1b9168c Add server search 2025-07-11 21:48:29 +02:00
Alug dfd02fdeb3 modulo maths lel 2025-07-11 16:42:42 +02:00
Alug 5b8b6efed5 put this in a constant 2025-07-11 16:42:22 +02:00
Alug 23aec75ae0 TEST:raise size of sectors considered too smol for precip 2025-07-08 15:11:24 +02:00
Alug 3f4ed87357 fix peeindex overflow
lelelele thx indev <3
2025-07-08 14:23:23 +02:00
Alug 461350baf4 texturewidthmask can be static 2025-07-08 13:48:04 +02:00
Alug b1b4f5aa24 fix color translated spans lmao
oopsie
well atleast we got some extra safety with the spandata source lel
2025-07-08 13:47:36 +02:00
Alug 02f0e32c69 reuse "i" 2025-07-08 12:01:27 +02:00
GenericHeroGuy 0b9b9c22d0 Fix fake floors in Donut Plains disappearing when chasecam is off
Also remove the useless R_PointInSubsector calls
2025-07-08 12:00:43 +02:00
Alug b7da32753b some micro optimize 2025-07-08 00:58:50 +02:00
indev 7fd89bc2ac Add separate option to toggle parallel rendering in R_DrawMaskedList 2025-07-07 23:43:38 +02:00
Alug 9734396c45 Revert "Disable multithreading in R_DrawMaskedList"
This reverts commit 5a44afcd9f.
2025-07-07 23:04:40 +02:00
Alug 1a5cd80539 fix for non pow2 width textures in software from doom-legacy 2025-07-07 21:35:40 +02:00
Alug 28b332a4df revert changes to m_aatree
it was quite a bit slower, i already determined that back when we were still using it for texture caching
2025-07-07 20:25:50 +02:00
Gustaf Alhäll b5027598b1 Actually use endfolders to cache PK3 entries 2025-07-07 20:24:14 +02:00
Gustaf Alhäll 2ecedded80 Cache start and end locations for WAD folders 2025-07-07 20:23:25 +02:00
Alug 2cb029a4f8 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2025-07-06 15:05:54 +02:00
Alug 3c4a8fc0d3 revert P_LookForPlayers optizmiation
this sadly desynches in rare cases
2025-07-06 14:01:29 +02:00
Alug 1bcaec582b oop didnt push this
otherwise it wont really do "waves"!
2025-07-06 03:48:05 +02:00
Alug d18567e0c4 funneh wöter wäve shader
this should be a fof flag so it can be applied if desired instead of doing all this crap, but its too late for such things at this point
2025-07-05 22:45:10 +02:00
Alug d80b21e804 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2025-07-05 15:51:50 +02:00
Alug d4c14297ba GL_ 2025-07-05 15:36:27 +02:00
BlueStaggo c77b9b6385 Manual mipmapping + Texture padding 2025-07-05 15:33:17 +02:00
Alug 93ce374b07 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2025-07-05 12:57:03 +02:00
Alug 95d41a2164 remove smoothpos cvar and add it as setting for "postitionanimation" cvar 2025-07-04 12:32:39 +02:00
Alug 4c8f66d698 oop lmao 2025-07-04 12:07:46 +02:00
NepDisk d4c79ca7b6 Port HEPII(I) position number scaling 2025-07-04 10:34:52 +02:00
Alug 49e99e052f use memset for S_ClearQueue
just simpler
2025-07-04 10:21:46 +02:00
Alug f60f0801b7 update credits
this is super full and we need to think about something better for this X)
2025-07-03 10:17:03 +02:00
Alug b85184f253 oop leak 2025-07-03 00:34:34 +02:00
Alug 1f3688e66a move this out of maptitle condition
it does not rely on it and may even fail
idk why i threw it in there
2025-07-03 00:31:47 +02:00
Alug 16653d9642 double fpscounter samples
slightly more readable
2025-07-03 00:10:29 +02:00
Alug 592886fb4b a 2025-07-01 21:55:37 +02:00
Alug 9e0d6787e9 forgor those 2025-07-01 21:54:40 +02:00
Alug 1ca7bf0f33 delet this 2025-07-01 21:50:01 +02:00
Alug 467be728f3 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2025-07-01 21:17:11 +02:00
Alug a8fdae7abc h 2025-07-01 21:12:44 +02:00
Alug 740e8f36e5 remove some redundant checks HWR_RotateSpritePolyToAim 2025-07-01 21:11:56 +02:00
Alug 9ee5f7958d tiny optimizations hw_main again 2025-07-01 21:11:40 +02:00
Alug abed95f8b0 use quickcamdist for some render stuff
we do not need this to be accurate at all in these cases, so this is probably faster than doing le fixedhypot
2025-07-01 21:10:26 +02:00
Alug 9cfce95c88 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2025-07-01 19:26:04 +02:00
sphere e93248ddd2 Merge branch 'allowdesync' into 'next'
Add a console variable that will allow individual demos to desync....

See merge request STJr/SRB2!2361
2025-07-01 19:05:35 +02:00
Alug dd57ae3c3c whoops those are demo related lol 2025-07-01 18:56:10 +02:00
Alug 96a94a58e3 split replay stuff into g_demo 2025-07-01 18:47:41 +02:00
Alug 2cd5d4f8a8 move kart hud stuff into k_hud
hope i got everything lol
2025-07-01 18:26:54 +02:00
Alug c78a33f66e oop dont need those 2025-07-01 17:35:02 +02:00
Alug 29c971afbf colorize songcredits box 2025-07-01 17:32:55 +02:00
Alug 184efe547b clamp the sprite lightlevel stuff + ensure proper type cast
this is a mess, lets hope this doesent break shit
2025-07-01 16:27:13 +02:00
Alug b948e9c708 inlucde cmath directly in doomdef
need to check if this breaks windoze again tho Zzz....
2025-07-01 15:47:41 +02:00
Alug 0dbe7ba893 this is INT32 so cast to that lel 2025-07-01 15:20:26 +02:00
Alug 6c3c153177 put interp distance stuff into a function
just some code dupe cleanup
also account for c++ so we can use the same macro lel
2025-07-01 15:19:47 +02:00
Alug efaa12c6c7 this can use min/max 2025-07-01 14:42:17 +02:00
Alug f9161963b7 "-Wno-aggregate-return" for c++ 2025-07-01 14:38:32 +02:00
indev d78a6cb0c6 No need for this now 2025-07-01 14:32:16 +02:00
indev a3b67c33b9 Use std::min 2025-07-01 14:23:48 +02:00
Alug 64a738aa15 Merge remote-tracking branch 'origin/emotes' into lugstuff 2025-06-30 18:38:58 +02:00
Alug c0c1b2755a friendship with constexpr started 2025-06-30 12:07:47 +02:00
Alug 7807f67ef5 "restrict" macro for c++
since it does not have it, use __restrict instead
2025-06-30 08:25:34 +02:00
Alug 34a2c08bdb slightly cleanup addline stuff
no clue why i just didnt do this before lel
2025-06-30 08:17:08 +02:00
Alug 6fad476ccb fix hw_main compiler warning 2025-06-30 07:54:34 +02:00
Alug 15d1d3c9d5 Merge remote-tracking branch 'origin/emotes' into lugstuff 2025-06-30 07:15:57 +02:00
Alug 44468a56b7 thanks michaelsoft very cool 2025-06-29 12:34:10 +02:00
Alug 735c14db3f Revert "reset the palette earlier during levelload"
This reverts commit 5e532a76cf.
2025-06-29 12:33:50 +02:00
Alug ca94d6a2e9 add "songcredits" to saturn hud menu
since we have a new style for this now, want to have it in the menu instead
2025-06-29 12:01:58 +02:00
Alug a8eaa02c2b tiny cleanup hw_batching 2025-06-29 11:43:23 +02:00
Alug 10822d0618 those can be const 2025-06-29 11:42:58 +02:00
Alug 2eb4c0709d some cleanup k_kart
perhaps we could also move the saturn stuff into arrays, those massive walls of variables are kinda ugly lel
2025-06-29 11:42:37 +02:00
Alug 289df7ab3e Merge remote-tracking branch 'origin/emotes' into lugstuff 2025-06-28 23:38:51 +02:00
Alug 63e95c885b Merge remote-tracking branch 'origin/emotes' into lugstuff 2025-06-28 23:18:25 +02:00
Alug 0dd14ff27f do a rumble pulse when getting a new driftlevel
kinda hacky, but not sure how else to check for this
2025-06-28 04:25:12 +02:00
Alug 9561c4098e remove this 2025-06-28 01:47:43 +02:00
Alug 2b4111bd2c Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2025-06-27 16:40:40 +02:00
Alug fc60a903e8 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2025-06-26 20:26:01 +02:00
Alug 5478b480b2 remove erronous BACKSLASH
was from when this was a macro lel
edit: screw you comptime
2025-06-26 20:16:27 +02:00
Gustaf Alhäll 3b66f10481 Fix one-pixel wide gaps in tall sprites 2025-06-26 20:08:00 +02:00
Alug afbb84b8e3 mark node as restrict again pointonside 2025-06-26 12:47:10 +02:00
Alug 05ed340e0e do some more tiny optimizations
-those can all be declared with restrict
-our ternary clamp macro is slightly faster than std::clamp
2025-06-26 12:46:53 +02:00
Alug 7e2a9abfda omit realloc and use unique_ptr for our tiltlighting buffer
this makes asan shut up, since those effectively clean up after themselves
2025-06-26 12:44:51 +02:00
Alug 9764cbbfe0 forgor about the new signal handler oop 2025-06-26 00:38:48 +02:00
Alug 454c48dd1e add toggle for software cyan cut stuff 2025-06-25 12:44:33 +02:00
Alug fba5414bc7 turn angle stuff into a switch in R_SetupSkyScale 2025-06-25 12:27:13 +02:00
Alug dbe32317b2 allocate tiltlighting buffer in R_AllocViewMemory again
just removes the ugly stuff in the span drawers
needs to be tested a little, but should be fine
2025-06-23 20:08:04 +02:00
Alug a5a78425e7 add "for_each" to srb2 threadpool
this exectures something for EACH thread not some abritatrily choosen ones
2025-06-23 20:06:09 +02:00
Alug ec8bf47f4b optimize R_StoreWallRange with cut down version of rendersegloop when a seg is untextured
from srb2, its just a cut down rendersegloop with alot less things to check and such
2025-06-23 19:38:37 +02:00
Alug 03759612a8 Merge remote-tracking branch 'origin/softwarecrap' into lugstuff 2025-06-23 19:17:50 +02:00
Alug 22bbb0626b just always clamp the non psprite texture column
this may underflow, which the check in the lööp body does not account for
2025-06-23 19:16:00 +02:00
Alug 80de6c1d51 optimization P_LookForPlayers
from eternity engine, apparently this may retry checksight a bunch of times for no reason
not sure if we even use this tho tbh lel
2025-06-23 19:15:08 +02:00
Alug 2fd435c121 this makes no sense lol 2025-06-21 22:37:36 +02:00
Alug eab2511a2d ceepeepeefy hw_main, abuse templates for portal stuff
no idea if this is faster at all lmao
2025-06-21 20:36:13 +02:00
Alug 8bad9bc4c9 minor optimizations r_things 2025-06-21 18:07:29 +02:00
Alug 5eb07443dd use templates for R_ClipWallSegment
actual slight speedup
2025-06-21 18:07:11 +02:00
Alug 5388210c62 fix a clang warning 2025-06-20 09:53:18 +02:00
Alug 5ac7a37602 do palette stuff in st_ticker
cleanup and dont call it in normal ogl at all unless palette render with flashpals is enabled
2025-06-20 09:53:06 +02:00
Alug a85ae674e4 remove now unecessary type cast 2025-06-19 16:30:54 +02:00
Alug 42e946b498 shut the up -Waggregate-return 2025-06-19 16:29:52 +02:00
Alug c590a7d3b9 ok git very cool 2025-06-19 16:26:18 +02:00
Gustaf Alhäll 587ed71294 Remove aligned allocation functions 2025-06-19 16:22:19 +02:00
Gustaf Alhäll 54b4760c53 Fix potential NULL deference if memory runs out during cURL request 2025-06-19 16:08:20 +02:00
Alug d81aa3038a Merge remote-tracking branch 'origin/fixupnet' into lugstuff 2025-06-19 15:58:51 +02:00
Alug 8435fc6b37 turn translation colormaps stuff into an enum 2025-06-18 09:14:24 +02:00
Alug e10dfe1303 check if player is local here 2025-06-18 09:13:58 +02:00
Alug c1ffa48a5e merge this condition 2025-06-18 09:13:45 +02:00
Alug dfbdbbf410 attempt at optimizing drawcolumn drawers a bit more
inspired by dsda/prboom
seems to be super slighty faster
2025-06-18 09:13:13 +02:00
Alug 82b89e20c5 macrofy ogl function pointer setup
should make it a little less annoying to add new functions
2025-06-17 16:54:21 +02:00
Alug d283d6d4d1 remove some code dupe
starting to like those lambda things
2025-06-13 16:07:38 +02:00
Alug 3f27dd042a fix double sided skies per addline clipping code
fixes greencave skybox
hopefully this is it and doesent break anything else sigh
2025-06-13 08:11:32 +02:00
Alug a3b11a9854 R_GenerateBlendTables can be static 2025-06-13 03:22:36 +02:00
Alug 87446dd27d port the span and column drawer templates + tilted translucent splat drawer
took the liberty to also carry over our optimizations, this is actually slightly faster than what we had before
2025-06-13 03:20:55 +02:00
Alug adbb0bab13 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2025-06-13 00:53:45 +02:00
Alug e08678309f move this into an else
saves us a little work
2025-06-13 00:08:50 +02:00
Alug a696fb6e52 tweak the sky checks even more
apparently koda has a skybox, and checking like this makes it not trigger, lets hope this has no bad side effects Zzz...
2025-06-13 00:08:50 +02:00
Alug bd07085aaa pass -flto to linkerflags too
lel forgor
somehow this still worked anyways
2025-06-12 23:33:22 +02:00
Alug 291b78384b readd some lost comments in r_bsp 2025-06-12 19:48:44 +02:00
Alug 41a907f2bd dont compile with software multithread if NOTHREADS/HAVE_THREADS=0
might be useful for smth ig
2025-06-12 19:48:25 +02:00
Alug 857c9aa397 move CopyCaretColors to m_misc 2025-06-12 17:09:26 +02:00
Alug 62f279754c unnest the skybox scale setup stuff 2025-06-12 17:09:06 +02:00
Alug ca6c42f35c check if seg has any texture at all
seems to work even better and less "false positives"
also removing some redundant conditons
2025-06-12 17:08:09 +02:00
Alug adabf41b23 a 2025-06-12 00:57:49 +02:00
Alug e2369a0c41 Merge remote-tracking branch 'origin/fixupnet' into lugstuff 2025-06-12 00:55:33 +02:00
Alug 56615089e3 Merge remote-tracking branch 'origin/fixupnet' into lugstuff 2025-06-12 00:01:32 +02:00
Alug 97811a4b8c add lugent to credits 2025-06-11 20:55:16 +02:00
Alug c0ce9944c2 absolute insanity to hopefully fix all sky issues while keeping skyvisible 2025-06-11 19:07:36 +02:00
Alug 36c427ae31 add tilted fog span drawer
fixes the red fog blocks on mkrevamp
2025-06-11 17:10:04 +02:00
Alug 751c339948 we have a var for that lul 2025-06-11 16:32:25 +02:00
Alug cf10e50063 attempt o make fofs in software always cut cyan pixels
if they do contain cyan pixels lel
kinda meh, and needs a toggle
2025-06-11 00:31:56 +02:00
Alug 4c44b70cea make the check a little more robust + account for slopes a little 2025-06-10 23:50:05 +02:00
Alug 638e00710c add missing plane bounds check to R_DrawSkyPlane 2025-06-10 23:01:58 +02:00
Alug 089d47a251 another attempt at actually fixing sky issues
absolutely fucking horrible
but this also does account for single sided lines aswell and gets rid of artifacts and perf
2025-06-10 18:00:33 +02:00
Alug 392c3f3ba4 few smoler optimizations r_segs 2025-06-10 01:21:22 +02:00
Alug bb5296b9e0 kill the splitscreen lööps from R_RenderPlayerView
this already gets called from within the one that assigns viewssnum which we can just use here
2025-06-09 23:44:19 +02:00
Alug 7f2c2ae417 try the "hot "attribute for software drawers 2025-06-09 22:29:21 +02:00
Alug eb6617d594 simplify R_SetupAimingFrame 2025-06-09 22:28:43 +02:00
Alug b4011559ac maybe this makes perf better somehow 2025-06-09 22:28:15 +02:00
Alug 3c18eb6d6b absolutely disgusting hack for sky issues
instead of homremoval, we draw the fucking skyplane before everything lmao
2025-06-09 22:18:57 +02:00
Alug d5107eb81c make skytextures support texture offsets in software 2025-06-09 20:57:06 +02:00
Alug e696f6d885 fix portals dying
due to nummasks being too small and causing an overflow
ty hannu!
2025-06-09 19:22:14 +02:00
Alug a1a5972a8b fix the goddamn portal use after free
https://git.do.srb2.org/STJr/SRB2/-/commit/f536ab34674fb8d3ee262a0009753f552074305c
2025-06-09 19:02:48 +02:00
Alug 047f3a2f7c fix bad copy paste lul 2025-06-09 17:09:42 +02:00
Alug c41479e79e fix SHITPLANESPARENCY and QUINCUNX 2025-06-09 17:04:39 +02:00
Alug 525520ba5a fix some fofs not rendering in software
i did an oopsie in 7.2 X)
2025-06-09 17:04:13 +02:00
Alug c0b708aa02 declare fracstep as const 2025-06-09 17:03:28 +02:00
Alug 8d4a83bc5b memset those 2025-06-09 17:03:08 +02:00
Alug d2a093b635 make skyportals account for how kart sets the viewheight
no we still dont use it
2025-06-09 17:02:56 +02:00
Alug 33f0cc9c1a dont set any texture mapped drawer when fog 2025-06-09 17:02:12 +02:00
Alug 054b72a058 unnest the overflow_test stuff
its also a ternary now lul
2025-06-09 17:01:20 +02:00
Alug 923bb2bf61 fix the fov adjust check
lmao oops
2025-06-09 16:58:39 +02:00
Alug 5a5a3bb235 Revert "bring back old clipwallsegment stuff"
This reverts commit 961c0eb970.
2025-06-09 04:09:55 +02:00
Alug 272cf81e4f move hom removal to D_Renderview
removes the hwr code dupe and moves this out of the splitscreen loop
2025-06-09 00:21:23 +02:00
Alug 5bf635e04c Revert "attempt at fixing software skywalls"
This reverts commit c78305f1f1.
2025-06-08 23:47:44 +02:00
Alug 961c0eb970 bring back old clipwallsegment stuff
i just didnt like the flow of the new ones
2025-06-08 21:38:27 +02:00
Alug cf3e444e2d fix the massive slowdown on ante
due to really bad loop layout
std::fill is only cause it looks fancy :3
2025-06-08 21:36:28 +02:00
Alug 78b0cb5f5a fix portals on slopes
idk this is quite the hack, but it works
this adjustment somehow got omitted from srb2 during the portal refactor
2025-06-08 20:02:54 +02:00
Alug f37c4371f3 readd portalcullsector
+ sprite clipping improvements with portals
2025-06-08 19:15:15 +02:00
Alug 2b1614fd0a fix lightlist memory leak
not sure if we need to copy over the old shit, but this seems to work aswell
2025-06-08 17:24:05 +02:00
Alug 3a3a5e06d9 fix da rippled wöter
i hate fixed point maths lmao
2025-06-08 00:43:03 +02:00
Alug ae14462cee do NOT use Z_ functions in threaded stuff
shit dies
2025-06-08 00:24:53 +02:00
Alug efdd108bad make the fov dependant init stuff bit more safe and stuff 2025-06-07 23:54:03 +02:00
Alug 2a3e3140f2 fix column data colormap shit in R_RenderThickSideRange
too lazy to explain so https://git.do.srb2.org/KartKrew/RingRacers/-/commit/1ccd41c3dbb3132ce7467edf0c12c9d420b189f9
2025-06-07 23:31:17 +02:00
Alug 79a02ce3a2 use ceepeepee cast here 2025-06-07 21:10:31 +02:00
Alug c78305f1f1 attempt at fixing software skywalls 2025-06-07 20:31:14 +02:00
Alug 1ab828d23c fix span corruption due to wrong types being used
i did not realise srb2 changed this at some point to use fixed_t
2025-06-07 20:04:43 +02:00
Alug 3c81cd9393 convert i_system to cpp add missing exit for threading errors 2025-06-07 15:22:39 +02:00
Alug df6ec86435 dont think we need this twice lel 2025-06-07 14:21:43 +02:00
Alug 7ea9c592bf smol makefile stuff 2025-06-07 14:21:10 +02:00
Alug 63281658f4 remove duped declaration 2025-06-07 13:32:06 +02:00
Alug 8128572c5e this does nothing lel 2025-06-07 13:31:36 +02:00
Alug 86d5cd036f fix le sourcefile 2025-06-07 13:16:26 +02:00
Alug 8b054b9f4b thanks michaelsoft! 2025-06-07 12:23:43 +02:00
Alug 0268ff6056 Merge pull request #182 from chromaticpipe/fixedhelp
Fixed help command
2025-06-07 11:55:06 +02:00
James R. 49a80ae5a7 R_FindPlane: fix offsets rotation overflow for non-sloped planes 2025-06-07 11:41:16 +02:00
James R 5de230d42a Do not factor height into sprite thickseg sorting 2025-06-07 11:40:07 +02:00
James R e2b80e31d2 Check that top of sprite is above plane or bottom is below
This fixes slightly raised fofs drawing on top of sprites that should be in
front of them. Previously would check that the bottom of the object was above
the plane. Now also uses sprite offsets like the fof seg sorting does.
2025-06-07 11:35:44 +02:00
Alug fbcf1357d2 HACK: dont pass wflags to c++
silences some annoying compiler complaints lel
2025-06-07 11:33:30 +02:00
Alug fdd78157c3 cleanup the software drawers even more + unroll them
looks pretty clean now, not sure if i want to port the templates, this is good enough for now
2025-06-07 11:32:46 +02:00
Alug b57d52d9c5 tiny optimizations 2025-06-07 11:31:38 +02:00
Alug 91883b2718 simplify R_ExpandPlane 2025-06-07 11:30:40 +02:00
Alug d002507844 convert r_segs to ceepeepee + overflow fix from RR R_DrawRepeatMaskedColumn
+ alot of cleanup
should more or less function the same, just alot less messy
2025-06-07 11:30:03 +02:00
Alug 8f33c4952c fix slopes and slope flat alignment
software slopes finally are sane........
fixes certain maps like stardust speedway looking like complete butt
need to test ogl, not sure if theres any real change there
2025-06-07 11:27:59 +02:00
Alug d13ef3f322 cleanup software drawer handling stuff
mostly ported from rr
is alot more readable and less confusing
2025-06-07 11:24:20 +02:00
Alug 2af6e9c267 use realloc for batching stuff
seems to strangely speed things up even
didnt think those happen often?
2025-06-07 02:35:49 +02:00
Alug 9f7b0b0c64 test: allow multithreading for masked planes
quite a neat speedup on some maps
needs testing
2025-06-07 01:20:14 +02:00
Alug c517a9e5ad make drawcolum lightlists use realloc again lel
otherwise theres a crapton of overlapping memory lel
2025-06-07 01:19:38 +02:00
Alug fc8216809a HACK: move semaphores into the drawplane loop, to fix a few visual glitches
a bit of slowdown, but i have no clue what exactly causes shit, so this is the best solution for now i guess
2025-06-07 01:18:50 +02:00
Alug fc0636aa5f forgor this from removing screen size static array stuff lel 2025-06-07 01:17:45 +02:00
Alug 85afc212f1 forgor to free the mask heads lel 2025-06-07 01:16:39 +02:00
Alug 13e19220bd convert r_things to ceepeepee 2025-06-06 23:36:25 +02:00
Alug 6b00b2948f split skin stuff from r_things into r_skins
what a mess
2025-06-06 23:13:33 +02:00
Alug a37052bb7f smol cleanup 2025-06-06 21:14:53 +02:00
Alug 9580d6904c save smol amount of fixed to double conversions in R_StoreWallRange
also adds those as actual functions in case we wanna use it for smth else
2025-06-06 17:37:40 +02:00
Alug 3f17862b13 make this less ugly 2025-06-06 16:55:28 +02:00
Alug 4bc18b224b cache ds->transmap for translucent span drawers
super slight speedup
2025-06-06 16:53:22 +02:00
Alug f2d48eb643 dont errronously clamp the sprites texturecolumn
we already take care of this in the lööp header
2025-06-06 15:22:45 +02:00
Alug 7d276e9b94 fix R_ProjectSprite clipping checks overflowing
was causing sprites to disappear in some angles
2025-06-06 14:42:18 +02:00
Alug 39c7fc8c0d optimize software hud drawing
from srb2classic adjusted to our drawers
2025-06-06 01:17:26 +02:00
Alug c719637937 dont check for wraps on 0 height textures in column drawers
slight speedup thx srb2classic!
2025-06-06 01:04:11 +02:00
indev 5cb6490aaa Make tiltlighting buffer thread_local 2025-06-06 00:55:15 +02:00
indev 164af2babd Revert "ok fuck you tiltlighting static buffer it is"
This reverts commit 2a023246be.
2025-06-06 00:55:12 +02:00
Alug 4cd990fe77 cache vid.width in the column drawers
shit was really slow lel
2025-06-06 00:55:06 +02:00
Alug 134e3852ad remove seemingly wrong internal texture formats
from srb2classic
2025-06-06 00:02:42 +02:00
Alug a478de7c17 add toggle for software multithread 2025-06-06 00:01:48 +02:00
Alug acf82fa743 ok fuck you tiltlighting static buffer it is 2025-06-05 23:50:12 +02:00
Alug 73fe8b4a89 move this 2025-06-05 23:17:28 +02:00
Alug 44bb156b86 fix some warnings and plane ripple 2025-06-05 22:55:27 +02:00
Alug 2d51a0a28b Merge remote-tracking branch 'origin/lugstuff' into lugstuff 2025-06-05 21:30:04 +02:00
Alug c1a7f717ff fix slopes and other shit 2025-06-05 21:29:56 +02:00
indev 5ed0fca23c Add -lpthread into libs and cxxopts into c++ compilation flags 2025-06-05 18:30:24 +03:00
indev 4081639c51 Add ifdef __cplusplus into hardware/hw_main.h 2025-06-05 18:28:55 +03:00
Alug 0b8caa5690 busted ass multithreading for le soft 2025-06-05 16:53:22 +02:00
Alug 15ccbd7b4b dont draw precip in the skybox lel 2025-06-05 15:05:20 +02:00
Alug 951c5d9a5f smol cleanup the splat drawers
didnt knew we actually use em so kinda didnt care lel
2025-06-05 15:00:16 +02:00
Alug 0d4db5eb33 kill static buffer for tiltlighting, again
kinda ugly but gets the job done lel
2025-06-05 14:45:37 +02:00
Alug 75325e1885 fix precip not drawing 2025-06-05 14:31:40 +02:00
Alug b427c2c3e7 port masked drawlists for software + portal visplanes
Note: need to check if we gotta readd portalcullsector for ogl portals, technically this is alot faster and fixes the occasional portal disappearing, but may introduce occasional visual bugs
2025-06-05 14:22:13 +02:00
Alug 52715471c5 unglobalize drawspandata 2025-06-05 12:24:40 +02:00
Alug dafe1b98d1 unglobalise drawcolumndata
from RRs multithread
will follow up with spandata
2025-06-05 02:51:43 +02:00
Alug 57c12d542f delet dc_hires 2025-06-05 01:41:45 +02:00
Alug 3f58590b8f remove FIXMEs from draw column stuff 2025-06-05 01:27:26 +02:00
Alug 700b95229d use ternaries for column clamp
it is slightly faster for me lel
also lets us get rid of an extra variable
npow2min is also declared static as its always -1
2025-06-05 01:24:58 +02:00
Alug 70fb96f550 move those around + remove NOWATER ifdef 2025-06-05 01:01:11 +02:00
Alug 2b27be0fe4 split r_draw8 into r_drawcolumn and r_drawspan
+ remove the _8 from the "namespace" since we dont have highcolor stuff
2025-06-05 00:52:40 +02:00
Alug e6a4155431 those can be just "while" lööps 2025-06-05 00:44:50 +02:00
Alug 30b940b9fd set MAXVIDWIDTH and MAXVIDHEIGHT to 8192
should accomidate absolutely everything
2025-06-04 23:03:03 +02:00
Alug 2cabe11652 get rid of static screen size buffers, alloc em to current screen size instead
mostly taken from srb2s any-resolution branch
2025-06-04 22:59:26 +02:00
Alug 7808ef5bf3 clamp shit so vhs effect doesent do oob writes on some resolutions
shoddy way but fuckit
2025-06-04 20:43:48 +02:00
Alug 5a37a8c4db move ripple blit stuff into own function 2025-06-04 19:59:58 +02:00
Alug 6f7209e775 make software ripple splitscreen checks less awful to look at 2025-06-04 18:48:23 +02:00
Alug d43b362b78 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2025-06-04 15:52:49 +02:00
Alug e9b400e6ab unroll span drawer loops 2025-06-04 15:52:37 +02:00
Alug 0de1355f74 use floats flor slope drawing
idea from srb2classic
2025-06-04 15:52:20 +02:00
Alug 1dcce65b69 remove ylookup, columnofs and topleft lookups
move screens array to "vid" struct
remove a bunch of unused stuff

this speeds up 4 player splitscreen ever so slighty
mostly just alot cleaner than the mess it was before
2025-06-04 15:50:33 +02:00
Alug 972e829a12 dont initialise those twice lol 2025-06-03 19:46:22 +02:00
Alug 5141fe23d6 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2025-06-02 22:52:35 +02:00
Alug baad766aff delet this 2025-06-02 20:55:59 +02:00
Alug cbfbbccd6d proper init enterprecise 2025-06-01 01:35:14 +02:00
indev 00d55ba058 Add new music credit draw style, 'songcredits Box' 2025-05-31 21:34:47 +02:00
Alug e1cb7e2cc2 i like switches mhhhm 2025-05-31 20:55:10 +02:00
Alug 6803cbaf4b shut up curl im already long 2025-05-31 19:55:33 +02:00
Alug 1defabd716 Merge remote-tracking branch 'origin/luamusicdef' into lugstuff 2025-05-31 19:39:27 +02:00
Alug e3d1835f1d use memcmp during startup map check
prob not faster just looks a bit better tbh
2025-05-31 17:20:26 +02:00
Alug 90cf826983 hack: reset musiccredits when changing gamestate
otherwise they may persist if theyve been currently displayed
2025-05-31 16:21:20 +02:00
Alug 6d4bb49db6 fix awayview join crash
player->awayviewmobj may not exist yet in some cases
2025-05-31 15:57:03 +02:00
Alug ba121f3695 dont let dedi cache vote patches lol 2025-05-31 15:29:39 +02:00
Alug 7a68de85fc oop 2025-05-31 15:24:14 +02:00
Alug 7af93b7375 dont let dedi free votepatches lel 2025-05-31 15:23:07 +02:00
Alug 428f759ed5 free votepatches also in ogl not just software 2025-05-31 15:21:20 +02:00
Alug 5e9168a067 also put votescreen patches into votescreen struct
+ more cleanup
2025-05-31 15:20:42 +02:00
Alug feba109305 rename luaVoteScreen to luaPrefix + make it static buffer
since its effectively just a prefix,
2025-05-31 15:19:02 +02:00
Alug e1eb430810 fix oopsie that caused use after free 2025-05-31 15:16:51 +02:00
Alug cc6c9d5986 fix smol mistake votescreen check 2025-05-31 02:53:44 +02:00
Alug 5a36f01f9d use buffer instead of faketic
from SRB2Classic
will make things more prone to stutter
but i prefer less input lag
2025-05-31 02:51:18 +02:00
Alug f184f0e821 unnest loop stuff in P_PartialAddWadFile
may speed this up ever so slightly since we dont need to go through all wad lumps 3 times per call anymore
2025-05-31 02:49:50 +02:00
Alug 8dc8140f72 Put votescreen background stuff into a struct
+ some refactoring and renaming

- removed some unused and redundant variables
- renamed some variables

turns out the lua votescreens always used the animated votescreen drawer, so i renamed it to lua votescreen drawer
2025-05-31 02:41:06 +02:00
Alug e3d0c69e2c fix memoryleak in pk3 verify functions 2025-05-30 20:56:43 +02:00
Alug 7c2348c17c some crap from ceepeepeecheck 2025-05-30 20:52:38 +02:00
Alug debf455b2f Fix underflow in consistancy checking code
https://git.srb2.org/Hanicef/SRB2Classic/-/commit/9f5686ef48956cd64ef92f737e59cbbaa27d8cf9
2025-05-30 02:54:34 +02:00
Alug 2b8e6e05e3 cleanup d_main a little 2025-05-30 02:19:13 +02:00
Alug ca0071496c fixup ceepeepee support 2025-05-29 21:14:19 +02:00
Alug 61adbaf47d thanks windoze very cool part 2 2025-05-29 19:33:24 +02:00
Alug 5dcf69e40b thanks windoze very cool 2025-05-29 19:33:22 +02:00
Alug 9687a9b80c didnt mean to change this lel 2025-05-29 18:59:27 +02:00
Alug 905425f7b9 only make screentexture for postprocess if we need to
gives quite a neat perfboost on the gpu side
2025-05-29 18:57:36 +02:00
Alug e9731d2144 move HWR_GetTexturePalette calls
to after early returns/where they are used
2025-05-29 18:17:07 +02:00
Alug e0f28c7b4c let Z_CheckHeap print file and line of where it occured
like its supposed to lel
2025-05-29 17:58:25 +02:00
Alug 6ab28f69f2 call HWR_LoadMapTextures in paletterender toggle callback
from srb2 pr
2025-05-29 17:58:00 +02:00
Alug 27db96ef6b bruh 2025-05-29 16:03:55 +02:00
Alug 0d3ccb5c39 add comment 2025-05-29 15:31:19 +02:00
Alug 8a4cc03f7e dont use stdbool´s bool type
this badly breaks everything
apparently the code assumes boolean to be an interger type or some shit
2025-05-29 14:46:28 +02:00
Alug 5aed73582a Reapply "Merge branch 'fixgnu23' into Saturn-Testing"
This reverts commit 13bea28fec.
2025-05-29 13:32:53 +02:00
Alug 154a9722be Revert "stuff"
This reverts commit 0f00ba7346.
2025-05-29 13:32:39 +02:00
Alug 0a81e78978 Reapply "remove forcing c17 from makefile"
This reverts commit 66fc6cbb17.
2025-05-29 13:32:24 +02:00
Alug 8d93c23187 cast mask to uint before shifting in R_PointOnSide 2025-05-29 13:32:16 +02:00
Alug f6c7300121 add mo checks to automap stuff 2025-05-29 13:29:25 +02:00
Alug 0eeef7aa41 add a bunch of checks for if G_BuildMapTitle returns NULL 2025-05-29 13:26:52 +02:00
Alug f176306647 no need for an else here 2025-05-29 11:50:08 +02:00
Alug ad35a974bd reset the palette earlier during levelload
generally make this behave like srb2/rr again
2025-05-29 11:49:43 +02:00
Alug 6c9d68eaaa fix some strncopy warnings 2025-05-29 11:48:00 +02:00
Alug 298323657c readd cubeapply check here 2025-05-29 11:47:37 +02:00
Alug 0f00ba7346 stuff 2025-05-29 11:46:24 +02:00
Alug 66fc6cbb17 Revert "remove forcing c17 from makefile"
This reverts commit 46f8c6b7a5.
2025-05-29 05:32:40 +02:00
Alug 13bea28fec Revert "Merge branch 'fixgnu23' into Saturn-Testing"
This reverts commit face5cf447, reversing
changes made to 603267b753.
2025-05-29 05:32:31 +02:00
Alug 85a7d95925 add nofork parameter to dedibuild 2025-05-28 23:57:53 +02:00
Alug 0f5d61614d Merge remote-tracking branch 'origin/updatewinlibs' into lugstuff 2025-05-28 22:16:56 +02:00
Alug d4bfd8c549 this memset is incorrect and does nothing 2025-05-28 22:11:46 +02:00
Alug 32f97f1c8e remove this
prob wrong assumption, our netcode sucks massive ass
2025-05-28 21:42:13 +02:00
Alug bc0392babc poep 2025-05-28 18:10:41 +02:00
Alug 6c30b72ff5 get rid of some crap in lugstuff 2025-05-28 18:01:23 +02:00
Alug 58ae1ea373 add missing "time" include from dedi i_system 2025-05-28 16:53:23 +02:00
Alug 72fa7daacd check for 32bit with __SIZEOF_POINTER__ for precip drawdistance
thx @chromaticpipe for the tip!
2025-05-28 16:26:26 +02:00
indev 46f980f854 libpeethread 2025-05-28 16:20:32 +02:00
Alug 1a59cf7f1b readd flexible array for softwarepatch columnofs
how did this ever work lel
2025-05-28 16:19:46 +02:00
Alug a20306f969 more windoze build fixes 2025-05-28 15:13:52 +02:00
Alug 6722c0423e cleanup the wadpath mess 2025-05-28 05:34:23 +02:00
Alug bc56198092 port ceepeepee makefile support
from blan
incase we ever need it
2025-05-28 05:28:51 +02:00
Alug 051e73b8f2 make the dedicated build actually run as dedicated lel 2025-05-28 05:20:23 +02:00
Alug 8f22b5985c port dedicated server build
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2246
2025-05-28 05:15:23 +02:00
Alug e44f9deed6 h 2025-05-28 04:41:56 +02:00
Alug da1bb1a5b8 reenable old.mk warning 2025-05-28 04:04:06 +02:00
Alug 70b1fab9ff update gitignore 2025-05-28 04:01:39 +02:00
Alug 338daa845f Merge remote-tracking branch 'origin/lugstuff' into lugstuff 2025-05-28 03:59:33 +02:00
Alug beac7d9ce6 cleanup 2025-05-28 03:58:52 +02:00
Alug f3acc28992 windoze things 2025-05-28 03:07:22 +02:00
Alug d2342fa1f5 fix a NOMD5 warning 2025-05-28 02:46:42 +02:00
Alug 1016f96c11 why tf was NOMD5 enabled by default 2025-05-28 02:45:39 +02:00
Alug 776ea3247a fix the new compiler warnings 2025-05-28 02:45:13 +02:00
Alug e31625189d fixup! windoze compile 2025-05-28 01:39:40 +01:00
Alug 4e591ecc4d cleanup the sourcefile slightly 2025-05-28 02:33:03 +02:00
Alug df5c4857ec obliterate the makefiles
and replace em with the newer ones
i have absolutely no fucking clue how to make bluajit work with this
2025-05-28 02:27:18 +02:00
Alug 826ca1d0fb fix a windoze warning 2025-05-28 01:27:10 +01:00
Alug 3c62ff266c Reapply "Cache start and end locations for WAD folders"
This reverts commit 30d64ad538.
2025-05-27 22:43:53 +02:00
Alug 6ab1f06452 fix W_CheckNumForFolderStartPK3 2025-05-27 22:04:59 +02:00
Gustaf Alhäll ad02661c61 Fix long names using the wrong hash field 2025-05-27 21:58:01 +02:00
Alug 04871f21ed Optimize lump searching
https://git.srb2.org/Hanicef/SRB2Classic/-/commit/dc608f084c76cf72de9fc3f3f347752f04acae42
2025-05-27 21:46:59 +02:00
Alug a3c07aadf7 dont always print openmpt version to console
just use I_OutputMsg instead
2025-05-27 18:30:30 +02:00
Alug c880be0875 Print the current SDL_mixer version
when initializing the sound system
2025-05-27 18:29:58 +02:00
Alug d7ce97eb07 Merge remote-tracking branch 'origin/updatewinlibs' into lugstuff 2025-05-26 18:00:01 +02:00
Alug 427696a6fd make screen tilt stuff slightly prettier lel 2025-05-25 17:36:25 +02:00
Alug 14d840147d Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2025-05-25 04:41:29 +02:00
Alug 941b36f0d5 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2025-05-23 16:05:50 +02:00
Alug f103a7e7a4 allow capping the game fps seperately for when its unfocused 2025-05-22 23:17:38 +02:00
Alug 25d5aa1611 h 2025-05-22 03:32:28 +02:00
Alug 10da6fa3f1 a 2025-05-22 03:22:52 +02:00
Alug 58e8ecf353 simplify hashtables even more 2025-05-22 03:12:29 +02:00
Alug 5bb3226f12 cleanup the hashtable list wipe
removes some redundancy and stuff
2025-05-22 02:51:40 +02:00
Alug c53365efc1 tiny optimization for hashtables 2025-05-22 02:11:25 +02:00
Alug 861767b01c just memset the hashtable 2025-05-22 02:01:39 +02:00
Alug e1135f230e forgor to init the mobjnum hashtable 2025-05-22 01:03:01 +02:00
Alug 59dd198873 we dont use any of this 2025-05-22 00:48:19 +02:00
Alug f8f1612208 check the easier thing first 2025-05-22 00:25:50 +02:00
Alug d8f0a09bed use hashtables for savegameload thinker stuff
was reported this speeds up the savegame load on join significantly
stolen from srb2netplus lel
2025-05-22 00:25:34 +02:00
Alug 38e972deda CL_AbortConnection 2025-05-21 12:12:15 +02:00
Alug 48ce6bb9e8 man 2025-05-21 11:44:00 +02:00
Alug d6598f35e4 aaacackakcakck 2025-05-21 11:43:01 +02:00
Alug a6e9185ab6 make this kick you back to titlescreen and stuff 2025-05-21 11:42:41 +02:00
Alug 8980e04205 attempt to fix curl crashing when you dont have write access to download folder 2025-05-21 11:30:57 +02:00
Alug 6b776468b7 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2025-05-20 15:57:47 +02:00
Alug 7b7028be6a we may fixed the double free, but now we fix the ghost hitlist also crashing 2025-05-19 20:00:54 +02:00
Alug 6f8e28bda8 setting gamestate attempts to 0 should disable saturn resynch and setting resynchattempts to 0 should disable vanilla resynch 2025-05-19 16:27:35 +02:00
Alug 11938e343b oop this was always true effectively 2025-05-19 15:59:50 +02:00
Alug 471d7981c4 Merge remote-tracking branch 'origin/votebgscaling' into lugstuff 2025-05-19 15:59:46 +02:00
Alug a729279224 try fixing some crash with bogus netxcmds 2025-05-19 15:59:41 +02:00
Alug c0f7780709 readd player var to lib_pDoSuperTransformation
otherwise this may desynch?
2025-05-19 15:48:20 +02:00
Alug 38cbdac05a lugstuff thing 2025-05-19 15:26:43 +02:00
Alug 128da9b687 even more random cleanup 2 2025-05-19 15:26:19 +02:00
Alug 5bf5172310 delet old tools
they dont work anymore anyways
2025-05-19 00:22:00 +02:00
Alug f422a81d46 delet dummy 2025-05-19 00:21:43 +02:00
Alug 6b0e55d42f random cleanups
note: 2d camera didnt work anyways
2025-05-18 16:44:09 +02:00
Alug 38ce112e5c stoopid gaame 2025-05-17 14:51:24 +02:00
Alug d9c7f55270 pressing the freecam toggle while spectator now moves your camera to startposition
just to quick and easy return to the map if youre really far off
2025-05-17 13:56:09 +02:00
Alug 2b03311fe9 make this switch slighty prettier 2025-05-17 03:47:14 +02:00
Alug 361621a46a fix 3d models rollangle on gravflip
idk if this is correct, but it works lel
2025-05-17 03:47:01 +02:00
Alug d8f75f5cf4 make ogl screenflip stuff directly assignable
those dont need to be seperate bools lel
also simplify the assignment aswell
2025-05-17 03:46:41 +02:00
Alug 36349c2770 ok even more cleanup for animvote check 2025-05-16 14:22:03 +02:00
Alug 2c0d131cab even more tiny cleanup votebg stuff 2025-05-16 14:15:19 +02:00
Alug 9feda4d22d Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2025-05-16 13:42:46 +02:00
Alug fa20199ead Revert "those appear to do nothing"
This reverts commit 5f40ff5a03.
2025-05-16 01:30:19 +02:00
Alug 36566091aa make addon warning not print "(null)" if there is no refreshdirname
kinda lazy way but shrug
2025-05-15 21:40:48 +02:00
Alug 1a1466ec67 macrofy redundant splitscreen menus
joystick and camera menus to be specific
2025-05-15 04:12:40 +02:00
Alug 268bce79bd move paletterender walllight stuff into HWR_CalcWallLight
just slightly cleaner
2025-05-15 01:26:04 +02:00
Alug 19c1d2438e HWR_UsePortals 2025-05-15 01:24:36 +02:00
Alug 2dcb35da21 those appear to do nothing
free performance ig?
2025-05-15 01:23:44 +02:00
Alug 7747af9e9f change gamepad powerup led behavior
it will instead always take the players mobj color, this makes it indirectly support things like acrobatics and the colourized banana snipe
also just makes it a value for cv_gamepadled instead of its own cvar
2025-05-14 19:28:06 +02:00
Alug 6bdd2b2397 delet some clutter in screen.c 2025-05-14 16:35:36 +02:00
Alug e95db0c7e8 fix copy paste error oops 2025-05-14 16:09:59 +02:00
Alug efcd8dacfe make votebg scaling behaviour changable 2025-05-14 16:06:15 +02:00
Alug 06124deab9 make an adaptive votescreen patch scaler
attempts to first fill the screen horizontally, if the screen is not filled vertically like that, it will then change the scaling to fill the screen vertically
like this effectively every votebg fills up the screen and accomidates most bgs that added padding for the weird vanilla behaviour
TODO: make the behaviour switchable
2025-05-14 15:51:41 +02:00
Alug 0f0195d35b Make votescreen backgrounds resolution and dup independant
also some slight cleanup
currently this scales vertically to fill out the screen vertically
not sure if horizontally would be preferred, but thatd most likely cut off alot of parts from some votebgs
2025-05-14 02:09:32 +02:00
Alug 0695806ee9 dont allow changing grid sorting with item if item button is also enter 2025-05-13 22:38:03 +02:00
Alug a1c34cab1a Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2025-05-13 05:33:19 +02:00
Alug 0fa702c471 disable this 2025-05-13 04:56:15 +02:00
Alug 70f41cf221 clamp screentexture size to maximum supported texture resolution
also moves everything into GL_SetModelView again
also means screen texture sizes wont be recalculated every frame anymore
2025-05-13 04:07:48 +02:00
Alug 78547ba931 fix replay saving during intermission with manual save 2025-05-12 06:12:11 +02:00
Alug 49de45d736 fix minimap angle display in encoremode 2025-05-11 18:47:19 +02:00
Alug 7085ac3392 fix smol oopsie for colourized speedlines 2025-05-11 17:40:17 +02:00
Alug fce86135c0 fix oob write when map has playerstarts for 32 players
playerstarts is MAXPLAYERS big, which is 16 for us
2025-05-11 17:12:00 +02:00
Alug d9052fff97 add "nofork" parameter
to disable process forking
might be useful for gdb and perf
2025-05-11 17:11:51 +02:00
Alug 03fff05f6c change colourized speeline behaviour slightly
"driftonly" will tone the lines completely instead of alternating between blue and driftcharge
"normal" will completely colourize speedlines in the player colour
2025-05-11 17:11:47 +02:00
Gustaf Alhäll 1a91adc5c1 Fix off-by-one buffer overflow when getting LUT 255 2025-05-11 17:11:21 +02:00
Alug f626e9e06b fix 3d models tanking performance to hell 2025-05-11 01:22:44 +02:00
Alug 983974821c make this check like vanilla did 2025-05-11 00:33:39 +02:00
Alug f4af9fd394 unlock everything when using modkartdata save
doesent make too much sense having to unlock everything again when playing mods
2025-05-10 23:42:53 +02:00
Alug b34dd7745b delet the discord stuff
was abandoned anyways
2025-05-10 22:04:42 +02:00
Alug 2728fbdd46 delet this 2025-05-10 21:59:05 +02:00
Alug 6bfb448de1 dont check for how many controllers just attempt to reset "all"
JoyInfo->dev will be null
The crash before was most likely due to an oob read
2025-05-10 21:37:16 +02:00
Alug b8839896c6 fix saturn menu 2025-05-10 19:17:39 +02:00
Alug df66651356 fix typo in rumble reset 2025-05-10 18:59:27 +02:00
Alug 6653b5ab6c Revert "skinlocal deez nuts"
This reverts commit 12ec3d11a2.
2025-05-10 18:56:24 +02:00
Alug 7373ebe0b2 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2025-05-10 16:39:14 +02:00
Alug 5ac2dc29b1 delet netticbuffer hax 2025-05-09 16:46:58 +02:00
Alug 8bed3915e4 kill this kill this with fire 2025-05-09 16:27:38 +02:00
Alug 296cec0b0c Fix controls getting stuck when opening the pause menu
https://git.srb2.org/Hanicef/SRB2Classic/-/commit/ed53d96430dedac42b288bd6a5ca8152e6e6acc4
2025-05-09 15:07:49 +02:00
Alug 8a93a79fc7 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2025-05-09 01:50:06 +02:00
Alug 0df7c2a1e2 cleanup dpad scroll stuff even more
mostly just to make this more readable
2025-05-08 10:24:03 +02:00
Alug 5d2ea9d7a3 tiny cleanup p_enemy 2025-05-07 20:51:40 +02:00
Alug bd653785c2 dont keepmusic music that is not flagged as keep on death
uuuuuggggghhhhhhhhhhhh
2025-05-06 22:06:33 +02:00
Alug e7b9a28d70 fix music fade crash fix breaking music fades on very new sdl2 versions
man
2025-05-06 21:50:34 +02:00
Alug e4aab9128e dont have acp1 anymore 2025-05-06 19:40:22 +02:00
Alug a69e03310e Revert "optimize MT_TUBEWAYPOINT"
This reverts commit 3d0ac03f06.
2025-05-06 19:35:10 +02:00
Alug eb9fdf1fdc dont free item patches at levelload lol 2025-05-06 17:37:48 +02:00
Alug 63ca42d12c Merge remote-tracking branch 'origin/lugstuff' into lugstuff 2025-05-06 17:08:41 +02:00
Alug a502633f76 call M_ClearMenus in D_StartTitle 2025-05-06 17:08:24 +02:00
Alug 23b194eaa8 why is this still here?? 2025-05-06 12:26:46 +01:00
Alug ce92b30119 fix 32bit windoze compile
everything needs time.h idk why it never errored out before lol
2025-05-06 12:24:13 +01:00
Alug 2adffd32ea test: try prevent synch issues when p_setscale gets called on mobj spawn 2025-05-05 20:30:34 +02:00
Alug 94a5c1fe31 fix the fast pointonsides 2025-05-05 12:50:14 +02:00
Alug 33c9184fed Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2025-05-05 12:49:30 +02:00
Alug 7d12ceae74 attempt to cleanup p_mobj a little 2025-05-04 02:49:57 +02:00
Alug 12ec3d11a2 skinlocal deez nuts 2025-05-04 01:35:35 +02:00
Alug b1c94a0885 remove redundant mobj null checks
P_MobjWasRemoved already checks this anyways
2025-05-04 00:52:25 +02:00
Alug 3614867f30 compeltely forgor about this one lel
was here before we had blendmodes
2025-05-04 00:51:10 +02:00
Alug ae19383ee0 simplify this slightly 2025-05-04 00:47:11 +02:00
Alug 75e367372c print previously supressed warnings into log instead of console 2025-05-03 23:16:16 +02:00
Alug 620f5a40d4 dont mindelay when record attacking
theres a few places that do not "lag compensate" at all in RA so this would completely mess things up
2025-05-03 23:10:34 +02:00
Alug a834bc6c05 smol cleanup m_perfstats 2025-05-03 20:44:38 +02:00
Alug 80b35cdefb properly fix mobj action stuff for c23
thx hanicef!
hope i didnt screw anything up in info.c
2025-05-03 20:27:08 +02:00
Alug 196501ae66 fix windoze boolean 2025-05-03 18:56:35 +02:00
Alug 76503edfeb add USELTO and USEASAN make flags
to compile with LTO or Address sanitizer
2025-05-03 17:21:31 +02:00
Alug b1d8930b5a FIXUP make code c24 compliant
this needs to be tested on other platforms
2025-05-02 12:50:41 +02:00
Alug 0ae6f8fa16 forgor casting this 2025-05-02 11:12:04 +02:00
Alug 9ce917feee let squishy speed be player choosable
idk why i just didnt do that lel
also adds stuff to the menus
2025-05-02 10:53:36 +02:00
Alug 7becd7a3d2 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2025-05-02 10:36:29 +02:00
Alug acbcdedfa0 fix conlict 2025-05-02 10:29:25 +02:00
Alug 0ab8fa25e2 that needs to come before old_ stuff gets reset 2025-05-02 10:22:58 +02:00
Alug f5b96eead2 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2025-05-02 10:21:19 +02:00
Alug fcdceb53d7 force c17 with gcc 15 for now
dont feel like porting stuff over to c24 or whatever for v8 so just force c17 so ppl can still compile
2025-05-01 00:33:05 +02:00
indev 2ddb1ab56c Attempt to fix game freezing on windows when moving game window 2025-05-01 00:33:02 +02:00
Alug 0ab0ced3d3 tiny more cleanup screencoord stuff 2025-04-30 14:55:53 +02:00
Alug 47dcf7d1a8 delet this 2025-04-29 22:18:09 +02:00
Alug 51f2dd6275 merge stuff from next 2025-04-29 21:54:38 +02:00
Alug 0b077a9a8d raise cmake minimum requiered to 3.5 2025-04-29 21:13:35 +02:00
Alug 5ab1a65bab delet old high color software stuff 2025-04-29 21:13:31 +02:00
Alug 1d7851d32f add ogl wireframe mode lul
might be useful for some stuff
can finally see the war crimes done by the renderer
2025-04-29 10:13:19 +02:00
Alug 489b4157d2 tiny more cleanup speedometer stuffs
put check for color speedo into a function
and precalc the xtra 3 scale
2025-04-28 17:47:22 +02:00
Alug 2d8d14dcc5 move doaddline block
slightly better branching since maps with portals are very uncommon in kart
2025-04-28 11:29:35 +02:00
Alug 1c8a0006f0 skip rechecking for horizonlines when reloading gamestate
map remains the same during desynch, so safe some time
2025-04-28 11:19:47 +02:00
Alug c722523d40 another tiny cleanup p_setup and p_saveg 2025-04-28 09:55:10 +02:00
Alug b8434e0d1e fix replay ghost double free
kinda rare, but may happen when you resynch on the exact same time you got hit by something
2025-04-27 13:14:52 +02:00
Alug 3ff9a75a8f delet tic resending stuff 2025-04-27 06:50:35 +02:00
Alug e2944412b4 change ticqueue system to be more like srb 2.2
mostly just renaming lel
2025-04-27 06:47:26 +02:00
Alug e7ff735e93 tiny optimization
we dont need to recalc the bpm stuff
we can also divide the bounce in half just once
2025-04-27 00:57:43 +02:00
Alug da0b714c92 make a struct for squishy
this is horrid but should fix this speeding up when multiple players squish
2025-04-27 00:24:52 +02:00
Alug 37146b4c3d no thx i will use memcpy
lel
2025-04-25 21:34:21 +02:00
Alug b56a7bd4ba add a few more branching hints
also fix some indentation
2025-04-25 21:34:02 +02:00
Alug 1c52de67d5 invert skywall offset
also fixes the issue, but doesent draw skywalls over actual walls in rare cases
lets hope this doesent draw walls over actual skywalls now (:
2025-04-25 21:33:08 +02:00
Alug e42e029d61 whitespace crap 2025-04-25 15:02:36 +02:00
indev 6db017ff1a Don't free PU_SPRITE memory, since it invalidates some lua patches if they are using sprite frames 2025-04-25 11:47:15 +02:00
Alug b5a5c7d4f2 take mobjscale into account when skipping small sectors for precip spawn 2025-04-24 13:11:09 +02:00
Alug d79c59f6f3 put precip purge into a function
to reduce code dupe and branching
2025-04-24 13:02:26 +02:00
Alug 40a7c08851 fix spectator key lel
oopsie
2025-04-24 09:42:01 +02:00
Alug 07c090d40d oops didnt think addskins would be used here lel 2025-04-24 09:21:11 +02:00
Alug 9bc010f670 attempt at cleaning up gamecontrol splitscreen shit 2025-04-24 09:13:14 +02:00
Alug 11f7ecba5f cleanup G_Responder
man
2025-04-24 08:58:05 +02:00
Alug 6d458f2960 memset those 2025-04-24 08:27:11 +02:00
Alug aad83a3a9b fix potential crash on startup
thx hanicef
2025-04-24 06:56:57 +02:00
Alug d1ba4c61d7 deprecate "addskins" command
"addskins" is an incredibly ambigous name since its main purpose was to add skins LOCALLY
just prints a notice for now since there may be ppl that still use it
2025-04-24 06:56:35 +02:00
Alug f255374a9d skip checking skin array if localskin was found in localskin array 2025-04-24 06:54:22 +02:00
Alug 635481ea90 just mark it like this 2025-04-24 06:46:41 +02:00
Alug 290deef444 missed removing this 2025-04-24 06:42:50 +02:00
indev baefb4d0b0 Remove I_Assert in GetItemId in lua_hudlib_drawlist.c
It is legal for lua_getpc to be null (thanks GenericHeroGuy for investigating!)
2025-04-23 19:54:22 +02:00
Alug 0ce8c55ab3 check ceiling first in encore flat precaching
no clue why but this fixes the sides of the road on ORR not being encore remapped
2025-04-23 19:54:17 +02:00
Alug e064e4d13d port RRs improved paranoia thinker/mobj prints
https://git.srb2.org/KartKrew/RingRacers/-/commit/509a023329ea1cd583c500a3287c488e5ee3e3a6
https://git.srb2.org/KartKrew/RingRacers/-/commit/17aaf178d587970a3a845aa6c2f3807077996a77
2025-04-23 16:01:27 +02:00
Alug bb26a33889 fix P_RemoveSavegameMobj triggering assert in P_UnlinkThinker 2025-04-23 13:45:47 +02:00
Alug 4c15826848 nooo PARANOIA dont set our thinker next pointer to NULL 2025-04-23 13:21:10 +02:00
Alug 91301ffdcb we have a global to check if config was loaded 2025-04-23 13:10:07 +02:00
Alug baed5fb5de fix cv_set being called for allowsaturnjoin before its registered 2025-04-23 13:09:03 +02:00
Alug 31122a6f34 add P_DivlineCrossedFast
to take more advantage of P_DivlineSideFast
2025-04-23 11:39:54 +02:00
Alug 95ac0796f8 lugstuff needs this 2025-04-23 11:39:27 +02:00
Alug df33fbcdd7 delet bunch of stuff 2025-04-23 11:30:21 +02:00
Alug ac7e298c42 try to fix skywalls zfighting
just apply a small polygonoffset to them
lets hope this is small enough so they dont end up rendering infront of actual textures and such
2025-04-23 00:17:31 +02:00
Alug 9fd20af939 reset palette cvars when toggling paletterendering
everything gets wiped anyways, so this would be just confusing
2025-04-22 22:10:49 +02:00
Alug 8960804f1c fix cloud tops palette not applying 2025-04-22 21:52:46 +02:00
Alug 6437c5a861 smol cleanup z_zone 2025-04-22 20:13:28 +02:00
indev 600e824c63 Don't resume music when game is paused (happens when you pause -> lose window focus -> regain window focus) 2025-04-22 19:26:30 +02:00
Alug 5977574270 simplify cmpack 2025-04-22 19:23:16 +02:00
Alug 1234511304 let saltyhop work without gravstretch 2025-04-22 09:27:40 +02:00
Alug 7784bc6d0d remove Z_ChangeTag hack
needs some testing
but patches have their own purgetag now
2025-04-22 09:27:07 +02:00
Alug 638b3757c8 move playeringame to player struct
credits hanicef for that idea
2025-04-22 09:26:27 +02:00
Alug 9474142aca store last ticcmd in a buffer
https://git.do.srb2.org/Hanicef/SRB2Classic/-/commit/fe663f799e733e9a59a95dfd561e506571838554
2025-04-22 09:21:33 +02:00
Alug cf391fb346 add cv_palette and cv_palettenum
so palettes can be changed midgame
note: subpalettes do not work properly in opengl with paletterendering disabled, so palettenum will NOT work there
2025-04-22 02:52:48 +02:00
Alug 9e684cded1 only check for votescreen replacements if we havent already replaced everything 2025-04-21 14:16:18 +02:00
Alug b642bfb984 add some savety to the hudlib
just error instead of crashing so we can track down any issues more easily
2025-04-21 14:15:35 +02:00
Alug 31e76f8b5f dont free our hud patches when loading an addon lel
appears to work fine in RR so we do it here
fixes some weird issues and crashes with certain hud elements
2025-04-21 14:12:42 +02:00
Alug 2e35a72dec cleanup colormap translation stuff
needs testing
2025-04-21 12:29:31 +02:00
Alug 0d4ad260f0 fix nohw compile lugstuff 2025-04-21 12:21:58 +02:00
Alug 1e66305ce8 add missing pglDisableClientState 2025-04-21 12:21:12 +02:00
Gustaf Alhäll b7a5d715c0 Fix use-after-free when loading addons after searching addons 2025-04-21 12:21:09 +02:00
Alug 20537807e1 Fix server listing refusing to list servers on resolution failure 2025-04-21 12:21:06 +02:00
Alug e63c6cfd1e replace instances of malloc + memset with calloc 2025-04-21 09:53:02 +02:00
Alug ed527a35e2 add mindelay and gentlemens stuff to menu 2025-04-20 23:34:59 +02:00
Alug 3a82442c86 remove lagless camera from the menu
and change cvar name to reset it for everyone
2025-04-20 23:19:15 +02:00
Alug 98dde2f077 Revert "remove erronous checks here"
This reverts commit c2c60f2c69.
2025-04-20 23:00:07 +02:00
Alug 9322a3b1d0 dont let postload make our waitingplayer spritepatches null 2025-04-20 22:59:55 +02:00
Alug 0f0bef2a04 big cleanup "GetZAt" stuff
GetZAt now takes 4 parameters (slope, x, y, normalheight)
and everything now uses their designated getzatfunction
2025-04-20 15:43:17 +02:00
Alug b13f104fde fix P_CameraLineOpening
lel this was always botched
2025-04-20 15:21:39 +02:00
Alug e9d91386d7 remove unecessary settransform call 2025-04-20 06:25:21 +02:00
Alug c2c60f2c69 remove erronous checks here 2025-04-20 06:25:06 +02:00
Alug 836395a6af check for sloperoll first 2025-04-20 06:23:36 +02:00
Alug a7094537cb dont need this anymore 2025-04-20 06:22:58 +02:00
Alug d02a097384 pass hardware patch to HWR_DrawSpriteShadow 2025-04-20 06:22:41 +02:00
Alug a34540f27f unnest timedemo stop stuff 2025-04-19 10:28:04 +02:00
Alug 454311fd28 fix titlescreen demos crashing, again 2025-04-19 10:27:51 +02:00
Alug a260c390ad whoop this is only used by curl 2025-04-19 08:13:07 +02:00
Alug 4de86a1bad cleanup http download stuff a little
unglobalise a bunch of stuffand put into a struct
also hopefully made the progressbar less funky
2025-04-19 08:10:09 +02:00
Alug 59b1d66c39 a 2025-04-19 01:25:37 +02:00
Alug b5521eb709 fix software sprite clipping 2025-04-19 01:19:23 +02:00
Alug 72f193f336 smol software stuffs 2025-04-19 01:06:39 +02:00
Alug 751c72f93c smol fix for R_AddSingleSpriteDef 2025-04-18 23:54:01 +02:00
Alug 5d77754695 fix hwrpatch grabbing the wrong patch
getmapped patch needs to be called before this is referenced to avoid potential issues
2025-04-18 22:03:55 +02:00
Alug e9b2e17b69 readd missing SHORT macro for patch_create 2025-04-18 21:59:24 +02:00
Alug c40d9f3ec4 make a backup of save data before writing to it 2025-04-18 12:52:24 +02:00
Alug 14d2a6f7b6 reword this lel 2025-04-18 12:35:09 +02:00
Alug 65c8bcf3bd reset record attack state in G_ResetDemoPlayback
should fix some wonky issues in a few cases
2025-04-18 11:29:42 +02:00
Alug d7fe799097 fix record attack condition in G_CheckDemoStatus 2025-04-18 11:20:58 +02:00
Alug 52a6812805 reset demo stuff for multiplayer demos when using connect command
so if smth happens and we cannot connect the game wont be stuck in some weird replay limbo state
2025-04-18 11:20:17 +02:00
Alug 96312999c0 fix crash when using connect command from within replays 2025-04-18 11:11:36 +02:00
Alug 3fe45c532d close menus when replay stops 2025-04-18 10:09:42 +02:00
Alug a7ff925038 add mobj null checks
well and remove one
2025-04-18 09:38:44 +02:00
Alug 1d4d1a1400 psure this never worked lel 2025-04-18 09:38:21 +02:00
Alug 4ec735afe1 more unnesting for mobj think stuff 2025-04-18 09:37:25 +02:00
Alug 05086d83f0 Revert "convert fixed to float with multiplication instead of division"
i did not intend to push this to testing lel
2025-04-17 21:49:45 +02:00
Alug 965411519c we dont use MT_WAYPOINT lel
just use starposts
also remove rings cause duh
2025-04-17 14:00:55 +02:00
Alug d328adea5d aaaa != 2025-04-17 13:50:26 +02:00
Alug fb804ea9dd those do not exist anymore lel 2025-04-17 13:48:38 +02:00
Alug 7df37d50f4 fix up the automap again
got the rest of stuff working in a horrible way
automap aswell as minigen stuff looks good now
2025-04-17 13:48:24 +02:00
Alug c36b076b01 fix oopsie in automap bounds calc 2025-04-17 13:32:37 +02:00
Alug ee3a26d8fb fix automap colours
forgor those revert those when i ported RR code over, now they should match up with what they say
2025-04-17 13:30:41 +02:00
Alug 6f86ef2896 why? 2025-04-16 23:21:33 +02:00
Alug ead9e96017 why are these even seperated like that lel 2025-04-16 22:37:22 +02:00
Alug 2b5b7c6292 fix camera vertical look tooltip for green res
Zzz...
2025-04-16 22:31:24 +02:00
Alug 1ee40b5579 add minimap icon dot to saturn hud menu 2025-04-16 22:31:08 +02:00
Alug cc6cb99ac5 add support for drawing a dot on the minimap showing player angle
mostly copy pasted from blankart so thx neppy c:
2025-04-16 22:02:44 +02:00
Alug d9babadd54 fix minimap disappearing when having minimap trans on 10 2025-04-16 21:28:44 +02:00
Alug 14f725a53f fix compile without ROTSPRITE 2025-04-16 20:27:53 +02:00
Alug dc465733c7 move patch rotation stuff into their own files 2025-04-16 20:25:33 +02:00
Alug 58e12d620f just use Z_SetUser
instead of duplicating what RotatedPatch_Create does lul
2025-04-16 19:19:38 +02:00
Alug 0ef5a80d84 turn rotcache into a lumpcache_t
gu hope this is correct lel
2025-04-16 19:06:46 +02:00
Alug 4587f6391a smol cleanup W_CachePatchNumPwad 2025-04-16 18:46:55 +02:00
Alug 280df5d3d6 fix the sprite shadows Zzz... 2025-04-16 16:38:35 +02:00
Alug 9cd8d2fb4e GL_ 2025-04-16 16:27:00 +02:00
Alug f384cf0b86 optimize this a little lel 2025-04-16 16:21:50 +02:00
Alug d1d61119ae smol opitmizations and cleanup 2025-04-16 02:46:40 +02:00
Alug 96eecfe5a0 fix model blendpatches
we already have a functional check in HWR_GetBlendedTexture anyways
2025-04-15 20:27:21 +02:00
Alug e0b58b4da0 add tags for model textures 2025-04-15 19:23:53 +02:00
Alug 021db03eb9 no asan ty 2025-04-15 19:16:42 +02:00
Alug 854ce92d83 Merge branch 'balls' into lugstuff 2025-04-15 19:14:37 +02:00
Alug 0bef27cdf9 fix models lel 2025-04-15 19:14:20 +02:00
Alug 2037420013 dont free our rotsprites aa 2025-04-15 18:37:33 +02:00
Alug 01c3205d5d readd freeing those
dont want kart to use like 4gbs of memory for no reason lel
2025-04-15 17:13:11 +02:00
Alug b9aee1d53e readd hud gfx flushing
now that stuff doesent completely die lmao
2025-04-15 16:55:04 +02:00
indev feb93360a4 If GLENCORE is enabled, free both encore and noencore textures 2025-04-15 17:50:05 +03:00
Alug afd0613199 simplify this 2025-04-15 16:27:03 +02:00
Alug 71e9e040ec cast Zzz... 2025-04-15 15:34:30 +02:00
Alug d54319cd55 revert this part 2025-04-15 15:33:20 +02:00
Alug 0ce790f1bc fix PARANOIA compile 2025-04-15 15:18:58 +02:00
Alug 4cb83de7b3 Merge branch 'lugstuff' into balls 2025-04-15 15:12:19 +02:00
Alug 6ebc6412e4 idk anymore lel 2025-04-15 15:11:52 +02:00
Alug d2f996ebaf change those tags
also add PU_PATCH_DATA
2025-04-15 14:32:42 +02:00
Alug 325eac5b6d add more purge tags refactor patch freeing and stuff
currently dies when adding a wad midgame and the loading into another map
2025-04-15 13:14:23 +02:00
Alug 888d840198 fix PARANOIA compile 2025-04-15 12:46:40 +02:00
Alug 72d5fbe641 fuckit *unshortens your patch dimensions* 2025-04-15 09:27:42 +02:00
Alug 9eb34006c2 port srb2s patch refactor
still needs all the new purge tags
then we should hopefully be free of use after frees and everything
2025-04-15 09:00:21 +02:00
Alug 1ccd50fffa fuck off goddamit 2025-04-15 05:08:19 +02:00
Alug 3a698aab1a noooo dont free out lumppat
for some reason this occasioncally causes an use after free??
our memory management honestly is a fucking mess ngl
2025-04-15 04:57:00 +02:00
Alug b257768f4c change this 2025-04-15 03:47:12 +02:00
Alug b81652bfdd cleanup rotsprite creation
was hoping to fix the rare software crash with this Zzz...
2025-04-15 02:58:43 +02:00
Alug 4f2ffcdea5 cleanup R_ProjectSprite 2025-04-15 01:53:27 +02:00
Alug 2c8c6028f8 revert using modulu for frac calcs for colum drawers
this is fucking slow for some reason
2025-04-14 22:50:39 +02:00
Alug 30d64ad538 Revert "Cache start and end locations for WAD folders"
This reverts commit ef7935e2af.
2025-04-14 12:10:51 +02:00
Alug df888048c4 minor branching stuff 2025-04-14 11:41:09 +02:00
Alug d3427a3074 quiet compiler! 2025-04-14 11:31:46 +02:00
Alug 6378980f0d disable holepunch
never worked for me, and somehow makes my perf slightly worse lel
2025-04-14 11:30:38 +02:00
Alug 31244a5ce1 only holepunch uses this 2025-04-14 11:30:16 +02:00
Alug 517de5d1fe uncomment the banana dust code
it doesent look that great, so i prefer the lua version anyways
2025-04-14 11:28:50 +02:00
Alug 4294536055 delet erronous null checks
idk where those even came from lel
2025-04-14 11:28:23 +02:00
Alug c7526928b7 few more things 2025-04-14 11:15:40 +02:00
Alug f967babe29 kill a bunch of wonky stuff
idk smth in here absolutely trashes my perf in some instances
2025-04-14 11:09:22 +02:00
Alug 41f42c0cb0 missed those 2025-04-14 10:30:26 +02:00
Alug 57388b78c5 disable titlescreen demos if any addon (but musicpacks) are loaded
read comment
not a fan of this, but better than ppl constantly crashing
2025-04-13 22:33:33 +02:00
Alug b589fba6b8 optimize colourcube conditional checks
screw u atoi
2025-04-13 21:46:05 +02:00
Alug f8e63c8a60 Merge pull request #162 from Chearii/dialspeedometer
Add a dial speedometer
2025-04-13 19:07:14 +02:00
Alug 9169c66d03 refactor K_StretchPlayerGravity
mostly just make it more readable lel
2025-04-13 10:38:19 +02:00
Alug 32310c7e39 calloc takes care of those 2025-04-13 09:56:05 +02:00
Alug f8b1d1838c we dont need all this stuff for precip 2025-04-13 09:08:40 +02:00
Alug 7877585135 move this to make it little more clear what this is for 2025-04-13 09:08:16 +02:00
Alug a9e80bf4c4 missed this with localskin stuff 2025-04-13 09:04:19 +02:00
Alug d932d29720 move drawnode stuff into a switch
i like switches uwu
2025-04-13 09:03:24 +02:00
Alug 0985f5f317 readd itembox fuse think that was lost somehow lmao 2025-04-13 09:02:58 +02:00
Alug dcdee7c7f2 move this since it does check for fuse 2025-04-12 18:10:07 +02:00
Alug e0215220b4 unnest and cleanup P_MobjThinker
everything was moved into seperate functions lel
2025-04-12 18:06:38 +02:00
Alug 5cbac8c415 Revert "temp revert nanosleep for nix"
This reverts commit 78cf0d8f9d.
2025-04-12 16:22:41 +02:00
Alug 9f781930ee move line polyseg check out of the lööp if theres no polyobjs on le map
seems to reduce a hotspot there significantly
2025-04-12 16:01:43 +02:00
Alug 43928bbbd2 spr->mobj not thing lel 2025-04-12 15:44:11 +02:00
Alug c7d304349d windoze stimky
well this atleast should work for everyone, but be noted that the normal "localtime" function is apparently not thread safe
2025-04-12 15:43:59 +02:00
Alug 50b3e1ed28 throw mobjcache allocation shit into a inline function 2025-04-12 15:43:43 +02:00
Alug 6ff76802eb convert fixed to float with multiplication instead of division 2025-04-12 15:43:17 +02:00
Alug 4be2c84df0 use mobjcache for savegame mobj load 2025-04-12 15:42:25 +02:00
Alug 2ff37018f9 make a macro for this 2025-04-12 15:41:58 +02:00
Alug 293f91988c attempt at unmangling localskin stuff again
moved almost all the weird ass ternaries into functions
and should also probably fix some remaining issues where stuff was wrong
2025-04-11 20:40:28 +02:00
Alug 32f6309163 dont need to do any of this lel
the calloc takes care of those already
2025-04-11 16:53:52 +02:00
Alug 57ef2acd9c just make the numlaps draw besides the date
idk theres no good place for this otherwise
2025-04-11 14:23:21 +02:00
Alug d0159f9b8d add cvar to change the demo date formatting
bruh
2025-04-11 14:18:10 +02:00
Alug 9178eb5686 bigger buffer for demo version thing 2025-04-11 13:53:19 +02:00
Alug fed354f24f print demo version on "outdated" demos
idk if this is fine lel
2025-04-11 13:47:05 +02:00
Alug 8d201d451b dont need le strncpy 2025-04-11 13:07:14 +02:00
Alug 1e4380f184 apparently we have "nameonly"
ty indev <3
2025-04-11 13:03:57 +02:00
Alug 09e97b07f4 try and get file creation time in some cases on windoze builds
untested as of right now
2025-04-11 12:35:14 +02:00
Alug bbc81e3cc8 try to catch more bad demo dates
i mean this game did not exist in 2010 lmao
but occasionally it actually returned dates other than 1970 depending on what was passed to it lmao
2025-04-11 11:51:58 +02:00
Alug e68d69a38c do pathseperator check like this 2025-04-11 05:07:18 +02:00
Alug d02555b80b extract the date out of replay + display em in replay hut
this is kinda horrid, but essentially, the number at the start of replay names is actually the time when the replay was recorded, so i can extract that and convert it to a readable format
this probably can be done alot cleaner lmao
2025-04-11 05:00:07 +02:00
Alug 2cb338d6f7 add setting for cecho toggle to print to console instead
idk i hate doing string stuff, hope this doesent explode lmao
also ensures even if disabled all cecho stuff is printed to log file again
2025-04-10 22:01:44 +02:00
Alug dadde36ff6 handle highres portraits and statdisplay text more gracefully on low resolutions
below 640x400 the highres portraits become an absolute mess so itll now fallback to the lowres portraits
the statdisplay name text also became completely unreadable so itll use V_DrawThinString instead on low resolutions
2025-04-10 21:16:15 +02:00
Alug 1a28886ce2 simplify those 2025-04-09 23:18:31 +02:00
Alug 0919cc458b remove unused variables from FTransform struct 2025-04-09 22:44:23 +02:00
Alug c3c200c295 this can just be a constant lel 2025-04-09 22:39:36 +02:00
Alug 2e0010ee4e delet this 2025-04-09 22:31:45 +02:00
Alug 653b9ffaa0 Revert "HACK: make translucent fofs not cut cyan pixels"
This reverts commit 0503841939.
2025-04-08 21:39:03 +02:00
Alug 84ddae95ba use precalced value
this never changes, psure impact is negligeble tho
2025-04-08 20:52:43 +02:00
Alug 0503841939 HACK: make translucent fofs not cut cyan pixels
testing this, similar behaviour to software, fixes a few visual inconsistencies, but needs some testing lmao
psure we be leakin memory lmao
2025-04-08 20:52:10 +02:00
Alug dd6dc4d982 let item button also change skin grid sorting type 2025-04-07 19:40:17 +02:00
Alug e8c1afc860 reuse pwidth 2025-04-07 17:54:09 +02:00
Alug aa08c1adef unglobalise holepunchpacket aswell 2025-04-07 17:25:57 +02:00
Alug 1bbfdf6a78 oops this needs be initialized 2025-04-07 17:11:53 +02:00
Alug c3fcece75a sat credits a 2025-04-07 16:20:45 +02:00
Alug f907577094 avoid branching inside the while lööp 2025-04-07 09:10:10 +02:00
Alug 980fbd9b10 use optimized P_DivlineSide instead of R_PointOnSideFast 2025-04-07 08:39:43 +02:00
Alug 9902cac3ee some software optimizations
from:
https://git.do.srb2.org/Hanicef/SRB2Classic/-/merge_requests/6#d4bba40be8388ccd557d03ef4e4a36d0728c7751_645_587

minus the buffer flipping change, karts resolution stuff is hell and even worse due to birdmod things
maybe will look into that sometime
2025-04-07 08:35:33 +02:00
Alug 7cf1e8f15f Refactor netbuffer out of global namespace
https://git.do.srb2.org/Hanicef/SRB2Classic/-/commit/079fd2cef97a9cf22fb5d2b66a9b500914efbc72

+ move some things into functions
2025-04-07 08:13:38 +02:00
Alug a107496f76 free ogl lighttables earlier
ogl lighttable data is owned by extracolormaps apparently, so it has to be freed ealier
2025-04-07 07:45:05 +02:00
Alug ef7935e2af Cache start and end locations for WAD folders
port from https://git.do.srb2.org/Hanicef/SRB2Classic/-/commit/1a9da9dca6168a1cd2f47e06931a99b821596be1

pls git let me apply the og author with patches
2025-04-07 07:37:30 +02:00
Alug 9bfabe3ffd this is unlikely 2025-04-07 06:46:26 +02:00
Alug 28703bc038 whoopy copy paste 2025-04-06 17:13:04 +02:00
Alug f48ce0d94a try to rectify some branch mispredictions
adds "LIKELY" and "UNLIKELY" macros
those can be used to tell the compiler which path is more likely to happen
2025-04-06 17:03:23 +02:00
Alug 418d265f51 dont need this 2025-04-06 16:25:01 +02:00
Alug 2c60a4c353 reorder those a little 2025-04-06 15:14:57 +02:00
Alug 099b1ab81e use the float vid dimensions
forgor here
2025-04-06 15:14:49 +02:00
Alug ae7553ba30 cache the fofflags too 2025-04-06 11:24:38 +02:00
Alug b14b01d5c9 somehow this is slightly faster 2025-04-06 10:59:59 +02:00
Alug 6ebf6a2797 cache this
somehow this was unusually expensive lol
2025-04-06 10:29:28 +02:00
Alug 7b813e142b delet this 2025-04-06 09:58:58 +02:00
Alug d7d610bb99 more smoller optimizations
save some unneeded floattofixed calls
and move the linedef check earlier
2025-04-06 09:36:48 +02:00
Alug 5b9ef80f61 check for horizonlines on mapload on opengl
this saves iterating through a crapton of lines every frame in ogl
2025-04-06 08:45:08 +02:00
Alug 0ec286b9f4 Optimze horizonline check
noticed during profiling due to how it was checked R_PointOnSegSide was called extremely often even if the less expensive check  returned false
2025-04-06 08:43:40 +02:00
Alug 0f3be26c42 Revert "revert "R_ResetViewInterpolation: wait an extra tic if R_UpdateViewInterpolation has not run yet, do not add extra time for subsequent calls""
This reverts commit a560c691ca.
2025-04-05 19:27:48 +02:00
Alug 163122afb1 use R_GetViewNumber here 2025-04-05 19:27:34 +02:00
indev 0b9d56912d Add 'inputdisplay' option for hud.enable, hud.enabled, hud.disable and hud.getOffsets 2025-04-05 17:41:50 +02:00
Alug 721401f85a delet that egg 2025-04-04 18:13:31 +02:00
Alug a4ac85be85 no need to scale the volume for splitscreen if we dont play a sound lol 2025-04-04 18:13:12 +02:00
Alug 8ca0e5f112 didnt mean to change that lel 2025-04-04 08:15:44 +02:00
Alug a99c3b7ae9 fix software crash on date (ceruleavaenaen riviera) 2025-04-04 01:56:46 +02:00
Alug 6406eb5ba6 bruh 2025-04-04 00:29:07 +02:00
Alug 5d2aebc269 fix oopsie in R_Render2sidedMultiPatchColumn 2025-04-04 00:28:16 +02:00
Alug c0fe43ff0c erronous endifma balls 2025-04-03 21:22:16 +02:00
Alug cbb590b4d7 kill SATURNSYNCH and can_receive_gamestate, change the detection of synch method
before we unconditionally sent PT_WILLRESENDGAMESTATE to every connected node that didnt desynch before, in a big lobby this could mean having to send out alot of reliable packets to potentially clients that couldnt use it anyways, like this we just check if a client is saturn, which gets set the moment a saturn client v7.1 and onwards joins (it sends a special packet to the server during connect)
this makes sure we only even attempt the new resynch system with clients WE KNOW can use it anyways
this is backwards compatible until v7.1, v7 when this was introduced did not send the special packet on join and relied on the willreceivegamestate packet, so they wont benefit from the better resynching anymore
2025-04-03 20:41:36 +02:00
Alug 7067d22da0 fix OOB read of "playeringame"
not too sure if this is completely save, but it should technically
2025-04-03 20:25:02 +02:00
Alug 683737a6c7 update saturn credtis
baaaaaaaaaaarely fits now on greenres
had to kill the tooltip too :/
we should prob think of smth else than abusing a menu for this
2025-04-03 00:13:45 +02:00
Alug ca302493f7 drift only option for coloured speelines
man
2025-04-02 19:48:43 +02:00
Alug 6cdce0c95d use max 2025-04-02 10:01:38 +02:00
Alug 9894198028 convert those to float once 2025-04-02 09:58:56 +02:00
Alug b221d22e38 check if texture exists first 2025-04-02 09:58:05 +02:00
Alug b56ce88c27 fix the wonky rendering issues on that one si-ht map
saturn regression introduced by the fof slope cutoff fix
hopefully this has no weiird side effects, but so far everything seemed fine
2025-04-02 09:57:17 +02:00
Alug a7f1ff24cd smol cleanup skyspecial handling for ogl 2025-04-02 09:56:07 +02:00
Alug 1c2e404853 slight cleanup drawOnMinimap 2025-04-02 09:55:35 +02:00
indev 33bb40765c Add pageup and pagedown support in replay hut 2025-04-01 00:23:06 +02:00
Alug 1987a18e68 change scr_depth to gr_texturedepth and allow it to change stuff midgame
its not used for software renderer anymore and before you had to restart the game to be able to see a change in gl
8bits and 24bits options have been removed since they had no effect
and it also allowed me to unglobal things
2025-03-31 22:55:54 +02:00
Alug 62e1109cd4 kill ogl_win
its unused apparently
2025-03-31 22:50:18 +02:00
Alug 3701f7cf9c texfomats without alpha should have maxlod of 5 2025-03-31 22:30:25 +02:00
Alug e14e4b51c7 HAVE_IPV6 2025-03-31 08:29:23 +02:00
Alug efd7cd155e disable compiling with ipv6 support
see commit before
2025-03-31 08:27:43 +02:00
Alug cef448ca23 bugfixes for sock stuff + kinda fix ipv6
thx srb2!
sadly we cannot really make use of ipv6 since vanilla clients cant really handle stuff well ontop of the server browser not supporting them anyways, sad!
its probably better to just disable ipv6 compile completely
however this also has minor cleanups and bugfixes for ipv4 too (server browser now should work proper if you rerfresh it often and then close and open it again etc)
2025-03-31 08:21:46 +02:00
Alug f51cd6977a better check for destinationnode 2025-03-31 08:13:46 +02:00
Alug 7b7d93a2d6 remove unused stuff d_net 2025-03-31 08:11:10 +02:00
Alug d37d97c5fa also dont do this without localdelay 2025-03-29 18:13:01 +01:00
Alug 53aeda3c6b oop still need to update this 2025-03-29 18:00:11 +01:00
Alug f793c4b57f update ping only once per second again
read the comment on why
2025-03-29 17:52:20 +01:00
Alug b72c997789 only do gentlemens anything if we intend to use it
shizo thing
2025-03-29 17:52:09 +01:00
Alug 636feddeb3 128k
well this didnt help but still think 64k might be a bit short
2025-03-29 03:10:25 +01:00
Alug a726646ff3 if 128k network buffer fails then try 64k as last resort 2025-03-29 02:34:36 +01:00
Alug e2e1839829 make the whole tcp stack return errno errors 2025-03-29 02:32:18 +01:00
Alug 2f22f28a4d try to set the socket buffer to 208k
this is what i get on nix, while windoze seems to be stuck on 64k, maybe fixed the occasional network buffer overrun that happens
2025-03-29 00:59:23 +01:00
Alug 541f532988 can just set it to null directly 2025-03-28 17:13:03 +01:00
Alug 2fb572ed4c dont run anything director in dedi
we dont need to even init its stuff
2025-03-28 17:01:43 +01:00
Alug f938d566f7 make a function that returns the newspeedometer style if its availible
makes stuff alot easier to read than constantly checking for if stuff exists everywhere
2025-03-28 07:12:37 +01:00
Alug d3df8708af tiny cleanup inputdisplay
just use V_DrawMappedPatch, it does the same but looks better in code lel
2025-03-28 07:10:26 +01:00
Alug 2b3fefc988 Revert "delet this"
This reverts commit 18352ff6d8.
2025-03-28 04:53:36 +01:00
Alug 568012589d :3 2025-03-28 04:52:50 +01:00
Alug c949589bea can just reset this here 2025-03-28 02:35:53 +01:00
Alug 893de2e047 force switch player after 15 seconds max
not sure if its too strict but it gets really boring just watching the same person for ages
2025-03-28 02:16:32 +01:00
Alug b4dcc7da7d forgor the header file 2025-03-28 02:14:44 +01:00
Alug 3c361654f7 instant switch if the player we watch is finishing
i dont need to watch the finishline for 5 seconds everytime lmao
2025-03-28 02:14:30 +01:00
Alug 29a8075d90 only count actually playing players for director
otherwise you could enable it if theres more than 1 person in the server but only 1 person is actually playing
2025-03-28 02:13:04 +01:00
Alug 4cfeef6300 you cant memset this to -1 lel
prob fixes the director never switching when only one player was left
2025-03-28 01:37:50 +01:00
Alug b2d4039a9f optimize director by checking for finishline waypoint on mapload
instead of every time this is called
2025-03-28 01:12:14 +01:00
Alug 8ede41fde8 simplify this lel 2025-03-28 00:45:17 +01:00
Alug c0a3c4d144 add R_QuickCamDistFixed which returns fixed point value 2025-03-28 00:36:59 +01:00
Alug 37b1ad80e3 nooo dont set srb2waddir to NULL 2025-03-27 23:50:46 +01:00
Alug 4a2f338c85 turn this into a switch for no reason 2025-03-27 23:37:50 +01:00
Alug 910f2d3b8c remove pointless function 2025-03-27 23:33:11 +01:00
Alug ce25dd54b5 add smol P-Meter patches
thx jin for those
2025-03-27 23:27:20 +01:00
Alug 56935ef0c2 seperate the colour hud patches out of here so they can be used without the vanilla colour hud 2025-03-27 22:48:29 +01:00
Alug 010cbd68fd seperate the driftgauge colour patches into extra2 + add some more comments
was an oversight, extra2 should be for all colour hud patches
2025-03-27 22:21:35 +01:00
Alug 2ec90922a2 fix driftgauge value "small" value being overwritten when having extra3 loaded 2025-03-27 22:12:22 +01:00
Alug 9dac5f6dab move saturn extra file checking into its own function
and also properly seperate all patch checks so they only get checked if you have the right file
may actually slightly speedup startup in some cases
2025-03-27 22:01:45 +01:00
Alug e5263121eb fix stick setting showing wheel 2025-03-27 21:36:44 +01:00
Alug b1270fd54d make beta interscreen cvar also affect tab rankings 2025-03-27 21:35:24 +01:00
Alug 648720c8ac just make the input display global toggle for it
mostly done so i can shorten the entry in the menu cause i cba to mangle stuff again
2025-03-27 21:29:50 +01:00
indev 526b254345 Add 'StickGFX' option for showinput cvar if graphics for it exist 2025-03-27 23:19:27 +03:00
Alug 806d8b5e42 actually initalise those lmao 2025-03-27 20:58:17 +01:00
Alug 62b24e9fd4 no need to check for this 2025-03-27 20:44:19 +01:00
Alug 4ca1d40bcc add support for sprite joystick knob
still needs proper toggle
2025-03-27 20:41:14 +01:00
Alug 939c92f1c1 that comment belongs to this lmao 2025-03-27 20:24:56 +01:00
Alug 0000db2f64 fix vertical patch scale not working when horizontal scale is also not changed in opengl patch drawer 2025-03-27 19:48:27 +01:00
Alug 18352ff6d8 delet this 2025-03-26 22:07:39 +01:00
indev 6661d98e5f Fix limit_dist overflowing for some mapobjectscale values 2025-03-26 20:22:16 +01:00
Alug 60ff34d7de fix spacing when compiled withou fbo support 2025-03-26 19:51:52 +01:00
Alug a5b317d552 better slope rotation for shadows
instead of copieng the target mobjs rotation we just use its standingslope instead, this means shadows properly rotate according to which slope theire on
should make them visually more cohesive if a player or other mobj is rotated midair
2025-03-26 19:51:31 +01:00
Alug 7b18694599 add dummy entries so the tooltips dont fucking cutoff stuff in green res
if i only knew of this dumb hack earlier
2025-03-26 19:32:35 +01:00
Alug e6b4f00cb2 muh huh durr hurr is above array bounds of deez nuts 2025-03-26 18:32:02 +01:00
Alug 0c87e207d5 fix advanced video options in green res
god bruh
also removes the directional light entry since its planned to be deprecated
2025-03-26 18:17:29 +01:00
Alug 1fc4437054 fix sprite distort tooltips
Zzzzzzzzzz......
2025-03-26 18:05:17 +01:00
Alug 5792331c10 turn advanced sound ioptions into scoll menu 2025-03-26 18:04:47 +01:00
Alug c06078e4cc turn sprite distortion menu into scoll menu due to green res 2025-03-26 18:00:00 +01:00
Alug d71d9becd8 rename "Custom Options" to "Custom Addon Options"
to make it clear wtf this is even for
2025-03-26 17:45:56 +01:00
Alug 01ea47f59e turn screenshot options into a scoll menu cause of green res 2025-03-26 17:45:31 +01:00
Alug a81cbb9813 fix focus options for green res 2025-03-26 17:31:48 +01:00
Alug 47d3f0e624 move everything around in main options menu to fit stuff for green res 2025-03-26 17:27:09 +01:00
Alug 43c718af37 fix bird menu from crashing (again) finally add an enum so this wont happen again 2025-03-26 17:13:54 +01:00
Alug 4e90b9260b lel 2025-03-26 15:54:18 +01:00
Alug d8282e7b7f add smol text indicating the autoload button 2025-03-26 15:35:13 +01:00
Alug a66b329255 change menu autoload button to "END" instead of right shift
too many ppl accidentally press right shift and end up putting things they didnt intend into their autoload file
which sometimes caused alot of issues in online play
2025-03-26 15:34:57 +01:00
Alug d138a593a6 brazil 2025-03-26 14:54:10 +01:00
Alug 19eda24e57 tab hell 2025-03-25 23:14:10 +01:00
Alug cbd54274f2 grey out mouse grab when use_mouse is enabled 2025-03-25 20:04:59 +01:00
Alug 4181b1dff6 add onchange for "alwaysgrabmouse" 2025-03-25 19:57:02 +01:00
Alug e5a088aee9 put all the "game focus" options into a seperate menu 2025-03-25 19:35:55 +01:00
Alug 6c6e44ec64 fix server lan discovery
which just returned EINVAL and triggered the I_Error in SOCK_Send
more information at: https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2219
2025-03-24 22:42:30 +01:00
Alug 5e1d1f5205 make this not I_Error
no fucking clue what happens with it
2025-03-24 21:10:52 +01:00
Alug db5298a2fc bleh 2025-03-24 20:35:27 +01:00
Alug 7c13b74636 Revert "remove the early returns in SOCK_Send"
This reverts commit dcc3b1294c.
2025-03-24 20:35:10 +01:00
Alug fc2bd63d91 delet this 2025-03-24 19:21:26 +01:00
Alug b9bdfbf790 Revert "clean up some net stuff"
This reverts commit f8903e7ce7.
2025-03-24 19:18:34 +01:00
Alug f54055e69b potentially fix "Received a file not requested" error in poor net conditions
needs a bit of testing
2025-03-24 19:01:02 +01:00
Alug d8e7ed1f1f grey saltroll out in menu if sloperoll disabled 2025-03-24 18:22:07 +01:00
Alug 702e800d3f toggle for saltyhop sloperoll behaviour 2025-03-24 18:20:16 +01:00
indev 4168dbddbb No need to FLOAT_TO_FIXED here :з 2025-03-24 17:19:35 +01:00
Alug 77ba719284 Reset seenplayer on netgame exit 2025-03-24 16:52:47 +01:00
Alug acd23c1002 remove the early returns in SOCK_Send
othewise it may never error out when it should
2025-03-24 16:30:05 +01:00
Alug 4729ca1c40 we dont need sweep and test 2025-03-24 16:25:17 +01:00
Anonimus f2691b4673 Add C++ support to the makefile
Also add new required DLLs for Windows users
2025-03-24 16:24:06 +01:00
Alug db8bc50c17 Do not error out if we don't have a socket for an address family we have disabled
from srb2
2025-03-24 16:23:16 +01:00
Alug 9f1a1cb661 Replace all instances of XD_KICK with a SendKick function 2025-03-24 15:35:26 +01:00
Alug c04fd47637 i hate menus 2025-03-23 18:31:38 +01:00
Alug 4bdcd5b9d5 this does not need be checked here 2025-03-23 18:24:46 +01:00
Alug b08bacede5 lugstuff momento 2025-03-23 18:20:04 +01:00
Alug d89ffbcc0f k_throwdir already returns just -1, 0 and 1 2025-03-23 18:17:59 +01:00
Alug 5ff3973ebb add player blendeffects to menu + change when they apply
most of them now apply during sneakerboost
sparkles may also get add blendmode when you go really fast with them (like the speedlines)
2025-03-23 18:15:35 +01:00
Alug 7331e43207 change "verticallook" and "cameralookbackmom" to be per splitscreen player 2025-03-23 18:15:32 +01:00
Alug 0d7473d104 15 step increment Zzz... 2025-03-23 16:58:53 +01:00
Alug 9c46306b07 simplify the slider stuff slightly 2025-03-23 16:56:56 +01:00
Alug 63517e3de3 make stretchfactor a cv_float again
for easier handling
now that we can use sliders this should hopefully work without issues
2025-03-23 16:54:51 +01:00
Alug 78566f067d make saltyhop height use slider 2025-03-23 16:43:53 +01:00
Alug c48ab0f163 make menu sliders work on CV_FLOAT 2025-03-23 16:38:34 +01:00
Alug 19a6da0ae3 changable saltyhop height
dunno, it looks a bit off on higher values since the animation duration is always the same
also cv_float is weird
2025-03-23 16:18:18 +01:00
Alug a560c691ca revert "R_ResetViewInterpolation: wait an extra tic if R_UpdateViewInterpolation has not run yet, do not add extra time for subsequent calls" 2025-03-23 15:30:45 +01:00
Alug 2306d4b59b Revert "test: revert all the view interp stuff"
This reverts commit 1a836031a7.
2025-03-23 15:28:59 +01:00
Alug 1a836031a7 test: revert all the view interp stuff 2025-03-23 15:07:18 +01:00
Alug 26a741e3fe cap Local_Maketic 2025-03-22 13:06:48 +01:00
Alug 0511c22e6f let this run during "singletics"
renderisnewtic was not really correct
2025-03-22 13:06:31 +01:00
Alug 81120cddce move the early return here 2025-03-21 16:44:14 +01:00
Alug bbe28d6d8f forger P_IsLocalPlayer exists 2025-03-21 15:56:10 +01:00
Alug caaf218dd4 hack for stick input display if you watch some other player Zzz.... 2025-03-21 15:53:10 +01:00
Alug ded46e6197 dont run discord rpc callbacks every frame
ditto
2025-03-20 23:51:59 +01:00
Alug 198cd1a68a dont update sounds every frame
if this would break ppl on 35fps cap wouldve been always screwed lel
2025-03-20 23:47:42 +01:00
Alug d19a455e65 dont call this every frame aswell 2025-03-20 23:44:48 +01:00
Alug 3f51b4389b cap a few things that break otherwise 2025-03-20 23:42:24 +01:00
Alug 55af517a57 uncap netupdate
:chonkbuncle:
2025-03-20 20:24:39 +01:00
Alug 0c209f2439 kill this, i want vanilla behaviour 2025-03-20 18:44:06 +01:00
Alug 27699e91ea delet player_joining 2025-03-20 18:44:03 +01:00
indev eadf16dd14 Only reset replay query in M_ReplayHut if replay hut wasn't open previously 2025-03-19 23:47:48 +01:00
Alug 10ea091471 handle pause better ig?
its still not really what i want lmao
2025-03-19 14:47:27 +01:00
Alug ff32db6e12 readd ACK 2025-03-19 14:31:50 +01:00
Alug ee908baa7a delet the uncap crap from funneh dance
we dont need this to be uncapped, mobj interpolation will take care of anything and this means i can put it into mobj thinker or whatever
2025-03-18 13:16:04 +01:00
Alug 694e7490a6 comments
this is horrible and i made this crap in 5 minutes
2025-03-17 20:14:06 +01:00
Alug 9d4cdbcc32 add horrible squishdance code
lmaao
this is so bad its unreal
2025-03-17 20:09:27 +01:00
Alug eefa41a58e Revert "Use PU_LEVEL for texture caching"
This reverts commit 5ecfc5e09d.
2025-03-17 18:43:55 +01:00
Alug 3b76c4b620 remove this again 2025-03-17 18:41:12 +01:00
Alug cedcccb18e move patch null checks into the patch drawers instead 2025-03-17 18:39:49 +01:00
Alug 0076d1e87a revert this too just in case 2025-03-17 18:26:32 +01:00
GenericHeroGuy b428a5fd1b Fix tonumber leaking doubles when JITted 2025-03-17 16:03:59 +01:00
Alug 20f8e910de make the banana throw speen be seperate from sloperoll toggle
were technically not rolling by slopes here
2025-03-17 15:55:10 +01:00
Alug ae2eb13623 forgor about saltyhop condition 2025-03-17 15:24:49 +01:00
Alug 2aca4dc0c7 add function to check if mobj should sloperoll
makes things slightly cleaner and we can apply sloperoll dist to everything
should probably save some time esp with the trailing item z calc
+ P_MobjPitchAndRoll should be able to be called always since it also does stuff seperate from sloperoll
2025-03-17 15:20:49 +01:00
Alug de2a73149b use quickcamdist for K_RollMobjBySlopes
we dont need this to be accurate at all
and its slightly faster so
2025-03-17 14:21:08 +01:00
Alug 981885dafb fix midair driftsparks
somehow accidentally ended up doing what RR does lmao
hope this doesent do anything funky synchwise
2025-03-17 13:42:31 +01:00
Alug b11348d3e3 kill bunch of redundant calcs for some kart visual effects 2025-03-17 13:06:06 +01:00
Alug f8b3e9cfcb safe some time by returning early in K_RollMobjBySlopes
in case those mobjs are out of our set distance
2025-03-17 12:40:08 +01:00
Alug d9c2add062 dont let saltyhop stop our drift sounds for 1 tic
if you disable its sound effects
2025-03-17 11:15:12 +01:00
Alug 7777946979 noo dont free our realpatch randomly
this used to be Z_Unlock which did nothing
checked against srb2 and rr and this should not be freed normally
2025-03-16 21:05:52 +01:00
indev 3b929b3687 Fix gl_extensions being truncated when there are too many extensions 2025-03-16 15:31:09 +01:00
Alug e1f3447a8b lmao 2025-03-16 13:28:33 +01:00
indev ac1bb9efbf Generalize K_SpawnOrMoveMob, and make adding new vfx that use it slightly easier 2025-03-16 15:01:44 +03:00
Alug cbf02a7741 goddamit 2025-03-16 12:24:38 +01:00
Alug 802514db04 oops 2025-03-16 12:23:51 +01:00
Alug 84ac034fa9 cache player 2025-03-16 12:23:16 +01:00
Alug 6c837f6fb6 bruh 2025-03-16 12:22:45 +01:00
Alug f7f0e02688 Merge remote-tracking branch 'origin/Saturn-Testing' into lugstuff 2025-03-16 12:19:57 +01:00
Alug be3b8cd23e dumb hack for input display in replays
since we cant get playerinput, just use throwdir to get some appoximation
maybe todo: idk maybe squeeze smth into replays?
2025-03-16 00:22:31 +01:00
Alug 868f0acb18 this needs be multiplied by 8 lel oops 2025-03-15 18:41:33 +01:00
Alug 579e7261a3 cache player 2025-03-15 16:47:11 +01:00
Alug 9dc14bda3a add extra check to save a little bit of time 2025-03-15 16:46:37 +01:00
indev 080ae52bce aatree is used both with HWRENDER and ROTSPRITE, so just don't guard its include 2025-03-15 14:50:13 +01:00
Alug 170d4bd57b port of "minimap icon spinouts" by Anonimus
https://codeberg.org/NepDisk/srb2k-neptune/pulls/7

+ some refactoring
2025-03-15 14:40:15 +01:00
Alug a541144d4a safe 2x "va" lel
V_GetSkincolorChar is unused now lel
2025-03-15 14:39:04 +01:00
Alug bcd5d9aa8b just use splitflags 2025-03-14 21:00:00 +01:00
Alug 66c9b05d3d doesent need be an array 2025-03-14 20:56:46 +01:00
Alug 8a410913f3 New input display option for stick display
thy neppy! https://codeberg.org/NepDisk/blankart/commit/52601bdfc2a6dd8916c3c401d70128d2ca11a1ff#diff-baf740b84aa99188fc2e5c1cb93e59fa2e319ff3

+ hellish abomination code cause kart
2025-03-14 20:46:25 +01:00
Alug 474ed722f6 make freecam speed per splitscreenplayer + add to menu 2025-03-12 07:00:50 +01:00
Alug bbd03114ee delet cam rotspeed cvar
lmao forgor this did nothing
2025-03-12 06:52:46 +01:00
Alug b04335f16e fix compile without ROTSPRITE 2025-03-10 17:52:08 +01:00
Alug 353337be24 consolidate those 2025-03-10 17:28:27 +01:00
Alug ed87d759e0 a 2025-03-10 17:28:09 +01:00
Alug c6824a6748 make this slightly less ugly 2025-03-10 14:59:35 +01:00
Alug 3615dd43d6 add cvar to force mouse grab and hide 2025-03-10 14:55:52 +01:00
Alug 865c3cfaec kill bunch of crap 2025-03-10 14:04:16 +01:00
Alug db3435356c Revert "apparently those temp variable are not needed"
This reverts commit 36508c24e3.
2025-03-10 12:31:53 +01:00
Alug 5c2adca262 Revert "use vectors P_ClosestPointOnLine3D and kill vertex z"
This reverts commit e0ae6aa85c.
2025-03-10 12:31:44 +01:00
Alug 801d1a3056 Revert "try simplify blockthings iterator"
This reverts commit 3bae721fa8.
2025-03-10 12:31:40 +01:00
indev 1eea46654b Add SHORT here for consistency with other code 2025-03-08 16:17:24 +01:00
indev c44f78d303 Check for missing patch earlier in W_CachePatchNameRotated 2025-03-08 16:17:20 +01:00
Alug d5587d51c1 p_sight stuff idk 2025-03-08 16:16:39 +01:00
Alug bccad86f50 try shizo thing to reduce netlag 2025-03-07 14:47:18 +01:00
Alug 4d6b5437c8 show smol notice in stat and ra menu when game is modded 2025-03-07 14:45:28 +01:00
Alug ab9aba1de6 remove erronous cv_sloperoll checks
this cvar is meant to be only the toggle for the player slope rotation, however, spriterotation should still be usable in any case with this disabled. the global toggle "cv_spriteroll" has been removed
2025-03-07 09:52:43 +01:00
indev 2a8b54c91b spriteroll doesn't exist now :p 2025-03-07 00:44:58 +01:00
Anonimus 2dedbc25f6 HUD patch rotation 2025-03-07 00:44:23 +01:00
Alug 7401ddca43 explicitly check for x11 sdl videodriver 2025-03-06 11:21:50 +01:00
Alug af470dc7b2 idk why this breaks shit 2025-03-05 00:07:24 +01:00
Alug 7e2469b1f7 fix some blendmode oopsies 2025-03-04 22:56:54 +01:00
Alug ddf21ea753 use memcmp for R_IsEmptyLine
:chonkbuncle:
this actually is quite a little faster too
2025-03-04 20:35:39 +01:00
Alug 8c451f6fee try make this slightly more readable 2025-03-04 19:27:26 +01:00
Alug dbb58f44e5 quick check if sectors are same
so can save on bunch of stuff, also move midtex check earlier
2025-03-04 19:18:27 +01:00
Alug d1981fd566 change syntax
will stay uppercase to not conflict with some crap Zzz...
2025-03-04 19:11:38 +01:00
Alug 73eafbe57c smth smth magic number 2025-03-03 13:12:00 +01:00
Alug 99087629f2 pointless inline 2025-03-03 11:20:03 +01:00
Alug f217914a47 empty function lel 2025-03-03 11:16:06 +01:00
Alug 8034e55050 this returns -1 on fail 2025-03-03 11:15:44 +01:00
Alug db0ffa3ed5 delet memcpy doing nothing 2025-03-03 11:14:09 +01:00
Alug 4318923ad5 tiny cleanup keyboard stuff 2025-03-03 09:56:13 +01:00
Alug 78cf0d8f9d temp revert nanosleep for nix 2025-03-03 00:13:59 +01:00
GenericHeroGuy 8524f3367c Figured out why that doesn't work 2025-03-02 23:30:02 +01:00
GenericHeroGuy 5b18c9837a Properly constant-fold (0 or 123)
But not (0 and 123). Yay bug compatibility!
2025-03-02 23:29:59 +01:00
Alug fa07c4d659 guh 2025-03-02 23:27:19 +01:00
indev ebcb3df9b4 Revert "Convert parsed numbers to doubles first in lj_strscan_scan"
This reverts commit 3f8fb365a0.
2025-03-02 23:13:18 +01:00
indev 9f76ede41e Revert "Restore setnumV for fmt == STRSCAN_NUM in lj_strscan_scan"
This reverts commit 644cd36286.
2025-03-02 23:13:15 +01:00
Alug 69d62b7b12 muh huh truncuate my butt mingw32 2025-03-02 23:13:08 +01:00
Alug 7ea55e2d29 bugger off UPX
dont want compressed executables, they BREAK backtraces
2025-03-02 23:02:43 +01:00
Alug febbc4f2cd inlining failed in call to my butt 2025-03-02 22:11:35 +01:00
indev 7480105a06 Restore setnumV for fmt == STRSCAN_NUM in lj_strscan_scan 2025-03-02 22:06:55 +01:00
Alug 6d604aed28 forgor 2025-03-02 21:44:31 +01:00
Alug 73d57220f0 screw you music system
no fucking clue but this fixes stuff showing the musiccredit too early on reload
2025-03-02 21:41:42 +01:00
Alug de4ee28ccf bleh 2025-03-02 21:29:21 +01:00
Alug 3bbe4842b7 Reapply "better M_Random implementation"
This reverts commit a406b21401.
2025-03-02 19:48:22 +01:00
indev 66198e0159 Convert parsed numbers to doubles first in lj_strscan_scan
Regular blua does something similar to that, and it changes how large
numeric literals are parsed. It's very rare for those to be used but can
still in theory cause synch issues between blua and bluajit clients
2025-03-02 19:10:51 +01:00
Alug 70a479836d lul 2025-03-02 19:10:48 +01:00
indev de4c90b790 Delet goto from bluajit, since regular blua doesn't support that 2025-03-01 13:05:03 +01:00
indev c8cc80a253 Fix water and fog shader missing #version 2025-02-28 20:39:39 +01:00
Alug cd991ca5bb more kart hud cleanup
also removes erronous nametag toggles
2025-02-28 18:54:38 +01:00
indev 8b6ce4e113 Don't reset demo recording if player is still entering replay name in intermission 2025-02-28 17:21:13 +01:00
Alug b356b72781 slight cleanup kart hud 2025-02-28 09:51:36 +01:00
Alug 58d3d66515 add airsparks to saturn options 2025-02-27 19:45:56 +01:00
Alug 94855fbaae color ping numbers for color hud 2025-02-27 19:38:11 +01:00
Alug a406b21401 Revert "better M_Random implementation"
This reverts commit a353dceaa3.
2025-02-27 19:37:41 +01:00
Alug 60018b5561 do this in a less horrifieng manner 2025-02-27 19:11:59 +01:00
Alug 25a5c39252 use floor shader for everything when paletterender disabled
just like vanilla!
not the way to do this properly, but whatever
2025-02-27 18:50:50 +01:00
Alug 8939e2601d actually can just use this directly 2025-02-26 13:04:10 +01:00
Alug fec04089c0 Merge remote-tracking branch 'origin/Saturn-Testing' into lugstuff 2025-02-26 11:11:19 +01:00
Alug 8dea244d1b turn this into a switch
else if stinky
2025-02-26 11:08:53 +01:00
Alug b96dc05a45 use lj_char_isspace 2025-02-21 20:05:35 +01:00
Alug 1ed3cf28b0 use strlen 2025-02-21 20:05:26 +01:00
indev 661d4ee8e1 Allow trailing spaces in lj_strscan_scan 2025-02-20 21:44:14 +01:00
Alug c711bf42c9 readd missing cast 2025-02-20 21:19:51 +01:00
Alug 1afb5e5219 toggle for keeping driftsparks while in air 2025-02-19 12:05:29 +01:00
Alug 98eaaae30e reuse var 2025-02-19 11:10:51 +01:00
Alug 10e303b0a8 few instances of int float conversions i forgor 2025-02-19 11:10:27 +01:00
indev 63391d3763 Fix compilation with old sdl 2025-02-18 23:50:04 +01:00
Alug 8a3d767c08 Reapply "delete acktosend"
This reverts commit 95f797fcda.
2025-02-18 23:49:55 +01:00
Alug d3b786d725 init joyid here
i hate the controller code
2025-02-17 21:58:27 +01:00
Alug ceff2e9be6 properly init numcontrollers 2025-02-17 21:30:36 +01:00
Alug 31dabda1db initialize this 2025-02-17 21:23:55 +01:00
Alug 72322e5f42 dont check number of controllers every frame 2025-02-17 21:16:12 +01:00
Alug 15f97ab8a4 skip a bunch of stuff in dedi/render_none 2025-02-17 20:54:37 +01:00
Alug 95f797fcda Revert "delete acktosend"
This reverts commit a150512122.
2025-02-17 19:45:34 +01:00
Alug a150512122 delete acktosend
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2591
2025-02-17 16:30:57 +01:00
Alug 1b58bdc903 update software precache
spit stuff into functions
handle animated textures and flats too
2025-02-16 16:47:06 +01:00
Alug 095fd0b015 better handling of sprite angles in precache
only cache stuff that we need
2025-02-16 16:38:42 +01:00
Alug 1abf62e929 skip checking sectors and lines multiple times 2025-02-16 15:37:43 +01:00
Alug 00f9eaf67f slightly optimize ogl precaching
cleanup too
2025-02-16 15:37:18 +01:00
Alug 3193081d0e make texture precache toggable 2025-02-16 15:34:54 +01:00
Alug ae7296c586 guard this in sprite precache 2025-02-16 15:33:58 +01:00
Alug 51efdb32e5 precache animated textures too 2025-02-15 16:22:16 +01:00
Alug 50e9721a0d also precache animated flats
i have no clue how tf animated textures work
2025-02-15 14:27:52 +01:00
Alug 2305a3210e dedicated server does not need to call texture precaching
prob leftover from back in the day, it doesent do anything at all anyways
also gives it a less ambigous name
2025-02-15 02:15:04 +01:00
Alug d947f5b4c1 precache (most) sprites on ogl leveload 2025-02-15 02:07:50 +01:00
Alug 18163ec6d7 mhhm ternaries 2025-02-15 02:06:51 +01:00
Alug efaf1eb2a1 move texture precache into own function
unnesting stuff
2025-02-15 01:05:44 +01:00
Alug d6476fde67 oops should be i 2025-02-15 00:35:34 +01:00
Alug c99f2c20b1 load both encore and non encore tex 2025-02-14 23:24:58 +01:00
Alug 989e1a3f56 move precache into hw_cache.c 2025-02-14 23:02:13 +01:00
Alug e2f311f9e0 handle encore in ogl precaching
thx indev for help <3
2025-02-14 22:57:25 +01:00
Alug 45b59fc81e this is incorrect, dont need it anyways 2025-02-14 21:57:57 +01:00
Alug 02fb70e2ae disable ogl precaching on encore mode
noencore things need to be handled
for now just disable it until i figure out how to check for lineflags here
2025-02-14 21:31:22 +01:00
Alug 53dfa07237 precache level flats and textures on mapload in opengl
not entirely sure if this works correctly with encore, have to test a little
TODO: move this into hwr file or smth
2025-02-14 21:22:42 +01:00
Alug bc2b85df0f Revert "do some lööp unrolling for software span drawers"
This reverts commit 782e3172ad.
2025-02-14 19:49:17 +01:00
Alug b21586a698 add toggle for blendmode player effects
otherwise people will yell
enabled by default for now for demonstration purposes
2025-02-13 18:41:26 +01:00
Alug 3797b02143 make P_InitCamera slightly prettier 2025-02-12 17:55:23 +01:00
Alug 796be8d0ff cleanup P_SetupLevel
removed bunch of pointless vars, moved some things into functions
changed some stuff to be boolean
2025-02-12 17:32:07 +01:00
Alug e394056c36 use correct type in P_InitMinimapInfo 2025-02-12 11:56:41 +01:00
Alug 8863b39aa9 split screentexture width and height
most displays are widescreen, so their width and height differ quite significantly, this may make the overall screentexture alot smaller
2025-02-11 19:21:38 +01:00
Alug 9c61691632 revert adding netbuffer to local ping
dont wanna revert the commit, since i keep the new way of determining the ping display, since its less awful than before
2025-02-11 15:01:48 +01:00
Alug 1e71c73a61 fix online player localping display 2025-02-10 21:00:00 +01:00
Alug 4349b6b9cb fix some level userdata not being invalidated
maybe fixed the random issues we had with the server?
2025-02-10 20:47:33 +01:00
Alug 793f3c23a6 dont add buffer delay when local delay is disabled 2025-02-10 19:05:44 +01:00
Alug 5987fd8fda account for netticbuffer in offline ping
this makes it more accurately reflect how it would behave in an online game
2025-02-10 17:43:33 +01:00
Alug c55fb60cc8 add some comments + smol cleanup again for keepmusic 2025-02-10 16:51:17 +01:00
Alug 9fcf4548df extend mapmusic_t struct and rename to music_t
didnt see that all the music stuff was more or less using the same things
2025-02-10 06:35:03 +01:00
Alug 11ea49fd15 clean this up a bit 2025-02-10 06:19:58 +01:00
Alug d09ae5ef5b init JoyInfo stuff on startup
just in case
2025-02-09 17:47:50 +01:00
Alug 78b1476c87 use joystick id here 2025-02-09 17:05:00 +01:00
Alug a2e12767ce reset joystick id when closing 2025-02-09 17:04:49 +01:00
Alug e2ec2ff4de optimize ogl drawer functions
by avoiding excessive interger to float conversions
2025-02-08 23:17:43 +01:00
Alug a5dcea17b6 fix clang uninitialised warning 2025-02-08 23:07:39 +01:00
Alug f803128b16 fix oopsie with mapmusic in glib 2025-02-08 18:09:52 +01:00
Alug 777629d8c3 this should be static 2025-02-08 17:48:00 +01:00
Alug 3de5a2d1d1 throw music vars into a struct "mapmusic_t"
simplifies everything, keepmusic vars use it too
2025-02-08 17:46:58 +01:00
Alug 48c3081fdc handle music reloadreset stuff in seperate function
just tryin make it less ugly
2025-02-08 17:31:01 +01:00
Alug 00e3f48329 rename this 2025-02-08 17:25:01 +01:00
Alug 39744885f2 always save keepmusic stuff
but set keepmusresume in stopmusic Zzz...
2025-02-08 16:47:12 +01:00
Alug c6451208ad attemp to fix playerreborn resetting keepmusic 2025-02-08 16:28:23 +01:00
Alug 0774274e9c change speelines blending condition
uuuhh, so, if you have sneakerboost they always will apply additive blending
otherwise if you go really fast (faster than sneakerboost)
2025-02-08 15:36:33 +01:00
Alug 2dc3ca5f01 did not mean to push this 2025-02-07 18:19:53 +01:00
indev 174a7b5d84 Don't force specific characters in M_HandleConnectIP 2025-02-07 18:18:20 +01:00
Alug cd57ebd763 keep track of joystick index in struct 2025-02-07 15:57:13 +01:00
Alug b14d1f1e0b just pass the controller directly
simplifies this alot
2025-02-07 04:05:10 +01:00
Alug 3f3df9346f Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2025-02-07 01:00:32 +01:00
Alug b0535da97b smol cleanup 2025-02-06 17:29:35 +01:00
Alug cdc25fddc8 only apply additive blend to speedlines when any kind of boost is happening
to emphasize that ure boosting or smth
2025-02-06 17:25:17 +01:00
Alug 351f043131 update controller led when connecting a controller 2025-02-06 14:43:18 +01:00
Alug 5f7632decf dont pass bogus values to I_GamepadRumble and I_SetGamepadIndicatorColor
- fixes rumble and led stuff not working after hotplugging
- also fixes sdl2-compat breaking
- i hate karts controller code
2025-02-06 02:12:05 +01:00
Alug 235f830621 remove this from action list 2025-02-05 17:08:16 +01:00
indev d49b5af91a Don't start invinc/grow alarm sound when player uses power item
It will still be started in K_UpdateInvincibilitySounds, but now if
player already had invincibility, they won't get 2 overlapping sounds
2025-02-05 16:56:42 +01:00
Alug d245c6eca7 Revert "kill a bunch of uneeded null checks"
This reverts commit 7bc804bccb.
2025-02-05 16:52:45 +01:00
Alug f02bd5513e random shit i had stashed and too lazy since its for testing only anyways 2025-02-05 15:45:06 +01:00
Alug 88dc60648e screw you seenames 2025-02-05 15:33:10 +01:00
Alug 63d6987b93 also add additive to boostflame 2025-02-05 00:35:33 +01:00
Alug 2386877394 test fix software white pixels (thx indev <3) 2025-02-04 19:09:38 +01:00
Alug 65188a6652 add blendmodes to a bunch of effects
lul
2025-02-04 19:08:54 +01:00
Alug 35e1c3370d crappy deb prints for mus stuff 2025-02-04 12:56:18 +01:00
Alug 7904740024 show musiccredit when using tunes 2025-02-04 12:56:05 +01:00
Alug 8af0d2c14c keep track of map music
this is kinda horrible, but allows musicchanges which replace map music/tunes to also work with this system
2025-02-04 12:55:50 +01:00
Alug bfd19512b1 reset keepmusposition in tunes command
mapmusic will be reset the moment the gamestate changes, so whatever was changed with tunes will not be kept sadly
2025-02-04 02:41:31 +01:00
Alug b777e82890 save music position and try to fade back into mapmusic when the music changed from mapmusic when keepmusic is enabled
uhh idk how to explain lel
hope this doesent explode
2025-02-04 02:24:08 +01:00
Alug 8cc09712bc skip intro sounds also with keepmusic lel 2025-02-04 02:12:51 +01:00
Alug 21a1158798 add additive blending to fast speedlines 2025-02-03 20:43:30 +01:00
Alug 207741651a handle ogl sprite lightlevels like rr now that we have all the stuff for it 2025-02-03 20:43:03 +01:00
Alug 098f5c9086 oops didnt mean to move this 2025-02-03 19:54:51 +01:00
Alug 919623157b flag clash moment 2025-02-03 18:39:17 +01:00
Alug 2d1f3b90e4 forgor 2025-02-03 18:39:03 +01:00
Alug 67fb508e8d Update position nums to use additive
https://git.srb2.org/KartKrew/RingRacers/-/commit/4d108930a94f44dbc916d1116eab8421e669e4b6
2025-02-03 18:10:36 +01:00
Alug ec121f5ac7 fix merge conflicts 2025-02-03 18:07:29 +01:00
Alug 73dc9a794f Add line and FOF blending, fix model and shadow blending
also a bit of cleanup in r_things but it's too minor to headline
2025-02-03 18:00:04 +01:00
Alug 3e563df999 Prelim: Linedef alpha variable
realistically this was just because I'm Lazy
this makes figuring out linedef blending less of a brain twister
2025-02-03 17:59:39 +01:00
Alug 7ad25c5f19 Add blending modes 2025-02-03 17:59:18 +01:00
Alug 3bae721fa8 try simplify blockthings iterator 2025-02-03 14:42:44 +01:00
Alug e0ae6aa85c use vectors P_ClosestPointOnLine3D and kill vertex z 2025-02-03 14:42:23 +01:00
Alug 36508c24e3 apparently those temp variable are not needed 2025-02-03 14:41:51 +01:00
Alug 201ead11ea check for realpatch here too 2025-02-03 14:41:10 +01:00
Alug 05354a3352 no need pass this stuff 2025-02-02 15:18:05 +01:00
Alug ed6b6404a3 should revert this completely 2025-02-02 00:19:46 +01:00
Alug e7c68fbeea partly revert this
some of those "mightve" been changed at the point of the check
2025-01-30 13:25:46 +01:00
Alug 9c00b4c32d inline G_CopyTiccmd 2025-01-30 13:11:49 +01:00
Alug bab0f05c3e dont register a crapton of pointless stuff for dedi
should cleanup dedi config significantly lmao
2025-01-30 13:11:30 +01:00
Alug bc62f0632a tiny cleanup i_video 2025-01-30 11:45:35 +01:00
Alug f5c5978f9d dont need to do all this crap if disabled 2025-01-30 00:14:57 +01:00
Alug 8eaa1f6130 "kill" seenames
idk if anyone wants it, its still there, needed to move the netvar out of it tho lol
2025-01-30 00:07:32 +01:00
Alug 9a84d9f1f8 move this after the early returns
save some time when drifting
2025-01-30 00:04:21 +01:00
Alug 4b44af7cf1 lmao 2025-01-29 23:57:42 +01:00
Alug b16472a379 turn driftsparkGrowTimer into a player field
less hacky and avoids 3 loops lol
2025-01-29 23:57:25 +01:00
Alug 8f7d51e57c kill redundant laptime code
just use the newer one
2025-01-29 23:23:54 +01:00
Alug 3cc8f8650d In rehashtab, do counthash before adding asize
Thanks alug!
2025-01-29 22:28:44 +01:00
GenericHeroGuy 744dc87c16 In rehashtab, do counthash before adding asize
Thanks alug!
2025-01-29 22:25:24 +01:00
Alug 3162930634 cause undefined behavior in table resizing calculation. :chonkbuncle:
reverting https://github.com/LuaJIT/LuaJIT/commit/c56811bb7acf40174ac9b63e69f58b42adf85bd7

seems to fix the issue with mismatching tables between jit and kart blua
2025-01-29 21:44:22 +01:00
Alug 45a8f61266 refactor M_DrawSlider
apparently fixes weird framerate issues with gamma slider
also shows the values on sliders
2025-01-29 19:33:57 +01:00
Alug 2f66ba0126 inline V_LocalTransFlag
its very smol
2025-01-29 19:05:42 +01:00
Alug 90bdd24de2 even more replay deb prints lel 2025-01-29 12:16:38 +01:00
Alug 8527d71fa8 also print player name for item desynch 2025-01-29 00:46:16 +01:00
Alug aba60ffd74 smol replay fixes from rr 2025-01-29 00:32:20 +01:00
Alug 3e455ee8ee better replay resynch prints 2025-01-29 00:32:04 +01:00
Alug 5f297136b8 Have replay recording of "hits" use the reference count system
https://git.srb2.org/KartKrew/RingRacers/-/commit/fa8bffabfc51ea1d7be86d833190bb7dcf494fca
2025-01-29 00:08:50 +01:00
Alug 2b6c05839e try and just compare music with mapmusname first 2025-01-28 18:32:19 +01:00
Alug aa5b480a44 inline a bunch of super smol lua things 2025-01-28 18:31:54 +01:00
Alug ba38b69782 inline a few hooklib functions 2025-01-28 18:10:10 +01:00
Alug 8cf889c390 super smol optimization 2025-01-28 17:37:52 +01:00
Alug 398d62e2a6 pass slope to K_RollMobjBySlopes
removing some code dupe in the process and allows some more flexability
2025-01-28 17:33:44 +01:00
Alug c923c6c96a forgor to set those oop 2025-01-28 16:09:56 +01:00
Alug 983410c953 fix issues with models
- Sloperotation was weird, it now uses what we calculate in K_RollMobjsBySlopes
- in general uses srb2s newer system
- alot of cleanup of pointless variables
- sprinfo pivots should now work
- removed roillmodel since it was smth weird and broke rollangle
2025-01-28 16:05:20 +01:00
Alug 4260527170 dont rain on stuff without planes lel 2025-01-27 23:41:54 +01:00
Alug 34603b9128 dont recalc if precip sector didnt move
forgor i can just check this
2025-01-27 23:24:01 +01:00
Alug a4213d0316 only need to recalc this once a tic
precip thinker thinks slightly more often, but we really dont need that tbh
2025-01-27 23:13:34 +01:00
Alug 3f63d89099 only recalc floorz for visible precip mobjs
before it apparently recalced it a crapton for the crapton not visible precipmobjs, which even on vanilla maps led to noticable jitter
2025-01-27 22:25:34 +01:00
Alug 83b6b841c6 just keep a copy of musicchange before the lua hook
keep music can check for what was it stuff changed last to
2025-01-27 16:43:48 +01:00
Alug f84ac6febe grow an invinc music also broke stuff
cant put it into the music exception list, otherwise it will always disable keepmusic when either one was used even once
2025-01-27 16:13:00 +01:00
Alug 89443dfe30 the music system is truly amazing 2025-01-27 15:32:47 +01:00
Alug df33acdd01 i hate conditions 2025-01-27 14:54:49 +01:00
Alug e0579225f3 smol optimization comparePolygon
return slightly earlier for skywalls and horizonlines
2025-01-27 11:21:23 +01:00
Alug 4f64ba6e79 make old ping bar be blue on d1 aswell as purple with mindelay 2025-01-27 09:19:25 +01:00
Alug fd3efc5469 potential fix for clients locking up due to never receiving acks back
apparently, if the client doesent receive an ack back which may happen due to duplicate packets/bad net conditions, it may spam resend the packet until its netxcmd buffer is full and locks up
2025-01-27 08:58:21 +01:00
Alug 64afc7a737 set this to 1 2025-01-27 08:57:55 +01:00
Alug e5de2a0165 disable landing dust for now
idk how to not make it spawn when item was placed instead of thrown Zzz...
2025-01-26 21:15:12 +01:00
Alug 09a2deb6de also rotate eggboxes in air 2025-01-26 21:14:24 +01:00
Alug ef1917dc6b reduce dust momz a little 2025-01-26 21:14:08 +01:00
Alug 94fbd49f40 spawn dust when throwable item lands
also when you drive into a banan
2025-01-26 20:26:29 +01:00
Alug 9c00eedfaf fall through deez 2025-01-26 18:31:17 +01:00
Alug 444e42517f delet if else hell 2025-01-26 18:18:23 +01:00
Alug 33921e79f4 handle vote bg fallbacks more gracefully
if someone doesent provide a widescreen patch it now falls back to the replaced non widescreen one and vice versa instead of just falling back to what vanilla provides
2025-01-26 17:57:27 +01:00
Alug bdafaa014c forgor about the banan spin 2025-01-26 16:17:58 +01:00
Alug dfe9815837 reduce scope of those
makes it look slightly neater
2025-01-25 22:44:22 +01:00
Alug db5b728a97 draw non widescreen anim vote bg before falling back to vanilla bg
how it was before, the game just fallback to the vanila widescreen patch if there was no animated widescreen bg provided, just fall back to the non widescreen anim patch instead if it exists
2025-01-25 22:13:39 +01:00
Alug 10c0c8afab move this
no need to have two conditions for same thing
2025-01-25 21:50:40 +01:00
Alug f14591033d kart is special and changed ping colours
so change this to reflect it
2025-01-25 21:40:28 +01:00
Alug 4e76751372 make ping flash somewhat like vanilla again 2025-01-25 21:36:06 +01:00
Alug 7e8cda4a96 "makes integer from pointer without a cast" deez nuts 2025-01-25 16:59:31 +01:00
Alug cebbcbaf7c remove noshowhelp from bunch of debug cvars
doesent make too much sense those are hidden tbh
2025-01-25 15:39:40 +01:00
Alug 55e90733ec dont banan drag rumble when not driving lel 2025-01-25 09:32:49 +01:00
Alug fd95e6a075 setup maplight stuff earlier
otherwise it doesent init early enough
2025-01-25 08:05:51 +01:00
indev fb9212a8c6 Fix 'total podium' stat display using totalwins 2025-01-25 06:30:52 +01:00
Alug a19260080d inline one line gametype checks 2025-01-24 21:55:47 +01:00
Alug fe8b8d798c inline bunch of one line HWR things 2025-01-24 21:54:36 +01:00
Alug 2b988d404f inline G_TicsTo stuff
theyre smol and get called often
2025-01-24 21:19:50 +01:00
Alug 439a2811b1 j moment 2025-01-24 21:18:17 +01:00
Alug 097b70f069 add funny banan throw rotate thing
like rr
2025-01-24 19:24:56 +01:00
Alug f557ae8bd6 think we should copy this 2025-01-24 18:04:38 +01:00
Alug 4dd80ff328 make trailing items also be able to rotate on slopes
mostly stuff from RR thx!
2025-01-24 17:56:50 +01:00
Alug a011b4e3ee spawn speedlines with non synched rng if ur in eggbox status
and well only if you have colourisation enabled
2025-01-24 17:14:30 +01:00
Alug 69d8dafc8f oop 2025-01-24 06:43:46 +01:00
Alug 10028a4769 proper add server gentlemans
this should be a netvar, but we cant really do that, thought not a huge deal
however id wish to send some kinda message to all players but idk
2025-01-24 06:39:57 +01:00
Alug 86712703d7 dont mess up realpingtable
when serverplayer has mindelay active
this was supposed to show mindelay for serverplayers but that doesent work :chaosleep: so just do not mess with it
2025-01-23 21:55:37 +01:00
Alug 230962c8c2 slight cleanup HU_drawPlayerPing 2025-01-23 21:25:26 +01:00
Alug a3dfa2a930 assign player later 2025-01-23 20:40:05 +01:00
Alug 4ce0a6c63e try speedup P_LoadRawSubsectors 2025-01-23 20:33:11 +01:00
Alug 25b13a89d4 try speedup P_LoadRawSectors 2025-01-23 20:27:56 +01:00
Alug c2611a465a simplify camtoggledelay and spectatedelay
just make em an array and use lööp
2025-01-23 19:45:23 +01:00
Alug bb6e58b5ce kill P_TeleportMove
P_MoveOrigin literally just calls that so replace it with that
2025-01-23 19:33:35 +01:00
Alug 7aa641bbfd colourise ping colour 2025-01-23 18:06:41 +01:00
Alug 3d3ebdefd6 a 2025-01-23 18:06:19 +01:00
Alug ad4be98c8a colourise pingnumber when gentlemens is active 2025-01-23 18:06:06 +01:00
Alug 86a172800d division by zero moment 2025-01-23 17:38:20 +01:00
Alug e1cfbd25fa add gentlemens delay to ping display
+ display ping even offline if you have mindelay active
2025-01-23 16:48:38 +01:00
Alug 0a40a28c3d smol cleanup 2025-01-23 16:16:46 +01:00
Alug ff90a678f1 port clientsided gentlemens delay
cant do the serverside stuff due to netvars
2025-01-23 16:03:12 +01:00
Alug edb7678675 just use D_NumPlayers 2025-01-23 15:50:45 +01:00
Alug d19e3b69fc Prevent dropped ticcmds due to interp timing jutter
kinda figured out what this does, and makes clients on uncapped listen servers alot less prone to drop gametics
2025-01-23 15:05:11 +01:00
Alug 70428d2309 fix freecam not resetting online
idk local player handling is fucking awful in kart
2025-01-22 19:42:01 +01:00
Alug b14b913d0a try just passing the sector + add 50 trillion extra checks
idk anymore but this is literally now how vanilla kart behaved
2025-01-22 19:08:03 +01:00
Alug f0df97589f skip some stuffs when theres no portals
skip some portal checking incases wheres no portals
2025-01-22 18:04:50 +01:00
Alug 58d0b5ffc6 remove redundand FTransform field 2025-01-22 16:46:58 +01:00
Alug fd1ea7ab0a more smol ogl sprite drawer optimizations 2025-01-22 15:45:08 +01:00
Alug 2036dfd83b also fix potential use-after-free in HWR_AddPrecipitationSprites
no clue why ogl didnt do it since its effectivle the same code as software
2025-01-22 15:44:25 +01:00
Alug fa9582cc72 no need to check for invisible precip here
the early returns indirectly handles things since we dont have custom weather support in kart
2025-01-22 15:43:24 +01:00
Alug 4b7a2848e5 split HWR_DrawSprites
saves on ALOT of conditional branching in a lööp when models are disabled
2025-01-22 15:23:30 +01:00
indev 9c16798fdb Check for spectator in K_StatRound 2025-01-21 16:54:53 +01:00
Alug 0d3d958b46 fix level statistics page controls 2025-01-21 16:54:28 +01:00
Alug a899923067 use SRB2.2s general folder structure
- seperate addons folder (download folder remains in home directory unlike RR)
- seperate gif and screenshot folders
2025-01-21 01:35:10 +01:00
Alug 6e0519bbbc use SRB2.2´s logging system
- creates a new logfile each start instead of overwriting it everytime
2025-01-21 00:50:21 +01:00
Alug 26ef5b0dad e better play it safe 2025-01-20 22:26:07 +01:00
Alug 127a7e5ae7 delete nonfunctional second mouse stuff 2025-01-20 22:02:08 +01:00
Alug 7320fdc340 kill even more unused patches
+ nonexistand crosshair stuff
2025-01-20 21:30:37 +01:00
Alug 867bc8197b dont cache all those unused hud graphics 2025-01-20 21:12:06 +01:00
Alug db7ab2d33f Hold up/down for 2 seconds while not moving to pan the camera vertically
from RR
2025-01-20 19:33:47 +01:00
Alug f56de827b5 a 2025-01-20 19:21:33 +01:00
Alug a9cb23be79 oops didnt init this 2025-01-20 19:17:41 +01:00
Alug 07287d056c dont turn 90 degrees when switching to freecam 2025-01-20 19:00:10 +01:00
Alug f3c44b48b9 kill aiming stuff in BuildTiccmd 2025-01-20 18:53:26 +01:00
Alug 5ab348bf30 fix freecam vertical look for the 500th thousand time
truly amazing code
2025-01-20 18:04:05 +01:00
Alug 2715699648 put this thing onto its original place 2025-01-20 15:22:00 +01:00
Alug 355dc07401 code dupe P_CyclePlayerMobjState 2025-01-20 15:19:43 +01:00
Alug 7c7e820a94 put this into switch
looks better
2025-01-20 15:09:19 +01:00
indev 2fd8532be0 Put playtime statistics at first page instead of RA medals 2025-01-19 01:10:55 +01:00
indev 83091413e7 New statistics menu (WIP) 2025-01-19 00:59:19 +01:00
indev 14fff2e3a3 Wipe kart stats on game data reload 2025-01-19 00:45:32 +01:00
indev ba26fc8226 That was from testing a 2025-01-19 00:31:32 +01:00
indev 85d68a7b7b Make custom stats fully compatible between different versions, so new fields can be added in future without save corruptions 2025-01-19 00:30:55 +01:00
Alug 2885dbfb12 remove some code dupe in R_AddLine 2025-01-19 00:03:46 +01:00
Alug 9e5341537a ; moment 2025-01-18 21:35:22 +01:00
Alug cedf7beaa1 more sane thing 2025-01-18 21:22:20 +01:00
Alug dd84250c8a actually should always use mobjscale 2025-01-18 21:06:30 +01:00
Alug fe3a7525b3 mobjscale precip sectorheight stuff 2025-01-18 21:04:20 +01:00
Alug 5380ce85d9 fix lessprecip toggle doing nothing
logic error on my part
2025-01-18 21:03:06 +01:00
Alug cc043cb4c8 use MT_NULL instead of number 2025-01-18 14:36:35 +01:00
Alug db6cd6b510 refactor weather switching
from srb2
makes this more sane and makes PRECIP_STORM_NORAIN not spawn a crapton of invisible mobjs
2025-01-18 14:29:44 +01:00
Alug 6670b6f611 idk why we check this 2025-01-18 11:45:20 +01:00
Alug 2d5cf03ceb attempt optimizing P_PointOn stuff again
this time non inversed and wrong lel
2025-01-18 11:44:34 +01:00
Alug 51631dcb40 forgor to check for that flag 2025-01-18 11:44:09 +01:00
Alug ff620c0218 change tooltips slightly 2025-01-17 23:44:17 +01:00
Alug 7cc3f6af7f add stuff to menu 2025-01-17 23:42:50 +01:00
Alug 56007eda9c ok clang 2025-01-17 23:35:33 +01:00
Alug 9b4d275d51 replace byte2float table with direct calc
actually speeds up things for me by around 5-10fps
2025-01-17 23:07:50 +01:00
Alug 405693e1ed shut up clang 2025-01-17 23:07:03 +01:00
Alug 269dbc6fef set sdl audio resampling mode to highest quality 2025-01-17 21:45:07 +01:00
Alug 8346d59a42 try to use double buffer vsync 2025-01-17 21:44:54 +01:00
Alug 4e34b549b5 disable this 2025-01-17 21:44:32 +01:00
Alug fe598266e3 fix nofbocompile 2025-01-17 21:42:19 +01:00
Alug d6579a9e6d :chaosleep: 2025-01-17 19:53:30 +01:00
Alug c057803a17 add toggle for item amount number display 2025-01-17 17:15:00 +01:00
Alug 0bcd840f60 Revert "turn on multiitemicons by default"
This reverts commit 9217cd3832.
2025-01-17 16:48:06 +01:00
Alug c7425a02ac "Fix console text bleeding "
read https://git.do.srb2.org/STJr/SRB2/-/merge_requests/1434
2025-01-17 14:22:56 +01:00
Alug 0f7c91e894 cap console animation if uncappedhud is disabled
since thats "how vanilla done it" before
2025-01-17 14:17:44 +01:00
Alug e9f7f50088 use R_GetHudUncap 2025-01-17 14:12:19 +01:00
Alug b8540f9e21 add fancyroulette toggle 2025-01-17 14:12:07 +01:00
Alug 2196905023 add the fancy hudtrans flags 2025-01-17 13:58:29 +01:00
Alug bc874e5605 dont fancy during respawn 2025-01-17 13:58:14 +01:00
indev f84a78c4e6 Fancy :D 2025-01-17 13:50:11 +01:00
Alug db836ae315 turn on multiitemicons by default 2025-01-17 12:58:26 +01:00
Alug b328b98a2d add banan jitter toggle to menu 2025-01-17 12:37:23 +01:00
Alug 66bfff4f84 change how spritescales and offsets work
- now theres realoffsets aswell
- allows better control of changing things per lua and still do funky stuff in hardcode without conflicts
- spritescales and offsets now get reset centralised before any thinkers run
2025-01-17 00:54:40 +01:00
Alug 32bc9979a0 add toggle for bananjitter 2025-01-16 23:42:21 +01:00
Alug 55f2841c33 only rumble banan when on ground 2025-01-16 23:32:59 +01:00
Alug 127e2bcf27 fix typo lel 2025-01-16 22:33:17 +01:00
Alug e84e186df0 don use multiicon patches in 3/4p splitscreen
since it uses the smoler patches
also removes redundant assignments
2025-01-16 21:58:37 +01:00
Alug d6ad6f85ea simplify keepmusic
honestly no clue why i made stuff check on every music change
2025-01-16 21:00:47 +01:00
Alug f8515f697e clean up d_net 2025-01-16 00:59:38 +01:00
Alug 89856bf5b2 Clear acktosend when initializing node
since it was never reset, values might been taken over from former node
2025-01-16 00:58:52 +01:00
indev 3743303748 Add spb music to list of exceptions for keepmusic 2025-01-16 00:57:45 +01:00
Alug 6b5517ee2c dont keep music if there is no music 2025-01-16 00:57:39 +01:00
indev de8ffbfd60 Fix spectator control text overlapping when showdirectorhud is off 2025-01-15 21:39:02 +01:00
Alug ade0526311 oops 2025-01-15 12:59:00 +01:00
Alug 713fe463b0 ignore invisible fofs again 2025-01-15 12:57:53 +01:00
Alug c18695d194 make freecam strafe be affected by freecamspeed cvar 2025-01-15 12:57:35 +01:00
Alug 4cacac86cd also skip invisible fofs 2025-01-15 12:09:48 +01:00
Alug 719c70a432 dont throw a warning about addons with custom gamedata
just ignore it
2025-01-15 11:54:56 +01:00
indev db567a3d80 G_PlayerReborn didn't work for 'respawns' stats, maybe G_DoReborn will? 2025-01-14 20:05:38 +01:00
indev 61bcab727f Player kartstuff's get reset in G_PlayerFinishLevel, so need to call K_StatRound earlier 2025-01-14 20:05:33 +01:00
Alug 2512a9bc87 no need to strcmp just check for "savemoddata"
that bool only ever gets set to true if the savegame has been switched to the modded one and unlike in srb2 this WILL never be reset to false again
2025-01-13 17:42:22 +01:00
Alug a51540fe06 save vanilla save when switching to modified savegame
also add check so we dont rerun this everytime setgamemodified is called
2025-01-13 16:41:45 +01:00
Alug 26b8b126d2 remove "majormods" checks from stuff that saves to savegame
so its only there to throw a notice when you load an addon
2025-01-13 16:37:56 +01:00
Alug 37ed39840f Merge remote-tracking branch 'origin/kartstats' into lugstuff 2025-01-13 16:00:55 +01:00
Alug 6fa1ec8a07 Revert "make game use seperate save when addons are loaded"
This reverts commit 07e1c9e993.
2025-01-13 15:58:28 +01:00
indev 723f5a97f2 Clear menus when running 'map' command 2025-01-13 15:54:20 +01:00
Alug 88761ce4a4 remove this
hooklib refactor already indirectly fixed this so this code is pointless
2025-01-13 15:50:12 +01:00
Alug 07e1c9e993 make game use seperate save when addons are loaded
so you can record attack and it will also keep saving to statistics
also added a few things it now keeps track of
TODO: unfuck the statistics page and add a 2nd one perhaps? due to space reasons
menucode is hell
2025-01-13 10:47:38 +01:00
Alug c3c5a38360 this doesent work out
breaks some textures not appearing on some maps
2025-01-13 07:55:02 +01:00
Alug b36b2379b2 slightly cleanup gravstretch stuff 2025-01-12 17:07:07 +01:00
Alug fdef0127fa change banana default patch to match lua roulette hud behaviour 2025-01-12 17:01:12 +01:00
Alug 56c4d72318 add support for multiitem patches (thx neppy!)
needs new patches, unsure if we just gonna add em to the extra file or make a new one
so it ambigous for now
2025-01-12 17:01:08 +01:00
Alug e64fc61fac oops fix menu stuff 2025-01-12 17:01:04 +01:00
Alug c5ccb2cd2c oops those should be player scale actually 2025-01-12 02:33:59 +01:00
Alug 90eda3b79a fix having saltyhop disabled forcing player spriteyoffset to be forced 0
just clear out everything on toggle
2025-01-12 02:27:32 +01:00
Alug dd8ac9f75c add toggle to colour sneakertrail flames (thx neppy!) 2025-01-12 02:00:31 +01:00
Alug 4d37cfba2a split ra wheel and position number hud offsets
kinda ass due to the preset offset, but will just not apply if either was changed from its original position
2025-01-12 01:51:37 +01:00
Alug 8fac3fa367 toggle for camera turnaround on timeover 2025-01-12 00:59:47 +01:00
Alug fc658f3fe9 forgor about software again 2025-01-12 00:01:57 +01:00
Alug 4c7a204151 TEST: skip prepping 3d floors for fofs without planes
or if they were already checked
2025-01-11 23:27:44 +01:00
Alug fa09ee3c42 split HWR_RenderBSPNode
to reduce function call overhead
its only microscopicly faster lel
2025-01-11 23:04:35 +01:00
Alug 031c1017c1 one line this 2025-01-11 22:34:45 +01:00
Alug e3a4a85833 fix frame flag clash 2025-01-11 19:54:59 +01:00
Alug bf0d4077b0 hmm try making them have absolute lightlevel 2025-01-11 18:10:15 +01:00
Alug 0c5c12adb9 simplify cmpack 2025-01-11 18:09:51 +01:00
Alug ba27cd1c6c put random direction light toggle into advanced video options
also make it a scoll menu
2025-01-11 18:08:14 +01:00
Alug 0bc865395e reinit random maplight on mapchange when toggled
the condition may otherwise not change the light if you restart the same map
2025-01-11 08:52:41 +01:00
Alug f78d5fffdc oops 2025-01-11 08:28:49 +01:00
Alug 0801c18e22 add FF_ABSOLUTELIGHTLEVEL
mobj_t.lightlevel is absolute instead of relative when set
2025-01-11 08:22:30 +01:00
Alug fe3bc867bc add encore variants of maplight 2025-01-11 08:03:59 +01:00
Alug 23dd5aa1d9 forgor this 2025-01-11 07:50:10 +01:00
Alug 52b8a34535 if disabled and no soc overrides light behave like vanilla
always apply wall and slope contrast pls
2025-01-11 07:34:41 +01:00
Alug 4f5d49292c change how randomized light works
so it doesent kill actual soc set randomlight if you toggle it
2025-01-11 07:25:12 +01:00
Alug c991abc64d move this 2025-01-10 22:46:05 +01:00
Alug ca7b397e21 "Invinciblity" 2025-01-10 22:31:31 +01:00
Alug 6b44984549 seperate game turn axis from cam turn axis
both are bound to the same value by default, so vanilla controls remain intact
theres no other good way to have gamepad controls for this sadly
2025-01-10 22:23:28 +01:00
Alug 06ae053783 strafe controls for speccam/freecam
TODO: seperate cam turning axis from gameplay turn axis for gamepads
2025-01-10 18:33:50 +01:00
Alug 178db4baae let "fovchange" work in software 2025-01-10 14:58:58 +01:00
Alug 0ffff2751e clamp to length-1 2025-01-10 02:14:31 +01:00
Alug 9121ec9527 reinit minimap stuff when a wad is added while ingame 2025-01-10 02:11:43 +01:00
Alug 8f251485a3 fix column drawers clamping stuff 2025-01-10 01:54:31 +01:00
Alug 5ea1e2bd71 kill unarchivevaluedemo
just pass if we load from replay or not and do stuff accordingly
2025-01-09 20:05:06 +01:00
Alug 21d1bd3033 make gamestate download show total gamestate size 2025-01-09 18:21:32 +01:00
Alug a79e78644d this should also use unpaused rendertimefrac 2025-01-09 17:25:50 +01:00
Alug 782e3172ad do some lööp unrolling for software span drawers
actually gained me like 5 fps on 1440p for some reason lel
2025-01-09 17:15:30 +01:00
Alug 5fbc1ae911 use lööps for those to look a little better lel 2025-01-09 17:11:02 +01:00
Alug 8c8a597559 dont reset cam using f12 when only one player is ingame 2025-01-09 17:06:45 +01:00
Alug f3f5f364d3 slightly refactor chasecam stuff again 2025-01-08 23:49:26 +01:00
Alug e70342fc19 le funny banan drag jumpy 2025-01-08 18:34:54 +01:00
Alug f168c2f8c4 fix postimg data types mismatch
also remove the "postimgflag_t" typedef since its useless
and use smoler type for everything we dont need much space lol
2025-01-08 18:23:25 +01:00
Alug 89e5ed191c shouldnt this be uint? 2025-01-08 15:42:36 +01:00
Alug e02ad7883c this is not needed anymore 2025-01-08 15:12:31 +01:00
Alug 5bb613dda1 smol cleanup localskin ranking shit 2025-01-08 06:29:17 +01:00
Alug 37b3519a51 grow pp rumble 2025-01-08 06:02:11 +01:00
Alug 95ed1712bf add banandrag rumble lol 2025-01-08 05:51:00 +01:00
Alug 1d5502a17e add slight fadeout to spinout rumble 2025-01-08 05:50:41 +01:00
Alug eee6e4e020 driftcharge toggle + menu entry 2025-01-08 05:04:54 +01:00
Alug 7cdacc7bdd add a toggle for colourspeedlines 2025-01-08 04:58:36 +01:00
Alug 64d447298b move this
to preserve order as best as possible due to synched rng zzz...
2025-01-08 04:48:37 +01:00
Alug 5433a9d31d reorder saturn hud menu a little
also remove uncapped hud from it, since why would you ever wanna turn it off?
2025-01-08 04:31:11 +01:00
Alug d30934fa4d move saturn hud cvars to k_kart and fix driftgauge extra showing
if there is no patch for it
its kinda dumb, since technically would allow to not load all of em
but im lazy and dont wanna change possiblevalues around
2025-01-08 04:01:48 +01:00
Alug eed42d9b18 toggle for smol positionnum and posnum animation 2025-01-08 04:00:57 +01:00
Alug 44c016fd2c fix "connect" command not saving to last server 2025-01-08 03:17:14 +01:00
Alug f0f1a16982 oops forgor those 2025-01-08 01:48:55 +01:00
Alug 4b6587e8ba clean up gamepad led stuff 2025-01-08 01:46:56 +01:00
Alug f427dce73b dont rumble in freecam + player fix 2025-01-08 01:33:37 +01:00
Alug a4ddbff64d oops fix software lel 2025-01-08 00:13:27 +01:00
Alug aa937f2f7b clean up this mess a little 2025-01-07 22:47:35 +01:00
Alug bc1cde262c a 2025-01-07 22:04:52 +01:00
Alug 56014403b2 aight try this 2025-01-07 21:15:40 +01:00
Alug 48566ea8eb fix fbo crap once again 2025-01-07 20:16:28 +01:00
Alug e44bec1b8c check if subsector has sector before assigning 2025-01-07 19:49:36 +01:00
Alug a8bfd89b01 fix freecam aim getting stuck and other issues
- gamepads now aim like they used to and at same speed as keyboard
- aim reset has been changed so it resets automatically, but also can be manually reset with centerview
- aiming is locked during cam reset
2025-01-07 18:47:12 +01:00
indev 0f245f52b1 If available, add map title into crash log 2025-01-07 16:30:37 +01:00
Alug ae8629ecba replace common damage magic numbers with named macros
that stuff always confused me before lol
2025-01-07 16:30:32 +01:00
Alug f0f69e873a readd check for banan
this time without mobjwasremoved
just check if banan exists
2025-01-07 16:29:33 +01:00
Alug e9c35d269d check for cam subsector
since we can move it around and i added this to freecam mode, subsector may be null for reason so better be safe than sorry
2025-01-07 16:28:38 +01:00
Alug ee8f937866 idk but this func crashes often enough 2025-01-07 03:48:14 +01:00
Alug 1a0bb18de7 make this more complicated due to a "-" 2025-01-06 22:50:15 +01:00
Alug f4fa1fbd8c check for 0 to avoid division by 0 2025-01-06 22:40:56 +01:00
Alug 50593dbfc2 change director toggling handling
- now not changable over console anymore, bind only!
- it doesent save anymore so its always disabled at game start
- moving while in spec state will disable director when active so stand still
- disable it in splitscreen completely
- only adjust view when toggling it on
2025-01-06 22:40:36 +01:00
Alug 65b5415216 let postimg stuff also apply to freecam 2025-01-06 22:02:34 +01:00
Alug bbe9d29d5c add a little extra safety here ig
this crashed on levelload once so idk maybe player was null ig
2025-01-06 19:49:29 +01:00
Alug b77673550e save a whopping 2ms from gamestart to race start on texture updating 2025-01-06 19:05:42 +01:00
Alug d82acd060c double the slack for slep 2025-01-06 19:01:58 +01:00
GenericHeroGuy 3f139d83ca Add cleanjit target
Recompiling the whole game after changing a single flag is pretty tiring
2025-01-06 17:12:32 +01:00
GenericHeroGuy a8743d50b8 Fix some functions leaking doubles in INTONLY 2025-01-06 17:12:29 +01:00
GenericHeroGuy b400655f3c Add cleanjit target
Recompiling the whole game after changing a single flag is pretty tiring
2025-01-06 00:02:11 +01:00
GenericHeroGuy 314ab9e9f0 Fix some functions leaking doubles in INTONLY 2025-01-05 23:48:40 +01:00
Alug 9c105db8da any of those may be NULL in MakePatch
no idea but this crap keeps crashing in some other place every single time i add a check somewhere else
2025-01-05 23:02:27 +01:00
Alug 25bcd2b866 thats not timedemo lel 2025-01-05 21:24:48 +01:00
Alug 31726b05e6 turn off any active menus when using demo play commands 2025-01-05 21:23:45 +01:00
Alug 2f1e591d06 disable pause vhs effect when in freecam mode 2025-01-05 20:37:39 +01:00
Alug 8cb4349950 slight slep optimization
https://git.do.srb2.org/STJr/SRB2/-/commit/1da55066d43ed6a0cb666999c20316bef463024b?merge_request_iid=2583
2025-01-05 20:12:19 +01:00
Alug 38653dd22f disable director while in replay freecam 2025-01-05 19:01:54 +01:00
Alug e6e179453c no u may be used uninitialised 2025-01-05 18:53:49 +01:00
Alug 849cfbfbfa Adjust slack based on precision
https://git.do.srb2.org/STJr/SRB2/-/commit/d20552c49d9fd6a2075ebd7d46b0b133c69f1dbe?merge_request_iid=2583
2025-01-05 17:41:02 +01:00
Alug d9b04cd7d8 --------- 2025-01-05 15:11:09 +01:00
Alug 678e2f604c remove this again
seems like it basically doesent change anything
2025-01-05 15:03:39 +01:00
Alug 7bc804bccb kill a bunch of uneeded null checks
P_MobjWasRemoved already checks if mobj is null lol
2025-01-05 14:50:23 +01:00
Alug 56177e06bf slight cleanup buildticcmd 2025-01-05 14:17:44 +01:00
Alug 2b1b1fd882 put refreshdirmenu back here 2025-01-05 14:14:34 +01:00
Alug 3e976415f0 this somehow got lost lel 2025-01-05 01:11:26 +01:00
Alug f5ee615b2d dont cast "infinity" to int lel 2025-01-05 00:41:41 +01:00
Alug beaf44040d Further improve sleep accuracy on UNIX systems
hanichad https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2583
2025-01-05 00:32:23 +01:00
Alug 807eff3168 revert "Faster z position checks for mobjs without collision" 2025-01-04 22:17:15 +01:00
Alug ba394303b1 reduce ternary hell a little lel 2025-01-04 21:54:45 +01:00
Alug 9bbd33ad48 make float and sink use accel and brake again but also keep rebindable controls
keeps intended behaviour since we now dont need to worry about player controls anymore
but keeps the rebindable buttons incase someone wants to do a crazy control setup for some reason
2025-01-04 21:03:22 +01:00
Alug 77ff2b986d more hAx: dont move player during freecam state besides hop and honk
useful if you wanna take pics and dont feel like driving away
2025-01-04 19:37:52 +01:00
Alug b8e9cd0a42 dont do this while not in replay
this is kinda awkward tbh, but its useful for replay stuff
2025-01-04 19:33:43 +01:00
GenericHeroGuy d6d9839985 Use references instead of upvalues for original I/O functions
No more unrestricted I/O through debug.getupvalue
2025-01-04 02:28:53 +01:00
GenericHeroGuy 68e0f40b86 Update to BLUAJIT 449b76f 2025-01-04 02:28:49 +01:00
Alug 3085e49e87 forgor about lookback ig 2025-01-04 01:55:40 +01:00
Alug f733bf140e check for consoleplayer since displayplayer is who youre watching 2025-01-04 01:55:40 +01:00
GenericHeroGuy 0fbc448013 Use references instead of upvalues for original I/O functions
No more unrestricted I/O through debug.getupvalue
2025-01-03 22:16:11 +01:00
GenericHeroGuy eb9d1982fa Update to BLUAJIT 449b76f 2025-01-03 20:12:26 +01:00
Alug ef94e1051f remove redundant stuff
can just set this all the time, its only used when menu is active anyways so it doesent matter if we set it
2025-01-03 20:09:28 +01:00
Alug 7687e6effc simplify this 2025-01-03 19:35:29 +01:00
Alug d705bd3fb7 oops smol error 2025-01-03 18:29:21 +01:00
Alug ea484e4aec move postimg flags to camera struct
- also dont let water and heat be applied on top of each other since it does not look good (water postimg takes priority over heat)
- also save a little time in opengl splitscreen since it does not support heat or wöter effects
2025-01-03 18:18:20 +01:00
Alug a77aa11e36 fix encore mirroring not applyingg to freecam/democam 2025-01-03 16:40:43 +01:00
Alug b1f6263537 didnt mean to revert this one 2025-01-03 15:53:08 +01:00
Alug 4c38961efa do NOT repeatedly call M_Responder!!
"thread safety" or smth
also put stuff into two seperate functions, since i started hating nesting
2025-01-03 15:51:38 +01:00
Alug dc6904fad2 clean shit up even more + fix cam aiming reset
dont really care about which input anyways.
2025-01-03 07:33:28 +01:00
Alug e9b1329f15 try and clean up this mess
+ fix cam angle being wrong when you switch to freecam from viewing someone
2025-01-03 07:01:04 +01:00
Alug bd989239ea add another local ticcmd builder so it can guess if we "moved" and put us into freecam state and shit 2025-01-03 01:18:30 +01:00
Alug 3dd0313d53 only ever touch this if player has a mobjs
angleturn is dumb in kart and rarely really is what we want
2025-01-03 01:14:01 +01:00
Alug b91f2e91f1 smol fix 2025-01-02 22:18:52 +01:00
Alug dd267a725b apparently this is slower for everything but rendering 2025-01-02 21:50:02 +01:00
Alug 7a5c255956 let windoze detect 64bit mingw in makefile
lets us use just "make" cmd without specifieng any other crap on mingw64
2025-01-02 20:55:47 +01:00
Alug a33b225c0b move camera noclip stuff into its own function
its not used in kart anyways and moving it makes crap more readable
2025-01-02 17:07:41 +01:00
Alug dfdea068ef let playercmd lua hook run during "spectator" input crap lmao 2025-01-02 16:55:20 +01:00
Alug 0c0f52c38c fix unitialised use of controller stuff 2025-01-02 16:54:54 +01:00
Alug f017db6be0 do some actualy casting for angle and aiming cmd stuff 2025-01-02 16:45:02 +01:00
Alug 2b0e3104a6 move spectator hack after pause/desynch code
this should take priority over everything
2025-01-02 16:44:30 +01:00
Alug f7dad2c580 giga shizo spec synch "fix"
ok so, for whatever dumb reason, spectatormovement will desynch at random, even on localhost.
with this we just literally fucking ignore almost every button input locally and just wont move our spectator player at all.
but since we are indeed still runiing specatotr movement code, and this is localcmd shit, the server just thinks we dont want to move and thus is "synchsave".
sadly this does not fix desynchs from vanilla players
the only code we keep is for button inputs that do certain actions like "item" so we can still join from spec with it and other crap
2025-01-02 06:49:54 +01:00
Alug 087fbca227 this doesent work for us 2025-01-02 06:49:51 +01:00
Alug 6024405de4 add speccam playerflag
the other thing was weird and dumb lol
2025-01-02 06:49:47 +01:00
Alug 574ff2cb84 this may not be synchsafe 2025-01-02 01:52:25 +01:00
Alug 823b0eeaa2 save subsector checks for dedi 2025-01-01 23:30:16 +01:00
Alug fa21a9621e speed up camera position checks 2025-01-01 23:28:48 +01:00
Alug 1f8203b155 logic error lmao oops 2025-01-01 21:52:54 +01:00
Alug 2c55e28ea5 use FRACUNIT in rumbleticker + some changes
- brakedrift will now add to any rumble thats currently going on
- both hyu and invul now rumble less heavy on offroad
2025-01-01 21:34:02 +01:00
Alug 878b1d60da Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2025-01-01 18:13:34 +01:00
Alug 87a14fa263 slightly cleanup rumble and led ticker 2025-01-01 17:36:47 +01:00
Alug 32a35eb2e7 try a continue in P_NetArchiveThinkers lööp
nothing huuuuge, but on some maps with alot of thinkers this saves a tiny bit of time when creating a save
2025-01-01 17:19:12 +01:00
Alug 81c1f2d1a8 always close any menus when using "connect" command 2025-01-01 17:06:03 +01:00
Alug 2cfc1a7980 those will never be changed ever 2025-01-01 06:18:05 +01:00
Alug 248e47118f hack: only let freecam for spec move when youre actually able to move as spec
cause kart weird, and we cant remove the spec movement due to synch reasons
and letting the cam move instantly instead of waiting, may put you in a weird cam position
2025-01-01 05:37:30 +01:00
Alug e18d973d5e move early return even earlier
so theres no need to constantly init scale and drawdist
2025-01-01 05:10:52 +01:00
Alug da3ffafc90 we dont really need to check for precipthinkers in the precip thinkerlist
also makes precip handling in P_NetUnArchiveThinkers a little safer
2025-01-01 05:07:56 +01:00
Alug cf32ce90b6 dont iterate through precip blockmap if there is no precip 2025-01-01 05:06:52 +01:00
Alug 970657eb74 attempt to optimize column drawers a little 2024-12-31 00:57:32 +01:00
Alug 65ab0c21d4 reset refreshdirmenu at diff place
idk maybe this finally actually fixes the crappy addon menu
2024-12-31 00:12:09 +01:00
Alug 4633a55c97 dont try to chase after your spec mobj lel 2024-12-30 23:10:51 +01:00
Alug a27642faee readd this check lel 2024-12-30 22:21:26 +01:00
Alug 8368c668df fix potential Fix segfault when aborting HTTP download 2024-12-30 17:34:13 +01:00
Alug b932edb983 fix potential cash with perfstats
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2576
2024-12-30 17:29:27 +01:00
Alug 1cf4db9148 hide director control stuff for others than player 1 2024-12-30 11:29:49 +01:00
Alug d12320bbb5 dont disable this.... if its disabled kek 2024-12-30 11:24:14 +01:00
Alug 213b3124fa slight cleanup director 2024-12-30 11:11:16 +01:00
Alug 10a306110b aaaaa 2024-12-30 11:03:38 +01:00
Alug da9b6f80f1 forgor 2024-12-30 11:02:13 +01:00
Alug ca9f2aa9c0 kill splitscreen director again 2024-12-30 11:00:05 +01:00
Alug d88ececbea no need to check for all this crap 2024-12-29 20:00:35 +01:00
Alug 01a325736d dont need this anymore 2024-12-29 19:46:14 +01:00
Alug bec1420591 remove this turning off director
director will only work when in spec anyways
2024-12-29 19:33:50 +01:00
Alug a1a644aa48 fix some potential issues with viewinterp
now unpaused disabled interp on netlag
also fixes screencoord stuff not being interpolated during pause
2024-12-29 19:29:12 +01:00
Alug ec68b885d7 fix driftgauge showing with freecam while ingame 2024-12-29 19:21:40 +01:00
Alug 57d01415e2 readd cam cmd stuff
cause it may break the cam in replays or smth a
2024-12-29 19:21:23 +01:00
Alug 8a3b934518 allocate some extra buffer for demobuffer
incase this might overflow that we dont write to unvalid memory
thx indev <3
2024-12-29 17:56:35 +01:00
Alug f775bb54a5 change error msg 2024-12-29 17:45:20 +01:00
Alug 9cc96f9d70 reset demo recording in those places 2024-12-29 17:43:09 +01:00
Alug 93da9867b4 add warning for non allocated demobuffer 2024-12-29 17:38:36 +01:00
Alug 9ed6a0af1e fix demo playback 2024-12-29 17:14:47 +01:00
Alug d97f86b3f6 fix wrong cam default controls 2024-12-29 16:51:07 +01:00
Alug 871fa6bb67 fix offbyone issue 2024-12-29 16:48:29 +01:00
Alug d7f31cfea0 add a mipmap check here ig 2024-12-29 15:40:11 +01:00
Alug 6182fd9488 let director switch to splitscreen players lel 2024-12-29 15:34:43 +01:00
Alug dad904967e add a bunch of extra checks into demo stuff
buffer may be NULL in some cases
should fix dedis crashing when replay recording is disabled
2024-12-29 15:34:10 +01:00
Alug 2186fc6ce0 dont need to do this twice 2024-12-29 06:40:13 +01:00
Alug de8c933f1c fix centerview 2024-12-29 06:37:10 +01:00
Alug fda002c736 block freecam toggling when player is in spec 2024-12-29 06:36:36 +01:00
Alug 9c34bb0ae7 clean up cam stuff for good 2024-12-29 06:27:18 +01:00
Alug 5c7d12b60d make function to return button names
to use with new rebindable cam controls
2024-12-29 06:02:35 +01:00
Alug 7ae685565a make debugdirector show stuff for p1 atleast 2024-12-29 05:51:04 +01:00
Alug 4fbfb19b21 Revert "always call fixcamera when toggling freecam"
This reverts commit 3ca07376ac.
2024-12-29 05:44:45 +01:00
Alug dd8aca5773 track views in directorinfo structs
should hopefully fix any potential remaining issues
2024-12-29 05:42:21 +01:00
Alug b903dc1205 fix director toggling + smol cleanup 2024-12-29 05:32:51 +01:00
Alug 3ca07376ac always call fixcamera when toggling freecam 2024-12-29 05:01:09 +01:00
Alug 49518b753e toggle off freecam when f12ing 2024-12-29 05:00:41 +01:00
Alug 413f236a7d missing inlucde 2024-12-28 18:52:49 +01:00
Alug 64a5a4920b cleanup K_DirectorIsAvailable 2024-12-28 18:24:56 +01:00
Alug d2b0fc3b5e add K_DirectorIsAvailable 2024-12-28 18:17:34 +01:00
Alug aa95507478 Update replayfreecam lua global to use camera.freecam for currently viewed player 2024-12-28 17:42:45 +01:00
Alug b0aba7f4a4 cleanup director splitscreen stuff 2024-12-28 17:42:04 +01:00
Alug 7341f77fe1 WIP splitscreen director lel 2024-12-28 17:20:02 +01:00
Alug 76460b9d9c replace all this crap with either stplyrnum or R_GetViewNumber 2024-12-28 05:52:20 +01:00
Alug 2ba291516e remove the remainder or demo.freecam 2024-12-28 04:18:47 +01:00
Alug 30d1747d43 disable replayfreecam lua exposure
need a way to expose crap lel
2024-12-28 04:10:09 +01:00
Alug 113dd4aeae fix jitter when toggling freecam off 2024-12-28 04:09:43 +01:00
Alug 17f79b0260 fix cam interp during pause again 2024-12-28 04:01:09 +01:00
Alug 2526a99726 fix speccam again 2024-12-28 04:00:56 +01:00
Alug 21ec8ea1a4 fix freecam not being steerable when not in spec
ugh this is godawful
its literally almost a complete copy of
2024-12-28 03:44:21 +01:00
Alug 9cac882840 changable freecam speed 2024-12-28 01:41:49 +01:00
Alug 02dfced6c0 make freecam work in splitscreen
banish cameracmd shit
2024-12-28 01:38:08 +01:00
Alug 9f2e80fc3c set default controls for float and sink ig 2024-12-28 00:21:41 +01:00
Alug 57a097ea52 add alternative cam float and sink buttons 2024-12-28 00:04:49 +01:00
Alug e5d8a2e8a9 add bindable freecam toggle 2024-12-27 23:55:19 +01:00
Alug 579b66e1c0 fix freecam not being interpolated when ingame 2024-12-27 23:37:23 +01:00
Alug 2e3c4a45b0 use demo freecam for spec
its more versataile and lets you pass through walls and floors just like in replays
2024-12-27 23:34:09 +01:00
Alug 7f5033f14a actually dont make those beeg 2024-12-27 22:30:40 +01:00
Alug 084574f2f2 sparkle trail effect from rr TEST
most likely not netsafe
also smol trail breaks for some reason lel
2024-12-27 21:51:50 +01:00
Alug 2d5cdd3f19 a 2024-12-27 21:51:07 +01:00
Alug 64897ba6d6 momz stuff for kart vfx
from RR
2024-12-27 21:02:26 +01:00
Alug 87887aa3a0 make function for driftsparkcolour
reduce some code dupe
2024-12-27 20:59:43 +01:00
Alug 8e67e96e6f super smol refactor minimap head drawer 2024-12-27 18:43:27 +01:00
Alug 14f030e9a8 use V_STEELMAP for white skincolours instead
cause white on white be weird
2024-12-27 18:41:50 +01:00
Alug 93dbe7eecb z 2024-12-27 00:44:20 +01:00
Alug dd8f25d43c draw gametype in tabrankings during replay playback
replays already show the mapname in there so
2024-12-27 00:44:10 +01:00
Alug 7f25117c3e make highlight color in scoreboard and tab ranking player coloured
also make it appear in splitscreen
similar to hostmod things
2024-12-27 00:35:38 +01:00
Alug 01525e294f also add playernum var to tabrankings drawer 2024-12-27 00:34:51 +01:00
Alug 07a6ea240b check whiteplayer once 2024-12-26 23:50:49 +01:00
Alug 2e658ac546 more smol refactoring 2024-12-26 23:46:52 +01:00
Alug 930fdc84ec refactor intermission standings drawer
abstract the data stuff too
2024-12-26 23:24:23 +01:00
Alug a42342a4b8 a 2024-12-26 20:52:57 +01:00
Alug 75309ff21b crappy optimization
check first if any of those flats exist lel
2024-12-26 20:50:56 +01:00
Alug 0c58f66fd8 actually check for vanilla speedpads first
they are more likely to appear tbh
2024-12-26 20:05:03 +01:00
Alug e03d13c2b8 simplify this alot
Zzz... somehow overlooked that it already gets a fof sector passed
also adds another condition since we dont need to check anything with 255 brightness
2024-12-26 20:02:46 +01:00
Alug fba943470d another attempt at fixing skipintro mus playing titlescreen music 2024-12-26 17:51:06 +01:00
Alug 595972629d whoops this never did anything lol 2024-12-26 15:49:47 +01:00
Alug 4fb43b798d 1px 2024-12-26 01:07:49 +01:00
Alug 87c499d8c7 make the extra 3 driftgauge not resolution dependant
thx indev <3 you saved me from going insane...
2024-12-26 00:56:40 +01:00
Alug 265e52caab make colorhud check consistent 2024-12-26 00:49:31 +01:00
Alug 1445a75183 super smol optimizations 2024-12-26 00:01:42 +01:00
Alug cc2434fd69 add tweakmap support
https://git.do.srb2.org/KartKrew/RingRacers/-/commit/7fb44bdb0239a8012be73cb9ee384a9fdca9addb
2024-12-25 01:56:58 +01:00
Alug 936b39f7a3 make those const 2024-12-23 18:06:56 +01:00
Alug b8a86ca405 make some cam stuff behave exactly like vanilla again
no clue if this changes anything at all, but cam stuff be causing so many issues id rather just have it behave like it used to
2024-12-23 17:45:43 +01:00
Alug 773df88224 dont remember removing this in s_sound 2024-12-23 17:44:48 +01:00
indev e7a2c83aa5 If player has mobj, use it to assign localangle in G_FixCamera 2024-12-23 15:50:31 +01:00
Alug dc1ae2125c fixeur comptime stuff (thx indev <3) 2024-12-23 00:58:11 +01:00
Alug 8e9036029a try to check for watertrail stuff on mapload too
so it doesent need to check so much always when its called
2024-12-23 00:16:14 +01:00
Alug b14558765a fix driftsparkle sometimes not replacing driftdust 2024-12-23 00:15:22 +01:00
Alug 131b28ff9f bump 2024-12-22 22:51:45 +01:00
Alug 0e1a8b3623 a 2024-12-22 22:35:39 +01:00
Alug ffb8b281d8 add some lightlevel randomization 2024-12-22 22:35:31 +01:00
Alug 07aeb0d94b use P_MobjWasRemoved for HWR_DrawSprite 2024-12-22 21:18:57 +01:00
Alug 725640379e only check fofs if lumpname matches 2024-12-22 21:17:54 +01:00
Alug 340dffab23 make fullbright speedpads work on fofs pls 2024-12-22 21:11:15 +01:00
Alug c1e5cadcc7 settable mobj lightlevel from lua 2024-12-22 20:56:11 +01:00
Alug 898d1e7fc7 fullbright for some player visual effects
sparks and stuff should glow lel
2024-12-22 20:43:58 +01:00
Alug f5058fb5be readd mobj lightlevel field so i dont have to edit frameflags 2024-12-22 20:29:26 +01:00
Alug fbd051f947 make speedines colorized for driftlevels 2024-12-22 20:26:33 +01:00
Alug dc846fc487 just skip missing/broken fields in musiccredit handling
like vanilla kek
still will throw warnings but atleast will show stuff if theres anything left in the musicdef
2024-12-22 19:59:42 +01:00
Alug 402cd310d9 stuff 2024-12-22 18:45:34 +01:00
Alug 2ee68da944 fix compile 2024-12-22 18:38:09 +01:00
Alug 780308fee0 just revert this idk how comptime works 2024-12-22 18:38:00 +01:00
Alug dc256a03b4 Revert "add P_CheckPositionShadow just for shadow mobjs"
This reverts commit 7edce19c9c.
2024-12-22 18:29:53 +01:00
Alug 4e5576351c Revert "add shadows to faster slope z checking"
This reverts commit 4aaa2c6fed.
2024-12-22 18:29:46 +01:00
Alug 33957b5f60 Merge branch 'Saturn-Testing' into lugstuff 2024-12-22 18:29:39 +01:00
Alug c492622102 add some () 2024-12-22 01:47:07 +01:00
Alug f7494fedd5 do the same for R_ProjectPrecipitationSprite 2024-12-22 01:44:25 +01:00
Alug b02d4365ac dont put potential null mobj into interpolation stuff 2024-12-22 01:42:42 +01:00
Alug ba1486f763 dont dereference potential null mobjs in software projectsprite 2024-12-22 01:40:42 +01:00
Alug a495482fc1 compiler pls shut up 2024-12-22 01:31:52 +01:00
Alug 39a5da5036 use P_MobjWasRemoved and null check for thing subsector in projectsprite 2024-12-22 01:31:00 +01:00
Alug 504f15db58 fix fade to menu again oops 2024-12-20 18:25:59 +01:00
Alug 54116b3d3f fix no fbo compile 2024-12-20 18:25:57 +01:00
Alug 6c9c648af1 always reset those just in case 2024-12-20 11:35:22 +01:00
Alug 5da992b63b idk just set to false here too 2024-12-20 11:19:09 +01:00
Alug 9bb5e95f54 whoops 2024-12-20 03:17:12 +01:00
Alug bad4180e63 try to clean up downsampling and resolution checking stuff
- global function that updates variables with current display resolution
-smol boolean function that quickly checks if the game res matches the desktop res
- i_downsample has been simplyfied a bit
2024-12-20 03:12:03 +01:00
Alug 084e364a8a fix fbo shader lel 2024-12-20 03:07:31 +01:00
Alug 2cbc4e580d better nvidia xwayland workaround handling
what in the world was i thinking????
2024-12-20 02:50:30 +01:00
Alug a2e6ec4f5b add another early return 2024-12-20 01:20:51 +01:00
Alug 231a7f1366 simplify this crap and make compiler happy 2024-12-20 00:57:57 +01:00
Alug bee77ec2ad no 2024-12-20 00:57:31 +01:00
Alug 11cc7e63b7 just query this once 2024-12-20 00:57:15 +01:00
Alug 2083daf4c3 return false here 2024-12-20 00:51:05 +01:00
Alug 816e6a0287 makes no sense without screen tex 2024-12-20 00:50:28 +01:00
Alug 6d9541c135 simplify this crap 2024-12-20 00:38:56 +01:00
Alug 0f208617bd fix compile due to missing am_map.h include 2024-12-19 22:42:14 +01:00
Alug e8bbac82f4 fix compile without USE_FBO_OGL 2024-12-19 22:40:08 +01:00
Alug d657afe18b oops 2024-12-19 20:42:52 +01:00
Alug 96f3ac9d9e add "listmapthings" and "listunusedsprites" commands
the former also shows duplicated mapthings
2024-12-19 20:33:04 +01:00
Alug 9290744fca Fix segfault when sending excessively large netcmds
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2568/diffs?commit_id=457b761d9301b1904c414a8e8ba908f74b9ab959
2024-12-18 18:57:02 +01:00
Alug f08f91a9fe use slightly diff maths for skydomevertex calc
from DSDA-Doom
maybe fixes some issues with certain skydomes?
2024-12-18 18:55:58 +01:00
Alug 22e20ed282 delet this only O3 2024-12-17 12:45:48 +01:00
Alug be2952db5d dont show gamemodes in battle + smol cleanup 2024-12-17 00:53:50 +01:00
Alug ff4a27de0e fix the string being truncuated 2024-12-17 00:53:35 +01:00
Alug 991e1a2844 make this crap actually work lol 2024-12-16 23:33:27 +01:00
Alug a2cbec78f9 assballs 2024-12-16 23:51:59 +01:00
Alug d1b3cd4994 init textcmdbuf to NULL
just in case
2024-12-16 20:40:36 +01:00
Alug 431c2c71f5 delay NetXCmd´s instead of dropping them when the buffer is full
credits and many thanks to Hanicef!
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2568
2024-12-16 20:34:28 +01:00
Alug 5fd6437c34 potential fix for clients locking up due to never receiving acks back
apparently, if the client doesent receive an ack back which may happen due to duplicate packets/bad net conditions, it may spam resend the packet until its netxcmd buffer is full and locks up
2024-12-16 18:27:53 +01:00
Alug 47c429c792 prevent potential crash if viewmobj was removed 2024-12-16 16:37:38 +01:00
Alug b69b94f26f smol fix for gamma stuff
-dont apply gamma adjust when gamma is on default value
-fix saturation not being applied on console on OpenGL without paletterendering
2024-12-16 04:35:03 +01:00
Alug b9bb2e5663 Revert "try the semi fast R_PointOnSide FOR gameplay stuff"
This reverts commit d80a02fe42.
2024-12-16 02:00:01 +01:00
Alug 488aecf95c fix changing gamma absolutely trashing performance
not quite sure why it made stuff die so much but uhhh
instead i just check in the cube initialistion function instead and only let it build when needed to not change how the game looks with raised gamma values
2024-12-15 23:26:09 +01:00
Alug d80a02fe42 try the semi fast R_PointOnSide FOR gameplay stuff 2024-12-15 20:22:42 +01:00
Alug 8dff1abc54 oops 2024-12-14 22:47:20 +01:00
Alug 06d85ac65a slight cleanup K_GetScreenCoords and related functions
mostly just reducing scope and adding const clarifyier
also use mobjwasremoved checks everywhere instead of just simple null checks for some safety
2024-12-14 21:14:24 +01:00
Alug b4d49c565f Revert "Draw an icon above players when they are typing in chat or console"
This reverts commit da5136c7c1.
2024-12-14 20:25:33 +01:00
Alug da5136c7c1 Draw an icon above players when they are typing in chat or console
not fully working but didnt want go work to waste
2024-12-14 20:25:27 +01:00
Alug 32c3b7761a fix papersprite lightlevels again kek + remove shit that does nothing 2024-12-14 17:13:28 +01:00
Alug 5445be6645 fix papersprite directional light
uhhh idk??
also passes papersprite bool directly instead of rechecking every frame for it
2024-12-14 16:53:10 +01:00
Alug 7b89f41b77 seems like you CANNOT apply dispoffset to papersprites
well then
2024-12-14 16:27:40 +01:00
Alug 56e1b50260 fix inverted papersprite roll
oopsie
2024-12-14 16:27:06 +01:00
Alug 9fdd7de5b1 only check if polyobjcst are on the map 2024-12-14 16:00:01 +01:00
Alug 960679a3fd forgor about cameracheckposition 2024-12-13 16:50:10 +01:00
Alug e428fdc89a only check for polyobjects in the blockmap if there even are polyobjects
this saves the trouble of iterating through the blockmap every single time P_CheckPosition is called if there are no polyobjects present on the map
2024-12-13 16:46:49 +01:00
Alug fd514d4e1d smol calc optimization P_Checkposition 2024-12-13 16:45:22 +01:00
Alug cec6dfc131 add P_CheckPositionShadow just for shadow mobjs
its basically just R_GetShadowZ from the render based shadows from srb2 lmao
hope this is synchsafe
2024-12-13 16:36:37 +01:00
Alug 20319ad43c add shadows to faster slope z checking 2024-12-13 15:48:15 +01:00
Alug 774bfc7959 delet all the hardware sound crap
psure it doesent even properly work at this point
2024-12-13 15:47:55 +01:00
Alug 3db5f64b5e Revert "kill "Use po2 patches to fix mipmaps ""
This reverts commit 6b904b10f5.
2024-12-12 18:09:17 +01:00
Alug ddc97b662c Revert "HWR_ResizeBlock more like HWR_ResizeCock"
This reverts commit db96d717ce.
2024-12-12 18:09:13 +01:00
Alug 75ad25f961 Revert "const ma"
This reverts commit 98fbd3fa65.
2024-12-12 18:09:09 +01:00
themixedupstuff e604884bd7 Fixed gr_glinfo crash when there are way too many extensions present. 2024-12-12 17:37:04 +01:00
indev 65d487c60b Avoid overflowing CONS_Printf's buffer by using vsnprintf 2024-12-12 16:50:49 +01:00
Alug c489cfb657 zzz 2024-12-12 15:03:08 +01:00
Alug 1608b8388b Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-12-12 15:01:54 +01:00
Alug f706548779 disable deb print
this never triggered even once
2024-12-12 14:58:57 +01:00
Alug 67bb704a66 check for the flag first 2024-12-12 02:31:19 +01:00
Alug 516cd19d68 seperate thinkerlist for precip
i sure hope i handled everything right lmao
2024-12-12 01:02:46 +01:00
Alug 94d883e22e remove some precip code dupe 2024-12-12 00:30:37 +01:00
Alug d3fb8e9bac better cv_lessprecip handling
idk what i was thinking lmao
2024-12-12 00:11:42 +01:00
Alug 98fbd3fa65 const ma 2024-12-11 23:46:51 +01:00
Alug db96d717ce HWR_ResizeBlock more like HWR_ResizeCock 2024-12-11 23:42:21 +01:00
Alug 6b904b10f5 kill "Use po2 patches to fix mipmaps "
test
2024-12-11 23:29:21 +01:00
Alug 134b28f2d2 maybe fix fade stuff idk 2024-12-11 23:23:46 +01:00
Alug c66497a1d6 clean up hw_cache stuff + fix accidental wrong cast 2024-12-11 23:23:27 +01:00
Alug 5e625e64ce smol cleanup GL_SetBlend
use early return since i likeit more
2024-12-11 22:14:06 +01:00
Alug c11b6f9fda GL_UpdateTexture can be static 2024-12-11 21:58:45 +01:00
Alug 76fc3c1da7 smoll optimization
dont recalc this everytime just do tha lööp thinge
seems to work fine
2024-12-11 15:17:59 +01:00
Alug 07fc47d995 more cleanup GL_UpdateTexture
also some optimizations
2024-12-11 14:23:28 +01:00
Alug 5b264a35bf clean up GL_UpdateTexture
use switches and reduce code dupe
2024-12-11 04:35:43 +01:00
Alug ff58d21051 cast this 2024-12-11 02:02:43 +01:00
Alug 77583d44ed "extra safety" 2024-12-11 01:25:29 +01:00
Alug b3ff5e30aa test "or" 2024-12-11 00:32:34 +01:00
Alug c0a69065ea clamp splitsprite heights aswell 2024-12-10 23:06:29 +01:00
Alug 077ee0bc12 those should better be clamped oops 2024-12-10 22:20:53 +01:00
Alug 303f6cb1ce clean up this stuff; make splitwall behave more like vanilla
changes some splitwall issues slightly but gives bit better performance in some cases
2024-12-10 22:16:03 +01:00
Alug e458c10aac one line those 2024-12-10 21:18:06 +01:00
Alug 85d58d22b7 Unconditionally interpolate view
even if it may NOT change
but i get the feeling it may cause some issues
2024-12-10 21:18:03 +01:00
Alug 22445958c1 dont pass fwrapv to compiler flags
this technically changes behavior of some things, even if it MAY fix some undefined behaviour
2024-12-10 21:18:00 +01:00
Alug 0fc7d2124a interp.subsector is unused
so dont need to assign it nor call pointinsubsector for nothing
2024-12-09 23:19:58 +01:00
Alug 3f99d9aae9 i love menus 2024-12-09 10:19:54 +01:00
Alug b357a8f503 "P_CheckSightFast" for lua
should be faster than normal P_CheckSight
only to be used for things like nametags etc so nothing gameplaywise as it will desynch
2024-12-09 10:48:50 +01:00
Alug f3e184caf1 smol things 2024-12-08 21:18:39 +01:00
Alug f41fda74b5 check for numer before trying to parse it
thx ghg! c:
2024-12-08 16:45:53 +01:00
Alug ec6e8fa3d5 use le flags 2024-12-08 16:02:37 +01:00
Alug 2f0f11976d rename to "hw_gl" 2024-12-08 15:39:36 +01:00
Alug 82ad5a91ab smol cleanup 2024-12-08 15:31:28 +01:00
Alug cd8f43fa47 optimized checksight for nametags and camera
idk should this be exposed to lua too?
2024-12-08 15:26:10 +01:00
Alug 69a593e09d use early return
no need to check for all this crap if we can use it anyways
2024-12-08 04:38:58 +01:00
Alug 1173ea3301 menu oopsie 2024-12-08 04:06:52 +01:00
Alug 6a1398b788 clear maplight on toggling
so you only have to wait until nextmap for effect to do smth instead of game restart
2024-12-08 04:05:43 +01:00
Alug 2fcb5d628e menu entry 2024-12-08 03:39:58 +01:00
Alug 5d902b8507 make random directionallight toggable 2024-12-08 03:39:55 +01:00
Alug d3edc19de9 Revert "try recursion limit for _RenderBSPNode"
This reverts commit 501b8b7bf5.
2024-12-08 02:10:00 +01:00
Alug 5bad795c60 make those less chaotic 2024-12-08 01:33:06 +01:00
Alug 9b8374665a readd some kart batching thing idk 2024-12-08 01:32:53 +01:00
Alug 0479a3e723 stuff 2024-12-08 01:27:57 +01:00
Alug b54ed5f6e5 proper macros 2024-12-08 01:27:14 +01:00
Alug a127088db1 fix chronoshit speedpad light + use memcmp ig
also check for some stuff to maybe save on memcmp checks idk
2024-12-07 17:37:52 +01:00
Alug 015f583908 no need to set all that stuff manually 2024-12-07 12:52:00 +01:00
Alug b6d1e67cf1 port updated skydome code from srb2
seems to actually fix some visual issues on certain maps with it
2024-12-07 12:29:50 +01:00
Alug 9afd00dda7 int should use abs instead of fabs? 2024-12-06 08:15:42 +01:00
Alug 95379f534d delet this 2024-12-06 08:15:17 +01:00
Alug e67d04c694 bruh 2024-12-05 14:29:48 +01:00
Alug 027016e8a3 try less maths for projectionmatrix
from dsdadoom again lul
2024-12-05 11:36:53 +01:00
Alug 4f30029884 use long M_PI to fix some render issues 2024-12-05 11:36:12 +01:00
Alug 8e48cd1b25 little extra safety 2024-12-05 08:10:05 +01:00
Alug 6fcc40748c reduce the scope of those
only this function needs those
2024-12-05 08:07:52 +01:00
Alug 2bed437313 try fix keepmusic occasionally not working
idk but sometimes DoReborn broke it?
also this ensures keepmusic and skipintromus flags always get reset
2024-12-05 07:58:11 +01:00
Alug 88aafd9df2 TEST: dont keep calling R_PointInSubsector in P_CheckPosition if the postiion never changes
can just reuse the thing subsector
might speed things up quite a bit actually
test: cause idk if it is actually compeltely netsafe
2024-12-04 14:39:57 +01:00
Alug 76bb99422a why does this need a variable?
it just gets assigned kartstuff[k_aizdriftstrat] anyways?
2024-12-04 14:22:14 +01:00
Alug b3e3947fc0 clean up this mess 2024-12-04 14:20:49 +01:00
Alug 3ed1e5b8b0 make those const 2024-12-04 14:20:15 +01:00
Alug 6783ef7ff7 only ever call pointtoangle for sprites that really need it 2024-12-04 01:39:04 +01:00
Alug 199fc184b7 change this a little 2024-12-03 21:47:59 +01:00
Alug 4db0b89e92 1463 lmao change this to be readable
also raise to 40 secs
2024-12-03 21:42:43 +01:00
Alug 103bb7e58d try to make demo data handling a bit safer
- Use Z_Malloc to allocate demobuffer
- Use Z_Free to free demobuffer
- Make functions for freeing and resseting demobuffer
- Always reset demobuffer when not saving
2024-12-03 21:42:36 +01:00
indev 4a9b206d01 Add MENUCAPS to some menu options 2024-12-03 21:32:45 +01:00
Alug 3cd66e75e7 this may be used unitialised lul 2024-12-03 19:55:51 +01:00
Alug e9c43843b3 better fix for unclosable addon warning screen
old one was hacky asf
2024-12-02 19:35:01 +01:00
Alug 577c6f194f better fix for netgame join hoop crash
this actually works and makes em animate
also this IS SAFER since before the hoop stuff got really badly mangled
2024-12-01 22:04:32 +01:00
Alug 8b7c171a67 better fix for G_FixCamera
completely forgor in kart and srb2.1 cmd.angleturn needs to be bitshifted to accomidate localangle
using it again is better, since player mobj angle is not always suitable for localangle and may slightly mismatch where a player is steering
2024-12-01 10:28:58 +01:00
Alug 77b37d6579 seems like player not always have mobjs
titledemo moment
2024-12-01 10:18:10 +01:00
Alug 5ffdadfc41 this only ever applies to ogl
no need in software lol
2024-11-30 23:39:10 +01:00
Alug d9648a4b41 oop 2024-11-30 23:19:11 +01:00
Alug ba059ec1a6 give those better names 2024-11-30 23:17:02 +01:00
Alug 3790782ec7 save one R_PointToAngle call
very smol optimisation lul
2024-11-30 22:31:36 +01:00
Alug f0b7899cf6 missed this 2024-11-30 22:04:47 +01:00
Alug af9ba7ef41 oops this gets directly called in one instance
also why do we keep checking for null mobj when P_MobjWasRemoved checks that anyways?
2024-11-30 21:59:47 +01:00
Alug 840aff38f2 smol cleanup 2024-11-30 21:54:37 +01:00
Alug 7ebbc35f52 whoops 2024-11-30 21:46:56 +01:00
Alug c3e2a71724 sloperoll already has "off" setting, delet spriteroll cvar since redundant 2024-11-30 21:46:41 +01:00
Alug 69e5b7c199 this is null anyways if disabled 2024-11-30 21:44:23 +01:00
Alug 5e46b9de60 forgor sliptide roll 2024-11-30 20:28:19 +01:00
Alug ed67c8fd56 okay? shut up compiler 2024-11-30 20:09:04 +01:00
Alug e36302ea57 optimize sprite rotation / sprite drawing a bit
- make software and ogl use same variable names
- let papersprites also roll in ogl not just software
- throw pitchnroll calc into a function to reduce code dupe
- save some calcs when having sliptide roll disabled
- fix software not calculating camang when just player roll is enabled (did that ever work right before? oops)
- determine early if the sprite is supposed to rotate, and only if it really does, run the rotation stuff
2024-11-30 20:04:58 +01:00
Alug f28355bd82 delete A_RollAngle things
they cant be used, since theyre not synchsafe
and nothing uses those anyways
2024-11-30 19:45:19 +01:00
Alug 5f76010bdc allow demo play commands while watching a demo again 2024-11-29 23:25:50 +01:00
Alug 14a1d7782c loading not sending
just to clarify
2024-11-29 22:23:58 +01:00
Alug 275403d9fc this is also redundant 2024-11-29 13:15:46 +01:00
Alug ea787467ed use continue instead of huge if block 2024-11-29 12:14:15 +01:00
Alug d0738121be dont think we need to reset anything here
kick cmd gets send out which should clear stuff in theory
2024-11-29 10:39:57 +01:00
Alug 1c4817cb08 Fix buffer overrun with players with no associated node
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/810/diffs?commit_id=af9164f336a65634f6908e677b47773d88f583af
2024-11-29 10:14:34 +01:00
Alug aeb31aaabf those are redundant 2024-11-29 10:07:20 +01:00
Alug 6dc304d445 why? 2024-11-29 09:51:58 +01:00
indev 7961428b7c Simplify consistency check a bit 2024-11-29 09:36:21 +01:00
indev 61229fdaa4 Only check nodes that are in game in SV_ResendingSavegameToAnyone 2024-11-29 09:36:19 +01:00
Alug ed8b4c4b6e those dont need to be inlined tbh 2024-11-29 09:36:05 +01:00
Alug ba1b4e868c remove dupes 2024-11-28 08:09:36 +01:00
Alug eda3820e66 eh this looks better 2024-11-28 08:01:24 +01:00
indev dc1dd3e04e Use textinput_t for addon search 2024-11-27 22:56:25 +01:00
Alug bb6632831c forgor 2024-11-27 22:42:06 +01:00
Alug d996bc7793 only apply palrender postprocess shader once 2024-11-27 22:40:20 +01:00
Alug ea0babc5c0 dont draw final screen texture twice if you use native res
no need to
saves some performance
2024-11-27 22:35:49 +01:00
Alug 702dd09d3f Revert "fix ogl screenshots"
This reverts commit 56cd789eea.
2024-11-27 22:35:29 +01:00
Alug 56cd789eea fix ogl screenshots 2024-11-27 17:12:57 +01:00
Alug d8e6e17ee5 make own screentex for vhs effect
idk if its really needed tbh, but also doesent hurt
2024-11-27 17:03:19 +01:00
Alug 70e66b9fed use macros lol 2024-11-27 16:45:41 +01:00
Alug d81e484aa7 memset screentex 2024-11-27 16:45:19 +01:00
Alug 1feeb18a49 why do replay play commands only have netgame check???????
bad things will happen if theyre played ingame regardless of netgame or not
2024-11-27 00:36:19 +01:00
Alug 5d7d99fa3d Revert "hopefully fix some inconsistencies with directional lighting"
This reverts commit d607d7bd7c.
2024-11-27 00:02:34 +01:00
Alug b5cd4ab8cd test make skyfloors also toggle directional light 2024-11-27 00:02:26 +01:00
Alug d607d7bd7c hopefully fix some inconsistencies with directional lighting 2024-11-26 23:33:56 +01:00
Alug 4d3187cc45 sector may be null 2024-11-26 23:24:15 +01:00
Alug a5a919a29e sprite light oopsie 2024-11-26 23:06:09 +01:00
Alug d0df038ad8 funny debug print 2024-11-26 22:32:16 +01:00
Alug f866b86397 init polyobject thinker->references to 0
otherwise they wont get removed alot of the time
2024-11-26 22:31:58 +01:00
Alug eba4601c73 TEST: only call drawscreenfinaltexture once
speeds up gpu perf quite a bit
2024-11-26 22:31:23 +01:00
Alug 8c3bf47a88 we dont even need to check this
this doesent do anything with papersprites so dont even call it kek
2024-11-26 22:30:29 +01:00
Alug baaae908bb kill spritecliphack shader 2024-11-26 22:27:34 +01:00
Alug d6a2fe0993 init polyobj thinker cachable bool
otherwise shit will die lol
2024-11-26 18:21:10 +01:00
Alug 5ceb4d9be6 try mobjcache with very explicit check
karts thinker handling is so bad it made the cachable boolean return things like -1002438656
2024-11-26 17:20:31 +01:00
Alug 56c91eba23 fix early return in comparePolygons
thx durr very cool!
2024-11-26 15:06:16 +01:00
Alug 2a3dfbde83 check for titlescreen music 2024-11-26 05:33:00 +01:00
Alug caf4fd036e make hud hooks clean up after themselves 2024-11-22 16:04:01 +01:00
Alug 7732dd218f Refactor HUD hooks too 2024-11-22 00:39:53 +01:00
indev a3008b7188 Fix mobj hooks called for mobj type 0 being interpreted as regular hooks 2024-11-21 23:32:28 +01:00
Alug 464141837c forgor to remove those 2024-11-21 22:34:00 +01:00
indev f10bc1838e Players that get 'NO CONTEST' can save replays too now 2024-11-21 20:18:13 +01:00
Alug 3a236ca2ad fix lugstuff crash 2024-11-21 20:00:52 +01:00
Alug 6b7fe5ac25 Fix -Warray-bounds warning in lua_hooklib.c 2024-11-21 19:50:35 +01:00
Alug 73acf71f9c fix pre and post thinkframe perfstats pages 2024-11-21 19:49:42 +01:00
Alug ad36471d97 Fix HurtMsg inflictor mobj type discriminator
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/1903
2024-11-21 19:46:27 +01:00
Alug a40f9171a3 Fix MusicChange hook crashing when called 2024-11-21 19:41:14 +01:00
Alug 80bf58eb00 MORE MACROS 2024-11-21 19:40:36 +01:00
Alug d0874b2d33 Refactor hook ref allocation 2024-11-21 19:39:26 +01:00
Alug 68461d05d2 Automatically count hook values 2024-11-21 19:37:30 +01:00
Alug 0e421f0468 we dont have key event hooks 2024-11-21 19:17:36 +01:00
Alug 7b27bfc907 this is unused for now 2024-11-21 19:17:26 +01:00
Alug a73059a76a change those to fit rest of style 2024-11-21 19:10:49 +01:00
Alug 81b9a1e0a2 make intermissionthinker use LUA_HookVoid
comment out hookbool since unused
2024-11-21 19:03:39 +01:00
indev bacc793bc7 Fix warning regarding MusicChange hook 2024-11-21 21:01:00 +03:00
indev f83079d2fb Add Should- and Player- Spin/Explode/Squish, and ServerJoin hooks into new hook system 2024-11-21 20:59:08 +03:00
Alug a115963ba2 delet serverjoin stuff i forgor and add old should spin stuff 2024-11-21 18:39:28 +01:00
Alug 5e3309c216 serverjoin hook 2024-11-21 18:35:50 +01:00
Alug ca4bb191a4 port srb2 hooklib refactor (WIP)
lol lmao
2024-11-21 18:08:44 +01:00
Alug 799ed82532 try to make shadows not so offset on slopes with rotation enabled
lmaos
2024-11-21 02:11:40 +01:00
Alug 0e55d4018a those should be SHORT i think? 2024-11-21 02:10:57 +01:00
Alug 9fb5cdbe99 last attempt at fixing those things 2024-11-20 23:44:15 +01:00
Alug 1cd3b43646 me dont like huge ass if block use return instead lol 2024-11-20 23:03:26 +01:00
Alug a680bf196d add R_PointInSubsectorFast for non critical gameplay stuff like sounds and camera
and some parts of rendering
2024-11-20 21:11:37 +01:00
Alug 43ae24be29 use it for R_IsPointInSubsector
this is fine since R_IsPointInSubsector is only used for precip spawn unless you disable noclipcam lol
2024-11-20 21:10:46 +01:00
Alug 05b397e8d6 rename to R_PointOnSideFast 2024-11-20 21:10:28 +01:00
Alug 1e5d809740 revert that part 2024-11-20 21:09:30 +01:00
Alug 0764c335b3 Fix integer overflows on very large numbers 2024-11-20 20:36:22 +01:00
Alug 138feecefc oop 2024-11-20 17:32:20 +01:00
Alug 2e53406b07 also pass papersprite to HWR_RotateSpritePolyToAim 2024-11-20 17:31:39 +01:00
Alug bec5bb12c5 ugh logic issue 2024-11-20 17:26:57 +01:00
Alug 469f4bd223 restructure this again and let shadows use shader 2024-11-20 17:23:01 +01:00
Alug 0309477c9d optimize this a bit
no need to constantly recheck this, just pass it around as a bool
also inline dispoffset function since it used to be a nested thing
2024-11-20 17:03:37 +01:00
Alug 622dce1b1a use shader to mitigate sprite clipping unless its shadows and papersprites
also moved stuff into its own function to not make shit look like hell
2024-11-20 16:45:42 +01:00
Alug bce066f3d0 slightly optimize P_CreateBlockMap 2024-11-20 16:07:22 +01:00
Alug a0bc9e119c fix potential overflow in R_ProjectSprite 2024-11-20 15:20:01 +01:00
Alug 5cc5fe9e55 fixed float to integer conversion problems
from dsda doom
should hopefully make this behave the same everywhere
2024-11-19 20:18:16 +01:00
Alug ae7454f2d4 Revert "use memset here too"
This reverts commit 1bff103e53.
2024-11-17 21:45:51 +01:00
Alug afb7ffc6d0 make replay/time attack menu support lowercase if toggled, also levelselect addon names too 2024-11-17 14:41:41 +01:00
Alug 3fc0deb0bc well was worth a try lol 2024-11-17 13:59:38 +01:00
Alug d81f378271 why is that declared here?? 2024-11-17 13:30:20 +01:00
Alug 423797e414 make menucaps stuff global macro and also apply to downloader text 2024-11-17 13:02:57 +01:00
Alug 898c54f6f0 Test: run NetUpdate every frame again
just not in the renderer code lmao
2024-11-15 21:58:33 +01:00
Alug bb94c8f359 try make this look less like crap lol 2024-11-15 21:55:50 +01:00
Alug 76233104d1 try recursion limit for _RenderBSPNode
its 112 seems like the best compromise, hope it doesent break maps i didnt test visually or smth
2024-11-15 18:29:38 +01:00
GenericHeroGuy d5eeb33212 Unify I/O library modifications 2024-11-15 16:14:43 +01:00
Alug 57fd3e5aa5 gu 2024-11-15 16:14:32 +01:00
GenericHeroGuy dc9887e1bf Disable bytecode (1930cc9) 2024-11-15 14:23:27 +01:00
Alug e5b73c45e2 test this again
now that i understand the flags lol
2024-11-15 09:03:59 +01:00
GenericHeroGuy ac6daeef76 Fix building with NOBLUAJIT 2024-11-15 00:26:03 +01:00
GenericHeroGuy eebf21369c Check division/modulo by zero (a74a4eb) 2024-11-15 00:02:05 +01:00
Alug e06bc2a3b3 inline those 2024-11-14 07:37:40 +01:00
Alug f829265f75 psure it should be like this? 2024-11-14 06:24:46 +01:00
Alug b995a764c4 cleanup localcmd stuff 2024-11-14 06:24:27 +01:00
Alug f1c3b49933 use memset here too 2024-11-14 06:23:51 +01:00
Alug fc6428a0f7 use memsets here and clear pingdata too 2024-11-14 06:22:56 +01:00
GenericHeroGuy 52f7da69ad Standard library wipeout (1d1b7ec) 2024-11-13 17:29:01 +01:00
Alug 7af93a3251 Revert "try +="
This reverts commit 60ad8b12cc.
2024-11-12 20:31:51 +01:00
Alug fcb4fbfb44 prevent some palrender startup crashes
thx srb2 apparently this can be null during init so add some extra safety
2024-11-12 16:22:51 +01:00
Alug 60ad8b12cc try += 2024-11-12 15:43:59 +01:00
Alug 4c2443ff69 add some paranthesis here 2024-11-12 15:43:46 +01:00
indev 9a1b334731 Fix game crashing when increasing number of viewpoints more than by one (again) (needs testing that it didn't break anything else) 2024-11-12 02:45:09 +01:00
GenericHeroGuy 07104e60f4 Fix building on Windows (hopefully) 2024-11-12 02:44:22 +01:00
GenericHeroGuy 34fca9f5a4 Two fixes from master 2024-11-11 00:34:34 +01:00
GenericHeroGuy 42d0ec2a49 Disable FFI 2024-11-10 20:00:11 +01:00
Alug 18b0e12840 Merge remote-tracking branch 'ghg/ljtest' into lugstuff 2024-11-10 19:07:21 +01:00
Alug 074e297850 That didn't work in spectator camera, oops 2024-11-10 18:55:05 +01:00
Alug 997727f370 Fix spectating other players setting wrong angle when returning back to local player 2024-11-10 18:54:44 +01:00
Alug d57bca137d dont do this for papersprites
fickle...
2024-11-09 20:22:07 +01:00
Alug f8185069a0 try this lul 2024-11-08 11:34:18 +01:00
Alug 1ddf5cf81e typod -1 lol 2024-11-08 11:17:01 +01:00
Alug d2aa9faa7b a 2024-11-08 05:21:38 +01:00
Alug de5155a3c2 oops i need that 2024-11-07 23:51:45 +01:00
Alug 9338c3bfe3 death 2024-11-07 23:49:37 +01:00
Alug b9cf085411 destruction 2024-11-07 23:48:58 +01:00
Alug e859324b71 forgor ifdef here 2024-11-03 15:34:55 +01:00
Alug f11460c42a try to simplify this alteast a little
shit is awful
2024-11-03 03:38:48 +01:00
Alug fa27a01dc4 missed this 2024-11-03 03:13:07 +01:00
Alug 77da44cb23 add some more checks for this 2024-11-03 02:58:42 +01:00
Alug f8e9c34353 add just a little more extra safety for fbo 2024-11-03 02:43:19 +01:00
Alug 33ad483b0b initialise this to null aswell
just in case
2024-11-02 14:19:46 +01:00
Alug 7c36b670f3 add accurate fps counter crap to menu + rename it to force it back on
since shit more or less was broken in saturn before and always showed the more accurate one, force it again since stuff caused confusion
2024-11-02 12:57:09 +01:00
Alug b57a150033 oops 2024-11-02 01:13:04 +01:00
Alug a804ee0868 use a "-" here for consistancy 2024-11-02 00:50:23 +01:00
Alug 584de3737c respect cv_showdirectorhud 2024-11-02 00:49:23 +01:00
Alug 0d159674fa spec cam disables director, but you can toggle it from speccam
uhhhhhhh
2024-11-02 00:47:50 +01:00
Alug 6c40c0eda0 fix wanted reticle offsets
Zzz...
2024-11-01 20:29:25 +01:00
Alug 8a8324c841 oops broke encore 2024-11-01 20:01:44 +01:00
Alug fff0adff15 use precalced minimap stuff for v.drawOnMinimap 2024-11-01 19:55:12 +01:00
Alug 28bee7e619 fix some issues with cv_minihead and minimap icon drawing 2024-11-01 19:54:36 +01:00
Alug cd7698ffba fix minimap not being initialised
causes issues when you switch to maps that dont have a minimap
2024-11-01 18:29:23 +01:00
Alug 8f508b6cd8 try speed this up slightly 2024-10-31 11:59:12 +01:00
Alug e2c3dbe9ce tab pls 2024-10-31 11:59:02 +01:00
Alug 2299159722 Revert "test refactor batching stuff again"
This reverts commit cc82da4179.
2024-10-31 11:56:10 +01:00
Alug cc82da4179 test refactor batching stuff again 2024-10-31 11:56:02 +01:00
Alug 4f0b5cb0cf Revert "lets test polygon hashing again"
This reverts commit 2de193b68a.
2024-10-31 11:14:23 +01:00
Alug 2de193b68a lets test polygon hashing again
there were some changes today so idk lets see
2024-10-30 21:34:54 +01:00
indev 3080d3dc3e Add shift+insert shortcut for pasting text 2024-10-30 20:26:02 +01:00
indev e17e47b438 Fix mapmusname global in lua being renamed to (*mapmusname) 2024-10-30 19:22:27 +01:00
Alug e08b6af500 remove some unused stuff in portal struct 2024-10-30 13:52:00 +01:00
Alug b8fdb05f35 improve ogl portal clipping 2024-10-30 13:05:20 +01:00
Alug 36b7bc0ed6 just memcpy palette 2024-10-29 09:01:56 +01:00
Alug 79f46931f4 rename stuff to use "GL_" prefix
might get chaotic without a prefix lol
2024-10-29 08:55:30 +01:00
Alug cd78d6f0c7 TEST call all ogl funcs directly 2024-10-29 00:07:40 +01:00
Alug 7393e752ca huge ass ogl api refactor
idk just screwing around

credits lactozilla
https://git.srb2.org/Lactozilla/SRB2/-/commit/8df6702bfc0cf9d7f9cdc2470b939d01ee37d50b
2024-10-28 23:31:02 +01:00
Alug 83de4399fd fix portal culling 2024-10-28 20:24:46 +01:00
Alug 4c815bd3bf throw this into an inline func 2024-10-28 20:11:05 +01:00
Alug 0545bffacf make this look slightly less terrible 2024-10-28 17:30:31 +01:00
Alug c009866158 Revert "dont pass skybox to r_setupframe"
This reverts commit 78c0f64135.
2024-10-28 17:29:01 +01:00
Alug d0ee4d73f9 those do nothing 2024-10-28 16:34:11 +01:00
Alug d97815620f throw those into functions 2024-10-28 07:38:58 +01:00
Alug 588e52a673 gu 2024-10-28 07:38:43 +01:00
Alug b83016f492 dont always call HWR_Startup again 2024-10-28 07:21:03 +01:00
Alug 8a0129df6a no need to update this witouth water ripples 2024-10-28 06:47:56 +01:00
Alug 470f1fbc73 grey out some stuffs in the ogl and advanced video menus 2024-10-28 06:40:07 +01:00
Alug d5b0d77b9f sort those a bit 2024-10-28 06:36:11 +01:00
Alug cf130189a2 those should be disabled 2024-10-28 06:35:08 +01:00
Alug c56b5fc1a6 move CV_PossibleValue_t to their own section like other files 2024-10-28 06:25:36 +01:00
Alug 53e9303321 add "gl" to secbright and lightdither cvars
theyre only used in ogl so follow the naming convention
2024-10-28 05:40:36 +01:00
Alug e6d90a7d0e reorder all of this to be in same order lol 2024-10-28 05:32:21 +01:00
Alug 06b84f3ba3 check if those are already off before trying to turn them off lol 2024-10-28 05:16:10 +01:00
Alug 11d9df3f0b replace last remaining "gr" 2024-10-28 04:29:30 +01:00
Alug 5a19c26500 forgor 2024-10-28 04:29:17 +01:00
Alug 1b293981fa gr -> gl
this has been annoying me since ages lol
2024-10-28 04:15:30 +01:00
Alug a9759f2740 change cvar register order for ogl stuff 2024-10-27 21:08:51 +01:00
Alug a0cefa9dea Revert "idk why this crashes lol"
This reverts commit 879a13d622.
2024-10-27 20:36:36 +01:00
Alug 879a13d622 idk why this crashes lol 2024-10-27 20:17:15 +01:00
Alug 13ccdcfd23 more cleanup 2024-10-27 07:50:34 +01:00
Alug de23737563 make a bunch of hwr stuff static and cleanup 2024-10-27 07:40:15 +01:00
Alug 34d3e5b760 eh dont check for so much 2024-10-27 07:03:42 +01:00
Alug ea2de6b4e2 fr*nch 2024-10-26 23:23:51 +02:00
Alug d2540ba060 this should be portalcullsector lol 2024-10-26 19:44:12 +02:00
Alug b8a30cef57 reduce the scope of this since not needed 2024-10-26 19:43:57 +02:00
Alug ae71aa6511 rename this to avoid confusion 2024-10-26 19:31:06 +02:00
Alug 8a476b9218 just use the same as software lol
i never saw any differernce except in performance for this
also viewsin and viewcos get calced in r_fps so no need to do here again
2024-10-26 19:28:39 +02:00
Alug 14e91dda44 slight cleanup ogl portals again 2024-10-26 19:19:25 +02:00
Alug 271b8f3a2f rename and slight cleanup 2024-10-26 18:27:06 +02:00
Alug 861356870c smth smth shadows a global declaration 2024-10-26 18:11:17 +02:00
Alug 36b42cce02 throw ogl portals into their own files 2024-10-26 18:10:07 +02:00
Alug 461ca659f8 readd mobj null check here 2024-10-26 16:39:39 +02:00
Alug 7e81337298 inline this since its super smol 2024-10-26 16:36:46 +02:00
Alug 80168e59c1 dont think this is needed for noclipcam? 2024-10-26 16:18:42 +02:00
Alug ab7291bd33 move chasecam postimg stuff into own function + add comments for what stuff does lol
shit got me really confused
2024-10-26 16:09:49 +02:00
Alug 040e969799 forgor to remove this 2024-10-26 00:48:32 +02:00
Alug c965c41c3a clean up portals 2024-10-26 00:45:20 +02:00
Alug 1d9138075a Revert "Add visplane portal creation functionality and use it to replace the skybox rendering."
This reverts commit 122bd69069.
2024-10-26 00:30:55 +02:00
Alug 46738de038 Revert "refactor a bunch of crap and fix skyportals"
This reverts commit d4c36c64fc.
2024-10-26 00:30:51 +02:00
indev dc49e1cbaf Fix A_Lua not removing error handler from lua stack 2024-10-25 22:52:24 +02:00
Alug d4c36c64fc refactor a bunch of crap and fix skyportals 2024-10-25 22:52:19 +02:00
Alug 122bd69069 Add visplane portal creation functionality and use it to replace the skybox rendering.
https://git.do.srb2.org/STJr/SRB2/-/commit/264386f84257a47fe5480bb6300df02d039a2491
2024-10-25 21:03:27 +02:00
Alug 27b77c2db4 port srb2 software portal refactor 2024-10-25 20:49:38 +02:00
Alug 6333fc73e9 move the return ealier in V_DoPostProcessor 2024-10-25 20:21:04 +02:00
Alug 63d4ae5206 this is needed for postimg stuff in first person
lol
also adds break in splitscreen lööp
2024-10-25 20:12:06 +02:00
Alug 9fc4f81fef ok those should be fine 2024-10-25 02:49:46 +02:00
Alug 9fa9261580 aaa 2024-10-25 02:46:35 +02:00
Alug 2f98c5457d add a bunch of more flags to hopefully make this netsafe 2024-10-25 02:44:19 +02:00
Alug f7bca6f868 this crashes 2024-10-25 02:43:58 +02:00
Alug 426dd1489a Reapply "optimize z position checking for mobjs without collision and camera"
This reverts commit 0dca45ca6c.
2024-10-25 02:33:08 +02:00
Alug 740eb5d860 also use K_MomentumAngle for speelines make eggmanexplode color them and inline them since this used to be in the function itself 2024-10-25 02:24:58 +02:00
Alug 5100443457 comment it out tho since we use a lua with the same visual effect 2024-10-25 01:47:59 +02:00
Alug b5c284f526 make some stuff also be able to spawn watertrails 2024-10-25 01:38:21 +02:00
Alug 8c0fa813fe use momentumangle stuff like rr for wöter 2024-10-25 00:53:54 +02:00
Alug ab5aa30068 oops forgor lol 2024-10-24 23:05:20 +02:00
Alug 525ab05549 slight cleanup + make static + smol optimize ogl sprite drawers 2024-10-24 23:03:18 +02:00
Alug f7c831f9d1 dont pass skybox to r_setupframe
why was this even done?
neither srb2 nor v2/rr ever did this?
2024-10-24 22:44:10 +02:00
Alug a195f807d0 speed up ogl floor clip fix slightly 2024-10-24 18:43:42 +02:00
Alug dde1229e54 try to speed up texture updating 2024-10-24 18:43:22 +02:00
Alug 88c4517b72 this only needs to be checked when thing->player
aaaa
2024-10-24 02:56:10 +02:00
Alug f47eed9413 try to optimize a few sectorspecial checks 2024-10-24 02:39:40 +02:00
Alug fe35d5ab55 save one calc lol 2024-10-24 02:08:17 +02:00
Alug 0e17013255 just check for noencore bool in hwr_processseg instead of checked line flags everytime 2024-10-23 21:28:08 +02:00
Alug a44e3515a2 why not reuse those? 2024-10-23 20:37:11 +02:00
Alug 001cd91b62 cleanup HWR_ProcessSeg
stuff was quite the mess
2024-10-23 19:51:55 +02:00
Alug f88931445a dont always calc this twice 2024-10-23 19:02:48 +02:00
Alug 947e6f943f no need to check stuff in already postload marked addons 2024-10-23 15:48:34 +02:00
Alug 1cba35d7aa move this into TC_RAINBOW condtion
its only used with TC_RAINBOW anyways
2024-10-23 15:25:55 +02:00
Alug 675e0f8c4f this does nothing 2024-10-23 15:25:07 +02:00
Alug 30e504810b dont play rain sounds when weather is disabled 2024-10-23 13:00:22 +02:00
Alug 185198593d remove debug print 2024-10-23 01:48:57 +02:00
indev 34cdf39c6b Add W_CheckFileContains for W_CheckPostLoadList 2024-10-23 02:45:16 +03:00
Alug 4f8736300a attempt to check for things in file for postload detection 2024-10-23 01:00:31 +02:00
Alug e40e1c42c3 split auto and postload, let autoload run on gamestart again
prep for smth
2024-10-23 00:26:08 +02:00
Alug a04d7c6b23 redo rain sound overflow fix
https://git.do.srb2.org/KartKrew/RingRacers/-/commit/3eac1fed0f44a8285a9f6b82a12e86997bbb0d34
2024-10-22 20:20:30 +02:00
Alug 40b37e9c31 fix sprite scale and offset interpolation for ghost mobjs
and remove sprite roll interp that never worked
2024-10-22 16:06:08 +02:00
Alug c49bb1bbc6 fix ghost interpolation 2024-10-22 02:27:34 +02:00
Alug ff0f0ee347 make those not look terrible thx 2024-10-22 01:15:52 +02:00
Alug e3eb49e4a2 refactor postimg stuff so it can be combined with each other better
thx much indev! <3
everything now works with encore!
software now also supports screen effects in splitscreen!
2024-10-22 01:11:40 +02:00
Alug 42e463e529 actually remove "renderflags" lol 2024-10-21 22:52:59 +02:00
Alug f781532e1b gaah tabs 2024-10-21 22:51:05 +02:00
Alug ba8958b27a remove renderflags
those literally did nothing
2024-10-21 22:46:51 +02:00
Alug d082bfd8ec fix R_ThingVisible
those are "eflags" in kart smh
2024-10-21 22:38:45 +02:00
Alug 3216b2515d maybe fix mobj interp spawn bugs?
idk maybe has some odd side effects?
2024-10-21 22:22:38 +02:00
Alug 078f198d81 add proper null check here too 2024-10-21 21:28:01 +02:00
Alug 6162d285c9 dont use cv_sloperolldist in splitscreen + save some assignments and one fixedhypot call
also use tabs lul
2024-10-21 21:05:05 +02:00
Alug 56b1ead206 tab pls 2024-10-21 18:43:01 +02:00
Alug 5f11d93d42 make this less terrible lmao 2024-10-21 18:41:27 +02:00
Alug 78a62ba84a use highly optmized (but slightly inaccurate) version of R_PointOnSide for rendering 2024-10-21 18:17:47 +02:00
Alug ad5f288374 Clarify we're calculating a cross product 2024-10-21 18:10:18 +02:00
indev 2aa6f1b8f5 Fix off-by-one error for using '?' as map name 2024-10-21 17:41:06 +02:00
indev 25a5ac2a2d Fix off-by-one error in lib_setSfxInfo 2024-10-21 17:39:42 +02:00
Alug 8a9f44ebaf also check here ig? 2024-10-21 17:01:20 +02:00
Alug e6b77081f7 prevent map command crash from maps with invalid or non existing mapinfo 2024-10-21 15:37:34 +02:00
Alug 9808d123cd replace those two P_MobjWasRemoved with simple null check insteead
since those may actually segfault if null anyways
2024-10-21 06:23:05 +02:00
Alug 4213bffab0 trailing space hell 2024-10-21 06:11:18 +02:00
Alug 516f0c700f remove more P_MobjWasRemoved checks
same as before, those may be not synchsafe
2024-10-21 06:03:47 +02:00
Alug b03939d753 revert some P_MobjWasRemoved checks i forgor about
those may NOT be vanilla netsafe
2024-10-21 05:55:44 +02:00
Alug 0786e3dcf2 lugstuff change 2024-10-20 20:30:38 +02:00
Alug fe4397d746 bruh 2024-10-20 19:53:56 +02:00
Alug b4c52190e2 rotsprite stuff also should be SHORT 2024-10-20 19:11:46 +02:00
Alug 723491fd86 try to take some registers for span drawers too 2024-10-20 15:59:31 +02:00
Alug a1b087938e remove this again 2024-10-20 15:21:58 +02:00
Alug c13cb0b8d9 Reapply "optimize R_PointOnSegSide"
This reverts commit 5b3daac4c8.
2024-10-20 04:15:28 +02:00
Alug c1703de590 terrible brightmap substitute 2024-10-20 04:15:25 +02:00
Alug e08f03cf57 HWR_RenderPlane can be static 2024-10-20 04:14:54 +02:00
Alug 5b3daac4c8 Revert "optimize R_PointOnSegSide"
This reverts commit c1ce93b6b0.
2024-10-20 02:17:35 +02:00
Alug c1ce93b6b0 optimize R_PointOnSegSide
its only used for 2 rendering functions, so being potentially inaccurate is not that dangerous and the speedup in some instances might be worth the tradeoff
2024-10-20 02:02:22 +02:00
Alug 5da1e8bb80 fix some rendering issues and crashes in software renderer
- Increase MINZ from 4 fracunits to 16
- R_StoreWallRange: do not render textures with holes
- fix off-by-one error in R_ProjectSprite
- Avoid rendering unused left/right edges of screen while rolling
- Clamp patch column post drawing bounds
- Vissprites: set dc.texheight
- Add null check for column in R_DrawMaskedColumn
2024-10-20 02:01:02 +02:00
Alug 48a62eeee4 fix a maybe-uninitialized warning 2024-10-20 00:21:48 +02:00
Alug f9788a21f6 fix lightnum calc 2024-10-20 00:18:31 +02:00
Alug db425035a4 dont need to always check this 16 times if we already know theres more than one player ingame 2024-10-19 21:14:45 +02:00
Alug ed7aa81527 dont show encore toggle text in record attack menu
dont think you can even record attack in encore hmm
2024-10-18 20:34:00 +02:00
Alug 8108dec7e3 just remove version string at this point lol 2024-10-18 20:23:06 +02:00
Alug f9363e71d9 dont run director if theres only one player ingame
idk if this is good lol
2024-10-17 22:54:44 +02:00
Alug 98a7e35c55 forgor joyscale 2024-10-16 13:21:47 +02:00
Alug c998bd9c05 huge cleanup controller code
hope i didnt break anything here lel
2024-10-16 13:14:07 +02:00
Alug 7194f44eca those can be registered in lööp 2024-10-16 12:57:27 +02:00
Alug 4654070f9a clean up cvar register a bit 2024-10-16 11:22:08 +02:00
Alug 16db0ba290 do this instead 2024-10-16 00:19:18 +02:00
Alug 58bf1572de Revert "optimize R_PointOnSegSide"
This reverts commit 068afd7eb4.
2024-10-15 23:52:17 +02:00
Alug 4af35d623c attempt to optimize some p_maputl stuff 2024-10-15 23:31:46 +02:00
Alug 3bbafe8fc1 god pls just work 2024-10-14 19:20:19 +02:00
Alug 068afd7eb4 optimize R_PointOnSegSide 2024-10-14 13:15:56 +02:00
Alug f98209a32e remove this print 2024-10-14 13:15:33 +02:00
Alug d62a654a2d forgor about shadows lol 2024-10-13 23:36:21 +02:00
Alug 509341569e whoops forgor 2024-10-13 23:25:17 +02:00
Alug 20b82c1f2a lol 2024-10-13 23:13:14 +02:00
Alug 54170bece7 only do this in software renderer
doesent work even with pal rendering in ogl
2024-10-13 23:07:44 +02:00
Alug 0a7578472e move this 2024-10-13 22:54:20 +02:00
Alug 65cf58dfab remove unused/nonunsable analog cvars 2024-10-13 22:39:26 +02:00
Alug d95828451e fix cam stuff for good + huge cleanup 2024-10-13 22:20:56 +02:00
Alug e21182ccfc fix the cam loops 2024-10-13 21:47:56 +02:00
Alug ba818244df use arrays for all the cam cvars 2024-10-13 19:01:30 +02:00
indev c667fedc1a Fix error handler staying on lua stack after lua commands being called 2024-10-13 14:45:01 +02:00
indev a7d6c0994f Fix game crashing when using P_DoPlayerExit on player without mobj 2024-10-13 14:44:58 +02:00
Alug d601975597 this should be SHORT 2024-10-13 02:58:46 +02:00
Alug 21b57c1009 this uhhh actually makes things crash lol 2024-10-13 02:46:04 +02:00
Alug 16800a2730 fix ogl shearing
no clue wtf kart was doing here lmao
2024-10-13 02:28:07 +02:00
Alug 36448930d6 dont need this splitscreen check 2024-10-13 02:01:02 +02:00
Alug 740c39c3c4 attempt to clean up cam shit even more 2024-10-13 01:55:52 +02:00
Alug 397efe5479 only interp cam during pause for replay freecam to not jitter during pause 2024-10-13 01:11:48 +02:00
Alug f6c9b22adc ignore keepmusic when called from P_RestoreMusic
most of the sound handling just calls this and this may just stop the music entirely on some occasions so just ignore keepmusic for that
2024-10-13 00:40:37 +02:00
Alug ffa053c695 print saturnpak print into debfile instead of console 2024-10-13 00:11:34 +02:00
Alug 5c4fee6cdf Refactor TTY input handling
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2451#b2f76b3273f1780347c35ec752bcde560c5f73a5
2024-10-12 23:26:07 +02:00
Alug 38335e857a fix tty converting everything to lowercase 2024-10-12 23:21:05 +02:00
Alug 9f16fa3e17 Fix insane TTY input latency
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2360
2024-10-12 23:10:01 +02:00
indev d0ad91f277 If corrupted save received, leave netgame 2024-10-12 22:05:25 +02:00
Alug e1d98ea45c Add few checks to prevent game crashing if netgame archive becomes corrupted
https://github.com/alufolie91/saturn-32p/commit/1e47728ea8c60a1f04130170ddfab9b02e1a7e4c#diff-0c6396d5a9ad45f461741cd44ffb2c0d3cf0eb2ec7b0500053005196fe53f1a6R1517
2024-10-12 22:04:50 +02:00
Alug cedab33c13 Attempt to fix a lua panic when unarchiveing extvars (print error to console instead. Not sure if it would be safe for game to read from save afterwards though)
https://github.com/alufolie91/saturn-32p/commit/a770ecdbd4afd56a9d8325eae47f0c69f71661ee#diff-0c6396d5a9ad45f461741cd44ffb2c0d3cf0eb2ec7b0500053005196fe53f1a6R1462
2024-10-12 21:56:08 +02:00
Alug 212667a34f oops 2024-10-12 21:29:39 +02:00
Alug cf5ee4cf27 make s_sound a little prettier 2024-10-12 21:24:37 +02:00
Alug 6953e494cb fix some warnings when compiling with older sdl version 2024-10-12 21:23:58 +02:00
Alug daad7627b8 save 1 G_BuildMapTitle call kek 2024-10-12 20:19:44 +02:00
Alug 0bfed31cae clean bird music stuff again
we dont need to return everywhere but instead stuff can be mostly just set to 0
this also somewhat ensures stuff works after toggling without having to restart the game or map
2024-10-12 19:54:56 +02:00
Alug 9660128123 always assign stutter_threshold 2024-10-12 19:44:15 +02:00
Alug c927d333bd readd music_resync_powerups_only 2024-10-12 19:39:52 +02:00
Alug 75637e361c shut up mingw 2024-10-11 21:12:52 +02:00
Alug cbcfe9d3e9 fix spec cam bug + more cleanup 2024-10-11 21:00:05 +02:00
Alug 7ea07ec3b0 Start bustable FOF sounds at the correct height 2024-10-10 14:40:14 +02:00
Alug df842b981c remove broken and unused netcode stuff
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2523
2024-10-10 05:18:07 +02:00
Alug c98781403d Revert "rendertimefrac_unpaused should be fracunit on netlag"
This reverts commit 6722b43244.
2024-10-09 15:32:51 +02:00
Alug 651e5a4924 proper inline this 2024-10-08 04:17:58 +02:00
Alug 9eec9f7e52 fix some inline stuff 2024-10-07 23:05:01 +02:00
Alug 41244ae522 proper inline P_MobjWasRemoved 2024-10-07 23:01:17 +02:00
Alug f1d0e2834e proper inline M_Memcpy 2024-10-07 23:01:03 +02:00
Alug 7f98bac3ae properly inline those 2024-10-07 22:57:24 +02:00
Alug 9d8fcfeeb6 smol fix 2024-10-07 21:32:25 +02:00
Alug 28847e4adf test smol optimization P_CheckPosition 2024-10-07 20:40:41 +02:00
Alug ee2d078957 keep debug print for now 2024-10-07 13:00:50 +02:00
Alug e51bb250e2 add some brackets lul 2024-10-07 13:00:18 +02:00
Alug e93ea48b96 comment this out for now so v7 clients dont use vanilla resynch system
keep sending PT_WILLRESENDGAMESTATE packets to everyone for now
saturnpak will still mark the right clients so they will use the right consistency check without having to desynch first
2024-10-07 13:00:08 +02:00
Alug 5efe6364ca add debfile prints whenever gamestate counter changes 2024-10-07 12:59:59 +02:00
Alug c6574ee800 make the debug print a little better 2024-10-07 12:59:54 +02:00
Alug df8c39425a use saturn packet to determine if client can receive gamestate
before the server always assumed every client cant receive the gamestate using the vanilla consistency check for everyone.
aswell as before the first resynch it tried to send the gamestate resend packets to everyone
2024-10-07 12:59:51 +02:00
Alug 0e49632006 make this less ugly 2024-10-07 12:53:25 +02:00
Alug 9c60a9298d false 2024-10-07 12:48:29 +02:00
Alug a4792f3058 add crap to menu 2024-10-07 12:45:09 +02:00
Alug 05b65dd7f6 psure this can just be SINT8 2024-10-06 19:04:28 +02:00
Alug 9657dc0f1b prevent this from become super large somehow lol
just like cap it at 19 it works just fine
2024-10-06 18:44:14 +02:00
Alug d5ff7f1274 this doesent make much sense tbh 2024-10-06 18:35:26 +02:00
Alug 5b59e9e740 this shouldnt be here lol 2024-10-06 18:33:25 +02:00
Alug 567b61133e shouldnt that be a bool? 2024-10-06 18:31:40 +02:00
Alug 3427fc3275 rendertimefrac_unpaused should be fracunit on netlag
makes this a little more sane tbh
2024-10-06 18:31:09 +02:00
Alug f3b96b5050 dont think this needs to be reset every frame 2024-10-06 18:28:00 +02:00
Alug 3a3eb2790d fix this 2024-10-06 14:52:35 +02:00
Alug d5225537c4 only do this in replays
otherwise shit will jitter during netlag
2024-10-06 14:30:21 +02:00
Alug fac56d9469 fix main menu interpolation
apparently in main menu, opening the menu pauses the game so rendertimefrac was FRACUNIT and didnt interpolate
2024-10-06 13:32:46 +02:00
Alug cc73aa18c6 Interpolate view, even when paused
https://github.com/KartKrewDev/RingRacers/commit/3320faec8cebecb124882d38c7ec0ad37b79340a#diff-607b68058edc6124b3061267d902aabeddb6ba338c6483df0af8b1a7cf796a01R43
2024-10-06 13:12:27 +02:00
Alug ba2127b00e fix a interp bug where the jitter on tally increase would be for only one rendered frame, not one full tic. 2024-10-06 13:04:43 +02:00
Alug 4e966aa44a HACK: reset interp values in case 412 teleporter without using P_Setorigin
since that function does some wonky stuff and idk if that would be synch safe
2024-10-06 13:00:07 +02:00
Alug 23fe7755f8 add missing break 2024-10-06 12:56:19 +02:00
Alug f81d33acdf more R_ResetViewInterpolation stuff 2024-10-06 12:53:24 +02:00
Alug 305037cae2 R_ResetViewInterpolation: wait an extra tic if R_UpdateViewInterpolation has not run yet, do not add extra time for subsequent calls 2024-10-06 12:49:29 +02:00
Alug 2909b68872 smol fix 2024-10-05 08:35:35 +02:00
Alug bf9cd35e5c throw this into own function too 2024-10-05 08:29:40 +02:00
Alug 30b7fc2f2b make function for quakes, scale with mobjscale 2024-10-05 08:26:06 +02:00
Alug 4213e6a965 this needs gamestate check
sometimes the title music kept playing
2024-10-05 06:56:21 +02:00
Alug b868ff35c2 attempt to cleanup R_SetupFrame 2024-10-05 06:09:48 +02:00
Alug ccb116e910 P_Ticker: update view interpolation at the start of a tic 2024-10-05 06:08:23 +02:00
Alug 0412e8fd8e add G_FixCamera 2024-10-05 06:04:12 +02:00
Alug 3f68006e3c set timeinmap for demo rewind
idk maybe this helps with that feature desynching all the time lol
2024-10-05 05:41:30 +02:00
Alug 4ed7a63806 Do not set hu_stopped on interpolated frame 2024-10-05 05:25:25 +02:00
Alug 4d56c1559f add comment to try and explain this crap 2024-10-03 18:15:12 +02:00
Alug ae99bcfca2 make this more readable 2024-10-02 20:32:26 +02:00
Alug 8f8ec6ef5d smol dupe 2024-10-02 14:39:57 +02:00
Alug 05faa2cbf8 prevent this from overflowing
ye well idk anymore.
2024-10-02 14:20:29 +02:00
Alug 56b942289f fhsfghs 2024-10-02 14:16:43 +02:00
Alug b095ac7620 gu 2024-10-02 14:16:37 +02:00
Alug bc7520f45a ok we need a bunch of this 2024-10-02 14:16:08 +02:00
Alug 82f9de3114 Reapply "Only reseek if we have to"
This reverts commit cbc39ba4f9.
2024-10-02 13:57:52 +02:00
Alug a5de6eccd5 Reapply "New system to prevent multiple fopen"
This reverts commit 0bdf1ca87a.
2024-10-02 13:57:42 +02:00
Alug 7c645c1623 why? 2024-10-02 13:50:06 +02:00
Alug 540d99924e why did we calc all of this in ogl? 2024-10-02 13:34:41 +02:00
Alug 68681a34f2 conflict stuff 2024-10-02 12:43:28 +02:00
Alug d56df7e0fc dont leak pls 2024-10-02 12:42:16 +02:00
Alug eb4eef5260 fix G_BuildMapTitle leaks 2024-10-02 12:42:10 +02:00
Alug 7b62c14a8e Revert "add global maptitle string calced at mapload"
This reverts commit 401597d309.
2024-10-02 12:42:04 +02:00
Alug 0ecc23e52d Revert "init with NULL lol"
This reverts commit 06bcd3ffca.
2024-10-02 12:41:36 +02:00
Alug fdefb1829b Revert "pre alloc MapName on mapload and unarchive"
This reverts commit 1b027e169a.
2024-10-02 12:41:34 +02:00
Alug b775095b67 fix up old fps counter 2024-10-02 12:14:31 +02:00
indev b87074c5f6 Fix selection in replay save prompt 2024-10-02 11:41:53 +02:00
Alug 2be07aee63 a 2024-10-02 11:41:49 +02:00
Alug c45a792ef9 Use textinput_t for replay save prompt too 2024-10-02 11:41:03 +02:00
Alug 1b027e169a pre alloc MapName on mapload and unarchive 2024-10-01 17:45:18 +02:00
Alug 06bcd3ffca init with NULL lol 2024-10-01 16:38:48 +02:00
Alug 401597d309 add global maptitle string calced at mapload 2024-10-01 16:35:10 +02:00
Alug e3773172f3 lol 2024-10-01 16:03:48 +02:00
indev bc37b4c817 Remove debug print 2024-10-01 16:02:52 +02:00
indev df031d1b88 Fix (hopefully) all other menu types that use IT_CV_STRING 2024-10-01 16:02:46 +02:00
Alug 1dc83a0c3c dumb special case for wandering balls Zzz... 2024-10-01 16:02:39 +02:00
indev 1883178c55 Fix IT_CV_STRING crashing game in M_DrawGenericMenu 2024-10-01 15:46:15 +02:00
Alug e0a74be510 fix some stuff 2024-10-01 15:46:09 +02:00
Alug 2725e590ea add "map ?" shortcut for random map 2024-10-01 14:49:37 +02:00
Alug 30aa9b2bc1 use stricmp for this 2024-10-01 14:42:20 +02:00
Alug fe591b6620 cv_showdirectorhud didnt save Zzz... 2024-09-30 23:00:25 +02:00
Alug 6d8ed5897f more 2024-09-30 16:33:29 +02:00
Alug ece9eb3504 cleanup + comments 2024-09-30 16:32:03 +02:00
Alug c6de3040fb work around encore music again
S_InitMapMusic would play before the level actually started thus playing a smol bit of non encore music in encore
2024-09-30 16:27:56 +02:00
Alug 5f1dfecd18 fix encore music again lol 2024-09-30 16:19:54 +02:00
Alug 76d22deddd Use m_textinput for chat too 2024-09-30 15:43:22 +02:00
indev b92fddeabc Use same keyboardlayout code as in chat for textinput, also add a null terminator after ctrl-v just in case string is not always zeroed out already 2024-09-30 15:42:59 +02:00
Alug 2dddc81713 Put all text input logic into separate file and use it for all text input fields 2024-09-30 15:42:55 +02:00
Alug 0fb2992b49 dev print for weather stuff 2024-09-30 15:42:22 +02:00
Alug 8464554a71 work around custom vote theme music + rename a bunch of stuff
please help me
2024-09-30 15:41:19 +02:00
Alug 4034a8227f encoremusic... 2024-09-30 13:05:44 +02:00
Alug ff9d2b0cdc fix up everything and make stuff work
i hope lmao
2024-09-30 12:50:49 +02:00
Alug 95cdc2c5a6 change how keepmusic works
compare map and encore instead of the music itself
2024-09-30 11:45:33 +02:00
Alug f8083e10eb forgor about encore music 2024-09-30 06:38:29 +02:00
Alug 8c6322c04d update comments a little 2024-09-30 06:31:43 +02:00
Alug ef58f61d8e add some basics of what i wanna have for music stuff
- basic keepmusic implementation (currently checks for if the song changes instead of the map, idk if i keep this, since this allows certain maps to change the music on start, ex abstract avenue or wandering balls)
- Toggle to ignore any kind of music change during the level (includes intermission music, depends on how custom intermission music works)
-toggle to start map music instantly on levelload and skip the intro fanfare (also skips any linedef executed sound so some map intros dont interfere with this)
2024-09-30 06:28:02 +02:00
Alug fae42eecbc make a function for the music level start stuff 2024-09-30 05:17:44 +02:00
Alug a81ea3c2cc let SOC also use PRECIP_BLANK/ weather = 4
no idea why it couldnt doesent make any sense
2024-09-29 22:26:49 +02:00
Alug 661984b620 no need to even traverse part of the blockmap when PRECIP_STORM_NORAIN and PRECIP_BLANK 2024-09-29 21:51:31 +02:00
Alug f6b571e022 move this stuff
so dont need check for renderisnewtic multiple  times and dont need to check for menu and dpad stuff every single frame
2024-09-29 15:14:43 +02:00
Alug 1ca2a8865f stop dying pls 2024-09-28 22:16:49 +02:00
Alug a55dacdcc6 remove code dupe and let S_LoadMusicDefs also load MUSCINFO def 2024-09-28 17:03:09 +02:00
Alug d20ebed618 make a funky macro 2024-09-28 15:04:12 +02:00
Alug 5fdc20f997 refactor musicdef stuff
well it fixed the hash find lmao
2024-09-28 03:20:57 +02:00
Alug 968445c12c oops 2024-09-28 03:20:37 +02:00
Alug 45965414b1 Remove p_sight assert 2024-09-28 01:49:21 +02:00
Alug f92034225d super smol optimization to S_FindMusicCredit 2024-09-28 01:47:18 +02:00
Alug 6949efbb7e reset rumble on some conditions 2024-09-28 01:37:54 +02:00
Alug 6e085e302d Replace portalline boolean with g_portal pointer to current portal Beta 2024-09-28 01:30:14 +02:00
Alug 642b196130 do this by default for me 2024-09-28 01:01:33 +02:00
Alug c84ad4aabb smol director stuffs 2024-09-28 00:12:57 +02:00
Alug 93bb7273c2 this needs no dedi check actually 2024-09-27 23:45:52 +02:00
Alug dfca69d59c kill lua_step 2024-09-27 23:41:49 +02:00
Alug 9655c33f48 set those in P_SpawnGhostMobj too 2024-09-27 22:46:54 +02:00
Alug 0c408d09fd let player pointer be const in P_IsLocalPlayer and P_IsDisplayPlayer 2024-09-27 22:40:38 +02:00
Alug 5f6b9ff87c forgor remove this 2024-09-27 22:40:08 +02:00
Alug 1da7a2d401 consolidate this 2024-09-27 22:36:48 +02:00
Alug a3c9812f67 this does nothing 2024-09-27 22:28:57 +02:00
Alug 03fd761179 z 2024-09-27 20:18:36 +02:00
Alug 89a64267fa R_DrawMaskedColumn: do not draw zero length column 2024-09-27 20:18:21 +02:00
Alug 4c25b7c26a Use PU_LEVEL for texture caching 2024-09-27 20:16:46 +02:00
Alug 97c8d06e33 Software: krangle directional lighting in 3P/4P splitscreen 2024-09-27 19:20:57 +02:00
Alug 9747d0bb20 those should be size_t 2024-09-27 18:52:53 +02:00
Alug 3fe3f512e3 update lzf compression to 1.6 2024-09-27 18:21:17 +02:00
Alug b4d4377938 fix encore minimap 2024-09-27 15:04:01 +02:00
Alug f5bf80cc63 use qs22j here again
it is really faster
thought it wasnt in this case
2024-09-27 05:19:52 +02:00
Alug 3e9f9129d8 cleanup + reformatting 2024-09-27 05:00:01 +02:00
Alug 34dd04b9ef forgor this 2024-09-27 04:26:43 +02:00
Alug d286bb43dd reformat this 2024-09-27 04:24:45 +02:00
Alug cab06f92d6 ; 2024-09-26 18:18:34 +02:00
Alug 4297c1b80d gamestate resend counter was never proper reset for nodes
means it would carry over to the next person occupieing that node and made them have less chances to get the gamestate resent
2024-09-25 19:31:18 +02:00
Alug bb6df8b4b8 those can be static 2024-09-24 22:23:23 +02:00
Alug 577380da3b add toggle for water ripples Zzz... 2024-09-24 22:18:17 +02:00
Alug 2f843feabf Kick clients that fail to catch up with server gamelogic
version from rr to accomidate kart netcode a bit better
2024-09-24 19:10:13 +02:00
Alug 9440aa62ff only allow director toggling with button when you spec someone 2024-09-24 16:57:20 +02:00
indev 0daf5e0da9 Expose demo.freecam as replayfreecam 2024-09-24 15:25:41 +02:00
Alug 64c4ad4852 make director text disappear after 13 seconds, and in replays after 4 2024-09-24 15:25:36 +02:00
Alug cf68f56497 dont show director text when in replay freecam 2024-09-24 15:02:32 +02:00
Alug 405ac6f85b hide viewpoint text when in replay freecam 2024-09-24 15:01:02 +02:00
Alug 72768e7d60 dont show driftgauge when in replay freecam 2024-09-24 15:00:45 +02:00
Alug cd3bd8713a dont run director when you use spectator freecam 2024-09-24 14:51:18 +02:00
Alug 399dbcaee9 Revert "dont read map marker files just skip em instead"
This reverts commit 2c0129be47.
2024-09-23 23:21:33 +02:00
indev 3f2889a644 Skip map marker in vres_GetMap 2024-09-23 23:15:07 +02:00
indev 533d2429b3 Add showdownloadprompt cvar, so addon download prompt can be disabled 2024-09-23 23:09:29 +02:00
Alug 2c0129be47 dont read map marker files just skip em instead
thx indev <3
2024-09-23 20:38:52 +02:00
Alug cb0da0d737 check vres data before freeing it 2024-09-23 20:36:56 +02:00
Alug ce9ab6e6c6 forgor some casting 2024-09-23 18:40:24 +02:00
Alug 373adf473a revert this 2024-09-23 01:39:21 +02:00
Alug 1cc461cc60 dont actually call Nullprecipthinker 2024-09-23 01:02:31 +02:00
Alug 89a4a19eed read precip row in perfstats 2 2024-09-23 01:02:14 +02:00
Alug 5ee5eac998 dont count precip towards thinkers in perfstats 2024-09-23 01:02:04 +02:00
Alug 999e5618d7 fix precip performance issuess on certain maps 2024-09-23 01:00:47 +02:00
Alug 056f7a32e8 lets not archive players as mobjs 2024-09-22 23:08:24 +02:00
Alug d1a3549ebc dont check consistency/attempt to resend the gamestate while a client is currently getting the save resend
perhaps that makes mass synchs less bad
2024-09-22 22:16:11 +02:00
Alug 8c58359aac Zzz... 2024-09-22 22:11:17 +02:00
Alug 0dca45ca6c Revert "optimize z position checking for mobjs without collision and camera"
This reverts commit c11d925580.
2024-09-22 17:51:56 +02:00
Alug 11039a4ce6 try to prevent unknown packet type spam when client attempt to connect while levelloading 2024-09-22 16:51:05 +02:00
Alug e16bc759b0 extra check 2024-09-22 16:46:08 +02:00
Alug c745a534de clean up leveload a bit 2024-09-22 16:46:01 +02:00
Alug ed24674b0c Load palette before map data 2024-09-22 16:25:16 +02:00
Alug 91f8705844 cleanup r_draw8 2024-09-22 16:01:23 +02:00
Alug e24fe7a239 update copyright am_map 2024-09-21 20:26:20 +02:00
Alug 970f948844 precalc automap and minimap stuff on mapload instead of every frame 2024-09-21 20:13:53 +02:00
Alug 85c5851539 stuff for potential fixup? 2024-09-21 19:43:22 +02:00
Alug 52c35ea0c5 attempt to fix automap + add minimap generator command "minigen" 2024-09-21 19:28:22 +02:00
Alug 14cc43dd6a beta hud driftgauge
eh needs some stuff for menu still
also should replace driftgauge gfx sometime
2024-09-20 20:31:45 +02:00
Alug 699da62ab1 move this 2024-09-19 12:41:32 +02:00
Alug 4be125d3da always reset cam subsector regardless of splitscreen 2024-09-18 12:11:04 +02:00
Alug 23631e4a0f decrease this a tiny bit 2024-09-17 19:52:20 +02:00
Alug 49c0e04f13 this is the correct value 2024-09-17 19:47:24 +02:00
Alug 16709f5f8e make ticcmds on gamestateresend
resynch will still stop making em
should hopefully fix some weird issues where you might end up somewhere weird if the resend takes a little longer
2024-09-17 16:47:24 +02:00
Alug b4ccca9892 properly reset all splitscreen cameras on resynch
also fix some casting
2024-09-17 16:46:21 +02:00
Alug 4e9086b369 Revert "dont run playerjoin hook on resynch"
This reverts commit 5f7bf4164d.
2024-09-17 16:43:05 +02:00
indev 8114e25056 Ignore case here 2024-09-17 16:42:37 +02:00
indev 7c6e36f8c5 Add proper skin search in skin command 2024-09-17 16:42:34 +02:00
Alug 1a13b83fd7 dont need this 2024-09-16 18:12:46 +02:00
Alug 0729065d16 "player" 2024-09-16 17:52:10 +02:00
Alug e6be07af1f some stuff i forgor 2024-09-16 17:33:17 +02:00
Alug 47aa62092e Revert "Contain end & size into savebuffer_t"
This reverts commit 1a810bc923.
2024-09-16 15:55:22 +02:00
Alug ce6596edde just kick everyone when direct download file not found instead of i error
dumbass hack for now
2024-09-16 15:55:04 +02:00
Alug 0bdf1ca87a Revert "New system to prevent multiple fopen"
This reverts commit cc54d98a39.
2024-09-16 14:32:32 +02:00
Alug cbc39ba4f9 Revert "Only reseek if we have to"
This reverts commit c332d48e9d.
2024-09-16 14:31:18 +02:00
Alug 77b3609cd8 Prevent integer div by 0 in curl progress callback 2024-09-16 13:53:53 +02:00
Alug c41bf8708b Revert "Add functions to initialize savebuffer_t"
This reverts commit 56182a1ef5.
2024-09-16 13:45:57 +02:00
Alug 54cc730414 Use Zone memory functions for sending compressed saves 2024-09-16 13:36:53 +02:00
Alug d138cee30c Only save demo if demobuf.p is ready 2024-09-16 13:36:13 +02:00
Alug 56182a1ef5 Add functions to initialize savebuffer_t 2024-09-16 13:35:46 +02:00
Alug 1f7487ae37 Contain end & size into savebuffer_t 2024-09-16 13:20:44 +02:00
Alug 2db1dcf79f more fixup 2024-09-16 12:56:09 +02:00
Alug 82ac0d3ab0 fix demo checkspace 2024-09-16 12:53:02 +02:00
Alug c0d1214032 rest smol fixes 2024-09-16 12:40:03 +02:00
Alug d0c909c51d fixup demo savebuf 2024-09-16 12:37:25 +02:00
Alug 2587911936 clean up 2024-09-16 12:18:01 +02:00
Alug 42bc7e3c17 unglobalize savebuffer
needs some cleanup
2024-09-16 12:05:44 +02:00
Alug 16ea4c1393 prevent netvar string overflow 2024-09-16 11:03:03 +02:00
Alug 9b6995e267 dont rerun this aswell 2024-09-16 00:54:19 +02:00
Alug 4117c109d8 dont rerun mapload hook on resynch 2024-09-16 00:44:58 +02:00
Alug 2923020273 dont run playerjoin hook on resynch 2024-09-16 00:19:33 +02:00
Alug ab47582f8a fix sound bug lol 2024-09-16 00:07:58 +02:00
Alug 4041a93ae5 revert some mobj stuff i forgor about 2024-09-15 19:27:06 +02:00
Alug 9cf3eb1631 smol fix to downsample shader 2024-09-15 14:08:06 +02:00
Alug 56fba6725e make advanced server menu scroll menu
grrrrr green res
2024-09-15 12:02:56 +02:00
Alug 3c4e552517 ... 2024-09-15 11:47:33 +02:00
Alug cdc284f009 squish options menu a little
im honestly too lazy too move shit around just before release lmao
2024-09-15 11:43:03 +02:00
Alug 961fe4aad4 test optimization 2024-09-15 00:39:26 +02:00
Alug 67eb7bbff8 some cleanup 2024-09-14 19:43:54 +02:00
Alug 5c82e674cc remove code dupe in r_segs 2024-09-14 18:43:00 +02:00
indev dc5a9bb856 should be != here 2024-09-14 18:16:48 +02:00
indev 28d58b9828 Don't default to sonic if skin was changed to unknown skin, use current skin instead 2024-09-14 17:05:52 +02:00
Alug a187b82887 add a touch of skincolor to speedlines when going fast 2024-09-14 14:25:49 +02:00
Alug 2bf60a9a26 colourize speedlines on some occasions
like durr or ssmth
2024-09-14 14:05:58 +02:00
Alug d2c1158d57 forgor about this 2024-09-14 13:14:01 +02:00
Alug c1305904e5 delete half game again but keep the bots and dehacked crap 2024-09-14 13:07:51 +02:00
Alug 094cf21c4c use continues in hooklib loops too
idk if this is any faster, but it makes smth i wanna port over potentally easier
2024-09-14 12:31:10 +02:00
Alug dc7a23db65 better value 2024-09-13 15:46:40 +02:00
Alug 9297620b6a smol m_menu cleanup 2024-09-13 14:17:06 +02:00
Alug 28019b1088 replace tooltip crap with a macro + fix adv video options tooltips 2024-09-13 14:01:02 +02:00
Alug 18714ac542 move credits a tiny bit 2024-09-13 13:37:04 +02:00
Alug 1724765feb whoops wrong tooltip 2024-09-13 13:35:10 +02:00
Alug 97ee57ff9c add smol comment 2024-09-13 13:30:23 +02:00
Alug 4bc1224d0c remove this forgor i still had that here lol 2024-09-13 13:30:10 +02:00
Alug 169ee01338 this used to be const 2024-09-13 13:22:43 +02:00
Alug d335898584 no need to save saturnjoin value + smol cleanup 2024-09-13 13:20:49 +02:00
Alug 4269ccdee4 super smol optimization R_ThingWithinDist
no need to run fixedhypot on every sprite when you dont use draw distance limit
2024-09-13 12:44:29 +02:00
Alug f12622f1e3 kek i dont have this and was too lazy to fix merge conflicts 2024-09-13 12:34:18 +02:00
Alug 866d4f6b1d smol menu visual cleanup 2024-09-13 12:32:50 +02:00
Alug a344a5efc5 add old line whatever in intermission add beta intermission visual to menu 2024-09-13 12:27:57 +02:00
Alug e272885f26 small cleanup intermission drawer 2024-09-13 12:17:21 +02:00
Alug a6c28245be Revert "delete half the game again"
This reverts commit 87bc2f1b64.
2024-09-13 01:49:50 +02:00
Alug 13e8367106 Revert "forgor to remove cv_call"
This reverts commit 87c5336cf4.
2024-09-13 01:49:46 +02:00
Alug 925180c10f only need to check all this when in splitscreen
retains vanilla behaviour
2024-09-13 00:22:57 +02:00
Alug 69844884b7 clean up sprite stuff 2024-09-13 00:16:28 +02:00
Alug e07efa1c21 fix wöter shader interpolation
accidentally reverted that when redoing palette rendering
2024-09-12 22:43:06 +02:00
Alug 87c5336cf4 forgor to remove cv_call 2024-09-12 12:36:48 +02:00
Alug 113d418144 try a funny = randomized directional lighningh 2024-09-12 02:23:39 +02:00
Alug 87bc2f1b64 delete half the game again 2024-09-12 02:17:47 +02:00
Alug d522dc4acc delete nights grade stuff
psure this is unused
2024-09-12 01:14:50 +02:00
Alug ef40f4a0ca forgor this 2024-09-12 01:04:33 +02:00
Alug 8b1d30b319 delete DEH_WriteUndoline
it literally does nothing lol
2024-09-12 01:03:03 +02:00
Alug 3bb18a1bc7 port directional + sprite lightning
doesent do all too much without soc
but was bored and could make smth cool out of it

needs a global toggle since it does some stuff by default
2024-09-11 23:17:47 +02:00
Alug 65793db889 apparently this always runs
i am in pain
2024-09-11 20:11:15 +02:00
Alug 862a4437e9 let item button toggle encore in mapselect screen
guh
2024-09-11 19:56:17 +02:00
Alug 58b3ab8185 add missing masterserver ifdef 2024-09-11 19:43:57 +02:00
Alug fa3a9c4be8 this can be int16 2024-09-10 19:51:52 +02:00
Alug 1db698961c Revert "smol optimization to HWR_AddLine"
This reverts commit 77c9badeca.
2024-09-10 10:58:37 +02:00
Alug c9bc9ce38c Revert "smol optimization R_AddLine"
This reverts commit 677cdc77e4.
2024-09-10 10:58:34 +02:00
Alug 8ab836c081 Revert "Zzz..."
This reverts commit b703428ee3.
2024-09-10 10:58:30 +02:00
Alug b703428ee3 Zzz... 2024-09-10 10:31:13 +02:00
indev 00a4c30979 Snap title demo logo to bottom right corner 2024-09-10 10:13:57 +02:00
Alug 3b080f4563 smol optimization R_AddLine 2024-09-09 22:54:18 +02:00
Alug d0f0e97254 smol cleanup 2024-09-09 22:32:51 +02:00
Alug 85f39b5310 smol optimization to HWR_AddLine 2024-09-09 22:31:38 +02:00
Alug b5f980a4ff remove redundant check 2024-09-09 22:02:49 +02:00
Alug 1d0032561e only change lightlevel/colormap behaviour in palette rendering 2024-09-09 21:50:55 +02:00
Alug dfc6ffe2ba fix off by one in sprite lightlevels 2024-09-09 21:50:24 +02:00
Alug 8c379f56cd revert this ig 2024-09-09 18:51:00 +02:00
Alug 0a54114db0 add toggle for director prompt
cause ik some ppl will complain lol
2024-09-09 16:05:01 +02:00
Alug fcb37a75da make this less complicated lol 2024-09-09 15:58:36 +02:00
Alug 95382298ce fade director hud after 4 secs after toggling it 2024-09-09 10:38:30 +02:00
Alug 51cf4b7b6f disable director on title screen and record attack demos 2024-09-09 09:21:35 +02:00
Alug 77c40d8aa1 remove unused ctf resynchpak stuff 2024-09-09 09:15:07 +02:00
Alug af7abea5e1 dont think this ever gets called but just in case 2024-09-09 09:03:33 +02:00
Alug 32a1a7ee3f huge cleanup gametypes
removed half the game lol
2024-09-09 08:46:13 +02:00
Alug 2d43624a87 make it static actually 2024-09-08 23:36:50 +02:00
Alug df6ef9752a turn off director by default when playing replays and restore the setting when done
you can  still toggle it in replays no issues
but you mostly want to watch yourself or a certain person during replays, so having to manually toggle it off always is weird
2024-09-08 23:33:54 +02:00
Alug 8b9efaa179 dont trigger rumble in offroad when under hyu effect 2024-09-08 23:09:09 +02:00
Alug 2ffb37e8ec Revert "Reapply "optimize pointon functions""
This reverts commit 47dad991b9.
2024-09-08 18:43:24 +02:00
Alug 3397bf912d readd this crap 2024-09-08 16:52:33 +02:00
Alug 448e1b3a75 lugstuff crap 2024-09-08 16:45:31 +02:00
Alug 2b32605fde slight portal cleanup 2024-09-08 16:45:09 +02:00
Alug cdf90723c3 Revert "delete ogl portal code"
This reverts commit 8cd79199e8.
2024-09-08 15:40:10 +02:00
Alug 9e9e989ec1 fix potential rendering issues on large maps 2024-09-08 14:51:16 +02:00
Alug 589c16e1fc smol cleanup 2024-09-08 14:51:01 +02:00
Alug 8cd79199e8 delete ogl portal code 2024-09-08 14:50:37 +02:00
Alug 364d2a042b oops 2024-09-07 20:09:36 +02:00
Alug b0b7bf5e14 clean up and improve ogl portals 2024-09-07 20:06:11 +02:00
Alug d9d766c098 this is literally broken and noone knows about it anyways lol 2024-09-07 17:52:13 +02:00
Alug 1f1d6df342 Show a console error if the gamestate contains too many tables 2024-09-07 17:30:00 +02:00
Alug 1a1e2f0c78 this needs to be shifted 2024-09-07 17:04:00 +02:00
Alug e01ee77a52 guh 2024-09-07 16:57:33 +02:00
Alug 2521d06233 this should use angleturn
uhhh
2024-09-07 16:46:23 +02:00
Alug 4200e263ed set camera angle to player angle in CL_ReloadReceivedSavegame
hope i did this right lol
2024-09-07 16:27:22 +02:00
Alug f3dfda530e dont rerun levelload executors when gamestate resent 2024-09-07 15:59:10 +02:00
Alug d0e04ca603 dont print "Map is now" everytime you resynch from gamestate resend 2024-09-07 15:55:44 +02:00
indev f45f733ff4 Document changes to lua P_PlayRinglossSound and K_PlayHitEmSound functions 2024-09-07 15:35:23 +02:00
Alug 951bf35db6 smol fixes for gamestate resend in P_SetupLevel
- dont reset cameras during gamestate resynch
- dont reinit director during gamesate resynch
- dont reset view interpolators aswell
- dont reset localaiming aswell

should make resynching less jarring visually hopefully
2024-09-07 15:35:17 +02:00
Alug eaea684e71 add compiler flags NOSATURNSYNCH, NOSATURNJOIN and NOSATURNPAK
not building with SATURNSYNCH also will disable SATURNJOIN since it makes not much sense to have that when synch stuff is unused
2024-09-06 21:41:46 +02:00
Alug 0261fa3077 % 2024-09-06 21:06:00 +02:00
Alug 8c6414ce5a smol cleanup + add comments 2024-09-06 21:05:21 +02:00
Alug c7262e257d set netgame save stuff to false for replays
to retain max vanilla compat for replays
dont want those breaking between clients
2024-09-06 21:02:16 +02:00
Alug c5df712c7d reserve saturn packet even if unused
to not cause any weird isssues if either one is undefined and stuff like that
2024-09-06 20:36:20 +02:00
Alug 8ed7bd0034 menu offset stuff for if not using SATURNSYNCH 2024-09-06 20:06:49 +02:00
Alug e7a0ac104a oops again 2024-09-06 19:59:39 +02:00
Alug e21b83b1ec hide gamestate resynch stuff behind SATURNSYNCH ifdef 2024-09-06 19:55:22 +02:00
Alug 31b8038aa0 oops 2024-09-06 19:52:04 +02:00
Alug dcb262f192 put saturn specific join allow stuff behind SATURNJOIN define
so it can be seperate from SATURNPAK
2024-09-06 19:23:35 +02:00
Alug 47dad991b9 Reapply "optimize pointon functions"
This reverts commit 5a4c9f4633.
2024-09-06 19:11:15 +02:00
Alug 21cf80dd58 make this completely toggable actually 2024-09-06 18:50:57 +02:00
Alug 5a4c9f4633 Revert "optimize pointon functions"
This reverts commit f95c751ff2.
2024-09-05 20:27:13 +02:00
Alug c25db4d9be Revert "smol cleanup p_maputl"
This reverts commit 1950b0956e.
2024-09-05 20:27:07 +02:00
Alug 457f73bc0f Revert "test kill SEENAMES without removing its netvar"
This reverts commit aa6a011bef.
2024-09-05 20:26:58 +02:00
Alug 1488457211 move those so backtraces still write if savedemo should crash 2024-09-05 17:56:04 +02:00
Alug 33ddb1fa4f only save demo in map command if you atleast spend 35 seconds in one map 2024-09-05 17:36:53 +02:00
Alug 57b5614124 toggle for saving replays on changing to same map 2024-09-05 10:52:15 +02:00
Alug 7e813768ed test save replay when crashing in signal handler 2024-09-05 10:09:02 +02:00
Alug eb2f64801e test also save replay on mapchange command 2024-09-05 00:11:30 +02:00
Alug 1396d6b06b this should also check for screentex cvar value 2
dont run certain postprocessor effects when you dont have screentextures enabled
2024-09-04 23:45:00 +02:00
Alug 8ce2ad0d39 add a little bit of safety to R_SetupFrame 2024-09-04 23:17:37 +02:00
Alug a699be42c7 remove IFCHANGED macro, check directly in R_Lerp funcs + inline those
basically does the same thing lol just looks better
2024-09-04 18:47:47 +02:00
Alug 05009b9c82 scale precip momz with mobjscale when cv_mobjscaleprecip enabled 2024-09-04 18:31:01 +02:00
Alug 39cf5d5f70 also scale precip sprite with mobjscale when cv_mobjscaleprecip enabled 2024-09-04 18:30:37 +02:00
Alug 836658d5d5 only call HWR_RenderPlayerView in ogl explictly 2024-09-04 18:14:53 +02:00
Alug 1b5cd02289 smol cleanup for led stuff again 2024-09-04 15:03:06 +02:00
Alug 9180f27315 smol cleanup hw_shaders 2024-09-04 15:02:31 +02:00
Alug aa6a011bef test kill SEENAMES without removing its netvar
why is this even defined
2024-09-03 12:31:13 +02:00
Alug 32ee5a8a61 smol cleanup p_map 2024-09-03 12:25:22 +02:00
Alug 1950b0956e smol cleanup p_maputl 2024-09-03 12:16:14 +02:00
Alug 542d5a4127 test use HWR_ProcessPolygon for skywalls 2024-09-03 07:31:32 +02:00
Alug b94b3c9d17 lol 2024-09-03 07:30:59 +02:00
Alug dab48b4183 precalc this 2024-09-03 07:30:51 +02:00
indev 10f0c9c0d8 Make server send serverinfo packet so client can know server name even when connecting just by ip 2024-09-02 22:44:27 +02:00
Alug 61bd811dfd more stuff i forgor 2024-09-02 17:43:57 +02:00
Alug ce4a89ed96 missed those 2024-09-02 17:40:19 +02:00
indev db4e94652d Add ctrl-w (delete word), ctrl-left (move to word beginning) and ctrl-right (move to word end) shortcuts for console 2024-09-02 17:28:17 +02:00
Alug 34196dc989 revert bunch of lugstuff specific stuff so i dont desynch and stuffs 2024-09-02 17:27:43 +02:00
Alug a8a71cc70c Revert "dont access delayremoved thinkers"
This reverts commit 7d885f7100.
2024-09-02 17:05:57 +02:00
Alug f95c751ff2 optimize pointon functions 2024-09-02 14:22:58 +02:00
Alug eed32527cd those are unused 2024-09-02 12:18:51 +02:00
Alug 1134bbf672 dont draw precip in skyboxes in opengl like software does 2024-09-02 12:12:08 +02:00
Alug 2635dab82f this can be static 2024-09-02 12:10:24 +02:00
Alug 57b6495e06 optimize polyobject spawn
should speed up level loading with maps with polyobjects
thx geezeedoom
2024-09-01 19:37:50 +02:00
Alug bc356ceac9 make downsampleshader respect the resoltion factor 2024-09-01 00:51:58 +02:00
Alug 8aeedadbcf no idea why i put those here 2024-08-31 20:19:06 +02:00
Alug 1e3459c588 update camera when paused and changing cam dist or height 2024-08-31 20:15:34 +02:00
Alug 8dda416592 throw menu bg conditions into own function since it s terrible 2024-08-31 19:52:24 +02:00
Alug 39a5b43e30 add camera options menu 2024-08-31 19:51:49 +02:00
Alug 9bdcfc34b5 add some comments 2024-08-31 18:54:21 +02:00
Alug 04b76339cb give camera lookback a toggle + extra option 2024-08-31 18:45:29 +02:00
Alug 2e80a9ffe9 super tiny cleanup m_menu again 2024-08-31 18:34:37 +02:00
Alug 900d4fe433 forgor speedo doesent draw in splitscreen + change offsets 2024-08-31 18:10:52 +02:00
Alug 76e9b8a599 add battlespeedometer to saturn hud menu + apply offset to bumper gfx when enabled 2024-08-31 18:01:12 +02:00
Alug b2fc9cc141 make timer flash at 99´59´99 again 2024-08-31 17:39:17 +02:00
Alug f280748d71 fix pal render postprocess shader by combining stuff
godawful but i dont want to draw another screen texture since itll tank performance
2024-08-30 22:15:03 +02:00
Alug 8a19bda170 use shader for downsampling with fbo
looks alot better and actually makes supersampling worth it

will be disabled when shaders also are
2024-08-30 21:21:21 +02:00
Alug 6f1fcd3e10 this can be static and inlined 2024-08-28 17:08:38 +02:00
Alug 9c5e591038 changes to saturn menu
-Add new Saturn Hud options menu to declutter normal saturn options
- If in any of the hud options the game will force display the kart hud and disable the fade background
- i hate m_menu
2024-08-27 18:22:56 +02:00
Alug 0790919125 respawn precip when toggling any of its settings 2024-08-27 16:28:45 +02:00
Alug 0840e5be3f toggle to scale weather with mobjscale
toggle since it may tank performance on certain maps for some + may make visability worse
2024-08-27 15:58:52 +02:00
Alug 4894d42e67 fix precip switching 2024-08-27 05:42:36 +02:00
Alug 664128cc18 optimize z position checking for mobjs without collision and camera
idk how much this does tbh
only for stuff without collision since it may desynch otherwise

based on
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2214

and

https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2250
2024-08-26 19:54:16 +02:00
Alug 3809f06ae8 when looking back camera momentum should inherit the mom of the player
makes using shoes or any boost stuff less jarring when looking back
2024-08-23 15:44:51 +02:00
Alug b7347fd371 fix compileur warnings
idk if this is right lol
2024-08-23 15:43:21 +02:00
Alug 189b91be57 fix potential crash in P_TryCameraMove for dedi servers 2024-08-23 15:31:35 +02:00
Alug 105d57c78d cleanup P_DoSuperTransformation
its still exposed to lua for whatever reason
so cant really remove crap kek
2024-08-23 15:31:00 +02:00
Alug eaed388d33 cleanup birdmusic crap again
music_resync_powerups_only literally didnt do shit lol
removed some other unused crap
changed some conditions to better check for stuff
etc idk
i just rather remove this whole thing at this point but oh well
2024-08-23 15:29:36 +02:00
Alug 564e8f6df4 forgor 2024-08-21 15:38:40 +02:00
Alug 6059753e73 cleanup FBO on shutdown + make some stuff static 2024-08-20 23:26:11 +02:00
Alug d82886c517 more changes to FBO stuff
now it wont ever do anything when disabled
also properly deletes the FBO when disabling it
2024-08-20 23:17:26 +02:00
Alug 23734480cc revert this in y_inter 2024-08-20 20:39:26 +02:00
Alug 50871fa9b5 make this more robust ig 2024-08-20 03:57:43 +02:00
Alug 39a11a4196 forgor return 2024-08-19 21:54:15 +02:00
Alug 80cd5ea6b4 do not constantly query ogl extensions 2024-08-19 21:48:34 +02:00
Alug a197a85930 enforce the xwayland hack even if fbo cvar is disabled
we have a bunch of guards in it so dont think there will be a problem
2024-08-19 18:57:16 +02:00
Alug aa4bf55574 change some stuff for saturn 2024-08-19 17:38:01 +02:00
NepDisk 0651a744fb Appimage compile pt2 2024-08-19 17:17:42 +02:00
NepDisk 3e4cdd4cf1 Appimage compile pt1 2024-08-19 17:17:38 +02:00
Alug 29b1409122 raise maxpng res 2024-08-19 17:16:48 +02:00
Alug e26c65bffb git pls 2024-08-19 17:16:39 +02:00
Alug 69bed9dcb6 Update LUASTUFF
idk i suck at explaining lmao
but atleast those should be mentioned
2024-08-19 14:58:32 +02:00
indev a49081a473 Don't execute exitgame command on dedicated servers 2024-08-19 13:29:50 +02:00
indev 1aa49108d0 Fix compilation when SDL_VERSION_ATLEAST(2,0,18) is false (if its false then 'else' statement would not be valid) 2024-08-19 13:29:47 +02:00
Alug 0dbc68a7df try async vsync here too 2024-08-19 13:28:48 +02:00
Alug 5fd25a76ad Fix typo 2024-08-19 11:55:49 +02:00
NepDisk f4535b6465 Fix Compile without with out of date SDL 2024-08-19 11:55:49 +02:00
Alug ac35961a15 Fix some tooltips so they don't go offscreen
grr git not crediting neppy for some reason
2024-08-19 11:55:49 +02:00
NepDisk b2c4ca99c2 Allow the control binds menu to use lower case 2024-08-19 11:51:13 +02:00
NepDisk ce8cf450b7 Fix gamepad menus for green reses via scrolling 2024-08-19 11:51:10 +02:00
Alug 112839a489 use qsort instead of qs22j for vissprite sorting
seems to be actually faster in this case
2024-08-18 20:46:07 +02:00
Alug 60041b03f7 this should not be in HWRENDER ifdef 2024-08-17 20:03:49 +02:00
Alug 67df9e0a50 fix NOHW compile 2024-08-17 20:02:09 +02:00
Alug 5113387134 throw saturnpacket and join stuff behind "SATURNPAK" ifdef, disable it for now 2024-08-17 19:57:56 +02:00
Alug 3f267034a8 smol fix to slope light 2024-08-17 16:31:04 +02:00
Alug dec8a16921 better slope light 2024-08-17 15:55:39 +02:00
Alug e3a9fdff22 smol changes 2024-08-17 15:37:24 +02:00
Alug 0bf25fad84 Use a const for the contrast 2024-08-17 15:30:04 +02:00
Alug 2e09d88999 Update light offset on polyobjects when they rotate 2024-08-17 15:28:37 +02:00
Alug 6df8f5b35c precalc fakecontrast on mapload 2024-08-17 15:25:12 +02:00
indev bce621d647 Always allow typing replay search query, similar to addon search 2024-08-16 01:03:18 +02:00
indev 01e51767e7 Add 'Hit Em Delay' option in menu 2024-08-16 01:03:14 +02:00
Alug 9a24ed2a09 add onchange func for led + fix rumble onchange 2024-08-16 00:34:08 +02:00
Alug a5f756eeb0 add toggles for gamepad led stuff 2024-08-16 00:08:40 +02:00
Alug e92c3d4d79 dont think we need that here 2024-08-15 23:54:35 +02:00
Alug ca4471ea6a reset rumble when player is exiting 2024-08-15 23:44:40 +02:00
Alug ecdbba2d28 dont change connect behaviour regardless of client + smol cleanup and fixes
should hopefully fix any remaining issues
2024-08-15 23:40:54 +02:00
Alug 057fb30b39 smol cleanup 2024-08-15 17:33:18 +02:00
Alug 678ddd781c remove duplicates in ResetNode 2024-08-15 17:32:15 +02:00
Alug 98111fe114 check for changed state before everything else 2024-08-15 15:47:10 +02:00
Alug b47f5ab235 move this in hw_main 2024-08-15 15:19:11 +02:00
Alug b909fe8ea9 shut up compiler 2024-08-15 14:42:30 +02:00
Alug 276ef2a150 move this in coindition 2024-08-15 13:41:20 +02:00
Alug 72540a8a0d smol cleanup HWR_RenderPlane 2024-08-15 13:41:00 +02:00
indev 0ce6cb4cee Fix increasing number of viewpoints in replays by more than 1 (like pressing '3' with only one viewpoint) crashing game 2024-08-14 15:56:44 +02:00
Alug 8b81f4cef2 completely disable director in splitscreen
will eventually get to splitscreen support lul
2024-08-14 14:44:22 +02:00
Alug d04d278f0e fix director lol 2024-08-14 14:10:16 +02:00
Alug 23f839dc19 also do this when player gets invul "power" 2024-08-14 12:49:05 +02:00
indev 6eca8150f1 Prioritize display players when assigning delayed 'hit em' 2024-08-12 11:18:34 +02:00
indev 521c9f686f Fix LUA_EvalMath warnings being broken sometimes 2024-08-11 12:03:54 +03:00
Alug 37da18cdcb Revert "Only load map lumps that are WADs or have no extension"
This reverts commit 1fb126b4d3.
2024-08-10 21:52:32 +02:00
indev cdc5460fd6 Oops forgot to change that
Dunno if this function ever gets called for non-player objects but just in case
2024-08-10 13:22:39 +02:00
indev 8aa6f62b2d Add delayed hit em sound (like in DRRR), togglable via 'karthitemdialog' cvar 2024-08-10 13:22:35 +02:00
Alug 5c9b9b6295 no need to check for ogl here 2024-08-10 09:55:25 +02:00
Alug 2e70119e68 smol cleanup for downsample stuff 2024-08-10 09:55:16 +02:00
Alug 1c5a312867 throw this behind ifdef 2024-08-10 09:44:20 +02:00
Alug f2e0b4dbc0 Flash gamepad LED when invul or grow 2024-08-09 20:41:29 +02:00
indev 15fd488e0d Fix smol memory leak in replay search thread oops 2024-08-09 18:51:08 +02:00
indev 04c0dad598 Load replay titles in separate thread 2024-08-09 18:44:08 +02:00
indev 0acb817e38 Visual improvements for replay search 2024-08-08 21:53:37 +02:00
indev fd00a08fa2 Add alternative button ('/') to open replay search 2024-08-08 21:53:33 +02:00
indev 0bc529ef5c Oops shouldn't z_free that 2024-08-08 21:53:29 +02:00
indev 2e8f06286d Greatly improve replay search perfomance by only reading replay name, and not entire file. Increase default search rate up to 1000 2024-08-08 21:53:26 +02:00
indev 52c1a950ba Fix M_HutCheckReplays still being called in menu (hopefully) 2024-08-08 21:53:22 +02:00
indev e946c93fe8 Search replays using title instead of filename 2024-08-08 17:54:53 +02:00
indev 220e996531 Test replay search 2024-08-08 17:54:49 +02:00
Alug 05a0085e22 fix nvidia xwayland screentex issue in dumb way
josdifgjs09ef09
2024-08-07 09:41:10 +02:00
Alug 27074cb8d2 more smol cleanup 2024-08-07 09:19:28 +02:00
Alug 1fb126b4d3 Only load map lumps that are WADs or have no extension 2024-08-05 16:21:29 +02:00
Alug b5ba82e52b smol cleanup w_wad 2024-08-05 16:12:12 +02:00
Alug a71139749f Test: remove Z_Unlock and proper free some stuff 2024-08-05 14:12:00 +02:00
Alug dd6332b715 smol cleanup 2024-08-05 12:15:18 +02:00
indev 936e461812 Fix chat not saving in console
Not sure why it was working before but broke now, maybe making va use snprintf instead of sprintf broke that
2024-08-04 16:53:32 +03:00
Alug 8c2367d0e7 check if theres even controllers in rumble ticker 2024-08-04 14:51:35 +02:00
Alug eb3c68df88 update led status in main loop
makes this whole ordeal alot less hacky tbh
player color always gets updated if it changes
still allows for directly setting led color elsewhere by using G_SetPlayerGamepadIndicatorColor directly
hoping crap doesent cost any perf but honestly shouldnt
2024-08-04 14:51:19 +02:00
Alug d9123c50d6 no need for this 2024-08-04 14:07:54 +02:00
Alug 43dfab7974 proper pass fwrapv to gcc 2024-08-04 13:01:45 +02:00
Alug 4d5b993490 forgor 2024-08-04 12:50:31 +02:00
Alug 44ab751fcb fix warning in director 2024-08-04 12:46:30 +02:00
Alug 96fcf2f668 support gcc 14.2.1 + fix some stuff 2024-08-04 12:45:23 +02:00
Alug 4db7992542 better statdisplay offsets in splitscreen
lots of trial and error.....
2024-08-03 23:49:31 +02:00
Alug 5a3893b46d smol fix to viewroll interp 2024-08-03 22:44:57 +02:00
Alug 9f4f728541 Revert "only works for displayplayer 0"
This reverts commit ba20020929.
2024-08-03 22:44:38 +02:00
Alug ba20020929 only works for displayplayer 0 2024-08-03 22:36:51 +02:00
Alug a3f224da6e expose viewroll to lua 2024-08-03 22:33:08 +02:00
Alug 9e7d4b3c22 fix crap here too even if its commented out 2024-08-03 21:47:53 +02:00
Alug 56e5242201 Fix few remaining uses of this_scale and ty
Not too sure if this is correct tho
2024-08-03 21:25:59 +02:00
Alug 38c1462fef add controller rumble to menu 2024-08-03 21:25:31 +02:00
indev 156173b3b9 Smol safeguard for R_PointToDist2 2024-08-03 20:46:52 +02:00
Alug b6a8f96e02 misplaced this 2024-08-03 18:02:50 +02:00
Alug 6bb9c88a1f make inline macros for pointtodist 2024-08-03 07:31:12 +02:00
Alug 00ea95ee2b stuff 2024-07-31 07:37:17 +02:00
Alug 859e08d628 Reapply "lol"
This reverts commit 340450a67e.
2024-07-31 06:07:49 +02:00
Alug 7c24fcfecb Reapply "optimize precip thinker"
This reverts commit dd73787c8b.
2024-07-31 06:07:43 +02:00
Alug 1c17d82836 send latency command after lua command 2024-07-31 06:06:05 +02:00
Alug 2d822ded27 add very light rumble to brakedrift 2024-07-31 06:05:49 +02:00
Alug 143c8bd436 fix up ogl sprite drawers, fix floor clip fix remove ty and reduntand hires stuff 2024-07-31 05:31:16 +02:00
Alug 2d166a35d0 check if displayplayer skincolor is availible before returning it 2024-07-31 00:28:29 +02:00
Alug eb02f15a5d fix rumble condition 2024-07-31 00:20:31 +02:00
Alug a8559c3c29 smol interp fixes 2024-07-30 23:54:49 +02:00
Alug bdb175f84b revert some lightlevel stuff in hw_main 2024-07-30 01:43:56 +02:00
Alug 7122c7cd5a make this more explicit 2024-07-30 01:04:24 +02:00
Alug b9f5fd21e7 remove redundant check 2024-07-30 01:02:05 +02:00
Alug 69f75a9191 change rumble ticker loop a bit 2024-07-30 00:59:06 +02:00
Alug b753c5ab2d set default duration to 84 2024-07-30 00:20:26 +02:00
Alug 7389537c63 do not constantly reset rumble
so it can work from lua
2024-07-30 00:20:13 +02:00
Alug 00096d340f throw rumble ticker into right place 2024-07-30 00:16:19 +02:00
Alug 1b3977436d fix cassting, make one tic duration default, but can still pass ms to it 2024-07-29 23:35:32 +02:00
Alug 0631468f0d add duration field to G_PlayerDeviceRumble
duration is in ms
2024-07-29 23:27:36 +02:00
Alug a57cb9eb6a expose rumble and led to lua 2024-07-29 22:54:23 +02:00
Alug ed4c4cb311 rename to G_SetPlayerGamepadIndicatorColor 2024-07-29 22:45:39 +02:00
Alug 094373d89f splitscreen support for rumble 2024-07-29 22:17:01 +02:00
Alug a6d08a12b5 add splitscreen support to gamepad led
also add more proper device check
2024-07-29 21:41:18 +02:00
Alug 55c6aa78e5 add basic rumble support for gamepads 2024-07-29 20:40:13 +02:00
Alug f95d0a1d34 i didnt knew k_positiondelay exists 2024-07-29 18:00:04 +02:00
Alug 73b84a0e02 another smol fix to director 2024-07-29 16:40:37 +02:00
Alug 7704bf7c90 lower breakawaydist in director 2024-07-29 04:29:05 +02:00
Alug a76ebe3600 fix K_DrawDirectorDebugger 2024-07-29 04:26:06 +02:00
Alug f8c8fedbe8 cleanup k_director 2024-07-29 04:13:51 +02:00
Alug 6a21729ff9 lower pinchdist in director
since we cant get an accurate value for distance to finish line, this should do it perhaps
2024-07-29 04:13:42 +02:00
Alug 9839d7ca3a change gamepad rgb color when switching viewpoints 2024-07-29 03:57:20 +02:00
Alug 82ad38e7f4 Revert "let invul flash rgb in rainbow lol"
This reverts commit 0a717e0081.
2024-07-29 03:17:47 +02:00
Alug 654c98f2ee Revert "smol fix"
This reverts commit b9f4eaa413.
2024-07-29 03:17:45 +02:00
Alug febadb6c08 simplify reduntand condition 2024-07-29 03:00:02 +02:00
Alug b9f4eaa413 smol fix 2024-07-29 01:53:31 +02:00
Alug ddf1db3d3d ressting to defaultcolor should also set led color 2024-07-29 01:39:33 +02:00
Alug 987253afcb Revert "dont return true for removed thing in P_CheckPosition"
This reverts commit 3f4d399afd.
2024-07-29 01:12:46 +02:00
Alug 0a717e0081 let invul flash rgb in rainbow lol 2024-07-29 01:12:35 +02:00
Alug ae0bce61f6 change color light when you cycle between colors in player setup 2024-07-29 01:12:17 +02:00
Alug a0ee75ebf4 give rgb custom color support, change rgb light color earlier in Color_OnChange
so it always unconditionally changes the color
also
2024-07-29 01:11:54 +02:00
Alug 1665d9aaa3 removed those by accident 2024-07-29 00:44:36 +02:00
indev be43f4d528 Only do lookup for mobjtype and states for drift stars and water trails at map load 2024-07-29 00:34:27 +02:00
Alug 6bcd2024a0 set controller rgb to playercolor
eh only for 1st player now no splitscreen support
idk if everything here is even correct
2024-07-28 19:54:08 +02:00
Alug f2b21c6055 Revert "fix some G_BuildMapTitle memleaks"
This reverts commit e5159e13dd.
2024-07-28 18:54:18 +02:00
Alug afb96c60cb Fix NULL lump name guard in W_CheckNumForMap 2024-07-28 18:40:58 +02:00
Alug e5159e13dd fix some G_BuildMapTitle memleaks 2024-07-28 18:37:20 +02:00
Alug fb622eda2a SDL: only react to window focus changes if state actually changes 2024-07-28 18:18:29 +02:00
Alug 5565edfcb4 dont reload palette until config was loaded 2024-07-28 18:13:28 +02:00
Alug 9b141b9f9f calloc soundchannels insteal of mallocing 2024-07-28 18:06:46 +02:00
Alug 6c885bff1e fix potential player reference issus in CL_ClearPlayer 2024-07-28 18:04:18 +02:00
Alug 9e575d89db can inline this 2024-07-28 17:46:04 +02:00
Alug 9e266c7a41 some reference fixes for shadows and overlays 2024-07-28 17:15:11 +02:00
Alug b08c175bfc Do not run ST_Ticker if dedicated 2024-07-28 16:54:24 +02:00
Alug 97c01c5951 smol fix to P_SetTarget 2024-07-28 16:37:07 +02:00
Alug 519e23ec36 P_NetUnArchiveThinkers: set thinker references to 0 before removing 2024-07-28 16:25:28 +02:00
Alug 3f4d399afd dont return true for removed thing in P_CheckPosition 2024-07-28 16:24:11 +02:00
Alug efaded5016 reset this in P_InitThinkers 2024-07-28 16:08:46 +02:00
Alug 2410bbfe4c some more smol mobj fixes 2024-07-28 15:57:03 +02:00
Alug 9637ae563c HMS_fetch_rules: Return NULL if the curl connection failed, instead of producing garbled rules 2024-07-28 15:49:01 +02:00
Alug f71631e732 try to prevent potential infinite SIGARBT hang in signal handler 2024-07-28 15:37:23 +02:00
Alug cca082b091 Cache pk3 central directory and Refactor ResFindSignature to work in chunks
https://github.com/KartKrewDev/RingRacers/commit/8ca2dc77e75b1ba8c511380257f0bbaf6d21c27b
https://github.com/KartKrewDev/RingRacers/commit/dedd0047bd8f9f73aba4defc19c429af7c987983
2024-07-28 15:35:47 +02:00
Alug cf8c38d08e fix potential crash on nix while quitting 2024-07-28 15:05:19 +02:00
Alug 4254e47bf4 dont always reset texture depth in ogl 2024-07-28 15:04:47 +02:00
Alug 2b32aee35d Ensure Z_Malloc provides same alignment as libc 2024-07-28 15:04:25 +02:00
Alug adfc22e377 Fix sound falloff calculation overflow 2024-07-28 15:04:14 +02:00
Alug 949d1a81ac smol fix to frameskipping 2024-07-28 15:04:01 +02:00
Alug 09a7999e4e e 2024-07-27 15:56:44 +02:00
Alug 351583ecf7 Revert "raise MAXVISSPRITES for 64-bit again"
This reverts commit d5258786e5.
2024-07-27 15:48:24 +02:00
Alug 3afd3aab8f lagless cam toggle 2024-07-27 15:02:47 +02:00
Alug 4bae40170f this is not a server cvar lol 2024-07-27 15:00:07 +02:00
Alug 09cb9831ef toggle for laptimes 2024-07-27 14:38:25 +02:00
indev 3864dc5833 Lets not compile lua code multiple time each frame x) 2024-07-27 03:26:37 +03:00
Alug 60d7b0272e Show last lap time on HUD
god this is kinda ass lol
doesent work when you join midgame so disabled for there
2024-07-26 22:18:49 +02:00
Alug fec72732e5 small change to director for battle 2024-07-26 20:41:26 +02:00
Alug 1571b11b0b R_LoadTexturePwad: fix faulty texture counting 2024-07-26 19:43:48 +02:00
indev 8d168076ef R_LoadTexturesPwad: don't do anything wad has no textures 2024-07-26 19:43:44 +02:00
Alug 9c6669fd5c Do not reload every texture when adding a wad
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/1725?commit_id=37add34b9c729b21e624e22d64159073c9258e25
2024-07-26 19:43:30 +02:00
Alug e2dedfff00 Split R_LoadTextures 2024-07-26 19:43:24 +02:00
Alug a07c619947 rename draw dist settings 2024-07-26 19:15:59 +02:00
Alug c5ee27c1b4 raise MAXVISSPRITES for 64-bit again 2024-07-26 19:15:23 +02:00
Alug 2530667b86 add more sprite draw dist settings for 64bit clients 2024-07-26 19:14:08 +02:00
Alug 83f8591afa when no autoload config is found skip everything in D_AddAutoloadFiles
stuff doesent need to run if theres nothing to autoload so things can be skipped
2024-07-26 15:03:01 +02:00
Alug 78213a7ed5 add some extra safety to orbit and bananachain funcs 2024-07-26 13:59:37 +02:00
indev 08ff64da12 Add check for if lua state exist in UnArchiveExtVars, since server can have local luas that may add player/mobj fields into savegame 2024-07-25 22:50:53 +03:00
indev 57650dc955 Oops 2024-07-25 20:27:59 +02:00
indev 9e8c1d694a Make water trail not use hardcode freeslots too 2024-07-25 20:24:43 +02:00
indev 1dd7d63380 Make drift stars not use hardcode freeslots 2024-07-25 19:06:29 +02:00
Alug 6a8ed13a99 some cleanup 2024-07-25 19:05:44 +02:00
276 changed files with 20023 additions and 40186 deletions

No files matched your search

+3 -1
View File
@@ -4,7 +4,6 @@
*.plg
*.suo
*.vcproj.*.*.user
*.kate-swp
Win32_LIB_ASM_Debug
Win32_LIB_ASM_Release
*.bsc
@@ -22,9 +21,12 @@ Win32_LIB_ASM_Release
/assets/debian
/make
/bin
/libs
/build
/build/*
/CMakeUserPresets.json
/out
/objs/VC10
*.kate-swp
libs/
+4 -1
View File
@@ -1,5 +1,8 @@
cmake_minimum_required(VERSION 3.5)
# needed for lto to work for some reason
cmake_policy(SET CMP0069 NEW)
if(${PROJECT_SOURCE_DIR} MATCHES ${PROJECT_BINARY_DIR})
message(FATAL_ERROR "In-source builds will bring you a world of pain. Please make a separate directory to invoke CMake from.")
endif()
@@ -31,7 +34,7 @@ if("${SRB2_CPACK_GENERATOR}" STREQUAL "")
endif()
set(CPACK_GENERATOR ${SRB2_CPACK_GENERATOR})
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Sonic Robo Blast 2 Kart" CACHE STRING "Program name for display purposes")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Sonic Robo Blast 2 Kart Saturn" CACHE STRING "Program name for display purposes")
set(CPACK_PACKAGE_VENDOR "Kart Krew" CACHE STRING "Vendor name for display purposes")
#set(CPACK_PACKAGE_DESCRIPTION_FILE )
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
+1
View File
@@ -21,6 +21,7 @@ We also have a Flatpak available on [Flathub](https://flathub.org/en/apps/org.sr
## Compiling
See [SRB2 Wiki/Source code compiling](http://wiki.srb2.org/wiki/Source_code_compiling). The compiling process for SRB2Kart is largely identical to SRB2.
Visual C++ (MSVC) is unsupported
For Windows only the Makefile build system with GCC or Clang compiler is supported.
Visual C++ (MSVC) is unsupported.
-1
View File
@@ -42,4 +42,3 @@ compversion() {
[ -f "$path/comptime.c" ] && compversion "$@"
exit 2
-15
View File
@@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<IncludePath>$(SolutionDir)libs\SDL2\include;$(IncludePath)</IncludePath>
<LibraryPath>$(SolutionDir)libs\SDL2\lib\$(PlatformTarget);$(LibraryPath)</LibraryPath>
</PropertyGroup>
<ItemDefinitionGroup>
<Link>
<AdditionalDependencies>SDL2.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup />
</Project>
-21
View File
@@ -1,21 +0,0 @@
Simple DirectMedia Layer
(SDL)
Version 2.0
---
https://www.libsdl.org/
Simple DirectMedia Layer is a cross-platform development library designed
to provide low level access to audio, keyboard, mouse, joystick, and graphics
hardware via OpenGL and Direct3D. It is used by video playback software,
emulators, and popular games including Valve's award winning catalog
and many Humble Bundle games.
More extensive documentation is available in the docs directory, starting
with README.md
Enjoy!
Sam Lantinga (slouken@libsdl.org)
-63
View File
@@ -1,63 +0,0 @@
# Simple DirectMedia Layer
https://www.libsdl.org/
Simple DirectMedia Layer is a cross-platform development library designed
to provide low level access to audio, keyboard, mouse, joystick, and graphics
hardware via OpenGL and Direct3D. It is used by video playback software,
emulators, and popular games including Valve's award winning catalog
and many Humble Bundle games.
SDL officially supports Windows, macOS, Linux, iOS, and Android.
Support for other platforms may be found in the source code.
SDL is written in C, works natively with C++, and there are bindings
available for several other languages, including C# and Python.
This library is distributed under the zlib license, which can be found
in the file "LICENSE.txt".
The best way to learn how to use SDL is to check out the header files in
the "include" subdirectory and the programs in the "test" subdirectory.
The header files and test programs are well commented and always up to date.
More documentation and FAQs are available online at [the wiki](http://wiki.libsdl.org/)
- [Android](README-android.md)
- [CMake](README-cmake.md)
- [DirectFB](README-directfb.md)
- [DynAPI](README-dynapi.md)
- [Emscripten](README-emscripten.md)
- [GDK](README-gdk.md)
- [Gesture](README-gesture.md)
- [Git](README-git.md)
- [iOS](README-ios.md)
- [Linux](README-linux.md)
- [macOS](README-macos.md)
- [OS/2](README-os2.md)
- [Native Client](README-nacl.md)
- [Pandora](README-pandora.md)
- [Supported Platforms](README-platforms.md)
- [Porting information](README-porting.md)
- [PSP](README-psp.md)
- [PS2](README-ps2.md)
- [Raspberry Pi](README-raspberrypi.md)
- [Touch](README-touch.md)
- [Versions](README-versions.md)
- [WinCE](README-wince.md)
- [Windows](README-windows.md)
- [WinRT](README-winrt.md)
- [PSVita](README-vita.md)
- [Nokia N-Gage](README-ngage.md)
If you need help with the library, or just want to discuss SDL related
issues, you can join the [SDL Discourse](https://discourse.libsdl.org/),
which can be used as a web forum or a mailing list, at your preference.
If you want to report bugs or contribute patches, please submit them to
[our bug tracker](https://github.com/libsdl-org/SDL/issues)
Enjoy!
Sam Lantinga <mailto:slouken@libsdl.org>
File diff suppressed because it is too large. Load diff
-656
View File
@@ -1,656 +0,0 @@
#ifndef __gles2_gl2_h_
#define __gles2_gl2_h_ 1
#ifdef __cplusplus
extern "C" {
#endif
/*
** Copyright 2013-2020 The Khronos Group Inc.
** SPDX-License-Identifier: MIT
**
** This header is generated from the Khronos OpenGL / OpenGL ES XML
** API Registry. The current version of the Registry, generator scripts
** used to make the header, and the header can be found at
** https://github.com/KhronosGroup/OpenGL-Registry
*/
/*#include <GLES2/gl2platform.h>*/
#ifndef GL_APIENTRYP
#define GL_APIENTRYP GL_APIENTRY*
#endif
#ifndef GL_GLES_PROTOTYPES
#define GL_GLES_PROTOTYPES 1
#endif
/* Generated on date 20220530 */
/* Generated C header for:
* API: gles2
* Profile: common
* Versions considered: 2\.[0-9]
* Versions emitted: .*
* Default extensions included: None
* Additional extensions included: _nomatch_^
* Extensions removed: _nomatch_^
*/
#ifndef GL_ES_VERSION_2_0
#define GL_ES_VERSION_2_0 1
/*#include <KHR/khrplatform.h>*/
typedef khronos_int8_t GLbyte;
typedef khronos_float_t GLclampf;
typedef khronos_int32_t GLfixed;
typedef khronos_int16_t GLshort;
typedef khronos_uint16_t GLushort;
typedef void GLvoid;
typedef struct __GLsync *GLsync;
typedef khronos_int64_t GLint64;
typedef khronos_uint64_t GLuint64;
typedef unsigned int GLenum;
typedef unsigned int GLuint;
typedef char GLchar;
typedef khronos_float_t GLfloat;
typedef khronos_ssize_t GLsizeiptr;
typedef khronos_intptr_t GLintptr;
typedef unsigned int GLbitfield;
typedef int GLint;
typedef unsigned char GLboolean;
typedef int GLsizei;
typedef khronos_uint8_t GLubyte;
#define GL_DEPTH_BUFFER_BIT 0x00000100
#define GL_STENCIL_BUFFER_BIT 0x00000400
#define GL_COLOR_BUFFER_BIT 0x00004000
#define GL_FALSE 0
#define GL_TRUE 1
#define GL_POINTS 0x0000
#define GL_LINES 0x0001
#define GL_LINE_LOOP 0x0002
#define GL_LINE_STRIP 0x0003
#define GL_TRIANGLES 0x0004
#define GL_TRIANGLE_STRIP 0x0005
#define GL_TRIANGLE_FAN 0x0006
#define GL_ZERO 0
#define GL_ONE 1
#define GL_SRC_COLOR 0x0300
#define GL_ONE_MINUS_SRC_COLOR 0x0301
#define GL_SRC_ALPHA 0x0302
#define GL_ONE_MINUS_SRC_ALPHA 0x0303
#define GL_DST_ALPHA 0x0304
#define GL_ONE_MINUS_DST_ALPHA 0x0305
#define GL_DST_COLOR 0x0306
#define GL_ONE_MINUS_DST_COLOR 0x0307
#define GL_SRC_ALPHA_SATURATE 0x0308
#define GL_FUNC_ADD 0x8006
#define GL_BLEND_EQUATION 0x8009
#define GL_BLEND_EQUATION_RGB 0x8009
#define GL_BLEND_EQUATION_ALPHA 0x883D
#define GL_FUNC_SUBTRACT 0x800A
#define GL_FUNC_REVERSE_SUBTRACT 0x800B
#define GL_BLEND_DST_RGB 0x80C8
#define GL_BLEND_SRC_RGB 0x80C9
#define GL_BLEND_DST_ALPHA 0x80CA
#define GL_BLEND_SRC_ALPHA 0x80CB
#define GL_CONSTANT_COLOR 0x8001
#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
#define GL_CONSTANT_ALPHA 0x8003
#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
#define GL_BLEND_COLOR 0x8005
#define GL_ARRAY_BUFFER 0x8892
#define GL_ELEMENT_ARRAY_BUFFER 0x8893
#define GL_ARRAY_BUFFER_BINDING 0x8894
#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
#define GL_STREAM_DRAW 0x88E0
#define GL_STATIC_DRAW 0x88E4
#define GL_DYNAMIC_DRAW 0x88E8
#define GL_BUFFER_SIZE 0x8764
#define GL_BUFFER_USAGE 0x8765
#define GL_CURRENT_VERTEX_ATTRIB 0x8626
#define GL_FRONT 0x0404
#define GL_BACK 0x0405
#define GL_FRONT_AND_BACK 0x0408
#define GL_TEXTURE_2D 0x0DE1
#define GL_CULL_FACE 0x0B44
#define GL_BLEND 0x0BE2
#define GL_DITHER 0x0BD0
#define GL_STENCIL_TEST 0x0B90
#define GL_DEPTH_TEST 0x0B71
#define GL_SCISSOR_TEST 0x0C11
#define GL_POLYGON_OFFSET_FILL 0x8037
#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
#define GL_SAMPLE_COVERAGE 0x80A0
#define GL_NO_ERROR 0
#define GL_INVALID_ENUM 0x0500
#define GL_INVALID_VALUE 0x0501
#define GL_INVALID_OPERATION 0x0502
#define GL_OUT_OF_MEMORY 0x0505
#define GL_CW 0x0900
#define GL_CCW 0x0901
#define GL_LINE_WIDTH 0x0B21
#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
#define GL_CULL_FACE_MODE 0x0B45
#define GL_FRONT_FACE 0x0B46
#define GL_DEPTH_RANGE 0x0B70
#define GL_DEPTH_WRITEMASK 0x0B72
#define GL_DEPTH_CLEAR_VALUE 0x0B73
#define GL_DEPTH_FUNC 0x0B74
#define GL_STENCIL_CLEAR_VALUE 0x0B91
#define GL_STENCIL_FUNC 0x0B92
#define GL_STENCIL_FAIL 0x0B94
#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
#define GL_STENCIL_REF 0x0B97
#define GL_STENCIL_VALUE_MASK 0x0B93
#define GL_STENCIL_WRITEMASK 0x0B98
#define GL_STENCIL_BACK_FUNC 0x8800
#define GL_STENCIL_BACK_FAIL 0x8801
#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
#define GL_STENCIL_BACK_REF 0x8CA3
#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
#define GL_VIEWPORT 0x0BA2
#define GL_SCISSOR_BOX 0x0C10
#define GL_COLOR_CLEAR_VALUE 0x0C22
#define GL_COLOR_WRITEMASK 0x0C23
#define GL_UNPACK_ALIGNMENT 0x0CF5
#define GL_PACK_ALIGNMENT 0x0D05
#define GL_MAX_TEXTURE_SIZE 0x0D33
#define GL_MAX_VIEWPORT_DIMS 0x0D3A
#define GL_SUBPIXEL_BITS 0x0D50
#define GL_RED_BITS 0x0D52
#define GL_GREEN_BITS 0x0D53
#define GL_BLUE_BITS 0x0D54
#define GL_ALPHA_BITS 0x0D55
#define GL_DEPTH_BITS 0x0D56
#define GL_STENCIL_BITS 0x0D57
#define GL_POLYGON_OFFSET_UNITS 0x2A00
#define GL_POLYGON_OFFSET_FACTOR 0x8038
#define GL_TEXTURE_BINDING_2D 0x8069
#define GL_SAMPLE_BUFFERS 0x80A8
#define GL_SAMPLES 0x80A9
#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
#define GL_DONT_CARE 0x1100
#define GL_FASTEST 0x1101
#define GL_NICEST 0x1102
#define GL_GENERATE_MIPMAP_HINT 0x8192
#define GL_BYTE 0x1400
#define GL_UNSIGNED_BYTE 0x1401
#define GL_SHORT 0x1402
#define GL_UNSIGNED_SHORT 0x1403
#define GL_INT 0x1404
#define GL_UNSIGNED_INT 0x1405
#define GL_FLOAT 0x1406
#define GL_FIXED 0x140C
#define GL_DEPTH_COMPONENT 0x1902
#define GL_ALPHA 0x1906
#define GL_RGB 0x1907
#define GL_RGBA 0x1908
#define GL_LUMINANCE 0x1909
#define GL_LUMINANCE_ALPHA 0x190A
#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
#define GL_UNSIGNED_SHORT_5_6_5 0x8363
#define GL_FRAGMENT_SHADER 0x8B30
#define GL_VERTEX_SHADER 0x8B31
#define GL_MAX_VERTEX_ATTRIBS 0x8869
#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB
#define GL_MAX_VARYING_VECTORS 0x8DFC
#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD
#define GL_SHADER_TYPE 0x8B4F
#define GL_DELETE_STATUS 0x8B80
#define GL_LINK_STATUS 0x8B82
#define GL_VALIDATE_STATUS 0x8B83
#define GL_ATTACHED_SHADERS 0x8B85
#define GL_ACTIVE_UNIFORMS 0x8B86
#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
#define GL_ACTIVE_ATTRIBUTES 0x8B89
#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
#define GL_CURRENT_PROGRAM 0x8B8D
#define GL_NEVER 0x0200
#define GL_LESS 0x0201
#define GL_EQUAL 0x0202
#define GL_LEQUAL 0x0203
#define GL_GREATER 0x0204
#define GL_NOTEQUAL 0x0205
#define GL_GEQUAL 0x0206
#define GL_ALWAYS 0x0207
#define GL_KEEP 0x1E00
#define GL_REPLACE 0x1E01
#define GL_INCR 0x1E02
#define GL_DECR 0x1E03
#define GL_INVERT 0x150A
#define GL_INCR_WRAP 0x8507
#define GL_DECR_WRAP 0x8508
#define GL_VENDOR 0x1F00
#define GL_RENDERER 0x1F01
#define GL_VERSION 0x1F02
#define GL_EXTENSIONS 0x1F03
#define GL_NEAREST 0x2600
#define GL_LINEAR 0x2601
#define GL_NEAREST_MIPMAP_NEAREST 0x2700
#define GL_LINEAR_MIPMAP_NEAREST 0x2701
#define GL_NEAREST_MIPMAP_LINEAR 0x2702
#define GL_LINEAR_MIPMAP_LINEAR 0x2703
#define GL_TEXTURE_MAG_FILTER 0x2800
#define GL_TEXTURE_MIN_FILTER 0x2801
#define GL_TEXTURE_WRAP_S 0x2802
#define GL_TEXTURE_WRAP_T 0x2803
#define GL_TEXTURE 0x1702
#define GL_TEXTURE_CUBE_MAP 0x8513
#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
#define GL_TEXTURE0 0x84C0
#define GL_TEXTURE1 0x84C1
#define GL_TEXTURE2 0x84C2
#define GL_TEXTURE3 0x84C3
#define GL_TEXTURE4 0x84C4
#define GL_TEXTURE5 0x84C5
#define GL_TEXTURE6 0x84C6
#define GL_TEXTURE7 0x84C7
#define GL_TEXTURE8 0x84C8
#define GL_TEXTURE9 0x84C9
#define GL_TEXTURE10 0x84CA
#define GL_TEXTURE11 0x84CB
#define GL_TEXTURE12 0x84CC
#define GL_TEXTURE13 0x84CD
#define GL_TEXTURE14 0x84CE
#define GL_TEXTURE15 0x84CF
#define GL_TEXTURE16 0x84D0
#define GL_TEXTURE17 0x84D1
#define GL_TEXTURE18 0x84D2
#define GL_TEXTURE19 0x84D3
#define GL_TEXTURE20 0x84D4
#define GL_TEXTURE21 0x84D5
#define GL_TEXTURE22 0x84D6
#define GL_TEXTURE23 0x84D7
#define GL_TEXTURE24 0x84D8
#define GL_TEXTURE25 0x84D9
#define GL_TEXTURE26 0x84DA
#define GL_TEXTURE27 0x84DB
#define GL_TEXTURE28 0x84DC
#define GL_TEXTURE29 0x84DD
#define GL_TEXTURE30 0x84DE
#define GL_TEXTURE31 0x84DF
#define GL_ACTIVE_TEXTURE 0x84E0
#define GL_REPEAT 0x2901
#define GL_CLAMP_TO_EDGE 0x812F
#define GL_MIRRORED_REPEAT 0x8370
#define GL_FLOAT_VEC2 0x8B50
#define GL_FLOAT_VEC3 0x8B51
#define GL_FLOAT_VEC4 0x8B52
#define GL_INT_VEC2 0x8B53
#define GL_INT_VEC3 0x8B54
#define GL_INT_VEC4 0x8B55
#define GL_BOOL 0x8B56
#define GL_BOOL_VEC2 0x8B57
#define GL_BOOL_VEC3 0x8B58
#define GL_BOOL_VEC4 0x8B59
#define GL_FLOAT_MAT2 0x8B5A
#define GL_FLOAT_MAT3 0x8B5B
#define GL_FLOAT_MAT4 0x8B5C
#define GL_SAMPLER_2D 0x8B5E
#define GL_SAMPLER_CUBE 0x8B60
#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
#define GL_COMPILE_STATUS 0x8B81
#define GL_INFO_LOG_LENGTH 0x8B84
#define GL_SHADER_SOURCE_LENGTH 0x8B88
#define GL_SHADER_COMPILER 0x8DFA
#define GL_SHADER_BINARY_FORMATS 0x8DF8
#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9
#define GL_LOW_FLOAT 0x8DF0
#define GL_MEDIUM_FLOAT 0x8DF1
#define GL_HIGH_FLOAT 0x8DF2
#define GL_LOW_INT 0x8DF3
#define GL_MEDIUM_INT 0x8DF4
#define GL_HIGH_INT 0x8DF5
#define GL_FRAMEBUFFER 0x8D40
#define GL_RENDERBUFFER 0x8D41
#define GL_RGBA4 0x8056
#define GL_RGB5_A1 0x8057
#define GL_RGB565 0x8D62
#define GL_DEPTH_COMPONENT16 0x81A5
#define GL_STENCIL_INDEX8 0x8D48
#define GL_RENDERBUFFER_WIDTH 0x8D42
#define GL_RENDERBUFFER_HEIGHT 0x8D43
#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44
#define GL_RENDERBUFFER_RED_SIZE 0x8D50
#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51
#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52
#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53
#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54
#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
#define GL_COLOR_ATTACHMENT0 0x8CE0
#define GL_DEPTH_ATTACHMENT 0x8D00
#define GL_STENCIL_ATTACHMENT 0x8D20
#define GL_NONE 0
#define GL_FRAMEBUFFER_COMPLETE 0x8CD5
#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9
#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
#define GL_FRAMEBUFFER_BINDING 0x8CA6
#define GL_RENDERBUFFER_BINDING 0x8CA7
#define GL_MAX_RENDERBUFFER_SIZE 0x84E8
#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
typedef void (GL_APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
typedef void (GL_APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader);
typedef void (GL_APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name);
typedef void (GL_APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer);
typedef void (GL_APIENTRYP PFNGLBINDFRAMEBUFFERPROC) (GLenum target, GLuint framebuffer);
typedef void (GL_APIENTRYP PFNGLBINDRENDERBUFFERPROC) (GLenum target, GLuint renderbuffer);
typedef void (GL_APIENTRYP PFNGLBINDTEXTUREPROC) (GLenum target, GLuint texture);
typedef void (GL_APIENTRYP PFNGLBLENDCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha);
typedef void (GL_APIENTRYP PFNGLBLENDFUNCPROC) (GLenum sfactor, GLenum dfactor);
typedef void (GL_APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
typedef void (GL_APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const void *data, GLenum usage);
typedef void (GL_APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
typedef GLenum (GL_APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC) (GLenum target);
typedef void (GL_APIENTRYP PFNGLCLEARPROC) (GLbitfield mask);
typedef void (GL_APIENTRYP PFNGLCLEARCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
typedef void (GL_APIENTRYP PFNGLCLEARDEPTHFPROC) (GLfloat d);
typedef void (GL_APIENTRYP PFNGLCLEARSTENCILPROC) (GLint s);
typedef void (GL_APIENTRYP PFNGLCOLORMASKPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
typedef void (GL_APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader);
typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
typedef void (GL_APIENTRYP PFNGLCOPYTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
typedef GLuint (GL_APIENTRYP PFNGLCREATEPROGRAMPROC) (void);
typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROC) (GLenum type);
typedef void (GL_APIENTRYP PFNGLCULLFACEPROC) (GLenum mode);
typedef void (GL_APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers);
typedef void (GL_APIENTRYP PFNGLDELETEFRAMEBUFFERSPROC) (GLsizei n, const GLuint *framebuffers);
typedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program);
typedef void (GL_APIENTRYP PFNGLDELETERENDERBUFFERSPROC) (GLsizei n, const GLuint *renderbuffers);
typedef void (GL_APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader);
typedef void (GL_APIENTRYP PFNGLDELETETEXTURESPROC) (GLsizei n, const GLuint *textures);
typedef void (GL_APIENTRYP PFNGLDEPTHFUNCPROC) (GLenum func);
typedef void (GL_APIENTRYP PFNGLDEPTHMASKPROC) (GLboolean flag);
typedef void (GL_APIENTRYP PFNGLDEPTHRANGEFPROC) (GLfloat n, GLfloat f);
typedef void (GL_APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader);
typedef void (GL_APIENTRYP PFNGLDISABLEPROC) (GLenum cap);
typedef void (GL_APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index);
typedef void (GL_APIENTRYP PFNGLDRAWARRAYSPROC) (GLenum mode, GLint first, GLsizei count);
typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices);
typedef void (GL_APIENTRYP PFNGLENABLEPROC) (GLenum cap);
typedef void (GL_APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index);
typedef void (GL_APIENTRYP PFNGLFINISHPROC) (void);
typedef void (GL_APIENTRYP PFNGLFLUSHPROC) (void);
typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFERPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
typedef void (GL_APIENTRYP PFNGLFRONTFACEPROC) (GLenum mode);
typedef void (GL_APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers);
typedef void (GL_APIENTRYP PFNGLGENERATEMIPMAPPROC) (GLenum target);
typedef void (GL_APIENTRYP PFNGLGENFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers);
typedef void (GL_APIENTRYP PFNGLGENRENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers);
typedef void (GL_APIENTRYP PFNGLGENTEXTURESPROC) (GLsizei n, GLuint *textures);
typedef void (GL_APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
typedef void (GL_APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders);
typedef GLint (GL_APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name);
typedef void (GL_APIENTRYP PFNGLGETBOOLEANVPROC) (GLenum pname, GLboolean *data);
typedef void (GL_APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
typedef GLenum (GL_APIENTRYP PFNGLGETERRORPROC) (void);
typedef void (GL_APIENTRYP PFNGLGETFLOATVPROC) (GLenum pname, GLfloat *data);
typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params);
typedef void (GL_APIENTRYP PFNGLGETINTEGERVPROC) (GLenum pname, GLint *data);
typedef void (GL_APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params);
typedef void (GL_APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
typedef void (GL_APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
typedef void (GL_APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params);
typedef void (GL_APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
typedef void (GL_APIENTRYP PFNGLGETSHADERPRECISIONFORMATPROC) (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
typedef void (GL_APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
typedef const GLubyte *(GL_APIENTRYP PFNGLGETSTRINGPROC) (GLenum name);
typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
typedef void (GL_APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params);
typedef void (GL_APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params);
typedef GLint (GL_APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name);
typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params);
typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params);
typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, void **pointer);
typedef void (GL_APIENTRYP PFNGLHINTPROC) (GLenum target, GLenum mode);
typedef GLboolean (GL_APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer);
typedef GLboolean (GL_APIENTRYP PFNGLISENABLEDPROC) (GLenum cap);
typedef GLboolean (GL_APIENTRYP PFNGLISFRAMEBUFFERPROC) (GLuint framebuffer);
typedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMPROC) (GLuint program);
typedef GLboolean (GL_APIENTRYP PFNGLISRENDERBUFFERPROC) (GLuint renderbuffer);
typedef GLboolean (GL_APIENTRYP PFNGLISSHADERPROC) (GLuint shader);
typedef GLboolean (GL_APIENTRYP PFNGLISTEXTUREPROC) (GLuint texture);
typedef void (GL_APIENTRYP PFNGLLINEWIDTHPROC) (GLfloat width);
typedef void (GL_APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program);
typedef void (GL_APIENTRYP PFNGLPIXELSTOREIPROC) (GLenum pname, GLint param);
typedef void (GL_APIENTRYP PFNGLPOLYGONOFFSETPROC) (GLfloat factor, GLfloat units);
typedef void (GL_APIENTRYP PFNGLREADPIXELSPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels);
typedef void (GL_APIENTRYP PFNGLRELEASESHADERCOMPILERPROC) (void);
typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
typedef void (GL_APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLfloat value, GLboolean invert);
typedef void (GL_APIENTRYP PFNGLSCISSORPROC) (GLint x, GLint y, GLsizei width, GLsizei height);
typedef void (GL_APIENTRYP PFNGLSHADERBINARYPROC) (GLsizei count, const GLuint *shaders, GLenum binaryFormat, const void *binary, GLsizei length);
typedef void (GL_APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
typedef void (GL_APIENTRYP PFNGLSTENCILFUNCPROC) (GLenum func, GLint ref, GLuint mask);
typedef void (GL_APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum face, GLenum func, GLint ref, GLuint mask);
typedef void (GL_APIENTRYP PFNGLSTENCILMASKPROC) (GLuint mask);
typedef void (GL_APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask);
typedef void (GL_APIENTRYP PFNGLSTENCILOPPROC) (GLenum fail, GLenum zfail, GLenum zpass);
typedef void (GL_APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
typedef void (GL_APIENTRYP PFNGLTEXIMAGE2DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
typedef void (GL_APIENTRYP PFNGLTEXPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat param);
typedef void (GL_APIENTRYP PFNGLTEXPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIPROC) (GLenum target, GLenum pname, GLint param);
typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
typedef void (GL_APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0);
typedef void (GL_APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value);
typedef void (GL_APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0);
typedef void (GL_APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value);
typedef void (GL_APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1);
typedef void (GL_APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value);
typedef void (GL_APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1);
typedef void (GL_APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value);
typedef void (GL_APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
typedef void (GL_APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value);
typedef void (GL_APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2);
typedef void (GL_APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value);
typedef void (GL_APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
typedef void (GL_APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value);
typedef void (GL_APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
typedef void (GL_APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value);
typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
typedef void (GL_APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program);
typedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program);
typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x);
typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v);
typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y);
typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v);
typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v);
typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v);
typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
typedef void (GL_APIENTRYP PFNGLVIEWPORTPROC) (GLint x, GLint y, GLsizei width, GLsizei height);
#if GL_GLES_PROTOTYPES
GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture);
GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader);
GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name);
GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer);
GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);
GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);
GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture);
GL_APICALL void GL_APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
GL_APICALL void GL_APIENTRY glBlendEquation (GLenum mode);
GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage);
GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target);
GL_APICALL void GL_APIENTRY glClear (GLbitfield mask);
GL_APICALL void GL_APIENTRY glClearColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
GL_APICALL void GL_APIENTRY glClearDepthf (GLfloat d);
GL_APICALL void GL_APIENTRY glClearStencil (GLint s);
GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader);
GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
GL_APICALL GLuint GL_APIENTRY glCreateProgram (void);
GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type);
GL_APICALL void GL_APIENTRY glCullFace (GLenum mode);
GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers);
GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers);
GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program);
GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers);
GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader);
GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures);
GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func);
GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag);
GL_APICALL void GL_APIENTRY glDepthRangef (GLfloat n, GLfloat f);
GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader);
GL_APICALL void GL_APIENTRY glDisable (GLenum cap);
GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index);
GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const void *indices);
GL_APICALL void GL_APIENTRY glEnable (GLenum cap);
GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index);
GL_APICALL void GL_APIENTRY glFinish (void);
GL_APICALL void GL_APIENTRY glFlush (void);
GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode);
GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint *buffers);
GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target);
GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers);
GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers);
GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint *textures);
GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders);
GL_APICALL GLint GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar *name);
GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean *data);
GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params);
GL_APICALL GLenum GL_APIENTRY glGetError (void);
GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat *data);
GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params);
GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint *data);
GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params);
GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params);
GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params);
GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
GL_APICALL const GLubyte *GL_APIENTRY glGetString (GLenum name);
GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params);
GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params);
GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat *params);
GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint *params);
GL_APICALL GLint GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar *name);
GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params);
GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params);
GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void **pointer);
GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode);
GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer);
GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap);
GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer (GLuint framebuffer);
GL_APICALL GLboolean GL_APIENTRY glIsProgram (GLuint program);
GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer);
GL_APICALL GLboolean GL_APIENTRY glIsShader (GLuint shader);
GL_APICALL GLboolean GL_APIENTRY glIsTexture (GLuint texture);
GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width);
GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program);
GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param);
GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels);
GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void);
GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
GL_APICALL void GL_APIENTRY glSampleCoverage (GLfloat value, GLboolean invert);
GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryFormat, const void *binary, GLsizei length);
GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);
GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask);
GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);
GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params);
GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params);
GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat v0);
GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value);
GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint v0);
GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value);
GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1);
GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value);
GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint v0, GLint v1);
GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value);
GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value);
GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2);
GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value);
GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value);
GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value);
GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
GL_APICALL void GL_APIENTRY glUseProgram (GLuint program);
GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program);
GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint index, GLfloat x);
GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v);
GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y);
GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v);
GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z);
GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v);
GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v);
GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
#endif
#endif /* GL_ES_VERSION_2_0 */
#ifdef __cplusplus
}
#endif
#endif
File diff suppressed because it is too large. Load diff
@@ -1,27 +0,0 @@
#ifndef __gl2platform_h_
#define __gl2platform_h_
/*
** Copyright 2017-2020 The Khronos Group Inc.
** SPDX-License-Identifier: Apache-2.0
*/
/* Platform-specific types and definitions for OpenGL ES 2.X gl2.h
*
* Adopters may modify khrplatform.h and this file to suit their platform.
* Please contribute modifications back to Khronos as pull requests on the
* public github repository:
* https://github.com/KhronosGroup/OpenGL-Registry
*/
/*#include <KHR/khrplatform.h>*/
#ifndef GL_APICALL
#define GL_APICALL KHRONOS_APICALL
#endif
#ifndef GL_APIENTRY
#define GL_APIENTRY KHRONOS_APIENTRY
#endif
#endif /* __gl2platform_h_ */
@@ -1,311 +0,0 @@
#ifndef __khrplatform_h_
#define __khrplatform_h_
/*
** Copyright (c) 2008-2018 The Khronos Group Inc.
**
** Permission is hereby granted, free of charge, to any person obtaining a
** copy of this software and/or associated documentation files (the
** "Materials"), to deal in the Materials without restriction, including
** without limitation the rights to use, copy, modify, merge, publish,
** distribute, sublicense, and/or sell copies of the Materials, and to
** permit persons to whom the Materials are furnished to do so, subject to
** the following conditions:
**
** The above copyright notice and this permission notice shall be included
** in all copies or substantial portions of the Materials.
**
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
*/
/* Khronos platform-specific types and definitions.
*
* The master copy of khrplatform.h is maintained in the Khronos EGL
* Registry repository at https://github.com/KhronosGroup/EGL-Registry
* The last semantic modification to khrplatform.h was at commit ID:
* 67a3e0864c2d75ea5287b9f3d2eb74a745936692
*
* Adopters may modify this file to suit their platform. Adopters are
* encouraged to submit platform specific modifications to the Khronos
* group so that they can be included in future versions of this file.
* Please submit changes by filing pull requests or issues on
* the EGL Registry repository linked above.
*
*
* See the Implementer's Guidelines for information about where this file
* should be located on your system and for more details of its use:
* http://www.khronos.org/registry/implementers_guide.pdf
*
* This file should be included as
* #include <KHR/khrplatform.h>
* by Khronos client API header files that use its types and defines.
*
* The types in khrplatform.h should only be used to define API-specific types.
*
* Types defined in khrplatform.h:
* khronos_int8_t signed 8 bit
* khronos_uint8_t unsigned 8 bit
* khronos_int16_t signed 16 bit
* khronos_uint16_t unsigned 16 bit
* khronos_int32_t signed 32 bit
* khronos_uint32_t unsigned 32 bit
* khronos_int64_t signed 64 bit
* khronos_uint64_t unsigned 64 bit
* khronos_intptr_t signed same number of bits as a pointer
* khronos_uintptr_t unsigned same number of bits as a pointer
* khronos_ssize_t signed size
* khronos_usize_t unsigned size
* khronos_float_t signed 32 bit floating point
* khronos_time_ns_t unsigned 64 bit time in nanoseconds
* khronos_utime_nanoseconds_t unsigned time interval or absolute time in
* nanoseconds
* khronos_stime_nanoseconds_t signed time interval in nanoseconds
* khronos_boolean_enum_t enumerated boolean type. This should
* only be used as a base type when a client API's boolean type is
* an enum. Client APIs which use an integer or other type for
* booleans cannot use this as the base type for their boolean.
*
* Tokens defined in khrplatform.h:
*
* KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values.
*
* KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0.
* KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0.
*
* Calling convention macros defined in this file:
* KHRONOS_APICALL
* KHRONOS_APIENTRY
* KHRONOS_APIATTRIBUTES
*
* These may be used in function prototypes as:
*
* KHRONOS_APICALL void KHRONOS_APIENTRY funcname(
* int arg1,
* int arg2) KHRONOS_APIATTRIBUTES;
*/
#if defined(__SCITECH_SNAP__) && !defined(KHRONOS_STATIC)
# define KHRONOS_STATIC 1
#endif
/*-------------------------------------------------------------------------
* Definition of KHRONOS_APICALL
*-------------------------------------------------------------------------
* This precedes the return type of the function in the function prototype.
*/
#if defined(KHRONOS_STATIC)
/* If the preprocessor constant KHRONOS_STATIC is defined, make the
* header compatible with static linking. */
# define KHRONOS_APICALL
#elif defined(_WIN32)
# define KHRONOS_APICALL __declspec(dllimport)
#elif defined (__SYMBIAN32__)
# define KHRONOS_APICALL IMPORT_C
#elif defined(__ANDROID__)
# define KHRONOS_APICALL __attribute__((visibility("default")))
#else
# define KHRONOS_APICALL
#endif
/*-------------------------------------------------------------------------
* Definition of KHRONOS_APIENTRY
*-------------------------------------------------------------------------
* This follows the return type of the function and precedes the function
* name in the function prototype.
*/
#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)
/* Win32 but not WinCE */
# define KHRONOS_APIENTRY __stdcall
#else
# define KHRONOS_APIENTRY
#endif
/*-------------------------------------------------------------------------
* Definition of KHRONOS_APIATTRIBUTES
*-------------------------------------------------------------------------
* This follows the closing parenthesis of the function prototype arguments.
*/
#if defined (__ARMCC_2__)
#define KHRONOS_APIATTRIBUTES __softfp
#else
#define KHRONOS_APIATTRIBUTES
#endif
/*-------------------------------------------------------------------------
* basic type definitions
*-----------------------------------------------------------------------*/
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)
/*
* Using <stdint.h>
*/
#include <stdint.h>
typedef int32_t khronos_int32_t;
typedef uint32_t khronos_uint32_t;
typedef int64_t khronos_int64_t;
typedef uint64_t khronos_uint64_t;
#define KHRONOS_SUPPORT_INT64 1
#define KHRONOS_SUPPORT_FLOAT 1
/*
* To support platform where unsigned long cannot be used interchangeably with
* inptr_t (e.g. CHERI-extended ISAs), we can use the stdint.h intptr_t.
* Ideally, we could just use (u)intptr_t everywhere, but this could result in
* ABI breakage if khronos_uintptr_t is changed from unsigned long to
* unsigned long long or similar (this results in different C++ name mangling).
* To avoid changes for existing platforms, we restrict usage of intptr_t to
* platforms where the size of a pointer is larger than the size of long.
*/
#if defined(__SIZEOF_LONG__) && defined(__SIZEOF_POINTER__)
#if __SIZEOF_POINTER__ > __SIZEOF_LONG__
#define KHRONOS_USE_INTPTR_T
#endif
#endif
#elif defined(__VMS ) || defined(__sgi)
/*
* Using <inttypes.h>
*/
#include <inttypes.h>
typedef int32_t khronos_int32_t;
typedef uint32_t khronos_uint32_t;
typedef int64_t khronos_int64_t;
typedef uint64_t khronos_uint64_t;
#define KHRONOS_SUPPORT_INT64 1
#define KHRONOS_SUPPORT_FLOAT 1
#elif defined(_WIN32) && !defined(__SCITECH_SNAP__)
/*
* Win32
*/
typedef __int32 khronos_int32_t;
typedef unsigned __int32 khronos_uint32_t;
typedef __int64 khronos_int64_t;
typedef unsigned __int64 khronos_uint64_t;
#define KHRONOS_SUPPORT_INT64 1
#define KHRONOS_SUPPORT_FLOAT 1
#elif defined(__sun__) || defined(__digital__)
/*
* Sun or Digital
*/
typedef int khronos_int32_t;
typedef unsigned int khronos_uint32_t;
#if defined(__arch64__) || defined(_LP64)
typedef long int khronos_int64_t;
typedef unsigned long int khronos_uint64_t;
#else
typedef long long int khronos_int64_t;
typedef unsigned long long int khronos_uint64_t;
#endif /* __arch64__ */
#define KHRONOS_SUPPORT_INT64 1
#define KHRONOS_SUPPORT_FLOAT 1
#elif 0
/*
* Hypothetical platform with no float or int64 support
*/
typedef int khronos_int32_t;
typedef unsigned int khronos_uint32_t;
#define KHRONOS_SUPPORT_INT64 0
#define KHRONOS_SUPPORT_FLOAT 0
#else
/*
* Generic fallback
*/
#include <stdint.h>
typedef int32_t khronos_int32_t;
typedef uint32_t khronos_uint32_t;
typedef int64_t khronos_int64_t;
typedef uint64_t khronos_uint64_t;
#define KHRONOS_SUPPORT_INT64 1
#define KHRONOS_SUPPORT_FLOAT 1
#endif
/*
* Types that are (so far) the same on all platforms
*/
typedef signed char khronos_int8_t;
typedef unsigned char khronos_uint8_t;
typedef signed short int khronos_int16_t;
typedef unsigned short int khronos_uint16_t;
/*
* Types that differ between LLP64 and LP64 architectures - in LLP64,
* pointers are 64 bits, but 'long' is still 32 bits. Win64 appears
* to be the only LLP64 architecture in current use.
*/
#ifdef KHRONOS_USE_INTPTR_T
typedef intptr_t khronos_intptr_t;
typedef uintptr_t khronos_uintptr_t;
#elif defined(_WIN64)
typedef signed long long int khronos_intptr_t;
typedef unsigned long long int khronos_uintptr_t;
#else
typedef signed long int khronos_intptr_t;
typedef unsigned long int khronos_uintptr_t;
#endif
#if defined(_WIN64)
typedef signed long long int khronos_ssize_t;
typedef unsigned long long int khronos_usize_t;
#else
typedef signed long int khronos_ssize_t;
typedef unsigned long int khronos_usize_t;
#endif
#if KHRONOS_SUPPORT_FLOAT
/*
* Float type
*/
typedef float khronos_float_t;
#endif
#if KHRONOS_SUPPORT_INT64
/* Time types
*
* These types can be used to represent a time interval in nanoseconds or
* an absolute Unadjusted System Time. Unadjusted System Time is the number
* of nanoseconds since some arbitrary system event (e.g. since the last
* time the system booted). The Unadjusted System Time is an unsigned
* 64 bit value that wraps back to 0 every 584 years. Time intervals
* may be either signed or unsigned.
*/
typedef khronos_uint64_t khronos_utime_nanoseconds_t;
typedef khronos_int64_t khronos_stime_nanoseconds_t;
#endif
/*
* Dummy value used to pad enum types to 32 bits.
*/
#ifndef KHRONOS_MAX_ENUM
#define KHRONOS_MAX_ENUM 0x7FFFFFFF
#endif
/*
* Enumerated boolean type
*
* Values other than zero should be considered to be true. Therefore
* comparisons should not be made against KHRONOS_TRUE.
*/
typedef enum {
KHRONOS_FALSE = 0,
KHRONOS_TRUE = 1,
KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM
} khronos_boolean_enum_t;
#endif /* __khrplatform_h_ */
-15
View File
@@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<IncludePath>$(SolutionDir)libs\SDL2_mixer\include;$(IncludePath)</IncludePath>
<LibraryPath>$(SolutionDir)libs\SDL2_mixer\lib\$(PlatformTarget);$(LibraryPath)</LibraryPath>
</PropertyGroup>
<ItemDefinitionGroup>
<Link>
<AdditionalDependencies>SDL2_mixer.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup />
</Project>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-16
View File
@@ -1,16 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Platform)' == 'Win32' OR '$(Platform)' == 'x64'">
<IncludePath>$(SolutionDir)libs\gme\include;$(IncludePath)</IncludePath>
<LibraryPath Condition="'$(Platform)' == 'Win32'">$(SolutionDir)libs\gme\win32;$(LibraryPath)</LibraryPath>
<LibraryPath Condition="'$(Platform)' == 'x64'">$(SolutionDir)libs\gme\win64;$(LibraryPath)</LibraryPath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Platform)' == 'Win32' OR '$(Platform)' == 'x64'">
<Link>
<AdditionalDependencies>libgme.dll.a;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup />
</Project>
-16
View File
@@ -1,16 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<IncludePath>$(SolutionDir)libs\libopenmpt\inc;$(IncludePath)</IncludePath>
<LibraryPath Condition="'$(Platform)' == 'Win32'">$(SolutionDir)libs\libopenmpt\lib\x86;$(LibraryPath)</LibraryPath>
<LibraryPath Condition="'$(Platform)' == 'x64'">$(SolutionDir)libs\libopenmpt\lib\x86_64;$(LibraryPath)</LibraryPath>
</PropertyGroup>
<ItemDefinitionGroup>
<Link>
<AdditionalDependencies>libopenmpt.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup />
</Project>
-10
View File
@@ -1,10 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<IncludePath>$(SolutionDir)libs\libpng-src;$(IncludePath)</IncludePath>
</PropertyGroup>
<ItemDefinitionGroup />
<ItemGroup />
</Project>
-10
View File
@@ -1,10 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<IncludePath>$(SolutionDir)libs\zlib;$(IncludePath)</IncludePath>
</PropertyGroup>
<ItemDefinitionGroup />
<ItemGroup />
</Project>
-1618
View File
File diff suppressed because it is too large. Load diff
-367
View File
@@ -1,367 +0,0 @@
Frequently Asked Questions about zlib
If your question is not there, please check the zlib home page
http://zlib.net/ which may have more recent information.
The latest zlib FAQ is at http://zlib.net/zlib_faq.html
1. Is zlib Y2K-compliant?
Yes. zlib doesn't handle dates.
2. Where can I get a Windows DLL version?
The zlib sources can be compiled without change to produce a DLL. See the
file win32/DLL_FAQ.txt in the zlib distribution.
3. Where can I get a Visual Basic interface to zlib?
See
* http://marknelson.us/1997/01/01/zlib-engine/
* win32/DLL_FAQ.txt in the zlib distribution
4. compress() returns Z_BUF_ERROR.
Make sure that before the call of compress(), the length of the compressed
buffer is equal to the available size of the compressed buffer and not
zero. For Visual Basic, check that this parameter is passed by reference
("as any"), not by value ("as long").
5. deflate() or inflate() returns Z_BUF_ERROR.
Before making the call, make sure that avail_in and avail_out are not zero.
When setting the parameter flush equal to Z_FINISH, also make sure that
avail_out is big enough to allow processing all pending input. Note that a
Z_BUF_ERROR is not fatal--another call to deflate() or inflate() can be
made with more input or output space. A Z_BUF_ERROR may in fact be
unavoidable depending on how the functions are used, since it is not
possible to tell whether or not there is more output pending when
strm.avail_out returns with zero. See http://zlib.net/zlib_how.html for a
heavily annotated example.
6. Where's the zlib documentation (man pages, etc.)?
It's in zlib.h . Examples of zlib usage are in the files test/example.c
and test/minigzip.c, with more in examples/ .
7. Why don't you use GNU autoconf or libtool or ...?
Because we would like to keep zlib as a very small and simple package.
zlib is rather portable and doesn't need much configuration.
8. I found a bug in zlib.
Most of the time, such problems are due to an incorrect usage of zlib.
Please try to reproduce the problem with a small program and send the
corresponding source to us at zlib@gzip.org . Do not send multi-megabyte
data files without prior agreement.
9. Why do I get "undefined reference to gzputc"?
If "make test" produces something like
example.o(.text+0x154): undefined reference to `gzputc'
check that you don't have old files libz.* in /usr/lib, /usr/local/lib or
/usr/X11R6/lib. Remove any old versions, then do "make install".
10. I need a Delphi interface to zlib.
See the contrib/delphi directory in the zlib distribution.
11. Can zlib handle .zip archives?
Not by itself, no. See the directory contrib/minizip in the zlib
distribution.
12. Can zlib handle .Z files?
No, sorry. You have to spawn an uncompress or gunzip subprocess, or adapt
the code of uncompress on your own.
13. How can I make a Unix shared library?
By default a shared (and a static) library is built for Unix. So:
make distclean
./configure
make
14. How do I install a shared zlib library on Unix?
After the above, then:
make install
However, many flavors of Unix come with a shared zlib already installed.
Before going to the trouble of compiling a shared version of zlib and
trying to install it, you may want to check if it's already there! If you
can #include <zlib.h>, it's there. The -lz option will probably link to
it. You can check the version at the top of zlib.h or with the
ZLIB_VERSION symbol defined in zlib.h .
15. I have a question about OttoPDF.
We are not the authors of OttoPDF. The real author is on the OttoPDF web
site: Joel Hainley, jhainley@myndkryme.com.
16. Can zlib decode Flate data in an Adobe PDF file?
Yes. See http://www.pdflib.com/ . To modify PDF forms, see
http://sourceforge.net/projects/acroformtool/ .
17. Why am I getting this "register_frame_info not found" error on Solaris?
After installing zlib 1.1.4 on Solaris 2.6, running applications using zlib
generates an error such as:
ld.so.1: rpm: fatal: relocation error: file /usr/local/lib/libz.so:
symbol __register_frame_info: referenced symbol not found
The symbol __register_frame_info is not part of zlib, it is generated by
the C compiler (cc or gcc). You must recompile applications using zlib
which have this problem. This problem is specific to Solaris. See
http://www.sunfreeware.com for Solaris versions of zlib and applications
using zlib.
18. Why does gzip give an error on a file I make with compress/deflate?
The compress and deflate functions produce data in the zlib format, which
is different and incompatible with the gzip format. The gz* functions in
zlib on the other hand use the gzip format. Both the zlib and gzip formats
use the same compressed data format internally, but have different headers
and trailers around the compressed data.
19. Ok, so why are there two different formats?
The gzip format was designed to retain the directory information about a
single file, such as the name and last modification date. The zlib format
on the other hand was designed for in-memory and communication channel
applications, and has a much more compact header and trailer and uses a
faster integrity check than gzip.
20. Well that's nice, but how do I make a gzip file in memory?
You can request that deflate write the gzip format instead of the zlib
format using deflateInit2(). You can also request that inflate decode the
gzip format using inflateInit2(). Read zlib.h for more details.
21. Is zlib thread-safe?
Yes. However any library routines that zlib uses and any application-
provided memory allocation routines must also be thread-safe. zlib's gz*
functions use stdio library routines, and most of zlib's functions use the
library memory allocation routines by default. zlib's *Init* functions
allow for the application to provide custom memory allocation routines.
Of course, you should only operate on any given zlib or gzip stream from a
single thread at a time.
22. Can I use zlib in my commercial application?
Yes. Please read the license in zlib.h.
23. Is zlib under the GNU license?
No. Please read the license in zlib.h.
24. The license says that altered source versions must be "plainly marked". So
what exactly do I need to do to meet that requirement?
You need to change the ZLIB_VERSION and ZLIB_VERNUM #defines in zlib.h. In
particular, the final version number needs to be changed to "f", and an
identification string should be appended to ZLIB_VERSION. Version numbers
x.x.x.f are reserved for modifications to zlib by others than the zlib
maintainers. For example, if the version of the base zlib you are altering
is "1.2.3.4", then in zlib.h you should change ZLIB_VERNUM to 0x123f, and
ZLIB_VERSION to something like "1.2.3.f-zachary-mods-v3". You can also
update the version strings in deflate.c and inftrees.c.
For altered source distributions, you should also note the origin and
nature of the changes in zlib.h, as well as in ChangeLog and README, along
with the dates of the alterations. The origin should include at least your
name (or your company's name), and an email address to contact for help or
issues with the library.
Note that distributing a compiled zlib library along with zlib.h and
zconf.h is also a source distribution, and so you should change
ZLIB_VERSION and ZLIB_VERNUM and note the origin and nature of the changes
in zlib.h as you would for a full source distribution.
25. Will zlib work on a big-endian or little-endian architecture, and can I
exchange compressed data between them?
Yes and yes.
26. Will zlib work on a 64-bit machine?
Yes. It has been tested on 64-bit machines, and has no dependence on any
data types being limited to 32-bits in length. If you have any
difficulties, please provide a complete problem report to zlib@gzip.org
27. Will zlib decompress data from the PKWare Data Compression Library?
No. The PKWare DCL uses a completely different compressed data format than
does PKZIP and zlib. However, you can look in zlib's contrib/blast
directory for a possible solution to your problem.
28. Can I access data randomly in a compressed stream?
No, not without some preparation. If when compressing you periodically use
Z_FULL_FLUSH, carefully write all the pending data at those points, and
keep an index of those locations, then you can start decompression at those
points. You have to be careful to not use Z_FULL_FLUSH too often, since it
can significantly degrade compression. Alternatively, you can scan a
deflate stream once to generate an index, and then use that index for
random access. See examples/zran.c .
29. Does zlib work on MVS, OS/390, CICS, etc.?
It has in the past, but we have not heard of any recent evidence. There
were working ports of zlib 1.1.4 to MVS, but those links no longer work.
If you know of recent, successful applications of zlib on these operating
systems, please let us know. Thanks.
30. Is there some simpler, easier to read version of inflate I can look at to
understand the deflate format?
First off, you should read RFC 1951. Second, yes. Look in zlib's
contrib/puff directory.
31. Does zlib infringe on any patents?
As far as we know, no. In fact, that was originally the whole point behind
zlib. Look here for some more information:
http://www.gzip.org/#faq11
32. Can zlib work with greater than 4 GB of data?
Yes. inflate() and deflate() will process any amount of data correctly.
Each call of inflate() or deflate() is limited to input and output chunks
of the maximum value that can be stored in the compiler's "unsigned int"
type, but there is no limit to the number of chunks. Note however that the
strm.total_in and strm_total_out counters may be limited to 4 GB. These
counters are provided as a convenience and are not used internally by
inflate() or deflate(). The application can easily set up its own counters
updated after each call of inflate() or deflate() to count beyond 4 GB.
compress() and uncompress() may be limited to 4 GB, since they operate in a
single call. gzseek() and gztell() may be limited to 4 GB depending on how
zlib is compiled. See the zlibCompileFlags() function in zlib.h.
The word "may" appears several times above since there is a 4 GB limit only
if the compiler's "long" type is 32 bits. If the compiler's "long" type is
64 bits, then the limit is 16 exabytes.
33. Does zlib have any security vulnerabilities?
The only one that we are aware of is potentially in gzprintf(). If zlib is
compiled to use sprintf() or vsprintf(), then there is no protection
against a buffer overflow of an 8K string space (or other value as set by
gzbuffer()), other than the caller of gzprintf() assuring that the output
will not exceed 8K. On the other hand, if zlib is compiled to use
snprintf() or vsnprintf(), which should normally be the case, then there is
no vulnerability. The ./configure script will display warnings if an
insecure variation of sprintf() will be used by gzprintf(). Also the
zlibCompileFlags() function will return information on what variant of
sprintf() is used by gzprintf().
If you don't have snprintf() or vsnprintf() and would like one, you can
find a portable implementation here:
http://www.ijs.si/software/snprintf/
Note that you should be using the most recent version of zlib. Versions
1.1.3 and before were subject to a double-free vulnerability, and versions
1.2.1 and 1.2.2 were subject to an access exception when decompressing
invalid compressed data.
34. Is there a Java version of zlib?
Probably what you want is to use zlib in Java. zlib is already included
as part of the Java SDK in the java.util.zip package. If you really want
a version of zlib written in the Java language, look on the zlib home
page for links: http://zlib.net/ .
35. I get this or that compiler or source-code scanner warning when I crank it
up to maximally-pedantic. Can't you guys write proper code?
Many years ago, we gave up attempting to avoid warnings on every compiler
in the universe. It just got to be a waste of time, and some compilers
were downright silly as well as contradicted each other. So now, we simply
make sure that the code always works.
36. Valgrind (or some similar memory access checker) says that deflate is
performing a conditional jump that depends on an uninitialized value.
Isn't that a bug?
No. That is intentional for performance reasons, and the output of deflate
is not affected. This only started showing up recently since zlib 1.2.x
uses malloc() by default for allocations, whereas earlier versions used
calloc(), which zeros out the allocated memory. Even though the code was
correct, versions 1.2.4 and later was changed to not stimulate these
checkers.
37. Will zlib read the (insert any ancient or arcane format here) compressed
data format?
Probably not. Look in the comp.compression FAQ for pointers to various
formats and associated software.
38. How can I encrypt/decrypt zip files with zlib?
zlib doesn't support encryption. The original PKZIP encryption is very
weak and can be broken with freely available programs. To get strong
encryption, use GnuPG, http://www.gnupg.org/ , which already includes zlib
compression. For PKZIP compatible "encryption", look at
http://www.info-zip.org/
39. What's the difference between the "gzip" and "deflate" HTTP 1.1 encodings?
"gzip" is the gzip format, and "deflate" is the zlib format. They should
probably have called the second one "zlib" instead to avoid confusion with
the raw deflate compressed data format. While the HTTP 1.1 RFC 2616
correctly points to the zlib specification in RFC 1950 for the "deflate"
transfer encoding, there have been reports of servers and browsers that
incorrectly produce or expect raw deflate data per the deflate
specification in RFC 1951, most notably Microsoft. So even though the
"deflate" transfer encoding using the zlib format would be the more
efficient approach (and in fact exactly what the zlib format was designed
for), using the "gzip" transfer encoding is probably more reliable due to
an unfortunate choice of name on the part of the HTTP 1.1 authors.
Bottom line: use the gzip format for HTTP 1.1 encoding.
40. Does zlib support the new "Deflate64" format introduced by PKWare?
No. PKWare has apparently decided to keep that format proprietary, since
they have not documented it as they have previous compression formats. In
any case, the compression improvements are so modest compared to other more
modern approaches, that it's not worth the effort to implement.
41. I'm having a problem with the zip functions in zlib, can you help?
There are no zip functions in zlib. You are probably using minizip by
Giles Vollant, which is found in the contrib directory of zlib. It is not
part of zlib. In fact none of the stuff in contrib is part of zlib. The
files in there are not supported by the zlib authors. You need to contact
the authors of the respective contribution for help.
42. The match.asm code in contrib is under the GNU General Public License.
Since it's part of zlib, doesn't that mean that all of zlib falls under the
GNU GPL?
No. The files in contrib are not part of zlib. They were contributed by
other authors and are provided as a convenience to the user within the zlib
distribution. Each item in contrib has its own license.
43. Is zlib subject to export controls? What is its ECCN?
zlib is not subject to export controls, and so is classified as EAR99.
44. Can you please sign these lengthy legal documents and fax them back to us
so that we can use your software in our product?
No. Go away. Shoo.
-68
View File
@@ -1,68 +0,0 @@
CMakeLists.txt cmake build file
ChangeLog history of changes
FAQ Frequently Asked Questions about zlib
INDEX this file
Makefile dummy Makefile that tells you to ./configure
Makefile.in template for Unix Makefile
README guess what
configure configure script for Unix
make_vms.com makefile for VMS
test/example.c zlib usages examples for build testing
test/minigzip.c minimal gzip-like functionality for build testing
test/infcover.c inf*.c code coverage for build coverage testing
treebuild.xml XML description of source file dependencies
zconf.h.cmakein zconf.h template for cmake
zconf.h.in zconf.h template for configure
zlib.3 Man page for zlib
zlib.3.pdf Man page in PDF format
zlib.map Linux symbol information
zlib.pc.in Template for pkg-config descriptor
zlib.pc.cmakein zlib.pc template for cmake
zlib2ansi perl script to convert source files for C++ compilation
amiga/ makefiles for Amiga SAS C
as400/ makefiles for AS/400
doc/ documentation for formats and algorithms
msdos/ makefiles for MSDOS
nintendods/ makefile for Nintendo DS
old/ makefiles for various architectures and zlib documentation
files that have not yet been updated for zlib 1.2.x
qnx/ makefiles for QNX
watcom/ makefiles for OpenWatcom
win32/ makefiles for Windows
zlib public header files (required for library use):
zconf.h
zlib.h
private source files used to build the zlib library:
adler32.c
compress.c
crc32.c
crc32.h
deflate.c
deflate.h
gzclose.c
gzguts.h
gzlib.c
gzread.c
gzwrite.c
infback.c
inffast.c
inffast.h
inffixed.h
inflate.c
inflate.h
inftrees.c
inftrees.h
trees.c
trees.h
uncompr.c
zutil.c
zutil.h
source files for sample programs
See examples/README.examples
unsupported contributions by third parties
See contrib/README.contrib
-22
View File
@@ -1,22 +0,0 @@
Copyright notice:
(C) 1995-2022 Jean-loup Gailly and Mark Adler
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
Jean-loup Gailly Mark Adler
jloup@gzip.org madler@alumni.caltech.edu
-117
View File
@@ -1,117 +0,0 @@
ZLIB DATA COMPRESSION LIBRARY
zlib 1.3.1 is a general purpose data compression library. All the code is
thread safe. The data format used by the zlib library is described by RFCs
(Request for Comments) 1950 to 1952 in the files
http://tools.ietf.org/html/rfc1950 (zlib format), rfc1951 (deflate format) and
rfc1952 (gzip format).
All functions of the compression library are documented in the file zlib.h
(volunteer to write man pages welcome, contact zlib@gzip.org). A usage example
of the library is given in the file test/example.c which also tests that
the library is working correctly. Another example is given in the file
test/minigzip.c. The compression library itself is composed of all source
files in the root directory.
To compile all files and run the test program, follow the instructions given at
the top of Makefile.in. In short "./configure; make test", and if that goes
well, "make install" should work for most flavors of Unix. For Windows, use
one of the special makefiles in win32/ or contrib/vstudio/ . For VMS, use
make_vms.com.
Questions about zlib should be sent to <zlib@gzip.org>, or to Gilles Vollant
<info@winimage.com> for the Windows DLL version. The zlib home page is
http://zlib.net/ . Before reporting a problem, please check this site to
verify that you have the latest version of zlib; otherwise get the latest
version and check whether the problem still exists or not.
PLEASE read the zlib FAQ http://zlib.net/zlib_faq.html before asking for help.
Mark Nelson <markn@ieee.org> wrote an article about zlib for the Jan. 1997
issue of Dr. Dobb's Journal; a copy of the article is available at
https://marknelson.us/posts/1997/01/01/zlib-engine.html .
The changes made in version 1.3.1 are documented in the file ChangeLog.
Unsupported third party contributions are provided in directory contrib/ .
zlib is available in Java using the java.util.zip package. Follow the API
Documentation link at: https://docs.oracle.com/search/?q=java.util.zip .
A Perl interface to zlib and bzip2 written by Paul Marquess <pmqs@cpan.org>
can be found at https://github.com/pmqs/IO-Compress .
A Python interface to zlib written by A.M. Kuchling <amk@amk.ca> is
available in Python 1.5 and later versions, see
http://docs.python.org/library/zlib.html .
zlib is built into tcl: http://wiki.tcl.tk/4610 .
An experimental package to read and write files in .zip format, written on top
of zlib by Gilles Vollant <info@winimage.com>, is available in the
contrib/minizip directory of zlib.
Notes for some targets:
- For Windows DLL versions, please see win32/DLL_FAQ.txt
- For 64-bit Irix, deflate.c must be compiled without any optimization. With
-O, one libpng test fails. The test works in 32 bit mode (with the -n32
compiler flag). The compiler bug has been reported to SGI.
- zlib doesn't work with gcc 2.6.3 on a DEC 3000/300LX under OSF/1 2.1 it works
when compiled with cc.
- On Digital Unix 4.0D (formerly OSF/1) on AlphaServer, the cc option -std1 is
necessary to get gzprintf working correctly. This is done by configure.
- zlib doesn't work on HP-UX 9.05 with some versions of /bin/cc. It works with
other compilers. Use "make test" to check your compiler.
- gzdopen is not supported on RISCOS or BEOS.
- For PalmOs, see http://palmzlib.sourceforge.net/
Acknowledgments:
The deflate format used by zlib was defined by Phil Katz. The deflate and
zlib specifications were written by L. Peter Deutsch. Thanks to all the
people who reported problems and suggested various improvements in zlib; they
are too numerous to cite here.
Copyright notice:
(C) 1995-2024 Jean-loup Gailly and Mark Adler
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
Jean-loup Gailly Mark Adler
jloup@gzip.org madler@alumni.caltech.edu
If you use the zlib library in a product, we would appreciate *not* receiving
lengthy legal documents to sign. The sources are provided for free but without
warranty of any kind. The library has been entirely written by Jean-loup
Gailly and Mark Adler; it does not include third-party code. We make all
contributions to and distributions of this project solely in our personal
capacity, and are not conveying any rights to any intellectual property of
any third parties.
If you redistribute modified sources, we would appreciate that you include in
the file ChangeLog history information documenting your changes. Please read
the FAQ for more information on the distribution of modified source versions.
-23
View File
@@ -1,23 +0,0 @@
/* gzclose.c -- zlib gzclose() function
* Copyright (C) 2004, 2010 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
#include "gzguts.h"
/* gzclose() is in a separate file so that it is linked in only if it is used.
That way the other gzclose functions can be used instead to avoid linking in
unneeded compression or decompression routines. */
int ZEXPORT gzclose(gzFile file) {
#ifndef NO_GZCOMPRESS
gz_statep state;
if (file == NULL)
return Z_STREAM_ERROR;
state = (gz_statep)file;
return state->mode == GZ_READ ? gzclose_r(file) : gzclose_w(file);
#else
return gzclose_r(file);
#endif
}
-602
View File
@@ -1,602 +0,0 @@
/* gzread.c -- zlib functions for reading gzip files
* Copyright (C) 2004-2017 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
#include "gzguts.h"
/* Use read() to load a buffer -- return -1 on error, otherwise 0. Read from
state->fd, and update state->eof, state->err, and state->msg as appropriate.
This function needs to loop on read(), since read() is not guaranteed to
read the number of bytes requested, depending on the type of descriptor. */
local int gz_load(gz_statep state, unsigned char *buf, unsigned len,
unsigned *have) {
int ret;
unsigned get, max = ((unsigned)-1 >> 2) + 1;
*have = 0;
do {
get = len - *have;
if (get > max)
get = max;
ret = read(state->fd, buf + *have, get);
if (ret <= 0)
break;
*have += (unsigned)ret;
} while (*have < len);
if (ret < 0) {
gz_error(state, Z_ERRNO, zstrerror());
return -1;
}
if (ret == 0)
state->eof = 1;
return 0;
}
/* Load up input buffer and set eof flag if last data loaded -- return -1 on
error, 0 otherwise. Note that the eof flag is set when the end of the input
file is reached, even though there may be unused data in the buffer. Once
that data has been used, no more attempts will be made to read the file.
If strm->avail_in != 0, then the current data is moved to the beginning of
the input buffer, and then the remainder of the buffer is loaded with the
available data from the input file. */
local int gz_avail(gz_statep state) {
unsigned got;
z_streamp strm = &(state->strm);
if (state->err != Z_OK && state->err != Z_BUF_ERROR)
return -1;
if (state->eof == 0) {
if (strm->avail_in) { /* copy what's there to the start */
unsigned char *p = state->in;
unsigned const char *q = strm->next_in;
unsigned n = strm->avail_in;
do {
*p++ = *q++;
} while (--n);
}
if (gz_load(state, state->in + strm->avail_in,
state->size - strm->avail_in, &got) == -1)
return -1;
strm->avail_in += got;
strm->next_in = state->in;
}
return 0;
}
/* Look for gzip header, set up for inflate or copy. state->x.have must be 0.
If this is the first time in, allocate required memory. state->how will be
left unchanged if there is no more input data available, will be set to COPY
if there is no gzip header and direct copying will be performed, or it will
be set to GZIP for decompression. If direct copying, then leftover input
data from the input buffer will be copied to the output buffer. In that
case, all further file reads will be directly to either the output buffer or
a user buffer. If decompressing, the inflate state will be initialized.
gz_look() will return 0 on success or -1 on failure. */
local int gz_look(gz_statep state) {
z_streamp strm = &(state->strm);
/* allocate read buffers and inflate memory */
if (state->size == 0) {
/* allocate buffers */
state->in = (unsigned char *)malloc(state->want);
state->out = (unsigned char *)malloc(state->want << 1);
if (state->in == NULL || state->out == NULL) {
free(state->out);
free(state->in);
gz_error(state, Z_MEM_ERROR, "out of memory");
return -1;
}
state->size = state->want;
/* allocate inflate memory */
state->strm.zalloc = Z_NULL;
state->strm.zfree = Z_NULL;
state->strm.opaque = Z_NULL;
state->strm.avail_in = 0;
state->strm.next_in = Z_NULL;
if (inflateInit2(&(state->strm), 15 + 16) != Z_OK) { /* gunzip */
free(state->out);
free(state->in);
state->size = 0;
gz_error(state, Z_MEM_ERROR, "out of memory");
return -1;
}
}
/* get at least the magic bytes in the input buffer */
if (strm->avail_in < 2) {
if (gz_avail(state) == -1)
return -1;
if (strm->avail_in == 0)
return 0;
}
/* look for gzip magic bytes -- if there, do gzip decoding (note: there is
a logical dilemma here when considering the case of a partially written
gzip file, to wit, if a single 31 byte is written, then we cannot tell
whether this is a single-byte file, or just a partially written gzip
file -- for here we assume that if a gzip file is being written, then
the header will be written in a single operation, so that reading a
single byte is sufficient indication that it is not a gzip file) */
if (strm->avail_in > 1 &&
strm->next_in[0] == 31 && strm->next_in[1] == 139) {
inflateReset(strm);
state->how = GZIP;
state->direct = 0;
return 0;
}
/* no gzip header -- if we were decoding gzip before, then this is trailing
garbage. Ignore the trailing garbage and finish. */
if (state->direct == 0) {
strm->avail_in = 0;
state->eof = 1;
state->x.have = 0;
return 0;
}
/* doing raw i/o, copy any leftover input to output -- this assumes that
the output buffer is larger than the input buffer, which also assures
space for gzungetc() */
state->x.next = state->out;
memcpy(state->x.next, strm->next_in, strm->avail_in);
state->x.have = strm->avail_in;
strm->avail_in = 0;
state->how = COPY;
state->direct = 1;
return 0;
}
/* Decompress from input to the provided next_out and avail_out in the state.
On return, state->x.have and state->x.next point to the just decompressed
data. If the gzip stream completes, state->how is reset to LOOK to look for
the next gzip stream or raw data, once state->x.have is depleted. Returns 0
on success, -1 on failure. */
local int gz_decomp(gz_statep state) {
int ret = Z_OK;
unsigned had;
z_streamp strm = &(state->strm);
/* fill output buffer up to end of deflate stream */
had = strm->avail_out;
do {
/* get more input for inflate() */
if (strm->avail_in == 0 && gz_avail(state) == -1)
return -1;
if (strm->avail_in == 0) {
gz_error(state, Z_BUF_ERROR, "unexpected end of file");
break;
}
/* decompress and handle errors */
ret = inflate(strm, Z_NO_FLUSH);
if (ret == Z_STREAM_ERROR || ret == Z_NEED_DICT) {
gz_error(state, Z_STREAM_ERROR,
"internal error: inflate stream corrupt");
return -1;
}
if (ret == Z_MEM_ERROR) {
gz_error(state, Z_MEM_ERROR, "out of memory");
return -1;
}
if (ret == Z_DATA_ERROR) { /* deflate stream invalid */
gz_error(state, Z_DATA_ERROR,
strm->msg == NULL ? "compressed data error" : strm->msg);
return -1;
}
} while (strm->avail_out && ret != Z_STREAM_END);
/* update available output */
state->x.have = had - strm->avail_out;
state->x.next = strm->next_out - state->x.have;
/* if the gzip stream completed successfully, look for another */
if (ret == Z_STREAM_END)
state->how = LOOK;
/* good decompression */
return 0;
}
/* Fetch data and put it in the output buffer. Assumes state->x.have is 0.
Data is either copied from the input file or decompressed from the input
file depending on state->how. If state->how is LOOK, then a gzip header is
looked for to determine whether to copy or decompress. Returns -1 on error,
otherwise 0. gz_fetch() will leave state->how as COPY or GZIP unless the
end of the input file has been reached and all data has been processed. */
local int gz_fetch(gz_statep state) {
z_streamp strm = &(state->strm);
do {
switch(state->how) {
case LOOK: /* -> LOOK, COPY (only if never GZIP), or GZIP */
if (gz_look(state) == -1)
return -1;
if (state->how == LOOK)
return 0;
break;
case COPY: /* -> COPY */
if (gz_load(state, state->out, state->size << 1, &(state->x.have))
== -1)
return -1;
state->x.next = state->out;
return 0;
case GZIP: /* -> GZIP or LOOK (if end of gzip stream) */
strm->avail_out = state->size << 1;
strm->next_out = state->out;
if (gz_decomp(state) == -1)
return -1;
}
} while (state->x.have == 0 && (!state->eof || strm->avail_in));
return 0;
}
/* Skip len uncompressed bytes of output. Return -1 on error, 0 on success. */
local int gz_skip(gz_statep state, z_off64_t len) {
unsigned n;
/* skip over len bytes or reach end-of-file, whichever comes first */
while (len)
/* skip over whatever is in output buffer */
if (state->x.have) {
n = GT_OFF(state->x.have) || (z_off64_t)state->x.have > len ?
(unsigned)len : state->x.have;
state->x.have -= n;
state->x.next += n;
state->x.pos += n;
len -= n;
}
/* output buffer empty -- return if we're at the end of the input */
else if (state->eof && state->strm.avail_in == 0)
break;
/* need more data to skip -- load up output buffer */
else {
/* get more output, looking for header if required */
if (gz_fetch(state) == -1)
return -1;
}
return 0;
}
/* Read len bytes into buf from file, or less than len up to the end of the
input. Return the number of bytes read. If zero is returned, either the
end of file was reached, or there was an error. state->err must be
consulted in that case to determine which. */
local z_size_t gz_read(gz_statep state, voidp buf, z_size_t len) {
z_size_t got;
unsigned n;
/* if len is zero, avoid unnecessary operations */
if (len == 0)
return 0;
/* process a skip request */
if (state->seek) {
state->seek = 0;
if (gz_skip(state, state->skip) == -1)
return 0;
}
/* get len bytes to buf, or less than len if at the end */
got = 0;
do {
/* set n to the maximum amount of len that fits in an unsigned int */
n = (unsigned)-1;
if (n > len)
n = (unsigned)len;
/* first just try copying data from the output buffer */
if (state->x.have) {
if (state->x.have < n)
n = state->x.have;
memcpy(buf, state->x.next, n);
state->x.next += n;
state->x.have -= n;
}
/* output buffer empty -- return if we're at the end of the input */
else if (state->eof && state->strm.avail_in == 0) {
state->past = 1; /* tried to read past end */
break;
}
/* need output data -- for small len or new stream load up our output
buffer */
else if (state->how == LOOK || n < (state->size << 1)) {
/* get more output, looking for header if required */
if (gz_fetch(state) == -1)
return 0;
continue; /* no progress yet -- go back to copy above */
/* the copy above assures that we will leave with space in the
output buffer, allowing at least one gzungetc() to succeed */
}
/* large len -- read directly into user buffer */
else if (state->how == COPY) { /* read directly */
if (gz_load(state, (unsigned char *)buf, n, &n) == -1)
return 0;
}
/* large len -- decompress directly into user buffer */
else { /* state->how == GZIP */
state->strm.avail_out = n;
state->strm.next_out = (unsigned char *)buf;
if (gz_decomp(state) == -1)
return 0;
n = state->x.have;
state->x.have = 0;
}
/* update progress */
len -= n;
buf = (char *)buf + n;
got += n;
state->x.pos += n;
} while (len);
/* return number of bytes read into user buffer */
return got;
}
/* -- see zlib.h -- */
int ZEXPORT gzread(gzFile file, voidp buf, unsigned len) {
gz_statep state;
/* get internal structure */
if (file == NULL)
return -1;
state = (gz_statep)file;
/* check that we're reading and that there's no (serious) error */
if (state->mode != GZ_READ ||
(state->err != Z_OK && state->err != Z_BUF_ERROR))
return -1;
/* since an int is returned, make sure len fits in one, otherwise return
with an error (this avoids a flaw in the interface) */
if ((int)len < 0) {
gz_error(state, Z_STREAM_ERROR, "request does not fit in an int");
return -1;
}
/* read len or fewer bytes to buf */
len = (unsigned)gz_read(state, buf, len);
/* check for an error */
if (len == 0 && state->err != Z_OK && state->err != Z_BUF_ERROR)
return -1;
/* return the number of bytes read (this is assured to fit in an int) */
return (int)len;
}
/* -- see zlib.h -- */
z_size_t ZEXPORT gzfread(voidp buf, z_size_t size, z_size_t nitems, gzFile file) {
z_size_t len;
gz_statep state;
/* get internal structure */
if (file == NULL)
return 0;
state = (gz_statep)file;
/* check that we're reading and that there's no (serious) error */
if (state->mode != GZ_READ ||
(state->err != Z_OK && state->err != Z_BUF_ERROR))
return 0;
/* compute bytes to read -- error on overflow */
len = nitems * size;
if (size && len / size != nitems) {
gz_error(state, Z_STREAM_ERROR, "request does not fit in a size_t");
return 0;
}
/* read len or fewer bytes to buf, return the number of full items read */
return len ? gz_read(state, buf, len) / size : 0;
}
/* -- see zlib.h -- */
#ifdef Z_PREFIX_SET
# undef z_gzgetc
#else
# undef gzgetc
#endif
int ZEXPORT gzgetc(gzFile file) {
unsigned char buf[1];
gz_statep state;
/* get internal structure */
if (file == NULL)
return -1;
state = (gz_statep)file;
/* check that we're reading and that there's no (serious) error */
if (state->mode != GZ_READ ||
(state->err != Z_OK && state->err != Z_BUF_ERROR))
return -1;
/* try output buffer (no need to check for skip request) */
if (state->x.have) {
state->x.have--;
state->x.pos++;
return *(state->x.next)++;
}
/* nothing there -- try gz_read() */
return gz_read(state, buf, 1) < 1 ? -1 : buf[0];
}
int ZEXPORT gzgetc_(gzFile file) {
return gzgetc(file);
}
/* -- see zlib.h -- */
int ZEXPORT gzungetc(int c, gzFile file) {
gz_statep state;
/* get internal structure */
if (file == NULL)
return -1;
state = (gz_statep)file;
/* in case this was just opened, set up the input buffer */
if (state->mode == GZ_READ && state->how == LOOK && state->x.have == 0)
(void)gz_look(state);
/* check that we're reading and that there's no (serious) error */
if (state->mode != GZ_READ ||
(state->err != Z_OK && state->err != Z_BUF_ERROR))
return -1;
/* process a skip request */
if (state->seek) {
state->seek = 0;
if (gz_skip(state, state->skip) == -1)
return -1;
}
/* can't push EOF */
if (c < 0)
return -1;
/* if output buffer empty, put byte at end (allows more pushing) */
if (state->x.have == 0) {
state->x.have = 1;
state->x.next = state->out + (state->size << 1) - 1;
state->x.next[0] = (unsigned char)c;
state->x.pos--;
state->past = 0;
return c;
}
/* if no room, give up (must have already done a gzungetc()) */
if (state->x.have == (state->size << 1)) {
gz_error(state, Z_DATA_ERROR, "out of room to push characters");
return -1;
}
/* slide output data if needed and insert byte before existing data */
if (state->x.next == state->out) {
unsigned char *src = state->out + state->x.have;
unsigned char *dest = state->out + (state->size << 1);
while (src > state->out)
*--dest = *--src;
state->x.next = dest;
}
state->x.have++;
state->x.next--;
state->x.next[0] = (unsigned char)c;
state->x.pos--;
state->past = 0;
return c;
}
/* -- see zlib.h -- */
char * ZEXPORT gzgets(gzFile file, char *buf, int len) {
unsigned left, n;
char *str;
unsigned char *eol;
gz_statep state;
/* check parameters and get internal structure */
if (file == NULL || buf == NULL || len < 1)
return NULL;
state = (gz_statep)file;
/* check that we're reading and that there's no (serious) error */
if (state->mode != GZ_READ ||
(state->err != Z_OK && state->err != Z_BUF_ERROR))
return NULL;
/* process a skip request */
if (state->seek) {
state->seek = 0;
if (gz_skip(state, state->skip) == -1)
return NULL;
}
/* copy output bytes up to new line or len - 1, whichever comes first --
append a terminating zero to the string (we don't check for a zero in
the contents, let the user worry about that) */
str = buf;
left = (unsigned)len - 1;
if (left) do {
/* assure that something is in the output buffer */
if (state->x.have == 0 && gz_fetch(state) == -1)
return NULL; /* error */
if (state->x.have == 0) { /* end of file */
state->past = 1; /* read past end */
break; /* return what we have */
}
/* look for end-of-line in current output buffer */
n = state->x.have > left ? left : state->x.have;
eol = (unsigned char *)memchr(state->x.next, '\n', n);
if (eol != NULL)
n = (unsigned)(eol - state->x.next) + 1;
/* copy through end-of-line, or remainder if not found */
memcpy(buf, state->x.next, n);
state->x.have -= n;
state->x.next += n;
state->x.pos += n;
left -= n;
buf += n;
} while (left && eol == NULL);
/* return terminated string, or if nothing, end of file */
if (buf == str)
return NULL;
buf[0] = 0;
return str;
}
/* -- see zlib.h -- */
int ZEXPORT gzdirect(gzFile file) {
gz_statep state;
/* get internal structure */
if (file == NULL)
return 0;
state = (gz_statep)file;
/* if the state is not known, but we can find out, then do so (this is
mainly for right after a gzopen() or gzdopen()) */
if (state->mode == GZ_READ && state->how == LOOK && state->x.have == 0)
(void)gz_look(state);
/* return 1 if transparent, 0 if processing a gzip stream */
return state->direct;
}
/* -- see zlib.h -- */
int ZEXPORT gzclose_r(gzFile file) {
int ret, err;
gz_statep state;
/* get internal structure */
if (file == NULL)
return Z_STREAM_ERROR;
state = (gz_statep)file;
/* check that we're reading */
if (state->mode != GZ_READ)
return Z_STREAM_ERROR;
/* free memory and close file */
if (state->size) {
inflateEnd(&(state->strm));
free(state->out);
free(state->in);
}
err = state->err == Z_BUF_ERROR ? Z_BUF_ERROR : Z_OK;
gz_error(state, Z_OK, NULL);
free(state->path);
ret = close(state->fd);
free(state);
return ret ? Z_ERRNO : err;
}
-320
View File
@@ -1,320 +0,0 @@
/* inffast.c -- fast decoding
* Copyright (C) 1995-2017 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
#include "zutil.h"
#include "inftrees.h"
#include "inflate.h"
#include "inffast.h"
#ifdef ASMINF
# pragma message("Assembler code may have bugs -- use at your own risk")
#else
/*
Decode literal, length, and distance codes and write out the resulting
literal and match bytes until either not enough input or output is
available, an end-of-block is encountered, or a data error is encountered.
When large enough input and output buffers are supplied to inflate(), for
example, a 16K input buffer and a 64K output buffer, more than 95% of the
inflate execution time is spent in this routine.
Entry assumptions:
state->mode == LEN
strm->avail_in >= 6
strm->avail_out >= 258
start >= strm->avail_out
state->bits < 8
On return, state->mode is one of:
LEN -- ran out of enough output space or enough available input
TYPE -- reached end of block code, inflate() to interpret next block
BAD -- error in block data
Notes:
- The maximum input bits used by a length/distance pair is 15 bits for the
length code, 5 bits for the length extra, 15 bits for the distance code,
and 13 bits for the distance extra. This totals 48 bits, or six bytes.
Therefore if strm->avail_in >= 6, then there is enough input to avoid
checking for available input while decoding.
- The maximum bytes that a single length/distance pair can output is 258
bytes, which is the maximum length that can be coded. inflate_fast()
requires strm->avail_out >= 258 for each loop to avoid checking for
output space.
*/
void ZLIB_INTERNAL inflate_fast(z_streamp strm, unsigned start) {
struct inflate_state FAR *state;
z_const unsigned char FAR *in; /* local strm->next_in */
z_const unsigned char FAR *last; /* have enough input while in < last */
unsigned char FAR *out; /* local strm->next_out */
unsigned char FAR *beg; /* inflate()'s initial strm->next_out */
unsigned char FAR *end; /* while out < end, enough space available */
#ifdef INFLATE_STRICT
unsigned dmax; /* maximum distance from zlib header */
#endif
unsigned wsize; /* window size or zero if not using window */
unsigned whave; /* valid bytes in the window */
unsigned wnext; /* window write index */
unsigned char FAR *window; /* allocated sliding window, if wsize != 0 */
unsigned long hold; /* local strm->hold */
unsigned bits; /* local strm->bits */
code const FAR *lcode; /* local strm->lencode */
code const FAR *dcode; /* local strm->distcode */
unsigned lmask; /* mask for first level of length codes */
unsigned dmask; /* mask for first level of distance codes */
code const *here; /* retrieved table entry */
unsigned op; /* code bits, operation, extra bits, or */
/* window position, window bytes to copy */
unsigned len; /* match length, unused bytes */
unsigned dist; /* match distance */
unsigned char FAR *from; /* where to copy match from */
/* copy state to local variables */
state = (struct inflate_state FAR *)strm->state;
in = strm->next_in;
last = in + (strm->avail_in - 5);
out = strm->next_out;
beg = out - (start - strm->avail_out);
end = out + (strm->avail_out - 257);
#ifdef INFLATE_STRICT
dmax = state->dmax;
#endif
wsize = state->wsize;
whave = state->whave;
wnext = state->wnext;
window = state->window;
hold = state->hold;
bits = state->bits;
lcode = state->lencode;
dcode = state->distcode;
lmask = (1U << state->lenbits) - 1;
dmask = (1U << state->distbits) - 1;
/* decode literals and length/distances until end-of-block or not enough
input data or output space */
do {
if (bits < 15) {
hold += (unsigned long)(*in++) << bits;
bits += 8;
hold += (unsigned long)(*in++) << bits;
bits += 8;
}
here = lcode + (hold & lmask);
dolen:
op = (unsigned)(here->bits);
hold >>= op;
bits -= op;
op = (unsigned)(here->op);
if (op == 0) { /* literal */
Tracevv((stderr, here->val >= 0x20 && here->val < 0x7f ?
"inflate: literal '%c'\n" :
"inflate: literal 0x%02x\n", here->val));
*out++ = (unsigned char)(here->val);
}
else if (op & 16) { /* length base */
len = (unsigned)(here->val);
op &= 15; /* number of extra bits */
if (op) {
if (bits < op) {
hold += (unsigned long)(*in++) << bits;
bits += 8;
}
len += (unsigned)hold & ((1U << op) - 1);
hold >>= op;
bits -= op;
}
Tracevv((stderr, "inflate: length %u\n", len));
if (bits < 15) {
hold += (unsigned long)(*in++) << bits;
bits += 8;
hold += (unsigned long)(*in++) << bits;
bits += 8;
}
here = dcode + (hold & dmask);
dodist:
op = (unsigned)(here->bits);
hold >>= op;
bits -= op;
op = (unsigned)(here->op);
if (op & 16) { /* distance base */
dist = (unsigned)(here->val);
op &= 15; /* number of extra bits */
if (bits < op) {
hold += (unsigned long)(*in++) << bits;
bits += 8;
if (bits < op) {
hold += (unsigned long)(*in++) << bits;
bits += 8;
}
}
dist += (unsigned)hold & ((1U << op) - 1);
#ifdef INFLATE_STRICT
if (dist > dmax) {
strm->msg = (char *)"invalid distance too far back";
state->mode = BAD;
break;
}
#endif
hold >>= op;
bits -= op;
Tracevv((stderr, "inflate: distance %u\n", dist));
op = (unsigned)(out - beg); /* max distance in output */
if (dist > op) { /* see if copy from window */
op = dist - op; /* distance back in window */
if (op > whave) {
if (state->sane) {
strm->msg =
(char *)"invalid distance too far back";
state->mode = BAD;
break;
}
#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
if (len <= op - whave) {
do {
*out++ = 0;
} while (--len);
continue;
}
len -= op - whave;
do {
*out++ = 0;
} while (--op > whave);
if (op == 0) {
from = out - dist;
do {
*out++ = *from++;
} while (--len);
continue;
}
#endif
}
from = window;
if (wnext == 0) { /* very common case */
from += wsize - op;
if (op < len) { /* some from window */
len -= op;
do {
*out++ = *from++;
} while (--op);
from = out - dist; /* rest from output */
}
}
else if (wnext < op) { /* wrap around window */
from += wsize + wnext - op;
op -= wnext;
if (op < len) { /* some from end of window */
len -= op;
do {
*out++ = *from++;
} while (--op);
from = window;
if (wnext < len) { /* some from start of window */
op = wnext;
len -= op;
do {
*out++ = *from++;
} while (--op);
from = out - dist; /* rest from output */
}
}
}
else { /* contiguous in window */
from += wnext - op;
if (op < len) { /* some from window */
len -= op;
do {
*out++ = *from++;
} while (--op);
from = out - dist; /* rest from output */
}
}
while (len > 2) {
*out++ = *from++;
*out++ = *from++;
*out++ = *from++;
len -= 3;
}
if (len) {
*out++ = *from++;
if (len > 1)
*out++ = *from++;
}
}
else {
from = out - dist; /* copy direct from output */
do { /* minimum length is three */
*out++ = *from++;
*out++ = *from++;
*out++ = *from++;
len -= 3;
} while (len > 2);
if (len) {
*out++ = *from++;
if (len > 1)
*out++ = *from++;
}
}
}
else if ((op & 64) == 0) { /* 2nd level distance code */
here = dcode + here->val + (hold & ((1U << op) - 1));
goto dodist;
}
else {
strm->msg = (char *)"invalid distance code";
state->mode = BAD;
break;
}
}
else if ((op & 64) == 0) { /* 2nd level length code */
here = lcode + here->val + (hold & ((1U << op) - 1));
goto dolen;
}
else if (op & 32) { /* end-of-block */
Tracevv((stderr, "inflate: end of block\n"));
state->mode = TYPE;
break;
}
else {
strm->msg = (char *)"invalid literal/length code";
state->mode = BAD;
break;
}
} while (in < last && out < end);
/* return unused bytes (on entry, bits < 8, so in won't go too far back) */
len = bits >> 3;
in -= len;
bits -= len << 3;
hold &= (1U << bits) - 1;
/* update state and return */
strm->next_in = in;
strm->next_out = out;
strm->avail_in = (unsigned)(in < last ? 5 + (last - in) : 5 - (in - last));
strm->avail_out = (unsigned)(out < end ?
257 + (end - out) : 257 - (out - end));
state->hold = hold;
state->bits = bits;
return;
}
/*
inflate_fast() speedups that turned out slower (on a PowerPC G3 750CXe):
- Using bit fields for code structure
- Different op definition to avoid & for extra bits (do & for table bits)
- Three separate decoding do-loops for direct, window, and wnext == 0
- Special case for distance > 1 copies to do overlapped load and store copy
- Explicit branch predictions (based on measured branch probabilities)
- Deferring match copy and interspersed it with decoding subsequent codes
- Swapping literal/length else
- Swapping window/direct else
- Larger unrolled copy loops (three is about right)
- Moving len -= 3 statement into middle of loop
*/
#endif /* !ASMINF */
-11
View File
@@ -1,11 +0,0 @@
/* inffast.h -- header to use inffast.c
* Copyright (C) 1995-2003, 2010 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
/* WARNING: this file should *not* be used by applications. It is
part of the implementation of the compression library and is
subject to change. Applications should only use zlib.h.
*/
void ZLIB_INTERNAL inflate_fast(z_streamp strm, unsigned start);
-94
View File
@@ -1,94 +0,0 @@
/* inffixed.h -- table for decoding fixed codes
* Generated automatically by makefixed().
*/
/* WARNING: this file should *not* be used by applications.
It is part of the implementation of this library and is
subject to change. Applications should only use zlib.h.
*/
static const code lenfix[512] = {
{96,7,0},{0,8,80},{0,8,16},{20,8,115},{18,7,31},{0,8,112},{0,8,48},
{0,9,192},{16,7,10},{0,8,96},{0,8,32},{0,9,160},{0,8,0},{0,8,128},
{0,8,64},{0,9,224},{16,7,6},{0,8,88},{0,8,24},{0,9,144},{19,7,59},
{0,8,120},{0,8,56},{0,9,208},{17,7,17},{0,8,104},{0,8,40},{0,9,176},
{0,8,8},{0,8,136},{0,8,72},{0,9,240},{16,7,4},{0,8,84},{0,8,20},
{21,8,227},{19,7,43},{0,8,116},{0,8,52},{0,9,200},{17,7,13},{0,8,100},
{0,8,36},{0,9,168},{0,8,4},{0,8,132},{0,8,68},{0,9,232},{16,7,8},
{0,8,92},{0,8,28},{0,9,152},{20,7,83},{0,8,124},{0,8,60},{0,9,216},
{18,7,23},{0,8,108},{0,8,44},{0,9,184},{0,8,12},{0,8,140},{0,8,76},
{0,9,248},{16,7,3},{0,8,82},{0,8,18},{21,8,163},{19,7,35},{0,8,114},
{0,8,50},{0,9,196},{17,7,11},{0,8,98},{0,8,34},{0,9,164},{0,8,2},
{0,8,130},{0,8,66},{0,9,228},{16,7,7},{0,8,90},{0,8,26},{0,9,148},
{20,7,67},{0,8,122},{0,8,58},{0,9,212},{18,7,19},{0,8,106},{0,8,42},
{0,9,180},{0,8,10},{0,8,138},{0,8,74},{0,9,244},{16,7,5},{0,8,86},
{0,8,22},{64,8,0},{19,7,51},{0,8,118},{0,8,54},{0,9,204},{17,7,15},
{0,8,102},{0,8,38},{0,9,172},{0,8,6},{0,8,134},{0,8,70},{0,9,236},
{16,7,9},{0,8,94},{0,8,30},{0,9,156},{20,7,99},{0,8,126},{0,8,62},
{0,9,220},{18,7,27},{0,8,110},{0,8,46},{0,9,188},{0,8,14},{0,8,142},
{0,8,78},{0,9,252},{96,7,0},{0,8,81},{0,8,17},{21,8,131},{18,7,31},
{0,8,113},{0,8,49},{0,9,194},{16,7,10},{0,8,97},{0,8,33},{0,9,162},
{0,8,1},{0,8,129},{0,8,65},{0,9,226},{16,7,6},{0,8,89},{0,8,25},
{0,9,146},{19,7,59},{0,8,121},{0,8,57},{0,9,210},{17,7,17},{0,8,105},
{0,8,41},{0,9,178},{0,8,9},{0,8,137},{0,8,73},{0,9,242},{16,7,4},
{0,8,85},{0,8,21},{16,8,258},{19,7,43},{0,8,117},{0,8,53},{0,9,202},
{17,7,13},{0,8,101},{0,8,37},{0,9,170},{0,8,5},{0,8,133},{0,8,69},
{0,9,234},{16,7,8},{0,8,93},{0,8,29},{0,9,154},{20,7,83},{0,8,125},
{0,8,61},{0,9,218},{18,7,23},{0,8,109},{0,8,45},{0,9,186},{0,8,13},
{0,8,141},{0,8,77},{0,9,250},{16,7,3},{0,8,83},{0,8,19},{21,8,195},
{19,7,35},{0,8,115},{0,8,51},{0,9,198},{17,7,11},{0,8,99},{0,8,35},
{0,9,166},{0,8,3},{0,8,131},{0,8,67},{0,9,230},{16,7,7},{0,8,91},
{0,8,27},{0,9,150},{20,7,67},{0,8,123},{0,8,59},{0,9,214},{18,7,19},
{0,8,107},{0,8,43},{0,9,182},{0,8,11},{0,8,139},{0,8,75},{0,9,246},
{16,7,5},{0,8,87},{0,8,23},{64,8,0},{19,7,51},{0,8,119},{0,8,55},
{0,9,206},{17,7,15},{0,8,103},{0,8,39},{0,9,174},{0,8,7},{0,8,135},
{0,8,71},{0,9,238},{16,7,9},{0,8,95},{0,8,31},{0,9,158},{20,7,99},
{0,8,127},{0,8,63},{0,9,222},{18,7,27},{0,8,111},{0,8,47},{0,9,190},
{0,8,15},{0,8,143},{0,8,79},{0,9,254},{96,7,0},{0,8,80},{0,8,16},
{20,8,115},{18,7,31},{0,8,112},{0,8,48},{0,9,193},{16,7,10},{0,8,96},
{0,8,32},{0,9,161},{0,8,0},{0,8,128},{0,8,64},{0,9,225},{16,7,6},
{0,8,88},{0,8,24},{0,9,145},{19,7,59},{0,8,120},{0,8,56},{0,9,209},
{17,7,17},{0,8,104},{0,8,40},{0,9,177},{0,8,8},{0,8,136},{0,8,72},
{0,9,241},{16,7,4},{0,8,84},{0,8,20},{21,8,227},{19,7,43},{0,8,116},
{0,8,52},{0,9,201},{17,7,13},{0,8,100},{0,8,36},{0,9,169},{0,8,4},
{0,8,132},{0,8,68},{0,9,233},{16,7,8},{0,8,92},{0,8,28},{0,9,153},
{20,7,83},{0,8,124},{0,8,60},{0,9,217},{18,7,23},{0,8,108},{0,8,44},
{0,9,185},{0,8,12},{0,8,140},{0,8,76},{0,9,249},{16,7,3},{0,8,82},
{0,8,18},{21,8,163},{19,7,35},{0,8,114},{0,8,50},{0,9,197},{17,7,11},
{0,8,98},{0,8,34},{0,9,165},{0,8,2},{0,8,130},{0,8,66},{0,9,229},
{16,7,7},{0,8,90},{0,8,26},{0,9,149},{20,7,67},{0,8,122},{0,8,58},
{0,9,213},{18,7,19},{0,8,106},{0,8,42},{0,9,181},{0,8,10},{0,8,138},
{0,8,74},{0,9,245},{16,7,5},{0,8,86},{0,8,22},{64,8,0},{19,7,51},
{0,8,118},{0,8,54},{0,9,205},{17,7,15},{0,8,102},{0,8,38},{0,9,173},
{0,8,6},{0,8,134},{0,8,70},{0,9,237},{16,7,9},{0,8,94},{0,8,30},
{0,9,157},{20,7,99},{0,8,126},{0,8,62},{0,9,221},{18,7,27},{0,8,110},
{0,8,46},{0,9,189},{0,8,14},{0,8,142},{0,8,78},{0,9,253},{96,7,0},
{0,8,81},{0,8,17},{21,8,131},{18,7,31},{0,8,113},{0,8,49},{0,9,195},
{16,7,10},{0,8,97},{0,8,33},{0,9,163},{0,8,1},{0,8,129},{0,8,65},
{0,9,227},{16,7,6},{0,8,89},{0,8,25},{0,9,147},{19,7,59},{0,8,121},
{0,8,57},{0,9,211},{17,7,17},{0,8,105},{0,8,41},{0,9,179},{0,8,9},
{0,8,137},{0,8,73},{0,9,243},{16,7,4},{0,8,85},{0,8,21},{16,8,258},
{19,7,43},{0,8,117},{0,8,53},{0,9,203},{17,7,13},{0,8,101},{0,8,37},
{0,9,171},{0,8,5},{0,8,133},{0,8,69},{0,9,235},{16,7,8},{0,8,93},
{0,8,29},{0,9,155},{20,7,83},{0,8,125},{0,8,61},{0,9,219},{18,7,23},
{0,8,109},{0,8,45},{0,9,187},{0,8,13},{0,8,141},{0,8,77},{0,9,251},
{16,7,3},{0,8,83},{0,8,19},{21,8,195},{19,7,35},{0,8,115},{0,8,51},
{0,9,199},{17,7,11},{0,8,99},{0,8,35},{0,9,167},{0,8,3},{0,8,131},
{0,8,67},{0,9,231},{16,7,7},{0,8,91},{0,8,27},{0,9,151},{20,7,67},
{0,8,123},{0,8,59},{0,9,215},{18,7,19},{0,8,107},{0,8,43},{0,9,183},
{0,8,11},{0,8,139},{0,8,75},{0,9,247},{16,7,5},{0,8,87},{0,8,23},
{64,8,0},{19,7,51},{0,8,119},{0,8,55},{0,9,207},{17,7,15},{0,8,103},
{0,8,39},{0,9,175},{0,8,7},{0,8,135},{0,8,71},{0,9,239},{16,7,9},
{0,8,95},{0,8,31},{0,9,159},{20,7,99},{0,8,127},{0,8,63},{0,9,223},
{18,7,27},{0,8,111},{0,8,47},{0,9,191},{0,8,15},{0,8,143},{0,8,79},
{0,9,255}
};
static const code distfix[32] = {
{16,5,1},{23,5,257},{19,5,17},{27,5,4097},{17,5,5},{25,5,1025},
{21,5,65},{29,5,16385},{16,5,3},{24,5,513},{20,5,33},{28,5,8193},
{18,5,9},{26,5,2049},{22,5,129},{64,5,0},{16,5,2},{23,5,385},
{19,5,25},{27,5,6145},{17,5,7},{25,5,1537},{21,5,97},{29,5,24577},
{16,5,4},{24,5,769},{20,5,49},{28,5,12289},{18,5,13},{26,5,3073},
{22,5,193},{64,5,0}
};
-381
View File
@@ -1,381 +0,0 @@
Frequently Asked Questions about ZLIB1.DLL
This document describes the design, the rationale, and the usage
of the common DLL build of zlib, named ZLIB1.DLL. If you have
general questions about zlib, you should see the file "FAQ" found
in the zlib distribution, or at the following location:
http://www.gzip.org/zlib/zlib_faq.html
1. What is ZLIB1.DLL, and how can I get it?
- ZLIB1.DLL is the common build of zlib as a DLL.
(Please remark the character '1' in the name.)
Applications that link to ZLIB1.DLL can rely on the following
specification:
* The exported symbols are exclusively defined in the source
files "zlib.h" and "zlib.def", found in an official zlib
source distribution.
* The symbols are exported by name, not by ordinal.
* The exported names are undecorated.
* The calling convention of functions is "C" (CDECL).
* The ZLIB1.DLL binary is linked to MSVCRT.DLL.
The archive in which ZLIB1.DLL is bundled contains compiled
test programs that must run with a valid build of ZLIB1.DLL.
It is recommended to download the prebuilt DLL from the zlib
web site, instead of building it yourself, to avoid potential
incompatibilities that could be introduced by your compiler
and build settings. If you do build the DLL yourself, please
make sure that it complies with all the above requirements,
and it runs with the precompiled test programs, bundled with
the original ZLIB1.DLL distribution.
If, for any reason, you need to build an incompatible DLL,
please use a different file name.
2. Why did you change the name of the DLL to ZLIB1.DLL?
What happened to the old ZLIB.DLL?
- The old ZLIB.DLL, built from zlib-1.1.4 or earlier, required
compilation settings that were incompatible to those used by
a static build. The DLL settings were supposed to be enabled
by defining the macro ZLIB_DLL, before including "zlib.h".
Incorrect handling of this macro was silently accepted at
build time, resulting in two major problems:
* ZLIB_DLL was missing from the old makefile. When building
the DLL, not all people added it to the build options. In
consequence, incompatible incarnations of ZLIB.DLL started
to circulate around the net.
* When switching from using the static library to using the
DLL, applications had to define the ZLIB_DLL macro and
to recompile all the sources that contained calls to zlib
functions. Failure to do so resulted in creating binaries
that were unable to run with the official ZLIB.DLL build.
The only possible solution that we could foresee was to make
a binary-incompatible change in the DLL interface, in order to
remove the dependency on the ZLIB_DLL macro, and to release
the new DLL under a different name.
We chose the name ZLIB1.DLL, where '1' indicates the major
zlib version number. We hope that we will not have to break
the binary compatibility again, at least not as long as the
zlib-1.x series will last.
There is still a ZLIB_DLL macro, that can trigger a more
efficient build and use of the DLL, but compatibility no
longer dependents on it.
3. Can I build ZLIB.DLL from the new zlib sources, and replace
an old ZLIB.DLL, that was built from zlib-1.1.4 or earlier?
- In principle, you can do it by assigning calling convention
keywords to the macros ZEXPORT and ZEXPORTVA. In practice,
it depends on what you mean by "an old ZLIB.DLL", because the
old DLL exists in several mutually-incompatible versions.
You have to find out first what kind of calling convention is
being used in your particular ZLIB.DLL build, and to use the
same one in the new build. If you don't know what this is all
about, you might be better off if you would just leave the old
DLL intact.
4. Can I compile my application using the new zlib interface, and
link it to an old ZLIB.DLL, that was built from zlib-1.1.4 or
earlier?
- The official answer is "no"; the real answer depends again on
what kind of ZLIB.DLL you have. Even if you are lucky, this
course of action is unreliable.
If you rebuild your application and you intend to use a newer
version of zlib (post- 1.1.4), it is strongly recommended to
link it to the new ZLIB1.DLL.
5. Why are the zlib symbols exported by name, and not by ordinal?
- Although exporting symbols by ordinal is a little faster, it
is risky. Any single glitch in the maintenance or use of the
DEF file that contains the ordinals can result in incompatible
builds and frustrating crashes. Simply put, the benefits of
exporting symbols by ordinal do not justify the risks.
Technically, it should be possible to maintain ordinals in
the DEF file, and still export the symbols by name. Ordinals
exist in every DLL, and even if the dynamic linking performed
at the DLL startup is searching for names, ordinals serve as
hints, for a faster name lookup. However, if the DEF file
contains ordinals, the Microsoft linker automatically builds
an implib that will cause the executables linked to it to use
those ordinals, and not the names. It is interesting to
notice that the GNU linker for Win32 does not suffer from this
problem.
It is possible to avoid the DEF file if the exported symbols
are accompanied by a "__declspec(dllexport)" attribute in the
source files. You can do this in zlib by predefining the
ZLIB_DLL macro.
6. I see that the ZLIB1.DLL functions use the "C" (CDECL) calling
convention. Why not use the STDCALL convention?
STDCALL is the standard convention in Win32, and I need it in
my Visual Basic project!
(For readability, we use CDECL to refer to the convention
triggered by the "__cdecl" keyword, STDCALL to refer to
the convention triggered by "__stdcall", and FASTCALL to
refer to the convention triggered by "__fastcall".)
- Most of the native Windows API functions (without varargs) use
indeed the WINAPI convention (which translates to STDCALL in
Win32), but the standard C functions use CDECL. If a user
application is intrinsically tied to the Windows API (e.g.
it calls native Windows API functions such as CreateFile()),
sometimes it makes sense to decorate its own functions with
WINAPI. But if ANSI C or POSIX portability is a goal (e.g.
it calls standard C functions such as fopen()), it is not a
sound decision to request the inclusion of <windows.h>, or to
use non-ANSI constructs, for the sole purpose to make the user
functions STDCALL-able.
The functionality offered by zlib is not in the category of
"Windows functionality", but is more like "C functionality".
Technically, STDCALL is not bad; in fact, it is slightly
faster than CDECL, and it works with variable-argument
functions, just like CDECL. It is unfortunate that, in spite
of using STDCALL in the Windows API, it is not the default
convention used by the C compilers that run under Windows.
The roots of the problem reside deep inside the unsafety of
the K&R-style function prototypes, where the argument types
are not specified; but that is another story for another day.
The remaining fact is that CDECL is the default convention.
Even if an explicit convention is hard-coded into the function
prototypes inside C headers, problems may appear. The
necessity to expose the convention in users' callbacks is one
of these problems.
The calling convention issues are also important when using
zlib in other programming languages. Some of them, like Ada
(GNAT) and Fortran (GNU G77), have C bindings implemented
initially on Unix, and relying on the C calling convention.
On the other hand, the pre- .NET versions of Microsoft Visual
Basic require STDCALL, while Borland Delphi prefers, although
it does not require, FASTCALL.
In fairness to all possible uses of zlib outside the C
programming language, we choose the default "C" convention.
Anyone interested in different bindings or conventions is
encouraged to maintain specialized projects. The "contrib/"
directory from the zlib distribution already holds a couple
of foreign bindings, such as Ada, C++, and Delphi.
7. I need a DLL for my Visual Basic project. What can I do?
- Define the ZLIB_WINAPI macro before including "zlib.h", when
building both the DLL and the user application (except that
you don't need to define anything when using the DLL in Visual
Basic). The ZLIB_WINAPI macro will switch on the WINAPI
(STDCALL) convention. The name of this DLL must be different
than the official ZLIB1.DLL.
Gilles Vollant has contributed a build named ZLIBWAPI.DLL,
with the ZLIB_WINAPI macro turned on, and with the minizip
functionality built in. For more information, please read
the notes inside "contrib/vstudio/readme.txt", found in the
zlib distribution.
8. I need to use zlib in my Microsoft .NET project. What can I
do?
- Henrik Ravn has contributed a .NET wrapper around zlib. Look
into contrib/dotzlib/, inside the zlib distribution.
9. If my application uses ZLIB1.DLL, should I link it to
MSVCRT.DLL? Why?
- It is not required, but it is recommended to link your
application to MSVCRT.DLL, if it uses ZLIB1.DLL.
The executables (.EXE, .DLL, etc.) that are involved in the
same process and are using the C run-time library (i.e. they
are calling standard C functions), must link to the same
library. There are several libraries in the Win32 system:
CRTDLL.DLL, MSVCRT.DLL, the static C libraries, etc.
Since ZLIB1.DLL is linked to MSVCRT.DLL, the executables that
depend on it should also be linked to MSVCRT.DLL.
10. Why are you saying that ZLIB1.DLL and my application should
be linked to the same C run-time (CRT) library? I linked my
application and my DLLs to different C libraries (e.g. my
application to a static library, and my DLLs to MSVCRT.DLL),
and everything works fine.
- If a user library invokes only pure Win32 API (accessible via
<windows.h> and the related headers), its DLL build will work
in any context. But if this library invokes standard C API,
things get more complicated.
There is a single Win32 library in a Win32 system. Every
function in this library resides in a single DLL module, that
is safe to call from anywhere. On the other hand, there are
multiple versions of the C library, and each of them has its
own separate internal state. Standalone executables and user
DLLs that call standard C functions must link to a C run-time
(CRT) library, be it static or shared (DLL). Intermixing
occurs when an executable (not necessarily standalone) and a
DLL are linked to different CRTs, and both are running in the
same process.
Intermixing multiple CRTs is possible, as long as their
internal states are kept intact. The Microsoft Knowledge Base
articles KB94248 "HOWTO: Use the C Run-Time" and KB140584
"HOWTO: Link with the Correct C Run-Time (CRT) Library"
mention the potential problems raised by intermixing.
If intermixing works for you, it's because your application
and DLLs are avoiding the corruption of each of the CRTs'
internal states, maybe by careful design, or maybe by fortune.
Also note that linking ZLIB1.DLL to non-Microsoft CRTs, such
as those provided by Borland, raises similar problems.
11. Why are you linking ZLIB1.DLL to MSVCRT.DLL?
- MSVCRT.DLL exists on every Windows 95 with a new service pack
installed, or with Microsoft Internet Explorer 4 or later, and
on all other Windows 4.x or later (Windows 98, Windows NT 4,
or later). It is freely distributable; if not present in the
system, it can be downloaded from Microsoft or from other
software provider for free.
The fact that MSVCRT.DLL does not exist on a virgin Windows 95
is not so problematic. Windows 95 is scarcely found nowadays,
Microsoft ended its support a long time ago, and many recent
applications from various vendors, including Microsoft, do not
even run on it. Furthermore, no serious user should run
Windows 95 without a proper update installed.
12. Why are you not linking ZLIB1.DLL to
<<my favorite C run-time library>> ?
- We considered and abandoned the following alternatives:
* Linking ZLIB1.DLL to a static C library (LIBC.LIB, or
LIBCMT.LIB) is not a good option. People are using the DLL
mainly to save disk space. If you are linking your program
to a static C library, you may as well consider linking zlib
in statically, too.
* Linking ZLIB1.DLL to CRTDLL.DLL looks appealing, because
CRTDLL.DLL is present on every Win32 installation.
Unfortunately, it has a series of problems: it does not
work properly with Microsoft's C++ libraries, it does not
provide support for 64-bit file offsets, (and so on...),
and Microsoft discontinued its support a long time ago.
* Linking ZLIB1.DLL to MSVCR70.DLL or MSVCR71.DLL, supplied
with the Microsoft .NET platform, and Visual C++ 7.0/7.1,
raises problems related to the status of ZLIB1.DLL as a
system component. According to the Microsoft Knowledge Base
article KB326922 "INFO: Redistribution of the Shared C
Runtime Component in Visual C++ .NET", MSVCR70.DLL and
MSVCR71.DLL are not supposed to function as system DLLs,
because they may clash with MSVCRT.DLL. Instead, the
application's installer is supposed to put these DLLs
(if needed) in the application's private directory.
If ZLIB1.DLL depends on a non-system runtime, it cannot
function as a redistributable system component.
* Linking ZLIB1.DLL to non-Microsoft runtimes, such as
Borland's, or Cygwin's, raises problems related to the
reliable presence of these runtimes on Win32 systems.
It's easier to let the DLL build of zlib up to the people
who distribute these runtimes, and who may proceed as
explained in the answer to Question 14.
13. If ZLIB1.DLL cannot be linked to MSVCR70.DLL or MSVCR71.DLL,
how can I build/use ZLIB1.DLL in Microsoft Visual C++ 7.0
(Visual Studio .NET) or newer?
- Due to the problems explained in the Microsoft Knowledge Base
article KB326922 (see the previous answer), the C runtime that
comes with the VC7 environment is no longer considered a
system component. That is, it should not be assumed that this
runtime exists, or may be installed in a system directory.
Since ZLIB1.DLL is supposed to be a system component, it may
not depend on a non-system component.
In order to link ZLIB1.DLL and your application to MSVCRT.DLL
in VC7, you need the library of Visual C++ 6.0 or older. If
you don't have this library at hand, it's probably best not to
use ZLIB1.DLL.
We are hoping that, in the future, Microsoft will provide a
way to build applications linked to a proper system runtime,
from the Visual C++ environment. Until then, you have a
couple of alternatives, such as linking zlib in statically.
If your application requires dynamic linking, you may proceed
as explained in the answer to Question 14.
14. I need to link my own DLL build to a CRT different than
MSVCRT.DLL. What can I do?
- Feel free to rebuild the DLL from the zlib sources, and link
it the way you want. You should, however, clearly state that
your build is unofficial. You should give it a different file
name, and/or install it in a private directory that can be
accessed by your application only, and is not visible to the
others (i.e. it's neither in the PATH, nor in the SYSTEM or
SYSTEM32 directories). Otherwise, your build may clash with
applications that link to the official build.
For example, in Cygwin, zlib is linked to the Cygwin runtime
CYGWIN1.DLL, and it is distributed under the name CYGZ.DLL.
15. May I include additional pieces of code that I find useful,
link them in ZLIB1.DLL, and export them?
- No. A legitimate build of ZLIB1.DLL must not include code
that does not originate from the official zlib source code.
But you can make your own private DLL build, under a different
file name, as suggested in the previous answer.
For example, zlib is a part of the VCL library, distributed
with Borland Delphi and C++ Builder. The DLL build of VCL
is a redistributable file, named VCLxx.DLL.
16. May I remove some functionality out of ZLIB1.DLL, by enabling
macros like NO_GZCOMPRESS or NO_GZIP at compile time?
- No. A legitimate build of ZLIB1.DLL must provide the complete
zlib functionality, as implemented in the official zlib source
code. But you can make your own private DLL build, under a
different file name, as suggested in the previous answer.
**
This document is written and maintained by
Cosmin Truta <cosmint@cs.ubbcluj.ro>
-109
View File
@@ -1,109 +0,0 @@
# Makefile for zlib
# Borland C++ for Win32
#
# Usage:
# make -f win32/Makefile.bor
# ------------ Borland C++ ------------
# Optional nonstandard preprocessor flags (e.g. -DMAX_MEM_LEVEL=7)
# should be added to the environment via "set LOCAL_ZLIB=-DFOO" or
# added to the declaration of LOC here:
LOC = $(LOCAL_ZLIB)
CC = bcc32
AS = bcc32
LD = bcc32
AR = tlib
CFLAGS = -a -d -k- -O2 $(LOC)
ASFLAGS = $(LOC)
LDFLAGS = $(LOC)
# variables
ZLIB_LIB = zlib.lib
OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzlib.obj gzread.obj
OBJ2 = gzwrite.obj infback.obj inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
#OBJA =
OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzclose.obj+gzlib.obj+gzread.obj
OBJP2 = +gzwrite.obj+infback.obj+inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj
#OBJPA=
# targets
all: $(ZLIB_LIB) example.exe minigzip.exe
.c.obj:
$(CC) -c $(CFLAGS) $<
.asm.obj:
$(AS) -c $(ASFLAGS) $<
adler32.obj: adler32.c zlib.h zconf.h
compress.obj: compress.c zlib.h zconf.h
crc32.obj: crc32.c zlib.h zconf.h crc32.h
deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
gzclose.obj: gzclose.c zlib.h zconf.h gzguts.h
gzlib.obj: gzlib.c zlib.h zconf.h gzguts.h
gzread.obj: gzread.c zlib.h zconf.h gzguts.h
gzwrite.obj: gzwrite.c zlib.h zconf.h gzguts.h
infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
inffast.h inffixed.h
inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
inffast.h
inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
inffast.h inffixed.h
inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h
uncompr.obj: uncompr.c zlib.h zconf.h
zutil.obj: zutil.c zutil.h zlib.h zconf.h
example.obj: test/example.c zlib.h zconf.h
minigzip.obj: test/minigzip.c zlib.h zconf.h
# For the sake of the old Borland make,
# the command line is cut to fit in the MS-DOS 128 byte limit:
$(ZLIB_LIB): $(OBJ1) $(OBJ2) $(OBJA)
-del $(ZLIB_LIB)
$(AR) $(ZLIB_LIB) $(OBJP1)
$(AR) $(ZLIB_LIB) $(OBJP2)
$(AR) $(ZLIB_LIB) $(OBJPA)
# testing
test: example.exe minigzip.exe
example
echo hello world | minigzip | minigzip -d
example.exe: example.obj $(ZLIB_LIB)
$(LD) $(LDFLAGS) example.obj $(ZLIB_LIB)
minigzip.exe: minigzip.obj $(ZLIB_LIB)
$(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB)
# cleanup
clean:
-del $(ZLIB_LIB)
-del *.obj
-del *.exe
-del *.tds
-del zlib.bak
-del foo.gz
-177
View File
@@ -1,177 +0,0 @@
# Makefile for zlib, derived from Makefile.dj2.
# Modified for mingw32 by C. Spieler, 6/16/98.
# Updated for zlib 1.2.x by Christian Spieler and Cosmin Truta, Mar-2003.
# Last updated: Mar 2012.
# Tested under Cygwin and MinGW.
# Copyright (C) 1995-2003 Jean-loup Gailly.
# For conditions of distribution and use, see copyright notice in zlib.h
# To compile, or to compile and test, type from the top level zlib directory:
#
# make -fwin32/Makefile.gcc; make test testdll -fwin32/Makefile.gcc
#
# To install libz.a, zconf.h and zlib.h in the system directories, type:
#
# make install -fwin32/Makefile.gcc
#
# BINARY_PATH, INCLUDE_PATH and LIBRARY_PATH must be set.
#
# To install the shared lib, append SHARED_MODE=1 to the make command :
#
# make install -fwin32/Makefile.gcc SHARED_MODE=1
# Note:
# If the platform is *not* MinGW (e.g. it is Cygwin or UWIN),
# the DLL name should be changed from "zlib1.dll".
STATICLIB = libz.a
SHAREDLIB = zlib1.dll
IMPLIB = libz.dll.a
#
# Set to 1 if shared object needs to be installed
#
SHARED_MODE=0
#LOC = -DZLIB_DEBUG -g
PREFIX =
CC = $(PREFIX)gcc
CFLAGS = $(LOC) -O3 -Wall
AS = $(CC)
ASFLAGS = $(LOC) -Wall
LD = $(CC)
LDFLAGS = $(LOC)
AR = $(PREFIX)ar
ARFLAGS = rcs
RC = $(PREFIX)windres
RCFLAGS = --define GCC_WINDRES
STRIP = $(PREFIX)strip
CP = cp -fp
# If GNU install is available, replace $(CP) with install.
INSTALL = $(CP)
RM = rm -f
prefix ?= /usr/local
exec_prefix = $(prefix)
OBJS = adler32.o compress.o crc32.o deflate.o gzclose.o gzlib.o gzread.o \
gzwrite.o infback.o inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o
OBJA =
all: $(STATICLIB) $(SHAREDLIB) $(IMPLIB) example.exe minigzip.exe example_d.exe minigzip_d.exe
test: example.exe minigzip.exe
./example
echo hello world | ./minigzip | ./minigzip -d
testdll: example_d.exe minigzip_d.exe
./example_d
echo hello world | ./minigzip_d | ./minigzip_d -d
.c.o:
$(CC) $(CFLAGS) -c -o $@ $<
.S.o:
$(AS) $(ASFLAGS) -c -o $@ $<
$(STATICLIB): $(OBJS) $(OBJA)
$(AR) $(ARFLAGS) $@ $(OBJS) $(OBJA)
$(IMPLIB): $(SHAREDLIB)
$(SHAREDLIB): win32/zlib.def $(OBJS) $(OBJA) zlibrc.o
$(CC) -shared -Wl,--out-implib,$(IMPLIB) $(LDFLAGS) \
-o $@ win32/zlib.def $(OBJS) $(OBJA) zlibrc.o
$(STRIP) $@
example.exe: example.o $(STATICLIB)
$(LD) $(LDFLAGS) -o $@ example.o $(STATICLIB)
$(STRIP) $@
minigzip.exe: minigzip.o $(STATICLIB)
$(LD) $(LDFLAGS) -o $@ minigzip.o $(STATICLIB)
$(STRIP) $@
example_d.exe: example.o $(IMPLIB)
$(LD) $(LDFLAGS) -o $@ example.o $(IMPLIB)
$(STRIP) $@
minigzip_d.exe: minigzip.o $(IMPLIB)
$(LD) $(LDFLAGS) -o $@ minigzip.o $(IMPLIB)
$(STRIP) $@
example.o: test/example.c zlib.h zconf.h
$(CC) $(CFLAGS) -I. -c -o $@ test/example.c
minigzip.o: test/minigzip.c zlib.h zconf.h
$(CC) $(CFLAGS) -I. -c -o $@ test/minigzip.c
zlibrc.o: win32/zlib1.rc
$(RC) $(RCFLAGS) -o $@ win32/zlib1.rc
.PHONY: install uninstall clean
install: zlib.h zconf.h $(STATICLIB) $(IMPLIB)
@if test -z "$(DESTDIR)$(INCLUDE_PATH)" -o -z "$(DESTDIR)$(LIBRARY_PATH)" -o -z "$(DESTDIR)$(BINARY_PATH)"; then \
echo INCLUDE_PATH, LIBRARY_PATH, and BINARY_PATH must be specified; \
exit 1; \
fi
-@mkdir -p '$(DESTDIR)$(INCLUDE_PATH)'
-@mkdir -p '$(DESTDIR)$(LIBRARY_PATH)' '$(DESTDIR)$(LIBRARY_PATH)'/pkgconfig
-if [ "$(SHARED_MODE)" = "1" ]; then \
mkdir -p '$(DESTDIR)$(BINARY_PATH)'; \
$(INSTALL) $(SHAREDLIB) '$(DESTDIR)$(BINARY_PATH)'; \
$(INSTALL) $(IMPLIB) '$(DESTDIR)$(LIBRARY_PATH)'; \
fi
-$(INSTALL) zlib.h '$(DESTDIR)$(INCLUDE_PATH)'
-$(INSTALL) zconf.h '$(DESTDIR)$(INCLUDE_PATH)'
-$(INSTALL) $(STATICLIB) '$(DESTDIR)$(LIBRARY_PATH)'
sed \
-e 's|@prefix@|${prefix}|g' \
-e 's|@exec_prefix@|${exec_prefix}|g' \
-e 's|@libdir@|$(LIBRARY_PATH)|g' \
-e 's|@sharedlibdir@|$(LIBRARY_PATH)|g' \
-e 's|@includedir@|$(INCLUDE_PATH)|g' \
-e 's|@VERSION@|'`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' zlib.h`'|g' \
zlib.pc.in > '$(DESTDIR)$(LIBRARY_PATH)'/pkgconfig/zlib.pc
uninstall:
-if [ "$(SHARED_MODE)" = "1" ]; then \
$(RM) '$(DESTDIR)$(BINARY_PATH)'/$(SHAREDLIB); \
$(RM) '$(DESTDIR)$(LIBRARY_PATH)'/$(IMPLIB); \
fi
-$(RM) '$(DESTDIR)$(INCLUDE_PATH)'/zlib.h
-$(RM) '$(DESTDIR)$(INCLUDE_PATH)'/zconf.h
-$(RM) '$(DESTDIR)$(LIBRARY_PATH)'/$(STATICLIB)
clean:
-$(RM) $(STATICLIB)
-$(RM) $(SHAREDLIB)
-$(RM) $(IMPLIB)
-$(RM) *.o
-$(RM) *.exe
-$(RM) foo.gz
adler32.o: zlib.h zconf.h
compress.o: zlib.h zconf.h
crc32.o: crc32.h zlib.h zconf.h
deflate.o: deflate.h zutil.h zlib.h zconf.h
gzclose.o: zlib.h zconf.h gzguts.h
gzlib.o: zlib.h zconf.h gzguts.h
gzread.o: zlib.h zconf.h gzguts.h
gzwrite.o: zlib.h zconf.h gzguts.h
inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
infback.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
inftrees.o: zutil.h zlib.h zconf.h inftrees.h
trees.o: deflate.h zutil.h zlib.h zconf.h trees.h
uncompr.o: zlib.h zconf.h
zutil.o: zutil.h zlib.h zconf.h
-103
View File
@@ -1,103 +0,0 @@
ZLIB DATA COMPRESSION LIBRARY
zlib 1.3.1 is a general purpose data compression library. All the code is
thread safe. The data format used by the zlib library is described by RFCs
(Request for Comments) 1950 to 1952 in the files
http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format)
and rfc1952.txt (gzip format).
All functions of the compression library are documented in the file zlib.h
(volunteer to write man pages welcome, contact zlib@gzip.org). Two compiled
examples are distributed in this package, example and minigzip. The example_d
and minigzip_d flavors validate that the zlib1.dll file is working correctly.
Questions about zlib should be sent to <zlib@gzip.org>. The zlib home page
is http://zlib.net/ . Before reporting a problem, please check this site to
verify that you have the latest version of zlib; otherwise get the latest
version and check whether the problem still exists or not.
PLEASE read DLL_FAQ.txt, and the zlib FAQ http://zlib.net/zlib_faq.html before
asking for help.
Manifest:
The package zlib-1.3.1-win32-x86.zip will contain the following files:
README-WIN32.txt This document
ChangeLog Changes since previous zlib packages
DLL_FAQ.txt Frequently asked questions about zlib1.dll
zlib.3.pdf Documentation of this library in Adobe Acrobat format
example.exe A statically-bound example (using zlib.lib, not the dll)
example.pdb Symbolic information for debugging example.exe
example_d.exe A zlib1.dll bound example (using zdll.lib)
example_d.pdb Symbolic information for debugging example_d.exe
minigzip.exe A statically-bound test program (using zlib.lib, not the dll)
minigzip.pdb Symbolic information for debugging minigzip.exe
minigzip_d.exe A zlib1.dll bound test program (using zdll.lib)
minigzip_d.pdb Symbolic information for debugging minigzip_d.exe
zlib.h Install these files into the compilers' INCLUDE path to
zconf.h compile programs which use zlib.lib or zdll.lib
zdll.lib Install these files into the compilers' LIB path if linking
zdll.exp a compiled program to the zlib1.dll binary
zlib.lib Install these files into the compilers' LIB path to link zlib
zlib.pdb into compiled programs, without zlib1.dll runtime dependency
(zlib.pdb provides debugging info to the compile time linker)
zlib1.dll Install this binary shared library into the system PATH, or
the program's runtime directory (where the .exe resides)
zlib1.pdb Install in the same directory as zlib1.dll, in order to debug
an application crash using WinDbg or similar tools.
All .pdb files above are entirely optional, but are very useful to a developer
attempting to diagnose program misbehavior or a crash. Many additional
important files for developers can be found in the zlib127.zip source package
available from http://zlib.net/ - review that package's README file for details.
Acknowledgments:
The deflate format used by zlib was defined by Phil Katz. The deflate and
zlib specifications were written by L. Peter Deutsch. Thanks to all the
people who reported problems and suggested various improvements in zlib; they
are too numerous to cite here.
Copyright notice:
(C) 1995-2017 Jean-loup Gailly and Mark Adler
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
Jean-loup Gailly Mark Adler
jloup@gzip.org madler@alumni.caltech.edu
If you use the zlib library in a product, we would appreciate *not* receiving
lengthy legal documents to sign. The sources are provided for free but without
warranty of any kind. The library has been entirely written by Jean-loup
Gailly and Mark Adler; it does not include third-party code.
If you redistribute modified sources, we would appreciate that you include in
the file ChangeLog history information documenting your changes. Please read
the FAQ for more information on the distribution of modified source versions.
-3
View File
@@ -1,3 +0,0 @@
To build zlib using the Microsoft Visual C++ environment,
use the appropriate project from the contrib/vstudio/ directory.
-97
View File
@@ -1,97 +0,0 @@
; zlib data compression library
EXPORTS
; basic functions
zlibVersion
deflate
deflateEnd
inflate
inflateEnd
; advanced functions
deflateSetDictionary
deflateGetDictionary
deflateCopy
deflateReset
deflateParams
deflateTune
deflateBound
deflatePending
deflatePrime
deflateSetHeader
inflateSetDictionary
inflateGetDictionary
inflateSync
inflateCopy
inflateReset
inflateReset2
inflatePrime
inflateMark
inflateGetHeader
inflateBack
inflateBackEnd
zlibCompileFlags
; utility functions
compress
compress2
compressBound
uncompress
uncompress2
gzopen
gzdopen
gzbuffer
gzsetparams
gzread
gzfread
gzwrite
gzfwrite
gzprintf
gzvprintf
gzputs
gzgets
gzputc
gzgetc
gzungetc
gzflush
gzseek
gzrewind
gztell
gzoffset
gzeof
gzdirect
gzclose
gzclose_r
gzclose_w
gzerror
gzclearerr
; large file functions
gzopen64
gzseek64
gztell64
gzoffset64
adler32_combine64
crc32_combine64
crc32_combine_gen64
; checksum functions
adler32
adler32_z
crc32
crc32_z
adler32_combine
crc32_combine
crc32_combine_gen
crc32_combine_op
; various hacks, don't look :)
deflateInit_
deflateInit2_
inflateInit_
inflateInit2_
inflateBackInit_
gzgetc_
zError
inflateSyncPoint
get_crc_table
inflateUndermine
inflateValidate
inflateCodesUsed
inflateResetKeep
deflateResetKeep
gzopen_w
-543
View File
@@ -1,543 +0,0 @@
/* zconf.h -- configuration of the zlib compression library
* Copyright (C) 1995-2024 Jean-loup Gailly, Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
/* @(#) $Id$ */
#ifndef ZCONF_H
#define ZCONF_H
/*
* If you *really* need a unique prefix for all types and library functions,
* compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
* Even better than compiling with -DZ_PREFIX would be to use configure to set
* this permanently in zconf.h using "./configure --zprefix".
*/
#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */
# define Z_PREFIX_SET
/* all linked symbols and init macros */
# define _dist_code z__dist_code
# define _length_code z__length_code
# define _tr_align z__tr_align
# define _tr_flush_bits z__tr_flush_bits
# define _tr_flush_block z__tr_flush_block
# define _tr_init z__tr_init
# define _tr_stored_block z__tr_stored_block
# define _tr_tally z__tr_tally
# define adler32 z_adler32
# define adler32_combine z_adler32_combine
# define adler32_combine64 z_adler32_combine64
# define adler32_z z_adler32_z
# ifndef Z_SOLO
# define compress z_compress
# define compress2 z_compress2
# define compressBound z_compressBound
# endif
# define crc32 z_crc32
# define crc32_combine z_crc32_combine
# define crc32_combine64 z_crc32_combine64
# define crc32_combine_gen z_crc32_combine_gen
# define crc32_combine_gen64 z_crc32_combine_gen64
# define crc32_combine_op z_crc32_combine_op
# define crc32_z z_crc32_z
# define deflate z_deflate
# define deflateBound z_deflateBound
# define deflateCopy z_deflateCopy
# define deflateEnd z_deflateEnd
# define deflateGetDictionary z_deflateGetDictionary
# define deflateInit z_deflateInit
# define deflateInit2 z_deflateInit2
# define deflateInit2_ z_deflateInit2_
# define deflateInit_ z_deflateInit_
# define deflateParams z_deflateParams
# define deflatePending z_deflatePending
# define deflatePrime z_deflatePrime
# define deflateReset z_deflateReset
# define deflateResetKeep z_deflateResetKeep
# define deflateSetDictionary z_deflateSetDictionary
# define deflateSetHeader z_deflateSetHeader
# define deflateTune z_deflateTune
# define deflate_copyright z_deflate_copyright
# define get_crc_table z_get_crc_table
# ifndef Z_SOLO
# define gz_error z_gz_error
# define gz_intmax z_gz_intmax
# define gz_strwinerror z_gz_strwinerror
# define gzbuffer z_gzbuffer
# define gzclearerr z_gzclearerr
# define gzclose z_gzclose
# define gzclose_r z_gzclose_r
# define gzclose_w z_gzclose_w
# define gzdirect z_gzdirect
# define gzdopen z_gzdopen
# define gzeof z_gzeof
# define gzerror z_gzerror
# define gzflush z_gzflush
# define gzfread z_gzfread
# define gzfwrite z_gzfwrite
# define gzgetc z_gzgetc
# define gzgetc_ z_gzgetc_
# define gzgets z_gzgets
# define gzoffset z_gzoffset
# define gzoffset64 z_gzoffset64
# define gzopen z_gzopen
# define gzopen64 z_gzopen64
# ifdef _WIN32
# define gzopen_w z_gzopen_w
# endif
# define gzprintf z_gzprintf
# define gzputc z_gzputc
# define gzputs z_gzputs
# define gzread z_gzread
# define gzrewind z_gzrewind
# define gzseek z_gzseek
# define gzseek64 z_gzseek64
# define gzsetparams z_gzsetparams
# define gztell z_gztell
# define gztell64 z_gztell64
# define gzungetc z_gzungetc
# define gzvprintf z_gzvprintf
# define gzwrite z_gzwrite
# endif
# define inflate z_inflate
# define inflateBack z_inflateBack
# define inflateBackEnd z_inflateBackEnd
# define inflateBackInit z_inflateBackInit
# define inflateBackInit_ z_inflateBackInit_
# define inflateCodesUsed z_inflateCodesUsed
# define inflateCopy z_inflateCopy
# define inflateEnd z_inflateEnd
# define inflateGetDictionary z_inflateGetDictionary
# define inflateGetHeader z_inflateGetHeader
# define inflateInit z_inflateInit
# define inflateInit2 z_inflateInit2
# define inflateInit2_ z_inflateInit2_
# define inflateInit_ z_inflateInit_
# define inflateMark z_inflateMark
# define inflatePrime z_inflatePrime
# define inflateReset z_inflateReset
# define inflateReset2 z_inflateReset2
# define inflateResetKeep z_inflateResetKeep
# define inflateSetDictionary z_inflateSetDictionary
# define inflateSync z_inflateSync
# define inflateSyncPoint z_inflateSyncPoint
# define inflateUndermine z_inflateUndermine
# define inflateValidate z_inflateValidate
# define inflate_copyright z_inflate_copyright
# define inflate_fast z_inflate_fast
# define inflate_table z_inflate_table
# ifndef Z_SOLO
# define uncompress z_uncompress
# define uncompress2 z_uncompress2
# endif
# define zError z_zError
# ifndef Z_SOLO
# define zcalloc z_zcalloc
# define zcfree z_zcfree
# endif
# define zlibCompileFlags z_zlibCompileFlags
# define zlibVersion z_zlibVersion
/* all zlib typedefs in zlib.h and zconf.h */
# define Byte z_Byte
# define Bytef z_Bytef
# define alloc_func z_alloc_func
# define charf z_charf
# define free_func z_free_func
# ifndef Z_SOLO
# define gzFile z_gzFile
# endif
# define gz_header z_gz_header
# define gz_headerp z_gz_headerp
# define in_func z_in_func
# define intf z_intf
# define out_func z_out_func
# define uInt z_uInt
# define uIntf z_uIntf
# define uLong z_uLong
# define uLongf z_uLongf
# define voidp z_voidp
# define voidpc z_voidpc
# define voidpf z_voidpf
/* all zlib structs in zlib.h and zconf.h */
# define gz_header_s z_gz_header_s
# define internal_state z_internal_state
#endif
#if defined(__MSDOS__) && !defined(MSDOS)
# define MSDOS
#endif
#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
# define OS2
#endif
#if defined(_WINDOWS) && !defined(WINDOWS)
# define WINDOWS
#endif
#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
# ifndef WIN32
# define WIN32
# endif
#endif
#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
# ifndef SYS16BIT
# define SYS16BIT
# endif
# endif
#endif
/*
* Compile with -DMAXSEG_64K if the alloc function cannot allocate more
* than 64k bytes at a time (needed on systems with 16-bit int).
*/
#ifdef SYS16BIT
# define MAXSEG_64K
#endif
#ifdef MSDOS
# define UNALIGNED_OK
#endif
#ifdef __STDC_VERSION__
# ifndef STDC
# define STDC
# endif
# if __STDC_VERSION__ >= 199901L
# ifndef STDC99
# define STDC99
# endif
# endif
#endif
#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
# define STDC
#endif
#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
# define STDC
#endif
#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
# define STDC
#endif
#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
# define STDC
#endif
#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
# define STDC
#endif
#ifndef STDC
# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
# define const /* note: need a more gentle solution here */
# endif
#endif
#if defined(ZLIB_CONST) && !defined(z_const)
# define z_const const
#else
# define z_const
#endif
#ifdef Z_SOLO
# ifdef _WIN64
typedef unsigned long long z_size_t;
# else
typedef unsigned long z_size_t;
# endif
#else
# define z_longlong long long
# if defined(NO_SIZE_T)
typedef unsigned NO_SIZE_T z_size_t;
# elif defined(STDC)
# include <stddef.h>
typedef size_t z_size_t;
# else
typedef unsigned long z_size_t;
# endif
# undef z_longlong
#endif
/* Maximum value for memLevel in deflateInit2 */
#ifndef MAX_MEM_LEVEL
# ifdef MAXSEG_64K
# define MAX_MEM_LEVEL 8
# else
# define MAX_MEM_LEVEL 9
# endif
#endif
/* Maximum value for windowBits in deflateInit2 and inflateInit2.
* WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
* created by gzip. (Files created by minigzip can still be extracted by
* gzip.)
*/
#ifndef MAX_WBITS
# define MAX_WBITS 15 /* 32K LZ77 window */
#endif
/* The memory requirements for deflate are (in bytes):
(1 << (windowBits+2)) + (1 << (memLevel+9))
that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
plus a few kilobytes for small objects. For example, if you want to reduce
the default memory requirements from 256K to 128K, compile with
make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
Of course this will generally degrade compression (there's no free lunch).
The memory requirements for inflate are (in bytes) 1 << windowBits
that is, 32K for windowBits=15 (default value) plus about 7 kilobytes
for small objects.
*/
/* Type declarations */
#ifndef OF /* function prototypes */
# ifdef STDC
# define OF(args) args
# else
# define OF(args) ()
# endif
#endif
/* The following definitions for FAR are needed only for MSDOS mixed
* model programming (small or medium model with some far allocations).
* This was tested only with MSC; for other MSDOS compilers you may have
* to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
* just define FAR to be empty.
*/
#ifdef SYS16BIT
# if defined(M_I86SM) || defined(M_I86MM)
/* MSC small or medium model */
# define SMALL_MEDIUM
# ifdef _MSC_VER
# define FAR _far
# else
# define FAR far
# endif
# endif
# if (defined(__SMALL__) || defined(__MEDIUM__))
/* Turbo C small or medium model */
# define SMALL_MEDIUM
# ifdef __BORLANDC__
# define FAR _far
# else
# define FAR far
# endif
# endif
#endif
#if defined(WINDOWS) || defined(WIN32)
/* If building or using zlib as a DLL, define ZLIB_DLL.
* This is not mandatory, but it offers a little performance increase.
*/
# ifdef ZLIB_DLL
# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
# ifdef ZLIB_INTERNAL
# define ZEXTERN extern __declspec(dllexport)
# else
# define ZEXTERN extern __declspec(dllimport)
# endif
# endif
# endif /* ZLIB_DLL */
/* If building or using zlib with the WINAPI/WINAPIV calling convention,
* define ZLIB_WINAPI.
* Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
*/
# ifdef ZLIB_WINAPI
# ifdef FAR
# undef FAR
# endif
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
# endif
# include <windows.h>
/* No need for _export, use ZLIB.DEF instead. */
/* For complete Windows compatibility, use WINAPI, not __stdcall. */
# define ZEXPORT WINAPI
# ifdef WIN32
# define ZEXPORTVA WINAPIV
# else
# define ZEXPORTVA FAR CDECL
# endif
# endif
#endif
#if defined (__BEOS__)
# ifdef ZLIB_DLL
# ifdef ZLIB_INTERNAL
# define ZEXPORT __declspec(dllexport)
# define ZEXPORTVA __declspec(dllexport)
# else
# define ZEXPORT __declspec(dllimport)
# define ZEXPORTVA __declspec(dllimport)
# endif
# endif
#endif
#ifndef ZEXTERN
# define ZEXTERN extern
#endif
#ifndef ZEXPORT
# define ZEXPORT
#endif
#ifndef ZEXPORTVA
# define ZEXPORTVA
#endif
#ifndef FAR
# define FAR
#endif
#if !defined(__MACTYPES__)
typedef unsigned char Byte; /* 8 bits */
#endif
typedef unsigned int uInt; /* 16 bits or more */
typedef unsigned long uLong; /* 32 bits or more */
#ifdef SMALL_MEDIUM
/* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
# define Bytef Byte FAR
#else
typedef Byte FAR Bytef;
#endif
typedef char FAR charf;
typedef int FAR intf;
typedef uInt FAR uIntf;
typedef uLong FAR uLongf;
#ifdef STDC
typedef void const *voidpc;
typedef void FAR *voidpf;
typedef void *voidp;
#else
typedef Byte const *voidpc;
typedef Byte FAR *voidpf;
typedef Byte *voidp;
#endif
#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC)
# include <limits.h>
# if (UINT_MAX == 0xffffffffUL)
# define Z_U4 unsigned
# elif (ULONG_MAX == 0xffffffffUL)
# define Z_U4 unsigned long
# elif (USHRT_MAX == 0xffffffffUL)
# define Z_U4 unsigned short
# endif
#endif
#ifdef Z_U4
typedef Z_U4 z_crc_t;
#else
typedef unsigned long z_crc_t;
#endif
#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */
# define Z_HAVE_UNISTD_H
#endif
#ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */
# define Z_HAVE_STDARG_H
#endif
#ifdef STDC
# ifndef Z_SOLO
# include <sys/types.h> /* for off_t */
# endif
#endif
#if defined(STDC) || defined(Z_HAVE_STDARG_H)
# ifndef Z_SOLO
# include <stdarg.h> /* for va_list */
# endif
#endif
#ifdef _WIN32
# ifndef Z_SOLO
# include <stddef.h> /* for wchar_t */
# endif
#endif
/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
* "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
* though the former does not conform to the LFS document), but considering
* both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
* equivalently requesting no 64-bit operations
*/
#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1
# undef _LARGEFILE64_SOURCE
#endif
#ifndef Z_HAVE_UNISTD_H
# ifdef __WATCOMC__
# define Z_HAVE_UNISTD_H
# endif
#endif
#ifndef Z_HAVE_UNISTD_H
# if defined(_LARGEFILE64_SOURCE) && !defined(_WIN32)
# define Z_HAVE_UNISTD_H
# endif
#endif
#ifndef Z_SOLO
# if defined(Z_HAVE_UNISTD_H)
# include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
# ifdef VMS
# include <unixio.h> /* for off_t */
# endif
# ifndef z_off_t
# define z_off_t off_t
# endif
# endif
#endif
#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0
# define Z_LFS64
#endif
#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64)
# define Z_LARGE64
#endif
#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64)
# define Z_WANT64
#endif
#if !defined(SEEK_SET) && !defined(Z_SOLO)
# define SEEK_SET 0 /* Seek from beginning of file. */
# define SEEK_CUR 1 /* Seek from current position. */
# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
#endif
#ifndef z_off_t
# define z_off_t long
#endif
#if !defined(_WIN32) && defined(Z_LARGE64)
# define z_off64_t off64_t
#else
# if defined(_WIN32) && !defined(__GNUC__)
# define z_off64_t __int64
# else
# define z_off64_t z_off_t
# endif
#endif
/* MVS linker does not support external names larger than 8 bytes */
#if defined(__MVS__)
#pragma map(deflateInit_,"DEIN")
#pragma map(deflateInit2_,"DEIN2")
#pragma map(deflateEnd,"DEEND")
#pragma map(deflateBound,"DEBND")
#pragma map(inflateInit_,"ININ")
#pragma map(inflateInit2_,"ININ2")
#pragma map(inflateEnd,"INEND")
#pragma map(inflateSync,"INSY")
#pragma map(inflateSetDictionary,"INSEDI")
#pragma map(compressBound,"CMBND")
#pragma map(inflate_table,"INTABL")
#pragma map(inflate_fast,"INFA")
#pragma map(inflate_copyright,"INCOPY")
#endif
#endif /* ZCONF_H */
-545
View File
@@ -1,545 +0,0 @@
/* zconf.h -- configuration of the zlib compression library
* Copyright (C) 1995-2024 Jean-loup Gailly, Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
/* @(#) $Id$ */
#ifndef ZCONF_H
#define ZCONF_H
#cmakedefine Z_PREFIX
#cmakedefine Z_HAVE_UNISTD_H
/*
* If you *really* need a unique prefix for all types and library functions,
* compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
* Even better than compiling with -DZ_PREFIX would be to use configure to set
* this permanently in zconf.h using "./configure --zprefix".
*/
#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */
# define Z_PREFIX_SET
/* all linked symbols and init macros */
# define _dist_code z__dist_code
# define _length_code z__length_code
# define _tr_align z__tr_align
# define _tr_flush_bits z__tr_flush_bits
# define _tr_flush_block z__tr_flush_block
# define _tr_init z__tr_init
# define _tr_stored_block z__tr_stored_block
# define _tr_tally z__tr_tally
# define adler32 z_adler32
# define adler32_combine z_adler32_combine
# define adler32_combine64 z_adler32_combine64
# define adler32_z z_adler32_z
# ifndef Z_SOLO
# define compress z_compress
# define compress2 z_compress2
# define compressBound z_compressBound
# endif
# define crc32 z_crc32
# define crc32_combine z_crc32_combine
# define crc32_combine64 z_crc32_combine64
# define crc32_combine_gen z_crc32_combine_gen
# define crc32_combine_gen64 z_crc32_combine_gen64
# define crc32_combine_op z_crc32_combine_op
# define crc32_z z_crc32_z
# define deflate z_deflate
# define deflateBound z_deflateBound
# define deflateCopy z_deflateCopy
# define deflateEnd z_deflateEnd
# define deflateGetDictionary z_deflateGetDictionary
# define deflateInit z_deflateInit
# define deflateInit2 z_deflateInit2
# define deflateInit2_ z_deflateInit2_
# define deflateInit_ z_deflateInit_
# define deflateParams z_deflateParams
# define deflatePending z_deflatePending
# define deflatePrime z_deflatePrime
# define deflateReset z_deflateReset
# define deflateResetKeep z_deflateResetKeep
# define deflateSetDictionary z_deflateSetDictionary
# define deflateSetHeader z_deflateSetHeader
# define deflateTune z_deflateTune
# define deflate_copyright z_deflate_copyright
# define get_crc_table z_get_crc_table
# ifndef Z_SOLO
# define gz_error z_gz_error
# define gz_intmax z_gz_intmax
# define gz_strwinerror z_gz_strwinerror
# define gzbuffer z_gzbuffer
# define gzclearerr z_gzclearerr
# define gzclose z_gzclose
# define gzclose_r z_gzclose_r
# define gzclose_w z_gzclose_w
# define gzdirect z_gzdirect
# define gzdopen z_gzdopen
# define gzeof z_gzeof
# define gzerror z_gzerror
# define gzflush z_gzflush
# define gzfread z_gzfread
# define gzfwrite z_gzfwrite
# define gzgetc z_gzgetc
# define gzgetc_ z_gzgetc_
# define gzgets z_gzgets
# define gzoffset z_gzoffset
# define gzoffset64 z_gzoffset64
# define gzopen z_gzopen
# define gzopen64 z_gzopen64
# ifdef _WIN32
# define gzopen_w z_gzopen_w
# endif
# define gzprintf z_gzprintf
# define gzputc z_gzputc
# define gzputs z_gzputs
# define gzread z_gzread
# define gzrewind z_gzrewind
# define gzseek z_gzseek
# define gzseek64 z_gzseek64
# define gzsetparams z_gzsetparams
# define gztell z_gztell
# define gztell64 z_gztell64
# define gzungetc z_gzungetc
# define gzvprintf z_gzvprintf
# define gzwrite z_gzwrite
# endif
# define inflate z_inflate
# define inflateBack z_inflateBack
# define inflateBackEnd z_inflateBackEnd
# define inflateBackInit z_inflateBackInit
# define inflateBackInit_ z_inflateBackInit_
# define inflateCodesUsed z_inflateCodesUsed
# define inflateCopy z_inflateCopy
# define inflateEnd z_inflateEnd
# define inflateGetDictionary z_inflateGetDictionary
# define inflateGetHeader z_inflateGetHeader
# define inflateInit z_inflateInit
# define inflateInit2 z_inflateInit2
# define inflateInit2_ z_inflateInit2_
# define inflateInit_ z_inflateInit_
# define inflateMark z_inflateMark
# define inflatePrime z_inflatePrime
# define inflateReset z_inflateReset
# define inflateReset2 z_inflateReset2
# define inflateResetKeep z_inflateResetKeep
# define inflateSetDictionary z_inflateSetDictionary
# define inflateSync z_inflateSync
# define inflateSyncPoint z_inflateSyncPoint
# define inflateUndermine z_inflateUndermine
# define inflateValidate z_inflateValidate
# define inflate_copyright z_inflate_copyright
# define inflate_fast z_inflate_fast
# define inflate_table z_inflate_table
# ifndef Z_SOLO
# define uncompress z_uncompress
# define uncompress2 z_uncompress2
# endif
# define zError z_zError
# ifndef Z_SOLO
# define zcalloc z_zcalloc
# define zcfree z_zcfree
# endif
# define zlibCompileFlags z_zlibCompileFlags
# define zlibVersion z_zlibVersion
/* all zlib typedefs in zlib.h and zconf.h */
# define Byte z_Byte
# define Bytef z_Bytef
# define alloc_func z_alloc_func
# define charf z_charf
# define free_func z_free_func
# ifndef Z_SOLO
# define gzFile z_gzFile
# endif
# define gz_header z_gz_header
# define gz_headerp z_gz_headerp
# define in_func z_in_func
# define intf z_intf
# define out_func z_out_func
# define uInt z_uInt
# define uIntf z_uIntf
# define uLong z_uLong
# define uLongf z_uLongf
# define voidp z_voidp
# define voidpc z_voidpc
# define voidpf z_voidpf
/* all zlib structs in zlib.h and zconf.h */
# define gz_header_s z_gz_header_s
# define internal_state z_internal_state
#endif
#if defined(__MSDOS__) && !defined(MSDOS)
# define MSDOS
#endif
#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
# define OS2
#endif
#if defined(_WINDOWS) && !defined(WINDOWS)
# define WINDOWS
#endif
#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
# ifndef WIN32
# define WIN32
# endif
#endif
#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
# ifndef SYS16BIT
# define SYS16BIT
# endif
# endif
#endif
/*
* Compile with -DMAXSEG_64K if the alloc function cannot allocate more
* than 64k bytes at a time (needed on systems with 16-bit int).
*/
#ifdef SYS16BIT
# define MAXSEG_64K
#endif
#ifdef MSDOS
# define UNALIGNED_OK
#endif
#ifdef __STDC_VERSION__
# ifndef STDC
# define STDC
# endif
# if __STDC_VERSION__ >= 199901L
# ifndef STDC99
# define STDC99
# endif
# endif
#endif
#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
# define STDC
#endif
#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
# define STDC
#endif
#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
# define STDC
#endif
#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
# define STDC
#endif
#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
# define STDC
#endif
#ifndef STDC
# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
# define const /* note: need a more gentle solution here */
# endif
#endif
#if defined(ZLIB_CONST) && !defined(z_const)
# define z_const const
#else
# define z_const
#endif
#ifdef Z_SOLO
# ifdef _WIN64
typedef unsigned long long z_size_t;
# else
typedef unsigned long z_size_t;
# endif
#else
# define z_longlong long long
# if defined(NO_SIZE_T)
typedef unsigned NO_SIZE_T z_size_t;
# elif defined(STDC)
# include <stddef.h>
typedef size_t z_size_t;
# else
typedef unsigned long z_size_t;
# endif
# undef z_longlong
#endif
/* Maximum value for memLevel in deflateInit2 */
#ifndef MAX_MEM_LEVEL
# ifdef MAXSEG_64K
# define MAX_MEM_LEVEL 8
# else
# define MAX_MEM_LEVEL 9
# endif
#endif
/* Maximum value for windowBits in deflateInit2 and inflateInit2.
* WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
* created by gzip. (Files created by minigzip can still be extracted by
* gzip.)
*/
#ifndef MAX_WBITS
# define MAX_WBITS 15 /* 32K LZ77 window */
#endif
/* The memory requirements for deflate are (in bytes):
(1 << (windowBits+2)) + (1 << (memLevel+9))
that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
plus a few kilobytes for small objects. For example, if you want to reduce
the default memory requirements from 256K to 128K, compile with
make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
Of course this will generally degrade compression (there's no free lunch).
The memory requirements for inflate are (in bytes) 1 << windowBits
that is, 32K for windowBits=15 (default value) plus about 7 kilobytes
for small objects.
*/
/* Type declarations */
#ifndef OF /* function prototypes */
# ifdef STDC
# define OF(args) args
# else
# define OF(args) ()
# endif
#endif
/* The following definitions for FAR are needed only for MSDOS mixed
* model programming (small or medium model with some far allocations).
* This was tested only with MSC; for other MSDOS compilers you may have
* to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
* just define FAR to be empty.
*/
#ifdef SYS16BIT
# if defined(M_I86SM) || defined(M_I86MM)
/* MSC small or medium model */
# define SMALL_MEDIUM
# ifdef _MSC_VER
# define FAR _far
# else
# define FAR far
# endif
# endif
# if (defined(__SMALL__) || defined(__MEDIUM__))
/* Turbo C small or medium model */
# define SMALL_MEDIUM
# ifdef __BORLANDC__
# define FAR _far
# else
# define FAR far
# endif
# endif
#endif
#if defined(WINDOWS) || defined(WIN32)
/* If building or using zlib as a DLL, define ZLIB_DLL.
* This is not mandatory, but it offers a little performance increase.
*/
# ifdef ZLIB_DLL
# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
# ifdef ZLIB_INTERNAL
# define ZEXTERN extern __declspec(dllexport)
# else
# define ZEXTERN extern __declspec(dllimport)
# endif
# endif
# endif /* ZLIB_DLL */
/* If building or using zlib with the WINAPI/WINAPIV calling convention,
* define ZLIB_WINAPI.
* Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
*/
# ifdef ZLIB_WINAPI
# ifdef FAR
# undef FAR
# endif
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
# endif
# include <windows.h>
/* No need for _export, use ZLIB.DEF instead. */
/* For complete Windows compatibility, use WINAPI, not __stdcall. */
# define ZEXPORT WINAPI
# ifdef WIN32
# define ZEXPORTVA WINAPIV
# else
# define ZEXPORTVA FAR CDECL
# endif
# endif
#endif
#if defined (__BEOS__)
# ifdef ZLIB_DLL
# ifdef ZLIB_INTERNAL
# define ZEXPORT __declspec(dllexport)
# define ZEXPORTVA __declspec(dllexport)
# else
# define ZEXPORT __declspec(dllimport)
# define ZEXPORTVA __declspec(dllimport)
# endif
# endif
#endif
#ifndef ZEXTERN
# define ZEXTERN extern
#endif
#ifndef ZEXPORT
# define ZEXPORT
#endif
#ifndef ZEXPORTVA
# define ZEXPORTVA
#endif
#ifndef FAR
# define FAR
#endif
#if !defined(__MACTYPES__)
typedef unsigned char Byte; /* 8 bits */
#endif
typedef unsigned int uInt; /* 16 bits or more */
typedef unsigned long uLong; /* 32 bits or more */
#ifdef SMALL_MEDIUM
/* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
# define Bytef Byte FAR
#else
typedef Byte FAR Bytef;
#endif
typedef char FAR charf;
typedef int FAR intf;
typedef uInt FAR uIntf;
typedef uLong FAR uLongf;
#ifdef STDC
typedef void const *voidpc;
typedef void FAR *voidpf;
typedef void *voidp;
#else
typedef Byte const *voidpc;
typedef Byte FAR *voidpf;
typedef Byte *voidp;
#endif
#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC)
# include <limits.h>
# if (UINT_MAX == 0xffffffffUL)
# define Z_U4 unsigned
# elif (ULONG_MAX == 0xffffffffUL)
# define Z_U4 unsigned long
# elif (USHRT_MAX == 0xffffffffUL)
# define Z_U4 unsigned short
# endif
#endif
#ifdef Z_U4
typedef Z_U4 z_crc_t;
#else
typedef unsigned long z_crc_t;
#endif
#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */
# define Z_HAVE_UNISTD_H
#endif
#ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */
# define Z_HAVE_STDARG_H
#endif
#ifdef STDC
# ifndef Z_SOLO
# include <sys/types.h> /* for off_t */
# endif
#endif
#if defined(STDC) || defined(Z_HAVE_STDARG_H)
# ifndef Z_SOLO
# include <stdarg.h> /* for va_list */
# endif
#endif
#ifdef _WIN32
# ifndef Z_SOLO
# include <stddef.h> /* for wchar_t */
# endif
#endif
/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
* "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
* though the former does not conform to the LFS document), but considering
* both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
* equivalently requesting no 64-bit operations
*/
#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1
# undef _LARGEFILE64_SOURCE
#endif
#ifndef Z_HAVE_UNISTD_H
# ifdef __WATCOMC__
# define Z_HAVE_UNISTD_H
# endif
#endif
#ifndef Z_HAVE_UNISTD_H
# if defined(_LARGEFILE64_SOURCE) && !defined(_WIN32)
# define Z_HAVE_UNISTD_H
# endif
#endif
#ifndef Z_SOLO
# if defined(Z_HAVE_UNISTD_H)
# include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
# ifdef VMS
# include <unixio.h> /* for off_t */
# endif
# ifndef z_off_t
# define z_off_t off_t
# endif
# endif
#endif
#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0
# define Z_LFS64
#endif
#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64)
# define Z_LARGE64
#endif
#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64)
# define Z_WANT64
#endif
#if !defined(SEEK_SET) && !defined(Z_SOLO)
# define SEEK_SET 0 /* Seek from beginning of file. */
# define SEEK_CUR 1 /* Seek from current position. */
# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
#endif
#ifndef z_off_t
# define z_off_t long
#endif
#if !defined(_WIN32) && defined(Z_LARGE64)
# define z_off64_t off64_t
#else
# if defined(_WIN32) && !defined(__GNUC__)
# define z_off64_t __int64
# else
# define z_off64_t z_off_t
# endif
#endif
/* MVS linker does not support external names larger than 8 bytes */
#if defined(__MVS__)
#pragma map(deflateInit_,"DEIN")
#pragma map(deflateInit2_,"DEIN2")
#pragma map(deflateEnd,"DEEND")
#pragma map(deflateBound,"DEBND")
#pragma map(inflateInit_,"ININ")
#pragma map(inflateInit2_,"ININ2")
#pragma map(inflateEnd,"INEND")
#pragma map(inflateSync,"INSY")
#pragma map(inflateSetDictionary,"INSEDI")
#pragma map(compressBound,"CMBND")
#pragma map(inflate_table,"INTABL")
#pragma map(inflate_fast,"INFA")
#pragma map(inflate_copyright,"INCOPY")
#endif
#endif /* ZCONF_H */
-149
View File
@@ -1,149 +0,0 @@
.TH ZLIB 3 "22 Jan 2024"
.SH NAME
zlib \- compression/decompression library
.SH SYNOPSIS
[see
.I zlib.h
for full description]
.SH DESCRIPTION
The
.I zlib
library is a general purpose data compression library.
The code is thread safe, assuming that the standard library functions
used are thread safe, such as memory allocation routines.
It provides in-memory compression and decompression functions,
including integrity checks of the uncompressed data.
This version of the library supports only one compression method (deflation)
but other algorithms may be added later
with the same stream interface.
.LP
Compression can be done in a single step if the buffers are large enough
or can be done by repeated calls of the compression function.
In the latter case,
the application must provide more input and/or consume the output
(providing more output space) before each call.
.LP
The library also supports reading and writing files in
.IR gzip (1)
(.gz) format
with an interface similar to that of stdio.
.LP
The library does not install any signal handler.
The decoder checks the consistency of the compressed data,
so the library should never crash even in the case of corrupted input.
.LP
All functions of the compression library are documented in the file
.IR zlib.h .
The distribution source includes examples of use of the library
in the files
.I test/example.c
and
.IR test/minigzip.c,
as well as other examples in the
.IR examples/
directory.
.LP
Changes to this version are documented in the file
.I ChangeLog
that accompanies the source.
.LP
.I zlib
is built in to many languages and operating systems, including but not limited to
Java, Python, .NET, PHP, Perl, Ruby, Swift, and Go.
.LP
An experimental package to read and write files in the .zip format,
written on top of
.I zlib
by Gilles Vollant (info@winimage.com),
is available at:
.IP
http://www.winimage.com/zLibDll/minizip.html
and also in the
.I contrib/minizip
directory of the main
.I zlib
source distribution.
.SH "SEE ALSO"
The
.I zlib
web site can be found at:
.IP
http://zlib.net/
.LP
The data format used by the
.I zlib
library is described by RFC
(Request for Comments) 1950 to 1952 in the files:
.IP
http://tools.ietf.org/html/rfc1950 (for the zlib header and trailer format)
.br
http://tools.ietf.org/html/rfc1951 (for the deflate compressed data format)
.br
http://tools.ietf.org/html/rfc1952 (for the gzip header and trailer format)
.LP
Mark Nelson wrote an article about
.I zlib
for the Jan. 1997 issue of Dr. Dobb's Journal;
a copy of the article is available at:
.IP
http://marknelson.us/1997/01/01/zlib-engine/
.SH "REPORTING PROBLEMS"
Before reporting a problem,
please check the
.I zlib
web site to verify that you have the latest version of
.IR zlib ;
otherwise,
obtain the latest version and see if the problem still exists.
Please read the
.I zlib
FAQ at:
.IP
http://zlib.net/zlib_faq.html
.LP
before asking for help.
Send questions and/or comments to zlib@gzip.org,
or (for the Windows DLL version) to Gilles Vollant (info@winimage.com).
.SH AUTHORS AND LICENSE
Version 1.3.1
.LP
Copyright (C) 1995-2024 Jean-loup Gailly and Mark Adler
.LP
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
.LP
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
.LP
.nr step 1 1
.IP \n[step]. 3
The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
.IP \n+[step].
Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
.IP \n+[step].
This notice may not be removed or altered from any source distribution.
.LP
Jean-loup Gailly Mark Adler
.br
jloup@gzip.org madler@alumni.caltech.edu
.LP
The deflate format used by
.I zlib
was defined by Phil Katz.
The deflate and
.I zlib
specifications were written by L. Peter Deutsch.
Thanks to all the people who reported problems and suggested various
improvements in
.IR zlib ;
who are too numerous to cite here.
.LP
UNIX manual page by R. P. C. Rodgers,
U.S. National Library of Medicine (rodgers@nlm.nih.gov).
.\" end of man page
-1938
View File
File diff suppressed because it is too large. Load diff
-11
View File
@@ -1,11 +0,0 @@
--- zconf.h Wed Jul 20 17:40:26 2005
+++ zconf.h Sun May 21 14:38:10 2006
@@ -284,7 +284,7 @@
typedef Byte *voidp;
#endif
-#if 1 /* HAVE_UNISTD_H -- this line is updated by ./configure */
+#if 0 /* HAVE_UNISTD_H -- this line is updated by ./configure */
# include <sys/types.h> /* for off_t */
# include <unistd.h> /* for SEEK_* and off_t */
# ifdef VMS
+16 -1
View File
@@ -191,6 +191,7 @@ set(SRB2_CORE_GAME_SOURCES
k_kart.c
k_stats.c
i_time.c
i_threads.c
p_local.h
p_maputl.h
@@ -246,6 +247,11 @@ set(SRB2_CONFIG_ASAN OFF CACHE BOOL
"Compile with AddressSanitizer (libasan).")
set(SRB2_CONFIG_UBSAN OFF CACHE BOOL
"Compile with UndefinedBehaviorSanitizer (libubsan).")
set(SRB2_CONFIG_TSAN OFF CACHE BOOL
"Compile with ThreadSanitizer (libtsan).")
set(SRB2_CONFIG_MUMBLE ON CACHE BOOL
"Enable Mumble support")
set(SRB2_CONFIG_SATURNPAK ON CACHE BOOL
"Enable Saturn specific special packet. Required for using the newer resynch system")
@@ -254,6 +260,9 @@ set(SRB2_CONFIG_SATURNJOIN ON CACHE BOOL
set(SRB2_CONFIG_SCREENFBO ON CACHE BOOL
"Enable hardware renderer (OpenGL) FBO downsampling support")
set(SRB2_CONFIG_PHOBOS OFF CACHE BOOL
" Compile the Phobos client. Which contains things not compatible with vanilla, such as raised skinlimits, 32 player support, bugfixes, etc.")
if(${SRB2_CONFIG_DEDICATED})
set(SRB2_CONFIG_HAVE_GME NO)
set(SRB2_CONFIG_HAVE_OPENMPT NO)
@@ -275,6 +284,7 @@ if(${SRB2_CONFIG_HAVE_BLUA})
lua_hooklib.c
lua_hudlib.c
lua_hudlib_drawlist.c
lua_profile.cpp
lua_infolib.c
lua_maplib.c
lua_mathlib.c
@@ -290,6 +300,7 @@ if(${SRB2_CONFIG_HAVE_BLUA})
lua_hook.h
lua_hud.h
lua_hudlib_drawlist.h
lua_profile.h
lua_libs.h
lua_script.h
lua_udatalib.h
@@ -518,7 +529,7 @@ if(${SRB2_CONFIG_HWRENDER})
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_batching.c
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_shaders.c
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_bsp.c
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_cache.cpp
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_cache.c
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_clip.c
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_draw.c
${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_main.cpp
@@ -578,6 +589,10 @@ if(${SRB2_CONFIG_SATURNJOIN})
add_definitions(-DDOSATURNJOIN)
endif()
if(${SRB2_CONFIG_PHOBOS})
add_definitions(-DPHOBOS_BUILD)
endif()
# Targets
# Compatibility flag with later versions of GCC
+35 -16
View File
@@ -65,12 +65,17 @@
# DEBUGMODE=1 - Enable various debugging capabilities.
# Also disables optimizations.
#
# PHOBOS_BUILD=1 - Compile the Phobos client.
# Contains things not compatible with vanilla.
# such as raised skinlimits, 32 player support, bugfixes, etc.
#
# Development flags:
#
# VALGRIND=1 - Enable Valgrind memory debugging support.
# PROFILEMODE=1 - Enable performance profiling (gprof).
# USEASAN=1 - Enable building with Address Sanitizer.
# USEUBSAN=1 - Enable building with Undefined Behavior Sanitizer.
# USETSAN=1 - Enable building with Thread Sanitizer.
# NOLIBBACKTRACE=1 - Disable using Libbacktrace for crashlog traces.
#
# General flags for building:
@@ -93,7 +98,8 @@
# NOLDWARNING=1 - ?
# NOSDLMAIN=1 - ?
# SDLMAIN=1 - ?
# USELTO=1 - Enable building with LTO.
# NOLTO=1 - Disable link time optimizations
# USEJEMALLOC=1 Enable building with jemalloc Allocator to replace GLibc malloc, might improve performance
#
# Library configuration flags:
# Everything here is an override.
@@ -245,10 +251,6 @@ ifdef STATIC
libs+=-static
endif
ifneq (,$(filter $(CC) $(CXX),gcc g++))
opts+=-mno-ms-bitfields
endif
# build with profiling information
ifdef PROFILEMODE
opts+=-pg
@@ -260,23 +262,39 @@ debug_opts=-D_DEBUG
else # build a normal optimized version
debug_opts=-DNDEBUG
opts+=-O3
ifdef USELTO
endif
ifdef USEASAN
# compile with asan
opts+=-O1 -fsanitize=address -fno-omit-frame-pointer -fno-common
libs+=-fsanitize=address
NOLTO=1
endif
ifdef USEUBSAN
# compile with ubsan
opts+=-O1 -fsanitize=undefined -fno-omit-frame-pointer
libs+=-fsanitize=undefined
NOLTO=1
endif
ifdef USETSAN
# compile with tsan
opts+=-O1 -fsanitize=thread -fno-omit-frame-pointer
libs+=-fsanitize=thread
NOLTO=1
endif
ifndef DEBUGMODE
ifndef NOLTO
# compile with LTO
opts+=-flto=auto
libs+=-flto=auto
endif
endif
ifdef USEASAN
# compile with asan
opts+=-fsanitize=address
libs+=-fsanitize=address
endif
ifdef USEUBSAN
# compile with asan
opts+=-fsanitize=undefined
libs+=-fsanitize=undefined
ifdef USEJEMALLOC
libs+=-ljemalloc
endif
ifneq (,$(filter $(CC) $(CXX),clang clang++))
@@ -295,6 +313,7 @@ opts+=$(debug_opts)
opts+=$(foreach v,$(passthru_opts),$(if $($(v)),-D$(v)))
CWFLAGS+=-std=gnu17
CXXFLAGS+=-std=c++17 # force c17 for c++ since most vpss run older ubuntu versions with old compilers
opts+=$(WFLAGS) $(CFLAGS)
-5
View File
@@ -8,11 +8,6 @@ ifdef MINGW
libs+=-mconsole
endif
ifndef NOTHREADS
opts+=-DHAVE_THREADS
sources+=dedicated/i_threads.c
endif
NOOPENMPT=1
NOLIBGME=1
NOHW=1
+2 -1
View File
@@ -64,6 +64,7 @@ endif
# This must have high to low order.
gcc_versions:=\
161 160 16\
152 151 150 15\
142 141 140 14\
133 132 131 130 13\
@@ -77,7 +78,7 @@ gcc_versions:=\
55 54 53 52 51 50\
49 48 47 46 45 44 43 42 41 40
latest_gcc_version:=15.2
latest_gcc_version:=16.1
# Automatically set version flag, but not if one was
# manually set. And don't bother if this is a clean only
+8 -1
View File
@@ -8,6 +8,8 @@ passthru_opts+=\
HAVE_MINIUPNPC\
HAVE_DISCORDRPC DEVELOP\
NOHOLEPUNCH\
HAVE_IPV6\
PHOBOS_BUILD\
# build with debugging information
ifdef DEBUGMODE
@@ -27,6 +29,11 @@ endif
sources+=$(call List,hardware/Sourcefile)
endif
ifndef NOTHREADS
opts+=-DHAVE_THREADS
sources+=i_threads.c
endif
ifndef NOMD5
sources+=md5.c
endif
@@ -85,7 +92,7 @@ ifdef VALGRIND
VALGRIND_PKGCONFIG?=valgrind
VALGRIND_LDFLAGS=
$(eval $(call Use_pkg_config,VALGRIND))
ZDEBUG=1
#ZDEBUG=1 we enable this by default
opts+=-DHAVE_VALGRIND
endif
-2
View File
@@ -42,8 +42,6 @@ include Makefile.d/haiku.mk
else ifdef SOLARIS # FIXME: UNTESTED
UNIX=1
platform=solaris
else ifdef CYGWIN32 # FIXME: UNTESTED
platform=cygwin
else ifdef MINGW
ifdef MINGW64
NONX86=1
-15
View File
@@ -15,16 +15,6 @@ sources+=$(call List,sdl/Sourcefile)
NOUPNP=1
# FIXME: UNTESTED
#ifdef PANDORA
#include sdl/SRB2Pandora/Makefile.cfg
#endif #ifdef PANDORA
# FIXME: UNTESTED
#ifdef CYGWIN32
#include sdl/MakeCYG.cfg
#endif #ifdef CYGWIN32
ifndef NOHW
sources+=sdl/ogl_sdl.c
endif
@@ -40,11 +30,6 @@ sources+=sdl/mixer_sound.c
endif
endif
ifndef NOTHREADS
opts+=-DHAVE_THREADS
sources+=sdl/i_threads.c
endif
ifdef SDL_PKGCONFIG
$(eval $(call Use_pkg_config,SDL))
else
+14 -12
View File
@@ -20,7 +20,8 @@ $(foreach v,$(join $(wordlist 2,$(_n),- $(gcc_versions)),\
CXXFLAGS+= -Wno-aggregate-return
# -W -Wno-unused
WFLAGS:=-Wall -Wno-trigraphs -Wnull-dereference
WFLAGS:=-Wall -Wnull-dereference
#WFLAGS+=-Wno-trigraphs
ifdef GCC152
WFLAGS+=-Wzero-as-null-pointer-constant
endif
@@ -31,7 +32,7 @@ ifndef RELAXWARNINGS
WFLAGS+=-W
#WFLAGS+=-Wno-sign-compare
ifndef GCC295
WFLAGS+=-Wno-div-by-zero
# WFLAGS+=-Wno-div-by-zero
endif
#WFLAGS+=-Wsystem-headers
WFLAGS+=-Wfloat-equal
@@ -62,7 +63,7 @@ endif
endif
WFLAGS+=-Wsign-compare
ifdef GCC91
WFLAGS+=-Wno-error=address-of-packed-member
# WFLAGS+=-Wno-error=address-of-packed-member
endif
ifdef GCC45
WFLAGS+=-Wlogical-op
@@ -105,14 +106,14 @@ endif
endif
WFLAGS+=-Wformat-y2k
ifdef GCC71
WFLAGS+=-Wno-error=format-overflow=2
#WFLAGS+=-Wno-error=format-overflow=2
endif
WFLAGS+=-Wformat-security
ifndef GCC29
#WFLAGS+=-Winit-self
endif
ifdef GCC46
WFLAGS+=-Wno-suggest-attribute=noreturn
#WFLAGS+=-Wno-suggest-attribute=noreturn
endif
ifdef NOLDWARNING
@@ -130,21 +131,21 @@ ifdef GCC44
#WFLAGS+=-Wno-error=array-bounds
endif
ifdef GCC46
WFLAGS+=-Wno-error=suggest-attribute=noreturn
# WFLAGS+=-Wno-error=suggest-attribute=noreturn
endif
ifdef GCC54
WFLAGS+=-Wno-logical-op -Wno-error=logical-op
# WFLAGS+=-Wno-logical-op -Wno-error=logical-op
endif
ifdef GCC61
WFLAGS+=-Wno-tautological-compare -Wno-error=tautological-compare
# WFLAGS+=-Wno-tautological-compare -Wno-error=tautological-compare
endif
ifdef GCC71
WFLAGS+=-Wimplicit-fallthrough=4
endif
ifdef GCC81
WFLAGS+=-Wno-error=format-overflow
WFLAGS+=-Wno-format-overflow
WFLAGS+=-Wno-error=multistatement-macros
# WFLAGS+=-Wno-error=format-overflow
# WFLAGS+=-Wno-format-overflow
# WFLAGS+=-Wno-error=multistatement-macros
endif
ifneq (,$(filter $(CC) $(CXX),clang clang++))
@@ -157,6 +158,7 @@ ifdef NONX86
ifdef X86_64 # yeah that SEEMS contradictory
opts+=-march=x86-64-v2
endif
opts+=-march=native
else
ifndef GCC29
opts+=-msse3 -mfpmath=sse
@@ -183,6 +185,6 @@ endif
# Lua
ifdef GCC43
ifndef GCC44
WFLAGS+=-Wno-logical-op
#WFLAGS+=-Wno-logical-op
endif
endif
+1
View File
@@ -99,3 +99,4 @@ lua_skinlib.c
lua_thinkerlib.c
lua_udatalib.c
lua_glib.c
lua_profile.cpp
+5 -5
View File
@@ -34,8 +34,8 @@ size_t I_GetFreeMem(size_t *total)
/* return si.freeram; */
char buf[1024];
char *memTag;
UINT32 freeKBytes;
UINT32 totalKBytes;
size_t freeKBytes;
size_t totalKBytes;
INT32 n;
INT32 meminfo_fd = -1;
@@ -46,7 +46,7 @@ size_t I_GetFreeMem(size_t *total)
if (n < 0)
{
// Error
*total = 0L;
*total = 0;
return 0;
}
@@ -54,7 +54,7 @@ size_t I_GetFreeMem(size_t *total)
if (NULL == (memTag = strstr(buf, MEMTOTAL)))
{
// Error
*total = 0L;
*total = 0;
return 0;
}
@@ -64,7 +64,7 @@ size_t I_GetFreeMem(size_t *total)
if (NULL == (memTag = strstr(buf, MEMFREE)))
{
// Error
*total = 0L;
*total = 0;
return 0;
}
+1 -1
View File
@@ -434,7 +434,7 @@ LUA_API void lua_pushnumber (lua_State *L, lua_Number n) {
LUA_API void lua_pushlstring (lua_State *L, const char *s, size_t len) {
lua_lock(L);
luaC_checkGC(L);
setsvalue2s(L, L->top, (len == 0) ? luaS_new(L, "") : luaS_newlstr(L, s, len));
setsvalue2s(L, L->top, (len == 0) ? luaS_newlstr(L, "", 0) : luaS_newlstr(L, s, len));
api_incr_top(L);
lua_unlock(L);
}
+15 -3
View File
@@ -20,6 +20,7 @@
#define lauxlib_c
#define LUA_LIB
#include "ldebug.h"
#include "lua.h"
#include "lauxlib.h"
@@ -468,8 +469,19 @@ LUALIB_API char *luaL_prepbuffer (luaL_Buffer *B) {
LUALIB_API void luaL_addlstring (luaL_Buffer *B, const char *s, size_t l) {
while (l--)
luaL_addchar(B, *s++);
while (l) {
size_t space = bufffree(B);
if (space == 0) {
luaL_prepbuffer(B);
lua_assert(bufffree(B) == LUAL_BUFFERSIZE);
space = LUAL_BUFFERSIZE;
}
if (space > l) space = l;
memcpy(B->p, s, space);
B->p += space;
s += space;
l -= space;
}
}
@@ -686,6 +698,6 @@ static int panic (lua_State *L) {
LUALIB_API lua_State *luaL_newstate (void) {
lua_State *L = lua_newstate(l_alloc, NULL);
if (L) lua_atpanic(L, &panic);
if (l_likely(L)) lua_atpanic(L, &panic);
return L;
}
+13 -12
View File
@@ -790,18 +790,19 @@ void luaK_posfix (FuncState *fs, BinOpr op, expdesc *e1, expdesc *e2) {
case OPR_BXOR: codearith(fs, OP_BXOR, e1, e2); break;
case OPR_BSHL: codearith(fs, OP_BSHL, e1, e2); break;
case OPR_BSHR: codearith(fs, OP_BSHR, e1, e2); break;
case OPR_ADD: codearith(fs, OP_ADD, e1, e2); break;
case OPR_SUB: codearith(fs, OP_SUB, e1, e2); break;
case OPR_MUL: codearith(fs, OP_MUL, e1, e2); break;
case OPR_DIV: codearith(fs, OP_DIV, e1, e2); break;
case OPR_MOD: codearith(fs, OP_MOD, e1, e2); break;
case OPR_POW: codearith(fs, OP_POW, e1, e2); break;
case OPR_EQ: codecomp(fs, OP_EQ, 1, e1, e2); break;
case OPR_NE: codecomp(fs, OP_EQ, 0, e1, e2); break;
case OPR_LT: codecomp(fs, OP_LT, 1, e1, e2); break;
case OPR_LE: codecomp(fs, OP_LE, 1, e1, e2); break;
case OPR_GT: codecomp(fs, OP_LT, 0, e1, e2); break;
case OPR_GE: codecomp(fs, OP_LE, 0, e1, e2); break;
case OPR_ADD: case OPR_SUB: case OPR_MUL: case OPR_DIV:
case OPR_MOD: case OPR_POW: {
codearith(fs, op - OPR_ADD + OP_ADD, e1, e2);
break;
}
case OPR_EQ: case OPR_LT: case OPR_LE: {
codecomp(fs, op - OPR_EQ + OP_EQ, 1, e1, e2);
break;
}
case OPR_NE: case OPR_GT: case OPR_GE: {
codecomp(fs, op - OPR_NE + OP_EQ, 0, e1, e2);
break;
}
default: lua_assert(0);
}
}
+3 -3
View File
@@ -21,13 +21,13 @@
/*
** grep "ORDER OPR" if you change these enums
** grep "ORDER OPR" if you change these enums (ORDER OP)
*/
typedef enum BinOpr {
OPR_ADD, OPR_SUB, OPR_MUL, OPR_DIV, OPR_MOD, OPR_POW,
OPR_CONCAT,
OPR_NE, OPR_EQ,
OPR_LT, OPR_LE, OPR_GT, OPR_GE,
OPR_EQ, OPR_LT, OPR_LE,
OPR_NE, OPR_GT, OPR_GE,
OPR_AND, OPR_OR,
OPR_BAND, OPR_BOR, OPR_BXOR,
OPR_BSHL, OPR_BSHR,
+28 -5
View File
@@ -542,16 +542,39 @@ static const char *getobjname (lua_State *L, CallInfo *ci, int stackpos,
static const char *getfuncname (lua_State *L, CallInfo *ci, const char **name) {
TMS tm = 0;
Instruction i;
if ((isLua(ci) && ci->tailcalls > 0) || !isLua(ci - 1))
return NULL; /* calling function is not Lua (or is unknown) */
ci--; /* calling function */
i = ci_func(ci)->l.p->code[currentpc(L, ci)];
if (GET_OPCODE(i) == OP_CALL || GET_OPCODE(i) == OP_TAILCALL ||
GET_OPCODE(i) == OP_TFORLOOP)
return getobjname(L, ci, GETARG_A(i), name);
else
return NULL; /* no useful name can be found */
switch (GET_OPCODE(i)) {
case OP_CALL:
case OP_TAILCALL:
case OP_TFORLOOP:
return getobjname(L, ci, GETARG_A(i), name);
case OP_GETGLOBAL:
case OP_SELF:
case OP_GETTABLE: tm = TM_INDEX; break;
case OP_SETGLOBAL:
case OP_SETTABLE: tm = TM_NEWINDEX; break;
case OP_EQ: tm = TM_EQ; break;
case OP_ADD: tm = TM_ADD; break;
case OP_SUB: tm = TM_SUB; break;
case OP_MUL: tm = TM_MUL; break;
case OP_DIV: tm = TM_DIV; break;
case OP_MOD: tm = TM_MOD; break;
case OP_POW: tm = TM_POW; break;
case OP_UNM: tm = TM_UNM; break;
case OP_LEN: tm = TM_LEN; break;
case OP_LT: tm = TM_LT; break;
case OP_LE: tm = TM_LE; break;
case OP_CONCAT: tm = TM_CONCAT; break;
default:
return NULL; /* else no useful name can be found */
}
*name = getstr(G(L)->tmname[tm]);
return "metamethod";
}
+4 -4
View File
@@ -55,8 +55,8 @@ struct lua_longjmp {
void luaD_seterrorobj (lua_State *L, int lerrcode, StkId oldtop) {
switch (lerrcode) {
case LUA_ERRMEM: {
setsvalue2s(L, oldtop, luaS_newliteral(L, MEMERRMSG));
case LUA_ERRMEM: { /* memory error? */
setsvalue2s(L, oldtop, G(L)->memerrmsg); /* reuse preregistered msg. */
break;
}
case LUA_ERRERR: {
@@ -164,7 +164,7 @@ void luaD_reallocCI (lua_State *L, int newsize) {
void luaD_growstack (lua_State *L, int n) {
if (l_likely(n <= L->stacksize)) /* double size is enough? */
if (n <= L->stacksize) /* double size is enough? */
luaD_reallocstack(L, 2*L->stacksize);
else
luaD_reallocstack(L, L->stacksize + n);
@@ -318,7 +318,7 @@ int luaD_precall (lua_State *L, StkId func, int nresults) {
ci->top = L->top + LUA_MINSTACK;
lua_assert(ci->top <= L->stack_last);
ci->nresults = nresults;
if (L->hookmask & LUA_MASKCALL)
if (l_unlikely(L->hookmask & LUA_MASKCALL))
luaD_callhook(L, LUA_HOOKCALL, -1);
lua_unlock(L);
n = (*curr_func(L)->c.f)(L); /* do the actual call */
+10 -9
View File
@@ -356,20 +356,21 @@ static int read_line (lua_State *L, FILE *f) {
static int read_chars (lua_State *L, FILE *f, size_t n) {
size_t rlen; /* how much to read */
size_t nr; /* number of chars actually read */
size_t tbr = n; /* number of chars to be read */
size_t rlen; /* how much to read in each cycle */
size_t nr; /* number of chars actually read in each cycle */
luaL_Buffer b;
luaL_buffinit(L, &b);
rlen = LUAL_BUFFERSIZE; /* try to read that much each time */
do {
char *p = luaL_prepbuffer(&b);
if (rlen > n) rlen = n; /* cannot read more than asked */
if (rlen > tbr) rlen = tbr; /* cannot read more than asked */
nr = fread(p, sizeof(char), rlen, f);
luaL_addsize(&b, nr);
n -= nr; /* still have to read `n' chars */
} while (n > 0 && nr == rlen); /* until end of count or eof */
tbr -= nr; /* still have to read 'tbr' chars */
} while (tbr > 0 && nr == rlen); /* until end of count or eof */
luaL_pushresult(&b); /* close buffer */
return (n == 0 || lua_objlen(L, -1) > 0);
return (tbr == 0 || tbr < n); /* true iff read something */
}
@@ -432,13 +433,13 @@ static int f_read (lua_State *L) {
static int io_readline (lua_State *L) {
FILE *f = *(FILE **)lua_touserdata(L, lua_upvalueindex(1));
int sucess;
int success;
if (f == NULL) /* file is already closed? */
luaL_error(L, "file is already closed");
sucess = read_line(L, f);
success = read_line(L, f);
if (ferror(f))
return luaL_error(L, "%s", strerror(errno));
if (sucess) return 1;
if (success) return 1;
else { /* EOF */
if (lua_toboolean(L, lua_upvalueindex(2))) { /* generator created file? */
lua_settop(L, 0);
-2
View File
@@ -13,8 +13,6 @@
#include "llimits.h"
#include "lua.h"
#define MEMERRMSG "not enough memory"
#define luaM_reallocv(L,b,on,n,e) \
((cast(size_t, (n)+1) <= MAX_SIZET/(e)) ? /* +1 to avoid warnings */ \
+1 -1
View File
@@ -143,7 +143,7 @@ const char *luaO_pushvfstring (lua_State *L, const char *fmt, va_list argp) {
}
case 'p': {
char buff[4*sizeof(void *) + 8]; /* should be enough space for a `%p' */
sprintf(buff, "%p", va_arg(argp, void *));
snprintf(buff, sizeof(buff), "%p", va_arg(argp, void *));
pushstr(L, buff);
break;
}
+4 -4
View File
@@ -881,10 +881,10 @@ static const struct {
lu_byte right; /* right priority */
} priority[] = { /* ORDER OPR */
{6, 6}, {6, 6}, {7, 7}, {7, 7}, {7, 7}, /* `+' `-' `/' `%' */
{10, 9}, {5, 4}, /* power and concat (right associative) */
{3, 3}, {3, 3}, /* equality and inequality */
{3, 3}, {3, 3}, {3, 3}, {3, 3}, /* order */
{2, 2}, {1, 1} /* logical (and/or) */
{10, 9}, {5, 4}, /* ^, .. (right associative) */
{3, 3}, {3, 3}, {3, 3}, /* ==, <, <= */
{3, 3}, {3, 3}, {3, 3}, /* ~=, >, >= */
{2, 2}, {1, 1} /* and, or */
,{6, 6}, {6, 6}, {6, 6}, /* bit-wise (band/bor/bxor) */
{7, 7}, {7, 7} /* shl/shr */
};
+6 -1
View File
@@ -64,6 +64,9 @@ static void freestack (lua_State *L, lua_State *L1) {
}
#define MEMERRMSG "not enough memory"
/*
** open parts that may cause memory-allocation errors
*/
@@ -76,7 +79,9 @@ static void f_luaopen (lua_State *L, void *ud) {
luaS_resize(L, MINSTRTABSIZE); /* initial size of string table */
luaT_init(L);
luaX_init(L);
luaS_fix(luaS_newliteral(L, MEMERRMSG));
/* pre-create memory-error message */
g->memerrmsg = luaS_newliteral(L, MEMERRMSG);
luaS_fix(g->memerrmsg); /* it should never be collected */
g->GCthreshold = 4*g->totalbytes;
}
+1
View File
@@ -88,6 +88,7 @@ typedef struct global_State {
lua_CFunction panic; /* to be called in unprotected errors */
TValue l_registry;
struct lua_State *mainthread;
TString *memerrmsg; /* memory-error message */
UpVal uvhead; /* head of double-linked list of all open upvalues */
struct Table *mt[NUM_TAGS]; /* metatables for basic types */
TString *tmname[TM_N]; /* array with tag-method names */
+58 -4
View File
@@ -51,7 +51,7 @@ static TString *newlstr (lua_State *L, const char *str, size_t l,
unsigned int h) {
TString *ts;
stringtable *tb;
if (l+1 > (MAX_SIZET - sizeof(TString))/sizeof(char))
if (l_unlikely(l+1 > (MAX_SIZET - sizeof(TString))/sizeof(char)))
luaM_toobig(L);
ts = cast(TString *, luaM_malloc(L, (l+1)*sizeof(char)+sizeof(TString)));
ts->tsv.len = l;
@@ -72,18 +72,72 @@ static TString *newlstr (lua_State *L, const char *str, size_t l,
}
TString *luaS_newlstr (lua_State *L, const char *str, size_t l) {
GCObject *o;
// string hash taken from luaJIT
/* Unaligned load of uint32_t. */
static inline __attribute__((always_inline)) uint32_t getu32(const void* ptr)
{
uint32_t result;
memcpy(&result, ptr, 4);
return result;
}
// smol macro to look a little less messy lul
#define getu8(p) *cast(const uint8_t *, p)
/* Keyed sparse ARX string hash. Constant time. */
static unsigned hash_sparse(const char *str, size_t len)
{
/* Constants taken from lookup3 hash by Bob Jenkins. */
unsigned int a, b, h = cast(unsigned int, len);
#define rol(x, n) (((x)<<(n)) | ((x)>>(-cast(int, n)&(8*sizeof(x)-1))))
if (len >= 4) { /* Caveat: unaligned access! */
a = getu32(str);
h ^= getu32(str+len-4);
b = getu32(str+(len>>1)-2);
h ^= b; h -= rol(b, 14);
b += getu32(str+(len>>2)-1);
} else if (len > 0) {
a = getu8(str);
h ^= getu8(str+len-1);
b = getu8(str+(len>>1));
h ^= b; h -= rol(b, 14);
} else {
return 0;
}
a ^= h; a -= rol(h, 11);
b ^= a; b -= rol(a, 25);
h ^= b; h -= rol(b, 16);
#undef rol
return h;
}
#undef getu8
static inline __attribute__((always_inline)) unsigned luaS_hash (const char *str, size_t l) {
#if 0
unsigned int h = cast(unsigned int, l); /* seed */
size_t step = (l>>5)+1; /* if string is too long, don't hash all its chars */
size_t l1;
for (l1=l; l1>=step; l1-=step) /* compute hash */
h = h ^ ((h<<5)+(h>>2)+cast(unsigned char, str[l1-1]));
return h;
#else
return hash_sparse(str, l);
#endif
}
TString *luaS_newlstr (lua_State *L, const char *str, size_t l) {
GCObject *o;
unsigned int h = luaS_hash(str, l);
for (o = G(L)->strt.hash[lmod(h, G(L)->strt.size)];
o != NULL;
o = o->gch.next) {
TString *ts = rawgco2ts(o);
if (l_unlikely(ts->tsv.len == l && (memcmp(str, getstr(ts), l) == 0))) {
if (ts->tsv.hash == h &&
ts->tsv.len == l &&
(memcmp(str, getstr(ts), l) == 0)) {
/* string may be dead */
if (isdead(G(L), o)) changewhite(o);
return ts;
+6 -6
View File
@@ -776,23 +776,23 @@ static int str_format (lua_State *L) {
strfrmt = scanformat(L, strfrmt, form);
switch (*strfrmt++) {
case 'c': {
sprintf(buff, form, (int)luaL_checknumber(L, arg));
snprintf(buff, sizeof(buff), form, (int)luaL_checknumber(L, arg));
break;
}
case 'd': case 'i': {
addintlen(form);
sprintf(buff, form, (LUA_INTFRM_T)luaL_checknumber(L, arg));
snprintf(buff, sizeof(buff), form, (LUA_INTFRM_T)luaL_checknumber(L, arg));
break;
}
case 'o': case 'u': case 'x': case 'X': {
addintlen(form);
sprintf(buff, form, (unsigned LUA_INTFRM_T)luaL_checknumber(L, arg));
snprintf(buff, sizeof(buff), form, (unsigned LUA_INTFRM_T)luaL_checknumber(L, arg));
break;
}
case 'e': case 'E': case 'f':
case 'g': case 'G': {
lua_Number n = luaL_checknumber(L, arg);
sprintf(buff, form, (double)n);
lua_Number n = luaL_checknumber(L, arg);
snprintf(buff, sizeof(buff), form, (double)n);
break;
}
case 'q': {
@@ -810,7 +810,7 @@ static int str_format (lua_State *L) {
continue; /* skip the `addsize' at the end */
}
else {
sprintf(buff, form, s);
snprintf(buff, sizeof(buff), form, s);
break;
}
}
+7
View File
@@ -81,6 +81,7 @@ static /*const*/ Node dummynode_ = {
/*
** hash for lua_Numbers
*/
#if 0
static Node *hashnum (const Table *t, lua_Number n) {
unsigned int a[numints];
int i;
@@ -90,6 +91,12 @@ static Node *hashnum (const Table *t, lua_Number n) {
for (i = 1; i < numints; i++) a[0] += a[i];
return hashmod(t, a[0]);
}
#else
// our lua_Number is just typedef´d int32 so no need to do any of the above
static inline Node *hashnum (const Table *t, lua_Number n) {
return hashmod(t, cast(unsigned int, n));
}
#endif
+1 -1
View File
@@ -536,7 +536,7 @@
#define LUA_NUMBER_SCAN "%d"
#define LUA_NUMBER_FMT "%d"
#endif
#define lua_number2str(s,n) sprintf((s), LUA_NUMBER_FMT, (n))
#define lua_number2str(s,n) snprintf((s), LUAI_MAXNUMBER2STR, LUA_NUMBER_FMT, (n))
#define LUAI_MAXNUMBER2STR 12 /* 10 digits, sign, and \0 */
#define lua_str2number(s,p) ({ \
long nmr = strtol((s), (p), 10); \
+48 -16
View File
@@ -28,7 +28,7 @@
/* limit for table tag-method chains (to avoid loops) */
/* limit for table tag-method chains (to avoid infinite loops) */
#define MAXTAGLOOP 100
@@ -366,6 +366,7 @@ static void Arith (lua_State *L, StkId ra, TValue *rb,
#define arith_op(op,tm) { \
StkId ra = RA(i); \
TValue *rb = RKB(i); \
TValue *rc = RKC(i); \
if (ttisnumber(rb) && ttisnumber(rc)) { \
@@ -392,7 +393,6 @@ void luaV_execute (lua_State *L, int nexeccalls) {
/* main loop of interpreter */
for (;;) {
const Instruction i = *pc++;
StkId ra;
if ((L->hookmask & (LUA_MASKLINE | LUA_MASKCOUNT)) &&
(--L->hookcount == 0 || L->hookmask & LUA_MASKLINE)) {
traceexec(L, pc);
@@ -402,26 +402,28 @@ void luaV_execute (lua_State *L, int nexeccalls) {
}
base = L->base;
}
/* warning!! several calls may realloc the stack and invalidate `ra' */
ra = RA(i);
lua_assert(base == L->base && L->base == L->ci->base);
lua_assert(base <= L->top && L->top <= L->stack + L->stacksize);
lua_assert(L->top == L->ci->top || luaG_checkopenop(i));
switch (GET_OPCODE(i)) {
case OP_MOVE: {
StkId ra = RA(i);
setobjs2s(L, ra, RB(i));
continue;
}
case OP_LOADK: {
StkId ra = RA(i);
setobj2s(L, ra, KBx(i));
continue;
}
case OP_LOADBOOL: {
StkId ra = RA(i);
setbvalue(ra, GETARG_B(i));
if (GETARG_C(i)) pc++; /* skip next instruction (if C) */
continue;
}
case OP_LOADNIL: {
StkId ra = RA(i);
TValue *rb = RB(i);
do {
setnilvalue(rb--);
@@ -429,11 +431,13 @@ void luaV_execute (lua_State *L, int nexeccalls) {
continue;
}
case OP_GETUPVAL: {
StkId ra = RA(i);
int b = GETARG_B(i);
setobj2s(L, ra, cl->upvals[b]->v);
continue;
}
case OP_GETGLOBAL: {
StkId ra = RA(i);
TValue g;
TValue *rb = KBx(i);
sethvalue(L, &g, cl->env);
@@ -442,10 +446,14 @@ void luaV_execute (lua_State *L, int nexeccalls) {
continue;
}
case OP_GETTABLE: {
Protect(luaV_gettable(L, RB(i), RKC(i), ra));
StkId ra = RA(i);
StkId rb = RB(i);
TValue *rc = RKC(i);
Protect(luaV_gettable(L, rb, rc, ra));
continue;
}
case OP_SETGLOBAL: {
StkId ra = RA(i);
TValue g;
sethvalue(L, &g, cl->env);
lua_assert(ttisstring(KBx(i)));
@@ -453,16 +461,21 @@ void luaV_execute (lua_State *L, int nexeccalls) {
continue;
}
case OP_SETUPVAL: {
StkId ra = RA(i);
UpVal *uv = cl->upvals[GETARG_B(i)];
setobj(L, uv->v, ra);
luaC_barrier(L, uv, ra);
continue;
}
case OP_SETTABLE: {
Protect(luaV_settable(L, ra, RKB(i), RKC(i)));
StkId ra = RA(i);
TValue *rb = RKB(i);
TValue *rc = RKC(i);
Protect(luaV_settable(L, ra, rb, rc));
continue;
}
case OP_NEWTABLE: {
StkId ra = RA(i);
int b = GETARG_B(i);
int c = GETARG_C(i);
sethvalue(L, ra, luaH_new(L, luaO_fb2int(b), luaO_fb2int(c)));
@@ -470,6 +483,7 @@ void luaV_execute (lua_State *L, int nexeccalls) {
continue;
}
case OP_SELF: {
StkId ra = RA(i);
StkId rb = RB(i);
setobjs2s(L, ra+1, rb);
Protect(luaV_gettable(L, rb, RKC(i), ra));
@@ -488,6 +502,7 @@ void luaV_execute (lua_State *L, int nexeccalls) {
continue;
}
case OP_DIV: {
StkId ra = RA(i);
TValue *rb = RKB(i);
TValue *rc = RKC(i);
if (ttisnumber(rb) && ttisnumber(rc)) {
@@ -503,6 +518,7 @@ void luaV_execute (lua_State *L, int nexeccalls) {
continue;
}
case OP_MOD: {
StkId ra = RA(i);
TValue *rb = RKB(i);
TValue *rc = RKC(i);
if (ttisnumber(rb) && ttisnumber(rc)) {
@@ -522,26 +538,27 @@ void luaV_execute (lua_State *L, int nexeccalls) {
continue;
}
case OP_BAND: {
arith_op(luai_numand, TM_AND);
continue;
arith_op(luai_numand, TM_AND);
continue;
}
case OP_BOR: {
arith_op(luai_numor, TM_OR);
continue;
arith_op(luai_numor, TM_OR);
continue;
}
case OP_BXOR: {
arith_op(luai_numxor, TM_XOR);
continue;
arith_op(luai_numxor, TM_XOR);
continue;
}
case OP_BSHL: {
arith_op(luai_numshl, TM_SHL);
continue;
arith_op(luai_numshl, TM_SHL);
continue;
}
case OP_BSHR: {
arith_op(luai_numshr, TM_SHR);
continue;
arith_op(luai_numshr, TM_SHR);
continue;
}
case OP_BNOT: {
StkId ra = RA(i);
TValue *rb = RB(i);
if (ttisnumber(rb)) {
lua_Number nb = nvalue(rb);
@@ -553,6 +570,7 @@ void luaV_execute (lua_State *L, int nexeccalls) {
continue;
}
case OP_UNM: {
StkId ra = RA(i);
TValue *rb = RB(i);
if (ttisnumber(rb)) {
lua_Number nb = nvalue(rb);
@@ -564,11 +582,13 @@ void luaV_execute (lua_State *L, int nexeccalls) {
continue;
}
case OP_NOT: {
StkId ra = RA(i);
int res = l_isfalse(RB(i)); /* next assignment may change this value */
setbvalue(ra, res);
continue;
}
case OP_LEN: {
StkId ra = RA(i);
TValue *rb = RB(i);
switch (ttype(rb)) {
case LUA_TTABLE: {
@@ -626,12 +646,14 @@ void luaV_execute (lua_State *L, int nexeccalls) {
continue;
}
case OP_TEST: {
StkId ra = RA(i);
if (l_isfalse(ra) != GETARG_C(i))
dojump(L, pc, GETARG_sBx(*pc));
pc++;
continue;
}
case OP_TESTSET: {
StkId ra = RA(i);
TValue *rb = RB(i);
if (l_isfalse(rb) != GETARG_C(i)) {
setobjs2s(L, ra, rb);
@@ -641,6 +663,7 @@ void luaV_execute (lua_State *L, int nexeccalls) {
continue;
}
case OP_CALL: {
StkId ra = RA(i);
int b = GETARG_B(i);
int nresults = GETARG_C(i) - 1;
if (b != 0) L->top = ra+b; /* else previous instruction set top */
@@ -662,6 +685,7 @@ void luaV_execute (lua_State *L, int nexeccalls) {
}
}
case OP_TAILCALL: {
StkId ra = RA(i);
int b = GETARG_B(i);
if (b != 0) L->top = ra+b; /* else previous instruction set top */
L->savedpc = pc;
@@ -694,6 +718,7 @@ void luaV_execute (lua_State *L, int nexeccalls) {
}
}
case OP_RETURN: {
StkId ra = RA(i);
int b = GETARG_B(i);
if (b != 0) L->top = ra+b-1;
if (L->openupval) luaF_close(L, base);
@@ -709,6 +734,7 @@ void luaV_execute (lua_State *L, int nexeccalls) {
}
}
case OP_FORLOOP: {
StkId ra = RA(i);
lua_Number step = nvalue(ra+2);
lua_Number idx = luai_numadd(nvalue(ra), step); /* increment index */
lua_Number limit = nvalue(ra+1);
@@ -721,6 +747,7 @@ void luaV_execute (lua_State *L, int nexeccalls) {
continue;
}
case OP_FORPREP: {
StkId ra = RA(i);
const TValue *init = ra;
const TValue *plimit = ra+1;
const TValue *pstep = ra+2;
@@ -737,6 +764,7 @@ void luaV_execute (lua_State *L, int nexeccalls) {
continue;
}
case OP_TFORLOOP: {
StkId ra = RA(i);
StkId cb = ra + 3; /* call base */
setobjs2s(L, cb+2, ra+2);
setobjs2s(L, cb+1, ra+1);
@@ -753,6 +781,7 @@ void luaV_execute (lua_State *L, int nexeccalls) {
continue;
}
case OP_SETLIST: {
StkId ra = RA(i);
int n = GETARG_B(i);
int c = GETARG_C(i);
int last;
@@ -775,10 +804,12 @@ void luaV_execute (lua_State *L, int nexeccalls) {
continue;
}
case OP_CLOSE: {
StkId ra = RA(i);
luaF_close(L, ra);
continue;
}
case OP_CLOSURE: {
StkId ra = RA(i);
Proto *p;
Closure *ncl;
int nup, j;
@@ -799,6 +830,7 @@ void luaV_execute (lua_State *L, int nexeccalls) {
continue;
}
case OP_VARARG: {
StkId ra = RA(i);
int b = GETARG_B(i) - 1;
int j;
CallInfo *ci = L->ci;
+9
View File
@@ -206,6 +206,15 @@ FUNCINLINE static ATTRINLINE UINT32 readulong(void *ptr)
p += n; \
} while (0)
#ifdef PHOBOS_BUILD
#define WRITESKIN(p,b) WRITEUINT16(p,b)
#define READSKIN(p) READUINT16(p)
#else
#define WRITESKIN(p,b) WRITEUINT8(p,b)
#define READSKIN(p) READUINT8(p)
#endif
#ifdef __cplusplus
} // extern "C"
#endif
+109 -19
View File
@@ -113,18 +113,29 @@ static vsbuf_t com_text; // variable sized buffer
* \param ptext The text to add.
* \sa COM_BufInsertText
*/
void COM_BufAddText(const char *ptext)
void COM_BufAddTextEx(const char *ptext, size_t plen)
{
size_t l;
char *text;
l = strlen(ptext);
if (plen == 0)
plen = strlen(ptext);
text = Z_Malloc(sizeof(char) * (plen+1), PU_STATIC, NULL);
memcpy(text, ptext, plen);
text[plen] = '\0';
l = strlen(text);
if (com_text.cursize + l >= com_text.maxsize)
{
CONS_Alert(CONS_WARNING, M_GetText("Command buffer full!\n"));
return;
}
VS_Write(&com_text, ptext, l);
VS_Write(&com_text, text, l);
Z_Free(text);
}
/** Adds command text and executes it immediately.
@@ -132,8 +143,10 @@ void COM_BufAddText(const char *ptext)
* \param ptext The text to execute. A newline is automatically added.
* \sa COM_BufAddText
*/
void COM_BufInsertText(const char *ptext)
void COM_BufInsertTextEx(const char *ptext, size_t plen)
{
const INT32 old_wait = com_wait;
char *temp = NULL;
size_t templen;
@@ -145,10 +158,14 @@ void COM_BufInsertText(const char *ptext)
VS_Clear(&com_text);
}
com_wait = 0;
// add the entire text of the file (or alias)
COM_BufAddText(ptext);
COM_BufAddTextEx(ptext, plen);
COM_BufExecute(); // do it right away
com_wait += old_wait;
// add the copied off data
if (templen)
{
@@ -159,8 +176,7 @@ void COM_BufInsertText(const char *ptext)
/** Progress the wait timer and flush waiting console commands when ready.
*/
void
COM_BufTicker(void)
void COM_BufTicker(void)
{
if (com_wait)
{
@@ -1165,6 +1181,39 @@ void VS_Print(vsbuf_t *buf, const char *data)
//
// =========================================================================
#define NAME cvar_map_t
#define KEY_TY const char *
#define VAL_TY consvar_t *
#define HASH_FN FNV1a_HashLowercaseString
#define CMPR_FN vt_cmpr_casestring
#include "verstable.h"
#define NAME netvar_map_t
#define KEY_TY UINT16
#define VAL_TY consvar_t *
#define HASH_FN vt_hash_integer
#define CMPR_FN vt_cmpr_integer
#include "verstable.h"
static cvar_map_t cvar_map;
static netvar_map_t netvar_map;
CONSTRUCTOR static void CV_InitMap(void)
{
// ensure the map is initialized
cvar_map_t_init(&cvar_map);
cvar_map_t_reserve(&cvar_map, 512);
netvar_map_t_init(&netvar_map);
netvar_map_t_reserve(&netvar_map, 256);
}
DESTRUCTOR static void CV_DestroyMap(void)
{
cvar_map_t_cleanup(&cvar_map);
netvar_map_t_cleanup(&netvar_map);
}
static const char *cv_null_string = "";
/** Searches if a variable has been registered.
@@ -1175,11 +1224,17 @@ static const char *cv_null_string = "";
*/
consvar_t *CV_FindVar(const char *name)
{
consvar_t *cvar;
cvar_map_t_itr it = cvar_map_t_get(&cvar_map, name);
if (!cvar_map_t_is_end(it))
return it.data->val;
// fallback linear search
/*
consvar_t *cvar;
for (cvar = consvar_vars; cvar; cvar = cvar->next)
if (fasticmp(name,cvar->name))
if (fasticmp(name, cvar->name))
return cvar;
*/
return NULL;
}
@@ -1194,7 +1249,7 @@ consvar_t *CV_FindVar(const char *name)
static inline UINT16 CV_ComputeNetid(const char *s)
{
UINT16 ret = 0, i = 0;
static UINT16 premiers[16] = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53};
static const UINT16 premiers[16] = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53};
while (*s)
{
@@ -1213,11 +1268,17 @@ static inline UINT16 CV_ComputeNetid(const char *s)
*/
static consvar_t *CV_FindNetVar(UINT16 netid)
{
netvar_map_t_itr it = netvar_map_t_get(&netvar_map, netid);
if (!netvar_map_t_is_end(it))
return it.data->val;
/*
consvar_t *cvar;
for (cvar = consvar_vars; cvar; cvar = cvar->next)
if (cvar->netid == netid)
return cvar;
*/
if (netid == 44542) // ouch this hack
return &cv_karteliminatelast;
@@ -1283,6 +1344,11 @@ void CV_RegisterVar(consvar_t *variable)
// the SetValue will set this bit
variable->flags &= ~CV_MODIFIED;
cvar_map_t_insert(&cvar_map, variable->name, variable);
if (variable->flags & CV_NETVAR)
netvar_map_t_insert(&netvar_map, variable->netid, variable);
}
/** Finds the string value of a console variable.
@@ -1546,7 +1612,9 @@ void CV_SaveNetVars(UINT8 **p, boolean isdemorecording)
// send only changed cvars ...
// the client will reset all netvars to default before loading
WRITEUINT16(*p, 0x0000);
for (cvar = consvar_vars; cvar; cvar = cvar->next)
{
if (((cvar->flags & CV_NETVAR) && !CV_IsSetToDefault(cvar)) || (isdemorecording && cvar->netid == cv_numlaps.netid))
{
WRITEUINT16(*p, cvar->netid);
@@ -1564,7 +1632,7 @@ void CV_SaveNetVars(UINT8 **p, boolean isdemorecording)
else
{
char buf[9];
sprintf(buf, "%d", mapheaderinfo[gamemap - 1]->numlaps);
snprintf(buf, sizeof(buf), "%d", mapheaderinfo[gamemap - 1]->numlaps);
WRITESTRING(*p, buf);
}
}
@@ -1576,6 +1644,8 @@ void CV_SaveNetVars(UINT8 **p, boolean isdemorecording)
WRITEUINT8(*p, false);
++count;
}
}
WRITEUINT16(count_p, count);
}
@@ -1588,9 +1658,21 @@ size_t CV_LoadNetVars(const UINT8 *bufstart)
// prevent "invalid command received"
serverloading = true;
// we can use our netvar map instead of going through all cvars each time
netvar_map_t_itr it;
for (it = netvar_map_t_first(&netvar_map);
!netvar_map_t_is_end(it);
it = netvar_map_t_next(it))
{
cvar = it.data->val;
Setvalue(cvar, cvar->defaultvalue, true);
}
/*
for (cvar = consvar_vars; cvar; cvar = cvar->next)
if (cvar->flags & CV_NETVAR)
Setvalue(cvar, cvar->defaultvalue, true);
*/
count = READUINT16(p);
while (count--)
@@ -1657,6 +1739,7 @@ static void CV_SetCVar(consvar_t *var, const char *value, boolean stealth)
// send the value of the variable
UINT8 buf[128];
UINT8 *p = buf;
if (!(server || (IsPlayerAdmin(consoleplayer))))
{
CONS_Alert(CONS_NOTICE, "Only the server or admin can change: %s %s\n", var->name, var->string);
@@ -1720,8 +1803,7 @@ void CV_StealthSet(consvar_t *var, const char *value)
void CV_StealthSetValue(consvar_t *var, INT32 value)
{
char val[32];
sprintf(val, "%d", value);
snprintf(val, sizeof(val), "%d", value);
CV_SetCVar(var, val, true);
}
@@ -1741,8 +1823,7 @@ void CV_Set(consvar_t *var, const char *value)
void CV_SetValue(consvar_t *var, INT32 value)
{
char val[32];
sprintf(val, "%d", value);
snprintf(val, sizeof(val), "%d", value);
CV_SetCVar(var, val, false);
}
@@ -1793,7 +1874,7 @@ void CV_AddValue(consvar_t *var, INT32 increment)
if (newvalue == oldvalue)
break; // don't loop forever if there's none of a certain gametype
if (newvalue >= 0 && !mapheaderinfo[newvalue])
if (newvalue >= 0 && newvalue < NUMMAPS && !mapheaderinfo[newvalue])
continue; // Don't allocate the header. That just makes memory usage skyrocket.
} while (!M_CanShowLevelInList(newvalue, gt));
@@ -2140,6 +2221,7 @@ void CV_SaveVariables(FILE *f)
consvar_t *cvar;
for (cvar = consvar_vars; cvar; cvar = cvar->next)
{
if (cvar->flags & CV_SAVE)
{
char stringtowrite[MAXTEXTCMD+1];
@@ -2148,15 +2230,23 @@ void CV_SaveVariables(FILE *f)
if (fastcmp(cvar->string, "MAX") || fastcmp(cvar->string, "MIN"))
{
if (cvar->flags & CV_FLOAT)
sprintf(stringtowrite, "%f", FixedToFloat(cvar->value));
{
snprintf(stringtowrite, sizeof(stringtowrite), "%f", FixedToFloat(cvar->value));
}
else
sprintf(stringtowrite, "%d", cvar->value);
{
snprintf(stringtowrite, sizeof(stringtowrite), "%d", cvar->value);
}
}
else
strcpy(stringtowrite, cvar->string);
{
strncpy(stringtowrite, cvar->string, sizeof(stringtowrite)-1);
stringtowrite[sizeof(stringtowrite)-1] = '\0';
}
fprintf(f, "%s \"%s\"\n", cvar->name, stringtowrite);
}
}
}
//============================================================================
+4 -2
View File
@@ -52,10 +52,12 @@ size_t COM_FirstOption(void);
const char *COM_CompleteCommand(const char *partial, INT32 skips);
// insert at queu (at end of other command)
void COM_BufAddText(const char *btext);
#define COM_BufAddText(s) COM_BufAddTextEx(s, 0)
void COM_BufAddTextEx(const char *ptext, size_t plen);
// insert in head (before other command)
void COM_BufInsertText(const char *btext);
#define COM_BufInsertText(s) COM_BufInsertTextEx(s, 0)
void COM_BufInsertTextEx(const char *ptext, size_t plen);
// don't bother inserting, just do immediately
void COM_ImmedExecute(const char *ptext);
+252 -123
View File
@@ -44,25 +44,25 @@
#define MAXHUDLINES 20
#ifdef HAVE_THREADS
I_mutex con_mutex;
I_Mutex con_mutex;
// g_in_exiting_signal_handler is an evil hack
// I_In_Exiting_Signal_Handler is an evil hack
// to avoid infinite SIGABRT recursion in the signal handler
// due to poisoned locks or mach-o kernel not supporting locks in signals
// or something like that. idk
# define Lock_state() if (!g_in_exiting_signal_handler) { I_lock_mutex(&con_mutex); }
# define Unlock_state() if (!g_in_exiting_signal_handler) { I_unlock_mutex(con_mutex); }
#else/*HAVE_THREADS*/
# define Lock_state() if (!I_In_Exiting_Signal_Handler()) { I_LockMutex(&con_mutex); }
# define Unlock_state() if (!I_In_Exiting_Signal_Handler()) { I_UnlockMutex(con_mutex); }
#else /*HAVE_THREADS*/
# define Lock_state()
# define Unlock_state()
#endif/*HAVE_THREADS*/
#endif /*HAVE_THREADS*/
static boolean con_started = false; // console has been initialised
boolean con_startup = false; // true at game startup, screen need refreshing
static boolean con_forcepic = true; // at startup toggle console translucency when first off
boolean con_recalc = false; // set true when screen size has changed
static tic_t con_tick; // console ticker for anim or blinking prompt cursor
static tic_t con_tick; // console ticker for blinking prompt cursor
// con_scrollup should use time (currenttime - lasttime)..
static boolean consoletoggle; // true when console key pushed, ticker will handle
@@ -103,6 +103,7 @@ static void CON_InputInit(void);
static void CON_RecalcSize(void);
static void CON_ChangeHeight(void);
static void CONS_height_Change(void);
static void CONS_hudlines_Change(void);
static void CONS_backcolor_Change(void);
@@ -131,7 +132,7 @@ static CV_PossibleValue_t speed_cons_t[] = {{0, "MIN"}, {64, "MAX"}, {0, NULL}};
static consvar_t cons_speed = {"con_speed", "8", CV_SAVE, speed_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
// percentage of screen height to use for console
static consvar_t cons_height = {"con_height", "50", CV_SAVE, CV_Unsigned, NULL, 0, NULL, NULL, 0, 0, NULL};
static consvar_t cons_height = {"con_height", "50", CV_CALL|CV_SAVE, CV_Unsigned, CONS_height_Change, 0, NULL, NULL, 0, 0, NULL};
static CV_PossibleValue_t backpic_cons_t[] = {{0, "translucent"}, {1, "picture"}, {0, NULL}};
// whether to use console background picture, or translucent mode
@@ -173,6 +174,18 @@ consvar_t cons_consoleprintinmenu = {"consoleprintinmenu", "Off", CV_SAVE, CV_On
static void CON_Print(char *msg);
// Change the console height on demand
//
static void CONS_height_Change(void)
{
Lock_state();
if (con_destlines > 0 && !con_startup) // If the console is open (as in, not using "bind")...
CON_ChangeHeight(); // ...update its height now, not only when it's closed and re-opened
Unlock_state();
}
//
//
static void CONS_hudlines_Change(void)
@@ -208,14 +221,6 @@ static void CONS_Clear_f(void)
Unlock_state();
}
// Choose english keymap
//
/*static void CONS_English_f(void)
{
shiftxform = english_shiftxform;
CONS_Printf(M_GetText("%s keymap.\n"), M_GetText("English"));
}*/
static char *bindtable[NUMINPUTS];
static void CONS_Bind_f(void)
@@ -633,72 +638,191 @@ void CON_MoveConsole(void)
Unlock_state();
}
//======================================================================
// KEYBOARD LAYOUTS FOR ENTERING TEXT
//======================================================================
static char english_shiftxform[] =
{
0,
1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
31,
' ', '!', '"', '#', '$', '%', '&',
'"', // shift-'
'(', ')', '*', '+',
'<', // shift-,
'_', // shift--
'>', // shift-.
'?', // shift-/
')', // shift-0
'!', // shift-1
'@', // shift-2
'#', // shift-3
'$', // shift-4
'%', // shift-5
'^', // shift-6
'&', // shift-7
'*', // shift-8
'(', // shift-9
':',
':', // shift-;
'<',
'+', // shift-=
'>', '?', '@',
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N',
'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
'{', // shift-[
'|', // shift-backslash - OH MY GOD DOES WATCOM SUCK
'}', // shift-]
'"', '_',
'~', // shift-`
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N',
'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
'{', '|', '}', '~', 127
};
static char french_shiftxform[] =
{
0,
1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
31,
' ','$', //shift-!
'3', //shift-"
'#', '$', '%',
'1', //shift-&
'4', // shift-'
'5', // shift-(
')', // shift-)
'*', '+',
'?', // shift-,
'6', // shift--
'.', '/',
'0', '1', '2', '3', '4', '5',
'6', '7', '8', '9',
'/', // shitf-:
'.', // shift-;
'>', // shift-<
'+', // shift-=
'>', '?', '@',
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N',
'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
'[', '\\', ']', '^',
'8', //shift-_
'`',
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N',
'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
'{', '|', '}', '~', 127,
128, 129,
'2',
131, 132,
'0',
134,
'9',
136, 137,
'7',
139, 140,
'%'
};
static char french_altgrxform[] =
{
0,
1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
31,
' ', '!',
'#', //altgr-"
'#', '$', '%', '&',
'{', //altgr-'
'[', //altgr-(
']', //altgr-)
'*', '+', ',',
'|', //altg--
'.', '/',
'0', '1', '2', '3', '4', '5',
'6', '7', '8', '9',
':', ';', '<',
'}', //altgr-=
'>', '?', '@',
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N',
'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
'[', '\\', ']', '^',
'\\', //altgr-backslash
'`',
'a', 'b', 'c', 'd', 'E', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n',
'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
'{', '|', '}', '~', 127,
128, 129,
'~',
131, 132,
'@',
134,
'^',
136, 137,
'`',
139, 140,
KEY_FR_U_GRAVE
};
// fallback for special letter non displayable in the game (i.e.: 'é','à',etc.)
static INT32 CON_FallBackFrSpecialLetter(INT32 key)
{
switch (key)
{
case KEY_FR_E_AIGUE: return 'e';
case KEY_FR_E_GRAVE: return 'e';
case KEY_FR_C_CEDILLE: return 'c';
case KEY_FR_A_GRAVE: return 'a';
case KEY_FR_U_GRAVE: return 'u';
default: return key;
}
}
// goddang AZERTY
static size_t CON_GetShiftSize(void)
{
return ((cv_keyboardlayout.value == 3) ? sizeof(french_shiftxform) : sizeof(english_shiftxform));
}
static char *CON_Shiftform(void)
{
return (cv_keyboardlayout.value == 3) ? french_shiftxform : english_shiftxform;
}
INT32 CON_ShiftChar(INT32 ch)
{
if (I_UseNativeKeyboard())
if (I_UseNativeKeyboard() || ch >= (INT32)CON_GetShiftSize())
return ch;
// warning: shiftdown is NOT a boolean, it's 1 or 2 for lshift/rshift
if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z'))
{
if (cv_keyboardlayout.value == 3)
{
if (shiftdown ^ capslock)
ch = shiftxform[ch];
else if (altdown & 0x2)
ch = french_altgrxform[ch];
else
ch = HU_FallBackFrSpecialLetter(ch);
}
else
{
if (shiftdown ^ capslock)
ch = shiftxform[ch];
}
return !!shiftdown != capslock ? CON_Shiftform()[ch] : ch;
}
else // if we're holding shift we should still shift non letter symbols
// if we're holding shift we should still shift non letter symbols
if (shiftdown)
{
if (cv_keyboardlayout.value == 3)
{
if (shiftdown)
ch = shiftxform[ch];
else if (altdown & 0x2)
ch = french_altgrxform[ch];
else
ch = HU_FallBackFrSpecialLetter(ch);
}
else
{
if (shiftdown)
ch = shiftxform[ch];
}
return CON_Shiftform()[ch];
}
// AZERTY
if (cv_keyboardlayout.value == 3)
{
if (altdown & 0x2)
return french_altgrxform[ch];
return CON_FallBackFrSpecialLetter(ch);
}
return ch;
}
INT32 CON_ShitAndAltGrChar(INT32 ch)
{
if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z'))
{
if (shiftdown ^ capslock)
ch = shiftxform[ch];
}
else // if we're holding shift we should still shift non letter symbols
{
if (shiftdown)
ch = shiftxform[ch];
else if (altdown & 0x2)
{
ch = french_altgrxform[ch];
}
else
{
ch = HU_FallBackFrSpecialLetter(ch);
}
}
return ch;
}
// Clear time of console heads up messages
//
@@ -892,7 +1016,7 @@ boolean CON_Responder(event_t *ev)
return true;
// ctrl modifier -- changes behavior, adds shortcuts
if ((cv_keyboardlayout.value != 3 && ctrldown) || (cv_keyboardlayout.value == 3 && ctrldown && !altdown))
if (ctrldown && (cv_keyboardlayout.value != 3 || !altdown))
{
// show all cvars/commands that match what we have inputted
if (key == KEY_TAB)
@@ -1222,19 +1346,10 @@ void CON_LogMessage(const char *msg)
// Console print! Wahooo! Lots o fun!
//
void CONS_Printf(const char *fmt, ...)
static inline void CONS_PrintMsg(char *txt)
{
va_list argptr;
static char *txt = NULL;
boolean startup;
if (txt == NULL)
txt = malloc(8192);
va_start(argptr, fmt);
vsnprintf(txt, 8192, fmt, argptr);
va_end(argptr);
// echo console prints to log file
DEBFILE(txt);
@@ -1260,6 +1375,21 @@ void CONS_Printf(const char *fmt, ...)
}
}
void CONS_Printf(const char *fmt, ...)
{
va_list argptr;
static char *txt = NULL;
if (txt == NULL)
txt = malloc(8192);
va_start(argptr, fmt);
vsnprintf(txt, 8192, fmt, argptr);
va_end(argptr);
CONS_PrintMsg(txt);
}
void CONS_Alert(alerttype_t level, const char *fmt, ...)
{
va_list argptr;
@@ -1288,9 +1418,7 @@ void CONS_Alert(alerttype_t level, const char *fmt, ...)
break;
}
// I am lazy and I feel like just letting CONS_Printf take care of things.
// Is that okay?
CONS_Printf("%s", txt);
CONS_PrintMsg(txt);
}
void CONS_Debug(INT32 debugflags, const char *fmt, ...)
@@ -1308,11 +1436,9 @@ void CONS_Debug(INT32 debugflags, const char *fmt, ...)
vsnprintf(txt, 8192, fmt, argptr);
va_end(argptr);
// Again I am lazy, oh well
CONS_Printf("%s", txt);
CONS_PrintMsg(txt);
}
// Print an error message, and wait for ENTER key to continue.
// To make sure the user has seen the message
//
@@ -1324,6 +1450,8 @@ void CONS_Error(const char *msg)
// dirty quick hack, but for the good cause
while (I_GetKey() != KEY_ENTER)
{
I_HandleInterrupt();
// Sleep so we don't take too much of cpu usage
I_Sleep(1.f/TICRATE*1000);
@@ -1522,53 +1650,54 @@ static void CON_DrawConsole(void)
}
// draw console text lines from top to bottom
if (con_curlines < minheight)
return;
i = con_cy - con_scrollup;
// skip the last empty line due to the cursor being at the start of a new line
i--;
i -= (con_curlines - minheight) / charheight;
if (rendermode == render_none) return;
for (y = (con_curlines-minheight) % charheight; y <= con_curlines-minheight; y += charheight, i++)
if (con_curlines >= minheight)
{
INT32 x;
size_t c;
i = con_cy - con_scrollup;
p = (UINT8 *)&con_buffer[((i > 0 ? i : 0)%con_totallines)*con_width];
// skip the last empty line due to the cursor being at the start of a new line
i--;
for (c = 0, x = charwidth; c < con_width; c++, x += charwidth, p++)
i -= (con_curlines - minheight) / charheight;
if (rendermode == render_none)
return;
for (y = (con_curlines-minheight) % charheight; y <= con_curlines-minheight; y += charheight, i++)
{
while (*p & 0x80)
INT32 x;
size_t c;
p = (UINT8 *)&con_buffer[((i > 0 ? i : 0)%con_totallines)*con_width];
for (c = 0, x = charwidth; c < con_width; c++, x += charwidth, p++)
{
charflags = (*p & 0x7f) << V_CHARCOLORSHIFT;
p++;
c++;
while (*p & 0x80)
{
charflags = (*p & 0x7f) << V_CHARCOLORSHIFT;
p++;
c++;
}
if (c >= con_width)
break;
int emotelen;
emote_t *emote;
if ((emote = M_VerifyEmote((const char *)p, &emotelen)))
{
M_DrawScaledEmote(x<<FRACBITS, (y+2*con_scalefactor)<<FRACBITS, charwidth*FRACUNIT/EMOTEWIDTH, emote, V_NOSCALESTART|V_NOSCALEPATCH);
p += emotelen-1;
c += emotelen-1;
continue;
}
V_DrawCharacter(x, y, (INT32)(*p) | charflags | cv_constextsize.value | V_NOSCALESTART, !cv_allcaps.value);
}
if (c >= con_width)
break;
int emotelen;
emote_t *emote;
if ((emote = M_VerifyEmote((const char *)p, &emotelen)))
{
M_DrawScaledEmote(x<<FRACBITS, (y+2*con_scalefactor)<<FRACBITS, charwidth*FRACUNIT/EMOTEWIDTH, emote, V_NOSCALESTART|V_NOSCALEPATCH);
p += emotelen-1;
c += emotelen-1;
continue;
}
V_DrawCharacter(x, y, (INT32)(*p) | charflags | cv_constextsize.value | V_NOSCALESTART, !cv_allcaps.value);
}
}
// draw prompt if enough place (not while game startup)
if ((con_curlines == con_destlines) && (con_curlines >= minheight) && !con_startup)
if ((con_curlines >= (minheight-charheight)) && !con_startup)
CON_DrawInput();
}
+9 -2
View File
@@ -13,6 +13,10 @@
#ifndef __CONSOLE__
#define __CONSOLE__
#ifdef __cplusplus
extern "C" {
#endif
#include "d_event.h"
#include "command.h"
#include "i_threads.h"
@@ -22,7 +26,7 @@ void CON_Init(void);
boolean CON_Responder(event_t *ev);
#ifdef HAVE_THREADS
extern I_mutex con_mutex;
extern I_Mutex con_mutex;
#endif
// set true when screen size has changed, to adapt console
@@ -45,7 +49,6 @@ extern UINT8 *yellowmap, *purplemap, *greenmap, *bluemap, *graymap, *redmap, *or
extern UINT8 *consolebgmap;
INT32 CON_ShiftChar(INT32 ch);
INT32 CON_ShitAndAltGrChar(INT32 ch);
void CON_SetupBackColormap(void);
void CON_ClearHUD(void); // clear heads up messages
@@ -63,4 +66,8 @@ boolean CON_Ready(void);
void CON_LogMessage(const char *msg);
#ifdef __cplusplus
} // extern "C"
#endif
#endif
+30 -3
View File
@@ -1,7 +1,7 @@
// BLANKART
// DR. ROBOTNIK'S RING RACERS
//-----------------------------------------------------------------------------
// Copyright (C) 2024 by Ronald "Eidolon" Kinard
// Copyright (C) 2024 by Kart Krew
// Copyright (C) 2025 by Ronald "Eidolon" Kinard
// Copyright (C) 2025 by Kart Krew
//
// This program is free software distributed under the
// terms of the GNU General Public License, version 2.
@@ -114,6 +114,7 @@ void* PoolAllocator::allocate()
FreeBlock* ret = head_;
head_ = head_->next;
allocated_blocks_++;
return ret;
}
@@ -125,6 +126,7 @@ void PoolAllocator::deallocate(void* p)
FreeBlock* block = reinterpret_cast<FreeBlock*>(p);
block->next = head_;
head_ = block;
allocated_blocks_--;
}
void PoolAllocator::release()
@@ -144,8 +146,33 @@ void PoolAllocator::release()
first_chunk_ = nullptr;
head_ = nullptr;
allocated_blocks_ = 0;
}
bool PoolAllocator::ptrcheck(const void* p) const
{
const uintptr_t paddr = reinterpret_cast<uintptr_t>(p);
ChunkFooter* next = nullptr;
for (ChunkFooter* chunk = first_chunk_; chunk != nullptr; chunk = next)
{
const uintptr_t blockstart = reinterpret_cast<uintptr_t>(chunk->start);
const uintptr_t blockend = blockstart + blocks_ * block_size_;
//CONS_Printf("mobj ptr %lu, block start %lu end %lu\n", paddr, blockstart, blockend);
if (paddr >= blockstart && paddr < blockend)
{
return true;
}
next = chunk->next;
}
return false;
}
static LinearMemory g_frame_memory {4 * 1024 * 1024};
void* Z_Frame_Alloc(size_t size)
+8 -3
View File
@@ -1,7 +1,7 @@
// SONIC ROBO BLAST 2 KART
// DR. ROBOTNIK'S RING RACERS
//-----------------------------------------------------------------------------
// Copyright (C) 2024 by Ronald "Eidolon" Kinard
// Copyright (C) 2024 by Kart Krew
// Copyright (C) 2025 by Ronald "Eidolon" Kinard
// Copyright (C) 2025 by Kart Krew
//
// This program is free software distributed under the
// terms of the GNU General Public License, version 2.
@@ -37,6 +37,7 @@ class PoolAllocator final
FreeBlock* head_;
size_t block_size_;
size_t blocks_;
size_t allocated_blocks_;
int32_t tag_;
ChunkFooter* allocate_chunk();
@@ -47,6 +48,7 @@ public:
, head_(nullptr)
, block_size_(block_size)
, blocks_(blocks)
, allocated_blocks_(0)
, tag_(tag)
{}
PoolAllocator(const PoolAllocator&) = delete;
@@ -59,8 +61,11 @@ public:
void* allocate();
void deallocate(void* p);
constexpr size_t block_size() const noexcept { return block_size_; };
constexpr size_t allocated_blocks() const noexcept { return allocated_blocks_; };
constexpr size_t allocated_bytes() const noexcept { return allocated_blocks_ * block_size_; };
void release();
bool ptrcheck(const void* p) const;
};
} // namespace srb2
+3 -3
View File
@@ -1,7 +1,7 @@
// SONIC ROBO BLAST 2 KART
// DR. ROBOTNIK'S RING RACERS
//-----------------------------------------------------------------------------
// Copyright (C) 2024 by Ronald "Eidolon" Kinard
// Copyright (C) 2024 by Kart Krew
// Copyright (C) 2025 by Ronald "Eidolon" Kinard
// Copyright (C) 2025 by Kart Krew
//
// This program is free software distributed under the
// terms of the GNU General Public License, version 2.
+3 -3
View File
@@ -1,7 +1,7 @@
// BLANKART
// DR. ROBOTNIK'S RING RACERS
//-----------------------------------------------------------------------------
// Copyright (C) 2024 by Ronald "Eidolon" Kinard
// Copyright (C) 2024 by Kart Krew
// Copyright (C) 2025 by Ronald "Eidolon" Kinard
// Copyright (C) 2025 by Kart Krew
//
// This program is free software distributed under the
// terms of the GNU General Public License, version 2.
+3 -3
View File
@@ -1,7 +1,7 @@
// SONIC ROBO BLAST 2 KART
// DR. ROBOTNIK'S RING RACERS
//-----------------------------------------------------------------------------
// Copyright (C) 2024 by Ronald "Eidolon" Kinard
// Copyright (C) 2024 by Kart Krew
// Copyright (C) 2025 by Ronald "Eidolon" Kinard
// Copyright (C) 2025 by Kart Krew
//
// This program is free software distributed under the
// terms of the GNU General Public License, version 2.
+699 -469
View File
File diff suppressed because it is too large. Load diff
+17 -5
View File
@@ -339,13 +339,17 @@ typedef struct
UINT8 clientnode;
UINT8 gamestate;
#ifndef PHOBOS_BUILD
// 0xFF == not in game; else player skin num
UINT8 playerskins[MAXPLAYERS];
UINT8 playercolor[MAXPLAYERS];
#endif
UINT8 gametype;
UINT8 modifiedgame;
#ifndef PHOBOS_BUILD
SINT8 adminplayers[MAXPLAYERS]; // Needs to be signed
#endif
char server_context[8]; // Unique context id, generated at server startup.
@@ -354,7 +358,9 @@ typedef struct
boolean allownewplayer;
boolean discordinvites;
#ifndef PHOBOS_BUILD
UINT8 varlengthinputs[0]; // Playernames and netvars
#endif
} ATTRPACK serverconfig_pak;
typedef struct {
@@ -444,7 +450,7 @@ typedef struct
char name[MAXPLAYERNAME+1];
UINT8 address[4]; // sending another string would run us up against MAXPACKETLENGTH
UINT8 team;
UINT8 skin;
skinnum_t skin;
UINT8 data; // Color is first four bits, hasflag, isit and issuper have one bit each, the last is unused.
UINT32 score;
UINT16 timeinserver; // In seconds.
@@ -454,7 +460,7 @@ typedef struct
typedef struct
{
char name[MAXPLAYERNAME+1];
UINT8 skin;
skinnum_t skin;
UINT8 color;
UINT32 pflags;
UINT32 score;
@@ -600,6 +606,8 @@ extern consvar_t cv_discordinvites;
extern consvar_t cv_serverinfoscreen;
extern consvar_t cv_serveraddoninfo;
// Used in d_net, the only dependence
//tic_t ExpandTics(INT32 low, tic_t basetic);
void D_ClientServerInit(void);
@@ -648,21 +656,25 @@ extern UINT8 playernode[MAXPLAYERS];
extern boolean player_muted[MAXPLAYERS];
extern UINT32 localplayerping;
INT32 D_NumPlayers(void);
void D_ResetTiccmds(void);
tic_t GetLag(INT32 node);
extern UINT8 hu_resynching;
extern boolean hu_resynching;
#ifdef SATURNPAK
extern UINT8 hu_redownloadinggamestate;
extern boolean hu_redownloadinggamestate;
#endif
extern boolean hu_stopped; // kart, true when the game is stopped for players due to a disconnecting or connecting player
#define SAVEGAMESIZE (768*1024)
typedef struct rewind_s
{
UINT8 savebuffer[(768*1024)];
UINT8 savebuffer[SAVEGAMESIZE];
tic_t leveltime;
size_t demopos;
+292 -159
View File
@@ -79,6 +79,9 @@
#include "core/memory.h"
#include "lua_script.h"
#include "lua_profile.h"
#include "m_random.h"
/* Manually defined asset hashes for non-CMake builds
* Last updated 2015 / 05 / 03 - SRB2 v2.1.15 - srb2.srb
@@ -130,14 +133,15 @@ static size_t startuppwadcount = 0;
// autoloading
static char *autoloadwadfiles[MAX_WADFILES];
static char *autoloadwadfilespost[MAX_WADFILES];
static size_t autoloadcount = 0;
static size_t postloadcount = 0;
static size_t autoloadwadcount = 0;
static size_t postloadwadcount = 0;
//
boolean devparm = false; // started game with -devparm
boolean singletics = false; // timedemo
boolean lastdraw = false;
boolean intermissionbginit = false;
#ifdef MOTIONBLUR
INT32 postimgparam[MAXSPLITSCREENPLAYERS];
@@ -153,7 +157,7 @@ boolean music_disabled = false;
INT32 debugload = 0;
#endif
char savegamename[256];
char savegamename[256] = {};
char srb2home[256] = ".";
char srb2path[256] = ".";
@@ -223,13 +227,13 @@ void D_ProcessEvents(void)
// Menu input
#ifdef HAVE_THREADS
I_lock_mutex(&m_menu_mutex);
I_LockMutex(&m_menu_mutex);
#endif
{
eaten = M_Responder(ev);
}
#ifdef HAVE_THREADS
I_unlock_mutex(m_menu_mutex);
I_UnlockMutex(m_menu_mutex);
#endif
if (eaten)
@@ -244,13 +248,13 @@ void D_ProcessEvents(void)
// console input
#ifdef HAVE_THREADS
I_lock_mutex(&con_mutex);
I_LockMutex(&con_mutex);
#endif
{
eaten = CON_Responder(ev);
}
#ifdef HAVE_THREADS
I_unlock_mutex(con_mutex);
I_UnlockMutex(con_mutex);
#endif
if (eaten)
@@ -274,24 +278,6 @@ static void D_Renderview(void)
R_ApplyLevelInterpolators(R_GetTimeFrac(RTF_LEVEL));
if (rendermode == render_soft)
{
// if this is display player 1
if (cv_homremoval.value)
{
if (cv_homremoval.value == 1)
{
// Clear the software screen buffer to remove HOM
memset(vid.screens[0], 31, vid.width * vid.height);
}
else if (cv_homremoval.value == 2)
{
//'development' HOM removal -- makes it blindingly obvious if HOM is spotted.
memset(vid.screens[0], 32+(timeinmap&15), vid.width * vid.height);
}
}
}
for (i = 0; i <= splitscreen; i++)
{
if (!P_MobjWasRemoved(players[displayplayers[i]].mo) || players[displayplayers[i]].playerstate == PST_DEAD)
@@ -322,7 +308,6 @@ static void D_Renderview(void)
break;
default: // Initialize for P1
viewwindowy = viewwindowx = 0;
objectsdrawn = 0;
break;
}
@@ -333,19 +318,17 @@ static void D_Renderview(void)
}
else if (rendermode == render_soft)
#endif
{
R_RenderPlayerView(&players[displayplayers[i]]);
}
if (rendermode == render_soft)
{
if (i == 0)
R_ApplyViewMorph();
if (i == 0)
R_ApplyViewMorph();
#ifdef MOTIONBLUR
V_DoPostProcessor(i, postimgparam[i]);
V_DoPostProcessor(i, postimgparam[i]);
#else
V_DoPostProcessor(i, 0);
V_DoPostProcessor(i, 0);
#endif
}
}
}
@@ -369,6 +352,35 @@ static void D_Renderview(void)
// added comment : there is a wipe eatch change of the gamestate
gamestate_t wipegamestate = GS_LEVEL;
static void D_LimitFps(void);
static void D_MakeIntermissionBG(void)
{
if (!lastdraw)
return;
if (rendermode == render_none)
{
lastdraw = false;
intermissionbginit = false;
return;
}
#ifdef HWRENDER
if (rendermode == render_opengl)
{
HWR_MakeScreenTexture();
}
else
#endif
{
VID_BlitLinearScreen(vid.screens[0], vid.screens[1], vid.width, vid.height, vid.width, vid.width);
}
lastdraw = false;
intermissionbginit = true;
}
static boolean D_Display(void)
{
boolean ranwipe = false;
@@ -452,7 +464,10 @@ static boolean D_Display(void)
}
if (dedicated) // bail out after wipe logic
{
D_LimitFps();
return false;
}
// do buffered drawing
switch (gamestate)
@@ -534,16 +549,8 @@ static boolean D_Display(void)
PS_START_TIMING(ps_rendercalltime);
D_Renderview();
PS_STOP_TIMING(ps_rendercalltime);
}
if (lastdraw)
{
if (rendermode == render_soft)
{
VID_BlitLinearScreen(vid.screens[0], vid.screens[1], vid.width, vid.height, vid.width, vid.width);
}
lastdraw = false;
D_MakeIntermissionBG();
}
PS_START_TIMING(ps_uitime);
@@ -577,11 +584,11 @@ static boolean D_Display(void)
vid.recalc = false;
#ifdef HAVE_THREADS
I_lock_mutex(&m_menu_mutex);
I_LockMutex(&m_menu_mutex);
#endif
M_Drawer(); // menu is drawn even on top of everything...
#ifdef HAVE_THREADS
I_unlock_mutex(m_menu_mutex);
I_UnlockMutex(m_menu_mutex);
#endif
// focus lost moved to M_Drawer
@@ -645,6 +652,15 @@ static boolean D_Display(void)
CON_Drawer(); // Ha, i LIED!
// be sure to limit our fps *before* drawing
// so we can properly "pace" our frames
D_LimitFps();
if (cv_lua_profile.value > 0)
{
LUA_RenderTimers();
}
PS_START_TIMING(ps_swaptime);
I_FinishUpdate(); // page flip or blit buffer
PS_STOP_TIMING(ps_swaptime);
@@ -653,6 +669,130 @@ static boolean D_Display(void)
return ranwipe;
}
//TODO: this is absolutely fucking horrific
//TODO: pass a mobj to it so we dont have to do this terrible thing
// maybe someday.................
/*static void DoFunnyDance (void)
{
thinker_t *th;
static tic_t time = 0;
fixed_t bounce = 0;
fixed_t work, bpm = FLOAT_TO_FIXED(150.f); // FLOAT_TO_FIXED(mapmusic.bpm) << maybe can get the tempo and beat detection lib to work for autodetection
angle_t ang;
if (gamestate != GS_LEVEL)
return;
// dumb hack, preferrably would use beat detection so it starts ON the first beat
// since some songs have weird intros or begin slightly offbeat
if (S_MapMusPlaying())
{
bpm = FixedDiv((60*TICRATE)<<FRACBITS, bpm);
work = time<<FRACBITS;
work %= bpm;
if (time >= (FRACUNIT>>1)) // prevent overflow jump - takes about 15 minutes of loop on the same song to reach
time = (work>>FRACBITS);
work = FixedDiv(work*180, bpm);
ang = (FixedAngle(work)>>ANGLETOFINESHIFT) & FINEMASK;
bounce = (FINESINE(ang) - FRACUNIT/2);
for (th = thinkercap.next; th != &thinkercap; th = th->next)
{
mobj_t *mo;
if (th->function != (actionf_p1)P_MobjThinker) // not a mobj
continue;
mo = (mobj_t *)th;
if (!mo->player)
continue;
// plan is same as above, continue on the next beat of the song to stay in sync
if (paused || P_AutoPause())
{
mo->spritexscale = mo->realxscale;
mo->spriteyscale = mo->realyscale;
continue;
}
mo->spritexscale -= bounce/2;
mo->spriteyscale += bounce/2;
}
time++; // bruh
}
else
time = 0;
}*/
static UINT64 precision = 0;
static precise_t sleeptime = 0;
static precise_t lasttime = 0;
static void D_LimitFps(void)
{
static precise_t curtime = 0;
static precise_t start;
precise_t elapsed = 0;
sleeptime = 0;
// timedemo runs uncapped!
if (singletics)
return;
// in the case of "match refresh rate" + vsync, don't sleep at all
if (cv_vidwait.value && cv_fpscap.value == 0)
return;
const UINT32 framecap = R_GetFramerateCap();
// uncapped obviously does not need to be... capped...
if (framecap == 0)
return;
start = I_GetPreciseTime();
// frametarget in precise_t ticks (ex. 60fps = ~16,666,666)
const precise_t frametarget = precision / framecap;
while (1)
{
// check the current time against the "time of the old frame""
curtime = I_GetPreciseTime();
elapsed = curtime - lasttime;
// done waiting!
// continue as normal
if (elapsed >= frametarget)
{
lasttime = curtime;
// time we spent :chaosleep:ing or doing absolutely nothing
// for frameskip calculations
sleeptime = curtime - start;
return;
}
// if we have more than 1ms to wait
// sleep for a bit to not trash the cpu lul
precise_t remaining = frametarget - elapsed;
if (remaining > (precise_t)(precision / 1000))
{
// sleep for 90% of the time we gotta wait for the next frame
// since we dont wanna oversleep :chaosleep:
I_SleepDuration(9 * remaining / 10);
}
}
// the rest we just be waitin until we meet our frametime target
}
// =========================================================================
// D_SRB2Loop
// =========================================================================
@@ -664,10 +804,7 @@ void D_SRB2Loop(void)
tic_t entertic = 0, oldentertics = 0, realtics = 0, rendertimeout = INFTICS;
double deltatics = 0.0;
double deltasecs = 0.0;
UINT64 precision = 0;
boolean interp = false;
boolean doDisplay = false;
int frameskip = 0;
if (dedicated)
@@ -704,22 +841,18 @@ void D_SRB2Loop(void)
for (;;)
{
// capbudget is the minimum precise_t duration of a single loop iteration
precise_t capbudget;
precise_t elapsed;
precise_t enterprecise, finishprecise;
boolean ranwipe = false;
enterprecise = I_GetPreciseTime();
I_HandleInterrupt();
memset(&g_dc, 0, sizeof(g_dc));
Z_Frame_Reset();
// Casting the return value of a function is bad practice (apparently)
const UINT32 framecap = R_GetFramerateCap();
capbudget = (framecap == 0) ? 0 : (precise_t)((double)precision / (double)framecap + 0.5); // + 0.5 instead of round
boolean ranwipe = false;
I_UpdateTime(cv_timescale.value);
if (lastwipetic)
@@ -745,9 +878,6 @@ void D_SRB2Loop(void)
debugload--;
#endif
interp = !dedicated && R_UsingFrameInterpolation();
doDisplay = false;
renderisnewtic = (realtics > 0 || singletics);
if (renderisnewtic)
@@ -760,12 +890,19 @@ void D_SRB2Loop(void)
// process tics (but maybe not if realtic == 0)
TryRunTics(realtics);
if (resetfpscap)
{
// hack to resync rendering and ticking
// after fpscap change
lasttime = 0;
frameskip = 0;
resetfpscap = false;
}
if (lastdraw || singletics || (gametic > rendergametic))
{
rendergametic = gametic;
rendertimeout = entertic + TICRATE/17;
doDisplay = true;
}
else if (rendertimeout < entertic) // in case the server hang or netsplit
{
@@ -780,17 +917,10 @@ void D_SRB2Loop(void)
}
R_UpdateViewInterpolation();
}
doDisplay = true;
}
if (!dedicated)
{
G_DeviceLEDTick();
}
}
if (interp)
if (!dedicated && R_UsingFrameInterpolation())
{
renderdeltatics = DoubleToFixed(deltatics);
@@ -809,18 +939,15 @@ void D_SRB2Loop(void)
R_SetTimeFrac(FRACUNIT);
}
if (interp || doDisplay)
if (!frameskip)
{
if (!frameskip)
{
ranwipe = D_Display();
}
else if (!dedicated)
{
// always update console movement
// otherwise it will takes literal ages to open
CON_MoveConsole();
}
ranwipe = D_Display();
}
else if (!dedicated)
{
// always update console movement
// otherwise it will takes literal ages to open
CON_MoveConsole();
}
// Only take screenshots after drawing.
@@ -828,9 +955,15 @@ void D_SRB2Loop(void)
M_SaveFrame();
if (takescreenshot)
M_DoScreenShot();
#ifndef DEDICATED
if (!dedicated && renderisnewtic)
{
G_DeviceLEDTick();
}
#endif
// consoleplayer -> displayplayers (hear sounds from viewpoint)
S_UpdateSounds(); // move positional sounds
if (renderisnewtic)
S_UpdateSounds(); // move positional sounds
//LUA_Step();
@@ -843,9 +976,9 @@ void D_SRB2Loop(void)
// Fully completed frame made.
finishprecise = I_GetPreciseTime();
// Use the time before sleep for frameskip calculations:
// Use the time without sleep for frameskip calculations:
// post-sleep time is literally being intentionally wasted
elapsed = finishprecise - enterprecise;
elapsed = (finishprecise - enterprecise) - sleeptime;
deltasecs = (double)elapsed / (double)precision;
deltatics = deltasecs * (double)NEWTICRATE;
@@ -873,19 +1006,6 @@ void D_SRB2Loop(void)
frameskip = 0;
}
if (!singletics)
{
// in the case of "match refresh rate" + vsync, don't sleep at all
const boolean vsync_with_match_refresh = cv_vidwait.value && cv_fpscap.value == 0;
if ((elapsed > 0) && (capbudget > elapsed) && !vsync_with_match_refresh)
{
I_SleepDuration(capbudget - elapsed);
}
}
// Capture the time once more to get the real delta time.
finishprecise = I_GetPreciseTime();
elapsed = finishprecise - enterprecise;
deltasecs = (double)elapsed / (double)precision;
deltatics = deltasecs * (double)NEWTICRATE;
@@ -1037,25 +1157,38 @@ static INT32 D_DetectFileType(const char* filename)
}
// autoload that shit
static void D_AutoloadFile(const char *file, char **filearray, size_t index)
static void D_AutoloadFile(const char *file, char **filearray, size_t *index)
{
char *newfile;
INT32 fileType = D_DetectFileType(file);
if (*index >= MAX_WADFILES)
{
CONS_Printf("D_AutoloadFile: Failed to add file %s! Too many autoloaded files\n", file);
return;
}
if (!fileType)
{
CONS_Printf("D_AutoloadFile: File %s is unknown or invalid\n", file);
return;
}
if (fileType == 1)
{
CONS_Printf("D_AutoloadFile: File %s is a directory\n", file);
return;
}
if (fileType <= 6)
{
newfile = malloc(strlen(file) + 1);
if (!newfile)
I_Error("No more free memory to AutoloadFile %s",file);
I_Error("D_AutoloadFile: No more free memory to autoload file %s", file);
strcpy(newfile, file);
filearray[index] = newfile;
filearray[*index] = newfile;
(*index)++;
}
else
{
@@ -1098,7 +1231,7 @@ static void D_FindAddonsToAutoload(void)
// If the file is found, run our shit
if (!autoloadconfigfile) // nope outta here
{
autoloadcount = postloadcount = 0; // so D_AddAutoloadFiles can skip everything since nothings there to autoload
autoloadwadcount = postloadwadcount = 0; // so D_AddAutoloadFiles can skip everything since nothings there to autoload
return;
}
@@ -1124,27 +1257,40 @@ static void D_FindAddonsToAutoload(void)
if (newline)
*newline = '\0';
if (!postload && W_CheckPostLoadList(wadsToAutoload))
// ok so theres still issues with players adding stuff to autoload by accident
// sometimes this stuff contains maps
// you can probably imagine how that goes in a netgame....
int retmap = W_CheckAutoLoadContainsMap(wadsToAutoload);
if (retmap == -1)
{
CONS_Printf("forcing postload for file %s\n", wadsToAutoload);
CONS_Alert(CONS_WARNING, "Autoload: file %s was not found or not valid.\n", wadsToAutoload);
continue;
}
if (retmap > 0)
{
CONS_Alert(CONS_WARNING, "Autoload: file %s contains map data, this WILL cause crashes and desynchs! skipping...\n", wadsToAutoload);
continue;
}
if (!postload && W_CheckPostLoadList(wadsToAutoload) > 0)
{
CONS_Printf("Autoload: forcing postload for file %s\n", wadsToAutoload);
postload = true;
}
// LOAD IT
if (!postload)
{
D_AutoloadFile(wadsToAutoload, autoloadwadfiles, autoloadcount);
autoloadcount++;
D_AutoloadFile(wadsToAutoload, autoloadwadfiles, &autoloadwadcount);
}
else
{
D_AutoloadFile(wadsToAutoload, autoloadwadfilespost, postloadcount);
postloadcount++;
D_AutoloadFile(wadsToAutoload, autoloadwadfilespost, &postloadwadcount);
}
}
autoloadwadfiles[autoloadcount] = NULL;
autoloadwadfilespost[postloadcount] = NULL;
autoloadwadfiles[autoloadwadcount] = NULL;
autoloadwadfilespost[postloadwadcount] = NULL;
// we dont want memory leaks around here do we?
fclose(autoloadconfigfile);
@@ -1153,7 +1299,7 @@ static void D_FindAddonsToAutoload(void)
static void D_AddAutoloadFiles(void)
{
// nothing to autoload
if (autoloadcount == 0)
if (autoloadwadcount == 0)
return;
CONS_Printf("D_AutoloadFile(): Loading autoloaded addons...\n");
@@ -1161,15 +1307,15 @@ static void D_AddAutoloadFiles(void)
if (W_AddAutoloadedLocalFiles(autoloadwadfiles) == 0)
CONS_Printf("D_AutoloadFile(): Are you sure you put in valid files or what?\n");
D_CleanFile(autoloadwadfiles, autoloadcount);
D_CleanFile(autoloadwadfiles, autoloadwadcount);
autoloadcount = 0;
autoloadwadcount = 0;
}
void D_AddPostloadFiles(void)
{
// nothing to postload
if (postloadcount == 0 || !netgame)
if (postloadwadcount == 0 || !netgame)
return;
CONS_Printf("D_AddPostloadFiles(): Loading postloaded addons...\n");
@@ -1177,9 +1323,9 @@ void D_AddPostloadFiles(void)
if (W_AddAutoloadedLocalFiles(autoloadwadfilespost) == 0)
CONS_Printf("D_AddPostloadFiles(): Are you sure you put in valid files or what?\n");
D_CleanFile(autoloadwadfilespost, postloadcount);
D_CleanFile(autoloadwadfilespost, postloadwadcount);
postloadcount = 0;
postloadwadcount = 0;
}
// ==========================================================================
@@ -1188,7 +1334,7 @@ void D_AddPostloadFiles(void)
static boolean AddIWAD(const char * file, const char *dir)
{
char * path = va(pandf, dir, file);
char *path = va(pandf, dir, file);
if (FIL_ReadFileOK(path))
{
@@ -1216,7 +1362,7 @@ static void IdentifyVersion(void)
#endif
char tempsrb2path[256] = ".";
if (getcwd(tempsrb2path, 256) == NULL)
if (I_GetCwd(tempsrb2path, 256) == NULL)
strcpy(tempsrb2path, ".");
// get the current directory (possible problem on NT with "." as current dir)
@@ -1316,20 +1462,24 @@ static void IdentifyVersion(void)
//
// search for maps
//
static void D_CheckMaps(boolean checkreplaced)
static void D_CheckMapReplacements(boolean pwad)
{
INT32 i;
char *name;
UINT16 wadnum;
lumpinfo_t *lumpinfo;
size_t numfiles;
for (wadnum = 0; wadnum < mainwads; wadnum++)
wadnum = pwad ? (mainwads+1) : 0;
numfiles = pwad ? numwadfiles : mainwads;
for (; wadnum < numfiles; wadnum++)
{
lumpinfo = wadfiles[wadnum]->lumpinfo;
for (i = 0; i < wadfiles[wadnum]->numlumps; i++, lumpinfo++)
{
name = lumpinfo->name;
P_CheckMapReplacements(name, checkreplaced);
P_CheckMapReplacements(name, pwad);
}
}
}
@@ -1365,8 +1515,6 @@ static inline void D_MakeTitleString(char *s)
// extra graphic patches for saturn specific thingies
boolean xtra_speedo = false; // extra speedometer check
boolean xtra_speedo_clr = false; // extra speedometer colour check
boolean xtra_speedo3 = false; // 80x 11 extra speedometer check
boolean xtra_speedo_clr3 = false; // 80x 11 extra speedometer colour check
boolean achi_speedo = false; // achiiro speedometer check
boolean achi_speedo_clr = false; // extra speedometer colour check
boolean dial_speedo = false; // dial speedometer check
@@ -1396,7 +1544,6 @@ static void D_CheckSaturnExtraFiles(void)
CV_PossibleValue_t minimapdot_cons_temp[NUMMINIMAPDOTSTUFF] = {{0, "Off"}, {0, NULL}, {0, NULL}, {0, NULL}, {0, NULL}};
unsigned last_speedo_i = 0;
unsigned last_driftgauge_i = 3;
unsigned last_inputdisplay_i = 2;
unsigned last_minimapdot_i = 0;
#define PUSHCONS(cons, i, id, name) { ++i; cons[i].value = id; cons[i].strvalue = name; }
@@ -1555,20 +1702,6 @@ static void D_CheckSaturnExtraFiles(void)
if (found_extra3_kart)
{
mainwads++;
// 80x11 speedometer crap
if (W_LumpExists("SP_SM3TC"))
{
xtra_speedo3 = true;
PUSHCONS(speedo_cons_temp, last_speedo_i, 7, "Extra");
PUSHCONS(driftgaugestyle_cons_temp, last_driftgauge_i, 5, "Extra");
}
// 80x11 speedometer crap but colour
if (W_LumpExists("SC_SM3TC"))
{
xtra_speedo_clr3 = true;
}
}
#undef PUSHCONS
@@ -1643,12 +1776,6 @@ void D_SRB2Main(void)
strcpy(srb2, "SRB2Kart");
D_MakeTitleString(srb2);
#if defined (__OS2__) && !defined (HAVE_SDL)
// set PM window title
snprintf(pmData->title, sizeof (pmData->title), "SRB2Kart" VERSIONSTRING ": %s", title);
pmData->title[sizeof (pmData->title) - 1] = '\0';
#endif
if (devparm)
CONS_Printf(M_GetText("Development mode ON.\n"));
@@ -1724,8 +1851,12 @@ void D_SRB2Main(void)
D_SetupProtocol();
// rand() needs seeded regardless of password
srand((unsigned int)time(NULL));
// seed M_Random because it is necessary; seed P_Random for scripts that
// might want to use random numbers immediately at start
if (!M_RandomSeedFromOS())
M_RandomSeed((UINT32)time(NULL)); // less good but serviceable
P_SetRandSeed(M_RandomizedSeed());
if (M_CheckParm("-password") && M_IsNextParm())
D_SetPassword(M_GetNextParm());
@@ -1772,10 +1903,6 @@ void D_SRB2Main(void)
// Setup default unlockable conditions
M_SetupDefaultConditionSets();
// Setup character tables
// Have to be done here before files are loaded
M_InitCharacterTables();
// load wad, including the main wad file
CONS_Printf("W_InitMultipleFiles(): Adding IWAD and main PWADs.\n");
@@ -1819,17 +1946,19 @@ void D_SRB2Main(void)
// conversion sometimes needs the palette
V_ReloadPalette();
D_CheckMaps(false);
D_CheckMapReplacements(false);
W_InitMultipleFiles(startuppwads, startuppwadcount, true);
// Only search for pwad maps if we actually have a pwad added
if (startuppwadcount > 0)
{
D_CheckMaps(true);
CONS_Printf("W_InitMultipleFiles(): Adding extra PWADs.\n");
W_InitMultipleFiles(startuppwads, startuppwadcount, true);
// Only search for pwad maps if we actually have a pwad added
D_CheckMapReplacements(true);
D_CleanFile(startuppwads, startuppwadcount);
}
D_CleanFile(startuppwads, startuppwadcount);
startuppwadcount = 0;
cht_Init();
@@ -1916,7 +2045,7 @@ void D_SRB2Main(void)
CONS_Printf("R_Init(): Init SRB2 refresh daemon.\n");
R_Init();
#if SOUND==SOUND_DUMMY
#if SOUND == SOUND_DUMMY
sound_disabled = true;
music_disabled = true;
#else
@@ -2029,9 +2158,13 @@ void D_SRB2Main(void)
if (M_CheckProtoParam("replay"))
{
const char *replayurl = M_GetProtoParam();
char *replayname = strrchr(replayurl, '/');
if (!replayname || !replayurl)
if (!replayurl)
I_Error("REPLAY: Invalid URL.");
gconst char *replayname = strrchr(replayurl, '/');
if (!replayname)
I_Error("REPLAY: Invalid URL.");
#define REPLAYDIR "/DownloadedReplays/"
@@ -2145,8 +2278,8 @@ void D_SRB2Main(void)
if (dedicated && server)
{
levelstarttic = gametic;
G_SetGamestate(GS_LEVEL);
if (!P_SetupLevel(false, false))
I_Quit(); // fail so reset game stuff
}
-2
View File
@@ -38,8 +38,6 @@ extern boolean found_extra3_kart; // for use in k_kart.c
extern boolean xtra_speedo; // extra speedometer check
extern boolean xtra_speedo_clr; // extra speedometer colour check
extern boolean xtra_speedo3; // 80x11 extra speedometer check
extern boolean xtra_speedo_clr3; // 80x11 extra speedometer colour check
extern boolean achi_speedo; // achiiro speedometer check
extern boolean achi_speedo_clr; // extra speedometer colour check
extern boolean dial_speedo; // dial speedometer check
+4 -6
View File
@@ -612,12 +612,8 @@ void Net_WaitAllAckReceived(UINT32 timeout)
static void InitNode(node_t *node)
{
node->acktosend_head = node->acktosend_tail = 0;
memset(node->acktosend, 0, sizeof(node->acktosend));
node->firstacktosend = 0;
memset(node, 0, sizeof(node_t));
node->nextacknum = 1;
node->remotefirstack = 0;
node->flags = 0;
}
static void InitAck(void)
@@ -1319,7 +1315,9 @@ boolean D_CheckNetGame(void)
while (!debugfile && k < MAXPLAYERS)
{
k++;
sprintf(filename, "debug%d.txt", k);
snprintf(filename, sizeof(filename), "debug%d.txt", k);
debugfile = fopen(va("%s" PATHSEP "%s", srb2home, filename), "w");
}
-1
View File
@@ -27,7 +27,6 @@ extern "C" {
// SINT8 is used for nodes sometimes >:(
#define MAXNETNODES 127
#define BROADCASTADDR MAXNETNODES
#define NETSPLITSCREEN // Kart's splitscreen netgame feature
#define STATLENGTH (TICRATE*2)
+354 -548
View File
File diff suppressed because it is too large. Load diff
+6 -14
View File
@@ -21,10 +21,7 @@ extern "C" {
#include "command.h"
void SendWeaponPref(void);
void SendWeaponPref2(void);
void SendWeaponPref3(void);
void SendWeaponPref4(void);
void SendWeaponPref(UINT8 splitplayer);
// console vars
extern consvar_t cv_playername;
@@ -54,10 +51,6 @@ extern consvar_t cv_mousevisible;
//WTF
extern consvar_t cv_mouseturn;
extern consvar_t cv_usejoystick[4]; //MAXSPLITSCREENPLAYERS
#ifdef LJOYSTICK
extern consvar_t cv_joyport;
extern consvar_t cv_joyport2;
#endif
extern consvar_t cv_joyscale[4]; //MAXSPLITSCREENPLAYERS
// normally in p_mobj but the .h is not read
@@ -96,11 +89,6 @@ extern consvar_t cv_pause;
extern consvar_t cv_restrictskinchange, cv_allowteamchange, cv_ingamecap, cv_respawntime;
extern consvar_t cv_spectatorreentry, cv_antigrief;
/*extern consvar_t cv_teleporters, cv_superring, cv_supersneakers, cv_invincibility;
extern consvar_t cv_jumpshield, cv_watershield, cv_ringshield, cv_forceshield, cv_bombshield;
extern consvar_t cv_1up, cv_eggmanbox;
extern consvar_t cv_recycler;*/
// SRB2kart items
extern consvar_t cv_sneaker, cv_rocketsneaker, cv_invincibility, cv_banana;
extern consvar_t cv_eggmanmonitor, cv_orbinaut, cv_jawz, cv_mine;
@@ -158,8 +146,10 @@ extern consvar_t cv_pingstyle;
//extern consvar_t cv_smallpos;
extern consvar_t cv_showminimapnames;
extern consvar_t cv_showminimapfinished;
extern consvar_t cv_minihead;
extern consvar_t cv_showminimapangle;
extern consvar_t cv_spinoutroll;
extern consvar_t cv_showlapemblem;
@@ -199,6 +189,8 @@ extern consvar_t cv_ps_thinkframe_page;
extern consvar_t cv_ps_samplesize;
extern consvar_t cv_ps_descriptor;
extern consvar_t cv_lua_profile;
extern consvar_t cv_director, cv_kartdebugdirector, cv_showdirectorhud;
extern consvar_t cv_showtrackaddon;
@@ -295,7 +287,7 @@ typedef union {
// add game commands, needs cleanup
void D_RegisterServerCommands(void);
void D_RegisterClientCommands(void);
void D_SendPlayerConfig(void);
void D_SendPlayerConfig(UINT8 splitplayer);
void Command_ExitGame_f(void);
void Command_Retry_f(void);
void D_GameTypeChanged(INT32 lastgametype); // not a real _OnChange function anymore
+111 -46
View File
@@ -112,10 +112,12 @@ static fileused_t transferFiles[UINT8_MAX + 1];
INT32 fileneedednum = 0; // Number of files needed to join the server
fileneeded_t fileneeded[MAX_WADFILES] = {}; // List of needed files
#ifdef HAVE_THREADS
static I_mutex downloadmutex;
static I_Mutex downloadmutex;
#endif
char downloaddir[512] = "DOWNLOAD";
INT32 addontypes[NUMADDONTYPES] = {0};
file_download_t filedownload = {};
#ifdef HAVE_CURL
@@ -135,6 +137,8 @@ HTTP_login *curl_logins = NULL;
static void CURLGetFile(void);
#endif
static addontype_t GetAddonType(const char *name);
/** Fills a serverinfo packet with information about wad files loaded.
*
* \todo Give this function a better name since it is in global scope.
@@ -163,7 +167,9 @@ UINT8 *PutFileNeeded(UINT16 firstfile)
continue;
}
nameonly(strcpy(wadfilename, wadfiles[i]->filename));
strncpy(wadfilename, wadfiles[i]->filename, MAX_WADPATH);
wadfilename[MAX_WADPATH-1] = '\0';
nameonly(wadfilename);
// Look below at the WRITE macros to understand what these numbers mean.
const size_t len = strlen(wadfilename) + 1;
@@ -225,8 +231,11 @@ void D_ParseFileneeded(INT32 fileneedednum_parm, UINT8 *fileneededstr, UINT16 fi
fileneeded[i].willsend = (UINT8)(filestatus >> 4);
fileneeded[i].totalsize = READUINT32(p); // The four next bytes are the file size
fileneeded[i].file = NULL; // The file isn't open yet
READSTRINGN(p, fileneeded[i].filename, MAX_WADPATH); // The next bytes are the file name
READSTRINGL(p, fileneeded[i].filename, MAX_WADPATH); // The next bytes are the file name
READMEM(p, fileneeded[i].md5sum, 16); // The last 16 bytes are the file checksum
// Should be good place to calculate that?
fileneeded[i].type = GetAddonType(fileneeded[i].filename);
}
}
@@ -250,9 +259,10 @@ void CL_PrepareDownloadSaveGame(const char *tmpsave)
*/
boolean CL_CheckDownloadable(void)
{
UINT8 i,dlstatus = 0;
UINT8 i, dlstatus = 0;
for (i = 0; i < fileneedednum; i++)
{
if (fileneeded[i].status != FS_FOUND && fileneeded[i].status != FS_OPEN)
{
if (fileneeded[i].willsend == 1)
@@ -263,6 +273,7 @@ boolean CL_CheckDownloadable(void)
else //if (fileneeded[i].willsend == 2)
dlstatus = 2;
}
}
// Downloading locally disabled
if (!dlstatus && M_CheckParm("-nodownload"))
@@ -273,25 +284,31 @@ boolean CL_CheckDownloadable(void)
// not downloadable, put reason in console
CONS_Alert(CONS_NOTICE, M_GetText("You need additional files to connect to this server:\n"));
for (i = 0; i < fileneedednum; i++)
{
if (fileneeded[i].status != FS_FOUND && fileneeded[i].status != FS_OPEN)
{
CONS_Printf(" * \"%s\" (%dK)", fileneeded[i].filename, fileneeded[i].totalsize >> 10);
if (fileneeded[i].status == FS_MD5SUMBAD)
CONS_Printf(M_GetText(" wrong version, md5: "));
else
CONS_Printf(M_GetText(" not found, md5: "));
if (fileneeded[i].status == FS_MD5SUMBAD)
CONS_Printf(M_GetText(" wrong version, md5: "));
else
CONS_Printf(M_GetText(" not found, md5: "));
{
INT32 j;
char md5tmp[33];
for (j = 0; j < 16; j++)
sprintf(&md5tmp[j*2], "%02x", fileneeded[i].md5sum[j]);
snprintf(&md5tmp[j*2], 3, "%02x", fileneeded[i].md5sum[j]);
CONS_Printf("%s", md5tmp);
}
CONS_Printf("\n");
}
}
switch (dlstatus)
{
@@ -305,6 +322,7 @@ boolean CL_CheckDownloadable(void)
CONS_Printf(M_GetText("All files downloadable, but you have chosen to disable downloading locally.\n"));
break;
}
return false;
}
@@ -542,7 +560,7 @@ INT32 CL_CheckFiles(void)
if (fileneeded[i].status != FS_OPEN)
filestoload++;
if (fileneeded[i].status != FS_NOTCHECKED) //since we're running this over multiple tics now, its possible for us to come across files checked in previous tics
if (fileneeded[i].status != FS_NOTCHECKED) // since we're running this over multiple tics now, its possible for us to come across files checked in previous tics
continue;
CONS_Debug(DBG_NETPLAY, "searching for '%s' ", fileneeded[i].filename);
@@ -550,14 +568,18 @@ INT32 CL_CheckFiles(void)
// Check in already loaded files
for (j = mainwads+1; j < numwadfiles; j++)
{
nameonly(strcpy(wadfilename, wadfiles[j]->filename));
if (fasticmp(wadfilename, fileneeded[i].filename) &&
!memcmp(wadfiles[j]->md5sum, fileneeded[i].md5sum, 16))
if (!memcmp(wadfiles[j]->md5sum, fileneeded[i].md5sum, 16))
{
CONS_Debug(DBG_NETPLAY, "already loaded\n");
fileneeded[i].status = FS_OPEN;
return 4;
strncpy(wadfilename, wadfiles[j]->filename, MAX_WADPATH);
wadfilename[MAX_WADPATH-1] = '\0';
nameonly(wadfilename);
if (fasticmp(wadfilename, fileneeded[i].filename))
{
CONS_Debug(DBG_NETPLAY, "already loaded\n");
fileneeded[i].status = FS_OPEN;
return 4;
}
}
}
@@ -575,6 +597,48 @@ INT32 CL_CheckFiles(void)
return 1; //everything is FS_OPEN or FS_FOUND, proceed to loading
}
static addontype_t GetAddonType(const char *name)
{
const char *prefix = strchr(name, '_');
// Doesn't have prefix (no '_' character or it is too far and is probably not for prefix but for something like version)
// KRBCL_ is longest prefix i can think of so this should be enough
if (prefix == NULL || prefix - name > 5)
return ADDON_MISC;
// Skip 'K'
if (*name == 'K')
++name;
switch (*name)
{
case 'L':
return ADDON_SCRIPT;
break;
case 'R':
case 'B':
return ADDON_MAP;
break;
case 'C':
return ADDON_CHARACTER;
break;
}
return ADDON_MISC;
}
void CL_CheckAddonTypes(void)
{
memset(&addontypes, 0, sizeof(addontypes));
for (INT32 i = 0; i < fileneedednum; i++)
{
addontypes[fileneeded[i].type]++;
}
}
// Load it now
boolean CL_LoadServerFiles(void)
{
@@ -596,7 +660,7 @@ boolean CL_LoadServerFiles(void)
else
{
const char *s;
switch(fileneeded[i].status)
switch (fileneeded[i].status)
{
case FS_NOTFOUND:
s = "FS_NOTFOUND";
@@ -639,7 +703,7 @@ static boolean SV_SendFile(INT32 node, const char *filename, UINT8 fileid)
char wadfilename[MAX_WADPATH];
if (cv_noticedownload.value)
if (cv_noticedownload.value && I_GetNodeAddress)
CONS_Printf("Sending file \"%s\" (id %d) to node %d (%s)\n", filename, fileid, node, I_GetNodeAddress(node));
// Find the last file in the list and set a pointer to its "next" field
@@ -664,7 +728,9 @@ static boolean SV_SendFile(INT32 node, const char *filename, UINT8 fileid)
// Look for the requested file through all loaded files
for (wadnum = 0; wadfiles[wadnum]; wadnum++)
{
strlcpy(wadfilename, wadfiles[wadnum]->filename, MAX_WADPATH);
// im a certified strlcpy hater
strncpy(wadfilename, wadfiles[wadnum]->filename, MAX_WADPATH);
wadfilename[MAX_WADPATH-1] = '\0';
nameonly(wadfilename);
if (fasticmp(wadfilename, p->id.filename))
@@ -960,7 +1026,7 @@ void Got_Filetxpak(void)
|| fastcmp(filename, "music.kart")
|| fastcmp(filename, "patch.kart")
))
I_Error("Tried to download \"%s\"", filename);
I_Error("Tried to download base-game file: \"%s\"", filename);
if (filenum >= fileneedednum)
{
@@ -1017,23 +1083,23 @@ void Got_Filetxpak(void)
{
const char *s;
switch(file->status)
switch (file->status)
{
case FS_NOTFOUND:
s = "FS_NOTFOUND";
break;
case FS_FOUND:
s = "FS_FOUND";
break;
case FS_OPEN:
s = "FS_OPEN";
break;
case FS_MD5SUMBAD:
s = "FS_MD5SUMBAD";
break;
default:
s = "unknown";
break;
case FS_NOTFOUND:
s = "FS_NOTFOUND";
break;
case FS_FOUND:
s = "FS_FOUND";
break;
case FS_OPEN:
s = "FS_OPEN";
break;
case FS_MD5SUMBAD:
s = "FS_MD5SUMBAD";
break;
default:
s = "unknown";
break;
}
I_Error("Received a file not requested (file id: %d, file status: %s)\n", filenum, s);
@@ -1145,7 +1211,7 @@ filestatus_t checkfilemd5(char *filename, const UINT8 *wantedmd5sum)
fhandle = fopen(filename, "rb");
if (fhandle)
{
md5_stream(fhandle,md5sum);
md5_stream(fhandle, md5sum);
fclose(fhandle);
if (!memcmp(wantedmd5sum, md5sum, 16))
return FS_FOUND;
@@ -1427,7 +1493,7 @@ void CURLPrepareFile(const char* url, int dfilenum)
filedownload.http_running = true;
#ifdef HAVE_THREADS
I_spawn_thread("http-download", (I_thread_fn)CURLGetFile, NULL);
(void)!I_SpawnThread("http-download", (I_ThreadFn)CURLGetFile, NULL);
#endif
}
else
@@ -1440,15 +1506,15 @@ void CURLAbortFile(void)
#ifdef HAVE_THREADS
// lock and unlock to wait for the download thread to exit
I_lock_mutex(&downloadmutex);
I_unlock_mutex(downloadmutex);
I_LockMutex(&downloadmutex);
I_UnlockMutex(downloadmutex);
#endif
}
static void CURLGetFile(void)
{
#ifdef HAVE_THREADS
I_lock_mutex(&downloadmutex);
I_LockMutex(&downloadmutex);
#endif
CURLMcode mc; /* return code used by curl_multi_wait() */
CURLcode easyres; /* Return from easy interface */
@@ -1549,12 +1615,11 @@ static void CURLGetFile(void)
filedownload.http_running = false;
#ifdef HAVE_THREADS
I_unlock_mutex(downloadmutex);
I_UnlockMutex(downloadmutex);
#endif
}
HTTP_login *
CURLGetLogin (const char *url, HTTP_login ***return_prev_next)
HTTP_login *CURLGetLogin(const char *url, HTTP_login ***return_prev_next)
{
HTTP_login * login;
HTTP_login ** prev_next;
@@ -1564,7 +1629,7 @@ CURLGetLogin (const char *url, HTTP_login ***return_prev_next)
( login = (*prev_next));
prev_next = &login->next
){
if (fastcmp(login->url, url) != 0)
if (fastcmp(login->url, url))
{
if (return_prev_next)
(*return_prev_next) = prev_next;
+12
View File
@@ -40,6 +40,15 @@ typedef enum
FS_FALLBACK, // HTTP failed
} filestatus_t;
typedef enum addontype_e
{
ADDON_SCRIPT,
ADDON_MAP,
ADDON_CHARACTER,
ADDON_MISC,
NUMADDONTYPES,
} addontype_t;
typedef struct
{
UINT8 willsend; // Is the server willing to send it?
@@ -51,11 +60,13 @@ typedef struct
UINT32 totalsize;
filestatus_t status; // The value returned by recsearch
boolean justdownloaded; // To prevent late fragments from causing an I_Error
addontype_t type;
} fileneeded_t;
extern INT32 fileneedednum;
extern fileneeded_t fileneeded[MAX_WADFILES];
extern char downloaddir[512];
extern INT32 addontypes[NUMADDONTYPES];
typedef struct
{
@@ -91,6 +102,7 @@ void D_ParseFileneeded(INT32 fileneedednum_parm, UINT8 *fileneededstr, UINT16 fi
void CL_PrepareDownloadSaveGame(const char *tmpsave);
INT32 CL_CheckFiles(void);
void CL_CheckAddonTypes(void);
boolean CL_LoadServerFiles(void);
void SV_SendRam(INT32 node, void *data, size_t size, freemethod_t freemethod,
UINT8 fileid);
+14 -3
View File
@@ -361,11 +361,17 @@ typedef struct squishdance_s
{
tic_t countdown; // hold "custom 3" for 2 seconds to engange le dance
tic_t time;
fixed_t work;
fixed_t ang;
fixed_t bounce; // hehe squishy
} squishdance_t;
typedef struct salty_s
{
bool ready;
bool tapping;
fixed_t zoffset;
fixed_t momz;
bool jump;
} salty_t;
// ========================================================================
// PLAYER STRUCTURE
// ========================================================================
@@ -561,11 +567,16 @@ typedef struct player_s
fixed_t spinoutrot; // When a player spins out, this value increments modulus 360.
// saltyhop! hardcode edition
salty_t salty;
squishdance_t squishdance;
fixed_t fovadd; // adjust FOV for hw rendering
SINT8 driftlevel; // just for controller rumble for now
UINT8 stairjank;
} player_t;
#endif
+2 -2
View File
@@ -211,12 +211,12 @@ void D_SetupProtocol(void)
if (result)
{
if (!fastcmp(buffer, "no"))
if (fastcmp(buffer, "no"))
{
fclose(fp);
return;
}
else if (fastcmp(buffer, exe_path))
else if (!fastcmp(buffer, exe_path))
{
// overwrite
fclose(fp);
+8 -3
View File
@@ -119,20 +119,25 @@ target_compile_definitions(SRB2SDL2 PRIVATE
-DHAVE_THREADS
)
if(SRB2_CONFIG_LTO AND NOT SRB2_CONFIG_DEBUGMODE)
if(SRB2_CONFIG_LTO AND NOT SRB2_CONFIG_DEBUGMODE AND NOT SRB2_CONFIG_ASAN AND NOT SRB2_CONFIG_UBSAN AND NOT SRB2_CONFIG_TSAN)
set_property(TARGET SRB2SDL2 PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
endif()
if(SRB2_CONFIG_ASAN)
target_compile_options(SRB2SDL2 PRIVATE -fsanitize=address)
target_compile_options(SRB2SDL2 PRIVATE -O1 -fsanitize=address -fno-omit-frame-pointer -fno-common)
target_link_options(SRB2SDL2 PRIVATE -fsanitize=address)
endif()
if(SRB2_CONFIG_UBSAN)
target_compile_options(SRB2SDL2 PRIVATE -fsanitize=undefined)
target_compile_options(SRB2SDL2 PRIVATE -O1 -fsanitize=undefined -fno-omit-frame-pointer)
target_link_options(SRB2SDL2 PRIVATE -fsanitize=undefined)
endif()
if(SRB2_CONFIG_TSAN)
target_compile_options(SRB2SDL2 PRIVATE -O1 -fsanitize=thread -fno-omit-frame-pointer)
target_link_options(SRB2SDL2 PRIVATE -fsanitize=thread)
endif()
## strip debug symbols into separate file when using gcc
# if(CMAKE_COMPILER_IS_GNUCC)
# if(${CMAKE_BUILD_TYPE} MATCHES Debug)
Loaded 100 of 276 files, more files were not shown because too many files have changed in this diff. Show more