31#include "../common/tracing.h"
32#include "../common/grid.h"
33#include "../common/cvar.h"
35#define GAME_API_VERSION 10
77typedef struct client_persistent_s {
92 inline void setLastActor(
Actor* lastActor) {
95 inline Actor* getLastActor() {
117 client_persistent_t pers;
119 inline void reset () {
122 inline bool isInUse ()
const {
125 inline void setInUse (
bool inuse) {
128 inline int getNum (
void)
const {
131 inline void setNum (
int num) {
134 inline bool isReady ()
const {
137 inline void setReady (
bool ready) {
140 inline int getTeam (
void)
const {
143 inline void setTeam (
int team) {
173typedef struct game_import_s {
268 void (
IMPORT* QueueEvent) (
unsigned int mask,
int eType,
int entnum);
288 bool (
IMPORT* GetConstIntFromNamespace) (
const char* space,
const char*
name,
int* value);
299 void (
IMPORT* FreeTags) (
int tag,
const char* file,
int line);
304 const
char* (
IMPORT* Cvar_String) (const
char* varName);
317typedef struct game_export_s {
327 void (
EXPORT* SpawnEntities) (
const char* mapname,
bool day,
const char* entstring);
void setInUse(bool inuse)
void setReady(bool ready)
const char * Cmd_Argv(int arg)
Returns a given argument.
const char * Cmd_Args(void)
Returns a single string containing argv(1) to argv(argc()-1)
int Cmd_Argc(void)
Return the number of arguments of the current command. "command parameter" will result in a argc of 2...
int FS_LoadFile(const char *path, byte **buffer)
Filenames are relative to the quake search path.
void FS_FreeFile(void *buffer)
game_export_t * GetGameAPI(game_import_t *import)
Returns a pointer to the structure with all entry points and global variables.
solid_t
edict->solid values
typedef int(ZCALLBACK *close_file_func) OF((voidpf opaque
void format(__printf__, 1, 2)))
QGL_EXTERN void(APIENTRY *qglActiveTexture)(GLenum texture)
QGL_EXTERN GLuint GLsizei GLsizei * length
QGL_EXTERN GLuint GLsizei GLsizei GLint GLenum GLchar * name
Interface to game library.
Describes a character with all its attributes.
The csi structure is the client-server-information structure which contains all the static data neede...
This is a cvar definition. Cvars can be user modified and used in our menus e.g.
A list of locations that cannot be moved to.
functions exported by the game subsystem
void(EXPORT *ServerCommand)(void)
void(EXPORT *ClientInitActorStates)(const player_t &client)
void(EXPORT *ClientEndRound)(player_t &client)
void(EXPORT *ClientStartMatch)(player_t &client)
bool(EXPORT *ClientIsReady)(const player_t *client)
int(EXPORT *ClientGetActiveTeam)(void)
void(EXPORT *ClientCommand)(player_t &client)
bool(EXPORT *RunFrame)(void)
void(EXPORT *ClientDisconnect)(player_t &client)
void(EXPORT *Shutdown)(void)
void(EXPORT *ClientTeamInfo)(const player_t &client)
int(EXPORT *ClientAction)(player_t &client)
bool(EXPORT *ClientBegin)(player_t &client)
int(EXPORT *ClientGetTeamNum)(const player_t &client)
bool(EXPORT *ClientConnect)(player_t *client
const char *EXPORT * ClientGetName(int pnum)
functions provided by the main engine
bool(IMPORT *isOnMap)(const vec3_t vec)
int(IMPORT *GetEvent)(void)
void(IMPORT *EndEvents)(void)
void(IMPORT *WriteDir)(const vec3_t pos)
__attribute__((format(__printf__, 1, 2)))
const vec3_t const vec3_t angles
void(IMPORT *QueueWriteByte)(byte c)
void(IMPORT *QueueEvent)(unsigned int mask
bool(IMPORT *GridShouldUseAutostand)(const pathing_t *path
void(IMPORT *UnlinkEdict)(edict_t *ent)
int(IMPORT *ReadString)(char *str
edict_t *IMPORT * GetEventEdict(void)
float(IMPORT *GetVisibility)(const pos3_t position)
void(IMPORT *ReadDir)(vec3_t vector)
void(IMPORT *LinkEdict)(edict_t *ent)
int(IMPORT *PointContents)(const vec3_t point)
const char __attribute__((format(__printf__, 2, 3)))
void(IMPORT *WriteString)(const char *s)
void(IMPORT *WriteGPos)(const pos3_t pos)
bool(IMPORT *GetConstIntFromNamespace)(const char *space
void(IMPORT *QueueWritePos)(const vec3_t pos)
void(IMPORT *ReadGPos)(pos3_t pos)
int(IMPORT *ReadByte)(void)
void(IMPORT *WriteLong)(int c)
cvar_t *IMPORT * Cvar_Set(const char *varName, const char *value,...) __attribute__((format(__printf__
float(IMPORT *GetBounceFraction)(const char *texture)
bool(IMPORT *TestLine)(const vec3_t start
fast version of a line trace but without including entities
cvar_t *IMPORT * Cvar_Get(const char *varName, const char *value, int flags, const char *desc)
FILE *IMPORT * Sys_Fopen(const char *filename, const char *mode)
const pos3_t byte crouchingState
void(IMPORT *WriteChar)(char c)
bool(IMPORT *CanActorStandHere)(actorSizeEnum_t actorSize
void(IMPORT *WriteFormat)(const char *format
bool(IMPORT *TestLineWithEnt)(const vec3_t start
fast version of a line trace that also includes entities
void(IMPORT *WriteByte)(byte c)
void(IMPORT *WriteAngle)(float f)
unsigned int(IMPORT *ModelIndex)(const char *name)
pathing_t const pos3_t int distance
bool(IMPORT *UnregisterConstVariable)(const char *name)
void(IMPORT *WritePos)(const vec3_t pos)
int(IMPORT *ReadShort)(void)
int const char va_list ap
float(IMPORT *ReadAngle)(void)
void(IMPORT *ReadPos)(vec3_t pos)
bool(IMPORT *GetConstInt)(const char *name
void(IMPORT *QueueWriteString)(const char *s)
bool(IMPORT *GridFindPath)(const actorSizeEnum_t actorSize
void(IMPORT *ReadFormat)(const char *format
void *IMPORT * TagMalloc(int size, int tag, const char *file, int line)
const char *IMPORT * GetFootstepSound(const char *texture)
const char *IMPORT * GetConstVariable(const char *space, int value)
int(IMPORT *ReadLong)(void)
const char *IMPORT * FS_Gamedir(void)
int(IMPORT *ReadChar)(void)
void(IMPORT *FS_FreeFile)(void *buffer)
void(IMPORT *WriteShort)(int c)
__attribute__((noreturn, format(__printf__, 1, 2)))
void(IMPORT *QueueWriteShort)(int c)
void(IMPORT *AbortEvents)(void)
void(IMPORT *MoveStore)(pathing_t *path)
void(IMPORT *FreeTags)(int tag