-Colormaps, palettes and other stuff are properly loaded now. It was a bug related to the generation of the lump name with files in the root of the PK3.
Known issues:
-Map WADs' REJECT and BLOCKMAP are still not loaded.
-Folders aren't loaded as lumps anymore
-Can now load an arbitrary number of TEXTURES lumps in PK3s. Name them textures.gfz, textures.thz, ..., for example.
-Now can load map WAD files inside Maps/ directory, but they must only contain map data explicitly!
Known problems:
-There's an issue causing a crash with palettes and colormaps in PK3s.
-SS_START and SS_END don't work now. Will check later.
-Standalone lumps for maps in the Maps/ folder don't work anymore; perhaps I should keep that functionality?
Notes:
-It's now a mashup of something dumb that I wanted to do and yet piling hacks again.
-A lot of code duplicity with map lump loading functions.
This is just in case someone actually tries to dump in C_START/C_END and "add" colormaps using them, not that they would ever be used currently anyway.
-DEFLATE-compressed lumps work properly now.
-All "big" lumps are supported now with the exception of WAD maps.
Notes:
-Compiler spits out a shitload of warnings still.
-Individual lump reading clashes with folders of the same name (see TEXTURES lump, and the Textures/ folder).
Signed-off-by: Nevur <apophycens@gmail.com>
-Expanded folder recognition for PK3s. Some resources are still not loaded from them yet.
-Took a glimpse at how maps are loaded, since the flat recognition is rooted somewhere there; did nothing yet about it though.
-Working towards "generalizing" how new resources are handled. Some var and functionality redundancy is still present.
-Moved the MD5 check for added files up so it avoids unnecessary work when you mess up and re-add a file.
-Using compression enum for compressed lumps now.
-Vastly improved central directory seeking algorithm, big files are read fine now. Thanks a lot JTE!
-Improved remaining central directory navigation algorithm, we know and expect what data is coming from now on, after all.
-TX_ textures and sounds are replaced, but textures crash the game on mapload, and sounds are simply mute when replaced. Might have to do something with caching, I don't know yet.
Used instead of pLocalPalette when attempting to determine objective truths, such as "the colours of this gif without color profile modification" and "what indicies should this colormap remap to".
Also, made f_wipe.c's paldiv only get calculated once.
Add a vertical flip variant for the translucent column drawer.
Translucency is now properly distributed: 0.00 leads to no render at all, 0.1 to TRANS10, ..., 0.9 to TRANS90, 1 to regular column drawer.
Some texture-related fixes
Bugs fixed in this branch:
* upper/lower/middle textures with non-existent texture ids being capable of crashing the game. For instance, RVZ1 has colormap codes on non-colormap linedefs, which causes them to wind up with invalid texture ids because of how the game tries to interpret lower/upper textures with "#" followed by characters on normal linedefs. Fortunately these "textures" are normally not visible anyway (since they're all in control sectors) unless they are swapped with in-level textures by some crazy Lua script of some sort...
* animated single-patch textures with holes displaying garbage on first viewing (see this thread: https://mb.srb2.org/showthread.php?t=42195)
* the heights of the lighting (shadows or colormapping) from water/translucent/shadowcasting/etc FOFs become messed up when displayed on repeated midtextures.
See merge request !144
*Added FLIPX/FLIPY support for multi-patch textures and single-patch textures without holes
*Added FLIPY support for single-patch textures with holes; I'll sort FLIPX support out later