summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/Fire.cpp19
-rw-r--r--src/core/Fire.h10
-rw-r--r--src/core/Stats.cpp15
-rw-r--r--src/core/Stats.h16
4 files changed, 57 insertions, 3 deletions
diff --git a/src/core/Fire.cpp b/src/core/Fire.cpp
index 7657d8e9..5c777eab 100644
--- a/src/core/Fire.cpp
+++ b/src/core/Fire.cpp
@@ -9,6 +9,13 @@ WRAPPER void CFireManager::StartFire(CEntity* entityOnFire, CEntity* culprit, fl
WRAPPER void CFireManager::Update(void) { EAXJMP(0x479310); }
WRAPPER CFire* CFireManager::FindFurthestFire_NeverMindFireMen(CVector coors, float, float) { EAXJMP(0x479430); }
+uint32 CFireManager::GetTotalActiveFires() const
+{
+ return m_nTotalFires;
+}
+
+WRAPPER void CFireManager::Update(void) { EAXJMP(0x479310); }
+
CFire* CFireManager::FindNearestFire(CVector vecPos, float* pDistance)
{
for (int i = 0; i < MAX_FIREMEN_ATTENDING; i++) {
@@ -45,7 +52,17 @@ CFireManager::ExtinguishPoint(CVector point, float range)
}
}
+WRAPPER CFire *CFireManager::FindFurthestFire_NeverMindFireMen(CVector coors, float, float) { EAXJMP(0x479430); }
+WRAPPER void CFireManager::StartFire(CEntity *entityOnFire, CEntity *culprit, float, uint32) { EAXJMP(0x479590); }
+WRAPPER void CFireManager::StartFire(CVector, float, uint8) { EAXJMP(0x479500); }
+WRAPPER int32 CFireManager::StartScriptFire(const CVector& pos, CEntity* culprit, float, uint8) { EAXJMP(0x479E60); }
+WRAPPER bool CFireManager::IsScriptFireExtinguish(int16) { EAXJMP(0x479FC0); }
+WRAPPER void CFireManager::RemoveScriptFire(int16) { EAXJMP(0x479FE0); }
+WRAPPER void CFireManager::RemoveAllScriptFires(void) { EAXJMP(0x47A000); }
+WRAPPER void CFireManager::SetScriptFireAudio(int16, bool) { EAXJMP(0x47A040); }
+
STARTPATCHES
InjectHook(0x479DB0, &CFireManager::ExtinguishPoint, PATCH_JUMP);
InjectHook(0x479340, &CFireManager::FindNearestFire, PATCH_JUMP);
-ENDPATCHES \ No newline at end of file
+ENDPATCHES
+
diff --git a/src/core/Fire.h b/src/core/Fire.h
index e0ad7cdf..cd6de90c 100644
--- a/src/core/Fire.h
+++ b/src/core/Fire.h
@@ -31,11 +31,17 @@ class CFireManager
CFire m_aFires[NUM_FIRES];
public:
void StartFire(CEntity *entityOnFire, CEntity *culprit, float, uint32);
+ void StartFire(CVector, float, uint8);
void Update(void);
CFire *FindFurthestFire_NeverMindFireMen(CVector coors, float, float);
CFire *FindNearestFire(CVector, float*);
- void ExtinguishPoint(CVector, float);
-
uint32 GetTotalActiveFires() const { return m_nTotalFires; }
+ void ExtinguishPoint(CVector, float);
+ int32 StartScriptFire(const CVector& pos, CEntity* culprit, float, uint8);
+ bool IsScriptFireExtinguish(int16);
+ void RemoveScriptFire(int16);
+ void RemoveAllScriptFires(void);
+ void SetScriptFireAudio(int16, bool);
+ void ExtinguishPoint(CVector, float);
};
extern CFireManager &gFireManager;
diff --git a/src/core/Stats.cpp b/src/core/Stats.cpp
index aa3f21a9..17c3d9d7 100644
--- a/src/core/Stats.cpp
+++ b/src/core/Stats.cpp
@@ -14,6 +14,21 @@ int32 &CStats::TimesArrested = *(int32*)0x8E2BEC;
int32 &CStats::KillsSinceLastCheckpoint = *(int32*)0x8F2C8C;
int32& CStats::DistanceTravelledInVehicle = *(int32*)0x940574;
int32& CStats::DistanceTravelledOnFoot = *(int32*)0x941518;
+int32 &CStats::ProgressMade = *(int32*)0x8F6224;
+int32 &CStats::TotalProgressInGame = *(int32*)0x885B2C;
+float &CStats::MaximumJumpDistance = *(float*)0x8F2BDC;
+float &CStats::MaximumJumpHeight = *(float*)0x940564;
+int32 &CStats::MaximumJumpFlips = *(int32*)0x8F2524;
+int32 &CStats::MaximumJumpSpins = *(int32*)0x8F29B0;
+int32 &CStats::BestStuntJump = *(int32*)0x885B50;
+int32 &CStats::NumberOfUniqueJumpsFound = *(int32*)0x885B74;
+int32 &CStats::TotalNumberOfUniqueJumps = *(int32*)0x8E2DC0;
+int32 &CStats::PassengersDroppedOffWithTaxi = *(int32*)0x940724;
+int32 &CStats::MoneyMadeWithTaxi = *(int32*)0x941544;
+int32 &CStats::MissionsGiven = *(int32*)0x9430E8;
+int32 &CStats::MissionsPassed = *(int32*)0x940768;
+char(&CStats::LastMissionPassedName)[8] = *(char(*)[8])*(uintptr*)0x70D828;
+int32 &CStats::TotalLegitimateKills = *(int32*)0x8F6004;
void CStats::AnotherKillFrenzyPassed()
{
diff --git a/src/core/Stats.h b/src/core/Stats.h
index 13f97218..add4320b 100644
--- a/src/core/Stats.h
+++ b/src/core/Stats.h
@@ -16,8 +16,24 @@ public:
static int32 &KillsSinceLastCheckpoint;
static int32 &DistanceTravelledInVehicle;
static int32 &DistanceTravelledOnFoot;
+ static int32 &ProgressMade;
+ static int32 &TotalProgressInGame;
+ static float &MaximumJumpDistance;
+ static float &MaximumJumpHeight;
+ static int32 &MaximumJumpFlips;
+ static int32 &MaximumJumpSpins;
+ static int32 &BestStuntJump;
+ static int32 &NumberOfUniqueJumpsFound;
+ static int32 &TotalNumberOfUniqueJumps;
+ static int32 &PassengersDroppedOffWithTaxi;
+ static int32 &MoneyMadeWithTaxi;
+ static int32 &MissionsGiven;
+ static int32 &MissionsPassed;
+ static char (&LastMissionPassedName)[8];
+ static int32 &TotalLegitimateKills;
public:
static void AnotherKillFrenzyPassed();
static void CheckPointReachedUnsuccessfully() { KillsSinceLastCheckpoint = 0; };
+ static void CheckPointReachedSuccessfully() { TotalLegitimateKills += KillsSinceLastCheckpoint; KillsSinceLastCheckpoint = 0; };
}; \ No newline at end of file