From d579ee1b64677a425f64a06629bb1a4dcee382ff Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Tue, 22 Oct 2019 00:39:59 +0300 Subject: script 500-599 plus bugfix --- src/render/Weather.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'src/render/Weather.cpp') 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 -- cgit v1.2.3