Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/source/ps/GameSetup/Config.cpp
Show All 25 Lines | |||||
#include "ps/GameSetup/CmdLineArgs.h" | #include "ps/GameSetup/CmdLineArgs.h" | ||||
// (these variables are documented in the header.) | // (these variables are documented in the header.) | ||||
const wchar_t g_DefaultCursor[] = L"default-arrow"; | const wchar_t g_DefaultCursor[] = L"default-arrow"; | ||||
CStrW g_CursorName = g_DefaultCursor; | CStrW g_CursorName = g_DefaultCursor; | ||||
bool g_NoGLS3TC = false; | |||||
bool g_NoGLAutoMipmap = false; | |||||
bool g_NoGLVBO = false; | |||||
bool g_PauseOnFocusLoss = false; | bool g_PauseOnFocusLoss = false; | ||||
bool g_Shadows = false; | |||||
bool g_ShadowPCF = false; | |||||
bool g_WaterEffects = true; | |||||
bool g_WaterFancyEffects = false; | |||||
bool g_WaterRealDepth = false; | |||||
bool g_WaterRefraction = false; | |||||
bool g_WaterReflection = false; | |||||
bool g_WaterShadows = false; | |||||
bool g_Particles = false; | |||||
bool g_Fog = true; | |||||
bool g_Silhouettes = false; | |||||
bool g_ShowSky = false; | |||||
bool g_PreferGLSL = false; | |||||
bool g_PostProc = false; | |||||
bool g_SmoothLOS = false; | |||||
CStr g_RenderPath = "default"; | |||||
int g_xres, g_yres; | int g_xres, g_yres; | ||||
float g_GuiScale = 1.0f; | float g_GuiScale = 1.0f; | ||||
bool g_VSync = false; | bool g_VSync = false; | ||||
bool g_Quickstart = false; | bool g_Quickstart = false; | ||||
bool g_DisableAudio = false; | bool g_DisableAudio = false; | ||||
// flag to switch on drawing terrain overlays | // flag to switch on drawing terrain overlays | ||||
Show All 11 Lines | |||||
// config | // config | ||||
//---------------------------------------------------------------------------- | //---------------------------------------------------------------------------- | ||||
// Fill in the globals from the config files. | // Fill in the globals from the config files. | ||||
static void LoadGlobals() | static void LoadGlobals() | ||||
{ | { | ||||
CFG_GET_VAL("vsync", g_VSync); | CFG_GET_VAL("vsync", g_VSync); | ||||
CFG_GET_VAL("nos3tc", g_NoGLS3TC); | |||||
CFG_GET_VAL("noautomipmap", g_NoGLAutoMipmap); | |||||
CFG_GET_VAL("novbo", g_NoGLVBO); | |||||
CFG_GET_VAL("pauseonfocusloss", g_PauseOnFocusLoss); | CFG_GET_VAL("pauseonfocusloss", g_PauseOnFocusLoss); | ||||
CFG_GET_VAL("shadows", g_Shadows); | |||||
CFG_GET_VAL("shadowpcf", g_ShadowPCF); | |||||
CFG_GET_VAL("watereffects", g_WaterEffects); | |||||
CFG_GET_VAL("waterfancyeffects", g_WaterFancyEffects); | |||||
CFG_GET_VAL("waterrealdepth", g_WaterRealDepth); | |||||
CFG_GET_VAL("waterrefraction", g_WaterRefraction); | |||||
CFG_GET_VAL("waterreflection", g_WaterReflection); | |||||
CFG_GET_VAL("watershadows", g_WaterShadows); | |||||
CFG_GET_VAL("renderpath", g_RenderPath); | |||||
CFG_GET_VAL("particles", g_Particles); | |||||
CFG_GET_VAL("fog", g_Fog); | |||||
CFG_GET_VAL("silhouettes", g_Silhouettes); | |||||
CFG_GET_VAL("showsky", g_ShowSky); | |||||
CFG_GET_VAL("preferglsl", g_PreferGLSL); | |||||
CFG_GET_VAL("postproc", g_PostProc); | |||||
CFG_GET_VAL("smoothlos", g_SmoothLOS); | |||||
CFG_GET_VAL("gui.scale", g_GuiScale); | CFG_GET_VAL("gui.scale", g_GuiScale); | ||||
} | } | ||||
static void ProcessCommandLineArgs(const CmdLineArgs& args) | static void ProcessCommandLineArgs(const CmdLineArgs& args) | ||||
{ | { | ||||
// TODO: all these options (and the ones processed elsewhere) should | // TODO: all these options (and the ones processed elsewhere) should | ||||
// be documented somewhere for users. | // be documented somewhere for users. | ||||
▲ Show 20 Lines • Show All 84 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator