]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
q3map2 -convert -format ase -shadersasbitmap option to write shader names in the...
authorrpolzer <rpolzer@61c419a2-8eb2-4b30-bcec-8cead039b335>
Mon, 27 Oct 2008 12:07:39 +0000 (12:07 +0000)
committerrpolzer <rpolzer@61c419a2-8eb2-4b30-bcec-8cead039b335>
Mon, 27 Oct 2008 12:07:39 +0000 (12:07 +0000)
git-svn-id: svn://svn.icculus.org/netradiant/trunk@120 61c419a2-8eb2-4b30-bcec-8cead039b335

tools/quake3/q3map2/convert_ase.c
tools/quake3/q3map2/main.c
tools/quake3/q3map2/q3map2.h

index 2be25a4357b991f39cfa5f3eda8ba75881acfece..fab0ebe2c98802ed9a80add43229d8cc772de948 100644 (file)
@@ -271,7 +271,10 @@ static void ConvertShader( FILE *f, bspShader_t *shader, int shaderNum )
        fprintf( f, "\t\t\t*MAP_SUBNO\t1\r\n" );
        fprintf( f, "\t\t\t*MAP_AMOUNT\t1.0\r\n" );
        fprintf( f, "\t\t\t*MAP_TYPE\tScreen\r\n" );
-       fprintf( f, "\t\t\t*BITMAP\t\"..\\%s\"\r\n", filename );
+       if(...)
+               fprintf( f, "\t\t\t*BITMAP\t\"..\\%s\"\r\n", filename );
+       else
+               fprintf( f, "\t\t\t*BITMAP\t\"%s\"\r\n", shader->shader );
        fprintf( f, "\t\t\t*BITMAP_FILTER\tPyramidal\r\n" );
        fprintf( f, "\t\t}\r\n" );
        
index b9fb7d89ee839bd3bd362bf36b243fcf46133d47..9e4f36590dcffe9b7469313d1f5ef9c63255de35 100644 (file)
@@ -540,6 +540,8 @@ int ConvertBSPMain( int argc, char **argv )
                        i++;
                        Sys_Printf( "Distance epsilon set to %f\n", distanceEpsilon );
                }
+               else if( !strcmp( argv[ i ],  "-shadersasbitmap" ) )
+                       shadersAsBitmap = qtrue;
        }
        
        /* clean up map name */
index caf32df95a665016b425c25bd9c48bbcfd684dbe..f26caf264b664de09d9b799e177eab768f5b2e76 100644 (file)
@@ -2162,6 +2162,9 @@ Q_EXTERN qboolean                 exactPointToPolygon Q_ASSIGN( qtrue );
 Q_EXTERN float                         formFactorValueScale Q_ASSIGN( 3.0f );
 Q_EXTERN float                         linearScale Q_ASSIGN( 1.0f / 8000.0f );
 
+// for .ase conversion
+Q_EXTERN qboolean                      shadersAsBitmap Q_ASSIGN( qfalse );
+
 Q_EXTERN light_t                       *lights;
 Q_EXTERN int                           numPointLights;
 Q_EXTERN int                           numSpotLights;
@@ -2356,6 +2359,5 @@ Q_EXTERN bspFog_t                 bspFogs[ MAX_MAP_FOGS ];
 Q_EXTERN int                           numBSPAds Q_ASSIGN( 0 );
 Q_EXTERN bspAdvertisement_t    bspAds[ MAX_MAP_ADVERTISEMENTS ];
 
-
 /* end marker */
 #endif