From: Thomas Debesse Date: Thu, 14 May 2020 11:04:30 +0000 (+0200) Subject: q3map2: declare or define with Q_EXTERN X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d13a0ee2aed177f7ff01b061414fc76c427595c2;p=xonotic%2Fnetradiant.git q3map2: declare or define with Q_EXTERN --- diff --git a/tools/quake3/q3map2/q3map2.h b/tools/quake3/q3map2/q3map2.h index c8308391..20acad6e 100644 --- a/tools/quake3/q3map2/q3map2.h +++ b/tools/quake3/q3map2/q3map2.h @@ -95,6 +95,15 @@ #define Q_strncasecmp strncasecmp #endif +// hack to declare and define in the same file +#ifdef MAIN_C + #define Q_EXTERN + #define Q_ASSIGN( a ) = a +#else + #define Q_EXTERN extern + #define Q_ASSIGN( a ) +#endif + /* macro version */ #define VectorMA( a, s, b, c ) ( ( c )[ 0 ] = ( a )[ 0 ] + ( s ) * ( b )[ 0 ], ( c )[ 1 ] = ( a )[ 1 ] + ( s ) * ( b )[ 1 ], ( c )[ 2 ] = ( a )[ 2 ] + ( s ) * ( b )[ 2 ] ) @@ -1012,7 +1021,7 @@ typedef enum } surfaceType_t; -char *surfaceTypes[ NUM_SURFACE_TYPES ] +Q_EXTERN char *surfaceTypes[ NUM_SURFACE_TYPES ] #ifndef MAIN_C ; #else @@ -1959,14 +1968,6 @@ void WriteRBSPFile( const char *filename ); ------------------------------------------------------------------------------- */ -#ifdef MAIN_C - #define Q_EXTERN - #define Q_ASSIGN( a ) = a -#else - #define Q_EXTERN extern - #define Q_ASSIGN( a ) -#endif - /* game support */ Q_EXTERN game_t games[] #ifndef MAIN_C diff --git a/tools/quake3/q3map2/visflow.c b/tools/quake3/q3map2/visflow.c index 3366e5df..547a7291 100644 --- a/tools/quake3/q3map2/visflow.c +++ b/tools/quake3/q3map2/visflow.c @@ -72,8 +72,6 @@ int CountBits( byte *bits, int numbits ){ } int c_fullskip; -int c_portalskip, c_leafskip; -int c_vistest, c_mighttest; int c_chop, c_nochop;