summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/AnimViewer.cpp2
-rw-r--r--src/core/Camera.h14
-rw-r--r--src/core/ControllerConfig.cpp2
-rw-r--r--src/core/CutsceneMgr.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
8 files changed, 33 insertions, 63 deletions
diff --git a/src/core/AnimViewer.cpp b/src/core/AnimViewer.cpp
index 86b22ec5..a2d7b94a 100644
--- a/src/core/AnimViewer.cpp
+++ b/src/core/AnimViewer.cpp
@@ -289,7 +289,7 @@ CAnimViewer::Update(void)
}
newEntity->GetPosition() = CVector(0.0f, 0.0f, 0.0f);
CWorld::Add(newEntity);
- TheCamera.TakeControl(pTarget, 9, 2, 1);
+ TheCamera.TakeControl(pTarget, CCam::MODE_MODELVIEW, JUMP_CUT, CAM_CONTROLLER_1);
}
if (pTarget->m_type == ENTITY_TYPE_VEHICLE || pTarget->m_type == ENTITY_TYPE_PED || pTarget->m_type == ENTITY_TYPE_OBJECT) {
((CPhysical*)pTarget)->m_vecMoveSpeed = CVector(0.0f, 0.0f, 0.0f);
diff --git a/src/core/Camera.h b/src/core/Camera.h
index 16d2aaf3..3e67903f 100644
--- a/src/core/Camera.h
+++ b/src/core/Camera.h
@@ -239,6 +239,20 @@ enum
MBLUR_UNUSED, // pinkish
};
+enum
+{
+ NONE = 0,
+ INTERPOLATION,
+ JUMP_CUT
+};
+
+enum
+{
+ CAM_CONTROLLER_0,
+ CAM_CONTROLLER_1,
+ CAM_CONTROLLER_2
+};
+
struct CCamera : public CPlaceable
{
bool m_bAboveGroundTrainNodesLoaded;
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/CutsceneMgr.cpp b/src/core/CutsceneMgr.cpp
index 2fbc5186..3df81b2b 100644
--- a/src/core/CutsceneMgr.cpp
+++ b/src/core/CutsceneMgr.cpp
@@ -256,7 +256,7 @@ void
CCutsceneMgr::SetupCutsceneToStart(void)
{
TheCamera.SetCamCutSceneOffSet(ms_cutsceneOffset);
- TheCamera.TakeControlWithSpline(2);
+ TheCamera.TakeControlWithSpline(JUMP_CUT);
TheCamera.SetWideScreenOn();
ms_cutsceneOffset.z++;
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;