Commit graph

80 commits

Author SHA1 Message Date
NepDisk
d1e28ff217 Don't do I_Error meme texture replacement Luas
This is an issue that mostly affects hardcode, Lua authors don't have to worry about this.
2026-02-26 13:17:31 -05:00
Alug
adce4197e0 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-10 09:22:02 -05:00
Alug
5d1f03b77f delet all the Z_Free checks
Z_Free already checks its input internally!
2026-02-08 09:51:17 -05:00
GenericHeroGuy
a098e22907 Fix skywall appearing for some invisible FOFs
Fixes bellbridge and secret slide

Context:
first flat in srb2.srb is F_SKY1
first texture is - aka PIT~
Vanilla kart doesn't have the 2.2 texture refactor aka wallflats, so flats aren't loaded into the textures array but
then wallflats came along and lacto just decided to load flats before textures
2026-02-04 12:10:07 -05:00
NepDisk
78c527675f Init some stuff in software renderer 2026-02-04 10:52:24 -05:00
NepDisk
ed26b6272b Don't generate textures in R_GetColumn
Based on a commit by lactozilla
2026-02-04 10:52:23 -05:00
NepDisk
6d6cb09280 Convert most strcmp/stricmp to fastcmp/fasticmp 2025-12-11 13:00:32 -05:00
NepDisk
d7ed03fab9 Remove M_Memcpy
Was quite literally a wrapper that did nothing.
2025-11-08 02:00:30 -05:00
NepDisk
64353a043e Always initialize all column offsets inside multi-patch textures
3964d4e188
2025-10-13 11:15:09 -04:00
Lactozilla
3b489df3db Fix SRB2 1393 (Nep: also flats and brightmap support Thx lug) (Closes #115) 2025-09-20 13:43:35 -04:00
NepDisk
2f84779d41 Update rest of the existing files to use blankart branding 2025-07-01 00:23:30 -04:00
NepDisk
f004b36dbb Revert 'Merge pull request 'File loading refactor' (#68) from wadstrbuf into blankart-dev'
This reverts commit f72475b557, reversing
changes made to 0c89c85aae.

Sorry Generic this branch is really cool but it needs more work. I shouldn't have merged it too early...
2025-06-30 01:45:01 -04:00
GenericHeroGuy
be35926843 Add W_CheckNumForMarkers, clean up lump validation
Fixes many cases of invalid startlumps, so validation is now actually done
only when PARANOIA is defined
The W_CheckNumFor* functions allow startlump == numlumps, to make iteration
less frustrating
2025-06-27 17:44:34 +02:00
GenericHeroGuy
146ac557ba Remove W_GetNumForName
Still no longnames for sounds/music, but that's a story for another day
2025-06-26 00:18:20 +02:00
GenericHeroGuy
7aae6775e6 Use LUMPERROR instead of INT16_MAX, and MAX_WADFILES instead of UINT16_MAX
The 32768th lump of a file works now lol
2025-06-25 17:47:57 +02:00
GenericHeroGuy
684ded7647 Formally deprecate the shortname functions
and make TestValidLump actually work
2025-06-25 14:57:37 +02:00
GenericHeroGuy
4ffd4621e4 Let's clean this shit up properly
lumpinfo_t is now private. Wanna iterate thru lumps? Use the W_* functions
2025-06-25 00:43:46 +02:00
GenericHeroGuy
927f30e51f Aww yeah, string buffers baby! 2025-06-24 01:05:56 +02:00
NepDisk
8cfa0fa74f Remove leftover flat animdef code 2025-05-25 14:00:41 -04:00
GenericHeroGuy
f96c9e9095 Forgot why this is necessary 2025-05-25 19:51:06 +02:00
GenericHeroGuy
2642e8d972 Get flat palremap working again 2025-05-25 18:18:48 +02:00
GenericHeroGuy
fc03c880fb Fix flat corruption (from lacto's feffdb37) 2025-05-25 18:18:48 +02:00
Lactozilla
fbea771486 Cleanup R_GetFlatForTexture 2025-05-25 18:18:48 +02:00
NepDisk
41a62d7823 Do palette hack for flats as well 2025-05-25 11:30:07 -04:00
NepDisk
b429a3e74c Repair removeflats commit to make it function correctly with colormapping 2025-05-25 10:57:49 -04:00
NepDisk
c83d5cebd4 AAAAAA
I'll be honest what am I doing???
2025-05-25 02:01:33 -04:00
NepDisk
c7cbc27efb completly borked remove flats port
Completey fucked color and brightmap handling for floors.
2025-05-24 23:41:33 -04:00
GenericHeroGuy
b77a66d8bb Fix Spelunky 2025-03-17 00:42:53 +01:00
GenericHeroGuy
160897f5ca mapcompat + udmf_namespace = mapnamespace 2025-02-20 19:49:13 +01:00
GenericHeroGuy
37969a3415 Add mapcompat global (AKA fix remapping on palette texture skyboxes)
Rather than setting udmf earlier in P_SetupLevel and continuing to awkwardly
check udmf everywhere, I'm adding a new global solely for compat purposes.

For now, have it mirror udmf to avoid supporting two binary formats.
(still keeping the 2.2 conversion code tho?)
2025-02-19 22:45:34 +01:00
GenericHeroGuy
bfe1a253da Palette texture hack for palremap 2025-02-18 21:56:24 +01:00
GenericHeroGuy
d3d67d1d0e W_NeedPaletteRemap refactor because I'm stupid 2025-02-18 21:56:24 +01:00
GenericHeroGuy
7a6de57a99 Palremap extras 2 (#16)
Kartchar support, initialize compatmode
2025-01-25 22:49:38 +01:00
GenericHeroGuy
43d38194fe Palremap extras (#16)
Fix demos, fix compiler warnings, at least TRY to validate patches instead
of allowing palette remaps in the entire address space
2025-01-25 18:05:08 +01:00
GenericHeroGuy
48bb0ea5ef The actual palette remapping 2025-01-24 18:18:37 +01:00
James R
97b9e7d4fc Use PU_LEVEL for texture caching
- Some maps may contain very large or very many (animated)
  textures
- Texture sets are not typically shared between maps, so
  each texture allocation may go unused for a long time
  after the map ends
- Keeping these PU_STATIC leads to significant memory
  usage over the program duration
2024-12-29 16:16:37 -05:00
NepDisk
4fd99ef3ff Multithreaded Software rendering 2024-12-29 14:14:28 -05:00
James R
312c4234b0 Add specialized drawing loop for debugfinishline
- Cache DBGLINE texture
- Draw this texture at horizon (player's eye level)
- Draw this texture at max brightness
- Do not slope skew this texture
- Use R_DrawColumn_Flat_8 to colorize the this texture
2024-12-28 07:58:41 -05:00
James R.
4e48fbd140 R_GenerateTextureBrightmap: install bounds checking on patch columnofs
- Warn if reading past end of patch data (corrupt lump or
  incorrect format).
2024-12-25 23:32:42 -05:00
NepDisk
4395d26168 TERRAIN: add 'remap' boolean, toggles ENCOREMAP/TWEAKMAP
Nep Note: I dont know where dc_copy or dc->lightmap are from once I find out Ill uncomment that code....
2024-09-05 22:12:44 -04:00
James R.
19a9639add Add R_GetBrightmapColumn, convert brightmaps to associated texture's column layout
- Ensures that column drawer doesn't read out of bounds
  the brightmap column.
- Refactored code in r_segs.cpp, so it checks
  R_TextureHasBrightmap.
- Added comments for plane brightmaps and sprite
  brightmaps, that these are still error-prone.
2024-09-05 21:26:18 -04:00
James R.
b0f67f150e Add R_AllocateDummyTextureBlock, set texture->holes so empty column is always rendered correctly 2024-09-05 16:50:38 -04:00
James R
3bbc4eee1e Cache TERRAIN on texture_t
- K_GetTerrainForTextureNum no longer performs a string
  lookup
2024-08-21 22:59:01 -04:00
NepDisk
594a26ea5e Reapply Store terrain ID instead of terrain pointer, add new helpers and accomodate for this
This reverts commit cb3b95c0e1.
2024-08-21 22:53:16 -04:00
NepDisk
cb3b95c0e1 Revert "Store terrain ID instead of terrain pointer, add new helpers and accomodate for this"
This reverts commit 9baae4cecb.
2024-08-21 22:49:45 -04:00
JugadorXEI
9baae4cecb Store terrain ID instead of terrain pointer, add new helpers and accomodate for this 2024-08-01 17:29:36 -04:00
Sal
cb600cdd28 Merge branch 'more-flats' into 'master'
Allow smaller flat sizes

See merge request KartKrew/Kart!698
2024-07-31 01:38:58 -04:00
NepDisk
ac91ea6827 Readd flats support (i think?) 2024-07-29 15:58:13 -04:00
NepDisk
60d0102d7e Revert "Stuff for Ivo's texture crunching"
This reverts commit 559222f991.
2024-07-29 15:41:51 -04:00
NepDisk
814eaa4fcc Reapply "Stuff for Ivo's texture crunching"
This reverts commit a9d8ffe8ff.
2024-07-29 15:40:58 -04:00