diff options
author | eray orçunus <erayorcunus@gmail.com> | 2019-10-30 01:20:58 +0100 |
---|---|---|
committer | eray orçunus <erayorcunus@gmail.com> | 2019-10-30 01:20:58 +0100 |
commit | 30c780c300e419b59bc7aad76cf6eda724676aa1 (patch) | |
tree | a729f1f20d75ef2ea765d33e7a1464a15ea24564 /src/render | |
parent | The Peds (diff) | |
parent | Merge pull request #255 from Nick007J/master (diff) | |
download | re3-30c780c300e419b59bc7aad76cf6eda724676aa1.tar re3-30c780c300e419b59bc7aad76cf6eda724676aa1.tar.gz re3-30c780c300e419b59bc7aad76cf6eda724676aa1.tar.bz2 re3-30c780c300e419b59bc7aad76cf6eda724676aa1.tar.lz re3-30c780c300e419b59bc7aad76cf6eda724676aa1.tar.xz re3-30c780c300e419b59bc7aad76cf6eda724676aa1.tar.zst re3-30c780c300e419b59bc7aad76cf6eda724676aa1.zip |
Diffstat (limited to 'src/render')
-rw-r--r-- | src/render/Weather.cpp | 25 | ||||
-rw-r--r-- | src/render/Weather.h | 6 |
2 files changed, 31 insertions, 0 deletions
diff --git a/src/render/Weather.cpp b/src/render/Weather.cpp index db1bc80b..479f3404 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); } WRAPPER void CWeather::Update(void) { EAXJMP(0x522C10); } @@ -46,3 +51,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 41cc5c0e..b5704b01 100644 --- a/src/render/Weather.h +++ b/src/render/Weather.h @@ -32,6 +32,10 @@ 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 Update(void); @@ -39,4 +43,6 @@ public: static void ReleaseWeather(); static void ForceWeather(int16); static void ForceWeatherNow(int16); + static void StoreWeatherState(); + static void RestoreWeatherState(); }; |