diff options
author | Sergeanur <s.anureev@yandex.ua> | 2020-04-15 23:44:25 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2020-04-15 23:46:09 +0200 |
commit | d455cd8a62639145d7b5c03ada6fc84d2ad8ac36 (patch) | |
tree | e690f03a618e5c0e9b3cc51dc85083937fdab66f /src/save | |
parent | Update README.md (diff) | |
download | re3-d455cd8a62639145d7b5c03ada6fc84d2ad8ac36.tar re3-d455cd8a62639145d7b5c03ada6fc84d2ad8ac36.tar.gz re3-d455cd8a62639145d7b5c03ada6fc84d2ad8ac36.tar.bz2 re3-d455cd8a62639145d7b5c03ada6fc84d2ad8ac36.tar.lz re3-d455cd8a62639145d7b5c03ada6fc84d2ad8ac36.tar.xz re3-d455cd8a62639145d7b5c03ada6fc84d2ad8ac36.tar.zst re3-d455cd8a62639145d7b5c03ada6fc84d2ad8ac36.zip |
Diffstat (limited to '')
-rw-r--r-- | src/save/GenericGameStorage.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
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); |