]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - tools/quake3/q3map2/q3map2.h
add option -nofastpoint; make old buggy behaviour default as it is typically a lot...
[xonotic/netradiant.git] / tools / quake3 / q3map2 / q3map2.h
index 64494462e356e9dbfc3f175b2447730f2a52ee76..89dbe3c9b2ff58fd973ab3eeb094ff376a1baa33 100644 (file)
@@ -142,7 +142,7 @@ constants
 #define DEF_RADIOSITY_BOUNCE   1.0f    /* ydnar: default to 100% re-emitted light */
 
 #define        MAX_SHADER_INFO                 8192
-#define MAX_CUST_SURFACEPARMS  64
+#define MAX_CUST_SURFACEPARMS  256
 
 #define        SHADER_MAX_VERTEXES             1000
 #define        SHADER_MAX_INDEXES              (6 * SHADER_MAX_VERTEXES)
@@ -317,9 +317,6 @@ abstracted bsp file
 #define MAX_LIGHTMAP_SHADERS   256
 
 /* ok to increase these at the expense of more memory */
-#define        MAX_MAP_ENTITIES                0x8000          //%     0x800   /* ydnar */
-#define        MAX_MAP_ENTSTRING               0x400000        //%     0x40000 /* 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_LEAFS                   0x20000
@@ -568,6 +565,9 @@ typedef struct game_s
        qboolean                        wolfLight;                                              /* when true, lights work like wolf q3map  */
        int                                     lightmapSize;                                   /* bsp lightmap width/height */
        float                           lightmapGamma;                                  /* default lightmap gamma */
+       qboolean                        lightmapsRGB;                                   /* default lightmap sRGB mode */
+       qboolean                        texturesRGB;                                    /* default texture sRGB mode */
+       qboolean                        colorsRGB;                                      /* default color sRGB mode */
        float                           lightmapExposure;                               /* default lightmap exposure */
        float                           lightmapCompensate;                             /* default lightmap compensate value */
        float                           gridScale;                                              /* vortex: default lightgrid scale (affects both directional and ambient spectres) */
@@ -1808,6 +1808,7 @@ void                                              FloodLightRawLightmap( int num );
 void                                           IlluminateRawLightmap( int num );
 void                                           IlluminateVertexes( int num );
 
+void                                           SetupBrushesFlags( int mask_any, int test_any, int mask_all, int test_all );
 void                                           SetupBrushes( void );
 void                                           SetupClusters( void );
 qboolean                                       ClusterVisible( int a, int b );
@@ -1858,6 +1859,7 @@ void                                              EmitVertexRemapShader( char *from, char *to );
 
 void                                           LoadShaderInfo( void );
 shaderInfo_t                           *ShaderInfoForShader( const char *shader );
+shaderInfo_t                           *ShaderInfoForShaderNull( const char *shader );
 
 
 /* bspfile_abstract.c */
@@ -2224,6 +2226,7 @@ Q_EXTERN qboolean                 debugDeluxemap Q_ASSIGN( qfalse );
 Q_EXTERN int                           deluxemode Q_ASSIGN( 0 );       /* deluxemap format (0 - modelspace, 1 - tangentspace with renormalization, 2 - tangentspace without renormalization) */
 
 Q_EXTERN qboolean                      fast Q_ASSIGN( qfalse );
+Q_EXTERN qboolean                      fastpoint Q_ASSIGN( qtrue );
 Q_EXTERN qboolean                      faster Q_ASSIGN( qfalse );
 Q_EXTERN qboolean                      fastgrid Q_ASSIGN( qfalse );
 Q_EXTERN qboolean                      fastbounce Q_ASSIGN( qfalse );
@@ -2282,6 +2285,7 @@ Q_EXTERN float                            maxMapDistance Q_ASSIGN( 0 );
 
 /* for run time tweaking of light sources */
 Q_EXTERN float                         pointScale Q_ASSIGN( 7500.0f );
+Q_EXTERN float                         spotScale Q_ASSIGN( 7500.0f );
 Q_EXTERN float                         areaScale Q_ASSIGN( 0.25f );
 Q_EXTERN float                         skyScale Q_ASSIGN( 1.0f );
 Q_EXTERN float                         bounceScale Q_ASSIGN( 0.25f );
@@ -2298,7 +2302,10 @@ Q_EXTERN qboolean                        inGrid Q_ASSIGN(0);
 
 /* ydnar: lightmap gamma/compensation */
 Q_EXTERN float                         lightmapGamma Q_ASSIGN( 1.0f );
-Q_EXTERN float                         lightmapExposure Q_ASSIGN( 1.0f );
+Q_EXTERN float                         lightmapsRGB Q_ASSIGN( qfalse );
+Q_EXTERN float                         texturesRGB Q_ASSIGN( qfalse );
+Q_EXTERN float                         colorsRGB Q_ASSIGN( qfalse );
+Q_EXTERN float                         lightmapExposure Q_ASSIGN( 0.0f );
 Q_EXTERN float                         lightmapCompensate Q_ASSIGN( 1.0f );
 
 /* ydnar: for runtime tweaking of falloff tolerance */
@@ -2449,7 +2456,8 @@ abstracted bsp globals
 
 Q_EXTERN int                           numEntities Q_ASSIGN( 0 );
 Q_EXTERN int                           numBSPEntities Q_ASSIGN( 0 );
-Q_EXTERN entity_t                      entities[ MAX_MAP_ENTITIES ];
+Q_EXTERN int                           allocatedEntities Q_ASSIGN( 0 );
+Q_EXTERN entity_t*                     entities Q_ASSIGN(NULL);
 
 Q_EXTERN int                           numBSPModels Q_ASSIGN( 0 );
 Q_EXTERN int                           allocatedBSPModels Q_ASSIGN( 0 );
@@ -2539,5 +2547,8 @@ Q_EXTERN bspAdvertisement_t       bspAds[ MAX_MAP_ADVERTISEMENTS ];
 
 #define AUTOEXPAND_BY_REALLOC_BSP(suffix, def) AUTOEXPAND_BY_REALLOC(bsp##suffix, numBSP##suffix, allocatedBSP##suffix, def)
 
+#define Image_LinearFloatFromsRGBFloat(c) (((c) <= 0.04045f) ? (c) * (1.0f / 12.92f) : (float)pow(((c) + 0.055f)*(1.0f/1.055f), 2.4f))
+#define Image_sRGBFloatFromLinearFloat(c) (((c) < 0.0031308f) ? (c) * 12.92f : 1.055f * (float)pow((c), 1.0f/2.4f) - 0.055f)
+
 /* end marker */
 #endif