X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fnetradiant.git;a=blobdiff_plain;f=tools%2Fquake3%2Fq3map2%2Fq3map2.h;h=46fec5eef2bed378f918ff73fe8b8a609ec34ee2;hp=44cd0b581d39fe26306918bb09cd30429ed729a3;hb=8691e753e04ab691b9d702571125b5f03d1948ff;hpb=e0b3d0ac5abc0cde0a74fadbd2aa4739b43b24a3 diff --git a/tools/quake3/q3map2/q3map2.h b/tools/quake3/q3map2/q3map2.h index 44cd0b58..46fec5ee 100644 --- a/tools/quake3/q3map2/q3map2.h +++ b/tools/quake3/q3map2/q3map2.h @@ -32,7 +32,7 @@ #ifndef Q3MAP2_H #define Q3MAP2_H - +#include "globaldefs.h" /* version */ #ifndef Q3MAP_VERSION @@ -41,8 +41,6 @@ #define Q3MAP_MOTD "Your map saw the pretty lights from q3map2's BFG" - - /* ------------------------------------------------------------------------------- dependencies @@ -50,7 +48,7 @@ ------------------------------------------------------------------------------- */ /* platform-specific */ -#if defined( __linux__ ) || defined( __APPLE__ ) +#if GDEF_OS_LINUX || GDEF_OS_MACOS #define Q_UNIX #endif @@ -60,7 +58,7 @@ #include #endif -#ifdef WIN32 +#if GDEF_OS_WINDOWS #include #endif @@ -93,14 +91,14 @@ ------------------------------------------------------------------------------- */ #define MAC_STATIC_HACK 0 -#if defined( __APPLE__ ) && MAC_STATIC_HACK +#if GDEF_OS_MACOS && MAC_STATIC_HACK #define MAC_STATIC static #else #define MAC_STATIC #endif #if 1 - #ifdef WIN32 + #if GDEF_OS_WINDOWS #define Q_stricmp stricmp #define Q_strncasecmp strnicmp #else @@ -200,7 +198,7 @@ #define HINT_PRIORITY 1000 /* ydnar: force hint splits first and antiportal/areaportal splits last */ #define ANTIPORTAL_PRIORITY -1000 #define AREAPORTAL_PRIORITY -1000 -#define DETAIL_PRIORITY -3000 +#define DETAIL_PRIORITY -3000 #define PSIDE_FRONT 1 #define PSIDE_BACK 2 @@ -273,7 +271,7 @@ #define RAD_LUXEL_SIZE 3 #define SUPER_LUXEL_SIZE 4 #define SUPER_FLAG_SIZE 4 -#define FLAG_FORCE_SUBSAMPLING 1 +#define FLAG_FORCE_SUBSAMPLING 1 #define FLAG_ALREADY_SUBSAMPLED 2 #define SUPER_ORIGIN_SIZE 3 #define SUPER_NORMAL_SIZE 4 @@ -826,7 +824,7 @@ typedef struct face_s struct face_s *next; int planenum; int priority; - //qboolean checked; + //qboolean checked; int compileFlags; winding_t *w; } @@ -958,8 +956,9 @@ typedef struct parseMesh_s shaderInfo_t *shaderInfo; shaderInfo_t *celShader; /* :) */ + /* jal : entity based _lightmapsamplesize */ + int lightmapSampleSize; /* ydnar: gs mods */ - int lightmapSampleSize; /* jal : entity based _lightmapsamplesize */ float lightmapScale; vec3_t eMins, eMaxs; indexMap_t *im; @@ -1467,7 +1466,7 @@ typedef struct rawLightmap_s float *bspLuxels[ MAX_LIGHTMAPS ]; float *radLuxels[ MAX_LIGHTMAPS ]; float *superLuxels[ MAX_LIGHTMAPS ]; - unsigned char *superFlags; + unsigned char *superFlags; float *superOrigins; float *superNormals; int *superClusters; @@ -1523,15 +1522,19 @@ void HelpMain(const char* arg); game_t *GetGame( char *arg ); void InitPaths( int *argc, char **argv ); + /* fixaas.c */ int FixAASMain( int argc, char **argv ); + /* bsp.c */ int BSPMain( int argc, char **argv ); + /* bsp_analyze.c */ int AnalyzeBSPMain( int argc, char **argv ); + /* bsp_info.c */ int BSPInfoMain( int count, char **fileNames ); @@ -1544,6 +1547,7 @@ int MiniMapBSPMain( int argc, char **argv ); /* convert_bsp.c */ int ConvertBSPMain( int argc, char **argv ); + /* convert_map.c */ int ConvertBSPToMap( char *bspName ); int ConvertBSPToMap_BP( char *bspName ); @@ -1825,7 +1829,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 SetupBrushesFlags( unsigned int mask_any, unsigned int test_any, unsigned int mask_all, unsigned int test_all ); void SetupBrushes( void ); void SetupClusters( void ); qboolean ClusterVisible( int a, int b ); @@ -1962,7 +1966,7 @@ Q_EXTERN game_t games[] , #include "game_tremulous.h" /*LinuxManMikeC: must be after game_quake3.h, depends on #define's set in it */ , - #include "game_unvanquished.h" + #include "game_unvanquished.h" /* must be after game_tremulous.h as they share defines! */ , #include "game_tenebrae.h" , @@ -2038,8 +2042,8 @@ Q_EXTERN qboolean nofog Q_ASSIGN( qfalse ); Q_EXTERN qboolean noHint Q_ASSIGN( qfalse ); /* ydnar */ Q_EXTERN qboolean renameModelShaders Q_ASSIGN( qfalse ); /* ydnar */ Q_EXTERN qboolean skyFixHack Q_ASSIGN( qfalse ); /* ydnar */ -Q_EXTERN qboolean bspAlternateSplitWeights Q_ASSIGN( qfalse ); /* 27 */ -Q_EXTERN qboolean deepBSP Q_ASSIGN( qfalse ); /* div0 */ +Q_EXTERN qboolean bspAlternateSplitWeights Q_ASSIGN( qfalse ); /* 27 */ +Q_EXTERN qboolean deepBSP Q_ASSIGN( qfalse ); /* div0 */ Q_EXTERN qboolean maxAreaFaceSurface Q_ASSIGN( qfalse ); /* divVerent */ Q_EXTERN int patchSubdivisions Q_ASSIGN( 8 ); /* ydnar: -patchmeta subdivisions */ @@ -2523,7 +2527,7 @@ Q_EXTERN int allocatedBSPBrushSides Q_ASSIGN( 0 ); Q_EXTERN bspBrushSide_t* bspBrushSides Q_ASSIGN( NULL ); Q_EXTERN int numBSPLightBytes Q_ASSIGN( 0 ); -Q_EXTERN byte *bspLightBytes Q_ASSIGN( NULL ); +Q_EXTERN byte *bspLightBytes Q_ASSIGN( NULL ); //% Q_EXTERN int numBSPGridPoints Q_ASSIGN( 0 ); //% Q_EXTERN byte *bspGridPoints Q_ASSIGN( NULL ); @@ -2535,11 +2539,11 @@ Q_EXTERN int numBSPVisBytes Q_ASSIGN( 0 ); Q_EXTERN byte bspVisBytes[ MAX_MAP_VISIBILITY ]; Q_EXTERN int numBSPDrawVerts Q_ASSIGN( 0 ); -Q_EXTERN bspDrawVert_t *bspDrawVerts Q_ASSIGN( NULL ); +Q_EXTERN bspDrawVert_t *bspDrawVerts Q_ASSIGN( NULL ); Q_EXTERN int numBSPDrawIndexes Q_ASSIGN( 0 ); Q_EXTERN int allocatedBSPDrawIndexes Q_ASSIGN( 0 ); -Q_EXTERN int *bspDrawIndexes Q_ASSIGN( NULL ); +Q_EXTERN int *bspDrawIndexes Q_ASSIGN( NULL ); Q_EXTERN int numBSPDrawSurfaces Q_ASSIGN( 0 ); Q_EXTERN bspDrawSurface_t *bspDrawSurfaces Q_ASSIGN( NULL ); @@ -2561,16 +2565,16 @@ Q_EXTERN bspAdvertisement_t bspAds[ MAX_MAP_ADVERTISEMENTS ]; allocated *= 2; \ if ( !allocated || allocated > 2147483647 / (int)sizeof( *ptr ) ) \ { \ - Error( # ptr " over 2 GB" ); \ + Error( #ptr " over 2 GB" ); \ } \ ptr = realloc( ptr, sizeof( *ptr ) * allocated ); \ if ( !ptr ) { \ - Error( # ptr " out of memory" ); } \ + Error( #ptr " out of memory" ); } \ } \ } \ while ( 0 ) -#define AUTOEXPAND_BY_REALLOC_BSP( suffix, def ) AUTOEXPAND_BY_REALLOC( bsp ## suffix, numBSP ## suffix, allocatedBSP ## suffix, def ) +#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 )