summaryrefslogtreecommitdiff
path: root/src/save
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-04-16 00:44:25 +0300
committerSergeanur <s.anureev@yandex.ua>2020-04-16 00:46:09 +0300
commitd455cd8a62639145d7b5c03ada6fc84d2ad8ac36 (patch)
treee690f03a618e5c0e9b3cc51dc85083937fdab66f /src/save
parent378f1d180d8736cdc55eedcb36b9a2d59796f1e0 (diff)
Default native resolution mode and small camera fixes
Diffstat (limited to 'src/save')
-rw-r--r--src/save/GenericGameStorage.cpp19
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);