diff options
author | Sergeanur <s.anureev@yandex.ua> | 2020-04-17 17:08:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-17 17:08:26 +0200 |
commit | 1c74d111e8cafa4ad70837725c71f6d478390f01 (patch) | |
tree | 818918190bf4403c32137d7348a77e23b643a669 /src/save/GenericGameStorage.cpp | |
parent | implemented CVector2D::NormaliseSafe for SkidMarks (diff) | |
parent | appveyor setup (diff) | |
download | re3-1c74d111e8cafa4ad70837725c71f6d478390f01.tar re3-1c74d111e8cafa4ad70837725c71f6d478390f01.tar.gz re3-1c74d111e8cafa4ad70837725c71f6d478390f01.tar.bz2 re3-1c74d111e8cafa4ad70837725c71f6d478390f01.tar.lz re3-1c74d111e8cafa4ad70837725c71f6d478390f01.tar.xz re3-1c74d111e8cafa4ad70837725c71f6d478390f01.tar.zst re3-1c74d111e8cafa4ad70837725c71f6d478390f01.zip |
Diffstat (limited to 'src/save/GenericGameStorage.cpp')
-rw-r--r-- | src/save/GenericGameStorage.cpp | 49 |
1 files changed, 15 insertions, 34 deletions
diff --git a/src/save/GenericGameStorage.cpp b/src/save/GenericGameStorage.cpp index 0bae979b..763f516a 100644 --- a/src/save/GenericGameStorage.cpp +++ b/src/save/GenericGameStorage.cpp @@ -1,7 +1,7 @@ #define WITHWINDOWS #include "common.h" #include "main.h" -#include "patcher.h" + #include "AudioScriptObject.h" #include "Camera.h" #include "CarGen.h" @@ -40,22 +40,22 @@ const uint32 SIZE_OF_ONE_GAME_IN_BYTES = 201729; -char DefaultPCSaveFileName[260];// = *(char(*)[260]) * (uintptr*)0x8E28C0; -char ValidSaveName[260];// = *(char(*)[260])*(uintptr*)0x8E2CBC; -char LoadFileName[256];// = *(char(*)[256])*(uintptr*)0x9403C4; -wchar SlotFileName[SLOT_COUNT][260];// = *(wchar(*)[SLOT_COUNT][260])*(uintptr*)0x6F07C8; -wchar SlotSaveDate[SLOT_COUNT][70];// = *(wchar(*)[SLOT_COUNT][70])*(uintptr*)0x72B858; -int CheckSum;// = *(int*)0x8E2BE0; -eLevelName m_LevelToLoad;// = *(eLevelName*)0x8E29CC; +char DefaultPCSaveFileName[260]; +char ValidSaveName[260]; +char LoadFileName[256]; +wchar SlotFileName[SLOT_COUNT][260]; +wchar SlotSaveDate[SLOT_COUNT][70]; +int CheckSum; +eLevelName m_LevelToLoad; char SaveFileNameJustSaved[260]; -int Slots[SLOT_COUNT+1];// = *(int(*)[SLOT_COUNT+1])*(uintptr*)0x72803C; -CDate CompileDateAndTime;// = *(CDate*)0x72BCB8; +int Slots[SLOT_COUNT+1]; +CDate CompileDateAndTime; -bool b_FoundRecentSavedGameWantToLoad;// = *(bool*)0x95CDA8; -bool JustLoadedDontFadeInYet;// = *(bool*)0x95CDB4; -bool StillToFadeOut;// = *(bool*)0x95CD99; -uint32 TimeStartedCountingForFade;// = *(uint32*)0x9430EC; -uint32 TimeToStayFadedBeforeFadeOut = 1750;// = *(uint32*)0x611564; +bool b_FoundRecentSavedGameWantToLoad; +bool JustLoadedDontFadeInYet; +bool StillToFadeOut; +uint32 TimeStartedCountingForFade; +uint32 TimeToStayFadedBeforeFadeOut = 1750; #define ReadDataFromBufferPointer(buf, to) memcpy(&to, buf, sizeof(to)); buf += align4bytes(sizeof(to)); #define WriteDataToBufferPointer(buf, from) memcpy(buf, &from, sizeof(from)); buf += align4bytes(sizeof(from)); @@ -553,22 +553,3 @@ align4bytes(int32 size) { return (size + 3) & 0xFFFFFFFC; } - -STARTPATCHES - InjectHook(0x58F8D0, GenericSave, PATCH_JUMP); - InjectHook(0x590A00, GenericLoad, PATCH_JUMP); - InjectHook(0x591910, ReadInSizeofSaveFileBuffer, PATCH_JUMP); - InjectHook(0x591990, ReadDataFromFile, PATCH_JUMP); - InjectHook(0x591A00, CloseFile, PATCH_JUMP); - InjectHook(0x591A20, DoGameSpecificStuffAfterSucessLoad, PATCH_JUMP); - InjectHook(0x591A40, CheckSlotDataValid, PATCH_JUMP); - InjectHook(0x591A80, MakeSpaceForSizeInBufferPointer, PATCH_JUMP); - InjectHook(0x591AA0, CopySizeAndPreparePointer, PATCH_JUMP); - InjectHook(0x591AE0, DoGameSpecificStuffBeforeSave, PATCH_JUMP); - InjectHook(0x591B10, MakeValidSaveName, PATCH_JUMP); - InjectHook(0x591B50, GetSavedGameDateAndTime, PATCH_JUMP); - InjectHook(0x591B60, GetNameOfSavedGame, PATCH_JUMP); - InjectHook(0x591B70, CheckDataNotCorrupt, PATCH_JUMP); - InjectHook(0x591D60, RestoreForStartLoad, PATCH_JUMP); - InjectHook(0x591E80, align4bytes, PATCH_JUMP); -ENDPATCHES
\ No newline at end of file |