diff options
author | erorcun <erayorcunus@gmail.com> | 2020-08-15 01:28:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-15 01:28:17 +0200 |
commit | 07038ce88ec4056d19f999bab177ad02773c0ef9 (patch) | |
tree | 090a5779c6fe668d1f39a6d158755023f8fe0cd2 /src/save/GenericGameStorage.cpp | |
parent | Remove III files (diff) | |
parent | Continue to Frontend, fix savegame list bug (diff) | |
download | re3-07038ce88ec4056d19f999bab177ad02773c0ef9.tar re3-07038ce88ec4056d19f999bab177ad02773c0ef9.tar.gz re3-07038ce88ec4056d19f999bab177ad02773c0ef9.tar.bz2 re3-07038ce88ec4056d19f999bab177ad02773c0ef9.tar.lz re3-07038ce88ec4056d19f999bab177ad02773c0ef9.tar.xz re3-07038ce88ec4056d19f999bab177ad02773c0ef9.tar.zst re3-07038ce88ec4056d19f999bab177ad02773c0ef9.zip |
Diffstat (limited to 'src/save/GenericGameStorage.cpp')
-rw-r--r-- | src/save/GenericGameStorage.cpp | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/save/GenericGameStorage.cpp b/src/save/GenericGameStorage.cpp index 52c1aef7..4f69123b 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; @@ -56,7 +57,7 @@ wchar SlotSaveDate[SLOT_COUNT][70]; int CheckSum; eLevelName m_LevelToLoad; char SaveFileNameJustSaved[260]; -int Slots[SLOT_COUNT+1]; +int Slots[SLOT_COUNT]; CDate CompileDateAndTime; bool b_FoundRecentSavedGameWantToLoad; @@ -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; |