summaryrefslogtreecommitdiffstats
path: root/src/core/Game.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/Game.cpp')
-rw-r--r--src/core/Game.cpp41
1 files changed, 14 insertions, 27 deletions
diff --git a/src/core/Game.cpp b/src/core/Game.cpp
index 8699ffeb..7ccf78d0 100644
--- a/src/core/Game.cpp
+++ b/src/core/Game.cpp
@@ -5,7 +5,7 @@
#pragma warning( pop )
#include "common.h"
#include "win.h"
-#include "patcher.h"
+
#include "Game.h"
#include "main.h"
#include "RwHelper.h"
@@ -89,19 +89,19 @@
-eLevelName &CGame::currLevel = *(eLevelName*)0x941514;
-bool &CGame::bDemoMode = *(bool*)0x5F4DD0;
-bool &CGame::nastyGame = *(bool*)0x5F4DD4;
-bool &CGame::frenchGame = *(bool*)0x95CDCB;
-bool &CGame::germanGame = *(bool*)0x95CD1E;
-bool &CGame::noProstitutes = *(bool*)0x95CDCF;
-bool &CGame::playingIntro = *(bool*)0x95CDC2;
-char *CGame::aDatFile = (char*)0x773A48;
+eLevelName CGame::currLevel;
+bool CGame::bDemoMode = true;
+bool CGame::nastyGame = true;
+bool CGame::frenchGame;
+bool CGame::germanGame;
+bool CGame::noProstitutes;
+bool CGame::playingIntro;
+char CGame::aDatFile[32];
#ifdef MORE_LANGUAGES
bool CGame::russianGame = false;
#endif
-int &gameTxdSlot = *(int*)0x628D88;
+int gameTxdSlot;
bool
CGame::InitialiseOnceBeforeRW(void)
@@ -115,7 +115,9 @@ CGame::InitialiseOnceBeforeRW(void)
bool
CGame::InitialiseRenderWare(void)
{
+#ifdef USE_TEXTURE_POOL
_TexturePoolsInitialise();
+#endif
CTxdStore::Initialise();
CVisibilityPlugins::Initialise();
@@ -188,7 +190,9 @@ void CGame::ShutdownRenderWare(void)
CVisibilityPlugins::Shutdown();
+#ifdef USE_TEXTURE_POOL
_TexturePoolsShutdown();
+#endif
}
bool CGame::InitialiseOnceAfterRW(void)
@@ -706,20 +710,3 @@ void CGame::ProcessTidyUpMemory(void)
// meow
#endif
}
-
-STARTPATCHES
- InjectHook(0x48BB80, CGame::InitialiseOnceBeforeRW, PATCH_JUMP);
- InjectHook(0x48BBA0, CGame::InitialiseRenderWare, PATCH_JUMP);
- InjectHook(0x48BCB0, CGame::ShutdownRenderWare, PATCH_JUMP);
- InjectHook(0x48BD50, CGame::InitialiseOnceAfterRW, PATCH_JUMP);
- InjectHook(0x48BEC0, CGame::FinalShutdown, PATCH_JUMP);
- InjectHook(0x48BED0, CGame::Initialise, PATCH_JUMP);
- InjectHook(0x48C3A0, CGame::ShutDown, PATCH_JUMP);
- InjectHook(0x48C4B0, CGame::ReInitGameObjectVariables, PATCH_JUMP);
- InjectHook(0x48C620, CGame::ReloadIPLs, PATCH_JUMP);
- InjectHook(0x48C6B0, CGame::ShutDownForRestart, PATCH_JUMP);
- InjectHook(0x48C740, CGame::InitialiseWhenRestarting, PATCH_JUMP);
- InjectHook(0x48C850, CGame::Process, PATCH_JUMP);
- InjectHook(0x48CA10, CGame::DrasticTidyUpMemory, PATCH_JUMP);
- InjectHook(0x48CA20, CGame::TidyUpMemory, PATCH_JUMP);
-ENDPATCHES