Skip to content

Clean up the mess that is extracolormap_t::fog

MascaraSnake requested to merge colormap_flags_refactor into next

After all the back-and-forth about fullbright FOF planes, fog in extracolormap_t is now an inconsistent and broken mess. Some parts of the code still pretend it's a boolean value, while others use it as an array of flags, but they don't agree about which flag has which value. This is an attempt to clean it up without breaking existing maps. The variable is now called flags and recognizes the following two flags:

  • CMF_FADEFULLBRIGHTSPRITES (1): Fullbright sprites affected by the colormap are faded like normal sprites (by default they're not).
  • Flag 2 is unused to ensure backwards compatibility with DSZ's colormaps.
  • CMF_FOG (4): Translucent FOFs are rendered with fog-like lighting.

I removed the ability to toggle fullbright plane lighting for translucent FOFs with alpha == 256 (i.e., the "opaque FOF with holes" hack). It's inconsistent with how the flag behaves for "real" translucent FOFs, has no real use case, isn't supported by OpenGL, and there's no option to do the same for "real" opaque FOFs, so I didn't see the point in keeping the option. Plus, if you really need your FOF planes to be fullbright, you can just use the plane lighting linedef types.

Merge request reports

Loading