From: Thomas Debesse Date: Sun, 22 Sep 2019 08:09:43 +0000 (+0200) Subject: q3map2/bsp: introduce -maxsurfacevertices, rename -mv and -mi X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1f4a99fd3634cd4e1a34cd6f953a0218aca57b8b;p=xonotic%2Fnetradiant.git q3map2/bsp: introduce -maxsurfacevertices, rename -mv and -mi - introduce -maxsurfaceverts (was missing as command line option) - rename -mv to -maxlightmapvertices - rename -mi to -maxsurfaceindexes --- diff --git a/tools/quake3/q3map2/bsp.c b/tools/quake3/q3map2/bsp.c index f926a8dd..0c1a6bd4 100644 --- a/tools/quake3/q3map2/bsp.c +++ b/tools/quake3/q3map2/bsp.c @@ -828,7 +828,29 @@ int BSPMain( int argc, char **argv ){ i++; Sys_Printf( "Distance epsilon set to %f\n", distanceEpsilon ); } - else if ( !strcmp( argv[ i ], "-mv" ) ) { + else if ( !strcmp( argv[ i ], "-maxsurfacevertices" ) ) { + maxSurfaceVerts = atoi( argv[ i + 1 ] ); + if ( maxSurfaceVerts < 3 ) { + maxSurfaceVerts = 3; + } + i++; + Sys_Printf( "Maximum per-surface vertex count set to %d\n", maxSurfaceVerts ); + } + else if ( !strcmp( argv[ i ], "-maxsurfaceindexes" ) || !strcmp( argv[ i ], "-mi" ) ) { + maxSurfaceIndexes = atoi( argv[ i + 1 ] ); + if ( maxSurfaceIndexes < 3 ) { + maxSurfaceIndexes = 3; + } + i++; + + if ( !strcmp( argv[ i ], "-mi" ) ) { + Sys_Printf( "The -mi argument is deprecated, use \"-maxsurfaceindexes\" instead\n" ); + } + else { + Sys_Printf( "Maximum per-surface index count set to %d\n", maxSurfaceIndexes ); + } + } + else if ( !strcmp( argv[ i ], "-maxlightmapvertices" ) || !strcmp( argv[ i ], "-mv" ) ) { maxLMSurfaceVerts = atoi( argv[ i + 1 ] ); if ( maxLMSurfaceVerts < 3 ) { maxLMSurfaceVerts = 3; @@ -837,15 +859,13 @@ int BSPMain( int argc, char **argv ){ maxSurfaceVerts = maxLMSurfaceVerts; } i++; - Sys_Printf( "Maximum lightmapped surface vertex count set to %d\n", maxLMSurfaceVerts ); - } - else if ( !strcmp( argv[ i ], "-mi" ) ) { - maxSurfaceIndexes = atoi( argv[ i + 1 ] ); - if ( maxSurfaceIndexes < 3 ) { - maxSurfaceIndexes = 3; + + if ( !strcmp( argv[ i ], "-mv" ) ) { + Sys_Printf( "The -mv argument is deprecated, use \"-maxlightmapvertices\" instead\n" ); + } + else { + Sys_Printf( "Maximum lightmapped surface vertex count set to %d\n", maxLMSurfaceVerts ); } - i++; - Sys_Printf( "Maximum per-surface index count set to %d\n", maxSurfaceIndexes ); } else if ( !strcmp( argv[ i ], "-np" ) ) { npDegrees = atof( argv[ i + 1 ] ); diff --git a/tools/quake3/q3map2/help.c b/tools/quake3/q3map2/help.c index 0e908152..7c05b326 100644 --- a/tools/quake3/q3map2/help.c +++ b/tools/quake3/q3map2/help.c @@ -104,13 +104,16 @@ void HelpBsp() {"-leaktest", "Abort if a leak was found"}, {"-linfile ", "Line file to write"}, {"-maxarea", "Use Max Area face surface generation"}, + {"-maxlightmapvertices ", "Sets the maximum number of vertices per lightmapped surface"}, + {"-maxsurfaceindexes ", "Sets the maximum number of indexes per surface"}, + {"-maxsurfacevertices ", "Sets the maximum number of vertices per surface"}, {"-meta", "Combine adjacent triangles of the same texture to surfaces (ALWAYS USE THIS)"}, {"-metaadequatescore ", "Adequate score for adding triangles to meta surfaces"}, {"-metagoodscore ", "Good score for adding triangles to meta surfaces"}, {"-metamaxbboxdistance ", "Maximum bounding box distance for meta surfaces"}, {"-minsamplesize ", "Sets minimum lightmap resolution in luxels/qu"}, - {"-mi ", "Sets the maximum number of indexes per surface"}, - {"-mv ", "Sets the maximum number of vertices of a lightmapped surface"}, + {"-mi ", "Deprecated alias for `-maxsurfaceindexes`"}, + {"-mv ", "Deprecated alias for `-maxlightmapverts`"}, {"-ne ", "Normal epsilon for plane snapping etc."}, {"-nocurves", "Turn off support for patches"}, {"-nodetail", "Leave out detail brushes"},