icculus quake2 doxygen  1.0 dev
qcommon.h
Go to the documentation of this file.
1 /*
2 Copyright (C) 1997-2001 Id Software, Inc.
3 
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License
6 as published by the Free Software Foundation; either version 2
7 of the License, or (at your option) any later version.
8 
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12 
13 See the GNU General Public License for more details.
14 
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 
19 */
20 
21 // qcommon.h -- definitions common between client and server, but not game.dll
22 
23 #include "../game/q_shared.h"
24 
25 
26 #define VERSION 3.21
27 
28 #define BASEDIRNAME "baseq2"
29 
30 #ifdef WIN32
31 
32 #ifdef NDEBUG
33 #define BUILDSTRING "Win32 RELEASE"
34 #else
35 #define BUILDSTRING "Win32 DEBUG"
36 #endif
37 
38 #ifdef _M_IX86
39 #define CPUSTRING "x86"
40 #elif defined _M_ALPHA
41 #define CPUSTRING "AXP"
42 #endif
43 
44 #elif defined __linux__ || defined __FreeBSD__
45 
46 #define BUILDSTRING "Linux"
47 
48 #ifdef __i386__
49 #define CPUSTRING "i386"
50 #elif defined __alpha__
51 #define CPUSTRING "axp"
52 #else
53 #define CPUSTRING "Unknown"
54 #endif
55 
56 #elif defined __sun__
57 
58 #define BUILDSTRING "Solaris"
59 
60 #ifdef __i386__
61 #define CPUSTRING "i386"
62 #else
63 #define CPUSTRING "sparc"
64 #endif
65 
66 #else // !WIN32
67 
68 #define BUILDSTRING "NON-WIN32"
69 #define CPUSTRING "NON-WIN32"
70 
71 #endif
72 
73 //============================================================================
74 
75 typedef struct sizebuf_s
76 {
77  qboolean allowoverflow; // if false, do a Com_Error
78  qboolean overflowed; // set to true if the buffer size failed
79  byte *data;
80  int maxsize;
81  int cursize;
82  int readcount;
83 } sizebuf_t;
84 
85 void SZ_Init (sizebuf_t *buf, byte *data, int length);
86 void SZ_Clear (sizebuf_t *buf);
87 void *SZ_GetSpace (sizebuf_t *buf, int length);
88 void SZ_Write (sizebuf_t *buf, void *data, int length);
89 void SZ_Print (sizebuf_t *buf, char *data); // strcats onto the sizebuf
90 
91 //============================================================================
92 
93 struct usercmd_s;
94 struct entity_state_s;
95 
96 void MSG_WriteChar (sizebuf_t *sb, int c);
97 void MSG_WriteByte (sizebuf_t *sb, int c);
98 void MSG_WriteShort (sizebuf_t *sb, int c);
99 void MSG_WriteLong (sizebuf_t *sb, int c);
100 void MSG_WriteFloat (sizebuf_t *sb, float f);
101 void MSG_WriteString (sizebuf_t *sb, char *s);
102 void MSG_WriteCoord (sizebuf_t *sb, float f);
103 void MSG_WritePos (sizebuf_t *sb, vec3_t pos);
104 void MSG_WriteAngle (sizebuf_t *sb, float f);
105 void MSG_WriteAngle16 (sizebuf_t *sb, float f);
106 void MSG_WriteDeltaUsercmd (sizebuf_t *sb, struct usercmd_s *from, struct usercmd_s *cmd);
107 void MSG_WriteDeltaEntity (struct entity_state_s *from, struct entity_state_s *to, sizebuf_t *msg, qboolean force, qboolean newentity);
108 void MSG_WriteDir (sizebuf_t *sb, vec3_t vector);
109 
110 
111 void MSG_BeginReading (sizebuf_t *sb);
112 
113 int MSG_ReadChar (sizebuf_t *sb);
114 int MSG_ReadByte (sizebuf_t *sb);
115 int MSG_ReadShort (sizebuf_t *sb);
116 int MSG_ReadLong (sizebuf_t *sb);
117 float MSG_ReadFloat (sizebuf_t *sb);
118 char *MSG_ReadString (sizebuf_t *sb);
119 char *MSG_ReadStringLine (sizebuf_t *sb);
120 
121 float MSG_ReadCoord (sizebuf_t *sb);
122 void MSG_ReadPos (sizebuf_t *sb, vec3_t pos);
123 float MSG_ReadAngle (sizebuf_t *sb);
124 float MSG_ReadAngle16 (sizebuf_t *sb);
125 void MSG_ReadDeltaUsercmd (sizebuf_t *sb, struct usercmd_s *from, struct usercmd_s *cmd);
126 
127 void MSG_ReadDir (sizebuf_t *sb, vec3_t vector);
128 
129 void MSG_ReadData (sizebuf_t *sb, void *buffer, int size);
130 
131 //============================================================================
132 
133 extern qboolean bigendien;
134 
135 extern short BigShort (short l);
136 extern short LittleShort (short l);
137 extern int BigLong (int l);
138 extern int LittleLong (int l);
139 extern float BigFloat (float l);
140 extern float LittleFloat (float l);
141 
142 //============================================================================
143 
144 
145 int COM_Argc (void);
146 char *COM_Argv (int arg); // range and null checked
147 void COM_ClearArgv (int arg);
148 int COM_CheckParm (char *parm);
149 void COM_AddParm (char *parm);
150 
151 void COM_Init (void);
152 void COM_InitArgv (int argc, char **argv);
153 
154 char *CopyString (char *in);
155 
156 //============================================================================
157 
158 void Info_Print (char *s);
159 
160 
161 /* crc.h */
162 
163 void CRC_Init(unsigned short *crcvalue);
164 void CRC_ProcessByte(unsigned short *crcvalue, byte data);
165 unsigned short CRC_Value(unsigned short crcvalue);
166 unsigned short CRC_Block (byte *start, int count);
167 
168 
169 
170 /*
171 ==============================================================
172 
173 PROTOCOL
174 
175 ==============================================================
176 */
177 
178 // protocol.h -- communications protocols
179 
180 #define PROTOCOL_VERSION 34
181 
182 //=========================================
183 
184 #define PORT_MASTER 27900
185 #define PORT_CLIENT 27901
186 #define PORT_SERVER 27910
187 
188 //=========================================
189 
190 #define UPDATE_BACKUP 16 // copies of entity_state_t to keep buffered
191  // must be power of two
192 #define UPDATE_MASK (UPDATE_BACKUP-1)
193 
194 
195 
196 //==================
197 // the svc_strings[] array in cl_parse.c should mirror this
198 //==================
199 
200 //
201 // server to client
202 //
204 {
206 
207  // these ops are known to the game dll
213 
214  // the rest are private to the client and server
218  svc_sound, // <see code>
219  svc_print, // [byte] id [string] null terminated string
220  svc_stufftext, // [string] stuffed into client's console buffer, should be \n terminated
221  svc_serverdata, // [long] protocol ...
222  svc_configstring, // [short] [string]
224  svc_centerprint, // [string] to put in center of the screen
225  svc_download, // [short] size [size bytes]
226  svc_playerinfo, // variable
230 };
231 
232 //==============================================
233 
234 //
235 // client to server
236 //
238 {
241  clc_move, // [[usercmd_t]
242  clc_userinfo, // [[userinfo string]
243  clc_stringcmd // [string] message
244 };
245 
246 //==============================================
247 
248 // plyer_state_t communication
249 
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)
257 
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)
266 
267 //==============================================
268 
269 // user_cmd_t communication
270 
271 // ms and light always sent, the others are optional
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)
277 #define CM_UP (1<<5)
278 #define CM_BUTTONS (1<<6)
279 #define CM_IMPULSE (1<<7)
280 
281 //==============================================
282 
283 // a sound without an ent or pos will be a local only sound
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
289 
290 #define DEFAULT_SOUND_PACKET_VOLUME 1.0
291 #define DEFAULT_SOUND_PACKET_ATTENUATION 1.0
292 
293 //==============================================
294 
295 // entity_state_t communication
296 
297 // try to pack the common update flags into the first byte
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
306 
307 // second 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
315 
316 // third 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
325 
326 // fourth 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)
331 
332 
333 /*
334 ==============================================================
335 
336 CMD
337 
338 Command text buffering and command execution
339 
340 ==============================================================
341 */
342 
343 /*
344 
345 Any number of commands can be added in a frame, from several different sources.
346 Most commands come from either keybindings or console line input, but remote
347 servers can also send across commands and entire text files can be execed.
348 
349 The + command line options are also added to the command buffer.
350 
351 The game starts with a Cbuf_AddText ("exec quake.rc\n"); Cbuf_Execute ();
352 
353 */
354 
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
358 
359 void Cbuf_Init (void);
360 // allocates an initial text buffer that will grow as needed
361 
362 void Cbuf_AddText (char *text);
363 // as new commands are generated from the console or keybindings,
364 // the text is added to the end of the command buffer.
365 
366 void Cbuf_InsertText (char *text);
367 // when a command wants to issue other commands immediately, the text is
368 // inserted at the beginning of the buffer, before any remaining unexecuted
369 // commands.
370 
371 void Cbuf_ExecuteText (int exec_when, char *text);
372 // this can be used in place of either Cbuf_AddText or Cbuf_InsertText
373 
374 void Cbuf_AddEarlyCommands (qboolean clear);
375 // adds all the +set commands from the command line
376 
378 // adds all the remaining + commands from the command line
379 // Returns true if any late commands were added, which
380 // will keep the demoloop from immediately starting
381 
382 void Cbuf_Execute (void);
383 // Pulls off \n terminated lines of text from the command buffer and sends
384 // them through Cmd_ExecuteString. Stops when the buffer is empty.
385 // Normally called once per frame, but may be explicitly invoked.
386 // Do not call inside a command function!
387 
388 void Cbuf_CopyToDefer (void);
389 void Cbuf_InsertFromDefer (void);
390 // These two functions are used to defer any pending commands while a map
391 // is being loaded
392 
393 //===========================================================================
394 
395 /*
396 
397 Command execution takes a null terminated string, breaks it into tokens,
398 then searches for a command or variable that matches the first token.
399 
400 */
401 
402 typedef void (*xcommand_t) (void);
403 
404 void Cmd_Init (void);
405 
406 void Cmd_AddCommand (char *cmd_name, xcommand_t function);
407 // called by the init functions of other parts of the program to
408 // register commands and functions to call for them.
409 // The cmd_name is referenced later, so it should not be in temp memory
410 // if function is NULL, the command will be forwarded to the server
411 // as a clc_stringcmd instead of executed locally
412 void Cmd_RemoveCommand (char *cmd_name);
413 
414 qboolean Cmd_Exists (char *cmd_name);
415 // used by the cvar code to check for cvar / command name overlap
416 
417 char *Cmd_CompleteCommand (char *partial);
418 // attempts to match a partial command for automatic command line completion
419 // returns NULL if nothing fits
420 
421 int Cmd_Argc (void);
422 char *Cmd_Argv (int arg);
423 char *Cmd_Args (void);
424 // The functions that execute commands get their parameters with these
425 // functions. Cmd_Argv () will return an empty string, not a NULL
426 // if arg > argc, so string operations are always safe.
427 
428 void Cmd_TokenizeString (char *text, qboolean macroExpand);
429 // Takes a null terminated string. Does not need to be /n terminated.
430 // breaks the string up into arg tokens.
431 
432 void Cmd_ExecuteString (char *text);
433 // Parses a single line of text into arguments and tries to execute it
434 // as if it was typed at the console
435 
436 void Cmd_ForwardToServer (void);
437 // adds the current command line as a clc_stringcmd to the client message.
438 // things like godmode, noclip, etc, are commands directed to the server,
439 // so when they are typed in at the console, they will need to be forwarded.
440 
441 
442 /*
443 ==============================================================
444 
445 CVAR
446 
447 ==============================================================
448 */
449 
450 /*
451 
452 cvar_t variables are used to hold scalar or string variables that can be changed or displayed at the console or prog code as well as accessed directly
453 in C code.
454 
455 The user can access cvars from the console in three ways:
456 r_draworder prints the current value
457 r_draworder 0 sets the current value to 0
458 set r_draworder 0 as above, but creates the cvar if not present
459 Cvars are restricted from having the same names as commands to keep this
460 interface from being ambiguous.
461 */
462 
463 extern cvar_t *cvar_vars;
464 
465 cvar_t *Cvar_Get (char *var_name, char *value, int flags);
466 // creates the variable if it doesn't exist, or returns the existing one
467 // if it exists, the value will not be changed, but flags will be ORed in
468 // that allows variables to be unarchived without needing bitflags
469 
470 cvar_t *Cvar_Set (char *var_name, char *value);
471 // will create the variable if it doesn't exist
472 
473 cvar_t *Cvar_ForceSet (char *var_name, char *value);
474 // will set the variable even if NOSET or LATCH
475 
476 cvar_t *Cvar_FullSet (char *var_name, char *value, int flags);
477 
478 void Cvar_SetValue (char *var_name, float value);
479 // expands value to a string and calls Cvar_Set
480 
481 float Cvar_VariableValue (char *var_name);
482 // returns 0 if not defined or non numeric
483 
484 char *Cvar_VariableString (char *var_name);
485 // returns an empty string if not defined
486 
487 char *Cvar_CompleteVariable (char *partial);
488 // attempts to match a partial variable name for command line completion
489 // returns NULL if nothing fits
490 
491 void Cvar_GetLatchedVars (void);
492 // any CVAR_LATCHED variables that have been set will now take effect
493 
494 qboolean Cvar_Command (void);
495 // called by Cmd_ExecuteString when Cmd_Argv(0) doesn't match a known
496 // command. Returns true if the command was a variable reference that
497 // was handled. (print or change)
498 
499 void Cvar_WriteVariables (char *path);
500 // appends lines containing "set variable value" for all variables
501 // with the archive flag set to true.
502 
503 void Cvar_Init (void);
504 
505 char *Cvar_Userinfo (void);
506 // returns an info string containing all the CVAR_USERINFO cvars
507 
508 char *Cvar_Serverinfo (void);
509 // returns an info string containing all the CVAR_SERVERINFO cvars
510 
512 // this is set each time a CVAR_USERINFO variable is changed
513 // so that the client knows to send it to the server
514 
515 /*
516 ==============================================================
517 
518 NET
519 
520 ==============================================================
521 */
522 
523 // net.h -- quake's interface to the networking layer
524 
525 #define PORT_ANY -1
526 
527 #define MAX_MSGLEN 1400 // max length of a message
528 #define PACKET_HEADER 10 // two ints and a short
529 
530 #ifdef HAVE_IPV6
531 typedef enum {NA_LOOPBACK, NA_BROADCAST, NA_IP, NA_IPX, NA_BROADCAST_IPX, NA_IP6, NA_MULTICAST6} netadrtype_t;
532 #else
534 #endif
535 
536 typedef enum {NS_CLIENT, NS_SERVER} netsrc_t;
537 
538 typedef struct
539 {
541 #ifdef HAVE_IPV6
542  /* TODO. Use sockaddr_storage instead. */
543  byte ip[16];
544  unsigned int scope_id;
545 #else
546  byte ip[4];
547 #endif
548  byte ipx[10];
549 
550  unsigned short port;
551 } netadr_t;
552 
553 void NET_Init (void);
554 void NET_Shutdown (void);
555 
556 void NET_Config (qboolean multiplayer);
557 
559 void NET_SendPacket (netsrc_t sock, int length, void *data, netadr_t to);
560 
564 char *NET_AdrToString (netadr_t a);
565 qboolean NET_StringToAdr (char *s, netadr_t *a);
566 void NET_Sleep(int msec);
567 
568 //============================================================================
569 
570 #define OLD_AVG 0.99 // total = oldtotal*OLD_AVG + new*(1-OLD_AVG)
571 
572 #define MAX_LATENT 32
573 
574 typedef struct
575 {
577 
579 
580  int dropped; // between last packet and previous
581 
582  int last_received; // for timeouts
583  int last_sent; // for retransmits
584 
586  int qport; // qport value to write when transmitting
587 
588 // sequencing variables
592 
593  int incoming_reliable_sequence; // single bit, maintained local
594 
596  int reliable_sequence; // single bit
597  int last_reliable_sequence; // sequence number of last send
598 
599 // reliable staging and holding areas
600  sizebuf_t message; // writing buffer to send to server
601  byte message_buf[MAX_MSGLEN-16]; // leave space for header
602 
603 // message is copied to this buffer when it is first transfered
605  byte reliable_buf[MAX_MSGLEN-16]; // unacked reliable message
606 } netchan_t;
607 
608 extern netadr_t net_from;
609 extern sizebuf_t net_message;
610 extern byte net_message_buffer[MAX_MSGLEN];
611 
612 
613 void Netchan_Init (void);
614 void Netchan_Setup (netsrc_t sock, netchan_t *chan, netadr_t adr, int qport);
615 
617 void Netchan_Transmit (netchan_t *chan, int length, byte *data);
618 void Netchan_OutOfBand (int net_socket, netadr_t adr, int length, byte *data);
619 void Netchan_OutOfBandPrint (int net_socket, netadr_t adr, char *format, ...);
621 
623 
624 
625 /*
626 ==============================================================
627 
628 CMODEL
629 
630 ==============================================================
631 */
632 
633 
634 #include "../qcommon/qfiles.h"
635 
636 cmodel_t *CM_LoadMap (char *name, qboolean clientload, unsigned *checksum);
637 cmodel_t *CM_InlineModel (char *name); // *1, *2, etc
638 
639 int CM_NumClusters (void);
640 int CM_NumInlineModels (void);
641 char *CM_EntityString (void);
642 
643 // creates a clipping hull for an arbitrary box
644 int CM_HeadnodeForBox (vec3_t mins, vec3_t maxs);
645 
646 
647 // returns an ORed contents mask
648 int CM_PointContents (vec3_t p, int headnode);
650 
651 trace_t CM_BoxTrace (vec3_t start, vec3_t end,
652  vec3_t mins, vec3_t maxs,
653  int headnode, int brushmask);
655  vec3_t mins, vec3_t maxs,
656  int headnode, int brushmask,
658 
659 byte *CM_ClusterPVS (int cluster);
660 byte *CM_ClusterPHS (int cluster);
661 
662 int CM_PointLeafnum (vec3_t p);
663 
664 // call with topnode set to the headnode, returns with topnode
665 // set to the first node that splits the box
666 int CM_BoxLeafnums (vec3_t mins, vec3_t maxs, int *list,
667  int listsize, int *topnode);
668 
669 int CM_LeafContents (int leafnum);
670 int CM_LeafCluster (int leafnum);
671 int CM_LeafArea (int leafnum);
672 
673 void CM_SetAreaPortalState (int portalnum, qboolean open);
674 qboolean CM_AreasConnected (int area1, int area2);
675 
676 int CM_WriteAreaBits (byte *buffer, int area);
677 qboolean CM_HeadnodeVisible (int headnode, byte *visbits);
678 
679 void CM_WritePortalState (FILE *f);
680 void CM_ReadPortalState (FILE *f);
681 
682 /*
683 ==============================================================
684 
685 PLAYER MOVEMENT CODE
686 
687 Common between server and client so prediction matches
688 
689 ==============================================================
690 */
691 
692 extern float pm_airaccelerate;
693 
694 void Pmove (pmove_t *pmove);
695 
696 /*
697 ==============================================================
698 
699 FILESYSTEM
700 
701 ==============================================================
702 */
703 
704 void FS_InitFilesystem (void);
705 void FS_SetGamedir (char *dir);
706 char *FS_Gamedir (void);
707 char *FS_NextPath (char *prevpath);
708 void FS_ExecAutoexec (void);
709 
710 int FS_FOpenFile (char *filename, FILE **file);
711 void FS_FCloseFile (FILE *f);
712 // note: this can't be called from another DLL, due to MS libc issues
713 
714 int FS_LoadFile (char *path, void **buffer);
715 // a null buffer will just return the file length without loading
716 // a -1 length is not present
717 
718 void FS_Read (void *buffer, int len, FILE *f);
719 // properly handles partial reads
720 
721 void FS_FreeFile (void *buffer);
722 
723 void FS_CreatePath (char *path);
724 
725 
726 /*
727 ==============================================================
728 
729 MISC
730 
731 ==============================================================
732 */
733 
734 
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
738 
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
742 
743 #define PRINT_ALL 0
744 #define PRINT_DEVELOPER 1 // only print when "developer 1"
745 
746 void Com_BeginRedirect (int target, char *buffer, int buffersize, void (*flush));
747 void Com_EndRedirect (void);
748 void Com_Printf (char *fmt, ...);
749 void Com_DPrintf (char *fmt, ...);
750 void Com_MDPrintf (char *fmt, ...);
751 void Com_Error (int code, char *fmt, ...);
752 void Com_Quit (void);
753 
754 int Com_ServerState (void); // this should have just been a cvar...
755 void Com_SetServerState (int state);
756 
757 unsigned Com_BlockChecksum (void *buffer, int length);
758 byte COM_BlockSequenceCRCByte (byte *base, int length, int sequence);
759 
760 float frand(void); // 0 ti 1
761 float crand(void); // -1 to 1
762 
763 extern cvar_t *developer;
764 extern cvar_t *modder;
765 extern cvar_t *dedicated;
766 extern cvar_t *host_speeds;
767 extern cvar_t *log_stats;
768 
769 extern FILE *log_stats_file;
770 
771 // host_speeds times
772 extern int time_before_game;
773 extern int time_after_game;
774 extern int time_before_ref;
775 extern int time_after_ref;
776 
777 void Z_Free (void *ptr);
778 void *Z_Malloc (int size); // returns 0 filled memory
779 void *Z_TagMalloc (int size, int tag);
780 void Z_FreeTags (int tag);
781 
782 void Qcommon_Init (int argc, char **argv);
783 void Qcommon_Frame (int msec);
784 void Qcommon_Shutdown (void);
785 
786 #define NUMVERTEXNORMALS 162
788 
789 // this is in the client code, but can be used for debugging from server
790 void SCR_DebugGraph (float value, int color);
791 
792 
793 /*
794 ==============================================================
795 
796 NON-PORTABLE SYSTEM SERVICES
797 
798 ==============================================================
799 */
800 
801 void Sys_Init (void);
802 
803 void Sys_AppActivate (void);
804 
805 void Sys_UnloadGame (void);
806 void *Sys_GetGameAPI (void *parms);
807 // loads the game dll and calls the api init function
808 
809 char *Sys_ConsoleInput (void);
810 void Sys_ConsoleOutput (char *string);
811 void Sys_SendKeyEvents (void);
812 void Sys_Error (char *error, ...);
813 void Sys_Quit (void);
814 char *Sys_GetClipboardData( void );
815 void Sys_CopyProtect (void);
816 
817 /*
818 ==============================================================
819 
820 CLIENT / SERVER SYSTEMS
821 
822 ==============================================================
823 */
824 
825 void CL_Init (void);
826 void CL_Drop (void);
827 void CL_Shutdown (void);
828 void CL_Frame (int msec);
829 void Con_Print (char *text);
830 void SCR_BeginLoadingPlaque (void);
831 
832 void SV_Init (void);
833 void SV_Shutdown (char *finalmsg, qboolean reconnect);
834 void SV_Frame (int msec);
835 
836 
837 
CM_EntityString
char * CM_EntityString(void)
Definition: cmodel.c:662
Cvar_SetValue
void Cvar_SetValue(char *var_name, float value)
Definition: cvar.c:317
cvar_vars
cvar_t * cvar_vars
Definition: cvar.c:24
NA_IPX
@ NA_IPX
Definition: qcommon.h:533
CL_Drop
void CL_Drop(void)
Definition: cl_main.c:412
Z_Free
void Z_Free(void *ptr)
Definition: common.c:1141
Com_DPrintf
void Com_DPrintf(char *fmt,...)
Definition: common.c:155
sizebuf_s
Definition: qcommon.h:75
frand
float frand(void)
Definition: common.c:1398
value
GLfloat value
Definition: qgl_win.c:63
svc_nop
@ svc_nop
Definition: qcommon.h:215
svc_centerprint
@ svc_centerprint
Definition: qcommon.h:224
MSG_WriteShort
void MSG_WriteShort(sizebuf_t *sb, int c)
Definition: common.c:335
MSG_WriteCoord
void MSG_WriteCoord(sizebuf_t *sb, float f)
Definition: common.c:383
Cbuf_InsertFromDefer
void Cbuf_InsertFromDefer(void)
Definition: cmd.c:159
Sys_CopyProtect
void Sys_CopyProtect(void)
Definition: sys_win.c:186
netchan_t::sock
netsrc_t sock
Definition: qcommon.h:578
Cmd_Init
void Cmd_Init(void)
Definition: cmd.c:881
NET_Sleep
void NET_Sleep(int msec)
Definition: net_wins.c:726
netchan_t::incoming_sequence
int incoming_sequence
Definition: qcommon.h:589
BigShort
short BigShort(short l)
Definition: q_shared.c:945
netchan_t::last_reliable_sequence
int last_reliable_sequence
Definition: qcommon.h:597
netchan_t::incoming_acknowledged
int incoming_acknowledged
Definition: qcommon.h:590
LittleShort
short LittleShort(short l)
Definition: q_shared.c:946
Qcommon_Frame
void Qcommon_Frame(int msec)
Definition: common.c:1524
NS_SERVER
@ NS_SERVER
Definition: qcommon.h:536
svc_muzzleflash
@ svc_muzzleflash
Definition: qcommon.h:208
CRC_Block
unsigned short CRC_Block(byte *start, int count)
Definition: crc.c:82
svc_frame
@ svc_frame
Definition: qcommon.h:229
Netchan_CanReliable
qboolean Netchan_CanReliable(netchan_t *chan)
Definition: net_chan.c:175
svc_bad
@ svc_bad
Definition: qcommon.h:205
MSG_WriteDir
void MSG_WriteDir(sizebuf_t *sb, vec3_t vector)
Definition: common.c:457
log_stats_file
FILE * log_stats_file
Definition: common.c:37
COM_Argc
int COM_Argc(void)
Definition: common.c:987
CM_LeafContents
int CM_LeafContents(int leafnum)
Definition: cmodel.c:667
CM_ClusterPHS
byte * CM_ClusterPHS(int cluster)
Definition: cmodel.c:1584
CRC_Init
void CRC_Init(unsigned short *crcvalue)
Definition: crc.c:67
FS_Read
void FS_Read(void *buffer, int len, FILE *f)
Definition: files.c:346
FS_FreeFile
void FS_FreeFile(void *buffer)
Definition: files.c:433
MSG_ReadLong
int MSG_ReadLong(sizebuf_t *sb)
Definition: common.c:750
time_before_game
int time_before_game
Definition: common.c:54
entity_state_s
Definition: q_shared.h:1169
MSG_WriteFloat
void MSG_WriteFloat(sizebuf_t *sb, float f)
Definition: common.c:360
netchan_t::message
sizebuf_t message
Definition: qcommon.h:600
NA_IP
@ NA_IP
Definition: qcommon.h:533
Cbuf_AddEarlyCommands
void Cbuf_AddEarlyCommands(qboolean clear)
Definition: cmd.c:263
entity_state_s::origin
vec3_t origin
Definition: q_shared.h:1173
Com_SetServerState
void Com_SetServerState(int state)
Definition: common.c:285
sizebuf_s::overflowed
qboolean overflowed
Definition: qcommon.h:78
Cvar_Init
void Cvar_Init(void)
Definition: cvar.c:522
Cmd_ExecuteString
void Cmd_ExecuteString(char *text)
Definition: cmd.c:811
svc_inventory
@ svc_inventory
Definition: qcommon.h:212
MSG_WriteDeltaEntity
void MSG_WriteDeltaEntity(struct entity_state_s *from, struct entity_state_s *to, sizebuf_t *msg, qboolean force, qboolean newentity)
Definition: common.c:502
CopyString
char * CopyString(char *in)
Definition: common.c:1057
modder
cvar_t * modder
Definition: common.c:42
Sys_Error
void Sys_Error(char *error,...)
Definition: sys_win.c:67
sizebuf_s::readcount
int readcount
Definition: qcommon.h:82
Netchan_Setup
void Netchan_Setup(netsrc_t sock, netchan_t *chan, netadr_t adr, int qport)
Definition: net_chan.c:152
bigendien
qboolean bigendien
Definition: q_shared.c:934
MSG_ReadShort
int MSG_ReadShort(sizebuf_t *sb)
Definition: common.c:735
qboolean
qboolean
Definition: q_shared.h:56
Com_BeginRedirect
void Com_BeginRedirect(int target, char *buffer, int buffersize, void(*flush))
Definition: common.c:72
FS_InitFilesystem
void FS_InitFilesystem(void)
Definition: files.c:891
trace_t
Definition: q_shared.h:449
net_message
sizebuf_t net_message
Definition: net_chan.c:82
CM_PointLeafnum
int CM_PointLeafnum(vec3_t p)
Definition: cmodel.c:826
CM_PointContents
int CM_PointContents(vec3_t p, int headnode)
Definition: cmodel.c:917
MSG_ReadString
char * MSG_ReadString(sizebuf_t *sb)
Definition: common.c:792
netchan_t
Definition: qcommon.h:574
Cvar_Userinfo
char * Cvar_Userinfo(void)
Definition: cvar.c:504
buffer
GLenum GLfloat * buffer
Definition: qgl_win.c:151
netchan_t::dropped
int dropped
Definition: qcommon.h:580
NET_AdrToString
char * NET_AdrToString(netadr_t a)
Definition: net_wins.c:156
argv
char * argv[MAX_NUM_ARGVS]
Definition: sys_win.c:55
svc_playerinfo
@ svc_playerinfo
Definition: qcommon.h:226
argc
int argc
Definition: sys_win.c:54
bytedirs
vec3_t bytedirs[NUMVERTEXNORMALS]
Definition: common.c:300
Sys_Init
void Sys_Init(void)
Definition: sys_win.c:206
Sys_UnloadGame
void Sys_UnloadGame(void)
Definition: sys_win.c:458
COM_BlockSequenceCRCByte
byte COM_BlockSequenceCRCByte(byte *base, int length, int sequence)
Definition: common.c:1361
sizebuf_s::data
byte * data
Definition: qcommon.h:79
NA_BROADCAST
@ NA_BROADCAST
Definition: qcommon.h:533
SCR_BeginLoadingPlaque
void SCR_BeginLoadingPlaque(void)
Definition: cl_scrn.c:571
dedicated
cvar_t * dedicated
Definition: common.c:47
CM_BoxLeafnums
int CM_BoxLeafnums(vec3_t mins, vec3_t maxs, int *list, int listsize, int *topnode)
Definition: cmodel.c:903
time_after_game
int time_after_game
Definition: common.c:55
cvar_s
Definition: q_shared.h:317
Com_EndRedirect
void Com_EndRedirect(void)
Definition: common.c:84
NET_CompareBaseAdr
qboolean NET_CompareBaseAdr(netadr_t a, netadr_t b)
Definition: net_wins.c:133
MSG_ReadPos
void MSG_ReadPos(sizebuf_t *sb, vec3_t pos)
Definition: common.c:837
Cvar_Set
cvar_t * Cvar_Set(char *var_name, char *value)
Definition: cvar.c:278
Cmd_RemoveCommand
void Cmd_RemoveCommand(char *cmd_name)
Definition: cmd.c:724
CL_Init
void CL_Init(void)
Definition: cl_main.c:1823
Cbuf_ExecuteText
void Cbuf_ExecuteText(int exec_when, char *text)
Definition: cmd.c:171
MSG_WriteChar
void MSG_WriteChar(sizebuf_t *sb, int c)
Definition: common.c:309
Com_ServerState
int Com_ServerState(void)
Definition: common.c:275
MSG_ReadCoord
float MSG_ReadCoord(sizebuf_t *sb)
Definition: common.c:832
NET_StringToAdr
qboolean NET_StringToAdr(char *s, netadr_t *a)
Definition: net_wins.c:257
COM_ClearArgv
void COM_ClearArgv(int arg)
Definition: common.c:999
Sys_ConsoleInput
char * Sys_ConsoleInput(void)
Definition: sys_win.c:265
CM_InlineModel
cmodel_t * CM_InlineModel(char *name)
Definition: cmodel.c:639
MSG_ReadAngle16
float MSG_ReadAngle16(sizebuf_t *sb)
Definition: common.c:849
msg
cvar_t * msg
Definition: cl_main.c:98
pm_airaccelerate
float pm_airaccelerate
Definition: pmove.c:57
sizebuf_s::maxsize
int maxsize
Definition: qcommon.h:80
netchan_t::fatal_error
qboolean fatal_error
Definition: qcommon.h:576
netchan_t::incoming_reliable_acknowledged
int incoming_reliable_acknowledged
Definition: qcommon.h:591
CM_WriteAreaBits
int CM_WriteAreaBits(byte *buffer, int area)
Definition: cmodel.c:1686
SZ_Print
void SZ_Print(sizebuf_t *buf, char *data)
Definition: common.c:945
SCR_DebugGraph
void SCR_DebugGraph(float value, int color)
Definition: cl_scrn.c:139
BigLong
int BigLong(int l)
Definition: q_shared.c:947
LittleFloat
float LittleFloat(float l)
Definition: q_shared.c:950
MSG_ReadChar
int MSG_ReadChar(sizebuf_t *sb)
Definition: common.c:709
Netchan_Transmit
void Netchan_Transmit(netchan_t *chan, int length, byte *data)
Definition: net_chan.c:213
Cmd_AddCommand
void Cmd_AddCommand(char *cmd_name, xcommand_t function)
Definition: cmd.c:691
SZ_GetSpace
void * SZ_GetSpace(sizebuf_t *buf, int length)
Definition: common.c:917
Cvar_GetLatchedVars
void Cvar_GetLatchedVars(void)
Definition: cvar.c:336
LittleLong
int LittleLong(int l)
Definition: q_shared.c:948
MSG_WritePos
void MSG_WritePos(sizebuf_t *sb, vec3_t pos)
Definition: common.c:388
MSG_WriteDeltaUsercmd
void MSG_WriteDeltaUsercmd(sizebuf_t *sb, struct usercmd_s *from, struct usercmd_s *cmd)
Definition: common.c:406
Cbuf_InsertText
void Cbuf_InsertText(char *text)
Definition: cmd.c:114
netadrtype_t
netadrtype_t
Definition: qcommon.h:533
svc_ops_e
svc_ops_e
Definition: qcommon.h:203
NET_SendPacket
void NET_SendPacket(netsrc_t sock, int length, void *data, netadr_t to)
Definition: net_wins.c:395
net_from
netadr_t net_from
Definition: net_chan.c:81
CM_NumClusters
int CM_NumClusters(void)
Definition: cmodel.c:652
Cvar_CompleteVariable
char * Cvar_CompleteVariable(char *partial)
Definition: cvar.c:95
netchan_t::last_sent
int last_sent
Definition: qcommon.h:583
COM_AddParm
void COM_AddParm(char *parm)
Definition: common.c:1035
Netchan_NeedReliable
qboolean Netchan_NeedReliable(netchan_t *chan)
Definition: net_chan.c:183
CL_Shutdown
void CL_Shutdown(void)
Definition: cl_main.c:1868
Sys_SendKeyEvents
void Sys_SendKeyEvents(void)
Definition: sys_win.c:376
COM_Argv
char * COM_Argv(int arg)
Definition: common.c:992
Sys_ConsoleOutput
void Sys_ConsoleOutput(char *string)
Definition: sys_win.c:345
FS_ExecAutoexec
void FS_ExecAutoexec(void)
Definition: files.c:600
CM_HeadnodeVisible
qboolean CM_HeadnodeVisible(int headnode, byte *visbits)
Definition: cmodel.c:1748
MSG_ReadDir
void MSG_ReadDir(sizebuf_t *sb, vec3_t vector)
Definition: common.c:483
CM_WritePortalState
void CM_WritePortalState(FILE *f)
Definition: cmodel.c:1721
Z_Malloc
void * Z_Malloc(int size)
Definition: common.c:1223
Cvar_Get
cvar_t * Cvar_Get(char *var_name, char *value, int flags)
Definition: cvar.c:127
Pmove
void Pmove(pmove_t *pmove)
Definition: pmove.c:1240
COM_InitArgv
void COM_InitArgv(int argc, char **argv)
Definition: common.c:1012
Sys_Quit
void Sys_Quit(void)
Definition: sys_win.c:90
CRC_ProcessByte
void CRC_ProcessByte(unsigned short *crcvalue, byte data)
Definition: crc.c:72
Cmd_Argv
char * Cmd_Argv(int arg)
Definition: cmd.c:517
Con_Print
void Con_Print(char *text)
Definition: console.c:359
Cmd_Argc
int Cmd_Argc(void)
Definition: cmd.c:507
svc_deltapacketentities
@ svc_deltapacketentities
Definition: qcommon.h:228
FS_SetGamedir
void FS_SetGamedir(char *dir)
Definition: files.c:638
CM_TransformedBoxTrace
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)
Definition: cmodel.c:1451
Z_FreeTags
void Z_FreeTags(int tag)
Definition: common.c:1177
Sys_AppActivate
void Sys_AppActivate(void)
Definition: sys_win.c:437
Cvar_VariableValue
float Cvar_VariableValue(char *var_name)
Definition: cvar.c:63
Cbuf_Init
void Cbuf_Init(void)
Definition: cmd.c:78
MSG_WriteAngle
void MSG_WriteAngle(sizebuf_t *sb, float f)
Definition: common.c:395
host_speeds
cvar_t * host_speeds
Definition: common.c:39
CM_TransformedPointContents
int CM_TransformedPointContents(vec3_t p, int headnode, vec3_t origin, vec3_t angles)
Definition: cmodel.c:937
Netchan_OutOfBand
void Netchan_OutOfBand(int net_socket, netadr_t adr, int length, byte *data)
Definition: net_chan.c:110
svc_layout
@ svc_layout
Definition: qcommon.h:211
SV_Init
void SV_Init(void)
Definition: sv_main.c:948
userinfo_modified
qboolean userinfo_modified
Definition: cvar.c:485
cmodel_s
Definition: q_shared.h:428
Cmd_TokenizeString
void Cmd_TokenizeString(char *text, qboolean macroExpand)
Definition: cmd.c:620
clc_userinfo
@ clc_userinfo
Definition: qcommon.h:242
MSG_ReadByte
int MSG_ReadByte(sizebuf_t *sb)
Definition: common.c:722
time_before_ref
int time_before_ref
Definition: common.c:56
Cbuf_CopyToDefer
void Cbuf_CopyToDefer(void)
Definition: cmd.c:147
CM_LeafCluster
int CM_LeafCluster(int leafnum)
Definition: cmodel.c:674
MSG_WriteLong
void MSG_WriteLong(sizebuf_t *sb, int c)
Definition: common.c:349
Cvar_FullSet
cvar_t * Cvar_FullSet(char *var_name, char *value, int flags)
Definition: cvar.c:288
svc_disconnect
@ svc_disconnect
Definition: qcommon.h:216
svc_serverdata
@ svc_serverdata
Definition: qcommon.h:221
name
cvar_t * name
Definition: cl_main.c:94
Qcommon_Init
void Qcommon_Init(int argc, char **argv)
Definition: common.c:1430
CM_SetAreaPortalState
void CM_SetAreaPortalState(int portalnum, qboolean open)
Definition: cmodel.c:1653
NET_Config
void NET_Config(qboolean multiplayer)
Definition: net_wins.c:690
netchan_t::remote_address
netadr_t remote_address
Definition: qcommon.h:585
CM_LoadMap
cmodel_t * CM_LoadMap(char *name, qboolean clientload, unsigned *checksum)
Definition: cmodel.c:548
CM_LeafArea
int CM_LeafArea(int leafnum)
Definition: cmodel.c:681
MAX_MSGLEN
#define MAX_MSGLEN
Definition: qcommon.h:527
Cvar_WriteVariables
void Cvar_WriteVariables(char *path)
Definition: cvar.c:429
netchan_t::reliable_length
int reliable_length
Definition: qcommon.h:604
netadr_t::type
netadrtype_t type
Definition: qcommon.h:540
SV_Shutdown
void SV_Shutdown(char *finalmsg, qboolean reconnect)
Definition: sv_main.c:1035
svc_temp_entity
@ svc_temp_entity
Definition: qcommon.h:210
Cvar_ForceSet
cvar_t * Cvar_ForceSet(char *var_name, char *value)
Definition: cvar.c:268
NET_Init
void NET_Init(void)
Definition: net_wins.c:762
FS_LoadFile
int FS_LoadFile(char *path, void **buffer)
Definition: files.c:394
MSG_ReadFloat
float MSG_ReadFloat(sizebuf_t *sb)
Definition: common.c:767
Cvar_Command
qboolean Cvar_Command(void)
Definition: cvar.c:363
Netchan_OutOfBandPrint
void Netchan_OutOfBandPrint(int net_socket, netadr_t adr, char *format,...)
Definition: net_chan.c:132
MSG_ReadStringLine
char * MSG_ReadStringLine(sizebuf_t *sb)
Definition: common.c:812
COM_CheckParm
int COM_CheckParm(char *parm)
Definition: common.c:974
FS_FOpenFile
int FS_FOpenFile(char *filename, FILE **file)
Definition: files.c:206
Com_Error
void Com_Error(int code, char *fmt,...)
Definition: common.c:203
Cbuf_AddText
void Cbuf_AddText(char *text)
Definition: cmd.c:90
qport
cvar_t * qport
Definition: net_chan.c:79
SZ_Clear
void SZ_Clear(sizebuf_t *buf)
Definition: common.c:911
netchan_t::outgoing_sequence
int outgoing_sequence
Definition: qcommon.h:595
NET_IsLocalAddress
qboolean NET_IsLocalAddress(netadr_t adr)
Definition: net_wins.c:277
CM_AreasConnected
qboolean CM_AreasConnected(int area1, int area2)
Definition: cmodel.c:1662
Cmd_CompleteCommand
char * Cmd_CompleteCommand(char *partial)
Definition: cmd.c:772
log_stats
cvar_t * log_stats
Definition: common.c:40
CM_ClusterPVS
byte * CM_ClusterPVS(int cluster)
Definition: cmodel.c:1575
netchan_t::reliable_sequence
int reliable_sequence
Definition: qcommon.h:596
usercmd_s
Definition: q_shared.h:513
CM_NumInlineModels
int CM_NumInlineModels(void)
Definition: cmodel.c:657
Com_BlockChecksum
unsigned Com_BlockChecksum(void *buffer, int length)
Definition: md4.c:165
SV_Frame
void SV_Frame(int msec)
Definition: sv_main.c:760
NET_Shutdown
void NET_Shutdown(void)
Definition: net_wins.c:788
NS_CLIENT
@ NS_CLIENT
Definition: qcommon.h:536
NET_GetPacket
qboolean NET_GetPacket(netsrc_t sock, netadr_t *net_from, sizebuf_t *net_message)
Definition: net_wins.c:331
netchan_t::last_received
int last_received
Definition: qcommon.h:582
svc_configstring
@ svc_configstring
Definition: qcommon.h:222
Cvar_Serverinfo
char * Cvar_Serverinfo(void)
Definition: cvar.c:510
netadr_t::port
unsigned short port
Definition: qcommon.h:550
Netchan_Init
void Netchan_Init(void)
Definition: net_chan.c:91
netsrc_t
netsrc_t
Definition: qcommon.h:536
xcommand_t
void(* xcommand_t)(void)
Definition: qcommon.h:402
Com_Quit
void Com_Quit(void)
Definition: common.c:255
NA_BROADCAST_IPX
@ NA_BROADCAST_IPX
Definition: qcommon.h:533
time_after_ref
int time_after_ref
Definition: common.c:57
sizebuf_s::allowoverflow
qboolean allowoverflow
Definition: qcommon.h:77
Qcommon_Shutdown
void Qcommon_Shutdown(void)
Definition: common.c:1619
SZ_Init
void SZ_Init(sizebuf_t *buf, byte *data, int length)
Definition: common.c:904
netchan_t::incoming_reliable_sequence
int incoming_reliable_sequence
Definition: qcommon.h:593
clc_bad
@ clc_bad
Definition: qcommon.h:239
sizebuf_s::cursize
int cursize
Definition: qcommon.h:81
CM_HeadnodeForBox
int CM_HeadnodeForBox(vec3_t mins, vec3_t maxs)
Definition: cmodel.c:775
net_message_buffer
byte net_message_buffer[MAX_MSGLEN]
Definition: net_chan.c:83
format
GLsizei GLenum format
Definition: qgl_win.c:131
netadr_t
Definition: qcommon.h:538
MSG_WriteString
void MSG_WriteString(sizebuf_t *sb, char *s)
Definition: common.c:375
crand
float crand(void)
Definition: common.c:1403
svc_packetentities
@ svc_packetentities
Definition: qcommon.h:227
sizebuf_t
struct sizebuf_s sizebuf_t
FS_FCloseFile
void FS_FCloseFile(FILE *f)
Definition: files.c:149
MSG_ReadAngle
float MSG_ReadAngle(sizebuf_t *sb)
Definition: common.c:844
clc_ops_e
clc_ops_e
Definition: qcommon.h:237
FS_NextPath
char * FS_NextPath(char *prevpath)
Definition: files.c:865
Cmd_ForwardToServer
void Cmd_ForwardToServer(void)
Definition: cl_main.c:299
SZ_Write
void SZ_Write(sizebuf_t *buf, void *data, int length)
Definition: common.c:940
MSG_ReadDeltaUsercmd
void MSG_ReadDeltaUsercmd(sizebuf_t *sb, struct usercmd_s *from, struct usercmd_s *cmd)
Definition: common.c:854
Com_Printf
void Com_Printf(char *fmt,...)
Definition: common.c:102
Info_Print
void Info_Print(char *s)
Definition: common.c:1068
svc_download
@ svc_download
Definition: qcommon.h:225
Cbuf_Execute
void Cbuf_Execute(void)
Definition: cmd.c:194
NET_CompareAdr
qboolean NET_CompareAdr(netadr_t a, netadr_t b)
Definition: net_wins.c:103
BigFloat
float BigFloat(float l)
Definition: q_shared.c:949
svc_reconnect
@ svc_reconnect
Definition: qcommon.h:217
COM_Init
void COM_Init(void)
svc_spawnbaseline
@ svc_spawnbaseline
Definition: qcommon.h:223
clc_stringcmd
@ clc_stringcmd
Definition: qcommon.h:243
FS_Gamedir
char * FS_Gamedir(void)
Definition: files.c:590
NUMVERTEXNORMALS
#define NUMVERTEXNORMALS
Definition: qcommon.h:786
svc_muzzleflash2
@ svc_muzzleflash2
Definition: qcommon.h:209
clc_move
@ clc_move
Definition: qcommon.h:241
Cbuf_AddLateCommands
qboolean Cbuf_AddLateCommands(void)
Definition: cmd.c:296
svc_sound
@ svc_sound
Definition: qcommon.h:218
Cmd_Args
char * Cmd_Args(void)
Definition: cmd.c:531
CM_ReadPortalState
void CM_ReadPortalState(FILE *f)
Definition: cmodel.c:1734
MSG_WriteByte
void MSG_WriteByte(sizebuf_t *sb, int c)
Definition: common.c:322
svc_stufftext
@ svc_stufftext
Definition: qcommon.h:220
entity_state_s::angles
vec3_t angles
Definition: q_shared.h:1174
Sys_GetClipboardData
char * Sys_GetClipboardData(void)
Definition: sys_win.c:401
Com_MDPrintf
void Com_MDPrintf(char *fmt,...)
Definition: common.c:179
Cmd_Exists
qboolean Cmd_Exists(char *cmd_name)
Definition: cmd.c:752
CRC_Value
unsigned short CRC_Value(unsigned short crcvalue)
Definition: crc.c:77
clc_nop
@ clc_nop
Definition: qcommon.h:240
vec3_t
vec_t vec3_t[3]
Definition: q_shared.h:127
NA_LOOPBACK
@ NA_LOOPBACK
Definition: qcommon.h:533
Sys_GetGameAPI
void * Sys_GetGameAPI(void *parms)
Definition: sys_win.c:472
pmove_t
Definition: q_shared.h:525
Z_TagMalloc
void * Z_TagMalloc(int size, int tag)
Definition: common.c:1194
svc_print
@ svc_print
Definition: qcommon.h:219
MSG_WriteAngle16
void MSG_WriteAngle16(sizebuf_t *sb, float f)
Definition: common.c:400
CL_Frame
void CL_Frame(int msec)
Definition: cl_main.c:1720
Netchan_Process
qboolean Netchan_Process(netchan_t *chan, sizebuf_t *msg)
Definition: net_chan.c:298
Cvar_VariableString
char * Cvar_VariableString(char *var_name)
Definition: cvar.c:79
void
void(APIENTRY *qglAccum)(GLenum op
count
GLint GLsizei count
Definition: qgl_win.c:128
MSG_BeginReading
void MSG_BeginReading(sizebuf_t *sb)
Definition: common.c:703
CM_BoxTrace
trace_t CM_BoxTrace(vec3_t start, vec3_t end, vec3_t mins, vec3_t maxs, int headnode, int brushmask)
Definition: cmodel.c:1350
FS_CreatePath
void FS_CreatePath(char *path)
Definition: files.c:125
developer
cvar_t * developer
Definition: common.c:41
netchan_t::qport
int qport
Definition: qcommon.h:586
MSG_ReadData
void MSG_ReadData(sizebuf_t *sb, void *buffer, int size)
Definition: common.c:893