]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - tools/quake3/q3map2/main.c
q3map2: Smokin'Guns 1.2.1 flavour
[xonotic/netradiant.git] / tools / quake3 / q3map2 / main.c
index c106c91bbd177ed88e6dbc4df8e1beffece8b7e1..0eec34429c6bf5b7404a9b7365a7c7d984a29984 100644 (file)
@@ -35,8 +35,7 @@
 
 /* dependencies */
 #include "q3map2.h"
-
-
+#include <glib.h>
 
 /*
    Random()
@@ -80,6 +79,7 @@ char *Q_strncat( char *dst, size_t dlen, const char *src, size_t slen ) {
        return Q_strncpyz( dst + n, src, MIN( slen, dlen - n ) );
 }
 
+
 /*
    ExitQ3Map()
    cleanup routine
@@ -92,6 +92,7 @@ static void ExitQ3Map( void ){
        }
 }
 
+
 /*
    main()
    q3map mojo...
@@ -100,6 +101,7 @@ static void ExitQ3Map( void ){
 int main( int argc, char **argv ){
        int i, r;
        double start, end;
+       extern qboolean werror;
 
 
        /* we want consistent 'randomness' */
@@ -146,6 +148,12 @@ int main( int argc, char **argv ){
                        argv[ i ] = NULL;
                }
 
+               /* make all warnings into errors */
+               else if ( !strcmp( argv[ i ], "-werror" ) ) {
+                       werror = qtrue;
+                       argv[ i ] = NULL;
+               }
+
                /* patch subdivisions */
                else if ( !strcmp( argv[ i ], "-subdivisions" ) ) {
                        argv[ i ] = NULL;
@@ -232,11 +240,16 @@ int main( int argc, char **argv ){
 
        /* vlight */
        else if ( !strcmp( argv[ 1 ], "-vlight" ) ) {
-               Sys_Printf( "WARNING: VLight is no longer supported, defaulting to -light -fast instead\n\n" );
+               Sys_FPrintf( SYS_WRN, "WARNING: VLight is no longer supported, defaulting to -light -fast instead\n\n" );
                argv[ 1 ] = "-fast";    /* eek a hack */
                r = LightMain( argc, argv );
        }
 
+       /* QBall: export entities */
+       else if ( !strcmp( argv[ 1 ], "-exportents" ) ) {
+               r = ExportEntitiesMain( argc - 1, argv + 1 );
+       }
+
        /* ydnar: lightmap export */
        else if ( !strcmp( argv[ 1 ], "-export" ) ) {
                r = ExportLightmapsMain( argc - 1, argv + 1 );
@@ -264,6 +277,9 @@ int main( int argc, char **argv ){
 
        /* ydnar: otherwise create a bsp */
        else{
+#ifdef SMOKINGUNS
+               compile_map = qtrue;
+#endif
                r = BSPMain( argc, argv );
        }