shithub: qk1

Download patch

ref: 8bf29be70f8e1fcf8161d1339fa3996af7b08500
parent: 0d4b3504cc557b5ded1180e2fd00cd210c1024d7
author: Konstantinn Bonnet <qu7uux@gmail.com>
date: Thu Feb 26 07:39:03 EST 2015

remove some dead code; don't include r_local.h in d_local.h

the stuff from bspfile.h is afaict not used anywhere even beyond WinQuake and QW

--- a/bspfile.h
+++ b/bspfile.h
@@ -267,37 +267,4 @@
 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
--- a/d_edge.c
+++ b/d_edge.c
@@ -2,6 +2,7 @@
 #include <libc.h>
 #include <stdio.h>
 #include "quakedef.h"
+#include "r_local.h"
 #include "d_local.h"
 
 static int	miplevel;
--- a/d_init.c
+++ b/d_init.c
@@ -4,6 +4,7 @@
 #include <libc.h>
 #include <stdio.h>
 #include "quakedef.h"
+#include "r_local.h"
 #include "d_local.h"
 
 #define NUM_MIPS	4
--- a/d_local.h
+++ b/d_local.h
@@ -1,7 +1,5 @@
 // d_local.h:  private rasterization driver defs
 
-#include "r_shared.h"
-
 //
 // TODO: fine-tune this; it's based on providing some overage even if there
 // is a 2k-wide scan, with subdivision every 8, for 256 spans of 12 bytes each
--- a/d_modech.c
+++ b/d_modech.c
@@ -4,6 +4,7 @@
 #include <libc.h>
 #include <stdio.h>
 #include "quakedef.h"
+#include "r_local.h"
 #include "d_local.h"
 
 int	d_vrectx, d_vrecty, d_vrectright_particle, d_vrectbottom_particle;
--- a/d_part.c
+++ b/d_part.c
@@ -4,6 +4,7 @@
 #include <libc.h>
 #include <stdio.h>
 #include "quakedef.h"
+#include "r_local.h"
 #include "d_local.h"
 
 
--- a/d_sprite.c
+++ b/d_sprite.c
@@ -5,6 +5,7 @@
 #include <libc.h>
 #include <stdio.h>
 #include "quakedef.h"
+#include "r_local.h"
 #include "d_local.h"
 
 static int		sprite_height;
--- a/d_surf.c
+++ b/d_surf.c
@@ -4,8 +4,8 @@
 #include <libc.h>
 #include <stdio.h>
 #include "quakedef.h"
-#include "d_local.h"
 #include "r_local.h"
+#include "d_local.h"
 
 float           surfscale;
 qboolean        r_cache_thrash;         // set if surface cache is thrashing
--- a/d_zpoint.c
+++ b/d_zpoint.c
@@ -4,6 +4,7 @@
 #include <libc.h>
 #include <stdio.h>
 #include "quakedef.h"
+#include "r_local.h"
 #include "d_local.h"
 
 
--- a/modelgen.h
+++ b/modelgen.h
@@ -8,23 +8,6 @@
 // * pass data from one to the other via model files.      *
 // *********************************************************
 
-#ifdef INCLUDELIBS
-
-#include <u.h>
-#include <libc.h>
-//#include <stdlib.h>
-//#include <stdio.h>
-//#include <math.h>
-//#include <string.h>
-
-#include "cmdlib.h"
-#include "scriplib.h"
-#include "trilib.h"
-#include "lbmlib.h"
-#include "mathlib.h"
-
-#endif
-
 #define ALIAS_VERSION	6
 
 /* defined in r_shared.h */
--- a/r_shared.h
+++ b/r_shared.h
@@ -3,9 +3,6 @@
 
 // FIXME: clean up and move into d_iface.h
 
-#ifndef _R_SHARED_H_
-#define _R_SHARED_H_
-
 #define	MAXVERTS	16					// max points in a surface polygon
 #define MAXWORKINGVERTS	(MAXVERTS+4)	// max points in an intermediate
 										//  polygon (while processing)
@@ -131,5 +128,3 @@
 	float			nearzi;
 	medge_t			*owner;
 } edge_t;
-
-#endif	// _R_SHARED_H_
--- a/spritegn.h
+++ b/spritegn.h
@@ -23,22 +23,6 @@
 // <endrepeat>
 //-------------------------------------------------------
 
-#ifdef INCLUDELIBS
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <math.h>
-#include <string.h>
-
-#include "cmdlib.h"
-#include "scriplib.h"
-#include "dictlib.h"
-#include "trilib.h"
-#include "lbmlib.h"
-#include "mathlib.h"
-
-#endif
-
 #define SPRITE_VERSION	1
 
 // must match definition in modelgen.h
--- a/vid_9.c
+++ b/vid_9.c
@@ -3,6 +3,7 @@
 #include <draw.h>
 #include <stdio.h>
 #include "quakedef.h"
+#include "r_local.h"
 #include "d_local.h"
 
 extern int scr_fullupdate;