From 91e65b6c80a75c2e080646ae627c112808c00fa9 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Mon, 14 Nov 2011 11:18:22 +0900 Subject: [PATCH] Rename mplane_t to plane_t and clean up the mess. I got rather tired of there being multiple definitions of mostly compatible plane types (and I need a common type anyway). dplane_t still exists for now because I want to be careful when messing with the actual bsp format. --- include/QF/mathlib.h | 4 ++-- include/QF/model.h | 8 ++++---- include/QF/qtypes.h | 4 ++-- include/r_local.h | 4 ++-- include/world.h | 8 +------- libs/models/brush/model_brush.c | 4 ++-- libs/models/clip_hull.c | 6 +++--- libs/models/trace.c | 8 ++++---- libs/util/mathlib.c | 6 +++--- libs/video/renderer/gl/gl_rmain.c | 4 ++-- libs/video/renderer/gl/gl_rsurf.c | 4 ++-- libs/video/renderer/r_efrag.c | 2 +- libs/video/renderer/r_light.c | 16 ++++++++-------- libs/video/renderer/sw/sw_rbsp.c | 10 +++++----- libs/video/renderer/sw/sw_rdraw.c | 8 ++++---- libs/video/renderer/sw/sw_rmain.c | 2 +- libs/video/renderer/sw/sw_rmisc.c | 2 +- libs/video/renderer/sw32/sw32_rbsp.c | 10 +++++----- libs/video/renderer/sw32/sw32_rdraw.c | 8 ++++---- libs/video/renderer/sw32/sw32_rmain.c | 2 +- libs/video/renderer/sw32/sw32_rmisc.c | 2 +- nq/source/sv_main.c | 2 +- nq/source/world.c | 8 ++++---- qw/source/pmovetst.c | 8 ++++---- qw/source/sv_ents.c | 2 +- qw/source/world.c | 8 ++++---- tools/qfbsp/include/bsp5.h | 6 ------ tools/qfvis/include/vis.h | 5 ----- 28 files changed, 72 insertions(+), 89 deletions(-) diff --git a/include/QF/mathlib.h b/include/QF/mathlib.h index 7fbf0e828..894a36eb9 100644 --- a/include/QF/mathlib.h +++ b/include/QF/mathlib.h @@ -249,7 +249,7 @@ void AngleVectors (const vec3_t angles, vec3_t forward, vec3_t right, void AngleQuat (const vec3_t angles, quat_t q); void VectorVectors (const vec3_t forward, vec3_t right, vec3_t up); int BoxOnPlaneSide (const vec3_t emins, const vec3_t emaxs, - struct mplane_s *plane); + struct plane_s *plane); float anglemod (float a); void RotatePointAroundVector (vec3_t dst, const vec3_t axis, @@ -288,7 +288,7 @@ void QuatToMatrix (const quat_t q, vec_t *m, int homogenous, int vertical); VectorNegate ((sp)->normal, (dp)->normal); \ } while (0) -extern mplane_t * const frustum; +extern plane_t * const frustum; extern inline qboolean R_CullBox (const vec3_t mins, const vec3_t maxs); extern inline qboolean R_CullSphere (const vec3_t origin, const float radius); extern inline float VectorNormalize (vec3_t v); // returns vector length diff --git a/include/QF/model.h b/include/QF/model.h index 86c098c02..c0493f4d3 100644 --- a/include/QF/model.h +++ b/include/QF/model.h @@ -122,7 +122,7 @@ typedef struct glpoly_s { typedef struct msurface_s { int visframe; // should be drawn when node is crossed - mplane_t *plane; + plane_t *plane; int flags; int firstedge; // look up in model->surfedges[], negative numbers @@ -162,7 +162,7 @@ typedef struct mnode_s { struct mnode_s *parent; // node specific - mplane_t *plane; + plane_t *plane; struct mnode_s *children[2]; unsigned short firstsurface; @@ -197,7 +197,7 @@ typedef struct mclipnode_s { typedef struct hull_s { mclipnode_t *clipnodes; - mplane_t *planes; + plane_t *planes; int firstclipnode; int lastclipnode; vec3_t clip_mins; @@ -357,7 +357,7 @@ typedef struct model_s { dmodel_t *submodels; int numplanes; - mplane_t *planes; + plane_t *planes; int numleafs; // number of visible leafs, not counting 0 mleaf_t *leafs; diff --git a/include/QF/qtypes.h b/include/QF/qtypes.h index ed4255634..8402a5bd9 100644 --- a/include/QF/qtypes.h +++ b/include/QF/qtypes.h @@ -89,12 +89,12 @@ typedef int fixed16_t; // plane_t structure // !!! if this is changed, it must be changed in asm_i386.h too !!! -typedef struct mplane_s { +typedef struct plane_s { vec3_t normal; float dist; byte type; // for texture axis selection and fast side tests byte signbits; // signx + signy<<1 + signz<<1 byte pad[2]; -} mplane_t; +} plane_t; #endif // __qtypes_h diff --git a/include/r_local.h b/include/r_local.h index b0bee6519..7dc6e7af0 100644 --- a/include/r_local.h +++ b/include/r_local.h @@ -128,7 +128,7 @@ void R_RenderWorld (void); //============================================================================= -extern mplane_t screenedge[4]; +extern plane_t screenedge[4]; extern vec3_t r_origin; @@ -158,7 +158,7 @@ void R_DrawSprite (void); void R_RenderFace (msurface_t *fa, int clipflags); void R_RenderPoly (msurface_t *fa, int clipflags); void R_RenderBmodelFace (bedge_t *pedges, msurface_t *psurf); -void R_TransformPlane (mplane_t *p, float *normal, float *dist); +void R_TransformPlane (plane_t *p, float *normal, float *dist); void R_TransformFrustum (void); void R_SetSkyFrame (void); void R_DrawSurfaceBlock (void); diff --git a/include/world.h b/include/world.h index 5744b8f71..d3f1a5b08 100644 --- a/include/world.h +++ b/include/world.h @@ -33,12 +33,6 @@ #include "QF/mathlib.h" #include "QF/model.h" -typedef struct -{ - vec3_t normal; - vec_t dist; -} plane_t; - typedef enum { tr_point, tr_box, @@ -77,7 +71,7 @@ extern areanode_t sv_areanodes[AREA_NODES]; void SV_FreeAllEdictLeafs (void); -void SV_InitHull (hull_t *hull, mclipnode_t *clipnodes, mplane_t *planes); +void SV_InitHull (hull_t *hull, mclipnode_t *clipnodes, plane_t *planes); void SV_ClearWorld (void); // called after the world model has been loaded, before linking any entities diff --git a/libs/models/brush/model_brush.c b/libs/models/brush/model_brush.c index 5a4439625..954c3bc86 100644 --- a/libs/models/brush/model_brush.c +++ b/libs/models/brush/model_brush.c @@ -63,7 +63,7 @@ Mod_PointInLeaf (const vec3_t p, model_t *model) { float d; mnode_t *node; - mplane_t *plane; + plane_t *plane; if (!model || !model->nodes) Sys_Error ("Mod_PointInLeaf: bad model"); @@ -837,7 +837,7 @@ Mod_LoadPlanes (bsp_t *bsp) { dplane_t *in; int bits, count, i, j; - mplane_t *out; + plane_t *out; in = bsp->planes; count = bsp->numplanes; diff --git a/libs/models/clip_hull.c b/libs/models/clip_hull.c index 6161c6d38..c0b7ddf63 100644 --- a/libs/models/clip_hull.c +++ b/libs/models/clip_hull.c @@ -47,7 +47,7 @@ MOD_Alloc_Hull (int nodes, int planes) int size, i; size = sizeof (hull_t); - size += sizeof (mclipnode_t) * nodes + sizeof (mplane_t) * planes; + size += sizeof (mclipnode_t) * nodes + sizeof (plane_t) * planes; size *= MAX_MAP_HULLS; size += sizeof (clip_hull_t); @@ -58,11 +58,11 @@ MOD_Alloc_Hull (int nodes, int planes) for (i = 1; i < MAX_MAP_HULLS; i++) ch->hulls[i] = &ch->hulls[i - 1][1]; ch->hulls[0]->clipnodes = (mclipnode_t *) &ch->hulls[i - 1][1]; - ch->hulls[0]->planes = (mplane_t *) &ch->hulls[0]->clipnodes[nodes]; + ch->hulls[0]->planes = (plane_t *) &ch->hulls[0]->clipnodes[nodes]; for (i = 1; i < MAX_MAP_HULLS; i++) { ch->hulls[i]->clipnodes = (mclipnode_t *) &ch->hulls[i - 1]->planes[planes]; - ch->hulls[i]->planes = (mplane_t *) &ch->hulls[i]->clipnodes[nodes]; + ch->hulls[i]->planes = (plane_t *) &ch->hulls[i]->clipnodes[nodes]; } return ch; } diff --git a/libs/models/trace.c b/libs/models/trace.c index c7d371f7d..671d7a22d 100644 --- a/libs/models/trace.c +++ b/libs/models/trace.c @@ -60,11 +60,11 @@ typedef struct { vec_t start_frac; int side; int num; - mplane_t *plane; + plane_t *plane; } tracestack_t; static inline float -calc_offset (trace_t *trace, mplane_t *plane) +calc_offset (trace_t *trace, plane_t *plane) { vec_t d = 0; vec3_t Rn; @@ -92,7 +92,7 @@ calc_offset (trace_t *trace, mplane_t *plane) static inline void calc_impact (trace_t *trace, const vec3_t start, const vec3_t end, - mplane_t *plane) + plane_t *plane) { vec_t t1, t2, frac, offset; vec3_t dist; @@ -135,7 +135,7 @@ MOD_TraceLine (hull_t *hull, int num, tracestack_t *tstack; tracestack_t tracestack[256]; mclipnode_t *node; - mplane_t *plane, *split_plane; + plane_t *plane, *split_plane; VectorCopy (start_point, start); VectorCopy (end_point, end); diff --git a/libs/util/mathlib.c b/libs/util/mathlib.c index 8e4871ec1..dab28b628 100644 --- a/libs/util/mathlib.c +++ b/libs/util/mathlib.c @@ -48,8 +48,8 @@ static __attribute__ ((used)) const char rcsid[] = #include "QF/sys.h" VISIBLE int nanmask = 255 << 23; -static mplane_t _frustum[4]; -VISIBLE mplane_t *const frustum = _frustum; +static plane_t _frustum[4]; +VISIBLE plane_t *const frustum = _frustum; static vec3_t _vec3_origin = { 0, 0, 0 }; VISIBLE const vec_t * const vec3_origin = _vec3_origin; static vec3_t _quat_origin = { 0, 0, 0 }; @@ -269,7 +269,7 @@ BOPS_Error (void) Returns 1, 2, or 1 + 2 */ VISIBLE int -BoxOnPlaneSide (const vec3_t emins, const vec3_t emaxs, mplane_t *p) +BoxOnPlaneSide (const vec3_t emins, const vec3_t emaxs, plane_t *p) { float dist1, dist2; int sides; diff --git a/libs/video/renderer/gl/gl_rmain.c b/libs/video/renderer/gl/gl_rmain.c index 3242ac1d8..b419a1f6d 100644 --- a/libs/video/renderer/gl/gl_rmain.c +++ b/libs/video/renderer/gl/gl_rmain.c @@ -83,7 +83,7 @@ qboolean envmap; // true during envmap command capture int mirrortexturenum; // quake texturenum, not gltexturenum qboolean mirror; -mplane_t *mirror_plane; +plane_t *mirror_plane; // view origin VISIBLE vec3_t vup; @@ -360,7 +360,7 @@ R_DrawViewModel (void) } static inline int -SignbitsForPlane (mplane_t *out) +SignbitsForPlane (plane_t *out) { int bits, j; diff --git a/libs/video/renderer/gl/gl_rsurf.c b/libs/video/renderer/gl/gl_rsurf.c index 2d65780f5..cd6b6400d 100644 --- a/libs/video/renderer/gl/gl_rsurf.c +++ b/libs/video/renderer/gl/gl_rsurf.c @@ -370,7 +370,7 @@ R_DrawBrushModel (entity_t *e) int i; unsigned int k; model_t *model; - mplane_t *pplane; + plane_t *pplane; msurface_t *psurf; qboolean rotated; vec3_t mins, maxs; @@ -571,7 +571,7 @@ static inline int get_side (mnode_t *node) { // find which side of the node we are on - mplane_t *plane = node->plane; + plane_t *plane = node->plane; if (plane->type < 3) return (modelorg[plane->type] - plane->dist) < 0; diff --git a/libs/video/renderer/r_efrag.c b/libs/video/renderer/r_efrag.c index fb4a0f354..82912370c 100644 --- a/libs/video/renderer/r_efrag.c +++ b/libs/video/renderer/r_efrag.c @@ -125,7 +125,7 @@ static void R_SplitEntityOnNode (mnode_t *node) { efrag_t *ef; - mplane_t *splitplane; + plane_t *splitplane; mleaf_t *leaf; int sides; diff --git a/libs/video/renderer/r_light.c b/libs/video/renderer/r_light.c index 601d10550..8a9e844db 100644 --- a/libs/video/renderer/r_light.c +++ b/libs/video/renderer/r_light.c @@ -152,7 +152,7 @@ R_RecursiveMarkLights (const vec3_t lightorigin, dlight_t *light, int bit, { int i; float ndist, maxdist; - mplane_t *splitplane; + plane_t *splitplane; msurface_t *surf; //XXX mvertex_t *vertices; @@ -276,7 +276,7 @@ R_PushDlights (const vec3_t entorigin) /* LIGHT SAMPLING */ -mplane_t *lightplane; +plane_t *lightplane; vec3_t lightspot; static int @@ -345,12 +345,12 @@ calc_lighting_3 (msurface_t *surf, int ds, int dt) static int RecursiveLightPoint (mnode_t *node, const vec3_t start, const vec3_t end) { - int i, r, s, t, ds, dt, side; - float front, back, frac; - mplane_t *plane; - msurface_t *surf; - mtexinfo_t *tex; - vec3_t mid; + int i, r, s, t, ds, dt, side; + float front, back, frac; + plane_t *plane; + msurface_t *surf; + mtexinfo_t *tex; + vec3_t mid; loop: if (node->contents < 0) return -1; // didn't hit anything diff --git a/libs/video/renderer/sw/sw_rbsp.c b/libs/video/renderer/sw/sw_rbsp.c index ede228fa3..a60b93694 100644 --- a/libs/video/renderer/sw/sw_rbsp.c +++ b/libs/video/renderer/sw/sw_rbsp.c @@ -155,7 +155,7 @@ R_RecursiveClipBPoly (bedge_t *pedges, mnode_t *pnode, msurface_t *psurf) bedge_t *psideedges[2], *pnextedge, *ptedge; int i, side, lastside; float dist, frac, lastdist; - mplane_t *splitplane, tplane; + plane_t *splitplane, tplane; mvertex_t *pvert, *plastvert, *ptvert; mnode_t *pn; @@ -301,7 +301,7 @@ R_DrawSolidClippedSubmodelPolygons (model_t *pmodel) vec_t dot; msurface_t *psurf; int numsurfaces; - mplane_t *pplane; + plane_t *pplane; mvertex_t bverts[MAX_BMODEL_VERTS]; bedge_t bedges[MAX_BMODEL_EDGES], *pbedge; medge_t *pedge, *pedges; @@ -370,7 +370,7 @@ R_DrawSubmodelPolygons (model_t *pmodel, int clipflags) vec_t dot; msurface_t *psurf; int numsurfaces; - mplane_t *pplane; + plane_t *pplane; // FIXME: use bounding-box-based frustum clipping info? @@ -409,7 +409,7 @@ static inline int get_side (mnode_t *node) { // find which side of the node we are on - mplane_t *plane = node->plane; + plane_t *plane = node->plane; if (plane->type < 3) return (modelorg[plane->type] - plane->dist) < 0; @@ -560,7 +560,7 @@ R_RecursiveWorldNode (mnode_t *node, int clipflags) { int i, c, side, *pindex; vec3_t acceptpt, rejectpt; - mplane_t *plane; + plane_t *plane; msurface_t *surf; mleaf_t *pleaf; double d, dot; diff --git a/libs/video/renderer/sw/sw_rdraw.c b/libs/video/renderer/sw/sw_rdraw.c index 59f0206b0..fb17fe4c0 100644 --- a/libs/video/renderer/sw/sw_rdraw.c +++ b/libs/video/renderer/sw/sw_rdraw.c @@ -353,7 +353,7 @@ R_RenderFace (msurface_t *fa, int clipflags) { int i, lindex; unsigned int mask; - mplane_t *pplane; + plane_t *pplane; float distinv; vec3_t p_normal; medge_t *pedges, tedge; @@ -519,7 +519,7 @@ R_RenderBmodelFace (bedge_t *pedges, msurface_t *psurf) { int i; unsigned int mask; - mplane_t *pplane; + plane_t *pplane; float distinv; vec3_t p_normal; medge_t tedge; @@ -623,7 +623,7 @@ R_RenderPoly (msurface_t *fa, int clipflags) vec3_t local, transformed; clipplane_t *pclip; medge_t *pedges; - mplane_t *pplane; + plane_t *pplane; mvertex_t verts[2][100]; // FIXME: do real number polyvert_t pverts[100]; // FIXME: do real number, safely int vertpage, newverts, newpage, lastvert; @@ -787,7 +787,7 @@ R_ZDrawSubmodelPolys (model_t *pmodel) int i, numsurfaces; msurface_t *psurf; float dot; - mplane_t *pplane; + plane_t *pplane; psurf = &pmodel->surfaces[pmodel->firstmodelsurface]; numsurfaces = pmodel->nummodelsurfaces; diff --git a/libs/video/renderer/sw/sw_rmain.c b/libs/video/renderer/sw/sw_rmain.c index 1d280a4a4..6c7f6e568 100644 --- a/libs/video/renderer/sw/sw_rmain.c +++ b/libs/video/renderer/sw/sw_rmain.c @@ -116,7 +116,7 @@ float screenAspect; float verticalFieldOfView; float xOrigin, yOrigin; -mplane_t screenedge[4]; +plane_t screenedge[4]; // refresh flags int r_framecount = 1; // so frame counts initialized to 0 don't match diff --git a/libs/video/renderer/sw/sw_rmisc.c b/libs/video/renderer/sw/sw_rmisc.c index a4bd3145b..e22a9c6b7 100644 --- a/libs/video/renderer/sw/sw_rmisc.c +++ b/libs/video/renderer/sw/sw_rmisc.c @@ -175,7 +175,7 @@ TransformVector (const vec3_t in, vec3_t out) #endif void -R_TransformPlane (mplane_t *p, float *normal, float *dist) +R_TransformPlane (plane_t *p, float *normal, float *dist) { float d; diff --git a/libs/video/renderer/sw32/sw32_rbsp.c b/libs/video/renderer/sw32/sw32_rbsp.c index ce3ef050b..28511e491 100644 --- a/libs/video/renderer/sw32/sw32_rbsp.c +++ b/libs/video/renderer/sw32/sw32_rbsp.c @@ -155,7 +155,7 @@ R_RecursiveClipBPoly (bedge_t *pedges, mnode_t *pnode, msurface_t *psurf) bedge_t *psideedges[2], *pnextedge, *ptedge; int i, side, lastside; float dist, frac, lastdist; - mplane_t *splitplane, tplane; + plane_t *splitplane, tplane; mvertex_t *pvert, *plastvert, *ptvert; mnode_t *pn; @@ -301,7 +301,7 @@ R_DrawSolidClippedSubmodelPolygons (model_t *pmodel) vec_t dot; msurface_t *psurf; int numsurfaces; - mplane_t *pplane; + plane_t *pplane; mvertex_t bverts[MAX_BMODEL_VERTS]; bedge_t bedges[MAX_BMODEL_EDGES], *pbedge; medge_t *pedge, *pedges; @@ -370,7 +370,7 @@ R_DrawSubmodelPolygons (model_t *pmodel, int clipflags) vec_t dot; msurface_t *psurf; int numsurfaces; - mplane_t *pplane; + plane_t *pplane; // FIXME: use bounding-box-based frustum clipping info? @@ -409,7 +409,7 @@ static inline int get_side (mnode_t *node) { // find which side of the node we are on - mplane_t *plane = node->plane; + plane_t *plane = node->plane; if (plane->type < 3) return (modelorg[plane->type] - plane->dist) < 0; @@ -560,7 +560,7 @@ R_RecursiveWorldNode (mnode_t *node, int clipflags) { int i, c, side, *pindex; vec3_t acceptpt, rejectpt; - mplane_t *plane; + plane_t *plane; msurface_t *surf; mleaf_t *pleaf; double d, dot; diff --git a/libs/video/renderer/sw32/sw32_rdraw.c b/libs/video/renderer/sw32/sw32_rdraw.c index fd1ca5f1e..08335ea4c 100644 --- a/libs/video/renderer/sw32/sw32_rdraw.c +++ b/libs/video/renderer/sw32/sw32_rdraw.c @@ -346,7 +346,7 @@ R_RenderFace (msurface_t *fa, int clipflags) { int i, lindex; unsigned int mask; - mplane_t *pplane; + plane_t *pplane; float distinv; vec3_t p_normal; medge_t *pedges, tedge; @@ -513,7 +513,7 @@ R_RenderBmodelFace (bedge_t *pedges, msurface_t *psurf) { int i; unsigned int mask; - mplane_t *pplane; + plane_t *pplane; float distinv; vec3_t p_normal; medge_t tedge; @@ -618,7 +618,7 @@ R_RenderPoly (msurface_t *fa, int clipflags) vec3_t local, transformed; clipplane_t *pclip; medge_t *pedges; - mplane_t *pplane; + plane_t *pplane; mvertex_t verts[2][100]; // FIXME: do real number polyvert_t pverts[100]; // FIXME: do real number, safely int vertpage, newverts, newpage, lastvert; @@ -782,7 +782,7 @@ R_ZDrawSubmodelPolys (model_t *pmodel) int i, numsurfaces; msurface_t *psurf; float dot; - mplane_t *pplane; + plane_t *pplane; psurf = &pmodel->surfaces[pmodel->firstmodelsurface]; numsurfaces = pmodel->nummodelsurfaces; diff --git a/libs/video/renderer/sw32/sw32_rmain.c b/libs/video/renderer/sw32/sw32_rmain.c index e78d64c59..afa0ca1c1 100644 --- a/libs/video/renderer/sw32/sw32_rmain.c +++ b/libs/video/renderer/sw32/sw32_rmain.c @@ -110,7 +110,7 @@ float screenAspect; float verticalFieldOfView; float xOrigin, yOrigin; -mplane_t screenedge[4]; +plane_t screenedge[4]; // refresh flags VISIBLE int r_framecount = 1; // so frame counts initialized to 0 don't match diff --git a/libs/video/renderer/sw32/sw32_rmisc.c b/libs/video/renderer/sw32/sw32_rmisc.c index 14933f4a2..62dd30318 100644 --- a/libs/video/renderer/sw32/sw32_rmisc.c +++ b/libs/video/renderer/sw32/sw32_rmisc.c @@ -169,7 +169,7 @@ TransformVector (const vec3_t in, vec3_t out) } void -R_TransformPlane (mplane_t *p, float *normal, float *dist) +R_TransformPlane (plane_t *p, float *normal, float *dist) { float d; diff --git a/nq/source/sv_main.c b/nq/source/sv_main.c index e6f230e39..389c9bd1a 100644 --- a/nq/source/sv_main.c +++ b/nq/source/sv_main.c @@ -390,7 +390,7 @@ SV_AddToFatPVS (vec3_t org, mnode_t *node) int i; float d; byte *pvs; - mplane_t *plane; + plane_t *plane; while (1) { // if this is a leaf, accumulate the pvs bits diff --git a/nq/source/world.c b/nq/source/world.c index 7c49f979d..518824a6e 100644 --- a/nq/source/world.c +++ b/nq/source/world.c @@ -136,7 +136,7 @@ typedef struct { static hull_t box_hull; static mclipnode_t box_clipnodes[6]; -static mplane_t box_planes[6]; +static plane_t box_planes[6]; /* @@ -146,7 +146,7 @@ static mplane_t box_planes[6]; can just be stored out and get a proper hull_t structure. */ void -SV_InitHull (hull_t *hull, mclipnode_t *clipnodes, mplane_t *planes) +SV_InitHull (hull_t *hull, mclipnode_t *clipnodes, plane_t *planes) { int side, i; @@ -412,7 +412,7 @@ SV_FindTouchedLeafs (edict_t *ent, mnode_t *node) { int sides; mleaf_t *leaf; - mplane_t *splitplane; + plane_t *splitplane; edict_leaf_t *edict_leaf; if (node->contents == CONTENTS_SOLID) @@ -531,7 +531,7 @@ SV_HullPointContents (hull_t *hull, int num, const vec3_t p) { float d; mclipnode_t *node; - mplane_t *plane; + plane_t *plane; while (num >= 0) { //if (num < hull->firstclipnode || num > hull->lastclipnode) diff --git a/qw/source/pmovetst.c b/qw/source/pmovetst.c index 57b9444b7..9ee69cf45 100644 --- a/qw/source/pmovetst.c +++ b/qw/source/pmovetst.c @@ -49,7 +49,7 @@ static __attribute__ ((used)) const char rcsid[] = static hull_t box_hull; static mclipnode_t box_clipnodes[6]; -static mplane_t box_planes[6]; +static plane_t box_planes[6]; /* @@ -107,9 +107,9 @@ PM_HullForBox (const vec3_t mins, const vec3_t maxs) inline int PM_HullPointContents (hull_t *hull, int num, const vec3_t p) { - float d; + float d; mclipnode_t *node; - mplane_t *plane; + plane_t *plane; while (num >= 0) { node = hull->clipnodes + num; @@ -135,7 +135,7 @@ PM_PointContents (const vec3_t p) int num; mclipnode_t *node; hull_t *hull; - mplane_t *plane; + plane_t *plane; hull = &pmove.physents[0].model->hulls[0]; diff --git a/qw/source/sv_ents.c b/qw/source/sv_ents.c index 60355bdf9..f94c8a853 100644 --- a/qw/source/sv_ents.c +++ b/qw/source/sv_ents.c @@ -66,7 +66,7 @@ SV_AddToFatPVS (vec3_t org, mnode_t *node) byte *pvs; int i; float d; - mplane_t *plane; + plane_t *plane; while (1) { // if this is a leaf, accumulate the pvs bits diff --git a/qw/source/world.c b/qw/source/world.c index 7c49f979d..518824a6e 100644 --- a/qw/source/world.c +++ b/qw/source/world.c @@ -136,7 +136,7 @@ typedef struct { static hull_t box_hull; static mclipnode_t box_clipnodes[6]; -static mplane_t box_planes[6]; +static plane_t box_planes[6]; /* @@ -146,7 +146,7 @@ static mplane_t box_planes[6]; can just be stored out and get a proper hull_t structure. */ void -SV_InitHull (hull_t *hull, mclipnode_t *clipnodes, mplane_t *planes) +SV_InitHull (hull_t *hull, mclipnode_t *clipnodes, plane_t *planes) { int side, i; @@ -412,7 +412,7 @@ SV_FindTouchedLeafs (edict_t *ent, mnode_t *node) { int sides; mleaf_t *leaf; - mplane_t *splitplane; + plane_t *splitplane; edict_leaf_t *edict_leaf; if (node->contents == CONTENTS_SOLID) @@ -531,7 +531,7 @@ SV_HullPointContents (hull_t *hull, int num, const vec3_t p) { float d; mclipnode_t *node; - mplane_t *plane; + plane_t *plane; while (num >= 0) { //if (num < hull->firstclipnode || num > hull->lastclipnode) diff --git a/tools/qfbsp/include/bsp5.h b/tools/qfbsp/include/bsp5.h index 78d73398a..5230ed550 100644 --- a/tools/qfbsp/include/bsp5.h +++ b/tools/qfbsp/include/bsp5.h @@ -34,12 +34,6 @@ */ //@{ -typedef struct plane_s { - vec3_t normal; - vec_t dist; - int type; -} plane_t; - #define MAX_THREADS 4 #define ON_EPSILON 0.05 diff --git a/tools/qfvis/include/vis.h b/tools/qfvis/include/vis.h index 226691e9d..c365907b8 100644 --- a/tools/qfvis/include/vis.h +++ b/tools/qfvis/include/vis.h @@ -51,11 +51,6 @@ extern pthread_mutex_t *my_mutex; #define MAX_POINTS_ON_WINDING 64 #define MAX_PORTALS_ON_CLUSTER 128 -typedef struct { - vec3_t normal; - float dist; -} plane_t; - typedef struct { qboolean original; // don't free, it's part of the portal int numpoints;