27 #ifndef ICB_EVENTLIST_H_INCLUDED 28 #define ICB_EVENTLIST_H_INCLUDED 30 #include "engines/icb/string_vest.h" 31 #include "engines/icb/common/px_string.h" 32 #include "engines/icb/string_vest.h" 37 extern const char *global_event_deleted_placeholder;
38 extern const char *global_event_generic;
39 extern const char *global_event_line_of_sight;
40 extern const char *global_event_sound;
41 extern const char *global_event_on_camera;
42 extern const char *global_event_off_camera;
43 extern const char *global_event_logic_rerun;
44 extern const char *global_event_out_of_sight;
45 extern const char *global_event_lift_ascend;
46 extern const char *global_event_lift_descend;
49 #define EVENT_DELETED_PLACEHOLDER global_event_deleted_placeholder 52 #define EVENT_LINE_OF_SIGHT global_event_line_of_sight 53 #define EVENT_OUT_OF_SIGHT global_event_out_of_sight 55 #define EVENT_ON_CAMERA global_event_on_camera 56 #define EVENT_OFF_CAMERA global_event_off_camera 58 #define EVENT_LIFT_ASCEND global_event_lift_ascend 59 #define EVENT_LIFT_DESCEND global_event_lift_descend 61 #define EVENT_LOGIC_RERUN global_event_logic_rerun 64 #define EVENT_MAX_EVENTS_REGISTERED 20 67 #define EVENT_INVALID_SENDER_ID (-1) 70 const char *s_pcEventName;
71 int32 s_nLastSenderID;
77 s_pcEventName = EVENT_DELETED_PLACEHOLDER;
78 s_nLastSenderID = EVENT_INVALID_SENDER_ID;
84 s_pcEventName = oX.s_pcEventName;
85 s_nLastSenderID = oX.s_nLastSenderID;
86 s_bPending = oX.s_bPending;
90 s_pcEventName = oOpB.s_pcEventName;
91 s_nLastSenderID = oOpB.s_nLastSenderID;
92 s_bPending = oOpB.s_bPending;
114 void SetNewObjectName(
const char *pcObjectName);
117 const char *GetObjectName()
const {
return (m_pcObjectName); }
120 inline bool8 HasEventPending();
123 bool8 CheckEventWaiting(
const char *pcEventName);
126 bool8 IsEventInList(
const char *pcEventName)
const;
129 void AddEventForObject(
const char *pcEventName);
130 void RemoveEventForObject(
const char *pcEventName);
131 inline void RemoveAllEventsForObject();
132 bool8 DidObjectSendLastNamedEvent(uint32 nObjectID,
const char *pcEventName)
const;
133 int32 GetIDOfLastObjectToPostEvent(
const char *pcEventName)
const;
134 bool8 PostNamedEvent(
const char *pcEventName, int32 nSenderID);
135 void ClearAllOutstandingEvents();
138 const char *m_pcObjectName;
139 _event m_pNamedEventList[EVENT_MAX_EVENTS_REGISTERED];
140 uint8 m_nNumNamedEventsPending;
141 uint8 m_nNumRegisteredEvents;
142 bool8 m_bEventPending;
149 inline _event_list::_event_list() {
151 m_pcObjectName = EVENT_DELETED_PLACEHOLDER;
154 inline void _event_list::SetNewObjectName(
const char *pcObjectName) {
156 m_pcObjectName = pcObjectName;
159 inline bool8 _event_list::HasEventPending() {
167 bRetVal = m_bEventPending;
168 m_bEventPending = FALSE8;
172 inline void _event_list::RemoveAllEventsForObject() { Initialise(); }
176 #endif // #ifndef EVENTLIST_H_INCLUDED
Definition: event_list.h:101
Definition: event_list.h:69