UFO: Alien Invasion
Toggle main menu visibility
Loading...
Searching...
No Matches
e_main.h
Go to the documentation of this file.
1
4
5
/*
6
Copyright (C) 2002-2025 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
;
37
}
eventTiming_t
;
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);
75
}
eventRegister_t
;
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
);
dbuffer
Definition
dbuffer.h:20
CL_ConvertSoundFromEvent
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
CL_GetEvent
const eventRegister_t * CL_GetEvent(const event_t eType)
Definition
e_main.cpp:157
CL_GetStepTime
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_GetNextTime
int CL_GetNextTime(const eventRegister_t *event, eventTiming_t *eventTiming, int nextTime)
Definition
e_main.cpp:203
size
voidpf void uLong size
Definition
ioapi.h:42
int
typedef int(ZCALLBACK *close_file_func) OF((voidpf opaque
event_t
event_t
Possible event values.
Definition
q_shared.h:79
void
QGL_EXTERN void(APIENTRY *qglActiveTexture)(GLenum texture)
eventRegister_t
Struct that defines one particular event with all its callbacks and data.
Definition
e_main.h:42
eventRegister_t::eventCallback
void(* eventCallback)(const struct eventRegister_s *self, dbuffer *msg)
Callback that is executing the event.
Definition
e_main.h:60
eventRegister_t::eventCheck
bool(* eventCheck)(const struct eventRegister_s *self, const dbuffer *msg)
Called to determine if this event is ok to run at this point. Should check any conflicts with other o...
Definition
e_main.h:74
eventRegister_t::name
const char * name
the name of this event (e.g. for logs)
Definition
e_main.h:50
eventRegister_t::formatString
const char * formatString
The format string that is used to write and parse this event.
Definition
e_main.h:54
eventRegister_t::timeCallback
int(* timeCallback)(const struct eventRegister_s *self, dbuffer *msg, eventTiming_t *eventTiming)
Callback that is returning the time that is needed to execute this event.
Definition
e_main.h:67
eventRegister_t::type
const event_t type
The type of this event.
Definition
e_main.h:46
eventTiming_t
CL_ParseEvent timers and vars.
Definition
e_main.h:30
eventTiming_t::shootTime
int shootTime
Definition
e_main.h:32
eventTiming_t::nextTime
int nextTime
Definition
e_main.h:31
eventTiming_t::impactTime
int impactTime
Definition
e_main.h:33
eventTiming_t::parsedDeath
bool parsedDeath
Definition
e_main.h:35
eventTiming_t::parsedShot
bool parsedShot
Definition
e_main.h:36
le_t
a local entity
Definition
cl_localentity.h:65
src
client
battlescape
events
e_main.h
Generated on __DATE__ __TIME__ for UFO: Alien Invasion by
1.17.0