The most frequent call using this is the regular texture creation function where this results in a pointless allocation and destruction of a temporary string which is easily avoided.
* use names, not strings, to allow use of switch/case.
* avoid creating the checksum a second time per level.
* do an early-out check for maps that do not have scripted compatibility.
They were already deactivated because with 5 render modes present this was destructive, having only 2 options available.
Since the render mode can now be changed on the fly this isn't as critical anymore as it once was.
With the software renderer not being used for 2D anymore it would be quite annoying if every texture class had to implement these.
If done properly, the SW renderer should actually be forced to dynamic_cast any texture to a FWorldTexture before using this stuff, but that'd be some pointless overhead better saved.
src/gl/renderer/gl_renderer.cpp:775:39: warning: comparison of two values with different enumeration types ('F2DDrawer::ETextureDrawMode' and 'TexMode') [-Wenum-compare]
src/gl/renderer/gl_renderer.cpp:776:39: warning: comparison of two values with different enumeration types ('F2DDrawer::ETextureDrawMode' and 'TexMode') [-Wenum-compare]
src/gl/renderer/gl_renderer.cpp:777:39: warning: comparison of two values with different enumeration types ('F2DDrawer::ETextureDrawMode' and 'TexMode') [-Wenum-compare]
src/gl/renderer/gl_renderer.cpp:778:45: warning: comparison of two values with different enumeration types ('F2DDrawer::ETextureDrawMode' and 'TexMode') [-Wenum-compare]
src/gl/renderer/gl_renderer.cpp:779:40: warning: comparison of two values with different enumeration types ('F2DDrawer::ETextureDrawMode' and 'TexMode') [-Wenum-compare]
src/gl/renderer/gl_renderer.cpp:780:45: warning: comparison of two values with different enumeration types ('F2DDrawer::ETextureDrawMode' and 'TexMode') [-Wenum-compare]
src/v_draw.cpp:1144:51: warning: '&' within '|' [-Wbitwise-op-parentheses]
src/textures/texture.cpp:1050:20: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
src\intermission\intermission.cpp(80): warning C4101: 'lumpnum': unreferenced local variable
GCC 7:
src/gl/renderer/gl_renderer.cpp:702:2: error: non-constant condition for static assertion
src/gl/renderer/gl_renderer.cpp:702:2: error: value ‘12’ of type ‘float*’ is not a constant expression
src/gl/renderer/gl_renderer.cpp:703:2: error: non-constant condition for static assertion
src/gl/renderer/gl_renderer.cpp:703:2: error: value ‘20’ of type ‘PalEntry*’ is not a constant expression
Clang:
src/gl/renderer/gl_renderer.cpp:701:16: error: static_assert expression is not an integral constant expression
src/gl/renderer/gl_renderer.cpp:701:23: note: cannot access field of null pointer