#define MAX_MAP_AREAS 0x100 /* MAX_MAP_AREA_BYTES in q_shared must match! */
#define MAX_MAP_FOGS 30 //& 0x100 /* RBSP (32 - world fog - goggles) */
-#define MAX_MAP_PLANES 0x200000 //% 0x20000 /* ydnar for md */
#define MAX_MAP_LEAFS 0x20000
#define MAX_MAP_PORTALS 0x20000
#define MAX_MAP_LIGHTING 0x800000
vec3_t normal;
vec_t dist;
int type;
- struct plane_s *hash_chain;
+ int hash_chain;
}
plane_t;
typedef struct surfaceInfo_s
{
- bspModel_t *model;
+ int modelindex;
shaderInfo_t *si;
rawLightmap_t *lm;
int parentSurfaceNum, childSurfaceNum;
void FixMetaTJunctions( void );
void SmoothMetaTriangles( void );
void MergeMetaTriangles( void );
+void EmitMetaStats(); // vortex: print meta statistics even in no-verbose mode
/* surface_extra.c */
void UnparseEntities( void );
void PrintEntity( const entity_t *ent );
void SetKeyValue( entity_t *ent, const char *key, const char *value );
+qboolean KeyExists( const entity_t *ent, const char *key ); /* VorteX: check if key exists */
const char *ValueForKey( const entity_t *ent, const char *key );
int IntForKey( const entity_t *ent, const char *key );
vec_t FloatForKey( const entity_t *ent, const char *key );
Q_EXTERN int entitySourceBrushes;
-Q_EXTERN plane_t mapplanes[ MAX_MAP_PLANES ]; /* mapplanes[ num ^ 1 ] will always be the mirror or mapplanes[ num ] */
-Q_EXTERN int nummapplanes; /* nummapplanes will always be even */
+Q_EXTERN plane_t *mapplanes Q_ASSIGN(NULL); /* mapplanes[ num ^ 1 ] will always be the mirror or mapplanes[ num ] */
+Q_EXTERN int nummapplanes Q_ASSIGN(0); /* nummapplanes will always be even */
+Q_EXTERN int allocatedmapplanes Q_ASSIGN(0);
Q_EXTERN int numMapPatches;
Q_EXTERN vec3_t mapMins, mapMaxs;
Q_EXTERN qboolean saveprt;
Q_EXTERN qboolean hint; /* ydnar */
Q_EXTERN char inbase[ MAX_QPATH ];
+Q_EXTERN char globalCelShader[ MAX_QPATH ];
/* other bits */
Q_EXTERN int totalvis;
Q_EXTERN qboolean exportLightmaps Q_ASSIGN( qfalse );
Q_EXTERN qboolean externalLightmaps Q_ASSIGN( qfalse );
Q_EXTERN int lmCustomSize Q_ASSIGN( LIGHTMAP_WIDTH );
+Q_EXTERN char * lmCustomDir Q_ASSIGN( NULL );
Q_EXTERN qboolean dirty Q_ASSIGN( qfalse );
Q_EXTERN qboolean dirtDebug Q_ASSIGN( qfalse );
Q_EXTERN bspLeaf_t bspLeafs[ MAX_MAP_LEAFS ];
Q_EXTERN int numBSPPlanes Q_ASSIGN( 0 );
-Q_EXTERN bspPlane_t bspPlanes[ MAX_MAP_PLANES ];
+Q_EXTERN int allocatedBSPPlanes Q_ASSIGN(0);
+Q_EXTERN bspPlane_t *bspPlanes;
Q_EXTERN int numBSPNodes Q_ASSIGN( 0 );
Q_EXTERN int allocatedBSPNodes Q_ASSIGN( 0 );
Q_EXTERN int numBSPLeafBrushes Q_ASSIGN( 0 );
Q_EXTERN int allocatedBSPLeafBrushes Q_ASSIGN( 0 );
-Q_EXTERN int* bspLeafBrushes Q_ASSIGN(0);
+Q_EXTERN int* bspLeafBrushes Q_ASSIGN(NULL);
Q_EXTERN int numBSPBrushes Q_ASSIGN( 0 );
Q_EXTERN int allocatedBSPBrushes Q_ASSIGN( 0 );