summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-01-31 12:57:25 +0100
committerGitHub <noreply@github.com>2020-01-31 12:57:25 +0100
commit8b367e8d18599400b5e5e5b827f191e6bcb5ffb4 (patch)
tree4ef2e1fc1aee31f7b96d276cff8a7fb83b5f1f1e /src/core
parentMerge pull request #300 from Sergeanur/Remote (diff)
parentsizeofs n stuff (diff)
downloadre3-8b367e8d18599400b5e5e5b827f191e6bcb5ffb4.tar
re3-8b367e8d18599400b5e5e5b827f191e6bcb5ffb4.tar.gz
re3-8b367e8d18599400b5e5e5b827f191e6bcb5ffb4.tar.bz2
re3-8b367e8d18599400b5e5e5b827f191e6bcb5ffb4.tar.lz
re3-8b367e8d18599400b5e5e5b827f191e6bcb5ffb4.tar.xz
re3-8b367e8d18599400b5e5e5b827f191e6bcb5ffb4.tar.zst
re3-8b367e8d18599400b5e5e5b827f191e6bcb5ffb4.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/ControllerConfig.cpp2
-rw-r--r--src/core/Frontend.cpp31
-rw-r--r--src/core/PCSave.cpp20
-rw-r--r--src/core/PCSave.h23
-rw-r--r--src/core/main.h2
5 files changed, 17 insertions, 61 deletions
diff --git a/src/core/ControllerConfig.cpp b/src/core/ControllerConfig.cpp
index 26db4e5e..02230df7 100644
--- a/src/core/ControllerConfig.cpp
+++ b/src/core/ControllerConfig.cpp
@@ -16,7 +16,7 @@
#include "ModelIndices.h"
#include "Camera.h"
#include "win.h"
-#include "PCSave.h"
+#include "GenericGameStorage.h"
CControllerConfigManager &ControlsManager = *(CControllerConfigManager*)0x8F43A4;
diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp
index ed424b98..a75c464b 100644
--- a/src/core/Frontend.cpp
+++ b/src/core/Frontend.cpp
@@ -15,7 +15,7 @@
#include "Streaming.h"
#include "TxdStore.h"
#include "General.h"
-#include "PCSave.h"
+#include "GenericGameStorage.h"
#include "Script.h"
#include "Camera.h"
#include "MenuScreens.h"
@@ -448,7 +448,7 @@ void CMenuManager::Draw()
str = TheText.Get(aScreens[m_nCurrScreen].m_aEntries[0].m_EntryName);
break;
case MENUPAGE_SAVE_OVERWRITE_CONFIRM:
- if (Slots[m_nCurrSaveSlot] == 1)
+ if (Slots[m_nCurrSaveSlot] == SLOT_EMPTY)
str = TheText.Get("FESZ_QZ");
else
str = TheText.Get(aScreens[m_nCurrScreen].m_aEntries[0].m_EntryName);
@@ -588,7 +588,7 @@ void CMenuManager::Draw()
CFont::SetRightJustifyOff();
textToPrint[MENUCOLUMN_LEFT] = GetNameOfSavedGame(i - 1);
- if (Slots[i-1] != 1)
+ if (Slots[i-1] != SLOT_EMPTY)
textToPrint[MENUCOLUMN_RIGHT] = GetSavedGameDateAndTime(i - 1);
if (textToPrint[MENUCOLUMN_LEFT][0] == '\0') {
@@ -2228,40 +2228,37 @@ void CMenuManager::ResetHelperText()
void CMenuManager::SaveLoadFileError_SetUpErrorScreen()
{
- // TO-DO: Enum
- switch (PcSaveHelper.m_nHelper) {
- case 1:
- case 2:
- case 3:
+ switch (PcSaveHelper.nErrorCode) {
+ case SAVESTATUS_ERR_SAVE_CREATE:
+ case SAVESTATUS_ERR_SAVE_WRITE:
+ case SAVESTATUS_ERR_SAVE_CLOSE:
m_nPrevScreen = m_nCurrScreen;
m_nCurrScreen = MENUPAGE_SAVE_FAILED;
m_nCurrOption = 0;
m_nScreenChangeDelayTimer = CTimer::GetTimeInMillisecondsPauseMode();
break;
- case 4:
- case 5:
- case 6:
+ case SAVESTATUS_ERR_LOAD_OPEN:
+ case SAVESTATUS_ERR_LOAD_READ:
+ case SAVESTATUS_ERR_LOAD_CLOSE:
m_nPrevScreen = m_nCurrScreen;
m_nCurrScreen = MENUPAGE_LOAD_FAILED;
m_nCurrOption = 0;
m_nScreenChangeDelayTimer = CTimer::GetTimeInMillisecondsPauseMode();
break;
- case 7:
+ case SAVESTATUS_ERR_DATA_INVALID:
m_nPrevScreen = m_nCurrScreen;
m_nCurrScreen = MENUPAGE_LOAD_FAILED_2;
m_nCurrOption = 0;
m_nScreenChangeDelayTimer = CTimer::GetTimeInMillisecondsPauseMode();
break;
- case 8:
- case 9:
- case 10:
+ case SAVESTATUS_DELETEFAILED8:
+ case SAVESTATUS_DELETEFAILED9:
+ case SAVESTATUS_DELETEFAILED10:
m_nPrevScreen = m_nCurrScreen;
m_nCurrScreen = MENUPAGE_DELETE_FAILED;
m_nCurrOption = 0;
m_nScreenChangeDelayTimer = CTimer::GetTimeInMillisecondsPauseMode();
break;
- default:
- return;
}
}
diff --git a/src/core/PCSave.cpp b/src/core/PCSave.cpp
deleted file mode 100644
index 628e1218..00000000
--- a/src/core/PCSave.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-#include "common.h"
-#include "patcher.h"
-#include "Frontend.h"
-#include "PCSave.h"
-
-WRAPPER void C_PcSave::SetSaveDirectory(const char *path) { EAXJMP(0x591EA0); }
-WRAPPER int8 C_PcSave::PopulateSlotInfo() { EAXJMP(0x592090); }
-WRAPPER int8 C_PcSave::DeleteSlot(int) { EAXJMP(0x5922F0); }
-WRAPPER int8 C_PcSave::SaveSlot(int) { EAXJMP(0x591EC0); }
-
-WRAPPER int8 CheckSlotDataValid(int) { EAXJMP(0x591A40); }
-
-WRAPPER wchar *GetNameOfSavedGame(int counter) { EAXJMP(0x591B60); }
-WRAPPER wchar *GetSavedGameDateAndTime(int counter) { EAXJMP(0x591B50); }
-
-
-C_PcSave PcSaveHelper = *(C_PcSave*)0x8E2C60;
-int *Slots = (int*)0x728040;
-int *SlotFileName = (int*)0x6F07C8;
-int *SlotSaveDate = (int*)0x72B858;
diff --git a/src/core/PCSave.h b/src/core/PCSave.h
deleted file mode 100644
index 42239744..00000000
--- a/src/core/PCSave.h
+++ /dev/null
@@ -1,23 +0,0 @@
-#pragma once
-
-class C_PcSave
-{
-public:
- int32 m_nHelper;
-
- static void SetSaveDirectory(const char *path);
- int8 PopulateSlotInfo();
- int8 DeleteSlot(int);
- int8 SaveSlot(int);
-};
-
-extern int8 CheckSlotDataValid(int);
-extern wchar *GetNameOfSavedGame(int counter);
-extern wchar *GetSavedGameDateAndTime(int counter);
-
-extern C_PcSave PcSaveHelper;
-extern int *Slots;
-extern int *SlotFileName;
-extern int *SlotSaveDate;
-
-const char TopLineEmptyFile[] = "THIS FILE IS NOT VALID YET";
diff --git a/src/core/main.h b/src/core/main.h
index 45ba441f..d6724d2b 100644
--- a/src/core/main.h
+++ b/src/core/main.h
@@ -19,6 +19,8 @@ extern wchar *gUString2;
extern bool &b_FoundRecentSavedGameWantToLoad;
extern bool gbPrintShite;
extern bool &gbModelViewer;
+extern bool &StillToFadeOut;
+extern bool &JustLoadedDontFadeInYet;
class CSprite2d;