* case insensitive command line arguments
This commit is contained in:
parent
39f5a2d060
commit
39c22acbae
|
|
@ -218,13 +218,13 @@ int pk3BSPMain( int argc, char **argv ){
|
||||||
|
|
||||||
/* process arguments */
|
/* process arguments */
|
||||||
for ( i = 1; i < ( argc - 1 ); ++i ){
|
for ( i = 1; i < ( argc - 1 ); ++i ){
|
||||||
if ( strEqual( argv[ i ], "-dbg" ) ) {
|
if ( striEqual( argv[ i ], "-dbg" ) ) {
|
||||||
dbg = true;
|
dbg = true;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-png" ) ) {
|
else if ( striEqual( argv[ i ], "-png" ) ) {
|
||||||
png = true;
|
png = true;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-complevel" ) ) {
|
else if ( striEqual( argv[ i ], "-complevel" ) ) {
|
||||||
compLevel = std::clamp( atoi( argv[ i + 1 ] ), -1, 10 );
|
compLevel = std::clamp( atoi( argv[ i + 1 ] ), -1, 10 );
|
||||||
i++;
|
i++;
|
||||||
Sys_Printf( "Compression level set to %i\n", compLevel );
|
Sys_Printf( "Compression level set to %i\n", compLevel );
|
||||||
|
|
@ -765,16 +765,16 @@ int repackBSPMain( int argc, char **argv ){
|
||||||
StringOutputStream stream( 256 );
|
StringOutputStream stream( 256 );
|
||||||
/* process arguments */
|
/* process arguments */
|
||||||
for ( i = 1; i < ( argc - 1 ); ++i ){
|
for ( i = 1; i < ( argc - 1 ); ++i ){
|
||||||
if ( strEqual( argv[ i ], "-dbg" ) ) {
|
if ( striEqual( argv[ i ], "-dbg" ) ) {
|
||||||
dbg = true;
|
dbg = true;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-png" ) ) {
|
else if ( striEqual( argv[ i ], "-png" ) ) {
|
||||||
png = true;
|
png = true;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-analyze" ) ) { // only analyze bsps and exit
|
else if ( striEqual( argv[ i ], "-analyze" ) ) { // only analyze bsps and exit
|
||||||
analyze = true;
|
analyze = true;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-complevel" ) ) {
|
else if ( striEqual( argv[ i ], "-complevel" ) ) {
|
||||||
compLevel = std::clamp( atoi( argv[ i + 1 ] ), -1, 10 );
|
compLevel = std::clamp( atoi( argv[ i + 1 ] ), -1, 10 );
|
||||||
i++;
|
i++;
|
||||||
Sys_Printf( "Compression level set to %i\n", compLevel );
|
Sys_Printf( "Compression level set to %i\n", compLevel );
|
||||||
|
|
|
||||||
|
|
@ -684,7 +684,7 @@ int BSPMain( int argc, char **argv ){
|
||||||
char tempSource[ 1024 ];
|
char tempSource[ 1024 ];
|
||||||
bool onlyents = false;
|
bool onlyents = false;
|
||||||
|
|
||||||
if ( argc >= 2 && strEqual( argv[ 1 ], "-bsp" ) ) {
|
if ( argc >= 2 && striEqual( argv[ 1 ], "-bsp" ) ) {
|
||||||
Sys_Printf( "-bsp argument unnecessary\n" );
|
Sys_Printf( "-bsp argument unnecessary\n" );
|
||||||
argv++;
|
argv++;
|
||||||
argc--;
|
argc--;
|
||||||
|
|
@ -710,128 +710,128 @@ int BSPMain( int argc, char **argv ){
|
||||||
/* process arguments */
|
/* process arguments */
|
||||||
for ( i = 1; i < ( argc - 1 ); i++ )
|
for ( i = 1; i < ( argc - 1 ); i++ )
|
||||||
{
|
{
|
||||||
if ( strEqual( argv[ i ], "-onlyents" ) ) {
|
if ( striEqual( argv[ i ], "-onlyents" ) ) {
|
||||||
Sys_Printf( "Running entity-only compile\n" );
|
Sys_Printf( "Running entity-only compile\n" );
|
||||||
onlyents = true;
|
onlyents = true;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-tempname" ) ) {
|
else if ( striEqual( argv[ i ], "-tempname" ) ) {
|
||||||
strcpy( tempSource, argv[ ++i ] );
|
strcpy( tempSource, argv[ ++i ] );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-nowater" ) ) {
|
else if ( striEqual( argv[ i ], "-nowater" ) ) {
|
||||||
Sys_Printf( "Disabling water\n" );
|
Sys_Printf( "Disabling water\n" );
|
||||||
nowater = true;
|
nowater = true;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-keeplights" ) ) {
|
else if ( striEqual( argv[ i ], "-keeplights" ) ) {
|
||||||
keepLights = true;
|
keepLights = true;
|
||||||
Sys_Printf( "Leaving light entities on map after compile\n" );
|
Sys_Printf( "Leaving light entities on map after compile\n" );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-nodetail" ) ) {
|
else if ( striEqual( argv[ i ], "-nodetail" ) ) {
|
||||||
Sys_Printf( "Ignoring detail brushes\n" ) ;
|
Sys_Printf( "Ignoring detail brushes\n" ) ;
|
||||||
nodetail = true;
|
nodetail = true;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-fulldetail" ) ) {
|
else if ( striEqual( argv[ i ], "-fulldetail" ) ) {
|
||||||
Sys_Printf( "Turning detail brushes into structural brushes\n" );
|
Sys_Printf( "Turning detail brushes into structural brushes\n" );
|
||||||
fulldetail = true;
|
fulldetail = true;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-nofog" ) ) {
|
else if ( striEqual( argv[ i ], "-nofog" ) ) {
|
||||||
Sys_Printf( "Fog volumes disabled\n" );
|
Sys_Printf( "Fog volumes disabled\n" );
|
||||||
nofog = true;
|
nofog = true;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-nosubdivide" ) ) {
|
else if ( striEqual( argv[ i ], "-nosubdivide" ) ) {
|
||||||
Sys_Printf( "Disabling brush face subdivision\n" );
|
Sys_Printf( "Disabling brush face subdivision\n" );
|
||||||
nosubdivide = true;
|
nosubdivide = true;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-leaktest" ) ) {
|
else if ( striEqual( argv[ i ], "-leaktest" ) ) {
|
||||||
Sys_Printf( "Leaktest enabled\n" );
|
Sys_Printf( "Leaktest enabled\n" );
|
||||||
leaktest = true;
|
leaktest = true;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-verboseentities" ) ) {
|
else if ( striEqual( argv[ i ], "-verboseentities" ) ) {
|
||||||
Sys_Printf( "Verbose entities enabled\n" );
|
Sys_Printf( "Verbose entities enabled\n" );
|
||||||
verboseEntities = true;
|
verboseEntities = true;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-nocurves" ) ) {
|
else if ( striEqual( argv[ i ], "-nocurves" ) ) {
|
||||||
Sys_Printf( "Ignoring curved surfaces (patches)\n" );
|
Sys_Printf( "Ignoring curved surfaces (patches)\n" );
|
||||||
noCurveBrushes = true;
|
noCurveBrushes = true;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-notjunc" ) ) {
|
else if ( striEqual( argv[ i ], "-notjunc" ) ) {
|
||||||
Sys_Printf( "T-junction fixing disabled\n" );
|
Sys_Printf( "T-junction fixing disabled\n" );
|
||||||
notjunc = true;
|
notjunc = true;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-fakemap" ) ) {
|
else if ( striEqual( argv[ i ], "-fakemap" ) ) {
|
||||||
Sys_Printf( "Generating fakemap.map\n" );
|
Sys_Printf( "Generating fakemap.map\n" );
|
||||||
fakemap = true;
|
fakemap = true;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-samplesize" ) ) {
|
else if ( striEqual( argv[ i ], "-samplesize" ) ) {
|
||||||
sampleSize = std::max( 1, atoi( argv[ i + 1 ] ) );
|
sampleSize = std::max( 1, atoi( argv[ i + 1 ] ) );
|
||||||
i++;
|
i++;
|
||||||
Sys_Printf( "Lightmap sample size set to %dx%d units\n", sampleSize, sampleSize );
|
Sys_Printf( "Lightmap sample size set to %dx%d units\n", sampleSize, sampleSize );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-minsamplesize" ) ) {
|
else if ( striEqual( argv[ i ], "-minsamplesize" ) ) {
|
||||||
minSampleSize = std::max( 1, atoi( argv[ i + 1 ] ) );
|
minSampleSize = std::max( 1, atoi( argv[ i + 1 ] ) );
|
||||||
i++;
|
i++;
|
||||||
Sys_Printf( "Minimum lightmap sample size set to %dx%d units\n", minSampleSize, minSampleSize );
|
Sys_Printf( "Minimum lightmap sample size set to %dx%d units\n", minSampleSize, minSampleSize );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-custinfoparms" ) ) {
|
else if ( striEqual( argv[ i ], "-custinfoparms" ) ) {
|
||||||
Sys_Printf( "Custom info parms enabled\n" );
|
Sys_Printf( "Custom info parms enabled\n" );
|
||||||
useCustomInfoParms = true;
|
useCustomInfoParms = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* sof2 args */
|
/* sof2 args */
|
||||||
else if ( strEqual( argv[ i ], "-rename" ) ) {
|
else if ( striEqual( argv[ i ], "-rename" ) ) {
|
||||||
Sys_Printf( "Appending _bsp suffix to misc_model shaders (SOF2)\n" );
|
Sys_Printf( "Appending _bsp suffix to misc_model shaders (SOF2)\n" );
|
||||||
renameModelShaders = true;
|
renameModelShaders = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ydnar args */
|
/* ydnar args */
|
||||||
else if ( strEqual( argv[ i ], "-ne" ) ) {
|
else if ( striEqual( argv[ i ], "-ne" ) ) {
|
||||||
normalEpsilon = atof( argv[ i + 1 ] );
|
normalEpsilon = atof( argv[ i + 1 ] );
|
||||||
i++;
|
i++;
|
||||||
Sys_Printf( "Normal epsilon set to %f\n", normalEpsilon );
|
Sys_Printf( "Normal epsilon set to %f\n", normalEpsilon );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-de" ) ) {
|
else if ( striEqual( argv[ i ], "-de" ) ) {
|
||||||
distanceEpsilon = atof( argv[ i + 1 ] );
|
distanceEpsilon = atof( argv[ i + 1 ] );
|
||||||
i++;
|
i++;
|
||||||
Sys_Printf( "Distance epsilon set to %f\n", distanceEpsilon );
|
Sys_Printf( "Distance epsilon set to %f\n", distanceEpsilon );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-mv" ) ) {
|
else if ( striEqual( argv[ i ], "-mv" ) ) {
|
||||||
maxLMSurfaceVerts = std::max( 3, atoi( argv[ i + 1 ] ) );
|
maxLMSurfaceVerts = std::max( 3, atoi( argv[ i + 1 ] ) );
|
||||||
value_maximize( maxSurfaceVerts, maxLMSurfaceVerts );
|
value_maximize( maxSurfaceVerts, maxLMSurfaceVerts );
|
||||||
i++;
|
i++;
|
||||||
Sys_Printf( "Maximum lightmapped surface vertex count set to %d\n", maxLMSurfaceVerts );
|
Sys_Printf( "Maximum lightmapped surface vertex count set to %d\n", maxLMSurfaceVerts );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-mi" ) ) {
|
else if ( striEqual( argv[ i ], "-mi" ) ) {
|
||||||
maxSurfaceIndexes = std::max( 3, atoi( argv[ i + 1 ] ) );
|
maxSurfaceIndexes = std::max( 3, atoi( argv[ i + 1 ] ) );
|
||||||
Sys_Printf( "Maximum per-surface index count set to %d\n", maxSurfaceIndexes );
|
Sys_Printf( "Maximum per-surface index count set to %d\n", maxSurfaceIndexes );
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-np" ) ) {
|
else if ( striEqual( argv[ i ], "-np" ) ) {
|
||||||
npDegrees = std::max( 0.0, atof( argv[ i + 1 ] ) );
|
npDegrees = std::max( 0.0, atof( argv[ i + 1 ] ) );
|
||||||
if ( npDegrees > 0.0f ) {
|
if ( npDegrees > 0.0f ) {
|
||||||
Sys_Printf( "Forcing nonplanar surfaces with a breaking angle of %f degrees\n", npDegrees );
|
Sys_Printf( "Forcing nonplanar surfaces with a breaking angle of %f degrees\n", npDegrees );
|
||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-snap" ) ) {
|
else if ( striEqual( argv[ i ], "-snap" ) ) {
|
||||||
bevelSnap = std::max( 0, atoi( argv[ i + 1 ] ) );
|
bevelSnap = std::max( 0, atoi( argv[ i + 1 ] ) );
|
||||||
if ( bevelSnap > 0 ) {
|
if ( bevelSnap > 0 ) {
|
||||||
Sys_Printf( "Snapping brush bevel planes to %d units\n", bevelSnap );
|
Sys_Printf( "Snapping brush bevel planes to %d units\n", bevelSnap );
|
||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-texrange" ) ) {
|
else if ( striEqual( argv[ i ], "-texrange" ) ) {
|
||||||
texRange = std::max( 0, atoi( argv[ i + 1 ] ) );
|
texRange = std::max( 0, atoi( argv[ i + 1 ] ) );
|
||||||
i++;
|
i++;
|
||||||
Sys_Printf( "Limiting per-surface texture range to %d texels\n", texRange );
|
Sys_Printf( "Limiting per-surface texture range to %d texels\n", texRange );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-nohint" ) ) {
|
else if ( striEqual( argv[ i ], "-nohint" ) ) {
|
||||||
Sys_Printf( "Hint brushes disabled\n" );
|
Sys_Printf( "Hint brushes disabled\n" );
|
||||||
noHint = true;
|
noHint = true;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-flat" ) ) {
|
else if ( striEqual( argv[ i ], "-flat" ) ) {
|
||||||
Sys_Printf( "Flatshading enabled\n" );
|
Sys_Printf( "Flatshading enabled\n" );
|
||||||
flat = true;
|
flat = true;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-celshader" ) ) {
|
else if ( striEqual( argv[ i ], "-celshader" ) ) {
|
||||||
++i;
|
++i;
|
||||||
if ( !strEmpty( argv[ i ] ) ) {
|
if ( !strEmpty( argv[ i ] ) ) {
|
||||||
globalCelShader( "textures/", argv[ i ] );
|
globalCelShader( "textures/", argv[ i ] );
|
||||||
|
|
@ -841,25 +841,25 @@ int BSPMain( int argc, char **argv ){
|
||||||
}
|
}
|
||||||
Sys_Printf( "Global cel shader set to \"%s\"\n", globalCelShader.c_str() );
|
Sys_Printf( "Global cel shader set to \"%s\"\n", globalCelShader.c_str() );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-meta" ) ) {
|
else if ( striEqual( argv[ i ], "-meta" ) ) {
|
||||||
Sys_Printf( "Creating meta surfaces from brush faces\n" );
|
Sys_Printf( "Creating meta surfaces from brush faces\n" );
|
||||||
meta = true;
|
meta = true;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-metaadequatescore" ) ) {
|
else if ( striEqual( argv[ i ], "-metaadequatescore" ) ) {
|
||||||
metaAdequateScore = std::max( -1, atoi( argv[ i + 1 ] ) );
|
metaAdequateScore = std::max( -1, atoi( argv[ i + 1 ] ) );
|
||||||
i++;
|
i++;
|
||||||
if ( metaAdequateScore >= 0 ) {
|
if ( metaAdequateScore >= 0 ) {
|
||||||
Sys_Printf( "Setting ADEQUATE meta score to %d (see surface_meta.c)\n", metaAdequateScore );
|
Sys_Printf( "Setting ADEQUATE meta score to %d (see surface_meta.c)\n", metaAdequateScore );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-metagoodscore" ) ) {
|
else if ( striEqual( argv[ i ], "-metagoodscore" ) ) {
|
||||||
metaGoodScore = std::max( -1, atoi( argv[ i + 1 ] ) );
|
metaGoodScore = std::max( -1, atoi( argv[ i + 1 ] ) );
|
||||||
i++;
|
i++;
|
||||||
if ( metaGoodScore >= 0 ) {
|
if ( metaGoodScore >= 0 ) {
|
||||||
Sys_Printf( "Setting GOOD meta score to %d (see surface_meta.c)\n", metaGoodScore );
|
Sys_Printf( "Setting GOOD meta score to %d (see surface_meta.c)\n", metaGoodScore );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-metamaxbboxdistance" ) ) {
|
else if ( striEqual( argv[ i ], "-metamaxbboxdistance" ) ) {
|
||||||
metaMaxBBoxDistance = atof( argv[ i + 1 ] );
|
metaMaxBBoxDistance = atof( argv[ i + 1 ] );
|
||||||
if ( metaMaxBBoxDistance < 0 ) {
|
if ( metaMaxBBoxDistance < 0 ) {
|
||||||
metaMaxBBoxDistance = -1;
|
metaMaxBBoxDistance = -1;
|
||||||
|
|
@ -869,82 +869,82 @@ int BSPMain( int argc, char **argv ){
|
||||||
Sys_Printf( "Setting meta maximum bounding box distance to %f\n", metaMaxBBoxDistance );
|
Sys_Printf( "Setting meta maximum bounding box distance to %f\n", metaMaxBBoxDistance );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-patchmeta" ) ) {
|
else if ( striEqual( argv[ i ], "-patchmeta" ) ) {
|
||||||
Sys_Printf( "Creating meta surfaces from patches\n" );
|
Sys_Printf( "Creating meta surfaces from patches\n" );
|
||||||
patchMeta = true;
|
patchMeta = true;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-flares" ) ) {
|
else if ( striEqual( argv[ i ], "-flares" ) ) {
|
||||||
Sys_Printf( "Flare surfaces enabled\n" );
|
Sys_Printf( "Flare surfaces enabled\n" );
|
||||||
emitFlares = true;
|
emitFlares = true;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-noflares" ) ) {
|
else if ( striEqual( argv[ i ], "-noflares" ) ) {
|
||||||
Sys_Printf( "Flare surfaces disabled\n" );
|
Sys_Printf( "Flare surfaces disabled\n" );
|
||||||
emitFlares = false;
|
emitFlares = false;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-skyfix" ) ) {
|
else if ( striEqual( argv[ i ], "-skyfix" ) ) {
|
||||||
Sys_Printf( "GL_CLAMP sky fix/hack/workaround enabled\n" );
|
Sys_Printf( "GL_CLAMP sky fix/hack/workaround enabled\n" );
|
||||||
skyFixHack = true;
|
skyFixHack = true;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-debugsurfaces" ) ) {
|
else if ( striEqual( argv[ i ], "-debugsurfaces" ) ) {
|
||||||
Sys_Printf( "emitting debug surfaces\n" );
|
Sys_Printf( "emitting debug surfaces\n" );
|
||||||
debugSurfaces = true;
|
debugSurfaces = true;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-debuginset" ) ) {
|
else if ( striEqual( argv[ i ], "-debuginset" ) ) {
|
||||||
Sys_Printf( "Debug surface triangle insetting enabled\n" );
|
Sys_Printf( "Debug surface triangle insetting enabled\n" );
|
||||||
debugInset = true;
|
debugInset = true;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-debugportals" ) ) {
|
else if ( striEqual( argv[ i ], "-debugportals" ) ) {
|
||||||
Sys_Printf( "Debug portal surfaces enabled\n" );
|
Sys_Printf( "Debug portal surfaces enabled\n" );
|
||||||
debugPortals = true;
|
debugPortals = true;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-debugclip" ) ) {
|
else if ( striEqual( argv[ i ], "-debugclip" ) ) {
|
||||||
Sys_Printf( "Debug model clip enabled\n" );
|
Sys_Printf( "Debug model clip enabled\n" );
|
||||||
debugClip = true;
|
debugClip = true;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-clipdepth" ) ) {
|
else if ( striEqual( argv[ i ], "-clipdepth" ) ) {
|
||||||
clipDepthGlobal = atof( argv[ i + 1 ] );
|
clipDepthGlobal = atof( argv[ i + 1 ] );
|
||||||
i++;
|
i++;
|
||||||
Sys_Printf( "Model autoclip thickness set to %.3f\n", clipDepthGlobal );
|
Sys_Printf( "Model autoclip thickness set to %.3f\n", clipDepthGlobal );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-sRGBtex" ) ) {
|
else if ( striEqual( argv[ i ], "-sRGBtex" ) ) {
|
||||||
texturesRGB = true;
|
texturesRGB = true;
|
||||||
Sys_Printf( "Textures are in sRGB\n" );
|
Sys_Printf( "Textures are in sRGB\n" );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-nosRGBtex" ) ) {
|
else if ( striEqual( argv[ i ], "-nosRGBtex" ) ) {
|
||||||
texturesRGB = false;
|
texturesRGB = false;
|
||||||
Sys_Printf( "Textures are linear\n" );
|
Sys_Printf( "Textures are linear\n" );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-sRGBcolor" ) ) {
|
else if ( striEqual( argv[ i ], "-sRGBcolor" ) ) {
|
||||||
colorsRGB = true;
|
colorsRGB = true;
|
||||||
Sys_Printf( "Colors are in sRGB\n" );
|
Sys_Printf( "Colors are in sRGB\n" );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-nosRGBcolor" ) ) {
|
else if ( striEqual( argv[ i ], "-nosRGBcolor" ) ) {
|
||||||
colorsRGB = false;
|
colorsRGB = false;
|
||||||
Sys_Printf( "Colors are linear\n" );
|
Sys_Printf( "Colors are linear\n" );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-nosRGB" ) ) {
|
else if ( striEqual( argv[ i ], "-nosRGB" ) ) {
|
||||||
texturesRGB = false;
|
texturesRGB = false;
|
||||||
Sys_Printf( "Textures are linear\n" );
|
Sys_Printf( "Textures are linear\n" );
|
||||||
colorsRGB = false;
|
colorsRGB = false;
|
||||||
Sys_Printf( "Colors are linear\n" );
|
Sys_Printf( "Colors are linear\n" );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-altsplit" ) ) {
|
else if ( striEqual( argv[ i ], "-altsplit" ) ) {
|
||||||
Sys_Printf( "Alternate BSP splitting (by 27) enabled\n" );
|
Sys_Printf( "Alternate BSP splitting (by 27) enabled\n" );
|
||||||
bspAlternateSplitWeights = true;
|
bspAlternateSplitWeights = true;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-deep" ) ) {
|
else if ( striEqual( argv[ i ], "-deep" ) ) {
|
||||||
Sys_Printf( "Deep BSP tree generation enabled\n" );
|
Sys_Printf( "Deep BSP tree generation enabled\n" );
|
||||||
deepBSP = true;
|
deepBSP = true;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-maxarea" ) ) {
|
else if ( striEqual( argv[ i ], "-maxarea" ) ) {
|
||||||
Sys_Printf( "Max Area face surface generation enabled\n" );
|
Sys_Printf( "Max Area face surface generation enabled\n" );
|
||||||
maxAreaFaceSurface = true;
|
maxAreaFaceSurface = true;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-noob" ) ) {
|
else if ( striEqual( argv[ i ], "-noob" ) ) {
|
||||||
Sys_Printf( "No oBs!\n" );
|
Sys_Printf( "No oBs!\n" );
|
||||||
noob = true;
|
noob = true;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-autocaulk" ) ) {
|
else if ( striEqual( argv[ i ], "-autocaulk" ) ) {
|
||||||
Sys_Printf( "\trunning in autocaulk mode\n" );
|
Sys_Printf( "\trunning in autocaulk mode\n" );
|
||||||
g_autocaulk = true;
|
g_autocaulk = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -164,7 +164,7 @@ int AnalyzeBSP( int argc, char **argv ){
|
||||||
for ( i = 1; i < ( argc - 1 ); i++ )
|
for ( i = 1; i < ( argc - 1 ); i++ )
|
||||||
{
|
{
|
||||||
/* -format map|ase|... */
|
/* -format map|ase|... */
|
||||||
if ( strEqual( argv[ i ], "-lumpswap" ) ) {
|
if ( striEqual( argv[ i ], "-lumpswap" ) ) {
|
||||||
Sys_Printf( "Swapped lump structs enabled\n" );
|
Sys_Printf( "Swapped lump structs enabled\n" );
|
||||||
lumpSwap = true;
|
lumpSwap = true;
|
||||||
}
|
}
|
||||||
|
|
@ -418,10 +418,10 @@ int ScaleBSPMain( int argc, char **argv ){
|
||||||
texscale = false;
|
texscale = false;
|
||||||
for ( i = 1; i < argc - 2; ++i )
|
for ( i = 1; i < argc - 2; ++i )
|
||||||
{
|
{
|
||||||
if ( strEqual( argv[i], "-tex" ) ) {
|
if ( striEqual( argv[i], "-tex" ) ) {
|
||||||
texscale = true;
|
texscale = true;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[i], "-spawn_ref" ) ) {
|
else if ( striEqual( argv[i], "-spawn_ref" ) ) {
|
||||||
spawn_ref = atof( argv[i + 1] );
|
spawn_ref = atof( argv[i + 1] );
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
|
|
@ -639,9 +639,9 @@ int ShiftBSPMain( int argc, char **argv ){
|
||||||
|
|
||||||
for ( i = 1; i < argc - 2; ++i )
|
for ( i = 1; i < argc - 2; ++i )
|
||||||
{
|
{
|
||||||
if ( strEqual( argv[i], "-tex" ) ) {
|
if ( striEqual( argv[i], "-tex" ) ) {
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[i], "-spawn_ref" ) ) {
|
else if ( striEqual( argv[i], "-spawn_ref" ) ) {
|
||||||
spawn_ref = atof( argv[i + 1] );
|
spawn_ref = atof( argv[i + 1] );
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
|
|
@ -886,7 +886,7 @@ int ConvertBSPMain( int argc, char **argv ){
|
||||||
for ( i = 1; i < ( argc - 1 ); i++ )
|
for ( i = 1; i < ( argc - 1 ); i++ )
|
||||||
{
|
{
|
||||||
/* -format map|ase|... */
|
/* -format map|ase|... */
|
||||||
if ( strEqual( argv[ i ], "-format" ) ) {
|
if ( striEqual( argv[ i ], "-format" ) ) {
|
||||||
i++;
|
i++;
|
||||||
if ( striEqual( argv[ i ], "ase" ) ) {
|
if ( striEqual( argv[ i ], "ase" ) ) {
|
||||||
convertFunc = ConvertBSPToASE;
|
convertFunc = ConvertBSPToASE;
|
||||||
|
|
@ -913,40 +913,40 @@ int ConvertBSPMain( int argc, char **argv ){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-ne" ) ) {
|
else if ( striEqual( argv[ i ], "-ne" ) ) {
|
||||||
normalEpsilon = atof( argv[ i + 1 ] );
|
normalEpsilon = atof( argv[ i + 1 ] );
|
||||||
i++;
|
i++;
|
||||||
Sys_Printf( "Normal epsilon set to %f\n", normalEpsilon );
|
Sys_Printf( "Normal epsilon set to %f\n", normalEpsilon );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-de" ) ) {
|
else if ( striEqual( argv[ i ], "-de" ) ) {
|
||||||
distanceEpsilon = atof( argv[ i + 1 ] );
|
distanceEpsilon = atof( argv[ i + 1 ] );
|
||||||
i++;
|
i++;
|
||||||
Sys_Printf( "Distance epsilon set to %f\n", distanceEpsilon );
|
Sys_Printf( "Distance epsilon set to %f\n", distanceEpsilon );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-shaderasbitmap" ) || strEqual( argv[ i ], "-shadersasbitmap" ) ) {
|
else if ( striEqual( argv[ i ], "-shaderasbitmap" ) || striEqual( argv[ i ], "-shadersasbitmap" ) ) {
|
||||||
shadersAsBitmap = true;
|
shadersAsBitmap = true;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-lightmapastexcoord" ) || strEqual( argv[ i ], "-lightmapsastexcoord" ) ) {
|
else if ( striEqual( argv[ i ], "-lightmapastexcoord" ) || striEqual( argv[ i ], "-lightmapsastexcoord" ) ) {
|
||||||
lightmapsAsTexcoord = true;
|
lightmapsAsTexcoord = true;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-deluxemapastexcoord" ) || strEqual( argv[ i ], "-deluxemapsastexcoord" ) ) {
|
else if ( striEqual( argv[ i ], "-deluxemapastexcoord" ) || striEqual( argv[ i ], "-deluxemapsastexcoord" ) ) {
|
||||||
lightmapsAsTexcoord = true;
|
lightmapsAsTexcoord = true;
|
||||||
deluxemap = true;
|
deluxemap = true;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-readbsp" ) ) {
|
else if ( striEqual( argv[ i ], "-readbsp" ) ) {
|
||||||
force_bsp = true;
|
force_bsp = true;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-readmap" ) ) {
|
else if ( striEqual( argv[ i ], "-readmap" ) ) {
|
||||||
force_map = true;
|
force_map = true;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-meta" ) ) {
|
else if ( striEqual( argv[ i ], "-meta" ) ) {
|
||||||
meta = true;
|
meta = true;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-patchmeta" ) ) {
|
else if ( striEqual( argv[ i ], "-patchmeta" ) ) {
|
||||||
meta = true;
|
meta = true;
|
||||||
patchMeta = true;
|
patchMeta = true;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-fast" ) ) {
|
else if ( striEqual( argv[ i ], "-fast" ) ) {
|
||||||
fast = true;
|
fast = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -449,7 +449,7 @@ void HelpMain(const char* arg)
|
||||||
|
|
||||||
unsigned i;
|
unsigned i;
|
||||||
for ( i = 0; i < sizeof(stages)/sizeof(struct HelpOption); i++ )
|
for ( i = 0; i < sizeof(stages)/sizeof(struct HelpOption); i++ )
|
||||||
if ( strEqual(arg, stages[i].name+1) )
|
if ( striEqual(arg, stages[i].name+1) )
|
||||||
{
|
{
|
||||||
help_funcs[i]();
|
help_funcs[i]();
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -2048,7 +2048,7 @@ int LightMain( int argc, char **argv ){
|
||||||
for ( i = 1; i < ( argc - 1 ); i++ )
|
for ( i = 1; i < ( argc - 1 ); i++ )
|
||||||
{
|
{
|
||||||
/* lightsource scaling */
|
/* lightsource scaling */
|
||||||
if ( strEqual( argv[ i ], "-point" ) || strEqual( argv[ i ], "-pointscale" ) ) {
|
if ( striEqual( argv[ i ], "-point" ) || striEqual( argv[ i ], "-pointscale" ) ) {
|
||||||
f = atof( argv[ i + 1 ] );
|
f = atof( argv[ i + 1 ] );
|
||||||
pointScale *= f;
|
pointScale *= f;
|
||||||
spotScale *= f;
|
spotScale *= f;
|
||||||
|
|
@ -2057,42 +2057,42 @@ int LightMain( int argc, char **argv ){
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-spherical" ) || strEqual( argv[ i ], "-sphericalscale" ) ) {
|
else if ( striEqual( argv[ i ], "-spherical" ) || striEqual( argv[ i ], "-sphericalscale" ) ) {
|
||||||
f = atof( argv[ i + 1 ] );
|
f = atof( argv[ i + 1 ] );
|
||||||
pointScale *= f;
|
pointScale *= f;
|
||||||
Sys_Printf( "Spherical point (entity) light scaled by %f to %f\n", f, pointScale );
|
Sys_Printf( "Spherical point (entity) light scaled by %f to %f\n", f, pointScale );
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-spot" ) || strEqual( argv[ i ], "-spotscale" ) ) {
|
else if ( striEqual( argv[ i ], "-spot" ) || striEqual( argv[ i ], "-spotscale" ) ) {
|
||||||
f = atof( argv[ i + 1 ] );
|
f = atof( argv[ i + 1 ] );
|
||||||
spotScale *= f;
|
spotScale *= f;
|
||||||
Sys_Printf( "Spot point (entity) light scaled by %f to %f\n", f, spotScale );
|
Sys_Printf( "Spot point (entity) light scaled by %f to %f\n", f, spotScale );
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-area" ) || strEqual( argv[ i ], "-areascale" ) ) {
|
else if ( striEqual( argv[ i ], "-area" ) || striEqual( argv[ i ], "-areascale" ) ) {
|
||||||
f = atof( argv[ i + 1 ] );
|
f = atof( argv[ i + 1 ] );
|
||||||
areaScale *= f;
|
areaScale *= f;
|
||||||
Sys_Printf( "Area (shader) light scaled by %f to %f\n", f, areaScale );
|
Sys_Printf( "Area (shader) light scaled by %f to %f\n", f, areaScale );
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-sky" ) || strEqual( argv[ i ], "-skyscale" ) ) {
|
else if ( striEqual( argv[ i ], "-sky" ) || striEqual( argv[ i ], "-skyscale" ) ) {
|
||||||
f = atof( argv[ i + 1 ] );
|
f = atof( argv[ i + 1 ] );
|
||||||
skyScale *= f;
|
skyScale *= f;
|
||||||
Sys_Printf( "Sky/sun light scaled by %f to %f\n", f, skyScale );
|
Sys_Printf( "Sky/sun light scaled by %f to %f\n", f, skyScale );
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-vertexscale" ) ) {
|
else if ( striEqual( argv[ i ], "-vertexscale" ) ) {
|
||||||
f = atof( argv[ i + 1 ] );
|
f = atof( argv[ i + 1 ] );
|
||||||
vertexglobalscale *= f;
|
vertexglobalscale *= f;
|
||||||
Sys_Printf( "Vertexlight scaled by %f to %f\n", f, vertexglobalscale );
|
Sys_Printf( "Vertexlight scaled by %f to %f\n", f, vertexglobalscale );
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-backsplash" ) && i < ( argc - 3 ) ) {
|
else if ( striEqual( argv[ i ], "-backsplash" ) && i < ( argc - 3 ) ) {
|
||||||
g_backsplashFractionScale = atof( argv[ i + 1 ] );
|
g_backsplashFractionScale = atof( argv[ i + 1 ] );
|
||||||
Sys_Printf( "Area lights backsplash fraction scaled by %f\n", g_backsplashFractionScale );
|
Sys_Printf( "Area lights backsplash fraction scaled by %f\n", g_backsplashFractionScale );
|
||||||
f = atof( argv[ i + 2 ] );
|
f = atof( argv[ i + 2 ] );
|
||||||
|
|
@ -2103,25 +2103,25 @@ int LightMain( int argc, char **argv ){
|
||||||
i+=2;
|
i+=2;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-nolm" ) ) {
|
else if ( striEqual( argv[ i ], "-nolm" ) ) {
|
||||||
nolm = true;
|
nolm = true;
|
||||||
Sys_Printf( "No lightmaps yo\n" );
|
Sys_Printf( "No lightmaps yo\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-bouncecolorratio" ) ) {
|
else if ( striEqual( argv[ i ], "-bouncecolorratio" ) ) {
|
||||||
bounceColorRatio = std::clamp( atof( argv[ i + 1 ] ), 0.0, 1.0 );
|
bounceColorRatio = std::clamp( atof( argv[ i + 1 ] ), 0.0, 1.0 );
|
||||||
Sys_Printf( "Bounce color ratio set to %f\n", bounceColorRatio );
|
Sys_Printf( "Bounce color ratio set to %f\n", bounceColorRatio );
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-bouncescale" ) ) {
|
else if ( striEqual( argv[ i ], "-bouncescale" ) ) {
|
||||||
f = atof( argv[ i + 1 ] );
|
f = atof( argv[ i + 1 ] );
|
||||||
bounceScale *= f;
|
bounceScale *= f;
|
||||||
Sys_Printf( "Bounce (radiosity) light scaled by %f to %f\n", f, bounceScale );
|
Sys_Printf( "Bounce (radiosity) light scaled by %f to %f\n", f, bounceScale );
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-scale" ) ) {
|
else if ( striEqual( argv[ i ], "-scale" ) ) {
|
||||||
f = atof( argv[ i + 1 ] );
|
f = atof( argv[ i + 1 ] );
|
||||||
pointScale *= f;
|
pointScale *= f;
|
||||||
spotScale *= f;
|
spotScale *= f;
|
||||||
|
|
@ -2132,72 +2132,72 @@ int LightMain( int argc, char **argv ){
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-gridscale" ) ) {
|
else if ( striEqual( argv[ i ], "-gridscale" ) ) {
|
||||||
f = atof( argv[ i + 1 ] );
|
f = atof( argv[ i + 1 ] );
|
||||||
Sys_Printf( "Grid lightning scaled by %f\n", f );
|
Sys_Printf( "Grid lightning scaled by %f\n", f );
|
||||||
gridScale *= f;
|
gridScale *= f;
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-gridambientscale" ) ) {
|
else if ( striEqual( argv[ i ], "-gridambientscale" ) ) {
|
||||||
f = atof( argv[ i + 1 ] );
|
f = atof( argv[ i + 1 ] );
|
||||||
Sys_Printf( "Grid ambient lightning scaled by %f\n", f );
|
Sys_Printf( "Grid ambient lightning scaled by %f\n", f );
|
||||||
gridAmbientScale *= f;
|
gridAmbientScale *= f;
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-griddirectionality" ) ) {
|
else if ( striEqual( argv[ i ], "-griddirectionality" ) ) {
|
||||||
gridDirectionality = std::min( 1.0, atof( argv[ i + 1 ] ) );
|
gridDirectionality = std::min( 1.0, atof( argv[ i + 1 ] ) );
|
||||||
value_minimize( gridAmbientDirectionality, gridDirectionality );
|
value_minimize( gridAmbientDirectionality, gridDirectionality );
|
||||||
Sys_Printf( "Grid directionality is %f\n", gridDirectionality );
|
Sys_Printf( "Grid directionality is %f\n", gridDirectionality );
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-gridambientdirectionality" ) ) {
|
else if ( striEqual( argv[ i ], "-gridambientdirectionality" ) ) {
|
||||||
gridAmbientDirectionality = std::max( -1.0, atof( argv[ i + 1 ] ) );
|
gridAmbientDirectionality = std::max( -1.0, atof( argv[ i + 1 ] ) );
|
||||||
value_maximize( gridDirectionality, gridAmbientDirectionality );
|
value_maximize( gridDirectionality, gridAmbientDirectionality );
|
||||||
Sys_Printf( "Grid ambient directionality is %f\n", gridAmbientDirectionality );
|
Sys_Printf( "Grid ambient directionality is %f\n", gridAmbientDirectionality );
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-gamma" ) ) {
|
else if ( striEqual( argv[ i ], "-gamma" ) ) {
|
||||||
f = atof( argv[ i + 1 ] );
|
f = atof( argv[ i + 1 ] );
|
||||||
lightmapGamma = f;
|
lightmapGamma = f;
|
||||||
Sys_Printf( "Lighting gamma set to %f\n", lightmapGamma );
|
Sys_Printf( "Lighting gamma set to %f\n", lightmapGamma );
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-sRGBlight" ) ) {
|
else if ( striEqual( argv[ i ], "-sRGBlight" ) ) {
|
||||||
lightmapsRGB = true;
|
lightmapsRGB = true;
|
||||||
Sys_Printf( "Lighting is in sRGB\n" );
|
Sys_Printf( "Lighting is in sRGB\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-nosRGBlight" ) ) {
|
else if ( striEqual( argv[ i ], "-nosRGBlight" ) ) {
|
||||||
lightmapsRGB = false;
|
lightmapsRGB = false;
|
||||||
Sys_Printf( "Lighting is linear\n" );
|
Sys_Printf( "Lighting is linear\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-sRGBtex" ) ) {
|
else if ( striEqual( argv[ i ], "-sRGBtex" ) ) {
|
||||||
texturesRGB = true;
|
texturesRGB = true;
|
||||||
Sys_Printf( "Textures are in sRGB\n" );
|
Sys_Printf( "Textures are in sRGB\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-nosRGBtex" ) ) {
|
else if ( striEqual( argv[ i ], "-nosRGBtex" ) ) {
|
||||||
texturesRGB = false;
|
texturesRGB = false;
|
||||||
Sys_Printf( "Textures are linear\n" );
|
Sys_Printf( "Textures are linear\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-sRGBcolor" ) ) {
|
else if ( striEqual( argv[ i ], "-sRGBcolor" ) ) {
|
||||||
colorsRGB = true;
|
colorsRGB = true;
|
||||||
Sys_Printf( "Colors are in sRGB\n" );
|
Sys_Printf( "Colors are in sRGB\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-nosRGBcolor" ) ) {
|
else if ( striEqual( argv[ i ], "-nosRGBcolor" ) ) {
|
||||||
colorsRGB = false;
|
colorsRGB = false;
|
||||||
Sys_Printf( "Colors are linear\n" );
|
Sys_Printf( "Colors are linear\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-sRGB" ) ) {
|
else if ( striEqual( argv[ i ], "-sRGB" ) ) {
|
||||||
lightmapsRGB = true;
|
lightmapsRGB = true;
|
||||||
Sys_Printf( "Lighting is in sRGB\n" );
|
Sys_Printf( "Lighting is in sRGB\n" );
|
||||||
texturesRGB = true;
|
texturesRGB = true;
|
||||||
|
|
@ -2206,7 +2206,7 @@ int LightMain( int argc, char **argv ){
|
||||||
Sys_Printf( "Colors are in sRGB\n" );
|
Sys_Printf( "Colors are in sRGB\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-nosRGB" ) ) {
|
else if ( striEqual( argv[ i ], "-nosRGB" ) ) {
|
||||||
lightmapsRGB = false;
|
lightmapsRGB = false;
|
||||||
Sys_Printf( "Lighting is linear\n" );
|
Sys_Printf( "Lighting is linear\n" );
|
||||||
texturesRGB = false;
|
texturesRGB = false;
|
||||||
|
|
@ -2215,14 +2215,14 @@ int LightMain( int argc, char **argv ){
|
||||||
Sys_Printf( "Colors are linear\n" );
|
Sys_Printf( "Colors are linear\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-exposure" ) ) {
|
else if ( striEqual( argv[ i ], "-exposure" ) ) {
|
||||||
f = atof( argv[ i + 1 ] );
|
f = atof( argv[ i + 1 ] );
|
||||||
lightmapExposure = f;
|
lightmapExposure = f;
|
||||||
Sys_Printf( "Lighting exposure set to %f\n", lightmapExposure );
|
Sys_Printf( "Lighting exposure set to %f\n", lightmapExposure );
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-compensate" ) ) {
|
else if ( striEqual( argv[ i ], "-compensate" ) ) {
|
||||||
f = atof( argv[ i + 1 ] );
|
f = atof( argv[ i + 1 ] );
|
||||||
if ( f <= 0.0f ) {
|
if ( f <= 0.0f ) {
|
||||||
f = 1.0f;
|
f = 1.0f;
|
||||||
|
|
@ -2233,14 +2233,14 @@ int LightMain( int argc, char **argv ){
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Lightmaps brightness */
|
/* Lightmaps brightness */
|
||||||
else if( strEqual( argv[ i ], "-brightness" ) ){
|
else if( striEqual( argv[ i ], "-brightness" ) ){
|
||||||
lightmapBrightness = atof( argv[ i + 1 ] );
|
lightmapBrightness = atof( argv[ i + 1 ] );
|
||||||
Sys_Printf( "Scaling lightmaps brightness by %f\n", lightmapBrightness );
|
Sys_Printf( "Scaling lightmaps brightness by %f\n", lightmapBrightness );
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Lighting contrast */
|
/* Lighting contrast */
|
||||||
else if( strEqual( argv[ i ], "-contrast" ) ){
|
else if( striEqual( argv[ i ], "-contrast" ) ){
|
||||||
lightmapContrast = std::clamp( atof( argv[ i + 1 ] ), -255.0, 255.0 );
|
lightmapContrast = std::clamp( atof( argv[ i + 1 ] ), -255.0, 255.0 );
|
||||||
Sys_Printf( "Lighting contrast set to %f\n", lightmapContrast );
|
Sys_Printf( "Lighting contrast set to %f\n", lightmapContrast );
|
||||||
i++;
|
i++;
|
||||||
|
|
@ -2249,7 +2249,7 @@ int LightMain( int argc, char **argv ){
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ydnar switches */
|
/* ydnar switches */
|
||||||
else if ( strEqual( argv[ i ], "-bounce" ) ) {
|
else if ( striEqual( argv[ i ], "-bounce" ) ) {
|
||||||
bounce = std::max( 0, atoi( argv[ i + 1 ] ) );
|
bounce = std::max( 0, atoi( argv[ i + 1 ] ) );
|
||||||
if ( bounce > 0 ) {
|
if ( bounce > 0 ) {
|
||||||
Sys_Printf( "Radiosity enabled with %d bounce(s)\n", bounce );
|
Sys_Printf( "Radiosity enabled with %d bounce(s)\n", bounce );
|
||||||
|
|
@ -2257,7 +2257,7 @@ int LightMain( int argc, char **argv ){
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-supersample" ) || strEqual( argv[ i ], "-super" ) ) {
|
else if ( striEqual( argv[ i ], "-supersample" ) || striEqual( argv[ i ], "-super" ) ) {
|
||||||
superSample = std::max( 1, atoi( argv[ i + 1 ] ) );
|
superSample = std::max( 1, atoi( argv[ i + 1 ] ) );
|
||||||
if ( superSample > 1 ) {
|
if ( superSample > 1 ) {
|
||||||
Sys_Printf( "Ordered-grid supersampling enabled with %d sample(s) per lightmap texel\n", ( superSample * superSample ) );
|
Sys_Printf( "Ordered-grid supersampling enabled with %d sample(s) per lightmap texel\n", ( superSample * superSample ) );
|
||||||
|
|
@ -2265,12 +2265,12 @@ int LightMain( int argc, char **argv ){
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-randomsamples" ) ) {
|
else if ( striEqual( argv[ i ], "-randomsamples" ) ) {
|
||||||
lightRandomSamples = true;
|
lightRandomSamples = true;
|
||||||
Sys_Printf( "Random sampling enabled\n", lightRandomSamples );
|
Sys_Printf( "Random sampling enabled\n", lightRandomSamples );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-samples" ) ) {
|
else if ( striEqual( argv[ i ], "-samples" ) ) {
|
||||||
lightSamplesInsist = ( *argv[i + 1] == '+' );
|
lightSamplesInsist = ( *argv[i + 1] == '+' );
|
||||||
lightSamples = std::max( 1, atoi( argv[ i + 1 ] ) );
|
lightSamples = std::max( 1, atoi( argv[ i + 1 ] ) );
|
||||||
if ( lightSamples > 1 ) {
|
if ( lightSamples > 1 ) {
|
||||||
|
|
@ -2279,24 +2279,24 @@ int LightMain( int argc, char **argv ){
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-samplessearchboxsize" ) ) {
|
else if ( striEqual( argv[ i ], "-samplessearchboxsize" ) ) {
|
||||||
lightSamplesSearchBoxSize = std::clamp( atoi( argv[ i + 1 ] ), 1, 4 ); /* more makes no sense */
|
lightSamplesSearchBoxSize = std::clamp( atoi( argv[ i + 1 ] ), 1, 4 ); /* more makes no sense */
|
||||||
if ( lightSamplesSearchBoxSize != 1 )
|
if ( lightSamplesSearchBoxSize != 1 )
|
||||||
Sys_Printf( "Adaptive supersampling uses %f times the normal search box size\n", lightSamplesSearchBoxSize );
|
Sys_Printf( "Adaptive supersampling uses %f times the normal search box size\n", lightSamplesSearchBoxSize );
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-filter" ) ) {
|
else if ( striEqual( argv[ i ], "-filter" ) ) {
|
||||||
filter = true;
|
filter = true;
|
||||||
Sys_Printf( "Lightmap filtering enabled\n" );
|
Sys_Printf( "Lightmap filtering enabled\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-dark" ) ) {
|
else if ( striEqual( argv[ i ], "-dark" ) ) {
|
||||||
dark = true;
|
dark = true;
|
||||||
Sys_Printf( "Dark lightmap seams enabled\n" );
|
Sys_Printf( "Dark lightmap seams enabled\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-shadeangle" ) ) {
|
else if ( striEqual( argv[ i ], "-shadeangle" ) ) {
|
||||||
shadeAngleDegrees = std::max( 0.0, atof( argv[ i + 1 ] ) );
|
shadeAngleDegrees = std::max( 0.0, atof( argv[ i + 1 ] ) );
|
||||||
if ( shadeAngleDegrees > 0.0f ) {
|
if ( shadeAngleDegrees > 0.0f ) {
|
||||||
shade = true;
|
shade = true;
|
||||||
|
|
@ -2305,7 +2305,7 @@ int LightMain( int argc, char **argv ){
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-thresh" ) ) {
|
else if ( striEqual( argv[ i ], "-thresh" ) ) {
|
||||||
subdivideThreshold = atof( argv[ i + 1 ] );
|
subdivideThreshold = atof( argv[ i + 1 ] );
|
||||||
if ( subdivideThreshold < 0 ) {
|
if ( subdivideThreshold < 0 ) {
|
||||||
subdivideThreshold = DEFAULT_SUBDIVIDE_THRESHOLD;
|
subdivideThreshold = DEFAULT_SUBDIVIDE_THRESHOLD;
|
||||||
|
|
@ -2316,18 +2316,18 @@ int LightMain( int argc, char **argv ){
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-approx" ) ) {
|
else if ( striEqual( argv[ i ], "-approx" ) ) {
|
||||||
approximateTolerance = std::max( 0, atoi( argv[ i + 1 ] ) );
|
approximateTolerance = std::max( 0, atoi( argv[ i + 1 ] ) );
|
||||||
if ( approximateTolerance > 0 ) {
|
if ( approximateTolerance > 0 ) {
|
||||||
Sys_Printf( "Approximating lightmaps within a byte tolerance of %d\n", approximateTolerance );
|
Sys_Printf( "Approximating lightmaps within a byte tolerance of %d\n", approximateTolerance );
|
||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-deluxe" ) || strEqual( argv[ i ], "-deluxemap" ) ) {
|
else if ( striEqual( argv[ i ], "-deluxe" ) || striEqual( argv[ i ], "-deluxemap" ) ) {
|
||||||
deluxemap = true;
|
deluxemap = true;
|
||||||
Sys_Printf( "Generating deluxemaps for average light direction\n" );
|
Sys_Printf( "Generating deluxemaps for average light direction\n" );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-deluxemode" ) ) {
|
else if ( striEqual( argv[ i ], "-deluxemode" ) ) {
|
||||||
deluxemode = atoi( argv[ i + 1 ] );
|
deluxemode = atoi( argv[ i + 1 ] );
|
||||||
if ( deluxemode != 1 ) {
|
if ( deluxemode != 1 ) {
|
||||||
Sys_Printf( "Generating modelspace deluxemaps\n" );
|
Sys_Printf( "Generating modelspace deluxemaps\n" );
|
||||||
|
|
@ -2338,18 +2338,18 @@ int LightMain( int argc, char **argv ){
|
||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-nodeluxe" ) || strEqual( argv[ i ], "-nodeluxemap" ) ) {
|
else if ( striEqual( argv[ i ], "-nodeluxe" ) || striEqual( argv[ i ], "-nodeluxemap" ) ) {
|
||||||
deluxemap = false;
|
deluxemap = false;
|
||||||
Sys_Printf( "Disabling generating of deluxemaps for average light direction\n" );
|
Sys_Printf( "Disabling generating of deluxemaps for average light direction\n" );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-external" ) ) {
|
else if ( striEqual( argv[ i ], "-external" ) ) {
|
||||||
externalLightmaps = true;
|
externalLightmaps = true;
|
||||||
Sys_Printf( "Storing all lightmaps externally\n" );
|
Sys_Printf( "Storing all lightmaps externally\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-lightmapsize" )
|
else if ( striEqual( argv[ i ], "-lightmapsize" )
|
||||||
|| strEqual( argv[ i ], "-extlmhacksize" ) ) {
|
|| striEqual( argv[ i ], "-extlmhacksize" ) ) {
|
||||||
const bool extlmhack = strEqual( argv[ i ], "-extlmhacksize" );
|
const bool extlmhack = striEqual( argv[ i ], "-extlmhacksize" );
|
||||||
|
|
||||||
lmCustomSizeW = lmCustomSizeH = atoi( argv[ i + 1 ] );
|
lmCustomSizeW = lmCustomSizeH = atoi( argv[ i + 1 ] );
|
||||||
if( i + 2 < argc - 1 && argv[ i + 2 ][0] != '-' && 0 != atoi( argv[ i + 2 ] ) ){
|
if( i + 2 < argc - 1 && argv[ i + 2 ][0] != '-' && 0 != atoi( argv[ i + 2 ] ) ){
|
||||||
|
|
@ -2374,14 +2374,14 @@ int LightMain( int argc, char **argv ){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-rawlightmapsizelimit" ) ) {
|
else if ( striEqual( argv[ i ], "-rawlightmapsizelimit" ) ) {
|
||||||
lmLimitSize = atoi( argv[ i + 1 ] );
|
lmLimitSize = atoi( argv[ i + 1 ] );
|
||||||
|
|
||||||
i++;
|
i++;
|
||||||
Sys_Printf( "Raw lightmap size limit set to %d x %d pixels\n", lmLimitSize, lmLimitSize );
|
Sys_Printf( "Raw lightmap size limit set to %d x %d pixels\n", lmLimitSize, lmLimitSize );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-lightmapdir" ) ) {
|
else if ( striEqual( argv[ i ], "-lightmapdir" ) ) {
|
||||||
lmCustomDir = argv[i + 1];
|
lmCustomDir = argv[i + 1];
|
||||||
i++;
|
i++;
|
||||||
Sys_Printf( "Lightmap directory set to %s\n", lmCustomDir );
|
Sys_Printf( "Lightmap directory set to %s\n", lmCustomDir );
|
||||||
|
|
@ -2390,91 +2390,91 @@ int LightMain( int argc, char **argv ){
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ydnar: add this to suppress warnings */
|
/* ydnar: add this to suppress warnings */
|
||||||
else if ( strEqual( argv[ i ], "-custinfoparms" ) ) {
|
else if ( striEqual( argv[ i ], "-custinfoparms" ) ) {
|
||||||
Sys_Printf( "Custom info parms enabled\n" );
|
Sys_Printf( "Custom info parms enabled\n" );
|
||||||
useCustomInfoParms = true;
|
useCustomInfoParms = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-wolf" ) ) {
|
else if ( striEqual( argv[ i ], "-wolf" ) ) {
|
||||||
/* -game should already be set */
|
/* -game should already be set */
|
||||||
wolfLight = true;
|
wolfLight = true;
|
||||||
Sys_Printf( "Enabling Wolf lighting model (linear default)\n" );
|
Sys_Printf( "Enabling Wolf lighting model (linear default)\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-q3" ) ) {
|
else if ( striEqual( argv[ i ], "-q3" ) ) {
|
||||||
/* -game should already be set */
|
/* -game should already be set */
|
||||||
wolfLight = false;
|
wolfLight = false;
|
||||||
Sys_Printf( "Enabling Quake 3 lighting model (nonlinear default)\n" );
|
Sys_Printf( "Enabling Quake 3 lighting model (nonlinear default)\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-extradist" ) ) {
|
else if ( striEqual( argv[ i ], "-extradist" ) ) {
|
||||||
extraDist = std::max( 0.0, atof( argv[ i + 1 ] ) );
|
extraDist = std::max( 0.0, atof( argv[ i + 1 ] ) );
|
||||||
i++;
|
i++;
|
||||||
Sys_Printf( "Default extra radius set to %f units\n", extraDist );
|
Sys_Printf( "Default extra radius set to %f units\n", extraDist );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-sunonly" ) ) {
|
else if ( striEqual( argv[ i ], "-sunonly" ) ) {
|
||||||
sunOnly = true;
|
sunOnly = true;
|
||||||
Sys_Printf( "Only computing sunlight\n" );
|
Sys_Printf( "Only computing sunlight\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-bounceonly" ) ) {
|
else if ( striEqual( argv[ i ], "-bounceonly" ) ) {
|
||||||
bounceOnly = true;
|
bounceOnly = true;
|
||||||
Sys_Printf( "Storing bounced light (radiosity) only\n" );
|
Sys_Printf( "Storing bounced light (radiosity) only\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-nocollapse" ) ) {
|
else if ( striEqual( argv[ i ], "-nocollapse" ) ) {
|
||||||
noCollapse = true;
|
noCollapse = true;
|
||||||
Sys_Printf( "Identical lightmap collapsing disabled\n" );
|
Sys_Printf( "Identical lightmap collapsing disabled\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-nolightmapsearch" ) ) {
|
else if ( striEqual( argv[ i ], "-nolightmapsearch" ) ) {
|
||||||
lightmapSearchBlockSize = 1;
|
lightmapSearchBlockSize = 1;
|
||||||
Sys_Printf( "No lightmap searching - all lightmaps will be sequential\n" );
|
Sys_Printf( "No lightmap searching - all lightmaps will be sequential\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-lightmapsearchpower" ) ) {
|
else if ( striEqual( argv[ i ], "-lightmapsearchpower" ) ) {
|
||||||
lightmapMergeSize = ( game->lightmapSize << atoi( argv[i + 1] ) );
|
lightmapMergeSize = ( game->lightmapSize << atoi( argv[i + 1] ) );
|
||||||
++i;
|
++i;
|
||||||
Sys_Printf( "Restricted lightmap searching enabled - optimize for lightmap merge power %d (size %d)\n", atoi( argv[i] ), lightmapMergeSize );
|
Sys_Printf( "Restricted lightmap searching enabled - optimize for lightmap merge power %d (size %d)\n", atoi( argv[i] ), lightmapMergeSize );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-lightmapsearchblocksize" ) ) {
|
else if ( striEqual( argv[ i ], "-lightmapsearchblocksize" ) ) {
|
||||||
lightmapSearchBlockSize = atoi( argv[i + 1] );
|
lightmapSearchBlockSize = atoi( argv[i + 1] );
|
||||||
++i;
|
++i;
|
||||||
Sys_Printf( "Restricted lightmap searching enabled - block size set to %d\n", lightmapSearchBlockSize );
|
Sys_Printf( "Restricted lightmap searching enabled - block size set to %d\n", lightmapSearchBlockSize );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-shade" ) ) {
|
else if ( striEqual( argv[ i ], "-shade" ) ) {
|
||||||
shade = true;
|
shade = true;
|
||||||
Sys_Printf( "Phong shading enabled\n" );
|
Sys_Printf( "Phong shading enabled\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-bouncegrid" ) ) {
|
else if ( striEqual( argv[ i ], "-bouncegrid" ) ) {
|
||||||
bouncegrid = true;
|
bouncegrid = true;
|
||||||
if ( bounce > 0 ) {
|
if ( bounce > 0 ) {
|
||||||
Sys_Printf( "Grid lighting with radiosity enabled\n" );
|
Sys_Printf( "Grid lighting with radiosity enabled\n" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-smooth" ) ) {
|
else if ( striEqual( argv[ i ], "-smooth" ) ) {
|
||||||
lightSamples = EXTRA_SCALE;
|
lightSamples = EXTRA_SCALE;
|
||||||
Sys_Printf( "The -smooth argument is deprecated, use \"-samples 2\" instead\n" );
|
Sys_Printf( "The -smooth argument is deprecated, use \"-samples 2\" instead\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-nofastpoint" ) ) {
|
else if ( striEqual( argv[ i ], "-nofastpoint" ) ) {
|
||||||
fastpoint = false;
|
fastpoint = false;
|
||||||
Sys_Printf( "Automatic fast mode for point lights disabled\n" );
|
Sys_Printf( "Automatic fast mode for point lights disabled\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-fast" ) ) {
|
else if ( striEqual( argv[ i ], "-fast" ) ) {
|
||||||
fast = true;
|
fast = true;
|
||||||
fastgrid = true;
|
fastgrid = true;
|
||||||
fastbounce = true;
|
fastbounce = true;
|
||||||
Sys_Printf( "Fast mode enabled for all area lights\n" );
|
Sys_Printf( "Fast mode enabled for all area lights\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-faster" ) ) {
|
else if ( striEqual( argv[ i ], "-faster" ) ) {
|
||||||
faster = true;
|
faster = true;
|
||||||
fast = true;
|
fast = true;
|
||||||
fastgrid = true;
|
fastgrid = true;
|
||||||
|
|
@ -2482,124 +2482,124 @@ int LightMain( int argc, char **argv ){
|
||||||
Sys_Printf( "Faster mode enabled\n" );
|
Sys_Printf( "Faster mode enabled\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
// else if ( strEqual( argv[ i ], "-fastallocate" ) ) {
|
// else if ( striEqual( argv[ i ], "-fastallocate" ) ) {
|
||||||
// fastAllocate = true;
|
// fastAllocate = true;
|
||||||
// Sys_Printf( "Fast allocation mode enabled\n" );
|
// Sys_Printf( "Fast allocation mode enabled\n" );
|
||||||
// }
|
// }
|
||||||
else if ( strEqual( argv[ i ], "-slowallocate" ) ) {
|
else if ( striEqual( argv[ i ], "-slowallocate" ) ) {
|
||||||
fastAllocate = false;
|
fastAllocate = false;
|
||||||
Sys_Printf( "Slow allocation mode enabled\n" );
|
Sys_Printf( "Slow allocation mode enabled\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-fastgrid" ) ) {
|
else if ( striEqual( argv[ i ], "-fastgrid" ) ) {
|
||||||
fastgrid = true;
|
fastgrid = true;
|
||||||
Sys_Printf( "Fast grid lighting enabled\n" );
|
Sys_Printf( "Fast grid lighting enabled\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-fastbounce" ) ) {
|
else if ( striEqual( argv[ i ], "-fastbounce" ) ) {
|
||||||
fastbounce = true;
|
fastbounce = true;
|
||||||
Sys_Printf( "Fast bounce mode enabled\n" );
|
Sys_Printf( "Fast bounce mode enabled\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-cheap" ) ) {
|
else if ( striEqual( argv[ i ], "-cheap" ) ) {
|
||||||
cheap = true;
|
cheap = true;
|
||||||
cheapgrid = true;
|
cheapgrid = true;
|
||||||
Sys_Printf( "Cheap mode enabled\n" );
|
Sys_Printf( "Cheap mode enabled\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-cheapgrid" ) ) {
|
else if ( striEqual( argv[ i ], "-cheapgrid" ) ) {
|
||||||
cheapgrid = true;
|
cheapgrid = true;
|
||||||
Sys_Printf( "Cheap grid mode enabled\n" );
|
Sys_Printf( "Cheap grid mode enabled\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-normalmap" ) ) {
|
else if ( striEqual( argv[ i ], "-normalmap" ) ) {
|
||||||
normalmap = true;
|
normalmap = true;
|
||||||
Sys_Printf( "Storing normal map instead of lightmap\n" );
|
Sys_Printf( "Storing normal map instead of lightmap\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-trisoup" ) ) {
|
else if ( striEqual( argv[ i ], "-trisoup" ) ) {
|
||||||
trisoup = true;
|
trisoup = true;
|
||||||
Sys_Printf( "Converting brush faces to triangle soup\n" );
|
Sys_Printf( "Converting brush faces to triangle soup\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-debug" ) ) {
|
else if ( striEqual( argv[ i ], "-debug" ) ) {
|
||||||
debug = true;
|
debug = true;
|
||||||
Sys_Printf( "Lightmap debugging enabled\n" );
|
Sys_Printf( "Lightmap debugging enabled\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-debugsurfaces" ) || strEqual( argv[ i ], "-debugsurface" ) ) {
|
else if ( striEqual( argv[ i ], "-debugsurfaces" ) || striEqual( argv[ i ], "-debugsurface" ) ) {
|
||||||
debugSurfaces = true;
|
debugSurfaces = true;
|
||||||
Sys_Printf( "Lightmap surface debugging enabled\n" );
|
Sys_Printf( "Lightmap surface debugging enabled\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-debugunused" ) ) {
|
else if ( striEqual( argv[ i ], "-debugunused" ) ) {
|
||||||
debugUnused = true;
|
debugUnused = true;
|
||||||
Sys_Printf( "Unused luxel debugging enabled\n" );
|
Sys_Printf( "Unused luxel debugging enabled\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-debugaxis" ) ) {
|
else if ( striEqual( argv[ i ], "-debugaxis" ) ) {
|
||||||
debugAxis = true;
|
debugAxis = true;
|
||||||
Sys_Printf( "Lightmap axis debugging enabled\n" );
|
Sys_Printf( "Lightmap axis debugging enabled\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-debugcluster" ) ) {
|
else if ( striEqual( argv[ i ], "-debugcluster" ) ) {
|
||||||
debugCluster = true;
|
debugCluster = true;
|
||||||
Sys_Printf( "Luxel cluster debugging enabled\n" );
|
Sys_Printf( "Luxel cluster debugging enabled\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-debugorigin" ) ) {
|
else if ( striEqual( argv[ i ], "-debugorigin" ) ) {
|
||||||
debugOrigin = true;
|
debugOrigin = true;
|
||||||
Sys_Printf( "Luxel origin debugging enabled\n" );
|
Sys_Printf( "Luxel origin debugging enabled\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-debugdeluxe" ) ) {
|
else if ( striEqual( argv[ i ], "-debugdeluxe" ) ) {
|
||||||
deluxemap = true;
|
deluxemap = true;
|
||||||
debugDeluxemap = true;
|
debugDeluxemap = true;
|
||||||
Sys_Printf( "Deluxemap debugging enabled\n" );
|
Sys_Printf( "Deluxemap debugging enabled\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-export" ) ) {
|
else if ( striEqual( argv[ i ], "-export" ) ) {
|
||||||
exportLightmaps = true;
|
exportLightmaps = true;
|
||||||
Sys_Printf( "Exporting lightmaps\n" );
|
Sys_Printf( "Exporting lightmaps\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( strEqual( argv[ i ], "-notrace" ) ) {
|
else if ( striEqual( argv[ i ], "-notrace" ) ) {
|
||||||
noTrace = true;
|
noTrace = true;
|
||||||
Sys_Printf( "Shadow occlusion disabled\n" );
|
Sys_Printf( "Shadow occlusion disabled\n" );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-patchshadows" ) ) {
|
else if ( striEqual( argv[ i ], "-patchshadows" ) ) {
|
||||||
patchShadows = true;
|
patchShadows = true;
|
||||||
Sys_Printf( "Patch shadow casting enabled\n" );
|
Sys_Printf( "Patch shadow casting enabled\n" );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-extra" ) ) {
|
else if ( striEqual( argv[ i ], "-extra" ) ) {
|
||||||
superSample = EXTRA_SCALE; /* ydnar */
|
superSample = EXTRA_SCALE; /* ydnar */
|
||||||
Sys_Printf( "The -extra argument is deprecated, use \"-super 2\" instead\n" );
|
Sys_Printf( "The -extra argument is deprecated, use \"-super 2\" instead\n" );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-extrawide" ) ) {
|
else if ( striEqual( argv[ i ], "-extrawide" ) ) {
|
||||||
superSample = EXTRAWIDE_SCALE; /* ydnar */
|
superSample = EXTRAWIDE_SCALE; /* ydnar */
|
||||||
filter = true; /* ydnar */
|
filter = true; /* ydnar */
|
||||||
Sys_Printf( "The -extrawide argument is deprecated, use \"-filter [-super 2]\" instead\n" );
|
Sys_Printf( "The -extrawide argument is deprecated, use \"-filter [-super 2]\" instead\n" );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-samplesize" ) ) {
|
else if ( striEqual( argv[ i ], "-samplesize" ) ) {
|
||||||
sampleSize = std::max( 1, atoi( argv[ i + 1 ] ) );
|
sampleSize = std::max( 1, atoi( argv[ i + 1 ] ) );
|
||||||
i++;
|
i++;
|
||||||
Sys_Printf( "Default lightmap sample size set to %dx%d units\n", sampleSize, sampleSize );
|
Sys_Printf( "Default lightmap sample size set to %dx%d units\n", sampleSize, sampleSize );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-minsamplesize" ) ) {
|
else if ( striEqual( argv[ i ], "-minsamplesize" ) ) {
|
||||||
minSampleSize = std::max( 1, atoi( argv[ i + 1 ] ) );
|
minSampleSize = std::max( 1, atoi( argv[ i + 1 ] ) );
|
||||||
i++;
|
i++;
|
||||||
Sys_Printf( "Minimum lightmap sample size set to %dx%d units\n", minSampleSize, minSampleSize );
|
Sys_Printf( "Minimum lightmap sample size set to %dx%d units\n", minSampleSize, minSampleSize );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-samplescale" ) ) {
|
else if ( striEqual( argv[ i ], "-samplescale" ) ) {
|
||||||
sampleScale = atoi( argv[ i + 1 ] );
|
sampleScale = atoi( argv[ i + 1 ] );
|
||||||
i++;
|
i++;
|
||||||
Sys_Printf( "Lightmaps sample scale set to %d\n", sampleScale );
|
Sys_Printf( "Lightmaps sample scale set to %d\n", sampleScale );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-debugsamplesize" ) ) {
|
else if ( striEqual( argv[ i ], "-debugsamplesize" ) ) {
|
||||||
debugSampleSize = 1;
|
debugSampleSize = 1;
|
||||||
Sys_Printf( "debugging Lightmaps SampleSize\n" );
|
Sys_Printf( "debugging Lightmaps SampleSize\n" );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-novertex" ) ) {
|
else if ( striEqual( argv[ i ], "-novertex" ) ) {
|
||||||
noVertexLighting = 1;
|
noVertexLighting = 1;
|
||||||
f = atof( argv[ i + 1 ] );
|
f = atof( argv[ i + 1 ] );
|
||||||
if ( f != 0 && f < 1 ) {
|
if ( f != 0 && f < 1 ) {
|
||||||
|
|
@ -2611,27 +2611,27 @@ int LightMain( int argc, char **argv ){
|
||||||
Sys_Printf( "Disabling vertex lighting\n" );
|
Sys_Printf( "Disabling vertex lighting\n" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-nogrid" ) ) {
|
else if ( striEqual( argv[ i ], "-nogrid" ) ) {
|
||||||
noGridLighting = true;
|
noGridLighting = true;
|
||||||
Sys_Printf( "Disabling grid lighting\n" );
|
Sys_Printf( "Disabling grid lighting\n" );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-border" ) ) {
|
else if ( striEqual( argv[ i ], "-border" ) ) {
|
||||||
lightmapBorder = true;
|
lightmapBorder = true;
|
||||||
Sys_Printf( "Adding debug border to lightmaps\n" );
|
Sys_Printf( "Adding debug border to lightmaps\n" );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-nosurf" ) ) {
|
else if ( striEqual( argv[ i ], "-nosurf" ) ) {
|
||||||
noSurfaces = true;
|
noSurfaces = true;
|
||||||
Sys_Printf( "Not tracing against surfaces\n" );
|
Sys_Printf( "Not tracing against surfaces\n" );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-dump" ) ) {
|
else if ( striEqual( argv[ i ], "-dump" ) ) {
|
||||||
dump = true;
|
dump = true;
|
||||||
Sys_Printf( "Dumping radiosity lights into numbered prefabs\n" );
|
Sys_Printf( "Dumping radiosity lights into numbered prefabs\n" );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-lomem" ) ) {
|
else if ( striEqual( argv[ i ], "-lomem" ) ) {
|
||||||
loMem = true;
|
loMem = true;
|
||||||
Sys_Printf( "Enabling low-memory (potentially slower) lighting mode\n" );
|
Sys_Printf( "Enabling low-memory (potentially slower) lighting mode\n" );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-lightanglehl" ) ) {
|
else if ( striEqual( argv[ i ], "-lightanglehl" ) ) {
|
||||||
if ( ( atoi( argv[ i + 1 ] ) != 0 ) != lightAngleHL ) {
|
if ( ( atoi( argv[ i + 1 ] ) != 0 ) != lightAngleHL ) {
|
||||||
lightAngleHL = ( atoi( argv[ i + 1 ] ) != 0 );
|
lightAngleHL = ( atoi( argv[ i + 1 ] ) != 0 );
|
||||||
if ( lightAngleHL ) {
|
if ( lightAngleHL ) {
|
||||||
|
|
@ -2643,41 +2643,41 @@ int LightMain( int argc, char **argv ){
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-nostyle" ) || strEqual( argv[ i ], "-nostyles" ) ) {
|
else if ( striEqual( argv[ i ], "-nostyle" ) || striEqual( argv[ i ], "-nostyles" ) ) {
|
||||||
noStyles = true;
|
noStyles = true;
|
||||||
Sys_Printf( "Disabling lightstyles\n" );
|
Sys_Printf( "Disabling lightstyles\n" );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-style" ) || strEqual( argv[ i ], "-styles" ) ) {
|
else if ( striEqual( argv[ i ], "-style" ) || striEqual( argv[ i ], "-styles" ) ) {
|
||||||
noStyles = false;
|
noStyles = false;
|
||||||
Sys_Printf( "Enabling lightstyles\n" );
|
Sys_Printf( "Enabling lightstyles\n" );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-cpma" ) ) {
|
else if ( striEqual( argv[ i ], "-cpma" ) ) {
|
||||||
cpmaHack = true;
|
cpmaHack = true;
|
||||||
Sys_Printf( "Enabling Challenge Pro Mode Asstacular Vertex Lighting Mode (tm)\n" );
|
Sys_Printf( "Enabling Challenge Pro Mode Asstacular Vertex Lighting Mode (tm)\n" );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-floodlight" ) ) {
|
else if ( striEqual( argv[ i ], "-floodlight" ) ) {
|
||||||
floodlighty = true;
|
floodlighty = true;
|
||||||
Sys_Printf( "FloodLighting enabled\n" );
|
Sys_Printf( "FloodLighting enabled\n" );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-debugnormals" ) ) {
|
else if ( striEqual( argv[ i ], "-debugnormals" ) ) {
|
||||||
debugnormals = true;
|
debugnormals = true;
|
||||||
Sys_Printf( "DebugNormals enabled\n" );
|
Sys_Printf( "DebugNormals enabled\n" );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-lowquality" ) ) {
|
else if ( striEqual( argv[ i ], "-lowquality" ) ) {
|
||||||
floodlight_lowquality = true;
|
floodlight_lowquality = true;
|
||||||
Sys_Printf( "Low Quality FloodLighting enabled\n" );
|
Sys_Printf( "Low Quality FloodLighting enabled\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* r7: dirtmapping */
|
/* r7: dirtmapping */
|
||||||
else if ( strEqual( argv[ i ], "-dirty" ) ) {
|
else if ( striEqual( argv[ i ], "-dirty" ) ) {
|
||||||
dirty = true;
|
dirty = true;
|
||||||
Sys_Printf( "Dirtmapping enabled\n" );
|
Sys_Printf( "Dirtmapping enabled\n" );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-dirtdebug" ) || strEqual( argv[ i ], "-debugdirt" ) ) {
|
else if ( striEqual( argv[ i ], "-dirtdebug" ) || striEqual( argv[ i ], "-debugdirt" ) ) {
|
||||||
dirtDebug = true;
|
dirtDebug = true;
|
||||||
Sys_Printf( "Dirtmap debugging enabled\n" );
|
Sys_Printf( "Dirtmap debugging enabled\n" );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-dirtmode" ) ) {
|
else if ( striEqual( argv[ i ], "-dirtmode" ) ) {
|
||||||
dirtMode = atoi( argv[ i + 1 ] );
|
dirtMode = atoi( argv[ i + 1 ] );
|
||||||
if ( dirtMode != 0 && dirtMode != 1 ) {
|
if ( dirtMode != 0 && dirtMode != 1 ) {
|
||||||
dirtMode = 0;
|
dirtMode = 0;
|
||||||
|
|
@ -2690,7 +2690,7 @@ int LightMain( int argc, char **argv ){
|
||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-dirtdepth" ) ) {
|
else if ( striEqual( argv[ i ], "-dirtdepth" ) ) {
|
||||||
dirtDepth = atof( argv[ i + 1 ] );
|
dirtDepth = atof( argv[ i + 1 ] );
|
||||||
if ( dirtDepth <= 0.0f ) {
|
if ( dirtDepth <= 0.0f ) {
|
||||||
dirtDepth = 128.0f;
|
dirtDepth = 128.0f;
|
||||||
|
|
@ -2698,7 +2698,7 @@ int LightMain( int argc, char **argv ){
|
||||||
Sys_Printf( "Dirtmapping depth set to %.1f\n", dirtDepth );
|
Sys_Printf( "Dirtmapping depth set to %.1f\n", dirtDepth );
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-dirtscale" ) ) {
|
else if ( striEqual( argv[ i ], "-dirtscale" ) ) {
|
||||||
dirtScale = atof( argv[ i + 1 ] );
|
dirtScale = atof( argv[ i + 1 ] );
|
||||||
if ( dirtScale <= 0.0f ) {
|
if ( dirtScale <= 0.0f ) {
|
||||||
dirtScale = 1.0f;
|
dirtScale = 1.0f;
|
||||||
|
|
@ -2706,7 +2706,7 @@ int LightMain( int argc, char **argv ){
|
||||||
Sys_Printf( "Dirtmapping scale set to %.1f\n", dirtScale );
|
Sys_Printf( "Dirtmapping scale set to %.1f\n", dirtScale );
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-dirtgain" ) ) {
|
else if ( striEqual( argv[ i ], "-dirtgain" ) ) {
|
||||||
dirtGain = atof( argv[ i + 1 ] );
|
dirtGain = atof( argv[ i + 1 ] );
|
||||||
if ( dirtGain <= 0.0f ) {
|
if ( dirtGain <= 0.0f ) {
|
||||||
dirtGain = 1.0f;
|
dirtGain = 1.0f;
|
||||||
|
|
@ -2714,17 +2714,17 @@ int LightMain( int argc, char **argv ){
|
||||||
Sys_Printf( "Dirtmapping gain set to %.1f\n", dirtGain );
|
Sys_Printf( "Dirtmapping gain set to %.1f\n", dirtGain );
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-trianglecheck" ) ) {
|
else if ( striEqual( argv[ i ], "-trianglecheck" ) ) {
|
||||||
lightmapTriangleCheck = true;
|
lightmapTriangleCheck = true;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-extravisnudge" ) ) {
|
else if ( striEqual( argv[ i ], "-extravisnudge" ) ) {
|
||||||
lightmapExtraVisClusterNudge = true;
|
lightmapExtraVisClusterNudge = true;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-fill" ) ) {
|
else if ( striEqual( argv[ i ], "-fill" ) ) {
|
||||||
lightmapFill = true;
|
lightmapFill = true;
|
||||||
Sys_Printf( "Filling lightmap colors from surrounding pixels to improve JPEG compression\n" );
|
Sys_Printf( "Filling lightmap colors from surrounding pixels to improve JPEG compression\n" );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-fillpink" ) ) {
|
else if ( striEqual( argv[ i ], "-fillpink" ) ) {
|
||||||
lightmapPink = true;
|
lightmapPink = true;
|
||||||
}
|
}
|
||||||
/* unhandled args */
|
/* unhandled args */
|
||||||
|
|
|
||||||
|
|
@ -82,14 +82,14 @@ int main( int argc, char **argv ){
|
||||||
for ( i = 1; i < argc; i++ )
|
for ( i = 1; i < argc; i++ )
|
||||||
{
|
{
|
||||||
/* -help */
|
/* -help */
|
||||||
if ( strEqual( argv[ i ], "-h" ) || strEqual( argv[ i ], "--help" )
|
if ( striEqual( argv[ i ], "-h" ) || striEqual( argv[ i ], "--help" )
|
||||||
|| strEqual( argv[ i ], "-help" ) ) {
|
|| striEqual( argv[ i ], "-help" ) ) {
|
||||||
HelpMain( ( i + 1 < argc ) ? argv[ i + 1 ] : NULL );
|
HelpMain( ( i + 1 < argc ) ? argv[ i + 1 ] : NULL );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -connect */
|
/* -connect */
|
||||||
if ( strEqual( argv[ i ], "-connect" ) ) {
|
if ( striEqual( argv[ i ], "-connect" ) ) {
|
||||||
if ( ++i >= argc || !argv[ i ] ) {
|
if ( ++i >= argc || !argv[ i ] ) {
|
||||||
Error( "Out of arguments: No address specified after %s", argv[ i - 1 ] );
|
Error( "Out of arguments: No address specified after %s", argv[ i - 1 ] );
|
||||||
}
|
}
|
||||||
|
|
@ -99,7 +99,7 @@ int main( int argc, char **argv ){
|
||||||
}
|
}
|
||||||
|
|
||||||
/* verbose */
|
/* verbose */
|
||||||
else if ( strEqual( argv[ i ], "-v" ) ) {
|
else if ( striEqual( argv[ i ], "-v" ) ) {
|
||||||
if ( !verbose ) {
|
if ( !verbose ) {
|
||||||
verbose = true;
|
verbose = true;
|
||||||
argv[ i ] = NULL;
|
argv[ i ] = NULL;
|
||||||
|
|
@ -107,13 +107,13 @@ int main( int argc, char **argv ){
|
||||||
}
|
}
|
||||||
|
|
||||||
/* force */
|
/* force */
|
||||||
else if ( strEqual( argv[ i ], "-force" ) ) {
|
else if ( striEqual( argv[ i ], "-force" ) ) {
|
||||||
force = true;
|
force = true;
|
||||||
argv[ i ] = NULL;
|
argv[ i ] = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* patch subdivisions */
|
/* patch subdivisions */
|
||||||
else if ( strEqual( argv[ i ], "-subdivisions" ) ) {
|
else if ( striEqual( argv[ i ], "-subdivisions" ) ) {
|
||||||
if ( ++i >= argc || !argv[ i ] ) {
|
if ( ++i >= argc || !argv[ i ] ) {
|
||||||
Error( "Out of arguments: No value specified after %s", argv[ i - 1 ] );
|
Error( "Out of arguments: No value specified after %s", argv[ i - 1 ] );
|
||||||
}
|
}
|
||||||
|
|
@ -126,7 +126,7 @@ int main( int argc, char **argv ){
|
||||||
}
|
}
|
||||||
|
|
||||||
/* threads */
|
/* threads */
|
||||||
else if ( strEqual( argv[ i ], "-threads" ) ) {
|
else if ( striEqual( argv[ i ], "-threads" ) ) {
|
||||||
if ( ++i >= argc || !argv[ i ] ) {
|
if ( ++i >= argc || !argv[ i ] ) {
|
||||||
Error( "Out of arguments: No value specified after %s", argv[ i - 1 ] );
|
Error( "Out of arguments: No value specified after %s", argv[ i - 1 ] );
|
||||||
}
|
}
|
||||||
|
|
@ -135,7 +135,7 @@ int main( int argc, char **argv ){
|
||||||
argv[ i ] = NULL;
|
argv[ i ] = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if( strEqual( argv[ i ], "-nocmdline" ) )
|
else if( striEqual( argv[ i ], "-nocmdline" ) )
|
||||||
{
|
{
|
||||||
Sys_Printf( "noCmdLine\n" );
|
Sys_Printf( "noCmdLine\n" );
|
||||||
nocmdline = true;
|
nocmdline = true;
|
||||||
|
|
@ -187,79 +187,79 @@ int main( int argc, char **argv ){
|
||||||
}
|
}
|
||||||
|
|
||||||
/* fixaas */
|
/* fixaas */
|
||||||
if ( strEqual( argv[ 1 ], "-fixaas" ) ) {
|
if ( striEqual( argv[ 1 ], "-fixaas" ) ) {
|
||||||
r = FixAAS( argc - 1, argv + 1 );
|
r = FixAAS( argc - 1, argv + 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* analyze */
|
/* analyze */
|
||||||
else if ( strEqual( argv[ 1 ], "-analyze" ) ) {
|
else if ( striEqual( argv[ 1 ], "-analyze" ) ) {
|
||||||
r = AnalyzeBSP( argc - 1, argv + 1 );
|
r = AnalyzeBSP( argc - 1, argv + 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* info */
|
/* info */
|
||||||
else if ( strEqual( argv[ 1 ], "-info" ) ) {
|
else if ( striEqual( argv[ 1 ], "-info" ) ) {
|
||||||
r = BSPInfo( argc - 2, argv + 2 );
|
r = BSPInfo( argc - 2, argv + 2 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* vis */
|
/* vis */
|
||||||
else if ( strEqual( argv[ 1 ], "-vis" ) ) {
|
else if ( striEqual( argv[ 1 ], "-vis" ) ) {
|
||||||
r = VisMain( argc - 1, argv + 1 );
|
r = VisMain( argc - 1, argv + 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* light */
|
/* light */
|
||||||
else if ( strEqual( argv[ 1 ], "-light" ) ) {
|
else if ( striEqual( argv[ 1 ], "-light" ) ) {
|
||||||
r = LightMain( argc - 1, argv + 1 );
|
r = LightMain( argc - 1, argv + 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* vlight */
|
/* vlight */
|
||||||
else if ( strEqual( argv[ 1 ], "-vlight" ) ) {
|
else if ( striEqual( argv[ 1 ], "-vlight" ) ) {
|
||||||
Sys_Warning( "VLight is no longer supported, defaulting to -light -fast instead\n\n" );
|
Sys_Warning( "VLight is no longer supported, defaulting to -light -fast instead\n\n" );
|
||||||
argv[ 1 ] = "-fast"; /* eek a hack */
|
argv[ 1 ] = "-fast"; /* eek a hack */
|
||||||
r = LightMain( argc, argv );
|
r = LightMain( argc, argv );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* QBall: export entities */
|
/* QBall: export entities */
|
||||||
else if ( strEqual( argv[ 1 ], "-exportents" ) ) {
|
else if ( striEqual( argv[ 1 ], "-exportents" ) ) {
|
||||||
r = ExportEntitiesMain( argc - 1, argv + 1 );
|
r = ExportEntitiesMain( argc - 1, argv + 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ydnar: lightmap export */
|
/* ydnar: lightmap export */
|
||||||
else if ( strEqual( argv[ 1 ], "-export" ) ) {
|
else if ( striEqual( argv[ 1 ], "-export" ) ) {
|
||||||
r = ExportLightmapsMain( argc - 1, argv + 1 );
|
r = ExportLightmapsMain( argc - 1, argv + 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ydnar: lightmap import */
|
/* ydnar: lightmap import */
|
||||||
else if ( strEqual( argv[ 1 ], "-import" ) ) {
|
else if ( striEqual( argv[ 1 ], "-import" ) ) {
|
||||||
r = ImportLightmapsMain( argc - 1, argv + 1 );
|
r = ImportLightmapsMain( argc - 1, argv + 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ydnar: bsp scaling */
|
/* ydnar: bsp scaling */
|
||||||
else if ( strEqual( argv[ 1 ], "-scale" ) ) {
|
else if ( striEqual( argv[ 1 ], "-scale" ) ) {
|
||||||
r = ScaleBSPMain( argc - 1, argv + 1 );
|
r = ScaleBSPMain( argc - 1, argv + 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* bsp shifting */
|
/* bsp shifting */
|
||||||
else if ( strEqual( argv[ 1 ], "-shift" ) ) {
|
else if ( striEqual( argv[ 1 ], "-shift" ) ) {
|
||||||
r = ShiftBSPMain( argc - 1, argv + 1 );
|
r = ShiftBSPMain( argc - 1, argv + 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* autopacking */
|
/* autopacking */
|
||||||
else if ( strEqual( argv[ 1 ], "-pk3" ) ) {
|
else if ( striEqual( argv[ 1 ], "-pk3" ) ) {
|
||||||
r = pk3BSPMain( argc - 1, argv + 1 );
|
r = pk3BSPMain( argc - 1, argv + 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* repacker */
|
/* repacker */
|
||||||
else if ( strEqual( argv[ 1 ], "-repack" ) ) {
|
else if ( striEqual( argv[ 1 ], "-repack" ) ) {
|
||||||
r = repackBSPMain( argc - 1, argv + 1 );
|
r = repackBSPMain( argc - 1, argv + 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ydnar: bsp conversion */
|
/* ydnar: bsp conversion */
|
||||||
else if ( strEqual( argv[ 1 ], "-convert" ) ) {
|
else if ( striEqual( argv[ 1 ], "-convert" ) ) {
|
||||||
r = ConvertBSPMain( argc - 1, argv + 1 );
|
r = ConvertBSPMain( argc - 1, argv + 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* div0: minimap */
|
/* div0: minimap */
|
||||||
else if ( strEqual( argv[ 1 ], "-minimap" ) ) {
|
else if ( striEqual( argv[ 1 ], "-minimap" ) ) {
|
||||||
r = MiniMapBSPMain( argc - 1, argv + 1 );
|
r = MiniMapBSPMain( argc - 1, argv + 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -499,17 +499,17 @@ int MiniMapBSPMain( int argc, char **argv ){
|
||||||
/* process arguments */
|
/* process arguments */
|
||||||
for ( i = 1; i < ( argc - 1 ); i++ )
|
for ( i = 1; i < ( argc - 1 ); i++ )
|
||||||
{
|
{
|
||||||
if ( strEqual( argv[ i ], "-size" ) ) {
|
if ( striEqual( argv[ i ], "-size" ) ) {
|
||||||
minimap.width = minimap.height = atoi( argv[i + 1] );
|
minimap.width = minimap.height = atoi( argv[i + 1] );
|
||||||
i++;
|
i++;
|
||||||
Sys_Printf( "Image size set to %i\n", minimap.width );
|
Sys_Printf( "Image size set to %i\n", minimap.width );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-sharpen" ) ) {
|
else if ( striEqual( argv[ i ], "-sharpen" ) ) {
|
||||||
minimapSharpen = atof( argv[i + 1] );
|
minimapSharpen = atof( argv[i + 1] );
|
||||||
i++;
|
i++;
|
||||||
Sys_Printf( "Sharpening coefficient set to %f\n", minimapSharpen );
|
Sys_Printf( "Sharpening coefficient set to %f\n", minimapSharpen );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-samples" ) ) {
|
else if ( striEqual( argv[ i ], "-samples" ) ) {
|
||||||
minimap.samples = atoi( argv[i + 1] );
|
minimap.samples = atoi( argv[i + 1] );
|
||||||
i++;
|
i++;
|
||||||
Sys_Printf( "Samples set to %i\n", minimap.samples );
|
Sys_Printf( "Samples set to %i\n", minimap.samples );
|
||||||
|
|
@ -517,32 +517,32 @@ int MiniMapBSPMain( int argc, char **argv ){
|
||||||
minimap.sample_offsets = safe_malloc( 2 * sizeof( *minimap.sample_offsets ) * minimap.samples );
|
minimap.sample_offsets = safe_malloc( 2 * sizeof( *minimap.sample_offsets ) * minimap.samples );
|
||||||
MiniMapMakeSampleOffsets();
|
MiniMapMakeSampleOffsets();
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-random" ) ) {
|
else if ( striEqual( argv[ i ], "-random" ) ) {
|
||||||
minimap.samples = atoi( argv[i + 1] );
|
minimap.samples = atoi( argv[i + 1] );
|
||||||
i++;
|
i++;
|
||||||
Sys_Printf( "Random samples set to %i\n", minimap.samples );
|
Sys_Printf( "Random samples set to %i\n", minimap.samples );
|
||||||
free( minimap.sample_offsets );
|
free( minimap.sample_offsets );
|
||||||
minimap.sample_offsets = NULL;
|
minimap.sample_offsets = NULL;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-border" ) ) {
|
else if ( striEqual( argv[ i ], "-border" ) ) {
|
||||||
border = atof( argv[i + 1] );
|
border = atof( argv[i + 1] );
|
||||||
i++;
|
i++;
|
||||||
Sys_Printf( "Border set to %f\n", border );
|
Sys_Printf( "Border set to %f\n", border );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-keepaspect" ) ) {
|
else if ( striEqual( argv[ i ], "-keepaspect" ) ) {
|
||||||
keepaspect = true;
|
keepaspect = true;
|
||||||
Sys_Printf( "Keeping aspect ratio by letterboxing\n", border );
|
Sys_Printf( "Keeping aspect ratio by letterboxing\n", border );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-nokeepaspect" ) ) {
|
else if ( striEqual( argv[ i ], "-nokeepaspect" ) ) {
|
||||||
keepaspect = false;
|
keepaspect = false;
|
||||||
Sys_Printf( "Not keeping aspect ratio\n", border );
|
Sys_Printf( "Not keeping aspect ratio\n", border );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-o" ) ) {
|
else if ( striEqual( argv[ i ], "-o" ) ) {
|
||||||
strcpy( minimapFilename, argv[i + 1] );
|
strcpy( minimapFilename, argv[i + 1] );
|
||||||
i++;
|
i++;
|
||||||
Sys_Printf( "Output file name set to %s\n", minimapFilename );
|
Sys_Printf( "Output file name set to %s\n", minimapFilename );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-minmax" ) && i < ( argc - 7 ) ) {
|
else if ( striEqual( argv[ i ], "-minmax" ) && i < ( argc - 7 ) ) {
|
||||||
mins[0] = atof( argv[i + 1] );
|
mins[0] = atof( argv[i + 1] );
|
||||||
mins[1] = atof( argv[i + 2] );
|
mins[1] = atof( argv[i + 2] );
|
||||||
mins[2] = atof( argv[i + 3] );
|
mins[2] = atof( argv[i + 3] );
|
||||||
|
|
@ -552,38 +552,38 @@ int MiniMapBSPMain( int argc, char **argv ){
|
||||||
i += 6;
|
i += 6;
|
||||||
Sys_Printf( "Map mins/maxs overridden\n" );
|
Sys_Printf( "Map mins/maxs overridden\n" );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-gray" ) ) {
|
else if ( striEqual( argv[ i ], "-gray" ) ) {
|
||||||
mode = EMiniMapMode::Gray;
|
mode = EMiniMapMode::Gray;
|
||||||
Sys_Printf( "Writing as white-on-black image\n" );
|
Sys_Printf( "Writing as white-on-black image\n" );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-black" ) ) {
|
else if ( striEqual( argv[ i ], "-black" ) ) {
|
||||||
mode = EMiniMapMode::Black;
|
mode = EMiniMapMode::Black;
|
||||||
Sys_Printf( "Writing as black alpha image\n" );
|
Sys_Printf( "Writing as black alpha image\n" );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-white" ) ) {
|
else if ( striEqual( argv[ i ], "-white" ) ) {
|
||||||
mode = EMiniMapMode::White;
|
mode = EMiniMapMode::White;
|
||||||
Sys_Printf( "Writing as white alpha image\n" );
|
Sys_Printf( "Writing as white alpha image\n" );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-boost" ) && i < ( argc - 2 ) ) {
|
else if ( striEqual( argv[ i ], "-boost" ) && i < ( argc - 2 ) ) {
|
||||||
minimap.boost = atof( argv[i + 1] );
|
minimap.boost = atof( argv[i + 1] );
|
||||||
i++;
|
i++;
|
||||||
Sys_Printf( "Contrast boost set to %f\n", minimap.boost );
|
Sys_Printf( "Contrast boost set to %f\n", minimap.boost );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-brightness" ) && i < ( argc - 2 ) ) {
|
else if ( striEqual( argv[ i ], "-brightness" ) && i < ( argc - 2 ) ) {
|
||||||
minimap.brightness = atof( argv[i + 1] );
|
minimap.brightness = atof( argv[i + 1] );
|
||||||
i++;
|
i++;
|
||||||
Sys_Printf( "Brightness set to %f\n", minimap.brightness );
|
Sys_Printf( "Brightness set to %f\n", minimap.brightness );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-contrast" ) && i < ( argc - 2 ) ) {
|
else if ( striEqual( argv[ i ], "-contrast" ) && i < ( argc - 2 ) ) {
|
||||||
minimap.contrast = atof( argv[i + 1] );
|
minimap.contrast = atof( argv[i + 1] );
|
||||||
i++;
|
i++;
|
||||||
Sys_Printf( "Contrast set to %f\n", minimap.contrast );
|
Sys_Printf( "Contrast set to %f\n", minimap.contrast );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-autolevel" ) ) {
|
else if ( striEqual( argv[ i ], "-autolevel" ) ) {
|
||||||
autolevel = true;
|
autolevel = true;
|
||||||
Sys_Printf( "Auto level enabled\n", border );
|
Sys_Printf( "Auto level enabled\n", border );
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-noautolevel" ) ) {
|
else if ( striEqual( argv[ i ], "-noautolevel" ) ) {
|
||||||
autolevel = false;
|
autolevel = false;
|
||||||
Sys_Printf( "Auto level disabled\n", border );
|
Sys_Printf( "Auto level disabled\n", border );
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -387,7 +387,7 @@ void InitPaths( int *argc, char **argv ){
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -game */
|
/* -game */
|
||||||
if ( strEqual( argv[ i ], "-game" ) ) {
|
if ( striEqual( argv[ i ], "-game" ) ) {
|
||||||
if ( ++i >= *argc || !argv[ i ] ) {
|
if ( ++i >= *argc || !argv[ i ] ) {
|
||||||
Error( "Out of arguments: No game specified after %s", argv[ i - 1 ] );
|
Error( "Out of arguments: No game specified after %s", argv[ i - 1 ] );
|
||||||
}
|
}
|
||||||
|
|
@ -400,7 +400,7 @@ void InitPaths( int *argc, char **argv ){
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -fs_forbiddenpath */
|
/* -fs_forbiddenpath */
|
||||||
else if ( strEqual( argv[ i ], "-fs_forbiddenpath" ) ) {
|
else if ( striEqual( argv[ i ], "-fs_forbiddenpath" ) ) {
|
||||||
if ( ++i >= *argc || !argv[ i ] ) {
|
if ( ++i >= *argc || !argv[ i ] ) {
|
||||||
Error( "Out of arguments: No path specified after %s.", argv[ i - 1 ] );
|
Error( "Out of arguments: No path specified after %s.", argv[ i - 1 ] );
|
||||||
}
|
}
|
||||||
|
|
@ -414,7 +414,7 @@ void InitPaths( int *argc, char **argv ){
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -fs_basepath */
|
/* -fs_basepath */
|
||||||
else if ( strEqual( argv[ i ], "-fs_basepath" ) ) {
|
else if ( striEqual( argv[ i ], "-fs_basepath" ) ) {
|
||||||
if ( ++i >= *argc || !argv[ i ] ) {
|
if ( ++i >= *argc || !argv[ i ] ) {
|
||||||
Error( "Out of arguments: No path specified after %s.", argv[ i - 1 ] );
|
Error( "Out of arguments: No path specified after %s.", argv[ i - 1 ] );
|
||||||
}
|
}
|
||||||
|
|
@ -424,7 +424,7 @@ void InitPaths( int *argc, char **argv ){
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -fs_game */
|
/* -fs_game */
|
||||||
else if ( strEqual( argv[ i ], "-fs_game" ) ) {
|
else if ( striEqual( argv[ i ], "-fs_game" ) ) {
|
||||||
if ( ++i >= *argc || !argv[ i ] ) {
|
if ( ++i >= *argc || !argv[ i ] ) {
|
||||||
Error( "Out of arguments: No path specified after %s.", argv[ i - 1 ] );
|
Error( "Out of arguments: No path specified after %s.", argv[ i - 1 ] );
|
||||||
}
|
}
|
||||||
|
|
@ -434,7 +434,7 @@ void InitPaths( int *argc, char **argv ){
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -fs_home */
|
/* -fs_home */
|
||||||
else if ( strEqual( argv[ i ], "-fs_home" ) ) {
|
else if ( striEqual( argv[ i ], "-fs_home" ) ) {
|
||||||
if ( ++i >= *argc || !argv[ i ] ) {
|
if ( ++i >= *argc || !argv[ i ] ) {
|
||||||
Error( "Out of arguments: No path specified after %s.", argv[ i - 1 ] );
|
Error( "Out of arguments: No path specified after %s.", argv[ i - 1 ] );
|
||||||
}
|
}
|
||||||
|
|
@ -444,7 +444,7 @@ void InitPaths( int *argc, char **argv ){
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -fs_homebase */
|
/* -fs_homebase */
|
||||||
else if ( strEqual( argv[ i ], "-fs_homebase" ) ) {
|
else if ( striEqual( argv[ i ], "-fs_homebase" ) ) {
|
||||||
if ( ++i >= *argc || !argv[ i ] ) {
|
if ( ++i >= *argc || !argv[ i ] ) {
|
||||||
Error( "Out of arguments: No path specified after %s.", argv[ i - 1 ] );
|
Error( "Out of arguments: No path specified after %s.", argv[ i - 1 ] );
|
||||||
}
|
}
|
||||||
|
|
@ -454,7 +454,7 @@ void InitPaths( int *argc, char **argv ){
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -fs_homepath - sets both of them */
|
/* -fs_homepath - sets both of them */
|
||||||
else if ( strEqual( argv[ i ], "-fs_homepath" ) ) {
|
else if ( striEqual( argv[ i ], "-fs_homepath" ) ) {
|
||||||
if ( ++i >= *argc || !argv[ i ] ) {
|
if ( ++i >= *argc || !argv[ i ] ) {
|
||||||
Error( "Out of arguments: No path specified after %s.", argv[ i - 1 ] );
|
Error( "Out of arguments: No path specified after %s.", argv[ i - 1 ] );
|
||||||
}
|
}
|
||||||
|
|
@ -465,7 +465,7 @@ void InitPaths( int *argc, char **argv ){
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -fs_pakpath */
|
/* -fs_pakpath */
|
||||||
else if ( strEqual( argv[ i ], "-fs_pakpath" ) ) {
|
else if ( striEqual( argv[ i ], "-fs_pakpath" ) ) {
|
||||||
if ( ++i >= *argc || !argv[ i ] ) {
|
if ( ++i >= *argc || !argv[ i ] ) {
|
||||||
Error( "Out of arguments: No path specified after %s.", argv[ i - 1 ] );
|
Error( "Out of arguments: No path specified after %s.", argv[ i - 1 ] );
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1056,40 +1056,40 @@ int VisMain( int argc, char **argv ){
|
||||||
/* process arguments */
|
/* process arguments */
|
||||||
for ( i = 1 ; i < ( argc - 1 ) ; i++ )
|
for ( i = 1 ; i < ( argc - 1 ) ; i++ )
|
||||||
{
|
{
|
||||||
if ( strEqual( argv[i], "-fast" ) ) {
|
if ( striEqual( argv[i], "-fast" ) ) {
|
||||||
Sys_Printf( "fastvis = true\n" );
|
Sys_Printf( "fastvis = true\n" );
|
||||||
fastvis = true;
|
fastvis = true;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[i], "-merge" ) ) {
|
else if ( striEqual( argv[i], "-merge" ) ) {
|
||||||
Sys_Printf( "merge = true\n" );
|
Sys_Printf( "merge = true\n" );
|
||||||
mergevis = true;
|
mergevis = true;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[i], "-mergeportals" ) ) {
|
else if ( striEqual( argv[i], "-mergeportals" ) ) {
|
||||||
Sys_Printf( "mergeportals = true\n" );
|
Sys_Printf( "mergeportals = true\n" );
|
||||||
mergevisportals = true;
|
mergevisportals = true;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[i], "-nopassage" ) ) {
|
else if ( striEqual( argv[i], "-nopassage" ) ) {
|
||||||
Sys_Printf( "nopassage = true\n" );
|
Sys_Printf( "nopassage = true\n" );
|
||||||
noPassageVis = true;
|
noPassageVis = true;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[i], "-passageOnly" ) ) {
|
else if ( striEqual( argv[i], "-passageOnly" ) ) {
|
||||||
Sys_Printf( "passageOnly = true\n" );
|
Sys_Printf( "passageOnly = true\n" );
|
||||||
passageVisOnly = true;
|
passageVisOnly = true;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[i], "-nosort" ) ) {
|
else if ( striEqual( argv[i], "-nosort" ) ) {
|
||||||
Sys_Printf( "nosort = true\n" );
|
Sys_Printf( "nosort = true\n" );
|
||||||
nosort = true;
|
nosort = true;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[i], "-saveprt" ) ) {
|
else if ( striEqual( argv[i], "-saveprt" ) ) {
|
||||||
Sys_Printf( "saveprt = true\n" );
|
Sys_Printf( "saveprt = true\n" );
|
||||||
saveprt = true;
|
saveprt = true;
|
||||||
}
|
}
|
||||||
else if ( strEqual( argv[ i ], "-v" ) ) {
|
else if ( striEqual( argv[ i ], "-v" ) ) {
|
||||||
debugCluster = true;
|
debugCluster = true;
|
||||||
Sys_Printf( "Extra verbose mode enabled\n" );
|
Sys_Printf( "Extra verbose mode enabled\n" );
|
||||||
}
|
}
|
||||||
/* ydnar: -hint to merge all but hint portals */
|
/* ydnar: -hint to merge all but hint portals */
|
||||||
else if ( strEqual( argv[ i ], "-hint" ) ) {
|
else if ( striEqual( argv[ i ], "-hint" ) ) {
|
||||||
Sys_Printf( "hint = true\n" );
|
Sys_Printf( "hint = true\n" );
|
||||||
hint = true;
|
hint = true;
|
||||||
mergevis = true;
|
mergevis = true;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user