Struct that defines one particular event with all its callbacks and data. More...
#include <e_main.h>
Data Fields | |
const event_t | type |
The type of this event. | |
const char * | name |
the name of this event (e.g. for logs) | |
const char * | formatString |
The format string that is used to write and parse this event. | |
void(* | eventCallback )(const struct eventRegister_s *self, struct dbuffer *msg) |
Callback that is executing the event. | |
int(* | timeCallback )(const struct eventRegister_s *self, struct dbuffer *msg, const int dt) |
Callback that is returning the time that is needed to execute this event. | |
qboolean(* | eventCheck )(const struct eventRegister_s *self, const struct dbuffer *msg) |
Called to determine if this event is ok to run at this point. Should check any conflicts with other ongoing events (see le_t->locked ). |
Struct that defines one particular event with all its callbacks and data.
Definition at line 31 of file e_main.h.
void(* eventRegister_s::eventCallback)(const struct eventRegister_s *self, struct dbuffer *msg) |
Callback that is executing the event.
self | A pointer to this struct | |
msg | The buffer with the event data |
Referenced by CL_ExecuteBattlescapeEvent(), and CL_ParseEvent().
qboolean(* eventRegister_s::eventCheck)(const struct eventRegister_s *self, const struct dbuffer *msg) |
Called to determine if this event is ok to run at this point. Should check any conflicts with other ongoing events (see le_t->locked
).
true
if OK to run, false
if not. Referenced by CL_CheckBattlescapeEvent().
const char* eventRegister_s::formatString |
The format string that is used to write and parse this event.
Definition at line 43 of file e_main.h.
Referenced by CL_GetEventTime(), CL_NetReceiveItem(), and CL_NetSendItem().
const char* eventRegister_s::name |
the name of this event (e.g. for logs)
Definition at line 39 of file e_main.h.
Referenced by CL_ExecuteBattlescapeEvent(), CL_GetEventTime(), CL_LogEvent(), and CL_ParseEvent().
int(* eventRegister_s::timeCallback)(const struct eventRegister_s *self, struct dbuffer *msg, const int dt) |
Callback that is returning the time that is needed to execute this event.
self | A pointer to this struct | |
msg | The buffer with the event data | |
dt | The delta time value |
Referenced by CL_GetEventTime().
const event_t eventRegister_s::type |