Browse Source

Add comment for fully light and fully dark optimiation assert

pull/7169/head
obligaron 2 years ago committed by Anders Jenbo
parent
commit
597e6b5f5f
  1. 1
      Source/lighting.cpp

1
Source/lighting.cpp

@ -375,6 +375,7 @@ void MakeLightTable()
FullyDarkLightTable = nullptr; // Tiles in Hellfire levels are never completely black
}
// Verify that fully lit and fully dark light table optimizations are correctly enabled/disabled (nullptr = disabled)
assert((FullyLitLightTable != nullptr) == (LightTables[0][0] == 0 && std::adjacent_find(LightTables[0].begin(), LightTables[0].end() - 1, [](auto x, auto y) { return (x + 1) != y; }) == LightTables[0].end() - 1));
assert((FullyDarkLightTable != nullptr) == (std::all_of(LightTables[LightsMax].begin(), LightTables[LightsMax].end(), [](auto x) { return x == 0; })));

Loading…
Cancel
Save