From 9f87d2814446487a205323913e10126cfa801fc5 Mon Sep 17 00:00:00 2001 From: havoc Date: Tue, 8 Mar 2005 13:16:06 +0000 Subject: [PATCH] eliminated q3meffect_t (now uses q3deffect_t) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5059 d7cf8633-e32d-0410-b094-e92efae38249 --- model_brush.c | 4 ++-- model_brush.h | 14 +++----------- model_shared.h | 2 +- 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/model_brush.c b/model_brush.c index f85ba917..0d5b21df 100644 --- a/model_brush.c +++ b/model_brush.c @@ -3963,7 +3963,7 @@ static void Mod_Q3BSP_LoadBrushes(lump_t *l) static void Mod_Q3BSP_LoadEffects(lump_t *l) { q3deffect_t *in; - q3meffect_t *out; + q3deffect_t *out; int i, n, count; in = (void *)(mod_base + l->fileofs); @@ -3981,7 +3981,7 @@ static void Mod_Q3BSP_LoadEffects(lump_t *l) n = LittleLong(in->brushindex); if (n < 0 || n >= loadmodel->brush.num_brushes) Host_Error("Mod_Q3BSP_LoadEffects: invalid brushindex %i (%i brushes)\n", n, loadmodel->brush.num_brushes); - out->brush = loadmodel->brush.data_brushes + n; + out->brushindex = n; out->unknown = LittleLong(in->unknown); } } diff --git a/model_brush.h b/model_brush.h index fe3adef4..011b44ba 100644 --- a/model_brush.h +++ b/model_brush.h @@ -134,7 +134,7 @@ typedef struct } mtexinfo_t; -struct q3meffect_s; +struct q3deffect_s; typedef struct msurface_s { // bounding box for onscreen checks @@ -173,7 +173,7 @@ typedef struct msurface_s // (only access this if dlightframe is current) int dlightbits[8]; // q1bsp - struct q3meffect_s *effect; // q3bsp + struct q3deffect_s *effect; // q3bsp // FIXME: collisionmarkframe should be kept in a separate array int collisionmarkframe; // q3bsp // don't collide twice in one trace } @@ -593,7 +593,7 @@ typedef struct } q3dmeshvertex_t; -typedef struct +typedef struct q3deffect_s { char shadername[Q3PATHLENGTH]; int brushindex; @@ -777,14 +777,6 @@ typedef struct q3mbrushside_s } q3mbrushside_t; -typedef struct q3meffect_s -{ - char shadername[Q3PATHLENGTH]; - struct q3mbrush_s *brush; - int unknown; // 5 or -1 -} -q3meffect_t; - #define CHECKPVSBIT(pvs,b) ((b) >= 0 ? ((pvs)[(b) >> 3] & (1 << ((b) & 7))) : false) #define SETPVSBIT(pvs,b) ((b) >= 0 ? ((pvs)[(b) >> 3] |= (1 << ((b) & 7))) : false) #define CLEARPVSBIT(pvs,b) ((b) >= 0 ? ((pvs)[(b) >> 3] &= ~(1 << ((b) & 7))) : false) diff --git a/model_shared.h b/model_shared.h index e2071a51..3e3e218d 100644 --- a/model_shared.h +++ b/model_shared.h @@ -320,7 +320,7 @@ typedef struct model_brushq3_s int *data_element3i; int num_effects; - q3meffect_t *data_effects; + q3deffect_t *data_effects; // lightmap textures int num_lightmaps; -- 2.39.2