]> de.git.xonotic.org Git - xonotic/netradiant.git/commitdiff
q3map2: declare or define with Q_EXTERN
authorThomas Debesse <dev@illwieckz.net>
Thu, 14 May 2020 11:04:30 +0000 (13:04 +0200)
committerThomas Debesse <dev@illwieckz.net>
Fri, 15 May 2020 03:22:22 +0000 (05:22 +0200)
tools/quake3/q3map2/q3map2.h
tools/quake3/q3map2/visflow.c

index c830839152071e171c4cc9195d965038f7eb0ca2..20acad6e70469759ed374b06361cdb6a85b315fc 100644 (file)
        #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
index 3366e5df196e04569e1cb8e9c2f002e491fe749f..547a7291c5be32ab21ae338f74b6f695d2144aac 100644 (file)
@@ -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;