e_parse.c File Reference

#include "../../client.h"
#include "e_parse.h"
#include "e_time.h"
#include "e_main.h"
#include "../cl_localentity.h"
#include "../../cl_screen.h"
#include "../../cl_game.h"
#include "../../cl_team.h"
#include "../cl_particle.h"
#include "../cl_actor.h"
#include "../cl_view.h"
#include "../cl_hud.h"
#include "../../ui/ui_main.h"
#include "../../renderer/r_mesh_anim.h"
Include dependency graph for e_parse.c:

Go to the source code of this file.

Data Structures

struct  evTimes_s

Typedefs

typedef struct evTimes_s evTimes_t

Functions

static void CL_LogEvent (const eventRegister_t *eventData)
void CL_BlockBattlescapeEvents (qboolean block)
 Adds the ability to block battlescape event execution until something other is finished. E.g. camera movement.
static qboolean CL_AreBattlescapeEventsBlocked (void)
static qboolean CL_CheckBattlescapeEvent (int now, void *data)
 Checks if a given battlescape event is ok to run now. Uses the check_func pointer in the event struct.
static void CL_ExecuteBattlescapeEvent (int now, void *data)
static void CL_FreeBattlescapeEvent (void *data)
static qboolean CL_FilterBattlescapeEvents (int when, event_func *func, event_check_func *check, void *data)
void CL_ClearBattlescapeEvents (void)
void CL_ParseEvent (struct dbuffer *msg)
 Called in case a svc_event was send via the network buffer.

Variables

cvar_tcl_log_battlescape_events

Detailed Description

Event format identifiers

id | type | length (bytes) ====================================== c | char | 1 b | byte | 1 s | short | 2 l | long | 4 p | pos | 6 (map boundaries - (-MAX_WORLD_WIDTH) - (MAX_WORLD_WIDTH)) g | gpos | 3 d | dir | 1 a | angle | 1 & | string | x ! | do not read the next id | 1 * | pascal string type - SIZE+DATA, SIZE can be read from va_arg | 2 + sizeof(DATA)

Definition in file e_parse.c.


Typedef Documentation

typedef struct evTimes_s evTimes_t

Function Documentation

static qboolean CL_AreBattlescapeEventsBlocked ( void   )  [static]
Returns:
if the client interrupts the event execution, this is true

Definition at line 104 of file e_parse.c.

References cl.

Referenced by CL_CheckBattlescapeEvent().

void CL_BlockBattlescapeEvents ( qboolean  block  ) 

Adds the ability to block battlescape event execution until something other is finished. E.g. camera movement.

Parameters:
block true to block the execution of other events until you unblock the event execution again, false to unblock the event execution.

Definition at line 96 of file e_parse.c.

References cl.

Referenced by CL_CameraMove(), and CL_CameraRoute().

static qboolean CL_CheckBattlescapeEvent ( int  now,
void *  data 
) [static]

Checks if a given battlescape event is ok to run now. Uses the check_func pointer in the event struct.

Parameters:
now The current time.
data The event to check.
Returns:
true if it's ok to run or there is no check function, false otherwise.

Definition at line 116 of file e_parse.c.

References CL_AreBattlescapeEventsBlocked(), CL_GetEvent(), eventRegister_s::eventCheck, qfalse, and qtrue.

Referenced by CL_ParseEvent().

void CL_ClearBattlescapeEvents ( void   ) 

Definition at line 168 of file e_parse.c.

References CL_FilterBattlescapeEvents(), and CL_FilterEventQueue().

Referenced by CL_Disconnect().

static void CL_ExecuteBattlescapeEvent ( int  now,
void *  data 
) [static]
static qboolean CL_FilterBattlescapeEvents ( int  when,
event_func func,
event_check_func check,
void *  data 
) [static]

Definition at line 163 of file e_parse.c.

References CL_ExecuteBattlescapeEvent().

Referenced by CL_ClearBattlescapeEvents().

static void CL_FreeBattlescapeEvent ( void *  data  )  [static]

Definition at line 156 of file e_parse.c.

References free_dbuffer(), and Mem_Free.

Referenced by CL_ParseEvent().

static void CL_LogEvent ( const eventRegister_t eventData  )  [static]
void CL_ParseEvent ( struct dbuffer msg  ) 

Variable Documentation

Definition at line 56 of file e_parse.c.

Referenced by CL_InitLocal().


Generated by  doxygen 1.6.2