summaryrefslogtreecommitdiffstats
path: root/src/save
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-04-16 10:50:45 +0200
committerSergeanur <s.anureev@yandex.ua>2020-04-16 10:50:45 +0200
commitb1fc7bc533dc7d603daafbf8a158a92f710c1e60 (patch)
tree20ec3f4fd1aeaba1ab41078cfb49a248d9421885 /src/save
parentfirst fake RW implementation working (diff)
downloadre3-b1fc7bc533dc7d603daafbf8a158a92f710c1e60.tar
re3-b1fc7bc533dc7d603daafbf8a158a92f710c1e60.tar.gz
re3-b1fc7bc533dc7d603daafbf8a158a92f710c1e60.tar.bz2
re3-b1fc7bc533dc7d603daafbf8a158a92f710c1e60.tar.lz
re3-b1fc7bc533dc7d603daafbf8a158a92f710c1e60.tar.xz
re3-b1fc7bc533dc7d603daafbf8a158a92f710c1e60.tar.zst
re3-b1fc7bc533dc7d603daafbf8a158a92f710c1e60.zip
Diffstat (limited to '')
-rw-r--r--src/save/GenericGameStorage.cpp30
-rw-r--r--src/save/GenericGameStorage.h32
-rw-r--r--src/save/PCSave.cpp2
-rw-r--r--src/save/PCSave.h2
4 files changed, 33 insertions, 33 deletions
diff --git a/src/save/GenericGameStorage.cpp b/src/save/GenericGameStorage.cpp
index 1e4acd3d..0bae979b 100644
--- a/src/save/GenericGameStorage.cpp
+++ b/src/save/GenericGameStorage.cpp
@@ -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(*)[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 SaveFileNameJustSaved[260];
-int (&Slots)[SLOT_COUNT+1] = *(int(*)[SLOT_COUNT+1])*(uintptr*)0x72803C;
-CDate &CompileDateAndTime = *(CDate*)0x72BCB8;
-
-bool &b_FoundRecentSavedGameWantToLoad = *(bool*)0x95CDA8;
-bool &JustLoadedDontFadeInYet = *(bool*)0x95CDB4;
-bool &StillToFadeOut = *(bool*)0x95CD99;
-uint32 &TimeStartedCountingForFade = *(uint32*)0x9430EC;
-uint32 &TimeToStayFadedBeforeFadeOut = *(uint32*)0x611564;
+int Slots[SLOT_COUNT+1];// = *(int(*)[SLOT_COUNT+1])*(uintptr*)0x72803C;
+CDate CompileDateAndTime;// = *(CDate*)0x72BCB8;
+
+bool b_FoundRecentSavedGameWantToLoad;// = *(bool*)0x95CDA8;
+bool JustLoadedDontFadeInYet;// = *(bool*)0x95CDB4;
+bool StillToFadeOut;// = *(bool*)0x95CD99;
+uint32 TimeStartedCountingForFade;// = *(uint32*)0x9430EC;
+uint32 TimeToStayFadedBeforeFadeOut = 1750;// = *(uint32*)0x611564;
#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));
diff --git a/src/save/GenericGameStorage.h b/src/save/GenericGameStorage.h
index e6fd2e2d..b913c305 100644
--- a/src/save/GenericGameStorage.h
+++ b/src/save/GenericGameStorage.h
@@ -21,22 +21,22 @@ bool CheckDataNotCorrupt(int32 slot, char *name);
bool RestoreForStartLoad();
int align4bytes(int32 size);
-extern class CDate& CompileDateAndTime;
-
-extern char (&DefaultPCSaveFileName)[260];
-extern char (&ValidSaveName)[260];
-extern char (&LoadFileName)[256];
-extern wchar (&SlotFileName)[SLOT_COUNT][260];
-extern wchar (&SlotSaveDate)[SLOT_COUNT][70];
-extern int &CheckSum;
-extern enum eLevelName &m_LevelToLoad;
-extern int (&Slots)[SLOT_COUNT+1];
-
-extern bool &b_FoundRecentSavedGameWantToLoad;
-extern bool &JustLoadedDontFadeInYet;
-extern bool &StillToFadeOut;
-extern uint32 &TimeStartedCountingForFade;
-extern uint32 &TimeToStayFadedBeforeFadeOut;
+extern class CDate CompileDateAndTime;
+
+extern char DefaultPCSaveFileName[260];
+extern char ValidSaveName[260];
+extern char LoadFileName[256];
+extern wchar SlotFileName[SLOT_COUNT][260];
+extern wchar SlotSaveDate[SLOT_COUNT][70];
+extern int CheckSum;
+extern enum eLevelName m_LevelToLoad;
+extern int Slots[SLOT_COUNT+1];
+
+extern bool b_FoundRecentSavedGameWantToLoad;
+extern bool JustLoadedDontFadeInYet;
+extern bool StillToFadeOut;
+extern uint32 TimeStartedCountingForFade;
+extern uint32 TimeToStayFadedBeforeFadeOut;
extern char SaveFileNameJustSaved[260]; // 8F2570
diff --git a/src/save/PCSave.cpp b/src/save/PCSave.cpp
index 744f5e0d..4afcb645 100644
--- a/src/save/PCSave.cpp
+++ b/src/save/PCSave.cpp
@@ -9,7 +9,7 @@
const char* _psGetUserFilesFolder();
-C_PcSave &PcSaveHelper = *(C_PcSave*)0x8E2C60;
+C_PcSave PcSaveHelper;// = *(C_PcSave*)0x8E2C60;
void
C_PcSave::SetSaveDirectory(const char *path)
diff --git a/src/save/PCSave.h b/src/save/PCSave.h
index c58a5c9e..4a2d9a66 100644
--- a/src/save/PCSave.h
+++ b/src/save/PCSave.h
@@ -37,4 +37,4 @@ public:
static void SetSaveDirectory(const char *path);
};
-extern C_PcSave &PcSaveHelper;
+extern C_PcSave PcSaveHelper;