diff options
author | aap <aap@papnet.eu> | 2020-03-29 19:12:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-29 19:12:53 +0200 |
commit | 8e3ee096e2ec54ea852c29f8eb44ec0eaa4588cd (patch) | |
tree | e086c6d1056146aa7b986e602a6dc00bd4db3632 /src/core | |
parent | Merge pull request #370 from erorcun/erorcun (diff) | |
parent | fixed PS2 build (diff) | |
download | re3-8e3ee096e2ec54ea852c29f8eb44ec0eaa4588cd.tar re3-8e3ee096e2ec54ea852c29f8eb44ec0eaa4588cd.tar.gz re3-8e3ee096e2ec54ea852c29f8eb44ec0eaa4588cd.tar.bz2 re3-8e3ee096e2ec54ea852c29f8eb44ec0eaa4588cd.tar.lz re3-8e3ee096e2ec54ea852c29f8eb44ec0eaa4588cd.tar.xz re3-8e3ee096e2ec54ea852c29f8eb44ec0eaa4588cd.tar.zst re3-8e3ee096e2ec54ea852c29f8eb44ec0eaa4588cd.zip |
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/Game.cpp | 2 | ||||
-rw-r--r-- | src/core/Pad.h | 7 | ||||
-rw-r--r-- | src/core/Stats.cpp | 2 | ||||
-rw-r--r-- | src/core/Stats.h | 2 | ||||
-rw-r--r-- | src/core/World.cpp | 1 | ||||
-rw-r--r-- | src/core/World.h | 1 | ||||
-rw-r--r-- | src/core/config.h | 2 |
7 files changed, 15 insertions, 2 deletions
diff --git a/src/core/Game.cpp b/src/core/Game.cpp index e6bedf32..3306277c 100644 --- a/src/core/Game.cpp +++ b/src/core/Game.cpp @@ -394,7 +394,9 @@ bool CGame::ShutDown(void) CPlane::Shutdown(); CTrain::Shutdown(); CSpecialFX::Shutdown(); +#ifndef PS2 CGarages::Shutdown(); +#endif CMovingThings::Shutdown(); gPhoneInfo.Shutdown(); CWeapon::ShutdownWeapons(); diff --git a/src/core/Pad.h b/src/core/Pad.h index 6cabdf54..84919f32 100644 --- a/src/core/Pad.h +++ b/src/core/Pad.h @@ -4,7 +4,7 @@ enum { PLAYERCONTROL_ENABLED = 0, PLAYERCONTROL_DISABLED_1 = 1, PLAYERCONTROL_DISABLED_2 = 2, - PLAYERCONTROL_DISABLED_4 = 4, + PLAYERCONTROL_GARAGE = 4, PLAYERCONTROL_DISABLED_8 = 8, PLAYERCONTROL_DISABLED_10 = 16, PLAYERCONTROL_DISABLED_20 = 32, // used on CPlayerInfo::MakePlayerSafe @@ -433,7 +433,10 @@ public: int16 GetRightStickX(void) { return NewState.RightStickX; } int16 GetRightStickY(void) { return NewState.RightStickY; } - bool ArePlayerControlsDisabled(void) { return DisablePlayerControls != PLAYERCONTROL_ENABLED; } + bool ArePlayerControlsDisabled(void) { return DisablePlayerControls != PLAYERCONTROL_ENABLED; } + void SetDisablePlayerControls(uint8 who) { DisablePlayerControls |= who; } + void SetEnablePlayerControls(uint8 who) { DisablePlayerControls &= ~who; } + bool IsPlayerControlsDisabledBy(uint8 who) { return DisablePlayerControls & who; } }; VALIDATE_SIZE(CPad, 0xFC); diff --git a/src/core/Stats.cpp b/src/core/Stats.cpp index 93eeb759..9478479b 100644 --- a/src/core/Stats.cpp +++ b/src/core/Stats.cpp @@ -48,6 +48,8 @@ int32& CStats::LongestFlightInDodo = *(int32*)0x8F5FE4; int32& CStats::TimeTakenDefuseMission = *(int32*)0x880E24; int32& CStats::TotalNumberKillFrenzies = *(int32*)0x8E2884; int32& CStats::TotalNumberMissions = *(int32*)0x8E2820; +int32& CStats::KgOfExplosivesUsed = *(int32*)0x8F2510; +int32& CStats::CarsCrushed = *(int32*)0x943050; int32(&CStats::FastestTimes)[CStats::TOTAL_FASTEST_TIMES] = *(int32(*)[CStats::TOTAL_FASTEST_TIMES])*(uintptr*)0x6E9128; int32(&CStats::HighestScores)[CStats::TOTAL_HIGHEST_SCORES] = *(int32(*)[CStats::TOTAL_HIGHEST_SCORES]) * (uintptr*)0x8622B0; diff --git a/src/core/Stats.h b/src/core/Stats.h index 0a750d5e..1d220905 100644 --- a/src/core/Stats.h +++ b/src/core/Stats.h @@ -53,6 +53,8 @@ public: static int32 &TotalNumberMissions; static int32(&FastestTimes)[TOTAL_FASTEST_TIMES]; static int32(&HighestScores)[TOTAL_HIGHEST_SCORES]; + static int32 &KgOfExplosivesUsed; + static int32 &CarsCrushed; public: static void RegisterFastestTime(int32, int32); diff --git a/src/core/World.cpp b/src/core/World.cpp index fc3f6057..4a0230ce 100644 --- a/src/core/World.cpp +++ b/src/core/World.cpp @@ -55,6 +55,7 @@ WRAPPER void CWorld::FindObjectsOfTypeInRangeSectorList(uint32, CPtrList&, CVect WRAPPER void CWorld::FindMissionEntitiesIntersectingCube(const CVector&, const CVector&, int16*, int16, CEntity**, bool, bool, bool) { EAXJMP(0x4B3680); } WRAPPER void CWorld::ClearCarsFromArea(float, float, float, float, float, float) { EAXJMP(0x4B50E0); } WRAPPER void CWorld::ClearPedsFromArea(float, float, float, float, float, float) { EAXJMP(0x4B52B0); } +WRAPPER void CWorld::CallOffChaseForArea(float, float, float, float) { EAXJMP(0x4B5530); } void CWorld::Initialise() diff --git a/src/core/World.h b/src/core/World.h index c9d57ab7..c4103eb2 100644 --- a/src/core/World.h +++ b/src/core/World.h @@ -115,6 +115,7 @@ public: static void FindMissionEntitiesIntersectingCube(const CVector&, const CVector&, int16*, int16, CEntity**, bool, bool, bool); static void ClearCarsFromArea(float, float, float, float, float, float); static void ClearPedsFromArea(float, float, float, float, float, float); + static void CallOffChaseForArea(float, float, float, float); static float GetSectorX(float f) { return ((f - WORLD_MIN_X)/SECTOR_SIZE_X); } static float GetSectorY(float f) { return ((f - WORLD_MIN_Y)/SECTOR_SIZE_Y); } diff --git a/src/core/config.h b/src/core/config.h index ab5b02e7..0d39550a 100644 --- a/src/core/config.h +++ b/src/core/config.h @@ -117,6 +117,8 @@ enum Config { NUM_AUDIO_REFLECTIONS = 5, NUM_SCRIPT_MAX_ENTITIES = 40, + + NUM_GARAGE_STORED_CARS = 6 }; // We'll use this once we're ready to become independent of the game |