From 34038fd7fd789ae2fb530399e96af9ce9658bc4e Mon Sep 17 00:00:00 2001 From: Garux Date: Fri, 8 Mar 2024 04:23:25 +0500 Subject: [PATCH] unify WriteBSPFile() print --- tools/quake3/q3map2/bspfile_abstract.cpp | 1 + tools/quake3/q3map2/convert_bsp.cpp | 4 ---- tools/quake3/q3map2/convert_json.cpp | 1 - tools/quake3/q3map2/light.cpp | 2 -- tools/quake3/q3map2/lightmaps_ydnar.cpp | 1 - tools/quake3/q3map2/vis.cpp | 1 - tools/quake3/q3map2/writebsp.cpp | 4 +--- 7 files changed, 2 insertions(+), 12 deletions(-) diff --git a/tools/quake3/q3map2/bspfile_abstract.cpp b/tools/quake3/q3map2/bspfile_abstract.cpp index 19572f52..8d39a9ca 100644 --- a/tools/quake3/q3map2/bspfile_abstract.cpp +++ b/tools/quake3/q3map2/bspfile_abstract.cpp @@ -227,6 +227,7 @@ void WriteBSPFile( const char *filename ){ char tempname[ 1024 ]; time_t tm; + Sys_Printf( "Writing %s\n", filename ); /* dummy check */ if ( g_game == NULL || g_game->write == NULL ) { diff --git a/tools/quake3/q3map2/convert_bsp.cpp b/tools/quake3/q3map2/convert_bsp.cpp index 79585d7d..d4c67017 100644 --- a/tools/quake3/q3map2/convert_bsp.cpp +++ b/tools/quake3/q3map2/convert_bsp.cpp @@ -545,7 +545,6 @@ int ScaleBSPMain( Args& args ){ /* write the bsp */ UnparseEntities(); path_set_extension( source, "_s.bsp" ); - Sys_Printf( "Writing %s\n", source ); WriteBSPFile( source ); /* return to sender */ @@ -649,7 +648,6 @@ int ShiftBSPMain( Args& args ){ /* write the bsp */ UnparseEntities(); path_set_extension( source, "_sh.bsp" ); - Sys_Printf( "Writing %s\n", source ); WriteBSPFile( source ); /* return to sender */ @@ -934,7 +932,6 @@ int MergeBSPMain( Args& args ){ /* write the bsp */ UnparseEntities(); path_set_extension( source, "_merged.bsp" ); - Sys_Printf( "Writing %s\n", source ); WriteBSPFile( source ); /* return to sender */ @@ -1148,7 +1145,6 @@ int ConvertBSPMain( Args& args ){ /* write bsp */ path_set_extension( source, "_c.bsp" ); - Sys_Printf( "Writing %s\n", source ); WriteBSPFile( source ); /* return to sender */ diff --git a/tools/quake3/q3map2/convert_json.cpp b/tools/quake3/q3map2/convert_json.cpp index e1073528..ff68cf6e 100644 --- a/tools/quake3/q3map2/convert_json.cpp +++ b/tools/quake3/q3map2/convert_json.cpp @@ -661,7 +661,6 @@ int ConvertJsonMain( Args& args ){ read_json( StringStream( PathExtensionless( source ), '/' ), useFlagNames, skipUnknownFlags ); UnparseEntities(); path_set_extension( source, "_json.bsp" ); - Sys_Printf( "Writing %s\n", source ); WriteBSPFile( source ); } diff --git a/tools/quake3/q3map2/light.cpp b/tools/quake3/q3map2/light.cpp index 3cbf5a77..dde719cc 100644 --- a/tools/quake3/q3map2/light.cpp +++ b/tools/quake3/q3map2/light.cpp @@ -1920,7 +1920,6 @@ static void LightWorld( bool fastAllocate, bool bounceStore ){ StoreSurfaceLightmaps( fastAllocate, bounceStore ); if( bounceStore ){ UnparseEntities(); - Sys_Printf( "Writing %s\n", source ); WriteBSPFile( source ); } @@ -2840,7 +2839,6 @@ int LightMain( Args& args ){ /* write out the bsp */ UnparseEntities(); - Sys_Printf( "Writing %s\n", source ); WriteBSPFile( source ); /* ydnar: export lightmaps */ diff --git a/tools/quake3/q3map2/lightmaps_ydnar.cpp b/tools/quake3/q3map2/lightmaps_ydnar.cpp index 33a9941f..5a6a6aae 100644 --- a/tools/quake3/q3map2/lightmaps_ydnar.cpp +++ b/tools/quake3/q3map2/lightmaps_ydnar.cpp @@ -251,7 +251,6 @@ int ImportLightmapsMain( Args& args ){ } /* write the bsp */ - Sys_Printf( "writing %s\n", source ); WriteBSPFile( source ); /* return to sender */ diff --git a/tools/quake3/q3map2/vis.cpp b/tools/quake3/q3map2/vis.cpp index 0eb8e03c..97e9bb49 100644 --- a/tools/quake3/q3map2/vis.cpp +++ b/tools/quake3/q3map2/vis.cpp @@ -970,7 +970,6 @@ int VisMain( Args& args ){ } /* write the bsp file */ - Sys_Printf( "Writing %s\n", source ); WriteBSPFile( source ); return 0; diff --git a/tools/quake3/q3map2/writebsp.cpp b/tools/quake3/q3map2/writebsp.cpp index d622711d..77046cc8 100644 --- a/tools/quake3/q3map2/writebsp.cpp +++ b/tools/quake3/q3map2/writebsp.cpp @@ -354,9 +354,7 @@ void EndBSPFile( bool do_write ){ WriteSurfaceExtraFile( source ); /* write the bsp */ - const auto path = StringStream( source, ".bsp" ); - Sys_Printf( "Writing %s\n", path.c_str() ); - WriteBSPFile( path ); + WriteBSPFile( StringStream( source, ".bsp" ) ); } }