UFO: Alien Invasion
Doxygen documentation generating
e_main.h
Go to the documentation of this file.
1 
5 /*
6 Copyright (C) 2002-2023 UFO: Alien Invasion.
7 
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12 
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16 
17 See the GNU General Public License for more details.
18 
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 
23 */
24 
25 #pragma once
26 
27 class dbuffer;
28 
30 typedef struct eventTiming_s {
31  int nextTime;
32  int shootTime;
33  int impactTime;
35  bool parsedDeath;
36  bool parsedShot;
38 
42 typedef struct eventRegister_s {
46  const event_t type;
50  const char* name;
54  const char* formatString;
60  void (*eventCallback)(const struct eventRegister_s* self, dbuffer* msg);
67  int (*timeCallback)(const struct eventRegister_s* self, dbuffer* msg, eventTiming_t* eventTiming);
68 
74  bool (*eventCheck)(const struct eventRegister_s* self, const dbuffer* msg);
76 
77 const eventRegister_t* CL_GetEvent(const event_t eType);
78 int CL_GetNextTime(const eventRegister_t* event, eventTiming_t* eventTiming, int nextTime);
79 int CL_GetStepTime(const eventTiming_t* eventTiming, const le_t* le, int step);
80 const char* CL_ConvertSoundFromEvent(char* sound, size_t size);
const char * formatString
The format string that is used to write and parse this event.
Definition: e_main.h:54
const event_t type
The type of this event.
Definition: e_main.h:46
voidpf void uLong size
Definition: ioapi.h:42
typedef int(ZCALLBACK *close_file_func) OF((voidpf opaque
int impactTime
Definition: e_main.h:33
int nextTime
Definition: e_main.h:31
a local entity
bool parsedShot
Definition: e_main.h:36
event_t
Possible event values.
Definition: q_shared.h:79
const char * name
the name of this event (e.g. for logs)
Definition: e_main.h:50
QGL_EXTERN void(APIENTRY *qglActiveTexture)(GLenum texture)
const eventRegister_t * CL_GetEvent(const event_t eType)
Definition: e_main.cpp:157
int CL_GetStepTime(const eventTiming_t *eventTiming, const le_t *le, int step)
Calculates the time when the given step was executed in the event chain.
Definition: e_main.cpp:177
CL_ParseEvent timers and vars.
Definition: e_main.h:30
bool parsedDeath
Definition: e_main.h:35
const char * CL_ConvertSoundFromEvent(char *sound, size_t size)
Some sound strings may end on a '+' to indicate to use a random sound which can be identified by repl...
Definition: e_main.cpp:219
int CL_GetNextTime(const eventRegister_t *event, eventTiming_t *eventTiming, int nextTime)
Definition: e_main.cpp:203
Struct that defines one particular event with all its callbacks and data.
Definition: e_main.h:42
int shootTime
Definition: e_main.h:32