]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - tools/quake3/q3map2/q3map2.h
retain _q3map2_version worldspawn tag when using -onlyents
[xonotic/netradiant.git] / tools / quake3 / q3map2 / q3map2.h
index 4645477f5c16a66678f37d0447538651e22c20a1..2ff8e7130b4526b36dae3473a0382b880b4af6fa 100644 (file)
@@ -35,11 +35,14 @@ several games based on the Quake III Arena engine, in the form of "Q3Map2."
 
 
 /* version */
-#define Q3MAP_VERSION  "2.5.17-div0"
+#ifndef Q3MAP_VERSION
+#error no Q3MAP_VERSION defined
+#endif
 #define Q3MAP_MOTD             "Your map saw the pretty lights from q3map2's BFG"
 
 
 
+
 /* -------------------------------------------------------------------------------
 
 dependencies
@@ -79,7 +82,7 @@ dependencies
 #include "inout.h"
 #include "vfs.h"
 #include "png.h"
-#include "mhash.h"
+#include "md4.h"
 
 #include <stdlib.h>
 
@@ -248,6 +251,7 @@ constants
 #define GRID_EPSILON                   0.0f
 
 #define DEFAULT_LIGHTMAP_SAMPLE_SIZE   16
+#define DEFAULT_LIGHTMAP_MIN_SAMPLE_SIZE       0
 #define DEFAULT_LIGHTMAP_SAMPLE_OFFSET 1.0f
 #define DEFAULT_SUBDIVIDE_THRESHOLD            1.0f
 
@@ -302,14 +306,14 @@ abstracted bsp file
 
 /* ok to increase these at the expense of more memory */
 #define        MAX_MAP_MODELS                  0x400
-#define        MAX_MAP_BRUSHES                 0x8000
+#define        MAX_MAP_BRUSHES                 0x10000
 #define        MAX_MAP_ENTITIES                0x1000          //%     0x800   /* ydnar */
 #define        MAX_MAP_ENTSTRING               0x80000         //%     0x40000 /* ydnar */
 #define        MAX_MAP_SHADERS                 0x800           //%     0x400   /* ydnar */
 
 #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                  0x100000        //%     0x20000 /* ydnar for md */
+#define        MAX_MAP_PLANES                  0x200000        //%     0x20000 /* ydnar for md */
 #define        MAX_MAP_NODES                   0x20000
 #define        MAX_MAP_BRUSHSIDES              0x100000        //%     0x20000 /* ydnar */
 #define        MAX_MAP_LEAFS                   0x20000
@@ -321,7 +325,6 @@ abstracted bsp file
 #define        MAX_MAP_VISIBILITY              0x200000
 
 #define        MAX_MAP_DRAW_SURFS              0x20000
-#define        MAX_MAP_DRAW_VERTS              0x80000
 #define        MAX_MAP_DRAW_INDEXES    0x80000
 
 #define MAX_MAP_ADVERTISEMENTS 30
@@ -635,8 +638,12 @@ typedef enum
        CM_ALPHA_SCALE,
        CM_COLOR_DOT_PRODUCT,
        CM_ALPHA_DOT_PRODUCT,
+       CM_COLOR_DOT_PRODUCT_SCALE,
+       CM_ALPHA_DOT_PRODUCT_SCALE,
        CM_COLOR_DOT_PRODUCT_2,
-       CM_ALPHA_DOT_PRODUCT_2
+       CM_ALPHA_DOT_PRODUCT_2,
+       CM_COLOR_DOT_PRODUCT_2_SCALE,
+       CM_ALPHA_DOT_PRODUCT_2_SCALE
 }
 colorModType_t;
 
@@ -1072,6 +1079,7 @@ typedef struct
        int                                     mapEntityNum, firstDrawSurf;
        int                                     firstBrush, numBrushes;         /* only valid during BSP compile */
        epair_t                         *epairs;
+       vec3_t                          originbrush_origin;
 }
 entity_t;
 
