From 3c17f8fbc5c4c66782a4e7eddfda0466782db432 Mon Sep 17 00:00:00 2001 From: Garux Date: Thu, 22 Jul 2021 17:32:58 +0300 Subject: [PATCH] add MST_PLANAR and MST_TRIANGLE_SOUP counts to -info report --- tools/quake3/q3map2/bspfile_abstract.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tools/quake3/q3map2/bspfile_abstract.cpp b/tools/quake3/q3map2/bspfile_abstract.cpp index 84a6a6ef..ac98a1a7 100644 --- a/tools/quake3/q3map2/bspfile_abstract.cpp +++ b/tools/quake3/q3map2/bspfile_abstract.cpp @@ -436,11 +436,14 @@ void PrintBSPFileSizes( void ){ if ( entities.empty() ) { ParseEntities(); } - int patchCount = 0; - bspDrawSurface_t *s; - for ( s = bspDrawSurfaces; s != bspDrawSurfaces + numBSPDrawSurfaces; ++s ){ + int patchCount = 0, planarCount = 0, trisoupCount = 0; + for ( const bspDrawSurface_t *s = bspDrawSurfaces; s != bspDrawSurfaces + numBSPDrawSurfaces; ++s ){ if ( s->surfaceType == MST_PATCH ) ++patchCount; + else if ( s->surfaceType == MST_PLANAR ) + ++planarCount; + else if ( s->surfaceType == MST_TRIANGLE_SOUP ) + ++trisoupCount; } /* note that this is abstracted */ Sys_Printf( "Abstracted BSP file components (*actual sizes may differ)\n" ); @@ -474,8 +477,12 @@ void PrintBSPFileSizes( void ){ Sys_Printf( "%9d drawsurfaces %9d *\n", numBSPDrawSurfaces, (int) ( numBSPDrawSurfaces * sizeof( *bspDrawSurfaces ) ) ); - Sys_Printf( "%9d patchsurfaces \n", + Sys_Printf( "%9d patch surfaces\n", patchCount ); + Sys_Printf( "%9d planar surfaces\n", + planarCount ); + Sys_Printf( "%9d trisoup surfaces\n", + trisoupCount ); Sys_Printf( "%9d drawverts %9d *\n", numBSPDrawVerts, (int) ( numBSPDrawVerts * sizeof( *bspDrawVerts ) ) ); Sys_Printf( "%9d drawindexes %9d\n",