]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - tools/quake3/q3map2/help.c
q3map2/help: list supported games
[xonotic/netradiant.git] / tools / quake3 / q3map2 / help.c
index e56b99a08391533bd0c573e11837ac57c453adce..5f5664d79e57f45196fbeb2ca751aa8c998970c4 100644 (file)
@@ -214,11 +214,11 @@ void HelpLight()
                {"-extravisnudge", "Broken feature to nudge the luxel origin to a better vis cluster"},
                {"-extrawide", "Deprecated alias for `-super 2 -filter`"},
                {"-extra", "Deprecated alias for `-super 2`"},
-               {"-fastallocate", "Deprecated alias for `-fastlightmapsearch`"},
+               {"-fastallocate",  "Trade lightmap size against packing time (useful with hi res lightmaps on large maps: reduce allocation time from days to minutes for only some extra bytes)"},
                {"-fastbounce", "Use `-fast` style lighting for radiosity"},
                {"-faster", "Use a faster falloff curve for lighting; also implies `-fast`"},
                {"-fastgrid", "Use `-fast` style lighting for the light grid"},
-               {"-fastlightmapsearch", "Use `-fastlightmapsearch` to trade lightmap size against packing time (useful with hi res lightmaps on large maps: reduce allocation time from days to minutes for only some extra bytes)"},
+               {"-fastlightmapsearch", "Deprecated alias for `-fastallocate`"},
                {"-fast", "Ignore tiny light contributions"},
                {"-fill", "Fill lightmap colors from surrounding pixels to improve JPEG compression"},
                {"-filter", "Lightmap filtering"},
@@ -266,6 +266,7 @@ void HelpLight()
                {"-shadeangle <A>", "Angle for phong shading"},
                {"-shade", "Enable phong shading at default shade angle"},
                {"-skyscale <F, `-sky` F>", "Scaling factor for sky and sun light"},
+               {"-slowallocate", "Use old (a bit more careful, but much slower) lightmaps packing algorithm (default)"},
                {"-smooth", "Deprecated alias for `-samples 2`"},
                {"-sphericalscale <F, `-spherical` F>", "Scaling factor for spherical point light entities"},
                {"-spotscale <F, `-spot` F>", "Scaling factor for spot point light entities"},
@@ -422,6 +423,38 @@ void HelpCommon()
        HelpOptions("Common Options", 0, 80, common, sizeof(common)/sizeof(struct HelpOption));
 }
 
+void HelpGames()
+{
+       printf("Games:\n");
+       qboolean begin = qtrue;
+
+       // TODO: sort alphabetically
+       for ( unsigned i = 0, length = 0; games[ i ].arg != NULL; i++ )
+       {
+               // 3 for two whitespaces at the beginning and one (optional) comma a the end
+               if ( length + 3 + strlen( games[ i ].arg ) > 80 )
+               {
+                       printf(",\n");
+                       length = 0;
+                       begin = qtrue;
+               }
+
+               if ( begin )
+               {
+                       printf("  %s", games[ i ].arg );
+                       begin = qfalse;
+               }
+               else
+               {
+                       printf(", %s", games[ i ].arg );
+               }
+
+               length += 2 + strlen( games[ i ].arg );
+       }
+
+       printf("\n\n");
+}
+
 void HelpMain(const char* arg)
 {
        printf("Usage: q3map2 [stage] [common options...] [stage options...] [stage source file]\n");
@@ -429,6 +462,8 @@ void HelpMain(const char* arg)
 
        HelpCommon();
 
+       HelpGames();
+
        struct HelpOption stages[] = {
                {"-bsp", "BSP Stage"},
                {"-vis", "VIS Stage"},