]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - tools/quake3/q3map2/q3map2.h
VorteX: KeyExists function, cast shadows from func_wall by default in prophecy and dq
[xonotic/netradiant.git] / tools / quake3 / q3map2 / q3map2.h
index 4e5c0eeaebff22b3819fb7ebf9bf619285746857..ddc5b0a96eefd89021590c29ebeb2b302b25a5ef 100644 (file)
@@ -310,7 +310,6 @@ abstracted bsp file
 
 #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
@@ -791,7 +790,7 @@ typedef struct plane_s
        vec3_t                          normal;
        vec_t                           dist;
        int                                     type;
-       struct plane_s          *hash_chain;
+       int                                     hash_chain;
 }
 plane_t;
 
@@ -1421,7 +1420,7 @@ rawGridPoint_t;
 
 typedef struct surfaceInfo_s
 {
-       bspModel_t                      *model;
+       int                                     modelindex;
        shaderInfo_t            *si;
        rawLightmap_t           *lm;
        int                                     parentSurfaceNum, childSurfaceNum;
@@ -1640,6 +1639,7 @@ void                                              MakeEntityMetaTriangles( entity_t *e );
 void                                           FixMetaTJunctions( void );
 void                                           SmoothMetaTriangles( void );
 void                                           MergeMetaTriangles( void );
+void                                           EmitMetaStats(); // vortex: print meta statistics even in no-verbose mode
 
 
 /* surface_extra.c */
@@ -1802,6 +1802,7 @@ void                                              ParseEntities( void );
 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 );
@@ -1961,8 +1962,9 @@ Q_EXTERN int                              mapEntityNum Q_ASSIGN( 0 );
 
 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;
 
@@ -2035,6 +2037,7 @@ Q_EXTERN qboolean                 nosort;
 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;
@@ -2118,6 +2121,7 @@ Q_EXTERN qboolean                 noCollapse Q_ASSIGN( qfalse );
 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 );
@@ -2316,7 +2320,8 @@ Q_EXTERN int                              numBSPLeafs Q_ASSIGN( 0 );
 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 );
@@ -2328,7 +2333,7 @@ Q_EXTERN int*                             bspLeafSurfaces Q_ASSIGN(NULL);
 
 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 );
@@ -2374,7 +2379,7 @@ Q_EXTERN bspAdvertisement_t       bspAds[ MAX_MAP_ADVERTISEMENTS ];
                                allocated = def; \
                        while(reqitem >= allocated && allocated) \
                                allocated *= 2; \
-                       if(allocated > 2147483647 / sizeof(*ptr)) \
+                       if(!allocated || allocated > 2147483647 / sizeof(*ptr)) \
                        { \
                                Error(#ptr " over 2 GB"); \
                        } \