summaryrefslogtreecommitdiffstats
path: root/src/render
diff options
context:
space:
mode:
Diffstat (limited to 'src/render')
-rw-r--r--src/render/Weather.cpp25
-rw-r--r--src/render/Weather.h8
2 files changed, 33 insertions, 0 deletions
diff --git a/src/render/Weather.cpp b/src/render/Weather.cpp
index 17c45fcd..dba9ed14 100644
--- a/src/render/Weather.cpp
+++ b/src/render/Weather.cpp
@@ -51,6 +51,11 @@ float CWeather::WindClipped;
float CWeather::TrafficLightBrightness;
bool CWeather::bScriptsForceRain;
+bool CWeather::Stored_StateStored;
+float CWeather::Stored_InterpolationValue;
+int16 CWeather::Stored_OldWeatherType;
+int16 CWeather::Stored_NewWeatherType;
+float CWeather::Stored_Rain;
tRainStreak Streaks[NUM_RAIN_STREAKS];
@@ -647,3 +652,23 @@ void CWeather::RenderRainStreaks(void)
TempBufferVerticesStored = 0;
TempBufferIndicesStored = 0;
}
+
+void CWeather::StoreWeatherState()
+{
+ Stored_StateStored = true;
+ Stored_InterpolationValue = InterpolationValue;
+ Stored_Rain = Rain;
+ Stored_NewWeatherType = NewWeatherType;
+ Stored_OldWeatherType = OldWeatherType;
+}
+
+void CWeather::RestoreWeatherState()
+{
+#ifdef FIX_BUGS // it's not used anyway though
+ Stored_StateStored = false;
+#endif
+ InterpolationValue = Stored_InterpolationValue;
+ Rain = Stored_Rain;
+ NewWeatherType = Stored_NewWeatherType;
+ OldWeatherType = Stored_OldWeatherType;
+}
diff --git a/src/render/Weather.h b/src/render/Weather.h
index ef62ebb6..da88168d 100644
--- a/src/render/Weather.h
+++ b/src/render/Weather.h
@@ -42,6 +42,11 @@ public:
static float TrafficLightBrightness;
static bool bScriptsForceRain;
+ static bool Stored_StateStored;
+ static float Stored_InterpolationValue;
+ static int16 Stored_OldWeatherType;
+ static int16 Stored_NewWeatherType;
+ static float Stored_Rain;
static void RenderRainStreaks(void);
static void Update(void);
@@ -55,6 +60,9 @@ public:
static void AddRain();
static void AddHeatHaze();
static void AddBeastie();
+
+ static void StoreWeatherState();
+ static void RestoreWeatherState();
};
enum {