port in some improvements from OT (namely fs_basepath, etc, though commandline parsing isn't finished yet)

split up the headerfiles and such. common.[ch] and qwsvdef.h no longer exist. More work still needs to be done (esp for windows) but this should be a major improvement.
This commit is contained in:
Bill Currie 2000-05-21 08:24:45 +00:00
parent e471c785d8
commit af032b8d55
121 changed files with 1055 additions and 3086 deletions

View file

@ -36,14 +36,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define MINIMUM_MEMORY 0x550000
// up / down
#define PITCH 0
// left / right
#define YAW 1
// fall over
#define ROLL 2
#define MAX_SCOREBOARD 16 // max numbers of players
@ -143,4 +135,4 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define PRINT_HIGH 2 // critical messages
#define PRINT_CHAT 3 // chat messages
#endif // _BOTHDEFS_H
#endif // _BOTHDEFS_H

View file

@ -21,7 +21,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef _BSPFILE_H
#define _BSPFILE_H
#include "common.h"
#include "qtypes.h"
// upper design bounds

View file

@ -21,7 +21,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef _CDAUDIO_H
#define _CDAUDIO_H
#include "common.h"
int CDAudio_Init(void);
void CDAudio_Play(byte track, qboolean looping);
@ -31,4 +30,4 @@ void CDAudio_Resume(void);
void CDAudio_Shutdown(void);
void CDAudio_Update(void);
#endif // _CDAUDIO_H
#endif // _CDAUDIO_H

View file

@ -29,7 +29,7 @@
$Id$
*/
#include <stdio.h>
#include "quakeio.h"
#define MAX_SERVER_LIST 256
typedef struct {
@ -47,7 +47,7 @@ int Server_List_Reset_NoFree(int i);
int Server_List_Reset(int i);
void Server_List_Switch(int a,int b);
int Server_List_Len(void);
int Server_List_Load(FILE *f);
int Server_List_Save(FILE *f);
int Server_List_Load(QFile *f);
int Server_List_Save(QFile *f);
char *gettokstart (char *str, int req, char delim);
int gettoklen(char *str, int req, char delim);

View file

@ -28,7 +28,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <stdio.h>
#include "common.h"
#include "info.h"
#include "mathlib.h"
#include "protocol.h"
#include "zone.h"
@ -37,6 +37,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "sound.h"
#include "render.h"
#include "cvar.h"
#include "quakefs.h"
typedef struct
{
@ -191,7 +192,7 @@ typedef struct
int qport;
FILE *download; // file transfer from server
QFile *download; // file transfer from server
char downloadtempname[MAX_OSPATH];
char downloadname[MAX_OSPATH];
int downloadnumber;
@ -207,7 +208,7 @@ typedef struct
qboolean demorecording;
qboolean demoplayback;
qboolean timedemo;
FILE *demofile;
QFile *demofile;
float td_lastframe; // to meter out one message a frame
int td_startframe; // host_framecount at start
float td_starttime; // realtime at second frame of timedemo

View file

@ -23,6 +23,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef _CMD_H
#define _CMD_H
#include "qtypes.h"
//===========================================================================
/*
@ -110,4 +112,7 @@ void Cmd_ForwardToServer (void);
void Cmd_StuffCmds_f (void);
extern char com_token[1024];
char *COM_Parse (char *data);
#endif // _CMD_H

View file

@ -29,8 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# include "config.h"
#endif
#include "common.h"
//#include "var.h"
#include "cvar.h"
/* The host system specifies the base of the directory tree, the
command line parms passed to the program, and the amount of memory
@ -57,5 +56,9 @@ extern qboolean host_initialized; /* True if into command execution. */
extern double host_frametime;
extern double realtime; /* Not bounded in any way, changed at
start of every frame, never reset */
extern qboolean standard_quake, rogue, hipnotic;
char *va(char *format, ...);
// does a varargs printf into a temp buffer
#endif /* __QF_COMMDEF_H */

View file

@ -1,231 +0,0 @@
/*
Copyright (C) 1996-1997 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// common.h -- general definitions
#ifndef _COMMON_H
#define _COMMON_H
//#include "protocol.h" // for struct usercmd_s
#ifndef _DEF_BYTE_
# define _DEF_BYTE_
typedef unsigned char byte;
#endif
// KJB Undefined true and false defined in SciTech's DEBUG.H header
#undef true
#undef false
typedef enum {false, true} qboolean;
#define MAX_INFO_STRING 196
#define MAX_SERVERINFO_STRING 512
#define MAX_LOCALINFO_STRING 32768
//============================================================================
typedef struct sizebuf_s
{
qboolean allowoverflow; // if false, do a Sys_Error
qboolean overflowed; // set to true if the buffer size failed
byte *data;
int maxsize;
int cursize;
} sizebuf_t;
void SZ_Clear (sizebuf_t *buf);
void *SZ_GetSpace (sizebuf_t *buf, int length);
void SZ_Write (sizebuf_t *buf, void *data, int length);
void SZ_Print (sizebuf_t *buf, char *data); // strcats onto the sizebuf
//============================================================================
typedef struct link_s
{
struct link_s *prev, *next;
} link_t;
void ClearLink (link_t *l);
void RemoveLink (link_t *l);
void InsertLinkBefore (link_t *l, link_t *before);
void InsertLinkAfter (link_t *l, link_t *after);
// (type *)STRUCT_FROM_LINK(link_t *link, type, member)
// ent = STRUCT_FROM_LINK(link,entity_t,order)
// FIXME: remove this mess!
#define STRUCT_FROM_LINK(l,t,m) ((t *)((byte *)l - (int)&(((t *)0)->m)))
//============================================================================
#ifndef NULL
#define NULL ((void *)0)
#endif
#define Q_MAXCHAR ((char)0x7f)
#define Q_MAXSHORT ((short)0x7fff)
#define Q_MAXINT ((int)0x7fffffff)
#define Q_MAXLONG ((int)0x7fffffff)
#define Q_MAXFLOAT ((int)0x7fffffff)
#define Q_MINCHAR ((char)0x80)
#define Q_MINSHORT ((short)0x8000)
#define Q_MININT ((int)0x80000000)
#define Q_MINLONG ((int)0x80000000)
#define Q_MINFLOAT ((int)0x7fffffff)
//============================================================================
extern qboolean bigendien;
extern short (*BigShort) (short l);
extern short (*LittleShort) (short l);
extern int (*BigLong) (int l);
extern int (*LittleLong) (int l);
extern float (*BigFloat) (float l);
extern float (*LittleFloat) (float l);
//============================================================================
extern struct usercmd_s nullcmd;
void MSG_WriteChar (sizebuf_t *sb, int c);
void MSG_WriteByte (sizebuf_t *sb, int c);
void MSG_WriteShort (sizebuf_t *sb, int c);
void MSG_WriteLong (sizebuf_t *sb, int c);
void MSG_WriteFloat (sizebuf_t *sb, float f);
void MSG_WriteString (sizebuf_t *sb, char *s);
void MSG_WriteCoord (sizebuf_t *sb, float f);
void MSG_WriteAngle (sizebuf_t *sb, float f);
void MSG_WriteAngle16 (sizebuf_t *sb, float f);
void MSG_WriteDeltaUsercmd (sizebuf_t *sb, struct usercmd_s *from, struct usercmd_s *cmd);
extern int msg_readcount;
extern qboolean msg_badread; // set if a read goes beyond end of message
void MSG_BeginReading (void);
int MSG_GetReadCount(void);
int MSG_ReadChar (void);
int MSG_ReadByte (void);
int MSG_ReadShort (void);
int MSG_ReadLong (void);
float MSG_ReadFloat (void);
char *MSG_ReadString (void);
char *MSG_ReadStringLine (void);
float MSG_ReadCoord (void);
float MSG_ReadAngle (void);
float MSG_ReadAngle16 (void);
void MSG_ReadDeltaUsercmd (struct usercmd_s *from, struct usercmd_s *cmd);
//============================================================================
#define Q_memset(d, f, c) memset((d), (f), (c))
#define Q_memcpy(d, s, c) memcpy((d), (s), (c))
#define Q_memcmp(m1, m2, c) memcmp((m1), (m2), (c))
#define Q_strcpy(d, s) strcpy((d), (s))
#define Q_strncpy(d, s, n) strncpy((d), (s), (n))
#define Q_strlen(s) ((int)strlen(s))
#define Q_strrchr(s, c) strrchr((s), (c))
#define Q_strcat(d, s) strcat((d), (s))
#define Q_strcmp(s1, s2) strcmp((s1), (s2))
#define Q_strncmp(s1, s2, n) strncmp((s1), (s2), (n))
#ifdef _WIN32
#ifdef __BORLANDC__
#define Q_strcasecmp(s1, s2) stricmp((s1), (s2))
#define Q_strncasecmp(s1, s2, n) strnicmp((s1), (s2), (n))
#else
#define Q_strcasecmp(s1, s2) _stricmp((s1), (s2))
#define Q_strncasecmp(s1, s2, n) _strnicmp((s1), (s2), (n))
#endif
#else
#define Q_strcasecmp(s1, s2) strcasecmp((s1), (s2))
#define Q_strncasecmp(s1, s2, n) strncasecmp((s1), (s2), (n))
#endif
int Q_atoi (char *str);
float Q_atof (char *str);
//============================================================================
extern char com_token[1024];
extern qboolean com_eof;
char *COM_Parse (char *data);
extern int com_argc;
extern char **com_argv;
int COM_CheckParm (char *parm);
void COM_AddParm (char *parm);
void COM_Init (void);
void COM_InitArgv (int argc, char **argv);
char *COM_SkipPath (char *pathname);
void COM_StripExtension (char *in, char *out);
void COM_FileBase (char *in, char *out);
void COM_DefaultExtension (char *path, char *extension);
char *va(char *format, ...);
// does a varargs printf into a temp buffer
//============================================================================
extern int com_filesize;
struct cache_user_s;
extern char com_gamedir[MAX_OSPATH];
void COM_WriteFile (char *filename, void *data, int len);
int COM_FOpenFile (char *filename, FILE **file);
void COM_CloseFile (FILE *h);
byte *COM_LoadStackFile (char *path, void *buffer, int bufsize);
byte *COM_LoadTempFile (char *path);
byte *COM_LoadHunkFile (char *path);
void COM_LoadCacheFile (char *path, struct cache_user_s *cu);
void COM_CreatePath (char *path);
void COM_Gamedir (char *dir);
extern struct cvar_s *registered;
extern qboolean standard_quake, rogue, hipnotic;
char *Info_ValueForKey (char *s, char *key);
void Info_RemoveKey (char *s, char *key);
void Info_RemovePrefixedKeys (char *start, char prefix);
void Info_SetValueForKey (char *s, char *key, char *value, int maxsize);
void Info_SetValueForStarKey (char *s, char *key, char *value, int maxsize);
void Info_Print (char *s);
unsigned Com_BlockChecksum (void *buffer, int length);
void Com_BlockFullChecksum (void *buffer, int len, unsigned char *outbuf);
byte COM_BlockSequenceCheckByte (byte *base, int length, int sequence, unsigned mapchecksum);
byte COM_BlockSequenceCRCByte (byte *base, int length, int sequence);
int build_number( void );
#endif // _COMMON_H

View file

@ -24,6 +24,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// console
//
#include "qtypes.h"
#define CON_TEXTSIZE 16384
typedef struct
{

View file

@ -22,9 +22,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef _CRC_H
#define _CRC_H
#include "qtypes.h"
void CRC_Init(unsigned short *crcvalue);
void CRC_ProcessByte(unsigned short *crcvalue, byte data);
unsigned short CRC_Value(unsigned short crcvalue);
unsigned short CRC_Block (byte *start, int count);
#endif // _CRC_H
#endif // _CRC_H

View file

@ -31,6 +31,9 @@
#ifndef _CVAR_H
#define _CVAR_H
#include "qtypes.h"
#include "quakeio.h"
typedef struct cvar_s
{
char *name;
@ -99,7 +102,7 @@ qboolean Cvar_Command (void);
// command. Returns true if the command was a variable reference that
// was handled. (print or change)
void Cvar_WriteVariables (FILE *f);
void Cvar_WriteVariables (QFile *f);
// Writes lines containing "set variable value" for all variables
// with the archive flag set to true.

View file

@ -22,7 +22,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef _D_IFACE_H
#define _D_IFACE_H
#include "common.h"
#include "mathlib.h"
#include "model.h"
#include "cvar.h"

View file

@ -19,6 +19,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// d_local.h: private rasterization driver defs
#ifndef __d_local_h
#define __d_local_h
#include "r_shared.h"
//
@ -111,3 +114,4 @@ extern float d_scalemip[3];
extern void (*d_drawspans) (espan_t *pspan);
#endif

View file

@ -35,10 +35,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <GL/gl.h>
#include <GL/glu.h>
#include "common.h"
#include "model.h"
#include "render.h"
#include "cvar.h"
#include "wad.h"
#include "client.h"
// Ender: HackHackHack
#ifndef GLAPIENTRY
@ -352,4 +353,4 @@ void GL_BuildLightmaps (void);
//
void R_NetGraph (void);
#endif // _GLQUAKE_H
#endif // _GLQUAKE_H

View file

@ -28,7 +28,6 @@
#ifndef _IN_WIN_H
#define _IN_WIN_H
#include "common.h"
#include "protocol.h"
extern qboolean mouseactive;

View file

@ -21,8 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef _KEYS_H
#define _KEYS_H
#include <stdio.h>
#include "common.h"
#include "quakeio.h"
// these are the key numbers that should be passed to Key_Event
@ -167,7 +166,7 @@ extern qboolean chat_team;
void Key_Event (int key, qboolean down);
void Key_Init (void);
void Key_WriteBindings (FILE *f);
void Key_WriteBindings (QFile *f);
void Key_SetBinding (int keynum, char *binding);
void Key_ClearStates (void);

View file

@ -22,15 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef _MATHLIB_H
#define _MATHLIB_H
//#include "model.h"
typedef float vec_t;
typedef vec_t vec3_t[3];
typedef vec_t vec5_t[5];
typedef int fixed4_t;
typedef int fixed8_t;
typedef int fixed16_t;
#include "qtypes.h"
#ifndef M_PI
#define M_PI 3.14159265358979323846 // matches value in gcc v2 math.h
@ -48,6 +40,13 @@ extern int nanmask;
#define VectorAdd(a,b,c) {c[0]=a[0]+b[0];c[1]=a[1]+b[1];c[2]=a[2]+b[2];}
#define VectorCopy(a,b) {b[0]=a[0];b[1]=a[1];b[2]=a[2];}
// up / down
#define PITCH 0
// left / right
#define YAW 1
// fall over
#define ROLL 2
void VectorMA (vec3_t veca, float scale, vec3_t vecb, vec3_t vecc);
vec_t _DotProduct (vec3_t v1, vec3_t v2);

View file

@ -23,12 +23,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef _MODEL_H
#define _MODEL_H
#include "common.h"
#include "mathlib.h"
#include "qtypes.h"
#include "render.h"
#include "bspfile.h"
#include "modelgen.h"
#include "spritegn.h"
#include "modelgen.h"
#include "zone.h"
/*
@ -70,7 +70,6 @@ typedef struct
#define SIDE_BACK 1
#define SIDE_ON 2
// plane_t structure
// !!! if this is changed, it must be changed in asm_i386.h too !!!
typedef struct mplane_s

View file

@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef _NET_H
#define _NET_H
#include "common.h"
#include "sizebuf.h"
#include "cvar.h"
#define PORT_ANY -1
@ -38,8 +38,6 @@ extern netadr_t net_local_adr;
extern netadr_t net_from; // address of who sent the packet
extern sizebuf_t net_message;
/* extern cvar_t hostname;
CVAR_FIXME */
extern cvar_t *hostname;
extern int net_socket;

View file

@ -21,7 +21,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef _PMOVE_H
#define _PMOVE_H
#include "common.h"
#include "protocol.h"
#include "mathlib.h"
#include "model.h"

View file

@ -23,8 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef _PR_COMP_H
#define _PR_COMP_H
typedef int func_t;
typedef int string_t;
#include "qtypes.h"
typedef enum {ev_void, ev_string, ev_float, ev_vector, ev_entity, ev_field, ev_function, ev_pointer} etype_t;

View file

@ -21,10 +21,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef _PROGS_H
#define _PROGS_H
#include "common.h"
#include "protocol.h"
#include "pr_comp.h" // defs shared with qcc
#include "progdefs.h" // generated by program cdefs
#include "link.h"
typedef union eval_s
{

View file

@ -22,7 +22,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef _PROTOCOL_H
#define _PROTOCOL_H
#include "common.h"
#include "mathlib.h"
#define PROTOCOL_VERSION 28

View file

@ -40,39 +40,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <setjmp.h>
#include <time.h>
#include "bothdefs.h"
#include "common.h"
#include "bspfile.h"
#include "vid.h"
//#include "sys.h"
#include "zone.h"
#include "mathlib.h"
#include "wad.h"
#include "draw.h"
#include "qtypes.h"
#include "cvar.h"
#include "screen.h"
#include "net.h"
#include "protocol.h"
#include "cmd.h"
#include "sbar.h"
#include "sound.h"
#include "render.h"
#include "client.h"
#include "model.h"
#include "d_iface.h"
#include "input.h"
#include "keys.h"
#include "console.h"
#include "view.h"
#include "menu.h"
#include "crc.h"
#include "cdaudio.h"
#include "pmove.h"
#include "compat.h"
#include "commdef.h"
#define MAX_NUM_ARGVS 50

View file

@ -1,74 +0,0 @@
/*
Copyright (C) 1996-1997 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// qwsvdef.h -- primary header for server
#ifndef _QWSVDEF_H
#define _QWSVDEF_H
#define QUAKE_GAME // as opposed to utilities
//define PARANOID // speed sapping error checking
#if defined(_WIN32) && !defined(__GNUC__)
#pragma warning( disable : 4244 4127 4201 4214 4514 4305 4115 4018)
#endif
// FIXME: clean those includes -- yan
#include <math.h>
#include <string.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <setjmp.h>
#include <ctype.h>
#include "bothdefs.h"
#include "common.h"
#include "bspfile.h"
#include "sys.h"
#include "zone.h"
#include "mathlib.h"
#include "cvar.h"
#include "net.h"
#include "protocol.h"
#include "cmd.h"
#include "vid.h"
#include "render.h"
#include "model.h"
#include "crc.h"
#include "progs.h"
#include "server.h"
#include "world.h"
#include "pmove.h"
#include "compat.h"
#include "commdef.h"
void SV_Error (char *error, ...);
void SV_Init (quakeparms_t *parms);
void Con_Printf (char *fmt, ...);
void Con_DPrintf (char *fmt, ...);
#endif

View file

@ -22,7 +22,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef _R_LOCAL_H
#define _R_LOCAL_H
#include "common.h"
#include "mathlib.h"
#include "cvar.h"
#include "vid.h"

View file

@ -26,10 +26,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef _R_SHARED_H
#define _R_SHARED_H
#include "common.h"
#include "mathlib.h"
#include "cvar.h"
#include "model.h"
#include "d_iface.h"
#define MAXVERTS 16 // max points in a surface polygon
#define MAXWORKINGVERTS (MAXVERTS+4) // max points in an intermediate

View file

@ -23,7 +23,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef _RENDER_H
#define _RENDER_H
#include "common.h"
#include "mathlib.h"
#include "cvar.h"
#include "vid.h"

View file

@ -22,7 +22,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef _SCREEN_H
#define _SCREEN_H
#include "common.h"
#include "cvar.h"
void SCR_InitCvars (void);

View file

@ -22,11 +22,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef _SERVER_H
#define _SERVER_H
#include "common.h"
#include "commdef.h"
#include "net.h"
#include "cvar.h"
#include "protocol.h"
#include "model.h"
#include "progs.h"
#include "sizebuf.h"
#include "info.h"
#include "quakeio.h"
#define QW_SERVER
@ -175,7 +179,7 @@ typedef struct client_s
client_frame_t frames[UPDATE_BACKUP]; // updates can be deltad from here
FILE *download; // file being downloaded
QFile *download; // file being downloaded
int downloadsize; // total bytes
int downloadcount; // bytes sent
@ -187,7 +191,7 @@ typedef struct client_s
qboolean upgradewarn; // did we warn him?
FILE *upload;
QFile *upload;
char uploadfn[MAX_QPATH];
netadr_t snap_from;
qboolean remote_snap;
@ -351,12 +355,18 @@ extern char localmodels[MAX_MODELS][5]; // inline model names for precache
extern char localinfo[MAX_LOCALINFO_STRING+1];
extern int host_hunklevel;
extern FILE *sv_logfile;
extern FILE *sv_fraglogfile;
extern QFile *sv_logfile;
extern QFile *sv_fraglogfile;
//===========================================================
// FIXME: declare exported functions in their own relevant .h
void SV_Error (char *error, ...);
void SV_Init (quakeparms_t *parms);
void Con_Printf (char *fmt, ...);
void Con_DPrintf (char *fmt, ...);
//
// sv_main.c
//
@ -364,7 +374,6 @@ void SV_Shutdown (void);
void SV_Frame (float time);
void SV_FinalMessage (char *message);
void SV_DropClient (client_t *drop);
int SV_CalcPing (client_t *cl);
void SV_FullClientUpdate (client_t *client, sizebuf_t *buf);

View file

@ -22,7 +22,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef _SOUND_H
#define _SOUND_H
#include "common.h"
#include "mathlib.h"
#include "zone.h"
#include "cvar.h"

View file

@ -22,14 +22,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef _VID_H
#define _VID_H
#include "common.h"
#include "qtypes.h"
#define VID_CBITS 6
#define VID_GRADES (1 << VID_CBITS)
// a pixel can be one, two, or four bytes
typedef byte pixel_t;
typedef struct vrect_s
{
int x,y,width,height;

View file

@ -22,6 +22,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef _WAD_H
#define _WAD_H
#include "qtypes.h"
//===============
// TYPES
//===============

View file

@ -36,7 +36,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# include <mgraph.h>
#endif
#include "common.h"
#ifndef WM_MOUSEWHEEL
# define WM_MOUSEWHEEL 0x020A

View file

@ -22,7 +22,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef _WORLD_H
#define _WORLD_H
#include "common.h"
#include "mathlib.h"
#include "model.h"
#include "progs.h"