Colormap code cleanup
If anyone ever looked into the code that is used to create colormaps from linedef type 606, they'll know that there are in fact two functions that do mostly the same thing: R_CreateColormap
, which is called first for each sidedef with the colormap special, and then R_CreateColormap2
which is called afterwards via R_MakeColormaps
and redoes everything the first function did (with the addition of some extra stuff needed for software mode).
It turns out R_CreateColormap2
(and therefore R_MakeColormaps
as well) is entirely unnecessary! I have therefore removed said function(s), and adding anything exclusive to it to R_CreateColormap
.
This should hopefully make the colormap generation code a lot saner for SRB2 coders to understand now. Hopefully there should be no visible difference in either software or OpenGL, I've not found any myself from the tests I made.
Merge request reports
Activity
+1, straightforward, makes sense how it's set up and accessed. I didn't see how the delayed R_CreateColormap2 makes a difference, so this is well.
One suggestion, and this is non-blocking, is to move the extra_colormap->rgba parsing from P_LoadRawSideDefs2 to R_CreateColormap. Doesn't matter to me either way, though. I'm just doing that myself for a more extensive colormap overhaul. Probably doesn't matter for the goal of removing R_CreateColormap2.
mentioned in commit 1199a5f9