* synchronize -help, html help and actually available command line arguments

This commit is contained in:
Garux 2021-09-28 19:23:47 +03:00
parent 5017da5fe4
commit 70b711c4cf
3 changed files with 274 additions and 148 deletions

View File

@ -102,16 +102,18 @@ td.formatted_questions ol { margin-top: 0px; margin-bottom: 0px; }
<h2 id="Common-options">Common options<a href="#Common-options" class="wiki-anchor">&para;</a></h2>
<ul>
<li><strong><code>-connect</code> address:</strong> Talk to a NetRadiant instance using a specific XML based protocol</li>
<li><strong><code>-force</code>:</strong> Allow reading some broken/unsupported BSP files e.g. when decompiling, may also crash</li>
<li><strong><code>-connect</code> address:</strong> Talk to a NetRadiant instance using a specific XML based protocol</li>
<li><strong><code>-force</code>:</strong> Allow reading some broken/unsupported BSP files e.g. when decompiling, may crash. Also enables decompilation of model autoclip brushes.</li>
<li><strong><code>-fs_basepath</code> path:</strong> Sets the given path as main directory of the game (can be used more than once to look in multiple paths)</li>
<li><strong><code>-fs_forbiddenpath</code> pattern:</strong> Pattern to ignore directories, pk3, and pk3dir; example pak?.pk3 (can be used more than once to look for multiple patterns)</li>
<li><strong><code>-fs_game</code> gamename:</strong> Sets extra game directory name to additionally load mod's resources from at higher priority (by default for Q3A 'baseq3' is loaded, -fs_game cpma will also load 'cpma'; can be used more than once)</li>
<li><strong><code>-fs_basegame</code> gamename:</strong> Overrides default game directory name (e.g. Q3A uses 'baseq3', OpenArena 'baseoa', so -game quake3 -fs_basegame baseoa for OA )</li>
<li><strong><code>-fs_homebase</code> dir:</strong> Specifies where the user home directory name is on Linux (default for Q3A: .q3a)</li>
<li><strong><code>-game</code> gamename:</strong> Load settings for the given game (default: quake3)</li>
<li><strong><code>-fs_home</code> dir:</strong> Specifies where the user home directory is on Linux</li>
<li><strong><code>-fs_homebase</code> dir:</strong> Specifies game home directory relative to user home directory on Linux (default for Q3A: .q3a)</li>
<li><strong><code>-fs_homepath</code> path:</strong> Sets the given path as the game home directory name (fs_home + fs_homebase)</li>
<li><strong><code>-fs_pakpath</code> path:</strong> Specify a package directory (can be used more than once to look in multiple paths)</li>
<li><strong><code>-game</code> gamename:</strong> Load settings for the given game (default: quake3), -help -game lists available games</li>
<li><strong><code>-subdivisions</code> F:</strong> multiplier for patch subdivisions quality</li>
<li><strong><code>-threads</code> N:</strong> number of threads to use</li>
<li><strong><code>-v</code>:</strong> Verbose mode</li>
@ -119,24 +121,28 @@ td.formatted_questions ol { margin-top: 0px; margin-bottom: 0px; }
<h2 id="BSP-stage">BSP stage<a href="#BSP-stage" class="wiki-anchor">&para;</a></h2>
<ul>
<li><strong><code>-bsp</code> ... filename.map:</strong> Switch that enters this stage</li>
<li><strong><code>-bsp</code> ... filename.map:</strong> Switch that enters this stage</li>
<li><strong><code>-altsplit</code>:</strong> Alternate BSP tree splitting weights (should give more fps)</li>
<li><strong><code>-celshader</code> shadername:</strong> Sets a global cel shader name</li>
<li><strong><code>-clipdepth</code> F:</strong> Model autoclip brushes thickness, default = 2</li>
<li><strong><code>-custinfoparms</code>:</strong> Read scripts/custinfoparms.txt</li>
<li><strong><code>-debugclip</code>:</strong> Make model autoclip brushes visible, using shaders debugclip, debugclip2</li>
<li><strong><code>-debuginset</code>:</strong> Push all triangle vertexes towards the triangle center</li>
<li><strong><code>-debugportals</code>:</strong> Make BSP portals visible in the map</li>
<li><strong><code>-debugsurfaces</code>:</strong> Color the vertexes according to the index of the surface</li>
<li><strong><code>-deep</code>:</strong> Use detail brushes in the BSP tree, but at lowest priority (should give more fps)</li>
<li><strong><code>-de</code> F:</strong> Distance epsilon for plane snapping etc.</li>
<li><strong><code>-fakemap</code>:</strong> Write fakemap.map containing all world brushes</li>
<li><strong><code>-flares</code>:</strong> Turn on support for flares (TEST?)</li>
<li><strong><code>-flares</code>:</strong> Turn on support for flares</li>
<li><strong><code>-flat</code>:</strong> Enable flat shading (good for combining with -celshader)</li>
<li><strong><code>-fulldetail</code>:</strong> Treat detail brushes as structural ones</li>
<li><strong><code>-keeplights</code>:</strong> Keep light entities in the BSP file after compile</li>
<li><strong><code>-leaktest</code>:</strong> Abort if a leak was found</li>
<li><strong><code>-maxarea</code>:</strong> Use Max Area face surface generation</li>
<li><strong><code>-meta</code>:</strong> Combine adjacent triangles of the same texture to surfaces (ALWAYS USE THIS)</li>
<li><strong><code>-metaadequatescore</code> N:</strong> Adequate score for adding triangles to meta surfaces</li>
<li><strong><code>-metagoodscore</code> N:</strong> Good score for adding triangles to meta surfaces</li>
<li><strong><code>-minsamplesize</code> N:</strong> Sets minimum lightmap resolution in luxels/qu</li>
<li><strong><code>-mi</code> N:</strong> Sets the maximum number of indexes per surface</li>
<li><strong><code>-mv</code> N:</strong> Sets the maximum number of vertices of a lightmapped surface</li>
@ -146,6 +152,10 @@ td.formatted_questions ol { margin-top: 0px; margin-bottom: 0px; }
<li><strong><code>-noflares</code>:</strong> Turn off support for flares</li>
<li><strong><code>-nofog</code>:</strong> Turn off support for fog volumes</li>
<li><strong><code>-nohint</code>:</strong> Turn off support for hint brushes</li>
<li><strong><code>-noob</code>:</strong> Assign surfaceparm noob to all map surfaces (Q3A:Defrag mod no-overbounces flag)</li>
<li><strong><code>-nosRGB</code>:</strong> Treat colors and textures as linear colorspace</li>
<li><strong><code>-nosRGBcolor</code>:</strong> Treat shader and light entity colors as linear colorspace</li>
<li><strong><code>-nosRGBtex</code>:</strong> Treat textures as linear colorspace</li>
<li><strong><code>-nosubdivide</code>:</strong> Turn off support for <code>q3map_tessSize</code> (breaks water vertex deforms)</li>
<li><strong><code>-notjunc</code>:</strong> Do not fix T-junctions (causes cracks between triangles, do not use)</li>
<li><strong><code>-nowater</code>:</strong> Turn off support for water, slime or lava (Stef, this is for you)</li>
@ -156,41 +166,45 @@ td.formatted_questions ol { margin-top: 0px; margin-bottom: 0px; }
<li><strong><code>-samplesize</code> N:</strong> Sets default lightmap resolution in luxels/qu</li>
<li><strong><code>-skyfix</code>:</strong> Turn sky box into six surfaces to work around ATI problems</li>
<li><strong><code>-snap</code> N:</strong> Snap brush bevel planes to the given number of units</li>
<li><strong><code>-sRGBcolor</code>:</strong> Treat shader and light entity colors as sRGB colorspace</li>
<li><strong><code>-sRGBtex</code>:</strong> Treat textures as sRGB colorspace</li>
<li><strong><code>-tempname</code> filename.map:</strong> Read the MAP file from the given file name</li>
<li><strong><code>-verboseentities</code>:</strong> Enable <code>-v</code> only for map entities, not for the world</li>
</ul>
<h2 id="VIS-stage">VIS stage<a href="#VIS-stage" class="wiki-anchor">&para;</a></h2>
<ul>
<li><strong><code>-vis</code> ... filename.map:</strong> Switch that enters this stage</li>
<li><strong><code>-vis</code> ... filename.map:</strong> Switch that enters this stage</li>
<li><strong><code>-fast</code>:</strong> Very fast and crude vis calculation</li>
<li><strong><code>-hint</code>:</strong> Merge all but hint portals</li>
<li><strong><code>-mergeportals</code>:</strong> The less crude half of <code>-merge</code>, makes vis sometimes much faster but doesn't hurt fps usually</li>
<li><strong><code>-merge</code>:</strong> Faster but still okay vis calculation</li>
<li><strong><code>-nopassage</code>:</strong> Just use PortalFlow vis (usually less fps)</li>
<li><strong><code>-nosort</code>:</strong> Do not sort the portals before calculating vis (usually slower)</li>
<li><strong><code>-passageOnly</code>:</strong> Just use PassageFlow vis (usually less fps)</li>
<li><strong><code>-saveprt</code>:</strong> Keep the PRT file after running vis (so you can run vis again)</li>
<li><strong><code>-v -v</code>:</strong> Extra verbose mode for cluster debug</li>
</ul>
<h2 id="LIGHT-stage">LIGHT stage<a href="#LIGHT-stage" class="wiki-anchor">&para;</a></h2>
<ul>
<li><strong><code>-light</code> ... filename.map:</strong> Switch that enters this stage</li>
<li><strong><code>-light</code> ... filename.map:</strong> Switch that enters this stage</li>
<li><strong><code>-approx</code> N:</strong> Vertex light approximation tolerance (never use in conjunction with deluxemapping)</li>
<li><strong><code>-areascale</code> F, <code>-area</code> F:</strong> Scaling factor for area lights (surfacelight)</li>
<li><strong><code>-backsplash</code> Fscale Fdistance:</strong> scale area lights backsplash fraction + set distance globally; (distance &lt -900 to omit distance setting); default = 1 23; real area lights have no backsplash (scale = 0); q3map_backsplash shader keyword overrides this setting</li>
<li><strong><code>-border</code>:</strong> Add a red border to lightmaps for debugging</li>
<li><strong><code>-bouncecolorratio</code> F:</strong> 0..1 ratio of colorizing light sample by texture</li>
<li><strong><code>-bouncegrid</code>:</strong> Also compute radiosity on the light grid</li>
<li><strong><code>-bounceonly</code>:</strong> Only compute radiosity</li>
<li><strong><code>-bouncescale</code> F:</strong> Scaling factor for radiosity</li>
<li><strong><code>-bounce</code> N:</strong> Number of bounces for radiosity</li>
<li><strong><code>-brightness</code> F:</strong> Scaling factor for resulting lightmaps brightness</li>
<li><strong><code>-cheapgrid</code>:</strong> Use <code>-cheap</code> style lighting for radiosity</li>
<li><strong><code>-cheap</code>:</strong> Abort vertex light calculations when white is reached</li>
<li><strong><code>-compensate</code> F:</strong> Lightmap compensate (darkening factor applied after everything else)</li>
<li><strong><code>-contrast</code> F:</strong> -255 .. 255 lighting contrast, default = 0</li>
<li><strong><code>-cpma</code>:</strong> CPMA vertex lighting mode</li>
<li><strong><code>-custinfoparms</code>:</strong> Read scripts/custinfoparms.txt</li>
<li><strong><code>-dark</code>:</strong> Darken lightmap seams</li>
@ -199,6 +213,7 @@ td.formatted_questions ol { margin-top: 0px; margin-bottom: 0px; }
<li><strong><code>-debugdeluxe</code>:</strong> Show deluxemaps on the lightmap</li>
<li><strong><code>-debugnormals</code>:</strong> Color the lightmaps according to the direction of the surface normal</li>
<li><strong><code>-debugorigin</code>:</strong> Color the lightmaps according to the origin of the luxels</li>
<li><strong><code>-debugsamplesize</code>:</strong> display all of 'surface too large for desired samplesize+lightmapsize' warnings</li>
<li><strong><code>-debugsurfaces</code>, <code>-debugsurface</code>:</strong> Color the lightmaps according to the index of the surface</li>
<li><strong><code>-debug</code>:</strong> Mark the lightmaps according to the cluster: unmapped clusters get yellow, occluded ones get pink, flooded ones get blue overlay color, otherwise red</li>
<li><strong><code>-deluxemode 0</code>:</strong> Use modelspace deluxemaps (DarkPlaces)</li>
@ -215,6 +230,8 @@ td.formatted_questions ol { margin-top: 0px; margin-bottom: 0px; }
<li><strong><code>-export</code>:</strong> Export lightmaps when compile finished (like <code>-export</code> mode)</li>
<li><strong><code>-exposure</code> F:</strong> Lightmap exposure to better support overbright spots</li>
<li><strong><code>-external</code>:</strong> Force external lightmaps even if at size of internal lightmaps</li>
<li><strong><code>-extlmhacksize</code> N or N N:</strong> External lightmaps hack size: similar to -lightmapsize N: Size of lightmaps to generate (must be a power of two), but instead of native external lightmaps enables hack to reference them in autogenerated shader (for vanilla Q3 etc)</li>
<li><strong><code>-extradist</code> F:</strong> Extra distance for lights in map units</li>
<li><strong><code>-extravisnudge</code>:</strong> Broken feature to nudge the luxel origin to a better vis cluster</li>
<li><strong><code>-extrawide</code>:</strong> Deprecated alias for <code>-super 2 -filter</code></li>
<li><strong><code>-extra</code>:</strong> Deprecated alias for <code>-super 2</code></li>
@ -222,12 +239,17 @@ td.formatted_questions ol { margin-top: 0px; margin-bottom: 0px; }
<li><strong><code>-faster</code>:</strong> Use a faster falloff curve for lighting; also implies <code>-fast</code></li>
<li><strong><code>-fastgrid</code>:</strong> Use <code>-fast</code> style lighting for the light grid</li>
<li><strong><code>-fast</code>:</strong> Ignore tiny light contributions</li>
<li><strong><code>-fill</code>:</strong> Fill lightmap colors from surrounding pixels to improve JPEG compression</li>
<li><strong><code>-fillpink</code>:</strong> Fill unoccupied lightmap pixels with pink colour</li>
<li><strong><code>-filter</code>:</strong> Lightmap filtering</li>
<li><strong><code>-floodlight</code>:</strong> Enable floodlight (zero-effort somewhat decent lighting)</li>
<li><strong><code>-gamma</code> F:</strong> Lightmap gamma</li>
<li><strong><code>-gridambientdirectionality</code> F:</strong> Ambient directional lighting received (default: 0.0)</li>
<li><strong><code>-gridambientscale</code> F:</strong> Scaling factor for the light grid ambient components only</li>
<li><strong><code>-griddirectionality</code> F:</strong> Directional lighting received (default: 1.0)</li>
<li><strong><code>-gridscale</code> F:</strong> Scaling factor for the light grid only</li>
<li><strong><code>-keeplights</code>:</strong> Keep light entities in the BSP file after compile</li>
<li><strong><code>-lightanglehl</code> 0:</strong> Disable half lambert light angle attenuation</li>
<li><strong><code>-lightanglehl</code> 1:</strong> Enable half lambert light angle attenuation</li>
<li><strong><code>-lightmapdir</code> directory:</strong> Directory to store external lightmaps (default: same as map name without extension)</li>
<li><strong><code>-lightmapsize</code> N:</strong> Size of lightmaps to generate (must be a power of two)</li>
<li><strong><code>-lomem</code>:</strong> Low memory but slower lighting mode</li>
@ -235,98 +257,119 @@ td.formatted_questions ol { margin-top: 0px; margin-bottom: 0px; }
<li><strong><code>-minsamplesize</code> N:</strong> Sets minimum lightmap resolution in luxels/qu</li>
<li><strong><code>-nocollapse</code>:</strong> Do not collapse identical lightmaps</li>
<li><strong><code>-nodeluxe</code>, <code>-nodeluxemap</code>:</strong> Disable deluxemapping</li>
<li><strong><code>-nofastpoint</code>:</strong> Disable fast point light calculation</li>
<li><strong><code>-nogrid</code>:</strong> Disable grid light calculation (makes all entities fullbright)</li>
<li><strong><code>-nolightmapsearch</code>:</strong> Do not optimize lightmap packing for GPU memory usage (as doing so costs fps)</li>
<li><strong><code>-nolm</code>:</strong> Skip lightmaps calculation</li>
<li><strong><code>-normalmap</code>:</strong> Color the lightmaps according to the direction of the surface normal (TODO is this identical to <code>-debugnormals</code>?)</li>
<li><strong><code>-nosRGB</code>:</strong> Treat colors, textures, and lightmaps as linear colorspace</li>
<li><strong><code>-nosRGBcolor</code>:</strong> Treat shader and light entity colors as linear colorspace</li>
<li><strong><code>-nosRGBlight</code>:</strong> Write lightmaps as linear colorspace</li>
<li><strong><code>-nosRGBtex</code>:</strong> Treat textures as linear colorspace</li>
<li><strong><code>-nostyle</code>, <code>-nostyles</code>:</strong> Disable support for light styles</li>
<li><strong><code>-nosurf</code>:</strong> Disable tracing against surfaces (only uses BSP nodes then)</li>
<li><strong><code>-notrace</code>:</strong> Disable shadow occlusion</li>
<li><strong><code>-novertex</code>:</strong> Disable vertex lighting</li>
<li><strong><code>-novertex</code>:</strong> Disable vertex lighting; optional (0..1) value sets constant vertex light globally</li>
<li><strong><code>-patchshadows</code>:</strong> Cast shadows from patches</li>
<li><strong><code>-pointscale</code> F, <code>-point</code> F:</strong> Scaling factor for point lights (light entities)</li>
<li><strong><code>-pointscale</code> F, <code>-point</code> F:</strong> Scaling factor for spherical and spot point lights (light entities)</li>
<li><strong><code>-q3</code>:</strong> Use nonlinear falloff curve by default (like Q3A)</li>
<li><strong><code>-randomsamples</code>:</strong> Use random sampling for lightmaps</li>
<li><strong><code>-rawlightmapsizelimit</code> N:</strong> Sets maximum lightmap resolution in luxels/qu (only affects patches if used -patchmeta in BSP stage)</li>
<li><strong><code>-samplescale</code> F:</strong> Scales all lightmap resolutions</li>
<li><strong><code>-samplesize</code> N:</strong> Sets default lightmap resolution in luxels/qu</li>
<li><strong><code>-samplessearchboxsize</code> N:</strong> Search box size (1 to 4) for lightmap adaptive supersampling</li>
<li><strong><code>-samples</code> N:</strong> Adaptive supersampling quality</li>
<li><strong><code>-saturation</code> F:</strong> Lighting saturation: default = 1, &gt 1 = saturate, 0 = grayscale, &lt 0 = complementary colors</li>
<li><strong><code>-scale</code> F:</strong> Scaling factor for all light types</li>
<li><strong><code>-shadeangle</code> A:</strong> Angle for phong shading</li>
<li><strong><code>-shade</code>:</strong> Enable phong shading at default shade angle</li>
<li><strong><code>-skyscale</code> F, <code>-sky</code> F:</strong> Scaling factor for sky and sun light</li>
<li><strong><code>-slowallocate</code>:</strong> Use old (a bit more careful, but much slower) lightmaps packing algorithm</li>
<li><strong><code>-smooth</code>:</strong> Deprecated alias for <code>-samples 2</code></li>
<li><strong><code>-sphericalscale</code> F, <code>-spherical</code> F:</strong> Scaling factor for spherical point light entities</li>
<li><strong><code>-spotscale</code> F, <code>-spot</code> F:</strong> Scaling factor for spot point light entities</li>
<li><strong><code>-sRGB</code>:</strong> Treat colors, textures, and lightmaps as sRGB colorspace</li>
<li><strong><code>-sRGBcolor</code>:</strong> Treat shader and light entity colors as sRGB colorspace</li>
<li><strong><code>-sRGBlight</code>:</strong> Write lightmaps as sRGB colorspace</li>
<li><strong><code>-sRGBtex</code>:</strong> Treat textures as sRGB colorspace</li>
<li><strong><code>-style</code>, <code>-styles</code>:</strong> Enable support for light styles</li>
<li><strong><code>-sunonly</code>:</strong> Only compute sun light</li>
<li><strong><code>-super</code> N, <code>-supersample</code> N:</strong> Ordered grid supersampling quality</li>
<li><strong><code>-thresh</code> F:</strong> Triangle subdivision threshold</li>
<li><strong><code>-trianglecheck</code>:</strong> Broken check that should ensure luxels apply to the right triangle</li>
<li><strong><code>-trisoup</code>:</strong> Convert brush faces to triangle soup</li>
<li><strong><code>-vertexscale</code> F:</strong> Scaling factor for resulting vertex light values</li>
<li><strong><code>-wolf</code>:</strong> Use linear falloff curve by default (like W:ET)</li>
</ul>
<h2 id="Analyzing-BSP-like-file-structure">Analyzing BSP-like file structure<a href="#Analyzing-BSP-like-file-structure" class="wiki-anchor">&para;</a></h2>
<ul>
<li><strong><code>-analyze</code> ... filename.bsp:</strong> Switch that enters this mode</li>
<li><strong><code>-analyze</code> ... filename.bsp:</strong> Switch that enters this mode</li>
<li><strong><code>-lumpswap</code>:</strong> Swap byte order in the lumps</li>
</ul>
<h2 id="Converting-xx-Decompiling">Converting &#38; Decompiling<a href="#Converting-xx-Decompiling" class="wiki-anchor">&para;</a></h2>
<ul>
<li><strong><code>-convert</code> ... filename.bsp:</strong> Switch that enters this mode</li>
<li><strong><code>-de</code> number:</strong> Distance epsilon for the conversion</li>
<li><strong><code>-format</code> converter:</strong> Select the converter (available: map, ase, or game names)</li>
<li><strong><code>-ne</code> F:</strong> Normal epsilon for the conversion</li>
<li><strong><code>-shadersasbitmap</code>:</strong> (only for ase) use the shader names as *BITMAP key so they work as prefabs</li>
<li><strong><code>-convert</code> ... filename.bsp:</strong> Switch that enters this mode</li>
<li><strong><code>-deluxemapsastexcoord</code>:</strong> Save deluxemap names and texcoords instead of textures (only when writing ase and obj)</li>
<li><strong><code>-de</code> F:</strong> Distance epsilon for the conversion (only when reading map)</li>
<li><strong><code>-fast</code>:</strong> fast bsp to map conversion mode (without texture alignments)</li>
<li><strong><code>-format</code> converter:</strong> Select the converter, default ase (available: map, map_bp, ase, obj, or game names)</li>
<li><strong><code>-lightmapsastexcoord</code>:</strong> Save lightmap names and texcoords instead of textures (only when writing ase and obj)</li>
<li><strong><code>-meta</code>:</strong> Combine adjacent triangles of the same texture to surfaces (only when reading map)</li>
<li><strong><code>-ne</code> F:</strong> Normal epsilon for the conversion (only when reading map)</li>
<li><strong><code>-patchmeta</code>:</strong> Turn patches into triangle meshes for display (only when reading map)</li>
<li><strong><code>-readbsp</code>:</strong> Force converting bsp to selected format</li>
<li><strong><code>-readmap</code>:</strong> Force converting map to selected format</li>
<li><strong><code>-shadersasbitmap</code>:</strong> Save shader names as bitmap names in the model so it works as a prefab (only when writing ase and obj)</li>
</ul>
<h2 id="Exporting-lightmaps">Exporting lightmaps<a href="#Exporting-lightmaps" class="wiki-anchor">&para;</a></h2>
<ul>
<li><strong><code>-export</code> filename.bsp:</strong> Copies lightmaps from the BSP to filename/lightmap_0000.tga ff</li>
</ul>
<h2 id="Fixing-AAS-checksum">Fixing AAS checksum<a href="#Fixing-AAS-checksum" class="wiki-anchor">&para;</a></h2>
<ul>
<li><strong><code>-fixaas</code> filename.bsp:</strong> Switch that enters this mode</li>
</ul>
<h2 id="Get-info-about-BSP-file">Get info about BSP file<a href="#Get-info-about-BSP-file" class="wiki-anchor">&para;</a></h2>
<ul>
<li><strong><code>-info</code> filename.bsp:</strong> Switch that enters this mode</li>
<li><strong><code>-export</code> filename.bsp:</strong> Copies lightmaps from the BSP to filename/lightmap_0000.tga ff</li>
</ul>
<h2 id="Importing-lightmaps">Importing lightmaps<a href="#Importing-lightmaps" class="wiki-anchor">&para;</a></h2>
<ul>
<li><strong><code>-import</code> filename.bsp:</strong> Copies lightmaps from filename/lightmap_0000.tga ff into the BSP</li>
<li><strong><code>-import</code> filename.bsp:</strong> Copies lightmaps from filename/lightmap_0000.tga ff into the BSP</li>
</ul>
<h2 id="Exporting-entities">Exporting entities<a href="#Exporting-entities" class="wiki-anchor">&para;</a></h2>
<ul>
<li><strong><code>-exportents</code> filename.bsp:</strong> Exports the entities to a text file (.ent)</li>
</ul>
<h2 id="Fixing-AAS-checksum">Fixing AAS checksum<a href="#Fixing-AAS-checksum" class="wiki-anchor">&para;</a></h2>
<ul>
<li><strong><code>-fixaas</code> filename.bsp:</strong> Writes BSP checksum to AAS file, so that it's accepted as valid by engine</li>
</ul>
<h2 id="Get-info-about-BSP-file">Get info about BSP file<a href="#Get-info-about-BSP-file" class="wiki-anchor">&para;</a></h2>
<ul>
<li><strong><code>-info</code> filename.bsp .. filenameN.bsp:</strong> Switch that enters this mode</li>
</ul>
<h2 id="MiniMap">MiniMap<a href="#MiniMap" class="wiki-anchor">&para;</a></h2>
<ul>
<li><strong><code>-minimap</code> ... filename.bsp:</strong> Creates a minimap of the BSP, by default writes to <code>../gfx/filename_mini.tga</code></li>
<li><strong><code>-minimap</code> ... filename.bsp:</strong> Creates a minimap of the BSP, by default writes to <code>../gfx/filename_mini.tga</code></li>
<li><strong><code>-autolevel</code>:</strong> Automatically level brightness and contrast</li>
<li><strong><code>-black</code>:</strong> Write the minimap as a black-on-transparency RGBA32 image</li>
<li><strong><code>-boost</code> F:</strong> Sets the contrast boost value (higher values make a brighter image); contrast boost is somewhat similar to gamma, but continuous even at zero</li>
<li><strong><code>-border</code> F:</strong> Sets the amount of border pixels relative to the total image size</li>
<li><strong><code>-brightness</code> F:</strong> Sets brightness value to add to minimap values</li>
<li><strong><code>-contrast</code> F:</strong> Sets contrast value to scale minimap values (doesn't affect brightness)</li>
<li><strong><code>-gray</code>:</strong> Write the minimap as a white-on-black GRAY8 image</li>
<li><strong><code>-keepaspect</code>:</strong> Ensure the aspect ratio is kept (the minimap is then letterboxed to keep aspect)</li>
<li><strong><code>-minmax</code> xmin ymin zmin xmax ymax zmax:</strong> Forces specific map dimensions (note: the minimap actually uses these dimensions, scaled to the target size while keeping aspect with centering, and 1/64 of border appended to all sides)</li>
<li><strong><code>-noautolevel</code>:</strong> Do not automatically level brightness and contrast</li>
<li><strong><code>-nokeepaspect</code>:</strong> Do not ensure the aspect ratio is kept (makes it easier to use the image in your code, but looks bad together with sharpening)</li>
<li><strong><code>-o</code> filename.tga:</strong> Sets the output file name</li>
<li><strong><code>-random</code> N:</strong> Sets the randomized supersampling count (cannot be combined with <code>-samples</code>)</li>
@ -337,14 +380,46 @@ td.formatted_questions ol { margin-top: 0px; margin-bottom: 0px; }
</ul>
<h2 id="Scaling">Scaling<a href="#Scaling" class="wiki-anchor">&para;</a></h2>
<h2 id="BSP-Scaling">BSP Scaling<a href="#BSP-Scaling" class="wiki-anchor">&para;</a></h2>
<ul>
<li><strong><code>-scale</code> S filename.bsp:</strong> Scale uniformly</li>
<li><strong><code>-scale</code> SX SY SZ filename.bsp:</strong> Scale non-uniformly</li>
<li><strong><code>-scale -tex</code> S filename.bsp:</strong> Scale uniformly without texture lock</li>
<li><strong><code>-scale -tex</code> SX SY SZ filename.bsp:</strong> Scale non-uniformly without texture lock</li>
<li><strong><code>-scale [options]</code> S filename.bsp:</strong> Scale uniformly</li>
<li><strong><code>-scale [options]</code> SX SY SZ filename.bsp:</strong> Scale non-uniformly</li>
<li><strong><code>-tex</code>:</strong> Option to scale without texture lock</li>
<li><strong><code>-spawn_ref</code> F:</strong> Option to vertically offset info_player_* entities (adds spawn_ref, scales, subtracts spawn_ref)</li>
</ul>
<h2 id="BSP-Shift">BSP Shift<a href="#BSP-Shift" class="wiki-anchor">&para;</a></h2>
<ul>
<li><strong><code>-shift</code> S filename.bsp:</strong> Shift uniformly</li>
<li><strong><code>-shift</code> SX SY SZ filename.bsp:</strong> Shift non-uniformly</li>
</ul>
<h2 id="PK3-creation">PK3 creation<a href="#PK3-creation" class="wiki-anchor">&para;</a></h2>
<ul>
<li><strong><code>-pk3</code> ... filename.bsp:</strong> Creates a pk3 for the BSP (complete Q3 support). Using file 'gamename.exclude' to exclude vanilla game resources.</li>
<li><strong><code>-complevel</code> N:</strong> Set compression level (-1 .. 10); 0 = uncompressed, -1 = 6, 10 = ultra zlib incompatible preset</li>
<li><strong><code>-dbg</code>:</strong> Print wall of debug text, useful for .exclude file creation</li>
<li><strong><code>-png</code>:</strong> include png textures, at highest priority; taking tga, jpg by default</li>
</ul>
<h2 id="Maps-repack-creation">Maps repack creation<a href="#Maps-repack-creation" class="wiki-anchor">&para;</a></h2>
<ul>
<li><strong><code>-repack</code> ... filename.bsp or filenames.txt:</strong> Creates repack of BSP(s) (complete Q3 support). Rips off only used shaders to new shader file. Using file 'gamename.exclude' to exclude vanilla game resources and 'repack.exclude' to exclude resources of existing repack.</li>
<li><strong><code>-analyze</code>:</strong> Only print bsp resource references and exit</li>
<li><strong><code>-complevel</code> N:</strong> Set compression level (-1 .. 10); 0 = uncompressed, -1 = 6, 10 = ultra zlib incompatible preset</li>
<li><strong><code>-dbg</code>:</strong> Print wall of debug text</li>
<li><strong><code>-png</code>:</strong> include png textures, at highest priority; taking tga, jpg by default</li>
</ul>
<h2 id="BSP-json-export/import">BSP json export/import<a href="#BSP-json-export/import" class="wiki-anchor">&para;</a></h2>
<ul>
<li><strong><code>-json</code> ... filename.bsp:</strong> Export/import BSP to/from json text files for debugging and editing purposes</li>
<li><strong><code>-unpack</code>:</strong> Unpack BSP to json</li>
<li><strong><code>-pack</code>:</strong> Pack json to BSP</li>
</ul>
</div>

View File

@ -39,7 +39,7 @@ struct HelpOption
const char* description;
};
void HelpOptions(const char* group_name, int indentation, int width, struct HelpOption* options, int count)
void HelpOptions(const char* group_name, int indentation, int width, const std::vector<HelpOption>& options)
{
indentation *= 2;
char* indent = safe_malloc(indentation+1);
@ -51,30 +51,29 @@ void HelpOptions(const char* group_name, int indentation, int width, struct Help
memset(indent, ' ', indentation);
indent[indentation] = 0;
int i;
for ( i = 0; i < count; i++ )
for ( auto&& option : options )
{
int printed = printf("%s%-24s ", indent, options[i].name);
int descsz = strlen(options[i].description);
int printed = printf("%s%-24s ", indent, option.name);
int descsz = strlen(option.description);
int j = 0;
while ( j < descsz && descsz-j > width - printed )
{
if ( j != 0 )
printf("%s%26c",indent,' ');
int fragment = width - printed;
while ( fragment > 0 && options[i].description[j+fragment-1] != ' ')
while ( fragment > 0 && option.description[j+fragment-1] != ' ')
fragment--;
j += fwrite(options[i].description+j, sizeof(char), fragment, stdout);
j += fwrite(option.description+j, sizeof(char), fragment, stdout);
putchar('\n');
printed = indentation+26;
}
if ( j == 0 )
{
printf("%s\n",options[i].description+j);
printf("%s\n",option.description+j);
}
else if ( j < descsz )
{
printf("%s%26c%s\n",indent,' ',options[i].description+j);
printf("%s%26c%s\n",indent,' ',option.description+j);
}
}
@ -85,12 +84,13 @@ void HelpOptions(const char* group_name, int indentation, int width, struct Help
void HelpBsp()
{
struct HelpOption bsp[] = {
const std::vector<HelpOption> options = {
{"-bsp [options] <filename.map>", "Switch that enters this stage"},
{"-altsplit", "Alternate BSP tree splitting weights (should give more fps)"},
{"-bspfile <filename.bsp>", "BSP file to write"},
{"-celshader <shadername>", "Sets a global cel shader name"},
{"-clipdepth <F>", "Model autoclip brushes thickness, default = 2"},
{"-custinfoparms", "Read scripts/custinfoparms.txt"},
{"-debugclip", "Make model autoclip brushes visible, using shaders debugclip, debugclip2"},
{"-debuginset", "Push all triangle vertexes towards the triangle center"},
{"-debugportals", "Make BSP portals visible in the map"},
{"-debugsurfaces", "Color the vertexes according to the index of the surface"},
@ -102,7 +102,6 @@ void HelpBsp()
{"-fulldetail", "Treat detail brushes as structural ones"},
{"-keeplights", "Keep light entities in the BSP file after compile"},
{"-leaktest", "Abort if a leak was found"},
{"-linfile <filename.lin>", "Line file to write"},
{"-maxarea", "Use Max Area face surface generation"},
{"-meta", "Combine adjacent triangles of the same texture to surfaces (ALWAYS USE THIS)"},
{"-metaadequatescore <N>", "Adequate score for adding triangles to meta surfaces"},
@ -116,6 +115,7 @@ void HelpBsp()
{"-noflares", "Turn off support for flares"},
{"-nofog", "Turn off support for fog volumes"},
{"-nohint", "Turn off support for hint brushes"},
{"-noob", "Assign surfaceparm noob to all map surfaces (Q3A:Defrag mod no-overbounces flag)"},
{"-nosRGB", "Treat colors and textures as linear colorspace"},
{"-nosRGBcolor", "Treat shader and light entity colors as linear colorspace"},
{"-nosRGBtex", "Treat textures as linear colorspace"},
@ -125,52 +125,53 @@ void HelpBsp()
{"-np <A>", "Force all surfaces to be nonplanar with a given shade angle"},
{"-onlyents", "Only update entities in the BSP"},
{"-patchmeta", "Turn patches into triangle meshes for display"},
{"-prtfile <filename.prt>", "Portal file to write"},
{"-rename", "Append suffix to miscmodel shaders (needed for SoF2)"},
{"-samplesize <N>", "Sets default lightmap resolution in luxels/qu"},
{"-skyfix", "Turn sky box into six surfaces to work around ATI problems"},
{"-snap <N>", "Snap brush bevel planes to the given number of units"},
{"-srffile <filename.srf>", "Surface file to write"},
{"-sRGBcolor", "Treat shader and light entity colors as sRGB colorspace"},
{"-sRGBtex", "Treat textures as sRGB colorspace"},
{"-tempname <filename.map>", "Read the MAP file from the given file name"},
{"-verboseentities", "Enable `-v` only for map entities, not for the world"},
};
HelpOptions("BSP Stage", 0, 80, bsp, std::size(bsp));
HelpOptions("BSP Stage", 0, 80, options);
}
void HelpVis()
{
struct HelpOption vis[] = {
const std::vector<HelpOption> options = {
{"-vis [options] <filename.map>", "Switch that enters this stage"},
{"-fast", "Very fast and crude vis calculation"},
{"-hint", "Merge all but hint portals"},
{"-mergeportals", "The less crude half of `-merge`, makes vis sometimes much faster but doesn't hurt fps usually"},
{"-merge", "Faster but still okay vis calculation"},
{"-nopassage", "Just use PortalFlow vis (usually less fps)"},
{"-nosort", "Do not sort the portals before calculating vis (usually slower)"},
{"-passageOnly", "Just use PassageFlow vis (usually less fps)"},
{"-prtfile <filename.prt>", "Portal file to read"},
{"-saveprt", "Keep the Portal file after running vis (so you can run vis again)"},
{"-v -v", "Extra verbose mode for cluster debug"}, // q3map2 common takes first -v
};
HelpOptions("VIS Stage", 0, 80, vis, std::size(vis));
HelpOptions("VIS Stage", 0, 80, options);
}
void HelpLight()
{
struct HelpOption light[] = {
const std::vector<HelpOption> options = {
{"-light [options] <filename.map>", "Switch that enters this stage"},
{"-approx <N>", "Vertex light approximation tolerance (never use in conjunction with deluxemapping)"},
{"-areascale <F, `-area` F>", "Scaling factor for area lights (surfacelight)"},
{"-areascale <F>, -area <F>", "Scaling factor for area lights (surfacelight)"},
{"-backsplash <Fscale Fdistance>", "scale area lights backsplash fraction + set distance globally; (distance < -900 to omit distance setting); default = 1 23; real area lights have no backsplash (scale = 0); q3map_backsplash shader keyword overrides this setting"},
{"-border", "Add a red border to lightmaps for debugging"},
{"-bouncecolorratio <F>", "0..1 ratio of colorizing light sample by texture"},
{"-bouncegrid", "Also compute radiosity on the light grid"},
{"-bounceonly", "Only compute radiosity"},
{"-bouncescale <F>", "Scaling factor for radiosity"},
{"-bounce <N>", "Number of bounces for radiosity"},
{"-bspfile <filename.bsp>", "BSP file to write"},
{"-brightness <F>", "Scaling factor for resulting lightmaps brightness"},
{"-cheapgrid", "Use `-cheap` style lighting for radiosity"},
{"-cheap", "Abort vertex light calculations when white is reached"},
{"-compensate <F>", "Lightmap compensate (darkening factor applied after everything else)"},
{"-contrast <F>", "-255 .. 255 lighting contrast, default = 0"},
{"-cpma", "CPMA vertex lighting mode"},
{"-custinfoparms", "Read scripts/custinfoparms.txt"},
{"-dark", "Darken lightmap seams"},
@ -179,6 +180,7 @@ void HelpLight()
{"-debugdeluxe", "Show deluxemaps on the lightmap"},
{"-debugnormals", "Color the lightmaps according to the direction of the surface normal"},
{"-debugorigin", "Color the lightmaps according to the origin of the luxels"},
{"-debugsamplesize", "display all of 'surface too large for desired samplesize+lightmapsize' warnings"},
{"-debugsurfaces, -debugsurface", "Color the lightmaps according to the index of the surface"},
{"-debug", "Mark the lightmaps according to the cluster: unmapped clusters get yellow, occluded ones get pink, flooded ones get blue overlay color, otherwise red"},
{"-deluxemode 0", "Use modelspace deluxemaps (DarkPlaces)"},
@ -195,17 +197,17 @@ void HelpLight()
{"-export", "Export lightmaps when compile finished (like `-export` mode)"},
{"-exposure <F>", "Lightmap exposure to better support overbright spots"},
{"-external", "Force external lightmaps even if at size of internal lightmaps"},
{"-extlmhacksize <N|N N>", "External lightmaps hack size: similar to -lightmapsize N: Size of lightmaps to generate (must be a power of two), but instead of native external lightmaps enables hack to reference them in autogenerated shader (for vanilla Q3 etc)"},
{"-extradist <F>", "Extra distance for lights in map units"},
{"-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", "Use `-fastallocate` to trade lightmap size against allocation time (useful with hi res lightmaps on large maps: reduce allocation time from days to minutes for only some extra bytes)"},
{"-slowallocate", "Use old (a bit more careful, but much slower) lightmaps packing algorithm"},
{"-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"},
{"-fast", "Ignore tiny light contributions"},
{"-fill", "Fill lightmap colors from surrounding pixels to improve JPEG compression"},
{"-fillpink", "Fill unoccupied lightmap pixels with pink colour"},
{"-filter", "Lightmap filtering"},
{"-floodlight", "Enable floodlight (zero-effort somewhat decent lighting)"},
{"-gamma <F>", "Lightmap gamma"},
@ -225,6 +227,7 @@ void HelpLight()
{"-nofastpoint", "Disable fast point light calculation"},
{"-nogrid", "Disable grid light calculation (makes all entities fullbright)"},
{"-nolightmapsearch", "Do not optimize lightmap packing for GPU memory usage (as doing so costs fps)"},
{"-nolm", "Skip lightmaps calculation"},
{"-normalmap", "Color the lightmaps according to the direction of the surface normal (TODO is this identical to `-debugnormals`?)"},
{"-nosRGB", "Treat colors, textures, and lightmaps as linear colorspace"},
{"-nosRGBcolor", "Treat shader and light entity colors as linear colorspace"},
@ -233,9 +236,9 @@ void HelpLight()
{"-nostyle, -nostyles", "Disable support for light styles"},
{"-nosurf", "Disable tracing against surfaces (only uses BSP nodes then)"},
{"-notrace", "Disable shadow occlusion"},
{"-novertex", "Disable vertex lighting"},
{"-novertex", "Disable vertex lighting; optional (0..1) value sets constant vertex light globally"},
{"-patchshadows", "Cast shadows from patches"},
{"-pointscale <F, `-point` F>", "Scaling factor for spherical and spot point lights (light entities)"},
{"-pointscale <F>, -point <F>", "Scaling factor for spherical and spot point lights (light entities)"},
{"-q3", "Use nonlinear falloff curve by default (like Q3A)"},
{"-randomsamples", "Use random sampling for lightmaps"},
{"-rawlightmapsizelimit <N>", "Sets maximum lightmap resolution in luxels/qu (only affects patches if used -patchmeta in BSP stage)"},
@ -243,57 +246,69 @@ void HelpLight()
{"-samplesize <N>", "Sets default lightmap resolution in luxels/qu"},
{"-samplessearchboxsize <N>", "Search box size (1 to 4) for lightmap adaptive supersampling"},
{"-samples <N>", "Adaptive supersampling quality"},
{"-saturation <F>", "Lighting saturation: default = 1, > 1 = saturate, 0 = grayscale, < 0 = complementary colors"},
{"-scale <F>", "Scaling factor for all light types"},
{"-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"},
{"-skyscale <F>, -sky <F>", "Scaling factor for sky and sun light"},
{"-slowallocate", "Use old (a bit more careful, but much slower) lightmaps packing algorithm"},
{"-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"},
{"-srffile <filename.srf>", "Surface file to read"},
{"-sphericalscale <F>, -spherical <F>", "Scaling factor for spherical point light entities"},
{"-spotscale <F>, -spot <F>", "Scaling factor for spot point light entities"},
{"-sRGB", "Treat colors, textures, and lightmaps as sRGB colorspace"},
{"-sRGBcolor", "Treat shader and light entity colors as sRGB colorspace"},
{"-sRGBlight", "Write lightmaps as sRGB colorspace"},
{"-sRGBtex", "Treat textures as sRGB colorspace"},
{"-style, -styles", "Enable support for light styles"},
{"-sunonly", "Only compute sun light"},
{"-super <N, `-supersample` N>", "Ordered grid supersampling quality"},
{"-super <N>, -supersample <N>", "Ordered grid supersampling quality"},
{"-thresh <F>", "Triangle subdivision threshold"},
{"-trianglecheck", "Broken check that should ensure luxels apply to the right triangle"},
{"-trisoup", "Convert brush faces to triangle soup"},
{"-vertexscale <F>", "Scaling factor for resulting vertex light values"},
{"-wolf", "Use linear falloff curve by default (like W:ET)"},
};
HelpOptions("Light Stage", 0, 80, light, std::size(light));
HelpOptions("Light Stage", 0, 80, options);
}
void HelpAnalyze()
{
struct HelpOption analyze[] = {
const std::vector<HelpOption> options = {
{"-analyze [options] <filename.bsp>", "Switch that enters this mode"},
{"-lumpswap", "Swap byte order in the lumps"},
};
HelpOptions("Analyzing BSP-like file structure", 0, 80, analyze, std::size(analyze));
HelpOptions("Analyzing BSP-like file structure", 0, 80, options);
}
void HelpScale()
{
struct HelpOption scale[] = {
const std::vector<HelpOption> options = {
{"-scale [options] <S filename.bsp>", "Scale uniformly"},
{"-scale [options] <SX SY SZ filename.bsp>", "Scale non-uniformly"},
{"-tex", "Scale without texture lock"},
{"-spawn_ref <F>", "Vertical offset for info_player_* entities (adds spawn_ref, scales, subtracts spawn_ref)"},
{"-tex", "Option to scale without texture lock"},
{"-spawn_ref <F>", "Option to vertically offset info_player_* entities (adds spawn_ref, scales, subtracts spawn_ref)"},
};
HelpOptions("Scaling", 0, 80, scale, std::size(scale));
HelpOptions("BSP Scaling", 0, 80, options);
}
void HelpShift()
{
const std::vector<HelpOption> options = {
{"-shift <S filename.bsp>", "Shift uniformly"},
{"-shift <SX SY SZ filename.bsp>", "Shift non-uniformly"},
};
HelpOptions("BSP Shift", 0, 80, options);
}
void HelpConvert()
{
struct HelpOption convert[] = {
const std::vector<HelpOption> options = {
{"-convert [options] <filename.bsp>", "Switch that enters this mode"},
{"-deluxemapsastexcoord", "Save deluxemap names and texcoords instead of textures (only when writing ase and obj)"},
{"-de <F>", "Distance epsilon for the conversion (only when reading map)"},
{"-fast", "fast bsp to map conversion mode (without texture alignments)"},
{"-format <converter>", "Select the converter, default ase (available: map, map_bp, ase, obj, or game names)"},
{"-lightmapsastexcoord", "Save lightmap names and texcoords instead of textures (only when writing ase and obj)"},
{"-meta", "Combine adjacent triangles of the same texture to surfaces (only when reading map)"},
@ -304,56 +319,56 @@ void HelpConvert()
{"-shadersasbitmap", "Save shader names as bitmap names in the model so it works as a prefab (only when writing ase and obj)"},
};
HelpOptions("Converting & Decompiling", 0, 80, convert, std::size(convert));
HelpOptions("Converting & Decompiling", 0, 80, options);
}
void HelpExport()
{
struct HelpOption exportl[] = {
const std::vector<HelpOption> options = {
{"-export <filename.bsp>", "Copies lightmaps from the BSP to `filename/lightmap_0000.tga` ff"}
};
HelpOptions("Exporting lightmaps", 0, 80, exportl, std::size(exportl));
}
void HelpExportEnts()
{
struct HelpOption exportents[] = {
{"-exportents <filename.bsp>", "Exports the entities to a text file (.ent)"},
};
HelpOptions("ExportEnts Stage", 0, 80, exportents, std::size(exportents));
}
void HelpFixaas()
{
struct HelpOption fixaas[] = {
{"-fixaas <filename.bsp>", "Switch that enters this mode"},
};
HelpOptions("Fixing AAS checksum", 0, 80, fixaas, std::size(fixaas));
}
void HelpInfo()
{
struct HelpOption info[] = {
{"-info <filename.bsp>", "Switch that enters this mode"},
};
HelpOptions("Get info about BSP file", 0, 80, info, std::size(info));
HelpOptions("Exporting lightmaps", 0, 80, options);
}
void HelpImport()
{
struct HelpOption import[] = {
const std::vector<HelpOption> options = {
{"-import <filename.bsp>", "Copies lightmaps from `filename/lightmap_0000.tga` ff into the BSP"},
};
HelpOptions("Importing lightmaps", 0, 80, import, std::size(import));
HelpOptions("Importing lightmaps", 0, 80, options);
}
void HelpExportEnts()
{
const std::vector<HelpOption> options = {
{"-exportents <filename.bsp>", "Exports the entities to a text file (.ent)"},
};
HelpOptions("ExportEnts Stage", 0, 80, options);
}
void HelpFixaas()
{
const std::vector<HelpOption> options = {
{"-fixaas <filename.bsp>", "Writes BSP checksum to AAS file, so that it's accepted as valid by engine"},
};
HelpOptions("Fixing AAS checksum", 0, 80, options);
}
void HelpInfo()
{
const std::vector<HelpOption> options = {
{"-info <filename.bsp .. filenameN.bsp>", "Switch that enters this mode"},
};
HelpOptions("Get info about BSP file", 0, 80, options);
}
void HelpMinimap()
{
struct HelpOption minimap[] = {
const std::vector<HelpOption> options = {
{"-minimap [options] <filename.bsp>", "Creates a minimap of the BSP, by default writes to `../gfx/filename_mini.tga`"},
{"-autolevel", "Automatically level brightness and contrast"},
{"-black", "Write the minimap as a black-on-transparency RGBA32 image"},
@ -374,14 +389,50 @@ void HelpMinimap()
{"-white", "Write the minimap as a white-on-transparency RGBA32 image"},
};
HelpOptions("MiniMap", 0, 80, minimap, std::size(minimap));
HelpOptions("MiniMap", 0, 80, options);
}
void HelpPk3()
{
const std::vector<HelpOption> options = {
{"-pk3 [options] <filename.bsp>", "Creates a pk3 for the BSP (complete Q3 support). Using file 'gamename.exclude' to exclude vanilla game resources."},
{"-complevel <N>", "Set compression level (-1 .. 10); 0 = uncompressed, -1 = 6, 10 = ultra zlib incompatible preset"},
{"-dbg", "Print wall of debug text, useful for .exclude file creation"},
{"-png", "include png textures, at highest priority; taking tga, jpg by default"},
};
HelpOptions("PK3 creation", 0, 80, options);
}
void HelpRepack()
{
const std::vector<HelpOption> options = {
{"-repack [options] <filename.bsp|filenames.txt>", "Creates repack of BSP(s) (complete Q3 support). Rips off only used shaders to new shader file. Using file 'gamename.exclude' to exclude vanilla game resources and 'repack.exclude' to exclude resources of existing repack."},
{"-analyze", "Only print bsp resource references and exit"},
{"-complevel <N>", "Set compression level (-1 .. 10); 0 = uncompressed, -1 = 6, 10 = ultra zlib incompatible preset"},
{"-dbg", "Print wall of debug text"},
{"-png", "include png textures, at highest priority; taking tga, jpg by default"},
};
HelpOptions("Maps repack creation", 0, 80, options);
}
void HelpJson()
{
const std::vector<HelpOption> options = {
{"-json [options] <filename.bsp>", "Export/import BSP to/from json text files for debugging and editing purposes"},
{"-unpack", "Unpack BSP to json"},
{"-pack", "Pack json to BSP"},
};
HelpOptions("BSP json export/import", 0, 80, options);
}
void HelpCommon()
{
struct HelpOption common[] = {
const std::vector<HelpOption> options = {
{"-connect <address>", "Talk to a NetRadiant instance using a specific XML based protocol"},
{"-force", "Allow reading some broken/unsupported BSP files e.g. when decompiling, may also crash"},
{"-force", "Allow reading some broken/unsupported BSP files e.g. when decompiling, may crash. Also enables decompilation of model autoclip brushes."},
{"-fs_basepath <path>", "Sets the given path as main directory of the game (can be used more than once to look in multiple paths)"},
{"-fs_forbiddenpath <pattern>", "Pattern to ignore directories, pk3, and pk3dir; example pak?.pk3 (can be used more than once to look for multiple patterns)"},
{"-fs_game <gamename>", "Sets extra game directory name to additionally load mod's resources from at higher priority (by default for Q3A 'baseq3' is loaded, -fs_game cpma will also load 'cpma'; can be used more than once)"},
@ -389,9 +440,6 @@ void HelpCommon()
{"-fs_home <dir>", "Specifies where the user home directory is on Linux"},
{"-fs_homebase <dir>", "Specifies game home directory relative to user home directory on Linux (default for Q3A: .q3a)"},
{"-fs_homepath <path>", "Sets the given path as the game home directory name (fs_home + fs_homebase)"},
{"-fs_nobasepath", "Do not load base paths in VFS, imply -fs_nomagicpath"},
{"-fs_nomagicpath", "Do not try to guess base path magically"},
{"-fs_nohomepath", "Do not load home path in VFS"},
{"-fs_pakpath <path>", "Specify a package directory (can be used more than once to look in multiple paths)"},
{"-game <gamename>", "Load settings for the given game (default: quake3), -help -game lists available games"},
{"-subdivisions <F>", "multiplier for patch subdivisions quality"},
@ -399,7 +447,7 @@ void HelpCommon()
{"-v", "Verbose mode"}
};
HelpOptions("Common Options", 0, 80, common, std::size(common));
HelpOptions("Common Options", 0, 80, options);
}
@ -416,19 +464,23 @@ void HelpMain(const char* arg)
HelpCommon();
struct HelpOption stages[] = {
const std::vector<HelpOption> stages = {
{"-bsp", "BSP Stage"},
{"-vis", "VIS Stage"},
{"-light", "Light Stage"},
{"-analyze", "Analyzing BSP-like file structure"},
{"-scale", "Scaling"},
{"-shift", "Shift"},
{"-convert", "Converting & Decompiling"},
{"-export", "Exporting lightmaps"},
{"-import", "Importing lightmaps"},
{"-exportents", "Exporting entities"},
{"-fixaas", "Fixing AAS checksum"},
{"-info", "Get info about BSP file"},
{"-import", "Importing lightmaps"},
{"-minimap", "MiniMap"},
{"-pk3", "PK3 creation"},
{"-repack", "Maps repack creation"},
{"-json", "BSP json export/import"},
};
void(*help_funcs[])() = {
HelpBsp,
@ -436,13 +488,17 @@ void HelpMain(const char* arg)
HelpLight,
HelpAnalyze,
HelpScale,
HelpShift,
HelpConvert,
HelpExport,
HelpImport,
HelpExportEnts,
HelpFixaas,
HelpInfo,
HelpImport,
HelpMinimap,
HelpPk3,
HelpRepack,
HelpJson,
};
if ( !strEmptyOrNull( arg ) )
@ -450,8 +506,7 @@ void HelpMain(const char* arg)
if ( arg[0] == '-' )
arg++;
unsigned i;
for ( i = 0; i < std::size(stages); i++ )
for ( size_t i = 0; i < stages.size(); ++i )
if ( striEqual(arg, stages[i].name+1) )
{
help_funcs[i]();
@ -463,5 +518,5 @@ void HelpMain(const char* arg)
}
}
HelpOptions("Stages", 0, 80, stages, std::size(stages));
HelpOptions("Stages", 0, 80, stages);
}

View File

@ -2395,10 +2395,6 @@ int LightMain( Args& args ){
Sys_Printf( "Faster mode enabled\n" );
}
// while ( args.takeArg( "-fastallocate" ) ) {
// fastAllocate = true;
// Sys_Printf( "Fast allocation mode enabled\n" );
// }
while ( args.takeArg( "-slowallocate" ) ) {
fastAllocate = false;
Sys_Printf( "Slow allocation mode enabled\n" );