summaryrefslogtreecommitdiffstats
path: root/src/core/EventList.h
diff options
context:
space:
mode:
authorFire_Head <Fire-Head@users.noreply.github.com>2019-07-24 20:00:08 +0200
committerGitHub <noreply@github.com>2019-07-24 20:00:08 +0200
commit81ee1c509a8d05189901dd59c268bf47a6188eb8 (patch)
treed836f70678f2ce7b5d86a6745f34b45232ff71d0 /src/core/EventList.h
parentupdate (diff)
parentMerge branch 'master' into master (diff)
downloadre3-81ee1c509a8d05189901dd59c268bf47a6188eb8.tar
re3-81ee1c509a8d05189901dd59c268bf47a6188eb8.tar.gz
re3-81ee1c509a8d05189901dd59c268bf47a6188eb8.tar.bz2
re3-81ee1c509a8d05189901dd59c268bf47a6188eb8.tar.lz
re3-81ee1c509a8d05189901dd59c268bf47a6188eb8.tar.xz
re3-81ee1c509a8d05189901dd59c268bf47a6188eb8.tar.zst
re3-81ee1c509a8d05189901dd59c268bf47a6188eb8.zip
Diffstat (limited to 'src/core/EventList.h')
-rw-r--r--src/core/EventList.h67
1 files changed, 67 insertions, 0 deletions
diff --git a/src/core/EventList.h b/src/core/EventList.h
new file mode 100644
index 00000000..9f5756be
--- /dev/null
+++ b/src/core/EventList.h
@@ -0,0 +1,67 @@
+#pragma once
+
+class CEntity;
+class CPed;
+
+enum eEventType
+{
+ EVENT_NULL,
+ EVENT_ASSAULT,
+ EVENT_RUN_REDLIGHT,
+ EVENT_ASSAULT_POLICE,
+ EVENT_GUNSHOT,
+ EVENT_INJURED_PED,
+ EVENT_DEAD_PED,
+ EVENT_FIRE,
+ EVENT_STEAL_CAR,
+ EVENT_HIT_AND_RUN,
+ EVENT_HIT_AND_RUN_COP,
+ EVENT_SHOOT_PED,
+ EVENT_SHOOT_COP,
+ EVENT_EXPLOSION,
+ EVENT_PED_SET_ON_FIRE,
+ EVENT_COP_SET_ON_FIRE,
+ EVENT_CAR_SET_ON_FIRE,
+ EVENT_ASSAULT_NASTYWEAPON,
+ EVENT_ASSAULT_NASTYWEAPON_POLICE,
+ EVENT_ICECREAM,
+ EVENT_ATM,
+ EVENT_SHOPSTALL,
+ EVENT_SHOPWINDOW,
+ EVENT_LAST_EVENT
+};
+
+enum eEventEntity
+{
+ EVENT_ENTITY_NONE,
+ EVENT_ENTITY_PED,
+ EVENT_ENTITY_VEHICLE,
+ EVENT_ENTITY_OBJECT
+};
+
+struct CEvent
+{
+ eEventType type;
+ eEventEntity entityType;
+ int32 entityRef;
+ CPed *criminal;
+ CVector posn;
+ uint32 timeout;
+ int32 state;
+};
+
+class CEventList
+{
+ static int32 ms_nFirstFreeSlotIndex;
+public:
+ static void Initialise(void);
+ static void Update(void);
+ static void RegisterEvent(eEventType type, eEventEntity entityType, CEntity *ent, CPed *criminal, int32 timeout);
+ static void RegisterEvent(eEventType type, CVector posn, int32 timeout);
+ static bool GetEvent(eEventType type, int32 *event);
+ static void ClearEvent(int32 event);
+ static bool FindClosestEvent(eEventType type, CVector posn, int32 *event);
+ static void ReportCrimeForEvent(eEventType type, int32, bool);
+};
+
+extern CEvent *gaEvent; \ No newline at end of file