]> git.xonotic.org Git - xonotic/netradiant.git/commitdiff
q3map2/bsp: introduce -maxsurfacevertices, rename -mv and -mi
authorThomas Debesse <dev@illwieckz.net>
Sun, 22 Sep 2019 08:09:43 +0000 (10:09 +0200)
committerThomas Debesse <dev@illwieckz.net>
Sun, 13 Oct 2019 02:19:57 +0000 (04:19 +0200)
- introduce -maxsurfaceverts (was missing as command line option)
- rename -mv to -maxlightmapvertices
- rename -mi to -maxsurfaceindexes

tools/quake3/q3map2/bsp.c
tools/quake3/q3map2/help.c

index f926a8dda84d993d9983d759ee7d81734cd4891d..0c1a6bd44fe57208b01a6433e5f81ae4388a1fe1 100644 (file)
@@ -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 ] );
index 0e9081526e39966fccefe1504015ac8910476a3d..7c05b32649b50cfcb5783c8c0f218de341ad3bd5 100644 (file)
@@ -104,13 +104,16 @@ void HelpBsp()
                {"-leaktest", "Abort if a leak was found"},
                {"-linfile <filename.lin>", "Line file to write"},
                {"-maxarea", "Use Max Area face surface generation"},
+               {"-maxlightmapvertices <N>", "Sets the maximum number of vertices per lightmapped surface"},
+               {"-maxsurfaceindexes <N>", "Sets the maximum number of indexes per surface"},
+               {"-maxsurfacevertices <N>", "Sets the maximum number of vertices per surface"},
                {"-meta", "Combine adjacent triangles of the same texture to surfaces (ALWAYS USE THIS)"},
                {"-metaadequatescore <N>", "Adequate score for adding triangles to meta surfaces"},
                {"-metagoodscore <N>", "Good score for adding triangles to meta surfaces"},
                {"-metamaxbboxdistance <F>", "Maximum bounding box distance for meta surfaces"},
                {"-minsamplesize <N>", "Sets minimum lightmap resolution in luxels/qu"},
-               {"-mi <N>", "Sets the maximum number of indexes per surface"},
-               {"-mv <N>", "Sets the maximum number of vertices of a lightmapped surface"},
+               {"-mi <N>", "Deprecated alias for `-maxsurfaceindexes`"},
+               {"-mv <N>", "Deprecated alias for `-maxlightmapverts`"},
                {"-ne <F>", "Normal epsilon for plane snapping etc."},
                {"-nocurves", "Turn off support for patches"},
                {"-nodetail", "Leave out detail brushes"},