summaryrefslogtreecommitdiffstats
path: root/src/render
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2019-10-21 23:39:59 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2019-10-21 23:39:59 +0200
commitd579ee1b64677a425f64a06629bb1a4dcee382ff (patch)
tree501b60f177b68fda115f568a1e8ee0c367cba484 /src/render
parentMoved CCutsceneMgr::ms_cutsceneProcessing to private (diff)
downloadre3-d579ee1b64677a425f64a06629bb1a4dcee382ff.tar
re3-d579ee1b64677a425f64a06629bb1a4dcee382ff.tar.gz
re3-d579ee1b64677a425f64a06629bb1a4dcee382ff.tar.bz2
re3-d579ee1b64677a425f64a06629bb1a4dcee382ff.tar.lz
re3-d579ee1b64677a425f64a06629bb1a4dcee382ff.tar.xz
re3-d579ee1b64677a425f64a06629bb1a4dcee382ff.tar.zst
re3-d579ee1b64677a425f64a06629bb1a4dcee382ff.zip
Diffstat (limited to 'src/render')
-rw-r--r--src/render/Weather.cpp25
-rw-r--r--src/render/Weather.h6
2 files changed, 31 insertions, 0 deletions
diff --git a/src/render/Weather.cpp b/src/render/Weather.cpp
index 452eca92..f6c30e50 100644
--- a/src/render/Weather.cpp
+++ b/src/render/Weather.cpp
@@ -27,6 +27,11 @@ float &CWeather::Rainbow = *(float*)0x940598;
bool &CWeather::bScriptsForceRain = *(bool*)0x95CD7D;
bool &CWeather::Stored_StateStored = *(bool*)0x95CDC1;
+float &CWeather::Stored_InterpolationValue = *(float*)0x942F54;
+int16 &CWeather::Stored_OldWeatherType = *(int16*)0x95CC68;
+int16 &CWeather::Stored_NewWeatherType = *(int16*)0x95CCAE;
+float &CWeather::Stored_Rain = *(float*)0x885B4C;
+
WRAPPER void CWeather::RenderRainStreaks(void) { EAXJMP(0x524550); }
void CWeather::ReleaseWeather()
@@ -45,3 +50,23 @@ void CWeather::ForceWeatherNow(int16 weather)
NewWeatherType = weather;
ForcedWeatherType = weather;
}
+
+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;
+} \ No newline at end of file
diff --git a/src/render/Weather.h b/src/render/Weather.h
index bbf8498e..0b413462 100644
--- a/src/render/Weather.h
+++ b/src/render/Weather.h
@@ -32,10 +32,16 @@ public:
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 ReleaseWeather();
static void ForceWeather(int16);
static void ForceWeatherNow(int16);
+ static void StoreWeatherState();
+ static void RestoreWeatherState();
};