From d455cd8a62639145d7b5c03ada6fc84d2ad8ac36 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Thu, 16 Apr 2020 00:44:25 +0300 Subject: Default native resolution mode and small camera fixes --- src/save/GenericGameStorage.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/save/GenericGameStorage.cpp') diff --git a/src/save/GenericGameStorage.cpp b/src/save/GenericGameStorage.cpp index 0ec0b117..1e4acd3d 100644 --- a/src/save/GenericGameStorage.cpp +++ b/src/save/GenericGameStorage.cpp @@ -154,8 +154,17 @@ GenericSave(int file) WriteDataToBufferPointer(buf, CompileDateAndTime.m_nMonth); WriteDataToBufferPointer(buf, CompileDateAndTime.m_nYear); WriteDataToBufferPointer(buf, CWeather::WeatherTypeInList); +#ifdef FIX_BUGS + // converted to float for compatibility with original format + // TODO: maybe remove this? not really gonna break anything vital + float f = TheCamera.CarZoomIndicator; + WriteDataToBufferPointer(buf, f); + f = TheCamera.PedZoomIndicator; + WriteDataToBufferPointer(buf, f); +#else WriteDataToBufferPointer(buf, TheCamera.CarZoomIndicator); WriteDataToBufferPointer(buf, TheCamera.PedZoomIndicator); +#endif assert(buf - work_buff == SIZE_OF_SIMPLEVARS); // Save scripts, block is nested within the same block as simple vars for some reason @@ -264,8 +273,18 @@ GenericLoad() ReadDataFromBufferPointer(buf, CompileDateAndTime.m_nMonth); ReadDataFromBufferPointer(buf, CompileDateAndTime.m_nYear); ReadDataFromBufferPointer(buf, CWeather::WeatherTypeInList); +#ifdef FIX_BUGS + // converted to float for compatibility with original format + // TODO: maybe remove this? not really gonna break anything vital + float f; + ReadDataFromBufferPointer(buf, f); + TheCamera.CarZoomIndicator = f; + ReadDataFromBufferPointer(buf, f); + TheCamera.PedZoomIndicator = f; +#else ReadDataFromBufferPointer(buf, TheCamera.CarZoomIndicator); ReadDataFromBufferPointer(buf, TheCamera.PedZoomIndicator); +#endif assert(buf - work_buff == SIZE_OF_SIMPLEVARS); ReadDataFromBlock("Loading Scripts \n", CTheScripts::LoadAllScripts); -- cgit v1.2.3