Toggle graphical options from command line
This commit is contained in:
parent
d234954e14
commit
88dd551229
70
src/main.cpp
70
src/main.cpp
@ -705,6 +705,72 @@ int handleCmdLinePreliminary()
|
||||
if(CommandLine::has("--windowed") || CommandLine::has("-w"))
|
||||
UserConfigParams::m_fullscreen = false;
|
||||
|
||||
// toggle graphical options
|
||||
if (CommandLine::has("--enable-glow"))
|
||||
UserConfigParams::m_glow = true;
|
||||
else if (CommandLine::has("--disable-glow"))
|
||||
UserConfigParams::m_glow = false;
|
||||
if (CommandLine::has("--enable-bloom"))
|
||||
UserConfigParams::m_bloom = true;
|
||||
else if (CommandLine::has("--disable-bloom"))
|
||||
UserConfigParams::m_bloom = false;
|
||||
if (CommandLine::has("--enable-light-shaft"))
|
||||
UserConfigParams::m_light_shaft = true;
|
||||
else if (CommandLine::has("--disable-light-shaft"))
|
||||
UserConfigParams::m_light_shaft = false;
|
||||
if (CommandLine::has("--enable-dynamic-lights"))
|
||||
UserConfigParams::m_dynamic_lights = true;
|
||||
else if (CommandLine::has("--disable-dynamic-lights"))
|
||||
UserConfigParams::m_dynamic_lights = false;
|
||||
// depth of field
|
||||
if (CommandLine::has("--enable-dof"))
|
||||
UserConfigParams::m_dof = true;
|
||||
else if (CommandLine::has("--disable-dof"))
|
||||
UserConfigParams::m_dof = false;
|
||||
// global illumination
|
||||
if (CommandLine::has("--enable-gi"))
|
||||
UserConfigParams::m_gi = true;
|
||||
else if (CommandLine::has("--disable-gi"))
|
||||
UserConfigParams::m_gi = false;
|
||||
// animated scenery
|
||||
if (CommandLine::has("--enable-gfx"))
|
||||
UserConfigParams::m_graphical_effects = true;
|
||||
else if (CommandLine::has("--disable-gfx"))
|
||||
UserConfigParams::m_graphical_effects = false;
|
||||
if (CommandLine::has("--enable-motion-blur"))
|
||||
UserConfigParams::m_motionblur = true;
|
||||
else if (CommandLine::has("--disable-motion-blur"))
|
||||
UserConfigParams::m_motionblur = false;
|
||||
// anti-aliasing
|
||||
if (CommandLine::has("--enable-mlaa"))
|
||||
UserConfigParams::m_mlaa = true;
|
||||
else if (CommandLine::has("--disable-mlaa"))
|
||||
UserConfigParams::m_mlaa = false;
|
||||
if (CommandLine::has("--enable-texture-compression"))
|
||||
UserConfigParams::m_texture_compression = true;
|
||||
else if (CommandLine::has("--disable-texture-compression"))
|
||||
UserConfigParams::m_texture_compression = false;
|
||||
// screen space ambient occluison
|
||||
if (CommandLine::has("--enable-ssao"))
|
||||
UserConfigParams::m_ssao = true;
|
||||
else if (CommandLine::has("--disable-ssao"))
|
||||
UserConfigParams::m_ssao = false;
|
||||
// image based lighting
|
||||
if (CommandLine::has("--enable-ibl"))
|
||||
UserConfigParams::m_degraded_IBL = false;
|
||||
else if (CommandLine::has("--disable-ibl"))
|
||||
UserConfigParams::m_degraded_IBL = true;
|
||||
// high definition textures user choice
|
||||
if (CommandLine::has("--enable-hd-textures"))
|
||||
UserConfigParams::m_high_definition_textures = 2 | 1;
|
||||
else if (CommandLine::has("--disable-hd-textures"))
|
||||
UserConfigParams::m_high_definition_textures = 2;
|
||||
if (CommandLine::has("--enable-trilinear"))
|
||||
UserConfigParams::m_trilinear = true;
|
||||
else if (CommandLine::has("--disable-trilinear"))
|
||||
UserConfigParams::m_trilinear = false;
|
||||
|
||||
|
||||
// Enable loading grand prix from local directory
|
||||
if(CommandLine::has("--add-gp-dir", &s))
|
||||
{
|
||||
@ -723,6 +789,10 @@ int handleCmdLinePreliminary()
|
||||
UserConfigParams::m_xmas_mode = n;
|
||||
if (CommandLine::has("--easter", &n))
|
||||
UserConfigParams::m_easter_ear_mode = n;
|
||||
if (CommandLine::has("--shadows", &n))
|
||||
UserConfigParams::m_shadows_resolution = n;
|
||||
if (CommandLine::has("--anisotropic", &n))
|
||||
UserConfigParams::m_anisotropic = n;
|
||||
|
||||
// Useful for debugging: the temple navmesh needs 12 minutes in debug
|
||||
// mode to compute the distance matrix!!
|
||||
|
Loading…
Reference in New Issue
Block a user