numMapDrawSurfs = 0;
tempSource[ 0 ] = '\0';
+ globalCelShader[0] = 0;
/* set standard game flags */
maxSurfaceVerts = game->maxSurfaceVerts;
Sys_Printf( "Flatshading enabled\n" );
flat = qtrue;
}
+ else if( !strcmp( argv[ i ], "-celshader" ) )
+ {
+ ++i;
+ if(argv[i][0])
+ sprintf( globalCelShader, "textures/%s", argv[ i ] );
+ else
+ *globalCelShader = 0;
+ Sys_Printf( "Global cel shader set to \"%s\"\n", globalCelShader );
+ }
else if( !strcmp( argv[ i ], "-meta" ) )
{
Sys_Printf( "Creating meta surfaces from brush faces\n" );
Sys_Printf( "Entity %d (%s) has cel shader %s\n", mapEnt->mapEntityNum, classname, celShader->shader );
}
else
- celShader = NULL;
+ celShader = *globalCelShader ? ShaderInfoForShader(globalCelShader) : NULL;
/* attach stuff to everything in the entity */
for( brush = mapEnt->brushes; brush != NULL; brush = brush->next )
celShader = ShaderInfoForShader( shader );
}
else
- celShader = NULL;
+ celShader = *globalCelShader ? ShaderInfoForShader(globalCelShader) : NULL;
/* get lightmap scale */
lightmapScale = FloatForKey( e2, "_lightmapscale" );
Q_EXTERN qboolean saveprt;
Q_EXTERN qboolean hint; /* ydnar */
Q_EXTERN char inbase[ MAX_QPATH ];
+Q_EXTERN char globalCelShader[ MAX_QPATH ];
/* other bits */
Q_EXTERN int totalvis;