Skip to content

Colormap code cleanup

Monster Iestyn requested to merge colormap-code-cleanup into master

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

Loading