From 98b8e36bdc8087bc6236c8567a63696099a7eeae Mon Sep 17 00:00:00 2001 From: Alison Watson Date: Mon, 25 Nov 2019 01:41:23 -0500 Subject: [PATCH] remove useless code --- source/bgmusic.c | 2 +- source/bspfile.h | 96 ----------------------------------------------- source/cd_sdl.c | 11 +++--- source/main_sdl.c | 1 - source/quakedef.h | 7 ---- 5 files changed, 6 insertions(+), 111 deletions(-) diff --git a/source/bgmusic.c b/source/bgmusic.c index 65df3ca..68e1b68 100644 --- a/source/bgmusic.c +++ b/source/bgmusic.c @@ -292,7 +292,7 @@ void BGM_PlayCDtrack (byte track, qboolean looping) BGM_Stop(); if (CDAudio_Play(track, looping) == 0) - return; /* success */ + return; /* success */ if (music_handlers == NULL) return; diff --git a/source/bspfile.h b/source/bspfile.h index 6da832f..230b7fa 100644 --- a/source/bspfile.h +++ b/source/bspfile.h @@ -310,101 +310,5 @@ typedef struct //============================================================================ -#ifndef QUAKE_GAME - -#define ANGLE_UP -1 -#define ANGLE_DOWN -2 - - -// the utilities get to be lazy and just use large static arrays - -extern int nummodels; -extern dmodel_t dmodels[MAX_MAP_MODELS]; - -extern int visdatasize; -extern byte dvisdata[MAX_MAP_VISIBILITY]; - -extern int lightdatasize; -extern byte dlightdata[MAX_MAP_LIGHTING]; - -extern int texdatasize; -extern byte dtexdata[MAX_MAP_MIPTEX]; // (dmiptexlump_t) - -extern int entdatasize; -extern char dentdata[MAX_MAP_ENTSTRING]; - -//extern int numleafs; -//extern dleaf_t dleafs[MAX_MAP_LEAFS]; - -extern int numplanes; -extern dplane_t dplanes[MAX_MAP_PLANES]; - -extern int numvertexes; -extern dvertex_t dvertexes[MAX_MAP_VERTS]; - -extern int numnodes; -extern dnode_t dnodes[MAX_MAP_NODES]; - -extern int numtexinfo; -extern texinfo_t texinfo[MAX_MAP_TEXINFO]; - -extern int numfaces; -extern dface_t dfaces[MAX_MAP_FACES]; - -extern int numclipnodes; -extern dclipnode_t dclipnodes[MAX_MAP_CLIPNODES]; - -extern int numedges; -extern dedge_t dedges[MAX_MAP_EDGES]; - -extern int nummarksurfaces; -extern unsigned short dmarksurfaces[MAX_MAP_MARKSURFACES]; - -extern int numsurfedges; -extern int dsurfedges[MAX_MAP_SURFEDGES]; - - -void DecompressVis (byte *in, byte *decompressed); -int CompressVis (byte *vis, byte *dest); - -void LoadBSPFile (char *filename); -void WriteBSPFile (char *filename); -void PrintBSPFileSizes (void); - -//=============== - - -typedef struct epair_s -{ - struct epair_s *next; - char *key; - char *value; -} epair_t; - -typedef struct -{ - vec3_t origin; - int firstbrush; - int numbrushes; - epair_t *epairs; -} entity_t; - -extern int num_entities; -extern entity_t entities[MAX_MAP_ENTITIES]; - -void ParseEntities (void); -void UnparseEntities (void); - -void SetKeyValue (entity_t *ent, char *key, char *value); -char *ValueForKey (entity_t *ent, char *key); -// will return "" if not present - -vec_t FloatForKey (entity_t *ent, char *key); -void GetVectorForKey (entity_t *ent, char *key, vec3_t vec); - -epair_t *ParseEpair (void); - -#endif /* QUAKE_GAME */ - #endif /* __BSPFILE_H */ diff --git a/source/cd_sdl.c b/source/cd_sdl.c index 03f75e0..e23c2a3 100644 --- a/source/cd_sdl.c +++ b/source/cd_sdl.c @@ -24,16 +24,15 @@ #include -#ifndef SDL_INIT_CDROM +#if !defined(SDL_INIT_CDROM) -/* SDL dropped support for - cd audio since v1.3.0 */ -#pragma message("Warning: SDL CDAudio support disabled") +/* SDL dropped support for CD audio since v1.3.0 */ #include "cd_null.c" -#else /* SDL_INIT_CDROM */ +#else /* defined(SDL_INIT_CDROM) */ #include "quakedef.h" +#include "cdaudio.h" static qboolean cdValid = false; static qboolean playing = false; @@ -581,5 +580,5 @@ void CDAudio_Shutdown(void) SDL_QuitSubSystem(SDL_INIT_CDROM); } -#endif /* SDL_INIT_CDROM */ +#endif /* defined(SDL_INIT_CDROM) */ diff --git a/source/main_sdl.c b/source/main_sdl.c index b63fdc4..b6a53d8 100644 --- a/source/main_sdl.c +++ b/source/main_sdl.c @@ -106,7 +106,6 @@ int main(int argc, char *argv[]) Sys_Error ("Not enough memory free; check disk space\n"); Sys_Printf("Quake %1.2f (c) id Software\n", VERSION); - Sys_Printf("GLQuake %1.2f (c) id Software\n", GLQUAKE_VERSION); Sys_Printf("FitzQuake %1.2f (c) John Fitzgibbons\n", FITZQUAKE_VERSION); Sys_Printf("FitzQuake SDL port (c) SleepwalkR, Baker\n"); Sys_Printf("QuakeSpasm " QUAKESPASM_VER_STRING " (c) Ozkan Sezer, Eric Wasylishen & others\n"); diff --git a/source/quakedef.h b/source/quakedef.h index 5096ec1..e767393 100644 --- a/source/quakedef.h +++ b/source/quakedef.h @@ -26,14 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // quakedef.h -- primary header for client -#define QUAKE_GAME // as opposed to utilities - #define VERSION 1.09 -#define GLQUAKE_VERSION 1.00 -#define D3DQUAKE_VERSION 0.01 -#define WINQUAKE_VERSION 0.996 -#define LINUX_VERSION 1.30 -#define X11_VERSION 1.10 #define FITZQUAKE_VERSION 0.85 //johnfitz #define QUAKESPASM_VERSION 0.93