From b7b01ce1fda14b3e51ad151f6d0d1aa5351bf3db Mon Sep 17 00:00:00 2001 From: qndel Date: Thu, 10 Feb 2022 20:54:32 +0100 Subject: [PATCH] remove InitLightMax --- Source/diablo.cpp | 1 - Source/lighting.cpp | 6 ------ Source/lighting.h | 3 +-- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/Source/diablo.cpp b/Source/diablo.cpp index 62439b01a..d4dfefcd9 100644 --- a/Source/diablo.cpp +++ b/Source/diablo.cpp @@ -2189,7 +2189,6 @@ void LoadGameLevel(bool firstflag, lvl_entry lvldir) SetDungeonMicros(); - InitLightMax(); IncProgress(); IncProgress(); diff --git a/Source/lighting.cpp b/Source/lighting.cpp index 9eec0f74d..664e130d4 100644 --- a/Source/lighting.cpp +++ b/Source/lighting.cpp @@ -20,7 +20,6 @@ int VisionId; Light Lights[MAXLIGHTS]; uint8_t ActiveLights[MAXLIGHTS]; int ActiveLightCount; -char LightsMax; std::array LightTables; bool DisableLighting; bool UpdateLighting; @@ -938,11 +937,6 @@ void ToggleLighting() } #endif -void InitLightMax() -{ - LightsMax = 15; -} - void InitLighting() { ActiveLightCount = 0; diff --git a/Source/lighting.h b/Source/lighting.h index 71afb467f..0697e8e72 100644 --- a/Source/lighting.h +++ b/Source/lighting.h @@ -44,7 +44,7 @@ extern int VisionId; extern Light Lights[MAXLIGHTS]; extern uint8_t ActiveLights[MAXLIGHTS]; extern int ActiveLightCount; -extern char LightsMax; +constexpr char LightsMax = 15; extern std::array LightTables; extern DVL_API_FOR_TEST bool DisableLighting; extern bool UpdateLighting; @@ -56,7 +56,6 @@ void MakeLightTable(); #ifdef _DEBUG void ToggleLighting(); #endif -void InitLightMax(); void InitLighting(); int AddLight(Point position, int r); void AddUnLight(int i);