![]() |
CRM64Pro GDK v0.14.0
A free cross-platform game development kit built on top of SDL 3.0
|
Configuration Manager and Screen objects for general, audio and video settings [v26.01.0].
The Config module provides centralized management for all GDK configuration settings. It handles general behavior options, audio system parameters, and video/screen management. The module also provides methods for saving and loading the complete configuration state to/from external files.
| General | Core behavior settings affecting the overall GDK operation |
|---|---|
| Audio | Audio system initialization, driver selection, sampling, frequency, channels and volume |
| Video | Screen management including window properties, renderer settings and display options |
The ConfigMgr automatically applies the following default values:
General settings
| iMTFriendly | 0 (disabled) |
|---|
Audio settings
| Audio.bInit | false (disabled) |
|---|---|
| Audio.iDriver | 0 (use default audio driver) |
| Audio.eAS | AS_16 (16 bit sampling) |
| Audio.eAF | AF_NORMAL (22050Hz) |
| Audio.eAM | AM_STEREO |
| Audio.fMasterGain | 1.0 (range: 0.0 to 2.0) |
| Audio.fMusicGain | 1.0 (range: 0.0 to 2.0) |
| Audio.fSFXGain | 1.0 (range: 0.0 to 2.0) |
| Audio.fVoiceGain | 1.0 (range: 0.0 to 2.0) |
| Audio.fCustomGain | 1.0 (range: 0.0 to 2.0) |
Default screen settings
| Driver | CRD_DEFAULT (use default renderer driver) |
|---|---|
| Width x Height | 800 x 600 |
| Logical presentation size | 800 x 600 |
| Position | SDL_WINDOWPOS_UNDEFINED |
| Name | CRM64Pro GDK Application |
| Window flags | SDL_WINDOW_SHOWN |
| Window border | 1 (show window border) |
| Vertical sync | 0 (disabled) |
| Icon | default GDK icon |
| Clip region | no clip region set |
| Logical presentation mode | disabled |
| Logical presentation quality | nearest pixel sampling |
This is a standard manager: objects are not shared and must be unique using its name as the key. You cannot create an object with the same name as another one already created.
Classes | |
| class | CRM64Pro::Screen |
| Screen Object class. More... | |
| class | CRM64Pro::ConfigMgr |
| Config Manager class. More... | |
Functions | |
| Sint32 | CRM64Pro::ConfigMgr::save (const string &sConfigXML, const string &sCDCFile="") |
| Save current audio/screens configuration. | |
| Sint32 | CRM64Pro::ConfigMgr::loadFromFile (const string &sConfigXML) |
| Load audio/screen configuration from a file. | |
| Sint32 | CRM64Pro::ConfigMgr::load (const string &sCDCFile, const string &sConfigXML) |
| Load audio/screen configuration from a CDC file. | |
| Sint32 | CRM64Pro::ConfigMgr::load (const Sint32 idCDC, const string &sConfigXML) |
| Load audio/screen configuration from a CDC file. | |
| Sint32 | CRM64Pro::ConfigMgr::setup (const string &sConfigXML, Sint32 idConfigCDC, const string &sCustomSetupXML="") |
| Open the setup window for configuring audio/screen settings. | |
| Sint32 | CRM64Pro::ConfigMgr::setup (const string &sConfigXML, const string &sConfigCDC="", const string &sCustomSetupXML="") |
| Open the setup window for configuring audio/screen settings. | |
Audio drivers.
| enum CRM64Pro::eAudioFreq |
| enum CRM64Pro::eAudioMode |
Screen renderer drivers.
| Enumerator | |
|---|---|
| CRD_DEFAULT | Screen::setDriver(): use the default renderer driver (default value). |
| CRD_SOFTWARE | Screen::setDriver(): software renderer driver. Slow but works on all platforms. |
| CRD_OPENGL | Screen::setDriver(): OpenGL renderer. Supported on Win64/Linux/macOS. |
| CRD_OPENGLES2 | Screen::setDriver(): OpenGL ES v2.0 renderer. Supported on Android/iOS. |
| CRD_VULKAN | Screen::setDriver(): Vulkan renderer. Supported on Win64/Linux/macOS. |
| CRD_DIRECT3D | Screen::setDriver(): Direct3D v9 renderer. Win64 only. |
| CRD_DIRECT3D11 | Screen::setDriver(): Direct3D v11 renderer. Win64 only (Windows 8+). |
| CRD_DIRECT3D12 | Screen::setDriver(): Direct3D v12 renderer. Win64 only (Windows 10+). |
| CRD_X11 | Screen::setDriver(): X11 renderer. Linux only. |
| CRD_METAL | Screen::setDriver(): Metal renderer. macOS only. |
| CRD_GPU3D | Screen::setDriver(): GPU 3D renderer. Supported on Win64/Linux/macOS. |
| CRD_ERROR | Returned by Screen::getDriver() on error. |
Screen modes.
| Enumerator | |
|---|---|
| CSM_WINDOW | Screen::setMode(): windowed mode (default). |
| CSM_FULLSCREEN | Screen::setMode(): fullscreen window that matches desktop size. Recommended fullscreen mode. |
| CSM_FULLSCREENEXCLUSIVE | Screen::setMode(): exclusive fullscreen that switches the monitor mode to the closest match for the requested resolution. |
| Sint32 CRM64Pro::ConfigMgr::save | ( | const string & | sConfigXML, |
| const string & | sCDCFile = "" ) |
Save current audio/screens configuration.
| sConfigXML | string containing the [directory]+filename+[extension] of the config XML file. Directory separators '\' and '/' are supported. |
| sCDCFile | string containing the [directory]+filename+[extension] of a CDC file where the config XML will be saved. Optional. |
| Sint32 CRM64Pro::ConfigMgr::loadFromFile | ( | const string & | sConfigXML | ) |
Load audio/screen configuration from a file.
| sConfigXML | string containing the [directory]+filename+[extension] of the config XML file. Directory separators '\' and '/' are supported. |
| Sint32 CRM64Pro::ConfigMgr::load | ( | const string & | sCDCFile, |
| const string & | sConfigXML ) |
Load audio/screen configuration from a CDC file.
| sCDCFile | string containing the [directory]+filename+[extension] of a CDC file that contains the config XML file. |
| sConfigXML | string containing the name of the config XML file. |
| Sint32 CRM64Pro::ConfigMgr::load | ( | const Sint32 | idCDC, |
| const string & | sConfigXML ) |
Load audio/screen configuration from a CDC file.
| idCDC | CDC id of an open CDC file that contains the config XML file. |
| sConfigXML | string containing the name of the config XML file. |
| Sint32 CRM64Pro::ConfigMgr::setup | ( | const string & | sConfigXML, |
| Sint32 | idConfigCDC, | ||
| const string & | sCustomSetupXML = "" ) |
Open the setup window for configuring audio/screen settings.
| sConfigXML | string containing the name of the config XML file. |
| idConfigCDC | id of an open CDC file that contains the config XML and custom setup XML files. Using id instead of CDC name allows opening secured CDC files. |
| sCustomSetupXML | string containing the name of the custom setup XML file. Optional. |
| Sint32 CRM64Pro::ConfigMgr::setup | ( | const string & | sConfigXML, |
| const string & | sConfigCDC = "", | ||
| const string & | sCustomSetupXML = "" ) |
Open the setup window for configuring audio/screen settings.
| sConfigXML | string containing the name of the config XML file. |
| sConfigCDC | string containing the [directory]+filename+[extension] of a CDC file that contains the config and custom setup XML files. Directory separators '\' and '/' are supported. |
| sCustomSetupXML | string containing the name of the custom setup XML file. Optional. |