Settings manager.
More...
#include <SageSettings.h>
|
| void | Load () |
| | Load game settings.
|
| |
|
| void | SetWinSize (int, int) |
| | Set window size information.
|
| |
|
|
static tinyxml2::XMLElement * | m_pXmlSettings = nullptr |
| | Pointer to the settings tag in the XML settings file.
|
| |
|
static float | m_fAspectRatio = 1.0f |
| | Aspect ratio, width/ht.
|
| |
|
static char | m_szName [MAX_PATH] |
| | Name of this game.
|
| |
|
static int | m_nWinWidth = 0 |
| | Window width in pixels.
|
| |
|
static int | m_nWinHeight = 0 |
| | Window height in pixels.
|
| |
|
static Vector2 | m_vWinCenter = Vector2::Zero |
| | Window center.
|
| |
|
|
tinyxml2::XMLDocument | m_xmlDoc |
| | TinyXML2 document.
|
| |
This class provides access to the game settings from file gamesettings.xml. TinyXML2 is my preferred XML file parser, not the one provided by Microsoft.
◆ Load()
| void CSettingsManager::Load |
( |
| ) |
|
Load settings from a fixed settings file, gamesettings.xml.
◆ SetWinSize()
| void CSettingsManager::SetWinSize |
( |
int | w, |
|
|
int | h ) |
|
protected |
Store the window's width and height, and compute and store the aspect ratio and the position of the window center (ie. half its width and half its height).
- Parameters
-
| w | Window client area width in pixels. |
| h | Window client area height in pixels. |