remove excess typedef struct declarations
This commit is contained in:
parent
54c38610bf
commit
20b908e31b
|
|
@ -20,11 +20,11 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
struct winding_t
|
||||||
{
|
{
|
||||||
int numpoints;
|
int numpoints;
|
||||||
vec3_t p[];
|
vec3_t p[];
|
||||||
} winding_t;
|
};
|
||||||
|
|
||||||
#define MAX_POINTS_ON_WINDING 512
|
#define MAX_POINTS_ON_WINDING 512
|
||||||
|
|
||||||
|
|
@ -64,11 +64,11 @@ void pw( winding_t *w );
|
||||||
// in q3map2 brush processing.
|
// in q3map2 brush processing.
|
||||||
///////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
typedef struct
|
struct winding_accu_t
|
||||||
{
|
{
|
||||||
int numpoints;
|
int numpoints;
|
||||||
vec3_accu_t p[];
|
vec3_accu_t p[];
|
||||||
} winding_accu_t;
|
};
|
||||||
|
|
||||||
winding_accu_t *BaseWindingForPlaneAccu( vec3_t normal, vec_t dist );
|
winding_accu_t *BaseWindingForPlaneAccu( vec3_t normal, vec_t dist );
|
||||||
void ChopWindingInPlaceAccu( winding_accu_t **w, vec3_t normal, vec_t dist, vec_t epsilon );
|
void ChopWindingInPlaceAccu( winding_accu_t **w, vec3_t normal, vec_t dist, vec_t epsilon );
|
||||||
|
|
|
||||||
|
|
@ -35,12 +35,12 @@
|
||||||
=============================================================================
|
=============================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef struct
|
struct script_t
|
||||||
{
|
{
|
||||||
char filename[1024];
|
char filename[1024];
|
||||||
char *buffer,*script_p,*end_p;
|
char *buffer,*script_p,*end_p;
|
||||||
int line;
|
int line;
|
||||||
} script_t;
|
};
|
||||||
|
|
||||||
#define MAX_INCLUDES 8
|
#define MAX_INCLUDES 8
|
||||||
script_t scriptstack[MAX_INCLUDES];
|
script_t scriptstack[MAX_INCLUDES];
|
||||||
|
|
|
||||||
|
|
@ -450,13 +450,13 @@ void ThreadSetDefault( void ){
|
||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
typedef struct pt_mutex_s
|
struct pt_mutex_t
|
||||||
{
|
{
|
||||||
pthread_t *owner;
|
pthread_t *owner;
|
||||||
pthread_mutex_t a_mutex;
|
pthread_mutex_t a_mutex;
|
||||||
pthread_cond_t cond;
|
pthread_cond_t cond;
|
||||||
unsigned int lock;
|
unsigned int lock;
|
||||||
} pt_mutex_t;
|
};
|
||||||
|
|
||||||
pt_mutex_t global_lock;
|
pt_mutex_t global_lock;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -53,14 +53,14 @@
|
||||||
#include "unzip.h"
|
#include "unzip.h"
|
||||||
#include "miniz.h"
|
#include "miniz.h"
|
||||||
|
|
||||||
typedef struct
|
struct VFS_PAKFILE
|
||||||
{
|
{
|
||||||
char* unzFilePath;
|
char* unzFilePath;
|
||||||
char* name;
|
char* name;
|
||||||
unz_s zipinfo;
|
unz_s zipinfo;
|
||||||
unzFile zipfile;
|
unzFile zipfile;
|
||||||
guint32 size;
|
guint32 size;
|
||||||
} VFS_PAKFILE;
|
};
|
||||||
|
|
||||||
// =============================================================================
|
// =============================================================================
|
||||||
// Global variables
|
// Global variables
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ void vfsInitDirectory( const char *path );
|
||||||
void vfsShutdown();
|
void vfsShutdown();
|
||||||
int vfsGetFileCount( const char *filename );
|
int vfsGetFileCount( const char *filename );
|
||||||
int vfsLoadFile( const char *filename, void **buffer, int index );
|
int vfsLoadFile( const char *filename, void **buffer, int index );
|
||||||
typedef struct StrList_s StrList;
|
struct StrList;
|
||||||
void vfsListShaderFiles( StrList* list, void pushStringCallback( StrList* list, const char* string ) );
|
void vfsListShaderFiles( StrList* list, void pushStringCallback( StrList* list, const char* string ) );
|
||||||
bool vfsPackFile( const char *filename, const char *packname, const int compLevel );
|
bool vfsPackFile( const char *filename, const char *packname, const int compLevel );
|
||||||
bool vfsPackFile_Absolute_Path( const char *filepath, const char *filename, const char *packname, const int compLevel );
|
bool vfsPackFile_Absolute_Path( const char *filepath, const char *filename, const char *packname, const int compLevel );
|
||||||
|
|
|
||||||
|
|
@ -31,13 +31,12 @@
|
||||||
#include "autopk3.h"
|
#include "autopk3.h"
|
||||||
|
|
||||||
|
|
||||||
typedef struct StrList_s
|
struct StrList
|
||||||
{
|
{
|
||||||
int n;
|
int n;
|
||||||
int max;
|
int max;
|
||||||
char s[][MAX_QPATH];
|
char s[][MAX_QPATH];
|
||||||
}
|
};
|
||||||
StrList;
|
|
||||||
|
|
||||||
static inline StrList* StrList_allocate( size_t strNum ){
|
static inline StrList* StrList_allocate( size_t strNum ){
|
||||||
StrList* ret = safe_calloc( offsetof( StrList, s[strNum] ) );
|
StrList* ret = safe_calloc( offsetof( StrList, s[strNum] ) );
|
||||||
|
|
@ -185,13 +184,12 @@ static void parseEXfile( const char* filename, StrList* ExTextures, StrList* ExS
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
struct StrBuf
|
||||||
{
|
{
|
||||||
int strlen;
|
int strlen;
|
||||||
int max;
|
int max;
|
||||||
char s[];
|
char s[];
|
||||||
}
|
};
|
||||||
StrBuf;
|
|
||||||
|
|
||||||
static inline StrBuf* StrBuf_allocate( size_t strLen ){
|
static inline StrBuf* StrBuf_allocate( size_t strLen ){
|
||||||
StrBuf* ret = safe_calloc( offsetof( StrBuf, s[strLen] ) );
|
StrBuf* ret = safe_calloc( offsetof( StrBuf, s[strLen] ) );
|
||||||
|
|
|
||||||
|
|
@ -69,24 +69,22 @@
|
||||||
|
|
||||||
|
|
||||||
/* types */
|
/* types */
|
||||||
typedef struct
|
struct ibspHeader_t
|
||||||
{
|
{
|
||||||
char ident[ 4 ];
|
char ident[ 4 ];
|
||||||
int version;
|
int version;
|
||||||
|
|
||||||
bspLump_t lumps[ HEADER_LUMPS ];
|
bspLump_t lumps[ HEADER_LUMPS ];
|
||||||
}
|
};
|
||||||
ibspHeader_t;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* brush sides */
|
/* brush sides */
|
||||||
typedef struct
|
struct ibspBrushSide_t
|
||||||
{
|
{
|
||||||
int planeNum;
|
int planeNum;
|
||||||
int shaderNum;
|
int shaderNum;
|
||||||
}
|
};
|
||||||
ibspBrushSide_t;
|
|
||||||
|
|
||||||
|
|
||||||
static void CopyBrushSidesLump( ibspHeader_t *header ){
|
static void CopyBrushSidesLump( ibspHeader_t *header ){
|
||||||
|
|
@ -136,7 +134,7 @@ static void AddBrushSidesLump( FILE *file, ibspHeader_t *header ){
|
||||||
|
|
||||||
|
|
||||||
/* drawsurfaces */
|
/* drawsurfaces */
|
||||||
typedef struct ibspDrawSurface_s
|
struct ibspDrawSurface_t
|
||||||
{
|
{
|
||||||
int shaderNum;
|
int shaderNum;
|
||||||
int fogNum;
|
int fogNum;
|
||||||
|
|
@ -157,8 +155,7 @@ typedef struct ibspDrawSurface_s
|
||||||
|
|
||||||
int patchWidth;
|
int patchWidth;
|
||||||
int patchHeight;
|
int patchHeight;
|
||||||
}
|
};
|
||||||
ibspDrawSurface_t;
|
|
||||||
|
|
||||||
|
|
||||||
static void CopyDrawSurfacesLump( ibspHeader_t *header ){
|
static void CopyDrawSurfacesLump( ibspHeader_t *header ){
|
||||||
|
|
@ -267,15 +264,14 @@ static void AddDrawSurfacesLump( FILE *file, ibspHeader_t *header ){
|
||||||
|
|
||||||
|
|
||||||
/* drawverts */
|
/* drawverts */
|
||||||
typedef struct
|
struct ibspDrawVert_t
|
||||||
{
|
{
|
||||||
vec3_t xyz;
|
vec3_t xyz;
|
||||||
float st[ 2 ];
|
float st[ 2 ];
|
||||||
float lightmap[ 2 ];
|
float lightmap[ 2 ];
|
||||||
vec3_t normal;
|
vec3_t normal;
|
||||||
byte color[ 4 ];
|
byte color[ 4 ];
|
||||||
}
|
};
|
||||||
ibspDrawVert_t;
|
|
||||||
|
|
||||||
|
|
||||||
static void CopyDrawVertsLump( ibspHeader_t *header ){
|
static void CopyDrawVertsLump( ibspHeader_t *header ){
|
||||||
|
|
@ -356,13 +352,12 @@ static void AddDrawVertsLump( FILE *file, ibspHeader_t *header ){
|
||||||
|
|
||||||
|
|
||||||
/* light grid */
|
/* light grid */
|
||||||
typedef struct
|
struct ibspGridPoint_t
|
||||||
{
|
{
|
||||||
byte ambient[ 3 ];
|
byte ambient[ 3 ];
|
||||||
byte directed[ 3 ];
|
byte directed[ 3 ];
|
||||||
byte latLong[ 2 ];
|
byte latLong[ 2 ];
|
||||||
}
|
};
|
||||||
ibspGridPoint_t;
|
|
||||||
|
|
||||||
|
|
||||||
static void CopyLightGridLumps( ibspHeader_t *header ){
|
static void CopyLightGridLumps( ibspHeader_t *header ){
|
||||||
|
|
|
||||||
|
|
@ -69,14 +69,13 @@
|
||||||
|
|
||||||
|
|
||||||
/* types */
|
/* types */
|
||||||
typedef struct
|
struct rbspHeader_t
|
||||||
{
|
{
|
||||||
char ident[ 4 ];
|
char ident[ 4 ];
|
||||||
int version;
|
int version;
|
||||||
|
|
||||||
bspLump_t lumps[ HEADER_LUMPS ];
|
bspLump_t lumps[ HEADER_LUMPS ];
|
||||||
}
|
};
|
||||||
rbspHeader_t;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -112,21 +112,19 @@ int FixAAS( int argc, char **argv ){
|
||||||
analyzes a Quake engine BSP file
|
analyzes a Quake engine BSP file
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef struct abspHeader_s
|
struct abspHeader_t
|
||||||
{
|
{
|
||||||
char ident[ 4 ];
|
char ident[ 4 ];
|
||||||
int version;
|
int version;
|
||||||
|
|
||||||
bspLump_t lumps[ 1 ]; /* unknown size */
|
bspLump_t lumps[ 1 ]; /* unknown size */
|
||||||
}
|
};
|
||||||
abspHeader_t;
|
|
||||||
|
|
||||||
typedef struct abspLumpTest_s
|
struct abspLumpTest_t
|
||||||
{
|
{
|
||||||
int radix, minCount;
|
int radix, minCount;
|
||||||
const char *name;
|
const char *name;
|
||||||
}
|
};
|
||||||
abspLumpTest_t;
|
|
||||||
|
|
||||||
int AnalyzeBSP( int argc, char **argv ){
|
int AnalyzeBSP( int argc, char **argv ){
|
||||||
abspHeader_t *header;
|
abspHeader_t *header;
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@
|
||||||
|
|
||||||
#define MAX_PROJECTORS 1024
|
#define MAX_PROJECTORS 1024
|
||||||
|
|
||||||
typedef struct decalProjector_s
|
struct decalProjector_t
|
||||||
{
|
{
|
||||||
shaderInfo_t *si;
|
shaderInfo_t *si;
|
||||||
vec3_t mins, maxs;
|
vec3_t mins, maxs;
|
||||||
|
|
@ -49,8 +49,7 @@ typedef struct decalProjector_s
|
||||||
int numPlanes; /* either 5 or 6, for quad or triangle projectors */
|
int numPlanes; /* either 5 or 6, for quad or triangle projectors */
|
||||||
vec4_t planes[ 6 ];
|
vec4_t planes[ 6 ];
|
||||||
vec4_t texMat[ 2 ];
|
vec4_t texMat[ 2 ];
|
||||||
}
|
};
|
||||||
decalProjector_t;
|
|
||||||
|
|
||||||
static int numProjectors = 0;
|
static int numProjectors = 0;
|
||||||
static decalProjector_t projectors[ MAX_PROJECTORS ];
|
static decalProjector_t projectors[ MAX_PROJECTORS ];
|
||||||
|
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
||||||
|
|
||||||
/*
|
|
||||||
Copyright (C) 1999-2007 id Software, Inc. and contributors.
|
|
||||||
For a list of contributors, see the accompanying CONTRIBUTORS file.
|
|
||||||
|
|
||||||
This file is part of GtkRadiant.
|
|
||||||
|
|
||||||
GtkRadiant is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
GtkRadiant is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with GtkRadiant; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* ydnar: for -game support */
|
|
||||||
typedef struct game_s
|
|
||||||
{
|
|
||||||
char *arg; /* -game matches this */
|
|
||||||
char *gamePath; /* main game data dir */
|
|
||||||
char *homeBasePath; /* home sub-dir on unix */
|
|
||||||
char *magic; /* magic word for figuring out base path */
|
|
||||||
bool wolfLight; /* when true, lights work like wolf q3map */
|
|
||||||
int bspVersion; /* BSP version to use */
|
|
||||||
}
|
|
||||||
game_t;
|
|
||||||
|
|
@ -94,11 +94,11 @@ static void LoadDDSBuffer( byte *buffer, int size, byte **pixels, int *width, in
|
||||||
note: this function is a total hack, as it reads/writes the png struct directly!
|
note: this function is a total hack, as it reads/writes the png struct directly!
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef struct pngBuffer_s
|
struct pngBuffer_t
|
||||||
{
|
{
|
||||||
byte *buffer;
|
byte *buffer;
|
||||||
png_size_t size, offset;
|
png_size_t size, offset;
|
||||||
} pngBuffer_t;
|
};
|
||||||
|
|
||||||
void PNGReadData( png_struct *png, png_byte *buffer, png_size_t size ){
|
void PNGReadData( png_struct *png, png_byte *buffer, png_size_t size ){
|
||||||
pngBuffer_t *pb = (pngBuffer_t*) png_get_io_ptr( png );
|
pngBuffer_t *pb = (pngBuffer_t*) png_get_io_ptr( png );
|
||||||
|
|
|
||||||
|
|
@ -1464,14 +1464,13 @@ bool LightContributionToPoint( trace_t *trace ){
|
||||||
|
|
||||||
#define MAX_CONTRIBUTIONS 32768
|
#define MAX_CONTRIBUTIONS 32768
|
||||||
|
|
||||||
typedef struct
|
struct contribution_t
|
||||||
{
|
{
|
||||||
vec3_t dir;
|
vec3_t dir;
|
||||||
vec3_t color;
|
vec3_t color;
|
||||||
vec3_t ambient;
|
vec3_t ambient;
|
||||||
int style;
|
int style;
|
||||||
}
|
};
|
||||||
contribution_t;
|
|
||||||
|
|
||||||
void TraceGrid( int num ){
|
void TraceGrid( int num ){
|
||||||
int i, j, x, y, z, mod, numCon, numStyles;
|
int i, j, x, y, z, mod, numCon, numStyles;
|
||||||
|
|
|
||||||
|
|
@ -32,12 +32,11 @@
|
||||||
|
|
||||||
------------------------------------------------------------------------------- */
|
------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
typedef struct shadowNode_s
|
struct shadowNode_t
|
||||||
{
|
{
|
||||||
vec4_t plane;
|
vec4_t plane;
|
||||||
int children[ 2 ];
|
int children[ 2 ];
|
||||||
}
|
};
|
||||||
shadowNode_t;
|
|
||||||
|
|
||||||
int numShadowNodes;
|
int numShadowNodes;
|
||||||
shadowNode_t *shadowNodes;
|
shadowNode_t *shadowNodes;
|
||||||
|
|
|
||||||
|
|
@ -63,38 +63,34 @@
|
||||||
#define TRACE_LEAF -1
|
#define TRACE_LEAF -1
|
||||||
#define TRACE_LEAF_SOLID -2
|
#define TRACE_LEAF_SOLID -2
|
||||||
|
|
||||||
typedef struct traceVert_s
|
struct traceVert_t
|
||||||
{
|
{
|
||||||
vec3_t xyz;
|
vec3_t xyz;
|
||||||
float st[ 2 ];
|
float st[ 2 ];
|
||||||
}
|
};
|
||||||
traceVert_t;
|
|
||||||
|
|
||||||
typedef struct traceInfo_s
|
struct traceInfo_t
|
||||||
{
|
{
|
||||||
shaderInfo_t *si;
|
shaderInfo_t *si;
|
||||||
int surfaceNum, castShadows;
|
int surfaceNum, castShadows;
|
||||||
bool skipGrid;
|
bool skipGrid;
|
||||||
}
|
};
|
||||||
traceInfo_t;
|
|
||||||
|
|
||||||
typedef struct traceWinding_s
|
struct traceWinding_t
|
||||||
{
|
{
|
||||||
vec4_t plane;
|
vec4_t plane;
|
||||||
int infoNum, numVerts;
|
int infoNum, numVerts;
|
||||||
traceVert_t v[ MAX_TW_VERTS ];
|
traceVert_t v[ MAX_TW_VERTS ];
|
||||||
}
|
};
|
||||||
traceWinding_t;
|
|
||||||
|
|
||||||
typedef struct traceTriangle_s
|
struct traceTriangle_t
|
||||||
{
|
{
|
||||||
vec3_t edge1, edge2;
|
vec3_t edge1, edge2;
|
||||||
int infoNum;
|
int infoNum;
|
||||||
traceVert_t v[ 3 ];
|
traceVert_t v[ 3 ];
|
||||||
}
|
};
|
||||||
traceTriangle_t;
|
|
||||||
|
|
||||||
typedef struct traceNode_s
|
struct traceNode_t
|
||||||
{
|
{
|
||||||
int type;
|
int type;
|
||||||
vec4_t plane;
|
vec4_t plane;
|
||||||
|
|
@ -102,8 +98,7 @@ typedef struct traceNode_s
|
||||||
int children[ 2 ];
|
int children[ 2 ];
|
||||||
int numItems, maxItems;
|
int numItems, maxItems;
|
||||||
int *items;
|
int *items;
|
||||||
}
|
};
|
||||||
traceNode_t;
|
|
||||||
|
|
||||||
|
|
||||||
int noDrawContentFlags, noDrawSurfaceFlags, noDrawCompileFlags;
|
int noDrawContentFlags, noDrawSurfaceFlags, noDrawCompileFlags;
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@
|
||||||
|
|
||||||
/* minimap stuff */
|
/* minimap stuff */
|
||||||
|
|
||||||
typedef struct minimap_s
|
struct minimap_t
|
||||||
{
|
{
|
||||||
bspModel_t *model;
|
bspModel_t *model;
|
||||||
int width;
|
int width;
|
||||||
|
|
@ -46,8 +46,7 @@ typedef struct minimap_s
|
||||||
float *data1f;
|
float *data1f;
|
||||||
float *sharpendata1f;
|
float *sharpendata1f;
|
||||||
vec3_t mins, size;
|
vec3_t mins, size;
|
||||||
}
|
};
|
||||||
minimap_t;
|
|
||||||
|
|
||||||
static minimap_t minimap;
|
static minimap_t minimap;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -338,62 +338,56 @@ brushType_t;
|
||||||
typedef void ( *bspFunc )( const char * );
|
typedef void ( *bspFunc )( const char * );
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
struct bspLump_t
|
||||||
{
|
{
|
||||||
int offset, length;
|
int offset, length;
|
||||||
}
|
};
|
||||||
bspLump_t;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
struct bspHeader_t
|
||||||
{
|
{
|
||||||
char ident[ 4 ];
|
char ident[ 4 ];
|
||||||
int version;
|
int version;
|
||||||
|
|
||||||
bspLump_t lumps[ 100 ]; /* theoretical maximum # of bsp lumps */
|
bspLump_t lumps[ 100 ]; /* theoretical maximum # of bsp lumps */
|
||||||
}
|
};
|
||||||
bspHeader_t;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
struct bspModel_t
|
||||||
{
|
{
|
||||||
float mins[ 3 ], maxs[ 3 ];
|
float mins[ 3 ], maxs[ 3 ];
|
||||||
int firstBSPSurface, numBSPSurfaces;
|
int firstBSPSurface, numBSPSurfaces;
|
||||||
int firstBSPBrush, numBSPBrushes;
|
int firstBSPBrush, numBSPBrushes;
|
||||||
}
|
};
|
||||||
bspModel_t;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
struct bspShader_t
|
||||||
{
|
{
|
||||||
char shader[ MAX_QPATH ];
|
char shader[ MAX_QPATH ];
|
||||||
int surfaceFlags;
|
int surfaceFlags;
|
||||||
int contentFlags;
|
int contentFlags;
|
||||||
}
|
};
|
||||||
bspShader_t;
|
|
||||||
|
|
||||||
|
|
||||||
/* planes x^1 is always the opposite of plane x */
|
/* planes x^1 is always the opposite of plane x */
|
||||||
|
|
||||||
typedef struct
|
struct bspPlane_t
|
||||||
{
|
{
|
||||||
float normal[ 3 ];
|
float normal[ 3 ];
|
||||||
float dist;
|
float dist;
|
||||||
}
|
};
|
||||||
bspPlane_t;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
struct bspNode_t
|
||||||
{
|
{
|
||||||
int planeNum;
|
int planeNum;
|
||||||
int children[ 2 ]; /* negative numbers are -(leafs+1), not nodes */
|
int children[ 2 ]; /* negative numbers are -(leafs+1), not nodes */
|
||||||
int mins[ 3 ]; /* for frustum culling */
|
int mins[ 3 ]; /* for frustum culling */
|
||||||
int maxs[ 3 ];
|
int maxs[ 3 ];
|
||||||
}
|
};
|
||||||
bspNode_t;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
struct bspLeaf_t
|
||||||
{
|
{
|
||||||
int cluster; /* -1 = opaque cluster (do I still store these?) */
|
int cluster; /* -1 = opaque cluster (do I still store these?) */
|
||||||
int area;
|
int area;
|
||||||
|
|
@ -406,46 +400,41 @@ typedef struct
|
||||||
|
|
||||||
int firstBSPLeafBrush;
|
int firstBSPLeafBrush;
|
||||||
int numBSPLeafBrushes;
|
int numBSPLeafBrushes;
|
||||||
}
|
};
|
||||||
bspLeaf_t;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
struct bspBrushSide_t
|
||||||
{
|
{
|
||||||
int planeNum; /* positive plane side faces out of the leaf */
|
int planeNum; /* positive plane side faces out of the leaf */
|
||||||
int shaderNum;
|
int shaderNum;
|
||||||
int surfaceNum; /* RBSP */
|
int surfaceNum; /* RBSP */
|
||||||
}
|
};
|
||||||
bspBrushSide_t;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
struct bspBrush_t
|
||||||
{
|
{
|
||||||
int firstSide;
|
int firstSide;
|
||||||
int numSides;
|
int numSides;
|
||||||
int shaderNum; /* the shader that determines the content flags */
|
int shaderNum; /* the shader that determines the content flags */
|
||||||
}
|
};
|
||||||
bspBrush_t;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
struct bspFog_t
|
||||||
{
|
{
|
||||||
char shader[ MAX_QPATH ];
|
char shader[ MAX_QPATH ];
|
||||||
int brushNum;
|
int brushNum;
|
||||||
int visibleSide; /* the brush side that ray tests need to clip against (-1 == none) */
|
int visibleSide; /* the brush side that ray tests need to clip against (-1 == none) */
|
||||||
}
|
};
|
||||||
bspFog_t;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
struct bspDrawVert_t
|
||||||
{
|
{
|
||||||
vec3_t xyz;
|
vec3_t xyz;
|
||||||
float st[ 2 ];
|
float st[ 2 ];
|
||||||
float lightmap[ MAX_LIGHTMAPS ][ 2 ]; /* RBSP */
|
float lightmap[ MAX_LIGHTMAPS ][ 2 ]; /* RBSP */
|
||||||
vec3_t normal;
|
vec3_t normal;
|
||||||
byte color[ MAX_LIGHTMAPS ][ 4 ]; /* RBSP */
|
byte color[ MAX_LIGHTMAPS ][ 4 ]; /* RBSP */
|
||||||
}
|
};
|
||||||
bspDrawVert_t;
|
|
||||||
|
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
|
|
@ -460,17 +449,16 @@ typedef enum
|
||||||
bspSurfaceType_t;
|
bspSurfaceType_t;
|
||||||
|
|
||||||
|
|
||||||
typedef struct bspGridPoint_s
|
struct bspGridPoint_t
|
||||||
{
|
{
|
||||||
byte ambient[ MAX_LIGHTMAPS ][ 3 ];
|
byte ambient[ MAX_LIGHTMAPS ][ 3 ];
|
||||||
byte directed[ MAX_LIGHTMAPS ][ 3 ];
|
byte directed[ MAX_LIGHTMAPS ][ 3 ];
|
||||||
byte styles[ MAX_LIGHTMAPS ];
|
byte styles[ MAX_LIGHTMAPS ];
|
||||||
byte latLong[ 2 ];
|
byte latLong[ 2 ];
|
||||||
}
|
};
|
||||||
bspGridPoint_t;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
struct bspDrawSurface_t
|
||||||
{
|
{
|
||||||
int shaderNum;
|
int shaderNum;
|
||||||
int fogNum;
|
int fogNum;
|
||||||
|
|
@ -493,17 +481,17 @@ typedef struct
|
||||||
|
|
||||||
int patchWidth;
|
int patchWidth;
|
||||||
int patchHeight;
|
int patchHeight;
|
||||||
}
|
};
|
||||||
bspDrawSurface_t;
|
|
||||||
|
|
||||||
|
|
||||||
/* advertisements */
|
/* advertisements */
|
||||||
typedef struct {
|
struct bspAdvertisement_t
|
||||||
|
{
|
||||||
int cellId;
|
int cellId;
|
||||||
vec3_t normal;
|
vec3_t normal;
|
||||||
vec3_t rect[4];
|
vec3_t rect[4];
|
||||||
char model[ MAX_QPATH ];
|
char model[ MAX_QPATH ];
|
||||||
} bspAdvertisement_t;
|
};
|
||||||
|
|
||||||
|
|
||||||
/* -------------------------------------------------------------------------------
|
/* -------------------------------------------------------------------------------
|
||||||
|
|
@ -517,14 +505,13 @@ typedef float tcMod_t[ 3 ][ 3 ];
|
||||||
|
|
||||||
|
|
||||||
/* ydnar: for multiple game support */
|
/* ydnar: for multiple game support */
|
||||||
typedef struct surfaceParm_s
|
struct surfaceParm_t
|
||||||
{
|
{
|
||||||
const char *name;
|
const char *name;
|
||||||
int contentFlags, contentFlagsClear;
|
int contentFlags, contentFlagsClear;
|
||||||
int surfaceFlags, surfaceFlagsClear;
|
int surfaceFlags, surfaceFlagsClear;
|
||||||
int compileFlags, compileFlagsClear;
|
int compileFlags, compileFlagsClear;
|
||||||
}
|
};
|
||||||
surfaceParm_t;
|
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
|
|
@ -534,7 +521,7 @@ typedef enum
|
||||||
}
|
}
|
||||||
miniMapMode_t;
|
miniMapMode_t;
|
||||||
|
|
||||||
typedef struct game_s
|
struct game_t
|
||||||
{
|
{
|
||||||
const char *arg; /* -game matches this */
|
const char *arg; /* -game matches this */
|
||||||
const char *gamePath; /* main game data dir */
|
const char *gamePath; /* main game data dir */
|
||||||
|
|
@ -575,65 +562,58 @@ typedef struct game_s
|
||||||
bspFunc load, write; /* load/write function pointers */
|
bspFunc load, write; /* load/write function pointers */
|
||||||
surfaceParm_t surfaceParms[ 128 ]; /* surfaceparm array */
|
surfaceParm_t surfaceParms[ 128 ]; /* surfaceparm array */
|
||||||
int brushBevelsSurfaceFlagsMask; /* apply only these surfaceflags to bevels to reduce extra bsp shaders amount; applying them to get correct physics at walkable brush edges and vertices */
|
int brushBevelsSurfaceFlagsMask; /* apply only these surfaceflags to bevels to reduce extra bsp shaders amount; applying them to get correct physics at walkable brush edges and vertices */
|
||||||
}
|
};
|
||||||
game_t;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct image_s
|
struct image_t
|
||||||
{
|
{
|
||||||
char *name, *filename;
|
char *name, *filename;
|
||||||
int refCount;
|
int refCount;
|
||||||
int width, height;
|
int width, height;
|
||||||
byte *pixels;
|
byte *pixels;
|
||||||
}
|
};
|
||||||
image_t;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct sun_s
|
struct sun_t
|
||||||
{
|
{
|
||||||
struct sun_s *next;
|
sun_t *next;
|
||||||
vec3_t direction, color;
|
vec3_t direction, color;
|
||||||
float photons, deviance, filterRadius;
|
float photons, deviance, filterRadius;
|
||||||
int numSamples, style;
|
int numSamples, style;
|
||||||
}
|
};
|
||||||
sun_t;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct surfaceModel_s
|
struct surfaceModel_t
|
||||||
{
|
{
|
||||||
struct surfaceModel_s *next;
|
surfaceModel_t *next;
|
||||||
char model[ MAX_QPATH ];
|
char model[ MAX_QPATH ];
|
||||||
float density, odds;
|
float density, odds;
|
||||||
float minScale, maxScale;
|
float minScale, maxScale;
|
||||||
float minAngle, maxAngle;
|
float minAngle, maxAngle;
|
||||||
bool oriented;
|
bool oriented;
|
||||||
}
|
};
|
||||||
surfaceModel_t;
|
|
||||||
|
|
||||||
|
|
||||||
/* ydnar/sd: foliage stuff for wolf et (engine-supported optimization of the above) */
|
/* ydnar/sd: foliage stuff for wolf et (engine-supported optimization of the above) */
|
||||||
typedef struct foliage_s
|
struct foliage_t
|
||||||
{
|
{
|
||||||
struct foliage_s *next;
|
foliage_t *next;
|
||||||
char model[ MAX_QPATH ];
|
char model[ MAX_QPATH ];
|
||||||
float scale, density, odds;
|
float scale, density, odds;
|
||||||
int inverseAlpha;
|
int inverseAlpha;
|
||||||
}
|
};
|
||||||
foliage_t;
|
|
||||||
|
|
||||||
typedef struct foliageInstance_s
|
struct foliageInstance_t
|
||||||
{
|
{
|
||||||
vec3_t xyz, normal;
|
vec3_t xyz, normal;
|
||||||
}
|
};
|
||||||
foliageInstance_t;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct remap_s
|
struct remap_t
|
||||||
{
|
{
|
||||||
char from[ 1024 ];
|
char from[ 1024 ];
|
||||||
char to[ MAX_QPATH ];
|
char to[ MAX_QPATH ];
|
||||||
}
|
};
|
||||||
remap_t;
|
|
||||||
|
|
||||||
|
|
||||||
/* wingdi.h hack, it's the same: 0 */
|
/* wingdi.h hack, it's the same: 0 */
|
||||||
|
|
@ -659,13 +639,12 @@ typedef enum
|
||||||
colorModType_t;
|
colorModType_t;
|
||||||
|
|
||||||
|
|
||||||
typedef struct colorMod_s
|
struct colorMod_t
|
||||||
{
|
{
|
||||||
struct colorMod_s *next;
|
colorMod_t *next;
|
||||||
colorModType_t type;
|
colorModType_t type;
|
||||||
vec_t data[ 16 ];
|
vec_t data[ 16 ];
|
||||||
}
|
};
|
||||||
colorMod_t;
|
|
||||||
|
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
|
|
@ -678,7 +657,7 @@ typedef enum
|
||||||
implicitMap_t;
|
implicitMap_t;
|
||||||
|
|
||||||
|
|
||||||
typedef struct shaderInfo_s
|
struct shaderInfo_t
|
||||||
{
|
{
|
||||||
String64 shader;
|
String64 shader;
|
||||||
int surfaceFlags;
|
int surfaceFlags;
|
||||||
|
|
@ -789,8 +768,7 @@ typedef struct shaderInfo_s
|
||||||
char *shaderText; /* ydnar */
|
char *shaderText; /* ydnar */
|
||||||
bool custom;
|
bool custom;
|
||||||
bool finished;
|
bool finished;
|
||||||
}
|
};
|
||||||
shaderInfo_t;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -800,30 +778,28 @@ shaderInfo_t;
|
||||||
|
|
||||||
------------------------------------------------------------------------------- */
|
------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
typedef struct face_s
|
struct face_t
|
||||||
{
|
{
|
||||||
struct face_s *next;
|
face_t *next;
|
||||||
int planenum;
|
int planenum;
|
||||||
int priority;
|
int priority;
|
||||||
//bool checked;
|
//bool checked;
|
||||||
int compileFlags;
|
int compileFlags;
|
||||||
winding_t *w;
|
winding_t *w;
|
||||||
}
|
};
|
||||||
face_t;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct plane_s
|
struct plane_t
|
||||||
{
|
{
|
||||||
vec3_t normal;
|
vec3_t normal;
|
||||||
vec_t dist;
|
vec_t dist;
|
||||||
int type;
|
int type;
|
||||||
int counter;
|
int counter;
|
||||||
int hash_chain;
|
int hash_chain;
|
||||||
}
|
};
|
||||||
plane_t;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct side_s
|
struct side_t
|
||||||
{
|
{
|
||||||
int planenum;
|
int planenum;
|
||||||
|
|
||||||
|
|
@ -845,34 +821,31 @@ typedef struct side_s
|
||||||
bool visible; /* choose visible planes first */
|
bool visible; /* choose visible planes first */
|
||||||
bool bevel; /* don't ever use for bsp splitting, and don't bother making windings for it */
|
bool bevel; /* don't ever use for bsp splitting, and don't bother making windings for it */
|
||||||
bool culled; /* ydnar: face culling */
|
bool culled; /* ydnar: face culling */
|
||||||
}
|
};
|
||||||
side_t;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct sideRef_s
|
struct sideRef_t
|
||||||
{
|
{
|
||||||
struct sideRef_s *next;
|
sideRef_t *next;
|
||||||
side_t *side;
|
side_t *side;
|
||||||
}
|
};
|
||||||
sideRef_t;
|
|
||||||
|
|
||||||
|
|
||||||
/* ydnar: generic index mapping for entities (natural extension of terrain texturing) */
|
/* ydnar: generic index mapping for entities (natural extension of terrain texturing) */
|
||||||
typedef struct indexMap_s
|
struct indexMap_t
|
||||||
{
|
{
|
||||||
int w, h, numLayers;
|
int w, h, numLayers;
|
||||||
char name[ MAX_QPATH ], shader[ MAX_QPATH ];
|
char name[ MAX_QPATH ], shader[ MAX_QPATH ];
|
||||||
float offsets[ 256 ];
|
float offsets[ 256 ];
|
||||||
byte *pixels;
|
byte *pixels;
|
||||||
}
|
};
|
||||||
indexMap_t;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct brush_s
|
struct brush_t
|
||||||
{
|
{
|
||||||
struct brush_s *next;
|
brush_t *next;
|
||||||
struct brush_s *nextColorModBrush; /* ydnar: colorMod volume brushes go here */
|
brush_t *nextColorModBrush; /* ydnar: colorMod volume brushes go here */
|
||||||
struct brush_s *original; /* chopped up brushes will reference the originals */
|
brush_t *original; /* chopped up brushes will reference the originals */
|
||||||
|
|
||||||
int entityNum, brushNum; /* editor numbering */
|
int entityNum, brushNum; /* editor numbering */
|
||||||
int outputNum; /* set when the brush is written to the file list */
|
int outputNum; /* set when the brush is written to the file list */
|
||||||
|
|
@ -902,30 +875,27 @@ typedef struct brush_s
|
||||||
int numsides;
|
int numsides;
|
||||||
|
|
||||||
side_t sides[]; /* variably sized */
|
side_t sides[]; /* variably sized */
|
||||||
}
|
};
|
||||||
brush_t;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct fog_s
|
struct fog_t
|
||||||
{
|
{
|
||||||
shaderInfo_t *si;
|
shaderInfo_t *si;
|
||||||
brush_t *brush;
|
brush_t *brush;
|
||||||
int visibleSide; /* the brush side that ray tests need to clip against (-1 == none) */
|
int visibleSide; /* the brush side that ray tests need to clip against (-1 == none) */
|
||||||
}
|
};
|
||||||
fog_t;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
struct mesh_t
|
||||||
{
|
{
|
||||||
int width, height;
|
int width, height;
|
||||||
bspDrawVert_t *verts;
|
bspDrawVert_t *verts;
|
||||||
}
|
};
|
||||||
mesh_t;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct parseMesh_s
|
struct parseMesh_t
|
||||||
{
|
{
|
||||||
struct parseMesh_s *next;
|
parseMesh_t *next;
|
||||||
|
|
||||||
int entityNum, brushNum; /* ydnar: editor numbering */
|
int entityNum, brushNum; /* ydnar: editor numbering */
|
||||||
|
|
||||||
|
|
@ -947,8 +917,7 @@ typedef struct parseMesh_s
|
||||||
bool grouped;
|
bool grouped;
|
||||||
float longestCurve;
|
float longestCurve;
|
||||||
int maxIterations;
|
int maxIterations;
|
||||||
}
|
};
|
||||||
parseMesh_t;
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -1005,7 +974,7 @@ const char *surfaceTypes[ NUM_SURFACE_TYPES ]
|
||||||
|
|
||||||
|
|
||||||
/* ydnar: this struct needs an overhaul (again, heh) */
|
/* ydnar: this struct needs an overhaul (again, heh) */
|
||||||
typedef struct mapDrawSurface_s
|
struct mapDrawSurface_t
|
||||||
{
|
{
|
||||||
surfaceType_t type;
|
surfaceType_t type;
|
||||||
bool planar;
|
bool planar;
|
||||||
|
|
@ -1015,9 +984,9 @@ typedef struct mapDrawSurface_s
|
||||||
bool skybox; /* ydnar: yet another fun hack */
|
bool skybox; /* ydnar: yet another fun hack */
|
||||||
bool backSide; /* ydnar: q3map_backShader support */
|
bool backSide; /* ydnar: q3map_backShader support */
|
||||||
|
|
||||||
struct mapDrawSurface_s *parent; /* ydnar: for cloned (skybox) surfaces to share lighting data */
|
mapDrawSurface_t *parent; /* ydnar: for cloned (skybox) surfaces to share lighting data */
|
||||||
struct mapDrawSurface_s *clone; /* ydnar: for cloned surfaces */
|
mapDrawSurface_t *clone; /* ydnar: for cloned surfaces */
|
||||||
struct mapDrawSurface_s *cel; /* ydnar: for cloned cel surfaces */
|
mapDrawSurface_t *cel; /* ydnar: for cloned cel surfaces */
|
||||||
|
|
||||||
shaderInfo_t *shaderInfo;
|
shaderInfo_t *shaderInfo;
|
||||||
shaderInfo_t *celShader;
|
shaderInfo_t *celShader;
|
||||||
|
|
@ -1067,20 +1036,18 @@ typedef struct mapDrawSurface_s
|
||||||
/* ydnar: editor/useful numbering */
|
/* ydnar: editor/useful numbering */
|
||||||
int entityNum;
|
int entityNum;
|
||||||
int surfaceNum;
|
int surfaceNum;
|
||||||
}
|
};
|
||||||
mapDrawSurface_t;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct drawSurfRef_s
|
struct drawSurfRef_t
|
||||||
{
|
{
|
||||||
struct drawSurfRef_s *nextRef;
|
drawSurfRef_t *nextRef;
|
||||||
int outputNum;
|
int outputNum;
|
||||||
}
|
};
|
||||||
drawSurfRef_t;
|
|
||||||
|
|
||||||
|
|
||||||
/* ydnar: metasurfaces are constructed from lists of metatriangles so they can be merged in the best way */
|
/* ydnar: metasurfaces are constructed from lists of metatriangles so they can be merged in the best way */
|
||||||
typedef struct metaTriangle_s
|
struct metaTriangle_t
|
||||||
{
|
{
|
||||||
shaderInfo_t *si;
|
shaderInfo_t *si;
|
||||||
side_t *side;
|
side_t *side;
|
||||||
|
|
@ -1089,18 +1056,16 @@ typedef struct metaTriangle_s
|
||||||
vec4_t plane;
|
vec4_t plane;
|
||||||
vec3_t lightmapAxis;
|
vec3_t lightmapAxis;
|
||||||
int indexes[ 3 ];
|
int indexes[ 3 ];
|
||||||
}
|
};
|
||||||
metaTriangle_t;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct epair_s
|
struct epair_t
|
||||||
{
|
{
|
||||||
CopiedString key, value;
|
CopiedString key, value;
|
||||||
}
|
};
|
||||||
epair_t;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
struct entity_t
|
||||||
{
|
{
|
||||||
vec3_t origin;
|
vec3_t origin;
|
||||||
brush_t *brushes, *lastBrush, *colorModBrushes;
|
brush_t *brushes, *lastBrush, *colorModBrushes;
|
||||||
|
|
@ -1109,21 +1074,20 @@ typedef struct
|
||||||
int firstBrush, numBrushes; /* only valid during BSP compile */
|
int firstBrush, numBrushes; /* only valid during BSP compile */
|
||||||
std::list<epair_t> epairs;
|
std::list<epair_t> epairs;
|
||||||
vec3_t originbrush_origin;
|
vec3_t originbrush_origin;
|
||||||
}
|
};
|
||||||
entity_t;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct node_s
|
struct node_t
|
||||||
{
|
{
|
||||||
/* both leafs and nodes */
|
/* both leafs and nodes */
|
||||||
int planenum; /* -1 = leaf node */
|
int planenum; /* -1 = leaf node */
|
||||||
struct node_s *parent;
|
node_t *parent;
|
||||||
vec3_t mins, maxs; /* valid after portalization */
|
vec3_t mins, maxs; /* valid after portalization */
|
||||||
brush_t *volume; /* one for each leaf/node */
|
brush_t *volume; /* one for each leaf/node */
|
||||||
|
|
||||||
/* nodes only */
|
/* nodes only */
|
||||||
side_t *side; /* the side that created the node */
|
side_t *side; /* the side that created the node */
|
||||||
struct node_s *children[ 2 ];
|
node_t *children[ 2 ];
|
||||||
int compileFlags; /* ydnar: hint, antiportal */
|
int compileFlags; /* ydnar: hint, antiportal */
|
||||||
int tinyportals;
|
int tinyportals;
|
||||||
vec3_t referencepoint;
|
vec3_t referencepoint;
|
||||||
|
|
@ -1141,35 +1105,32 @@ typedef struct node_s
|
||||||
int occupied; /* 1 or greater can reach entity */
|
int occupied; /* 1 or greater can reach entity */
|
||||||
entity_t *occupant; /* for leak file testing */
|
entity_t *occupant; /* for leak file testing */
|
||||||
|
|
||||||
struct portal_s *portals; /* also on nodes during construction */
|
struct portal_t *portals; /* also on nodes during construction */
|
||||||
|
|
||||||
bool has_structural_children;
|
bool has_structural_children;
|
||||||
}
|
};
|
||||||
node_t;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct portal_s
|
struct portal_t
|
||||||
{
|
{
|
||||||
plane_t plane;
|
plane_t plane;
|
||||||
node_t *onnode; /* NULL = outside box */
|
node_t *onnode; /* NULL = outside box */
|
||||||
node_t *nodes[ 2 ]; /* [ 0 ] = front side of plane */
|
node_t *nodes[ 2 ]; /* [ 0 ] = front side of plane */
|
||||||
struct portal_s *next[ 2 ];
|
portal_t *next[ 2 ];
|
||||||
winding_t *winding;
|
winding_t *winding;
|
||||||
|
|
||||||
bool sidefound; /* false if ->side hasn't been checked */
|
bool sidefound; /* false if ->side hasn't been checked */
|
||||||
int compileFlags; /* from original face that caused the split */
|
int compileFlags; /* from original face that caused the split */
|
||||||
side_t *side; /* NULL = non-visible */
|
side_t *side; /* NULL = non-visible */
|
||||||
}
|
};
|
||||||
portal_t;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
struct tree_t
|
||||||
{
|
{
|
||||||
node_t *headnode;
|
node_t *headnode;
|
||||||
node_t outside_node;
|
node_t outside_node;
|
||||||
vec3_t mins, maxs;
|
vec3_t mins, maxs;
|
||||||
}
|
};
|
||||||
tree_t;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1179,27 +1140,25 @@ tree_t;
|
||||||
|
|
||||||
------------------------------------------------------------------------------- */
|
------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
typedef struct
|
struct visPlane_t
|
||||||
{
|
{
|
||||||
vec3_t normal;
|
vec3_t normal;
|
||||||
float dist;
|
float dist;
|
||||||
}
|
};
|
||||||
visPlane_t;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
struct fixedWinding_t
|
||||||
{
|
{
|
||||||
int numpoints;
|
int numpoints;
|
||||||
vec3_t points[ MAX_POINTS_ON_FIXED_WINDING ]; /* variable sized */
|
vec3_t points[ MAX_POINTS_ON_FIXED_WINDING ]; /* variable sized */
|
||||||
}
|
};
|
||||||
fixedWinding_t;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct passage_s
|
struct passage_t
|
||||||
{
|
{
|
||||||
struct passage_s *next;
|
struct passage_t *next;
|
||||||
byte cansee[ 1 ]; /* all portals that can be seen through this passage */
|
byte cansee[ 1 ]; /* all portals that can be seen through this passage */
|
||||||
} passage_t;
|
};
|
||||||
|
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
|
|
@ -1211,7 +1170,7 @@ typedef enum
|
||||||
vstatus_t;
|
vstatus_t;
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
struct vportal_t
|
||||||
{
|
{
|
||||||
int num;
|
int num;
|
||||||
bool hint; /* true if this portal was created from a hint splitter */
|
bool hint; /* true if this portal was created from a hint splitter */
|
||||||
|
|
@ -1232,23 +1191,21 @@ typedef struct
|
||||||
int nummightsee; /* bit count on portalflood for sort */
|
int nummightsee; /* bit count on portalflood for sort */
|
||||||
passage_t *passages; /* there are just as many passages as there */
|
passage_t *passages; /* there are just as many passages as there */
|
||||||
/* are portals in the leaf this portal leads */
|
/* are portals in the leaf this portal leads */
|
||||||
}
|
};
|
||||||
vportal_t;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct leaf_s
|
struct leaf_t
|
||||||
{
|
{
|
||||||
int numportals;
|
int numportals;
|
||||||
int merged;
|
int merged;
|
||||||
vportal_t *portals[MAX_PORTALS_ON_LEAF];
|
vportal_t *portals[MAX_PORTALS_ON_LEAF];
|
||||||
}
|
};
|
||||||
leaf_t;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct pstack_s
|
struct pstack_t
|
||||||
{
|
{
|
||||||
byte mightsee[ MAX_PORTALS / 8 ];
|
byte mightsee[ MAX_PORTALS / 8 ];
|
||||||
struct pstack_s *next;
|
pstack_t *next;
|
||||||
leaf_t *leaf;
|
leaf_t *leaf;
|
||||||
vportal_t *portal; /* portal exiting */
|
vportal_t *portal; /* portal exiting */
|
||||||
fixedWinding_t *source;
|
fixedWinding_t *source;
|
||||||
|
|
@ -1263,17 +1220,15 @@ typedef struct pstack_s
|
||||||
visPlane_t seperators[ 2 ][ MAX_SEPERATORS ];
|
visPlane_t seperators[ 2 ][ MAX_SEPERATORS ];
|
||||||
int numseperators[ 2 ];
|
int numseperators[ 2 ];
|
||||||
#endif
|
#endif
|
||||||
}
|
};
|
||||||
pstack_t;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
struct threaddata_t
|
||||||
{
|
{
|
||||||
vportal_t *base;
|
vportal_t *base;
|
||||||
int c_chains;
|
int c_chains;
|
||||||
pstack_t pstack_head;
|
pstack_t pstack_head;
|
||||||
}
|
};
|
||||||
threaddata_t;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1284,9 +1239,9 @@ threaddata_t;
|
||||||
------------------------------------------------------------------------------- */
|
------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
/* ydnar: new light struct with flags */
|
/* ydnar: new light struct with flags */
|
||||||
typedef struct light_s
|
struct light_t
|
||||||
{
|
{
|
||||||
struct light_s *next;
|
light_t *next;
|
||||||
|
|
||||||
int type;
|
int type;
|
||||||
int flags; /* ydnar: condensed all the booleans into one flags int */
|
int flags; /* ydnar: condensed all the booleans into one flags int */
|
||||||
|
|
@ -1315,11 +1270,10 @@ typedef struct light_s
|
||||||
|
|
||||||
float falloffTolerance; /* ydnar: minimum attenuation threshold */
|
float falloffTolerance; /* ydnar: minimum attenuation threshold */
|
||||||
float filterRadius; /* ydnar: lightmap filter radius in world units, 0 == default */
|
float filterRadius; /* ydnar: lightmap filter radius in world units, 0 == default */
|
||||||
}
|
};
|
||||||
light_t;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
struct trace_t
|
||||||
{
|
{
|
||||||
/* constant input */
|
/* constant input */
|
||||||
bool testOcclusion, forceSunlight, testAll;
|
bool testOcclusion, forceSunlight, testAll;
|
||||||
|
|
@ -1361,42 +1315,38 @@ typedef struct
|
||||||
/* working data */
|
/* working data */
|
||||||
int numTestNodes;
|
int numTestNodes;
|
||||||
int testNodes[ MAX_TRACE_TEST_NODES ];
|
int testNodes[ MAX_TRACE_TEST_NODES ];
|
||||||
}
|
};
|
||||||
trace_t;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* must be identical to bspDrawVert_t except for float color! */
|
/* must be identical to bspDrawVert_t except for float color! */
|
||||||
typedef struct
|
struct radVert_t
|
||||||
{
|
{
|
||||||
vec3_t xyz;
|
vec3_t xyz;
|
||||||
float st[ 2 ];
|
float st[ 2 ];
|
||||||
float lightmap[ MAX_LIGHTMAPS ][ 2 ];
|
float lightmap[ MAX_LIGHTMAPS ][ 2 ];
|
||||||
vec3_t normal;
|
vec3_t normal;
|
||||||
float color[ MAX_LIGHTMAPS ][ 4 ];
|
float color[ MAX_LIGHTMAPS ][ 4 ];
|
||||||
}
|
};
|
||||||
radVert_t;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
struct radWinding_t
|
||||||
{
|
{
|
||||||
int numVerts;
|
int numVerts;
|
||||||
radVert_t verts[ MAX_POINTS_ON_WINDING ];
|
radVert_t verts[ MAX_POINTS_ON_WINDING ];
|
||||||
}
|
};
|
||||||
radWinding_t;
|
|
||||||
|
|
||||||
|
|
||||||
/* crutch for poor local allocations in win32 smp */
|
/* crutch for poor local allocations in win32 smp */
|
||||||
typedef struct
|
struct clipWork_t
|
||||||
{
|
{
|
||||||
vec_t dists[ MAX_POINTS_ON_WINDING + 4 ];
|
vec_t dists[ MAX_POINTS_ON_WINDING + 4 ];
|
||||||
int sides[ MAX_POINTS_ON_WINDING + 4 ];
|
int sides[ MAX_POINTS_ON_WINDING + 4 ];
|
||||||
}
|
};
|
||||||
clipWork_t;
|
|
||||||
|
|
||||||
|
|
||||||
/* ydnar: new lightmap handling code */
|
/* ydnar: new lightmap handling code */
|
||||||
typedef struct outLightmap_s
|
struct outLightmap_t
|
||||||
{
|
{
|
||||||
int lightmapNum, extLightmapNum;
|
int lightmapNum, extLightmapNum;
|
||||||
int customWidth, customHeight;
|
int customWidth, customHeight;
|
||||||
|
|
@ -1407,11 +1357,10 @@ typedef struct outLightmap_s
|
||||||
byte *lightBits;
|
byte *lightBits;
|
||||||
byte *bspLightBytes;
|
byte *bspLightBytes;
|
||||||
byte *bspDirBytes;
|
byte *bspDirBytes;
|
||||||
}
|
};
|
||||||
outLightmap_t;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct rawLightmap_s
|
struct rawLightmap_t
|
||||||
{
|
{
|
||||||
bool finished, splotchFix, wrap[ 2 ];
|
bool finished, splotchFix, wrap[ 2 ];
|
||||||
int customWidth, customHeight;
|
int customWidth, customHeight;
|
||||||
|
|
@ -1439,7 +1388,7 @@ typedef struct rawLightmap_s
|
||||||
vec3_t solidColor[ MAX_LIGHTMAPS ];
|
vec3_t solidColor[ MAX_LIGHTMAPS ];
|
||||||
|
|
||||||
int numStyledTwins;
|
int numStyledTwins;
|
||||||
struct rawLightmap_s *twins[ MAX_LIGHTMAPS ];
|
rawLightmap_t *twins[ MAX_LIGHTMAPS ];
|
||||||
|
|
||||||
int outLightmapNums[ MAX_LIGHTMAPS ];
|
int outLightmapNums[ MAX_LIGHTMAPS ];
|
||||||
int twinNums[ MAX_LIGHTMAPS ];
|
int twinNums[ MAX_LIGHTMAPS ];
|
||||||
|
|
@ -1456,21 +1405,19 @@ typedef struct rawLightmap_s
|
||||||
float *superDeluxels; /* average light direction */
|
float *superDeluxels; /* average light direction */
|
||||||
float *bspDeluxels;
|
float *bspDeluxels;
|
||||||
float *superFloodLight;
|
float *superFloodLight;
|
||||||
}
|
};
|
||||||
rawLightmap_t;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct rawGridPoint_s
|
struct rawGridPoint_t
|
||||||
{
|
{
|
||||||
vec3_t ambient[ MAX_LIGHTMAPS ];
|
vec3_t ambient[ MAX_LIGHTMAPS ];
|
||||||
vec3_t directed[ MAX_LIGHTMAPS ];
|
vec3_t directed[ MAX_LIGHTMAPS ];
|
||||||
vec3_t dir;
|
vec3_t dir;
|
||||||
byte styles[ MAX_LIGHTMAPS ];
|
byte styles[ MAX_LIGHTMAPS ];
|
||||||
}
|
};
|
||||||
rawGridPoint_t;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct surfaceInfo_s
|
struct surfaceInfo_t
|
||||||
{
|
{
|
||||||
int modelindex;
|
int modelindex;
|
||||||
shaderInfo_t *si;
|
shaderInfo_t *si;
|
||||||
|
|
@ -1482,8 +1429,7 @@ typedef struct surfaceInfo_s
|
||||||
vec3_t axis, mins, maxs;
|
vec3_t axis, mins, maxs;
|
||||||
bool hasLightmap, approximated;
|
bool hasLightmap, approximated;
|
||||||
int firstSurfaceCluster, numSurfaceClusters;
|
int firstSurfaceCluster, numSurfaceClusters;
|
||||||
}
|
};
|
||||||
surfaceInfo_t;
|
|
||||||
|
|
||||||
/* -------------------------------------------------------------------------------
|
/* -------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2048,12 +2048,11 @@ static void ParseCustomInfoParms( void ){
|
||||||
|
|
||||||
#define MAX_SHADER_FILES 1024
|
#define MAX_SHADER_FILES 1024
|
||||||
|
|
||||||
typedef struct StrList_s
|
struct StrList
|
||||||
{
|
{
|
||||||
int n;
|
int n;
|
||||||
char* s[MAX_SHADER_FILES];
|
char* s[MAX_SHADER_FILES];
|
||||||
}
|
};
|
||||||
StrList;
|
|
||||||
|
|
||||||
void pushShaderCallback( StrList* list, const char* string ){
|
void pushShaderCallback( StrList* list, const char* string ){
|
||||||
char* shader = copystring( string );
|
char* shader = copystring( string );
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@
|
||||||
|
|
||||||
------------------------------------------------------------------------------- */
|
------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
typedef struct surfaceExtra_s
|
struct surfaceExtra_t
|
||||||
{
|
{
|
||||||
mapDrawSurface_t *mds;
|
mapDrawSurface_t *mds;
|
||||||
shaderInfo_t *si;
|
shaderInfo_t *si;
|
||||||
|
|
@ -54,8 +54,7 @@ typedef struct surfaceExtra_s
|
||||||
int sampleSize;
|
int sampleSize;
|
||||||
float longestCurve;
|
float longestCurve;
|
||||||
vec3_t lightmapAxis;
|
vec3_t lightmapAxis;
|
||||||
}
|
};
|
||||||
surfaceExtra_t;
|
|
||||||
|
|
||||||
#define GROW_SURFACE_EXTRAS 1024
|
#define GROW_SURFACE_EXTRAS 1024
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -915,15 +915,14 @@ void MakeEntityMetaTriangles( entity_t *e ){
|
||||||
sets up an edge structure from a plane and 2 points that the edge ab falls lies in
|
sets up an edge structure from a plane and 2 points that the edge ab falls lies in
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef struct edge_s
|
struct edge_t
|
||||||
{
|
{
|
||||||
vec3_t origin;
|
vec3_t origin;
|
||||||
vec4_t edge;
|
vec4_t edge;
|
||||||
vec_t length, kingpinLength;
|
vec_t length, kingpinLength;
|
||||||
int kingpin;
|
int kingpin;
|
||||||
vec4_t plane;
|
vec4_t plane;
|
||||||
}
|
};
|
||||||
edge_t;
|
|
||||||
|
|
||||||
void CreateEdge( vec4_t plane, vec3_t a, vec3_t b, edge_t *edge ){
|
void CreateEdge( vec4_t plane, vec3_t a, vec3_t b, edge_t *edge ){
|
||||||
/* copy edge origin */
|
/* copy edge origin */
|
||||||
|
|
|
||||||
|
|
@ -39,13 +39,15 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct edgePoint_s {
|
struct edgePoint_t
|
||||||
|
{
|
||||||
float intercept;
|
float intercept;
|
||||||
vec3_t xyz;
|
vec3_t xyz;
|
||||||
struct edgePoint_s *prev, *next;
|
struct edgePoint_t *prev, *next;
|
||||||
} edgePoint_t;
|
};
|
||||||
|
|
||||||
typedef struct edgeLine_s {
|
struct edgeLine_t
|
||||||
|
{
|
||||||
vec3_t normal1;
|
vec3_t normal1;
|
||||||
float dist1;
|
float dist1;
|
||||||
|
|
||||||
|
|
@ -56,12 +58,13 @@ typedef struct edgeLine_s {
|
||||||
vec3_t dir;
|
vec3_t dir;
|
||||||
|
|
||||||
edgePoint_t *chain; // unused element of doubly linked list
|
edgePoint_t *chain; // unused element of doubly linked list
|
||||||
} edgeLine_t;
|
};
|
||||||
|
|
||||||
typedef struct {
|
struct originalEdge_t
|
||||||
|
{
|
||||||
float length;
|
float length;
|
||||||
bspDrawVert_t *dv[2];
|
bspDrawVert_t *dv[2];
|
||||||
} originalEdge_t;
|
};
|
||||||
|
|
||||||
originalEdge_t *originalEdges = NULL;
|
originalEdge_t *originalEdges = NULL;
|
||||||
int numOriginalEdges;
|
int numOriginalEdges;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user