summaryrefslogtreecommitdiffstats
path: root/src/save/GenericGameStorage.cpp
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-08-13 22:39:55 +0200
committereray orçunus <erayorcunus@gmail.com>2020-08-14 00:14:04 +0200
commitb54bb62c944f8f3e8d85501fbb762915fdc6569b (patch)
tree94ed5d0f70006246329d852127feea87f610ccba /src/save/GenericGameStorage.cpp
parentfixes to HUD and sprite2d (diff)
downloadre3-b54bb62c944f8f3e8d85501fbb762915fdc6569b.tar
re3-b54bb62c944f8f3e8d85501fbb762915fdc6569b.tar.gz
re3-b54bb62c944f8f3e8d85501fbb762915fdc6569b.tar.bz2
re3-b54bb62c944f8f3e8d85501fbb762915fdc6569b.tar.lz
re3-b54bb62c944f8f3e8d85501fbb762915fdc6569b.tar.xz
re3-b54bb62c944f8f3e8d85501fbb762915fdc6569b.tar.zst
re3-b54bb62c944f8f3e8d85501fbb762915fdc6569b.zip
Diffstat (limited to '')
-rw-r--r--src/save/GenericGameStorage.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/save/GenericGameStorage.cpp b/src/save/GenericGameStorage.cpp
index 52c1aef7..61a32a8d 100644
--- a/src/save/GenericGameStorage.cpp
+++ b/src/save/GenericGameStorage.cpp
@@ -37,9 +37,10 @@
#include "Weather.h"
#include "World.h"
#include "Zones.h"
+#include "Timecycle.h"
#define BLOCK_COUNT 20
-#define SIZE_OF_SIMPLEVARS 0xBC
+#define SIZE_OF_SIMPLEVARS 0xD4
const uint32 SIZE_OF_ONE_GAME_IN_BYTES = 201729;
@@ -187,6 +188,14 @@ GenericSave(int file)
WriteDataToBufferPointer(buf, TheCamera.CarZoomIndicator);
WriteDataToBufferPointer(buf, TheCamera.PedZoomIndicator);
#endif
+ WriteDataToBufferPointer(buf, CGame::currArea);
+ WriteDataToBufferPointer(buf, CVehicle::bAllTaxisHaveNitro);
+ // TODO(Miami): Pad invert Y
+ bool invertY = 0;
+ WriteDataToBufferPointer(buf, invertY);
+ WriteDataToBufferPointer(buf, CTimeCycle::m_ExtraColour);
+ WriteDataToBufferPointer(buf, CTimeCycle::m_bExtraColourOn);
+ WriteDataToBufferPointer(buf, CTimeCycle::m_ExtraColourInter);
assert(buf - work_buff == SIZE_OF_SIMPLEVARS);
// Save scripts, block is nested within the same block as simple vars for some reason
@@ -315,6 +324,14 @@ GenericLoad()
ReadDataFromBufferPointer(buf, TheCamera.CarZoomIndicator);
ReadDataFromBufferPointer(buf, TheCamera.PedZoomIndicator);
#endif
+ ReadDataFromBufferPointer(buf, CGame::currArea);
+ ReadDataFromBufferPointer(buf, CVehicle::bAllTaxisHaveNitro);
+ // TODO(Miami): Pad invert Y
+ bool invertY = 0;
+ ReadDataFromBufferPointer(buf, invertY);
+ ReadDataFromBufferPointer(buf, CTimeCycle::m_ExtraColour);
+ ReadDataFromBufferPointer(buf, CTimeCycle::m_bExtraColourOn);
+ ReadDataFromBufferPointer(buf, CTimeCycle::m_ExtraColourInter);
assert(buf - work_buff == SIZE_OF_SIMPLEVARS);
#ifdef MISSION_REPLAY
WaitForSave = 0;