summaryrefslogtreecommitdiffstats
path: root/src/control
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-06-28 12:34:02 +0200
committeraap <aap@papnet.eu>2019-06-28 12:34:02 +0200
commit847720aeae362868d8a3fa2681ef71f2c417399a (patch)
tree7845917dccc4f33b158e64ee458ac143b94efaa9 /src/control
parentMerge pull request #59 from Nick007J/master (diff)
downloadre3-847720aeae362868d8a3fa2681ef71f2c417399a.tar
re3-847720aeae362868d8a3fa2681ef71f2c417399a.tar.gz
re3-847720aeae362868d8a3fa2681ef71f2c417399a.tar.bz2
re3-847720aeae362868d8a3fa2681ef71f2c417399a.tar.lz
re3-847720aeae362868d8a3fa2681ef71f2c417399a.tar.xz
re3-847720aeae362868d8a3fa2681ef71f2c417399a.tar.zst
re3-847720aeae362868d8a3fa2681ef71f2c417399a.zip
Diffstat (limited to '')
-rw-r--r--src/control/CarCtrl.cpp5
-rw-r--r--src/control/CarCtrl.h3
-rw-r--r--src/control/Gangs.cpp8
-rw-r--r--src/control/Gangs.h36
-rw-r--r--src/control/Population.cpp3
-rw-r--r--src/control/Population.h8
-rw-r--r--src/control/Record.h6
7 files changed, 43 insertions, 26 deletions
diff --git a/src/control/CarCtrl.cpp b/src/control/CarCtrl.cpp
index 4ce856f7..fe5b6dab 100644
--- a/src/control/CarCtrl.cpp
+++ b/src/control/CarCtrl.cpp
@@ -5,5 +5,6 @@
int &CCarCtrl::NumLawEnforcerCars = *(int*)0x8F1B38;
WRAPPER void CCarCtrl::SwitchVehicleToRealPhysics(CVehicle*) { EAXJMP(0x41F7F0); }
-WRAPPER void CCarCtrl::AddToCarArray(int id, int vehclass) { EAXJMP(0x4182F0); }
-WRAPPER void CCarCtrl::UpdateCarCount(CVehicle*, bool) { EAXJMP(0x4202E0); } \ No newline at end of file
+WRAPPER void CCarCtrl::AddToCarArray(int32 id, int32 vehclass) { EAXJMP(0x4182F0); }
+WRAPPER void CCarCtrl::UpdateCarCount(CVehicle*, bool) { EAXJMP(0x4202E0); }
+WRAPPER int32 CCarCtrl::ChooseCarModel(int32 vehclass) { EAXJMP(0x418110); }
diff --git a/src/control/CarCtrl.h b/src/control/CarCtrl.h
index cc9327ee..27ea6293 100644
--- a/src/control/CarCtrl.h
+++ b/src/control/CarCtrl.h
@@ -6,8 +6,9 @@ class CCarCtrl
{
public:
static void SwitchVehicleToRealPhysics(CVehicle*);
- static void AddToCarArray(int id, int vehclass);
+ static void AddToCarArray(int32 id, int32 vehclass);
static void UpdateCarCount(CVehicle*, bool);
+ static int32 ChooseCarModel(int32 vehclass);
static int32 &NumLawEnforcerCars;
};
diff --git a/src/control/Gangs.cpp b/src/control/Gangs.cpp
index 80ecd816..fc77ad72 100644
--- a/src/control/Gangs.cpp
+++ b/src/control/Gangs.cpp
@@ -1,9 +1,17 @@
#include "common.h"
#include "patcher.h"
+#include "ModelIndices.h"
#include "Gangs.h"
CGangInfo(&CGangs::Gang)[NUM_GANGS] = *(CGangInfo(*)[9])*(uintptr*)0x6EDF78;
+CGangInfo::CGangInfo() :
+ m_nVehicleMI(MI_BUS),
+ m_nPedModelOverride(-1),
+ m_Weapon1(WEAPONTYPE_UNARMED),
+ m_Weapon2(WEAPONTYPE_UNARMED)
+{}
+
void CGangs::Initialize(void)
{
Gang[GANG_MAFIA].m_nVehicleMI = MI_MAFIA;
diff --git a/src/control/Gangs.h b/src/control/Gangs.h
index db14ca64..2366614b 100644
--- a/src/control/Gangs.h
+++ b/src/control/Gangs.h
@@ -1,8 +1,6 @@
#pragma once
-#include "common.h"
#include "Weapon.h"
-#include "ModelIndices.h"
struct CGangInfo
{
@@ -13,31 +11,27 @@ struct CGangInfo
eWeaponType m_Weapon1;
eWeaponType m_Weapon2;
- CGangInfo() :
- m_nVehicleMI(MI_BUS),
- m_nPedModelOverride(-1),
- m_Weapon1(WEAPONTYPE_UNARMED),
- m_Weapon2(WEAPONTYPE_UNARMED)
- {}
+ CGangInfo();
};
static_assert(sizeof(CGangInfo) == 0x10, "CGangInfo: error");
+enum {
+ GANG_MAFIA = 0,
+ GANG_TRIAD,
+ GANG_DIABLOS,
+ GANG_YAKUZA,
+ GANG_YARDIE,
+ GANG_COLUMB,
+ GANG_HOODS,
+ GANG_7,
+ GANG_8,
+ NUM_GANGS
+};
+
class CGangs
{
public:
- enum {
- GANG_MAFIA = 0,
- GANG_TRIAD,
- GANG_DIABLOS,
- GANG_YAKUZA,
- GANG_YARDIE,
- GANG_COLUMB,
- GANG_HOODS,
- GANG_7,
- GANG_8,
- NUM_GANGS
- };
static void Initialize(void);
static void SetGangVehicleModel(int16, int);
static void SetGangWeapons(int16, eWeaponType, eWeaponType);
@@ -45,9 +39,9 @@ public:
static int8 GetGangPedModelOverride(int16);
static void SaveAllGangData(uint8 *, uint32 *);
static void LoadAllGangData(uint8 *, uint32);
+ static CGangInfo* GetGangInfo(int16 gang) { return &Gang[gang]; }
private:
- static CGangInfo* GetGangInfo(int16 gang) { return &Gang[gang]; }
static CGangInfo(&Gang)[NUM_GANGS];
};
diff --git a/src/control/Population.cpp b/src/control/Population.cpp
index ebb48a93..fd1a89f5 100644
--- a/src/control/Population.cpp
+++ b/src/control/Population.cpp
@@ -2,6 +2,7 @@
#include "patcher.h"
#include "Population.h"
+PedGroup *CPopulation::ms_pPedGroups = (PedGroup*)0x6E9248;
bool &CPopulation::ms_bGivePedsWeapons = *(bool*)0x95CCF6;
-WRAPPER void CPopulation::UpdatePedCount(uint32, bool) { EAXJMP(0x4F5A60); } \ No newline at end of file
+WRAPPER void CPopulation::UpdatePedCount(uint32, bool) { EAXJMP(0x4F5A60); }
diff --git a/src/control/Population.h b/src/control/Population.h
index a5572cdb..76442442 100644
--- a/src/control/Population.h
+++ b/src/control/Population.h
@@ -2,10 +2,16 @@
#include "PedType.h"
+struct PedGroup
+{
+ int32 models[8];
+};
+
class CPopulation
{
public:
+ static PedGroup *ms_pPedGroups; //[31]
static bool &ms_bGivePedsWeapons;
static void UpdatePedCount(uint32, bool);
-}; \ No newline at end of file
+};
diff --git a/src/control/Record.h b/src/control/Record.h
index 2b904d1d..2705a955 100644
--- a/src/control/Record.h
+++ b/src/control/Record.h
@@ -1,5 +1,11 @@
#pragma once
+enum {
+ RECORDSTATE_0,
+ RECORDSTATE_1,
+ RECORDSTATE_2,
+};
+
class CRecordDataForGame
{
public: