Pyrogenesis  trunk
Config.h
Go to the documentation of this file.
1 /* Copyright (C) 2016 Wildfire Games.
2  * This file is part of 0 A.D.
3  *
4  * 0 A.D. is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * 0 A.D. is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef INCLUDED_PS_GAMESETUP_CONFIG
19 #define INCLUDED_PS_GAMESETUP_CONFIG
20 
21 #include "ps/CStr.h"
22 
23 
24 //-----------------------------------------------------------------------------
25 // prevent various OpenGL features from being used. this allows working
26 // around issues like buggy drivers.
27 
28 // when loading S3TC-compressed texture files, do not pass them directly to
29 // OpenGL; instead, decompress them via software to regular textures.
30 // (necessary on JW's S3 laptop graphics card -- oh, the irony)
31 extern bool g_NoGLS3TC;
32 
33 // do not ask OpenGL to create mipmaps; instead, generate them in software
34 // and upload them all manually. (potentially helpful for PT's system, where
35 // Mesa falsely reports full S3TC support but isn't able to generate mipmaps
36 // for them)
37 extern bool g_NoGLAutoMipmap;
38 
39 // don't use VBOs. (RC: that was necessary on laptop Radeon cards)
40 extern bool g_NoGLVBO;
41 
42 //-----------------------------------------------------------------------------
43 
44 // flag to pause the game on window focus loss
45 extern bool g_PauseOnFocusLoss;
46 
47 // flag to switch on actor rendering
48 extern bool g_RenderActors;
49 
50 // flag to switch on shadows
51 extern bool g_Shadows;
52 
53 // Force the use of the fixed function for rendering water.
54 extern bool g_WaterUgly;
55 // Add foam and waves near the shores, trails following ships, and other HQ things.
56 extern bool g_WaterFancyEffects;
57 // Use real depth for water rendering.
58 extern bool g_WaterRealDepth;
59 // Use a real refraction map and not transparency.
60 extern bool g_WaterRefraction;
61 // Use a real reflection map and not a skybox texture.
62 extern bool g_WaterReflection;
63 // Enable on-water shadows.
64 extern bool g_WaterShadows;
65 
66 // flag to switch on shadow PCF
67 extern bool g_ShadowPCF;
68 // flag to switch on particles rendering
69 extern bool g_Particles;
70 // flag to switch on unit silhouettes
71 extern bool g_Silhouettes;
72 // flag to switch on sky rendering
73 extern bool g_ShowSky;
74 
75 // Prefer GLSL shaders over ARB shaders
76 extern bool g_PreferGLSL;
77 // Use screen-space postprocessing filters (HDR, bloom, DOF, etc)
78 extern bool g_PostProc;
79 // Use smooth LOS interpolation
80 extern bool g_SmoothLOS;
81 
82 extern float g_Gamma;
83 // name of configured render path (depending on OpenGL extensions, this may not be
84 // the render path that is actually in use right now)
85 extern CStr g_RenderPath;
86 
87 extern int g_xres, g_yres;
88 extern float g_GuiScale;
89 extern bool g_VSync;
90 
91 extern bool g_Quickstart;
92 extern bool g_DisableAudio;
93 
94 extern CStrW g_CursorName;
95 extern const wchar_t g_DefaultCursor[];
96 
97 class CmdLineArgs;
98 extern void CONFIG_Init(const CmdLineArgs& args);
99 
100 #endif // INCLUDED_PS_GAMESETUP_CONFIG
bool g_WaterRefraction
Definition: Config.cpp:48
CStrW g_CursorName
Definition: Config.cpp:32
float g_Gamma
Definition: Config.cpp:60
bool g_RenderActors
Definition: Config.cpp:40
bool g_Shadows
Definition: Config.cpp:42
bool g_PostProc
Definition: Config.cpp:57
bool g_PauseOnFocusLoss
Definition: Config.cpp:38
bool g_NoGLVBO
Definition: Config.cpp:36
bool g_WaterReflection
Definition: Config.cpp:49
int g_xres
Definition: Config.cpp:64
bool g_VSync
Definition: Config.cpp:66
bool g_WaterUgly
Definition: Config.cpp:45
bool g_ShadowPCF
Definition: Config.cpp:43
bool g_NoGLAutoMipmap
Definition: Config.cpp:35
bool g_PreferGLSL
Definition: Config.cpp:56
const wchar_t g_DefaultCursor[]
Definition: Config.cpp:30
bool g_NoGLS3TC
Definition: Config.cpp:34
bool g_WaterRealDepth
Definition: Config.cpp:47
void CONFIG_Init(const CmdLineArgs &args)
Definition: Config.cpp:180
bool g_WaterShadows
Definition: Config.cpp:50
CStr g_RenderPath
Definition: Config.cpp:62
bool g_Quickstart
Definition: Config.cpp:68
Definition: CmdLineArgs.h:24
bool g_SmoothLOS
Definition: Config.cpp:58
bool g_DisableAudio
Definition: Config.cpp:69
bool g_ShowSky
Definition: Config.cpp:54
float g_GuiScale
Definition: Config.cpp:65
bool g_Particles
Definition: Config.cpp:52
int g_yres
Definition: Config.cpp:64
bool g_WaterFancyEffects
Definition: Config.cpp:46
bool g_Silhouettes
Definition: Config.cpp:53