summaryrefslogtreecommitdiffstats
path: root/src/control/Script.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/control/Script.h')
-rw-r--r--src/control/Script.h38
1 files changed, 35 insertions, 3 deletions
diff --git a/src/control/Script.h b/src/control/Script.h
index 7fc18727..91eef6d2 100644
--- a/src/control/Script.h
+++ b/src/control/Script.h
@@ -10,6 +10,7 @@ class CVehicle;
class CPed;
class CObject;
class CPlayerInfo;
+enum eObjective;
class CRunningScript;
@@ -38,6 +39,10 @@ void FlushLog();
#define KEY_LENGTH_IN_SCRIPT 8
+#if GTA_VERSION <= GTA_PS2_160
+#define GTA_SCRIPT_COLLECTIVE
+#endif
+
struct intro_script_rectangle
{
bool m_bIsUsed;
@@ -213,8 +218,8 @@ enum {
struct tCollectiveData
{
- int32 index;
- uint32 unk_data;
+ int32 colIndex;
+ int32 pedIndex;
};
enum {
@@ -286,7 +291,7 @@ class CTheScripts
static bool StoreVehicleWasRandom;
static CRunningScript *pIdleScripts;
static CRunningScript *pActiveScripts;
- static uint32 NextFreeCollectiveIndex;
+ static int32 NextFreeCollectiveIndex;
static int32 LastRandomPedId;
static uint16 NumberOfUsedObjects;
static bool bAlreadyRunningAMissionScript;
@@ -393,6 +398,25 @@ private:
static int32 GetNewUniqueScriptSphereIndex(int32 index);
static void RemoveScriptSphere(int32 index);
+#ifdef GTA_SCRIPT_COLLECTIVE
+ static void AdvanceCollectiveIndex()
+ {
+ if (NextFreeCollectiveIndex == INT32_MAX)
+ NextFreeCollectiveIndex = 0;
+ else
+ NextFreeCollectiveIndex++;
+ }
+
+ static int AddPedsInVehicleToCollective(int);
+ static int AddPedsInAreaToCollective(float, float, float, float);
+ static int FindFreeSlotInCollectiveArray();
+ static void SetObjectiveForAllPedsInCollective(int, eObjective, int16, int16);
+ static void SetObjectiveForAllPedsInCollective(int, eObjective, CVector, float);
+ static void SetObjectiveForAllPedsInCollective(int, eObjective, CVector);
+ static void SetObjectiveForAllPedsInCollective(int, eObjective, void*);
+ static void SetObjectiveForAllPedsInCollective(int, eObjective);
+#endif
+
friend class CRunningScript;
friend class CHud;
friend void CMissionCleanup::Process();
@@ -511,6 +535,14 @@ private:
void CharInAreaCheckCommand(int32, uint32*);
void CarInAreaCheckCommand(int32, uint32*);
+#ifdef GTA_SCRIPT_COLLECTIVE
+ void LocateCollectiveCommand(int32, uint32*);
+ void LocateCollectiveCharCommand(int32, uint32*);
+ void LocateCollectiveCarCommand(int32, uint32*);
+ void LocateCollectivePlayerCommand(int32, uint32*);
+ void CollectiveInAreaCheckCommand(int32, uint32*);
+#endif
+
#ifdef MISSION_REPLAY
bool CanAllowMissionReplay();
#endif