summaryrefslogtreecommitdiffstats
path: root/src/control
diff options
context:
space:
mode:
authorFire-Head <Fire-Head@users.noreply.github.com>2020-03-28 21:55:23 +0100
committerFire-Head <Fire-Head@users.noreply.github.com>2020-03-28 21:55:23 +0100
commit194ddc5f40835476673655bd3895f2b7fe7fee0c (patch)
tree530ef79acd32c90ce5ef5d545a04d4d09b5abfb7 /src/control
parentMerge pull request #363 from erorcun/erorcun (diff)
downloadre3-194ddc5f40835476673655bd3895f2b7fe7fee0c.tar
re3-194ddc5f40835476673655bd3895f2b7fe7fee0c.tar.gz
re3-194ddc5f40835476673655bd3895f2b7fe7fee0c.tar.bz2
re3-194ddc5f40835476673655bd3895f2b7fe7fee0c.tar.lz
re3-194ddc5f40835476673655bd3895f2b7fe7fee0c.tar.xz
re3-194ddc5f40835476673655bd3895f2b7fe7fee0c.tar.zst
re3-194ddc5f40835476673655bd3895f2b7fe7fee0c.zip
Diffstat (limited to 'src/control')
-rw-r--r--src/control/GameLogic.cpp2
-rw-r--r--src/control/Gangs.cpp6
-rw-r--r--src/control/Gangs.h2
-rw-r--r--src/control/Garages.cpp4
-rw-r--r--src/control/Garages.h3
-rw-r--r--src/control/Script.cpp4
-rw-r--r--src/control/Script.h2
7 files changed, 15 insertions, 8 deletions
diff --git a/src/control/GameLogic.cpp b/src/control/GameLogic.cpp
index 1493cec0..0abae7d6 100644
--- a/src/control/GameLogic.cpp
+++ b/src/control/GameLogic.cpp
@@ -57,7 +57,7 @@ CGameLogic::SortOutStreamingAndMemory(const CVector &pos)
CStreaming::FlushRequestList();
CStreaming::DeleteRwObjectsAfterDeath(pos);
CStreaming::RemoveUnusedModelsInLoadedList();
- CGame::DrasticTidyUpMemory();
+ CGame::DrasticTidyUpMemory(true);
CStreaming::LoadScene(pos);
CTimer::Update();
}
diff --git a/src/control/Gangs.cpp b/src/control/Gangs.cpp
index 340fe0f6..ac32ad98 100644
--- a/src/control/Gangs.cpp
+++ b/src/control/Gangs.cpp
@@ -14,7 +14,7 @@ CGangInfo::CGangInfo() :
m_Weapon2(WEAPONTYPE_UNARMED)
{}
-void CGangs::Initialize(void)
+void CGangs::Initialise(void)
{
Gang[GANG_MAFIA].m_nVehicleMI = MI_MAFIA;
Gang[GANG_TRIAD].m_nVehicleMI = MI_BELLYUP;
@@ -67,7 +67,7 @@ VALIDATESAVEBUF(*size);
void CGangs::LoadAllGangData(uint8 *buf, uint32 size)
{
- Initialize();
+ Initialise();
INITSAVEBUF
// original: SkipSaveBuf(buf, SAVE_HEADER_SIZE);
@@ -79,7 +79,7 @@ VALIDATESAVEBUF(size);
}
STARTPATCHES
- InjectHook(0x4C3FB0, CGangs::Initialize, PATCH_JUMP);
+ InjectHook(0x4C3FB0, CGangs::Initialise, PATCH_JUMP);
InjectHook(0x4C4010, CGangs::SetGangVehicleModel, PATCH_JUMP);
InjectHook(0x4C4030, CGangs::SetGangWeapons, PATCH_JUMP);
InjectHook(0x4C4050, CGangs::SetGangPedModelOverride, PATCH_JUMP);
diff --git a/src/control/Gangs.h b/src/control/Gangs.h
index cf22cc73..dd7a7f93 100644
--- a/src/control/Gangs.h
+++ b/src/control/Gangs.h
@@ -28,7 +28,7 @@ enum {
class CGangs
{
public:
- static void Initialize(void);
+ static void Initialise(void);
static void SetGangVehicleModel(int16, int32);
static void SetGangWeapons(int16, int32, int32);
static void SetGangPedModelOverride(int16, int8);
diff --git a/src/control/Garages.cpp b/src/control/Garages.cpp
index 5ac15377..7a28bdc8 100644
--- a/src/control/Garages.cpp
+++ b/src/control/Garages.cpp
@@ -30,10 +30,14 @@ uint32 &CGarages::GarageToBeTidied = *(uint32 *)0x623570;
CGarage(&CGarages::Garages)[NUM_GARAGES] = *(CGarage(*)[NUM_GARAGES])*(uintptr*)0x72BCD0;
WRAPPER void CGarages::Init(void) { EAXJMP(0x421C60); }
+WRAPPER void CGarages::Shutdown(void) { EAXJMP(0x421E10); }
+
WRAPPER void CGarages::Update(void) { EAXJMP(0x421E40); }
WRAPPER void CGarages::Load(uint8* buf, uint32 size) { EAXJMP(0x428940); }
WRAPPER void CGarages::Save(uint8* buf, uint32 *size) { EAXJMP(0x4284e0); }
+WRAPPER void CGarages::SetAllDoorsBackToOriginalHeight(void) { EAXJMP(0x4283D0); }
+
bool
CGarages::IsModelIndexADoor(uint32 id)
{
diff --git a/src/control/Garages.h b/src/control/Garages.h
index 5e106ade..783eb1e1 100644
--- a/src/control/Garages.h
+++ b/src/control/Garages.h
@@ -146,6 +146,7 @@ public:
static bool IsPointWithinAnyGarage(CVector&);
static void PlayerArrestedOrDied();
static void Init(void);
+ static void Shutdown(void);
static void Update(void);
static void Load(uint8 *buf, uint32 size);
static void Save(uint8 *buf, uint32 *size);
@@ -167,4 +168,6 @@ public:
static bool IsThisCarWithinGarageArea(int16, CEntity*);
static int GetCarsCollectedIndexForGarageType(eGarageType type) { return type - GARAGE_COLLECTCARS_1; }
+
+ static void SetAllDoorsBackToOriginalHeight();
};
diff --git a/src/control/Script.cpp b/src/control/Script.cpp
index 14f55734..d989a0ce 100644
--- a/src/control/Script.cpp
+++ b/src/control/Script.cpp
@@ -9819,7 +9819,7 @@ void CTheScripts::UndoBuildingSwaps()
}
}
-void CTheScripts::UndoEntityVisibilitySettings()
+void CTheScripts::UndoEntityInvisibilitySettings()
{
for (int i = 0; i < MAX_NUM_INVISIBILITY_SETTINGS; i++) {
if (InvisibilitySettingArray[i]) {
@@ -11657,7 +11657,7 @@ InjectHook(0x439040, &CTheScripts::Process, PATCH_JUMP);
InjectHook(0x439400, &CTheScripts::StartTestScript, PATCH_JUMP);
InjectHook(0x439410, &CTheScripts::IsPlayerOnAMission, PATCH_JUMP);
InjectHook(0x44FD10, &CTheScripts::UndoBuildingSwaps, PATCH_JUMP);
-InjectHook(0x44FD60, &CTheScripts::UndoEntityVisibilitySettings, PATCH_JUMP);
+InjectHook(0x44FD60, &CTheScripts::UndoEntityInvisibilitySettings, PATCH_JUMP);
InjectHook(0x4534E0, &CTheScripts::ScriptDebugLine3D, PATCH_JUMP);
InjectHook(0x453550, &CTheScripts::RenderTheScriptDebugLines, PATCH_JUMP);
InjectHook(0x4535E0, &CTheScripts::SaveAllScripts, PATCH_JUMP);
diff --git a/src/control/Script.h b/src/control/Script.h
index b6844b6c..fbcdce48 100644
--- a/src/control/Script.h
+++ b/src/control/Script.h
@@ -281,7 +281,7 @@ public:
static void ClearSpaceForMissionEntity(const CVector&, CEntity*);
static void UndoBuildingSwaps();
- static void UndoEntityVisibilitySettings();
+ static void UndoEntityInvisibilitySettings();
static void ScriptDebugLine3D(float x1, float y1, float z1, float x2, float y2, float z2, uint32 col, uint32 col2);
static void RenderTheScriptDebugLines();