==============================================================================
*/
+#define Q3PATHLENGTH 64
+
//
// in memory representation
typedef struct texture_s
{
+ // q1bsp
// name
- char name[16];
+ //char name[16];
// size
unsigned int width, height;
// SURF_ flags
struct texture_s *currentframe;
// current alpha of the texture
float currentalpha;
+
+ // q3bsp
+ char name[Q3PATHLENGTH];
+ char firstpasstexturename[Q3PATHLENGTH]; // used only during loading
+ int surfaceflags;
+ int supercontents;
+ int surfaceparms;
+ int textureflags;
+
+ //skinframe_t skin;
}
texture_t;
typedef struct msurface_s
{
// bounding box for onscreen checks
- vec3_t poly_mins;
- vec3_t poly_maxs;
+ vec3_t mins;
+ vec3_t maxs;
// the node plane this is on, backwards if SURF_PLANEBACK flag set
mplane_t *plane;
// surface number, to avoid having to do a divide to find the number of a surface from it's address
int number;
- // center for sorting transparent meshes
- vec3_t poly_center;
-
// index into d_lightstylevalue array, 255 means not used (black)
qbyte styles[MAXLIGHTMAPS];
// RGB lighting data [numstyles][height][width][3]
// avoid multiple collision traces with a surface polygon
int colframe;
- // these are just 3D points defining the outline of the polygon,
- // no texcoord info (that can be generated from these)
- int poly_numverts;
- float *poly_verts;
-
// index into model->brush.shadowmesh
int num_firstshadowmeshtriangle;
- // neighboring surfaces (one per poly_numverts)
- //struct msurface_s **neighborsurfaces;
// currently used only for generating static shadow volumes
int lighttemp_castshadow;
#define Q3LUMP_PVS 16 // potentially visible set; bit[clusters][clusters] (used by rendering)
#define Q3HEADER_LUMPS 17
-#define Q3PATHLENGTH 64
-
typedef struct
{
int ident;
#define Q3TEXTUREFLAG_ALPHATEST 64
struct q3msurface_s;
-typedef struct q3mtexture_s
-{
- char name[Q3PATHLENGTH];
- char firstpasstexturename[Q3PATHLENGTH];
- int surfaceflags;
- int supercontents;
- int surfaceparms;
- int textureflags;
-
- skinframe_t skin;
-}
-q3mtexture_t;
typedef struct q3mmodel_s
{
struct colbrushf_s *colbrushf;
int numbrushsides;
struct q3mbrushside_s *firstbrushside;
- struct q3mtexture_s *texture;
+ struct texture_s *texture;
}
q3mbrush_t;
typedef struct q3mbrushside_s
{
struct mplane_s *plane;
- struct q3mtexture_s *texture;
+ struct texture_s *texture;
}
q3mbrushside_t;
typedef struct q3msurface_s
{
+ // bounding box for culling
+ vec3_t mins;
+ vec3_t maxs;
+
// FIXME: collisionmarkframe should be kept in a separate array
// FIXME: shadowmark should be kept in a separate array
- struct q3mtexture_s *texture;
+ struct texture_s *texture;
struct q3meffect_s *effect;
rtexture_t *lightmaptexture;
int collisionmarkframe; // don't collide twice in one trace
- // bounding box for culling
- float mins[3];
- float maxs[3];
surfmesh_t mesh;