diff --git a/src/lighting.cpp b/src/lighting.cpp index 61f29c824ec..0eb6d5f9e28 100644 --- a/src/lighting.cpp +++ b/src/lighting.cpp @@ -324,12 +324,6 @@ void setDefaultFogColour() } } -void reInitPaletteAndFog() -{ - pal_Init(); - setDefaultFogColour(); -} - #define MIN_DROID_LIGHT_LEVEL 96 #define DROID_SEEK_LIGHT_SPEED 2 diff --git a/src/lighting.h b/src/lighting.h index ad33d95bf28..2a1fd67dcfe 100644 --- a/src/lighting.h +++ b/src/lighting.h @@ -38,7 +38,6 @@ void initLighting(UDWORD x1, UDWORD y1, UDWORD x2, UDWORD y2); void doBuildingLights(); void updateFogDistance(float distance); void setDefaultFogColour(); -void reInitPaletteAndFog(); void calcDroidIllumination(DROID *psDroid); #endif // __INCLUDED_SRC_LIGHTNING_H__ diff --git a/src/multiint.cpp b/src/multiint.cpp index 839bdb67392..ca1e837c373 100644 --- a/src/multiint.cpp +++ b/src/multiint.cpp @@ -93,7 +93,6 @@ #include "notifications.h" #include "radar.h" #include "lib/framework/wztime.h" -#include "lighting.h" // for reInitPaletteAndFog() #include "multiplay.h" #include "multiint.h" @@ -8380,7 +8379,7 @@ bool WZGameReplayOptionsHandler::restoreOptions(const nlohmann::json& object, Em levShutDown(); levInitialise(); rebuildSearchPath(mod_multiplay, true); // MUST rebuild search path for the new maps we just got! - reInitPaletteAndFog(); //Update palettes. + pal_Init(); //Update palettes. if (!buildMapList()) { debug(LOG_ERROR, "Failed to build map list"); diff --git a/src/multiopt.cpp b/src/multiopt.cpp index 6c9a341711f..b1532f28aa2 100644 --- a/src/multiopt.cpp +++ b/src/multiopt.cpp @@ -30,6 +30,7 @@ #include "lib/framework/wzapp.h" #include "lib/framework/physfs_ext.h" +#include "lib/ivis_opengl/piepalette.h" // for pal_Init() #include "lib/ivis_opengl/piestate.h" #include "map.h" @@ -45,7 +46,6 @@ #include "configuration.h" // lobby cfg. #include "clparse.h" -#include "lighting.h" // for reInitPaletteAndFog() #include "component.h" #include "console.h" #include "multiplay.h" @@ -273,7 +273,7 @@ bool recvOptions(NETQUEUE queue) } else { - reInitPaletteAndFog(); // Palette could be modded. // Why is this here - isn't there a better place for it? + pal_Init(); // Palette could be modded. // Why is this here - isn't there a better place for it? return FileRequestResult::FileExists; // Have the file already. } diff --git a/src/multiplay.cpp b/src/multiplay.cpp index b56aed1f321..f9e079911a7 100644 --- a/src/multiplay.cpp +++ b/src/multiplay.cpp @@ -32,6 +32,7 @@ #include "lib/framework/input.h" #include "lib/framework/strres.h" #include "lib/framework/physfs_ext.h" +#include "lib/ivis_opengl/piepalette.h" // for pal_Init() #include "map.h" #include "game.h" // for loading maps @@ -2043,7 +2044,7 @@ bool recvMapFileData(NETQUEUE queue) levShutDown(); levInitialise(); rebuildSearchPath(mod_multiplay, true); // MUST rebuild search path for the new maps we just got! - reInitPaletteAndFog(); //Update palettes. + pal_Init(); //Update palettes. if (!buildMapList()) { return false;