add MST_PLANAR and MST_TRIANGLE_SOUP counts to -info report

This commit is contained in:
Garux 2021-07-22 17:32:58 +03:00
parent 45c3c4c012
commit 3c17f8fbc5

View File

@ -436,11 +436,14 @@ void PrintBSPFileSizes( void ){
if ( entities.empty() ) { if ( entities.empty() ) {
ParseEntities(); ParseEntities();
} }
int patchCount = 0; int patchCount = 0, planarCount = 0, trisoupCount = 0;
bspDrawSurface_t *s; for ( const bspDrawSurface_t *s = bspDrawSurfaces; s != bspDrawSurfaces + numBSPDrawSurfaces; ++s ){
for ( s = bspDrawSurfaces; s != bspDrawSurfaces + numBSPDrawSurfaces; ++s ){
if ( s->surfaceType == MST_PATCH ) if ( s->surfaceType == MST_PATCH )
++patchCount; ++patchCount;
else if ( s->surfaceType == MST_PLANAR )
++planarCount;
else if ( s->surfaceType == MST_TRIANGLE_SOUP )
++trisoupCount;
} }
/* note that this is abstracted */ /* note that this is abstracted */
Sys_Printf( "Abstracted BSP file components (*actual sizes may differ)\n" ); Sys_Printf( "Abstracted BSP file components (*actual sizes may differ)\n" );
@ -474,8 +477,12 @@ void PrintBSPFileSizes( void ){
Sys_Printf( "%9d drawsurfaces %9d *\n", Sys_Printf( "%9d drawsurfaces %9d *\n",
numBSPDrawSurfaces, (int) ( numBSPDrawSurfaces * sizeof( *bspDrawSurfaces ) ) ); numBSPDrawSurfaces, (int) ( numBSPDrawSurfaces * sizeof( *bspDrawSurfaces ) ) );
Sys_Printf( "%9d patchsurfaces \n", Sys_Printf( "%9d patch surfaces\n",
patchCount ); patchCount );
Sys_Printf( "%9d planar surfaces\n",
planarCount );
Sys_Printf( "%9d trisoup surfaces\n",
trisoupCount );
Sys_Printf( "%9d drawverts %9d *\n", Sys_Printf( "%9d drawverts %9d *\n",
numBSPDrawVerts, (int) ( numBSPDrawVerts * sizeof( *bspDrawVerts ) ) ); numBSPDrawVerts, (int) ( numBSPDrawVerts * sizeof( *bspDrawVerts ) ) );
Sys_Printf( "%9d drawindexes %9d\n", Sys_Printf( "%9d drawindexes %9d\n",