]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
-lightmapdir option
authordivverent <divverent@61c419a2-8eb2-4b30-bcec-8cead039b335>
Wed, 25 Feb 2009 14:36:20 +0000 (14:36 +0000)
committerdivverent <divverent@61c419a2-8eb2-4b30-bcec-8cead039b335>
Wed, 25 Feb 2009 14:36:20 +0000 (14:36 +0000)
git-svn-id: svn://svn.icculus.org/netradiant/trunk@197 61c419a2-8eb2-4b30-bcec-8cead039b335

tools/quake3/q3map2/light.c
tools/quake3/q3map2/lightmaps_ydnar.c
tools/quake3/q3map2/q3map2.h

index 49aaebfe0056ed11bfa2c9e7e86b1f925616bf52..811d6a7ee072d3974aee63c7edcde3d7120f505d 100644 (file)
@@ -2027,6 +2027,15 @@ int LightMain( int argc, char **argv )
                        }
                }
                
+               else if( !strcmp( argv[ i ], "-lightmapdir" ) )
+               {
+                       lmCustomDir = argv[i + 1];
+                       i++;
+                       Sys_Printf( "Lightmap directory set to %s\n", lmCustomDir );
+                       externalLightmaps = qtrue;
+                       Sys_Printf( "Storing all lightmaps externally\n" );
+               }
+               
                /* ydnar: add this to suppress warnings */
                else if( !strcmp( argv[ i ],  "-custinfoparms") )
                {
index 9e41af4f3158a106b0008857006f04a1c33a9378..57375b601e2b7c984d59b1afd9bcbee45b244fc0 100644 (file)
@@ -2278,8 +2278,15 @@ void StoreSurfaceLightmaps( void )
        Sys_Printf( "--- StoreSurfaceLightmaps ---\n");
        
        /* setup */
-       strcpy( dirname, source );
-       StripExtension( dirname );
+       if(lmCustomDir)
+       {
+               strcpy( dirname, lmCustomDir );
+       }
+       else
+       {
+               strcpy( dirname, source );
+               StripExtension( dirname );
+       }
        memset( rgbGenValues, 0, sizeof( rgbGenValues ) );
        memset( alphaGenValues, 0, sizeof( alphaGenValues ) );
        
index 4819ff3076292dae2147a5d14821322abb84c527..29e1c79101fc9cf2e5f725cae093630dbe219e3e 100644 (file)
@@ -2118,6 +2118,7 @@ Q_EXTERN qboolean                 noCollapse Q_ASSIGN( qfalse );
 Q_EXTERN qboolean                      exportLightmaps Q_ASSIGN( qfalse );
 Q_EXTERN qboolean                      externalLightmaps Q_ASSIGN( qfalse );
 Q_EXTERN int                           lmCustomSize Q_ASSIGN( LIGHTMAP_WIDTH );
+Q_EXTERN char *                                lmCustomDir Q_ASSIGN( NULL );
 
 Q_EXTERN qboolean                      dirty Q_ASSIGN( qfalse );
 Q_EXTERN qboolean                      dirtDebug Q_ASSIGN( qfalse );