unify WriteBSPFile() print

This commit is contained in:
Garux 2024-03-08 04:23:25 +05:00
parent a3d438c4be
commit 34038fd7fd
7 changed files with 2 additions and 12 deletions

View File

@ -227,6 +227,7 @@ void WriteBSPFile( const char *filename ){
char tempname[ 1024 ]; char tempname[ 1024 ];
time_t tm; time_t tm;
Sys_Printf( "Writing %s\n", filename );
/* dummy check */ /* dummy check */
if ( g_game == NULL || g_game->write == NULL ) { if ( g_game == NULL || g_game->write == NULL ) {

View File

@ -545,7 +545,6 @@ int ScaleBSPMain( Args& args ){
/* write the bsp */ /* write the bsp */
UnparseEntities(); UnparseEntities();
path_set_extension( source, "_s.bsp" ); path_set_extension( source, "_s.bsp" );
Sys_Printf( "Writing %s\n", source );
WriteBSPFile( source ); WriteBSPFile( source );
/* return to sender */ /* return to sender */
@ -649,7 +648,6 @@ int ShiftBSPMain( Args& args ){
/* write the bsp */ /* write the bsp */
UnparseEntities(); UnparseEntities();
path_set_extension( source, "_sh.bsp" ); path_set_extension( source, "_sh.bsp" );
Sys_Printf( "Writing %s\n", source );
WriteBSPFile( source ); WriteBSPFile( source );
/* return to sender */ /* return to sender */
@ -934,7 +932,6 @@ int MergeBSPMain( Args& args ){
/* write the bsp */ /* write the bsp */
UnparseEntities(); UnparseEntities();
path_set_extension( source, "_merged.bsp" ); path_set_extension( source, "_merged.bsp" );
Sys_Printf( "Writing %s\n", source );
WriteBSPFile( source ); WriteBSPFile( source );
/* return to sender */ /* return to sender */
@ -1148,7 +1145,6 @@ int ConvertBSPMain( Args& args ){
/* write bsp */ /* write bsp */
path_set_extension( source, "_c.bsp" ); path_set_extension( source, "_c.bsp" );
Sys_Printf( "Writing %s\n", source );
WriteBSPFile( source ); WriteBSPFile( source );
/* return to sender */ /* return to sender */

View File

@ -661,7 +661,6 @@ int ConvertJsonMain( Args& args ){
read_json( StringStream( PathExtensionless( source ), '/' ), useFlagNames, skipUnknownFlags ); read_json( StringStream( PathExtensionless( source ), '/' ), useFlagNames, skipUnknownFlags );
UnparseEntities(); UnparseEntities();
path_set_extension( source, "_json.bsp" ); path_set_extension( source, "_json.bsp" );
Sys_Printf( "Writing %s\n", source );
WriteBSPFile( source ); WriteBSPFile( source );
} }

View File

@ -1920,7 +1920,6 @@ static void LightWorld( bool fastAllocate, bool bounceStore ){
StoreSurfaceLightmaps( fastAllocate, bounceStore ); StoreSurfaceLightmaps( fastAllocate, bounceStore );
if( bounceStore ){ if( bounceStore ){
UnparseEntities(); UnparseEntities();
Sys_Printf( "Writing %s\n", source );
WriteBSPFile( source ); WriteBSPFile( source );
} }
@ -2840,7 +2839,6 @@ int LightMain( Args& args ){
/* write out the bsp */ /* write out the bsp */
UnparseEntities(); UnparseEntities();
Sys_Printf( "Writing %s\n", source );
WriteBSPFile( source ); WriteBSPFile( source );
/* ydnar: export lightmaps */ /* ydnar: export lightmaps */

View File

@ -251,7 +251,6 @@ int ImportLightmapsMain( Args& args ){
} }
/* write the bsp */ /* write the bsp */
Sys_Printf( "writing %s\n", source );
WriteBSPFile( source ); WriteBSPFile( source );
/* return to sender */ /* return to sender */

View File

@ -970,7 +970,6 @@ int VisMain( Args& args ){
} }
/* write the bsp file */ /* write the bsp file */
Sys_Printf( "Writing %s\n", source );
WriteBSPFile( source ); WriteBSPFile( source );
return 0; return 0;

View File

@ -354,9 +354,7 @@ void EndBSPFile( bool do_write ){
WriteSurfaceExtraFile( source ); WriteSurfaceExtraFile( source );
/* write the bsp */ /* write the bsp */
const auto path = StringStream( source, ".bsp" ); WriteBSPFile( StringStream( source, ".bsp" ) );
Sys_Printf( "Writing %s\n", path.c_str() );
WriteBSPFile( path );
} }
} }