icculus quake2 doxygen
1.0 dev
|
|
Go to the documentation of this file.
23 #include "../game/q_shared.h"
28 #define BASEDIRNAME "baseq2"
33 #define BUILDSTRING "Win32 RELEASE"
35 #define BUILDSTRING "Win32 DEBUG"
39 #define CPUSTRING "x86"
40 #elif defined _M_ALPHA
41 #define CPUSTRING "AXP"
44 #elif defined __linux__ || defined __FreeBSD__
46 #define BUILDSTRING "Linux"
49 #define CPUSTRING "i386"
50 #elif defined __alpha__
51 #define CPUSTRING "axp"
53 #define CPUSTRING "Unknown"
58 #define BUILDSTRING "Solaris"
61 #define CPUSTRING "i386"
63 #define CPUSTRING "sparc"
68 #define BUILDSTRING "NON-WIN32"
69 #define CPUSTRING "NON-WIN32"
163 void CRC_Init(
unsigned short *crcvalue);
165 unsigned short CRC_Value(
unsigned short crcvalue);
180 #define PROTOCOL_VERSION 34
184 #define PORT_MASTER 27900
185 #define PORT_CLIENT 27901
186 #define PORT_SERVER 27910
190 #define UPDATE_BACKUP 16 // copies of entity_state_t to keep buffered
192 #define UPDATE_MASK (UPDATE_BACKUP-1)
250 #define PS_M_TYPE (1<<0)
251 #define PS_M_ORIGIN (1<<1)
252 #define PS_M_VELOCITY (1<<2)
253 #define PS_M_TIME (1<<3)
254 #define PS_M_FLAGS (1<<4)
255 #define PS_M_GRAVITY (1<<5)
256 #define PS_M_DELTA_ANGLES (1<<6)
258 #define PS_VIEWOFFSET (1<<7)
259 #define PS_VIEWANGLES (1<<8)
260 #define PS_KICKANGLES (1<<9)
261 #define PS_BLEND (1<<10)
262 #define PS_FOV (1<<11)
263 #define PS_WEAPONINDEX (1<<12)
264 #define PS_WEAPONFRAME (1<<13)
265 #define PS_RDFLAGS (1<<14)
272 #define CM_ANGLE1 (1<<0)
273 #define CM_ANGLE2 (1<<1)
274 #define CM_ANGLE3 (1<<2)
275 #define CM_FORWARD (1<<3)
276 #define CM_SIDE (1<<4)
278 #define CM_BUTTONS (1<<6)
279 #define CM_IMPULSE (1<<7)
284 #define SND_VOLUME (1<<0) // a byte
285 #define SND_ATTENUATION (1<<1) // a byte
286 #define SND_POS (1<<2) // three coordinates
287 #define SND_ENT (1<<3) // a short 0-2: channel, 3-12: entity
288 #define SND_OFFSET (1<<4) // a byte, msec offset from frame start
290 #define DEFAULT_SOUND_PACKET_VOLUME 1.0
291 #define DEFAULT_SOUND_PACKET_ATTENUATION 1.0
298 #define U_ORIGIN1 (1<<0)
299 #define U_ORIGIN2 (1<<1)
300 #define U_ANGLE2 (1<<2)
301 #define U_ANGLE3 (1<<3)
302 #define U_FRAME8 (1<<4) // frame is a byte
303 #define U_EVENT (1<<5)
304 #define U_REMOVE (1<<6) // REMOVE this entity, don't add it
305 #define U_MOREBITS1 (1<<7) // read one additional byte
308 #define U_NUMBER16 (1<<8) // NUMBER8 is implicit if not set
309 #define U_ORIGIN3 (1<<9)
310 #define U_ANGLE1 (1<<10)
311 #define U_MODEL (1<<11)
312 #define U_RENDERFX8 (1<<12) // fullbright, etc
313 #define U_EFFECTS8 (1<<14) // autorotate, trails, etc
314 #define U_MOREBITS2 (1<<15) // read one additional byte
317 #define U_SKIN8 (1<<16)
318 #define U_FRAME16 (1<<17) // frame is a short
319 #define U_RENDERFX16 (1<<18) // 8 + 16 = 32
320 #define U_EFFECTS16 (1<<19) // 8 + 16 = 32
321 #define U_MODEL2 (1<<20) // weapons, flags, etc
322 #define U_MODEL3 (1<<21)
323 #define U_MODEL4 (1<<22)
324 #define U_MOREBITS3 (1<<23) // read one additional byte
327 #define U_OLDORIGIN (1<<24) // FIXME: get rid of this
328 #define U_SKIN16 (1<<25)
329 #define U_SOUND (1<<26)
330 #define U_SOLID (1<<27)
355 #define EXEC_NOW 0 // don't return until completed
356 #define EXEC_INSERT 1 // insert at current position, but don't run yet
357 #define EXEC_APPEND 2 // add to end of the command buffer
527 #define MAX_MSGLEN 1400 // max length of a message
528 #define PACKET_HEADER 10 // two ints and a short
544 unsigned int scope_id;
570 #define OLD_AVG 0.99 // total = oldtotal*OLD_AVG + new*(1-OLD_AVG)
572 #define MAX_LATENT 32
634 #include "../qcommon/qfiles.h"
653 int headnode,
int brushmask);
656 int headnode,
int brushmask,
667 int listsize,
int *topnode);
735 #define ERR_FATAL 0 // exit the entire game with a popup window
736 #define ERR_DROP 1 // print to console and disconnect from game
737 #define ERR_QUIT 2 // not an error, just a normal exit
739 #define EXEC_NOW 0 // don't return until completed
740 #define EXEC_INSERT 1 // insert at current position, but don't run yet
741 #define EXEC_APPEND 2 // add to end of the command buffer
744 #define PRINT_DEVELOPER 1 // only print when "developer 1"
751 void Com_Error (
int code,
char *fmt, ...);
786 #define NUMVERTEXNORMALS 162
char * CM_EntityString(void)
void Cvar_SetValue(char *var_name, float value)
void Com_DPrintf(char *fmt,...)
void MSG_WriteShort(sizebuf_t *sb, int c)
void MSG_WriteCoord(sizebuf_t *sb, float f)
void Cbuf_InsertFromDefer(void)
void Sys_CopyProtect(void)
int last_reliable_sequence
int incoming_acknowledged
short LittleShort(short l)
void Qcommon_Frame(int msec)
unsigned short CRC_Block(byte *start, int count)
qboolean Netchan_CanReliable(netchan_t *chan)
void MSG_WriteDir(sizebuf_t *sb, vec3_t vector)
int CM_LeafContents(int leafnum)
byte * CM_ClusterPHS(int cluster)
void CRC_Init(unsigned short *crcvalue)
void FS_Read(void *buffer, int len, FILE *f)
void FS_FreeFile(void *buffer)
int MSG_ReadLong(sizebuf_t *sb)
void MSG_WriteFloat(sizebuf_t *sb, float f)
void Cbuf_AddEarlyCommands(qboolean clear)
void Com_SetServerState(int state)
void Cmd_ExecuteString(char *text)
void MSG_WriteDeltaEntity(struct entity_state_s *from, struct entity_state_s *to, sizebuf_t *msg, qboolean force, qboolean newentity)
char * CopyString(char *in)
void Sys_Error(char *error,...)
void Netchan_Setup(netsrc_t sock, netchan_t *chan, netadr_t adr, int qport)
int MSG_ReadShort(sizebuf_t *sb)
void Com_BeginRedirect(int target, char *buffer, int buffersize, void(*flush))
void FS_InitFilesystem(void)
int CM_PointLeafnum(vec3_t p)
int CM_PointContents(vec3_t p, int headnode)
char * MSG_ReadString(sizebuf_t *sb)
char * Cvar_Userinfo(void)
char * NET_AdrToString(netadr_t a)
char * argv[MAX_NUM_ARGVS]
vec3_t bytedirs[NUMVERTEXNORMALS]
void Sys_UnloadGame(void)
byte COM_BlockSequenceCRCByte(byte *base, int length, int sequence)
void SCR_BeginLoadingPlaque(void)
int CM_BoxLeafnums(vec3_t mins, vec3_t maxs, int *list, int listsize, int *topnode)
void Com_EndRedirect(void)
qboolean NET_CompareBaseAdr(netadr_t a, netadr_t b)
void MSG_ReadPos(sizebuf_t *sb, vec3_t pos)
cvar_t * Cvar_Set(char *var_name, char *value)
void Cmd_RemoveCommand(char *cmd_name)
void Cbuf_ExecuteText(int exec_when, char *text)
void MSG_WriteChar(sizebuf_t *sb, int c)
int Com_ServerState(void)
float MSG_ReadCoord(sizebuf_t *sb)
qboolean NET_StringToAdr(char *s, netadr_t *a)
void COM_ClearArgv(int arg)
char * Sys_ConsoleInput(void)
cmodel_t * CM_InlineModel(char *name)
float MSG_ReadAngle16(sizebuf_t *sb)
int incoming_reliable_acknowledged
int CM_WriteAreaBits(byte *buffer, int area)
void SZ_Print(sizebuf_t *buf, char *data)
void SCR_DebugGraph(float value, int color)
float LittleFloat(float l)
int MSG_ReadChar(sizebuf_t *sb)
void Netchan_Transmit(netchan_t *chan, int length, byte *data)
void Cmd_AddCommand(char *cmd_name, xcommand_t function)
void * SZ_GetSpace(sizebuf_t *buf, int length)
void Cvar_GetLatchedVars(void)
void MSG_WritePos(sizebuf_t *sb, vec3_t pos)
void MSG_WriteDeltaUsercmd(sizebuf_t *sb, struct usercmd_s *from, struct usercmd_s *cmd)
void Cbuf_InsertText(char *text)
void NET_SendPacket(netsrc_t sock, int length, void *data, netadr_t to)
char * Cvar_CompleteVariable(char *partial)
void COM_AddParm(char *parm)
qboolean Netchan_NeedReliable(netchan_t *chan)
void Sys_SendKeyEvents(void)
void Sys_ConsoleOutput(char *string)
void FS_ExecAutoexec(void)
qboolean CM_HeadnodeVisible(int headnode, byte *visbits)
void MSG_ReadDir(sizebuf_t *sb, vec3_t vector)
void CM_WritePortalState(FILE *f)
void * Z_Malloc(int size)
cvar_t * Cvar_Get(char *var_name, char *value, int flags)
void Pmove(pmove_t *pmove)
void COM_InitArgv(int argc, char **argv)
void CRC_ProcessByte(unsigned short *crcvalue, byte data)
void Con_Print(char *text)
@ svc_deltapacketentities
void FS_SetGamedir(char *dir)
trace_t CM_TransformedBoxTrace(vec3_t start, vec3_t end, vec3_t mins, vec3_t maxs, int headnode, int brushmask, vec3_t origin, vec3_t angles)
void Sys_AppActivate(void)
float Cvar_VariableValue(char *var_name)
void MSG_WriteAngle(sizebuf_t *sb, float f)
int CM_TransformedPointContents(vec3_t p, int headnode, vec3_t origin, vec3_t angles)
void Netchan_OutOfBand(int net_socket, netadr_t adr, int length, byte *data)
qboolean userinfo_modified
void Cmd_TokenizeString(char *text, qboolean macroExpand)
int MSG_ReadByte(sizebuf_t *sb)
void Cbuf_CopyToDefer(void)
int CM_LeafCluster(int leafnum)
void MSG_WriteLong(sizebuf_t *sb, int c)
cvar_t * Cvar_FullSet(char *var_name, char *value, int flags)
void Qcommon_Init(int argc, char **argv)
void CM_SetAreaPortalState(int portalnum, qboolean open)
void NET_Config(qboolean multiplayer)
cmodel_t * CM_LoadMap(char *name, qboolean clientload, unsigned *checksum)
int CM_LeafArea(int leafnum)
void Cvar_WriteVariables(char *path)
void SV_Shutdown(char *finalmsg, qboolean reconnect)
cvar_t * Cvar_ForceSet(char *var_name, char *value)
int FS_LoadFile(char *path, void **buffer)
float MSG_ReadFloat(sizebuf_t *sb)
qboolean Cvar_Command(void)
void Netchan_OutOfBandPrint(int net_socket, netadr_t adr, char *format,...)
char * MSG_ReadStringLine(sizebuf_t *sb)
int COM_CheckParm(char *parm)
int FS_FOpenFile(char *filename, FILE **file)
void Com_Error(int code, char *fmt,...)
void Cbuf_AddText(char *text)
void SZ_Clear(sizebuf_t *buf)
qboolean NET_IsLocalAddress(netadr_t adr)
qboolean CM_AreasConnected(int area1, int area2)
char * Cmd_CompleteCommand(char *partial)
byte * CM_ClusterPVS(int cluster)
int CM_NumInlineModels(void)
unsigned Com_BlockChecksum(void *buffer, int length)
qboolean NET_GetPacket(netsrc_t sock, netadr_t *net_from, sizebuf_t *net_message)
char * Cvar_Serverinfo(void)
void Qcommon_Shutdown(void)
void SZ_Init(sizebuf_t *buf, byte *data, int length)
int incoming_reliable_sequence
int CM_HeadnodeForBox(vec3_t mins, vec3_t maxs)
byte net_message_buffer[MAX_MSGLEN]
void MSG_WriteString(sizebuf_t *sb, char *s)
struct sizebuf_s sizebuf_t
void FS_FCloseFile(FILE *f)
float MSG_ReadAngle(sizebuf_t *sb)
char * FS_NextPath(char *prevpath)
void Cmd_ForwardToServer(void)
void SZ_Write(sizebuf_t *buf, void *data, int length)
void MSG_ReadDeltaUsercmd(sizebuf_t *sb, struct usercmd_s *from, struct usercmd_s *cmd)
void Com_Printf(char *fmt,...)
qboolean NET_CompareAdr(netadr_t a, netadr_t b)
qboolean Cbuf_AddLateCommands(void)
void CM_ReadPortalState(FILE *f)
void MSG_WriteByte(sizebuf_t *sb, int c)
char * Sys_GetClipboardData(void)
void Com_MDPrintf(char *fmt,...)
qboolean Cmd_Exists(char *cmd_name)
unsigned short CRC_Value(unsigned short crcvalue)
void * Sys_GetGameAPI(void *parms)
void * Z_TagMalloc(int size, int tag)
void MSG_WriteAngle16(sizebuf_t *sb, float f)
qboolean Netchan_Process(netchan_t *chan, sizebuf_t *msg)
char * Cvar_VariableString(char *var_name)
void(APIENTRY *qglAccum)(GLenum op
void MSG_BeginReading(sizebuf_t *sb)
trace_t CM_BoxTrace(vec3_t start, vec3_t end, vec3_t mins, vec3_t maxs, int headnode, int brushmask)
void FS_CreatePath(char *path)
void MSG_ReadData(sizebuf_t *sb, void *buffer, int size)