From 597e6b5f5f113af657da2cd21605f77baf798333 Mon Sep 17 00:00:00 2001 From: obligaron Date: Wed, 26 Jun 2024 18:17:01 +0200 Subject: [PATCH] Add comment for fully light and fully dark optimiation assert --- Source/lighting.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/lighting.cpp b/Source/lighting.cpp index 0b06c81e7..70076359e 100644 --- a/Source/lighting.cpp +++ b/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; })));