@@ -1652,6 +1660,7 @@ int                                                       GetSurfaceExtraEntityNum( int num );
 int                                                    GetSurfaceExtraCastShadows( int num );
 int                                                    GetSurfaceExtraRecvShadows( int num );
 int                                                    GetSurfaceExtraSampleSize( int num );
+int                                                    GetSurfaceExtraMinSampleSize( int num );
 float                                          GetSurfaceExtraLongestCurve( int num );
 void                                           GetSurfaceExtraLightmapAxis( int num, vec3_t lightmapAxis );
 
@@ -1805,6 +1814,8 @@ vec_t                                             FloatForKey( const entity_t *ent, const char *key );
 void                                           GetVectorForKey( const entity_t *ent, const char *key, vec3_t vec );
 entity_t                                       *FindTargetEntity( const char *target );
 void                                           GetEntityShadowFlags( const entity_t *ent, const entity_t *ent2, int *castShadows, int *recvShadows );
+void InjectCommandLine(char **argv, int beginArgs, int endArgs);
+               
 
 
 /* bspfile_ibsp.c */
@@ -1929,7 +1940,8 @@ Q_EXTERN qboolean                 emitFlares Q_ASSIGN( qfalse );
 Q_EXTERN qboolean                      debugSurfaces Q_ASSIGN( qfalse );
 Q_EXTERN qboolean                      debugInset Q_ASSIGN( qfalse );
 Q_EXTERN qboolean                      debugPortals Q_ASSIGN( qfalse );
-
+Q_EXTERN qboolean           lightmapTriangleCheck Q_ASSIGN(qfalse);
+Q_EXTERN qboolean           lightmapExtraVisClusterNudge Q_ASSIGN(qfalse);
 Q_EXTERN double                                normalEpsilon Q_ASSIGN( 0.00001 );
 Q_EXTERN double                                distanceEpsilon Q_ASSIGN( 0.01 );
 
@@ -1949,6 +1961,7 @@ Q_EXTERN char                             source[ 1024 ];
 Q_EXTERN char                          outbase[ 32 ];
 
 Q_EXTERN int                           sampleSize;                                             /* lightmap sample size in units */
+Q_EXTERN int                           minSampleSize;                  /* minimum sample size to use at all */
 
 Q_EXTERN int                           mapEntityNum Q_ASSIGN( 0 );
 
@@ -2075,6 +2088,7 @@ Q_EXTERN qboolean                 loMem Q_ASSIGN( qfalse );
 Q_EXTERN qboolean                      noStyles Q_ASSIGN( qfalse );
 
 Q_EXTERN int                           sampleSize Q_ASSIGN( DEFAULT_LIGHTMAP_SAMPLE_SIZE );
+Q_EXTERN int                           minSampleSize Q_ASSIGN( DEFAULT_LIGHTMAP_MIN_SAMPLE_SIZE );
 Q_EXTERN qboolean                      noVertexLighting Q_ASSIGN( qfalse );
 Q_EXTERN qboolean                      noGridLighting Q_ASSIGN( qfalse );
 
@@ -2153,6 +2167,9 @@ Q_EXTERN qboolean                 exactPointToPolygon Q_ASSIGN( qtrue );
 Q_EXTERN float                         formFactorValueScale Q_ASSIGN( 3.0f );
 Q_EXTERN float                         linearScale Q_ASSIGN( 1.0f / 8000.0f );
 
+// for .ase conversion
+Q_EXTERN qboolean                      shadersAsBitmap Q_ASSIGN( qfalse );
+
 Q_EXTERN light_t                       *lights;
 Q_EXTERN int                           numPointLights;
 Q_EXTERN int                           numSpotLights;
@@ -2347,6 +2364,5 @@ Q_EXTERN bspFog_t                 bspFogs[ MAX_MAP_FOGS ];
 Q_EXTERN int                           numBSPAds Q_ASSIGN( 0 );
 Q_EXTERN bspAdvertisement_t    bspAds[ MAX_MAP_ADVERTISEMENTS ];
 
-
 /* end marker */
 #endif