Changeset View
Changeset View
Standalone View
Standalone View
source/ps/GameSetup/Config.cpp
Show All 18 Lines | |||||
#include "Config.h" | #include "Config.h" | ||||
#include "lib/timer.h" | #include "lib/timer.h" | ||||
#include "ps/CConsole.h" | #include "ps/CConsole.h" | ||||
#include "ps/CLogger.h" | #include "ps/CLogger.h" | ||||
#include "ps/ConfigDB.h" | #include "ps/ConfigDB.h" | ||||
#include "ps/GameSetup/CmdLineArgs.h" | #include "ps/GameSetup/CmdLineArgs.h" | ||||
#include "ps/ScreenSize.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_NoGLS3TC = false; | ||||
Show All 22 Lines | |||||
bool g_PreferGLSL = false; | bool g_PreferGLSL = false; | ||||
bool g_PostProc = false; | bool g_PostProc = false; | ||||
bool g_SmoothLOS = false; | bool g_SmoothLOS = false; | ||||
float g_Gamma = 1.0f; | float g_Gamma = 1.0f; | ||||
CStr g_RenderPath = "default"; | CStr g_RenderPath = "default"; | ||||
int g_xres, g_yres; | |||||
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 | ||||
bool g_ShowPathfindingOverlay = false; | bool g_ShowPathfindingOverlay = false; | ||||
Show All 32 Lines | static void LoadGlobals() | ||||
CFG_GET_VAL("renderpath", g_RenderPath); | CFG_GET_VAL("renderpath", g_RenderPath); | ||||
CFG_GET_VAL("particles", g_Particles); | CFG_GET_VAL("particles", g_Particles); | ||||
CFG_GET_VAL("fog", g_Fog); | CFG_GET_VAL("fog", g_Fog); | ||||
CFG_GET_VAL("silhouettes", g_Silhouettes); | CFG_GET_VAL("silhouettes", g_Silhouettes); | ||||
CFG_GET_VAL("showsky", g_ShowSky); | CFG_GET_VAL("showsky", g_ShowSky); | ||||
CFG_GET_VAL("preferglsl", g_PreferGLSL); | CFG_GET_VAL("preferglsl", g_PreferGLSL); | ||||
CFG_GET_VAL("postproc", g_PostProc); | CFG_GET_VAL("postproc", g_PostProc); | ||||
CFG_GET_VAL("smoothlos", g_SmoothLOS); | CFG_GET_VAL("smoothlos", g_SmoothLOS); | ||||
CFG_GET_VAL("gui.scale", g_GuiScale); | float scale; | ||||
CFG_GET_VAL("gui.scale", scale); | |||||
g_ScreenSize.SetGuiScale(scale); | |||||
CFG_GET_VAL("renderer.resolution", scale); | |||||
g_ScreenSize.SetRendererScale(1.0f / scale); | |||||
} | } | ||||
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 90 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator