![]() |
CRM64Pro GDK v0.13.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 [v25.11.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 × 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::Screen::info (Sint32 iMode=0) |
| Request screen object information. | |
| Sint32 | CRM64Pro::Screen::getName (string &sName) |
| Get the name. | |
| Uint32 | CRM64Pro::Screen::getID () |
| Get the ID. | |
| Sint32 | CRM64Pro::Screen::show () |
| Show the screen. | |
| Sint32 | CRM64Pro::Screen::hide () |
| Hide the screen. | |
| Sint32 | CRM64Pro::Screen::status () |
| Get the screen status. | |
| Sint32 | CRM64Pro::Screen::setIcon (SDL_Surface *suIcon) |
| Set an icon. | |
| Sint32 | CRM64Pro::Screen::setDriver (eConfigRendererDriver eCRD) |
| Set the renderer driver. | |
| eConfigRendererDriver | CRM64Pro::Screen::getDriver () const |
| Get the renderer driver. | |
| eConfigRendererDriver | CRM64Pro::Screen::getDriverInUse () const |
| Get the renderer driver in use. | |
| Sint32 | CRM64Pro::Screen::setVSync (Uint32 bFlag) |
| Set the VSync mode. | |
| Uint32 | CRM64Pro::Screen::getVSync () const |
| Get current VSync mode. | |
| Sint32 | CRM64Pro::Screen::setMode (eConfigScreenMode eCSM) |
| Set the screen mode. | |
| eConfigScreenMode | CRM64Pro::Screen::getMode () const |
| Get the screen mode. | |
| Sint32 | CRM64Pro::Screen::setSize (Sint32 iWidth, Sint32 iHeight) |
| Set the size of the screen. | |
| Sint32 | CRM64Pro::Screen::getSize (Sint32 *iWidth, Sint32 *iHeight) |
| Get the size of the screen. | |
| Sint32 | CRM64Pro::Screen::setLogicalPresentation (Sint32 iWidth, Sint32 iHeight, SDL_RendererLogicalPresentation eSDL_RLP=SDL_LOGICAL_PRESENTATION_DISABLED) |
| Set the logical presentation size of the screen. | |
| Sint32 | CRM64Pro::Screen::getLogicalPresentation (Sint32 *iWidth=nullptr, Sint32 *iHeight=nullptr, SDL_RendererLogicalPresentation *eSDL_RLP=nullptr) const |
| Get the logical presentation size of the screen. | |
| Sint32 | CRM64Pro::Screen::setPosition (Sint32 iX, Sint32 iY) |
| Set the position. | |
| Sint32 | CRM64Pro::Screen::getPosition (Sint32 *iX, Sint32 *iY) |
| Get the position. | |
| Sint32 | CRM64Pro::Screen::setClipRect (SDL_Rect *rClip) |
| Set clipping rect. | |
| Sint32 | CRM64Pro::Screen::getClipRect (SDL_Rect *rClip) |
| Get clipping rect. | |
| Sint32 | CRM64Pro::Screen::setTitle (const string &sName) |
| Set the title. | |
| Sint32 | CRM64Pro::Screen::getTitle (string &sName) |
| Get the title. | |
| Sint32 | CRM64Pro::Screen::setBorder (Uint32 bFlag) |
| Set the border for the screen. | |
| Uint32 | CRM64Pro::Screen::getBorder () const |
| Get the border for the screen. | |
| SDL_Window * | CRM64Pro::Screen::getWindow () |
| Get the SDL_Window associated to this screen. | |
| SDL_Renderer * | CRM64Pro::Screen::getRenderer () |
| Get the SDL_Renderer associated to this screen. | |
| SDL_Surface * | CRM64Pro::Screen::getSnapshot () |
| Get a SDL_Surface with a screen snapshot. | |
| Sint32 | CRM64Pro::Screen::getSnapshot (const string &sFile) |
| Save the screen snapshot to an external PNG file. | |
| Sint32 | CRM64Pro::Screen::clear (Uint8 iR=0, Uint8 iG=0, Uint8 iB=0, Uint8 iA=255) |
| Clear the screen. | |
| Sint32 | CRM64Pro::Screen::setRenderCallback (Sint32(*myRenderFunc)(Sint32 iMode, void *pObj), void *pObj=nullptr) |
| Set a callback function for rendering your graphics at Render Frame Rate. | |
| Sint32 | CRM64Pro::Screen::fadeToColor (Uint8 iR, Uint8 iG, Uint8 iB, Sint32 iTime, SDL_FRect *rDst=nullptr) |
| Perform a fade effect of this screen to the given color. | |
| Sint32 | CRM64Pro::Screen::fadeToImage (Sint32 idImage, Sint32 iTime, SDL_FRect *rDst=nullptr, SDL_FRect *rSrc=nullptr) |
| Perform a fade effect of this screen to the given Image handler. | |
| Sint32 | CRM64Pro::ConfigMgr::info (Sint32 iMode=0) |
| Request Configuration Manager information. | |
| Sint32 | CRM64Pro::ConfigMgr::audioInit (eAudioFreq eAF=AF_DEFAULT, eAudioSample eAS=AS_DEFAULT, eAudioMode eAM=AM_DEFAULT) |
| Initialize the audio system. | |
| Sint32 | CRM64Pro::ConfigMgr::audioStatus (eAudioFreq *eAF=nullptr, eAudioSample *eAS=nullptr, eAudioMode *eAM=nullptr) |
| Check audio system status. | |
| Sint32 | CRM64Pro::ConfigMgr::audioClose () |
| Close the audio system. | |
| Sint32 | CRM64Pro::ConfigMgr::audioSetDriver (eConfigAudioDriver eCAD) |
| Set the audio driver. | |
| eConfigAudioDriver | CRM64Pro::ConfigMgr::audioGetDriver () const |
| Get the audio driver. | |
| const char * | CRM64Pro::ConfigMgr::audioGetDriverInUse () const |
| Get the audio driver name in use. | |
| Sint32 | CRM64Pro::ConfigMgr::audioSetMasterGain (float fGain) |
| Set Master gain (Volume). | |
| float | CRM64Pro::ConfigMgr::audioGetMasterGain () const |
| Get Master gain (Volume). | |
| Sint32 | CRM64Pro::ConfigMgr::audioSetTagGain (eAudioTrackTag eTag, float fGain) |
| Set Gain (Volume) for a specific audio track tag category. | |
| float | CRM64Pro::ConfigMgr::audioGetTagGain (eAudioTrackTag eTag) const |
| Get the current gain for a specific audio track tag category. | |
| MIX_Mixer * | CRM64Pro::ConfigMgr::audioGetMixer () const |
| Get the internal SDL3 Mixer Device handle. | |
| Sint32 | CRM64Pro::ConfigMgr::create (const string &sName, Uint32 iUnused=0) |
| Create a new screen. | |
| Sint32 | CRM64Pro::ConfigMgr::close (Sint32 idScreen) |
| Close and destroy a screen. | |
| Sint32 | CRM64Pro::ConfigMgr::getNum () const |
| Get number of loaded objects. | |
| Sint32 | CRM64Pro::ConfigMgr::setName (Sint32 idScreen, const string &sName) |
| Change the object name. | |
| void | CRM64Pro::ConfigMgr::reset (Sint32 iMode=0) |
| Set all default values, close audio system, remove all existing screens and create the "default" screen. | |
| Screen * | CRM64Pro::ConfigMgr::get (Sint32 idScreen=0) |
| Get a pointer to the screen using its handle. | |
| Screen * | CRM64Pro::ConfigMgr::get (SDL_Window *wScreen) |
| Get a pointer to the screen using a SDL_Window pointer. | |
| Sint32 | CRM64Pro::ConfigMgr::save (const string &sConfigXML, const string &sCDC="") |
| Save current audio/screens configuration. | |
| Sint32 | CRM64Pro::ConfigMgr::load (const string &sConfigXML, const string &sCDC="") |
| Load audio/screen configuration. | |
| 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::Screen::info | ( | Sint32 | iMode = 0 | ) |
Request screen object information.
Writes screen information to the default log.
| iMode | unused for the time being. |
| Sint32 CRM64Pro::Screen::getName | ( | string & | sName | ) |
Get the name.
| sName | a string reference filled in with the screen name. |
| Uint32 CRM64Pro::Screen::getID | ( | ) |
Get the ID.
| Sint32 CRM64Pro::Screen::show | ( | ) |
Show the screen.
Makes the associated window visible. If the screen was not previously shown, it creates all required internal attributes and initializes the screen. If the screen was hidden, it is shown again without altering existing attributes.
| Sint32 CRM64Pro::Screen::hide | ( | ) |
Hide the screen.
When hidden, the associated window is hidden but all attributes are kept. The screen can be shown again using show() or closed using ConfigMgr::close().
| Sint32 CRM64Pro::Screen::status | ( | ) |
Get the screen status.
| Sint32 CRM64Pro::Screen::setIcon | ( | SDL_Surface * | suIcon | ) |
Set an icon.
Sets the window icon. Once called, you can free the used surface as it is no longer needed. The screen can be initialized or not when calling this method.
| suIcon | SDL_Surface pointer with the icon. |
| Sint32 CRM64Pro::Screen::setDriver | ( | eConfigRendererDriver | eCRD | ) |
Set the renderer driver.
| eCRD | screen renderer driver. Check ::eConfigRendererDriver enum for details. |
| eConfigRendererDriver CRM64Pro::Screen::getDriver | ( | ) | const |
Get the renderer driver.
Returns the renderer driver set by default or by setDriver() method. Note that it could differ from the actual driver in use. For example, CRD_DEFAULT may resolve to CRD_SOFTWARE, CRD_OPENGL, etc. Use getDriverInUse() to get the actual driver in use.
| eConfigRendererDriver CRM64Pro::Screen::getDriverInUse | ( | ) | const |
Get the renderer driver in use.
Returns the renderer driver currently in use. The screen must be initialized. Use getDriver() to get the driver set by default or by setDriver().
| Sint32 CRM64Pro::Screen::setVSync | ( | Uint32 | bFlag | ) |
Set the VSync mode.
Enabling VSync synchronizes screen rendering with the monitor refresh rate. Additionally, enabling it limits the maximum Render Frame Rate. See Timer::setRate() for details.
| bFlag | 0 to disable, 1 to enable. Common monitor refresh rates are 60, 70, 75, 120 or 155. |
| Uint32 CRM64Pro::Screen::getVSync | ( | ) | const |
Get current VSync mode.
| Sint32 CRM64Pro::Screen::setMode | ( | eConfigScreenMode | eCSM | ) |
Set the screen mode.
| eCSM | screen mode. Check ::eConfigScreenMode enum for details. |
| eConfigScreenMode CRM64Pro::Screen::getMode | ( | ) | const |
Get the screen mode.
| Sint32 CRM64Pro::Screen::setSize | ( | Sint32 | iWidth, |
| Sint32 | iHeight ) |
Set the size of the screen.
| iWidth | screen width. |
| iHeight | screen height. |
| Sint32 CRM64Pro::Screen::getSize | ( | Sint32 * | iWidth, |
| Sint32 * | iHeight ) |
Get the size of the screen.
Returns the size of the screen's client area.
| iWidth | an integer pointer filled in with screen width. If nullptr, this value is not retrieved. |
| iHeight | an integer pointer filled in with screen height. If nullptr, this value is not retrieved. |
| Sint32 CRM64Pro::Screen::setLogicalPresentation | ( | Sint32 | iWidth, |
| Sint32 | iHeight, | ||
| SDL_RendererLogicalPresentation | eSDL_RLP = SDL_LOGICAL_PRESENTATION_DISABLED ) |
Set the logical presentation size of the screen.
Allows a device independent resolution rendering.
| iWidth | logical presentation width. A negative value for not modifying this value. |
| iHeight | logical presentation height. A negative value for not modifying this value. |
| eSDL_RLP | set the logical presentation mode. Check SDL_RendererLogicalPresentation for further information. By default, it is set to SDL_LOGICAL_PRESENTATION_DISABLED. |
| Sint32 CRM64Pro::Screen::getLogicalPresentation | ( | Sint32 * | iWidth = nullptr, |
| Sint32 * | iHeight = nullptr, | ||
| SDL_RendererLogicalPresentation * | eSDL_RLP = nullptr ) const |
Get the logical presentation size of the screen.
Returns the logical presentation size and mode for this screen.
| iWidth | an integer pointer filled in with logical presentation width. If nullptr, this value is not retrieved. |
| iHeight | an integer pointer filled in with logical presentation height. If nullptr, this value is not retrieved. |
| eSDL_RLP | a SDL_RendererLogicalPresentation enum pointer filled in with the logical presentation mode. If nullptr, this value is not retrieved. |
| Sint32 CRM64Pro::Screen::setPosition | ( | Sint32 | iX, |
| Sint32 | iY ) |
Set the position.
| iX | screen X position. |
| iY | screen Y position. |
| Sint32 CRM64Pro::Screen::getPosition | ( | Sint32 * | iX, |
| Sint32 * | iY ) |
Get the position.
Returns the position of a screen.
| iX | a pointer filled in with screen X position. If nullptr, this value is not retrieved. |
| iY | a pointer filled in with screen Y position. If nullptr, this value is not retrieved. |
| Sint32 CRM64Pro::Screen::setClipRect | ( | SDL_Rect * | rClip | ) |
Set clipping rect.
| rClip | pointer to SDL_Rect structure with the clipping area, or nullptr to disable clipping. |
| Sint32 CRM64Pro::Screen::getClipRect | ( | SDL_Rect * | rClip | ) |
Get clipping rect.
| rClip | pointer to SDL_Rect structure filled in with current clipping area when clipping is enabled. |
| Sint32 CRM64Pro::Screen::setTitle | ( | const string & | sName | ) |
Set the title.
Sets the window title. The screen can be initialized or not when calling this method.
| sName | title for the screen. |
| Sint32 CRM64Pro::Screen::getTitle | ( | string & | sName | ) |
Get the title.
| sName | a string reference filled in with the window title. |
| Sint32 CRM64Pro::Screen::setBorder | ( | Uint32 | bFlag | ) |
Set the border for the screen.
The screen border is only visible on ::CSM_WINDOW mode so it only has effect on this mode.
| bFlag | 0 for disabling and 1 for enabling it. |
| Uint32 CRM64Pro::Screen::getBorder | ( | ) | const |
Get the border for the screen.
| SDL_Window * CRM64Pro::Screen::getWindow | ( | ) |
Get the SDL_Window associated to this screen.
| SDL_Renderer * CRM64Pro::Screen::getRenderer | ( | ) |
Get the SDL_Renderer associated to this screen.
| SDL_Surface * CRM64Pro::Screen::getSnapshot | ( | ) |
Get a SDL_Surface with a screen snapshot.
| Sint32 CRM64Pro::Screen::getSnapshot | ( | const string & | sFile | ) |
Save the screen snapshot to an external PNG file.
| sFile | string containing the [directory]+filename+[extension]. |
| Sint32 CRM64Pro::Screen::clear | ( | Uint8 | iR = 0, |
| Uint8 | iG = 0, | ||
| Uint8 | iB = 0, | ||
| Uint8 | iA = 255 ) |
Clear the screen.
| iR | The red color value. Default is 0. |
| iG | The green color value. Default is 0. |
| iB | The blue color value. Default is 0. |
| iA | The alpha value. Default is 255. |
| Sint32 CRM64Pro::Screen::setRenderCallback | ( | Sint32(* | myRenderFunc )(Sint32 iMode, void *pObj), |
| void * | pObj = nullptr ) |
Set a callback function for rendering your graphics at Render Frame Rate.
| myRenderFunc | pointer to your graphics rendering function or nullptr to remove current assigned function. The iMode parameter of the callback is set to 1 right after a Logic Frame update. |
| pObj | pointer to user data passed to the callback function. By default nullptr. |
| Sint32 CRM64Pro::Screen::fadeToColor | ( | Uint8 | iR, |
| Uint8 | iG, | ||
| Uint8 | iB, | ||
| Sint32 | iTime, | ||
| SDL_FRect * | rDst = nullptr ) |
Perform a fade effect of this screen to the given color.
| iR | The red color value. |
| iG | The green color value. |
| iB | The blue color value. |
| iTime | duration in milliseconds (minimum 50ms, maximum 10000ms). |
| rDst | the destination SDL_FRect structure or nullptr for whole screen (default). |
| Sint32 CRM64Pro::Screen::fadeToImage | ( | Sint32 | idImage, |
| Sint32 | iTime, | ||
| SDL_FRect * | rDst = nullptr, | ||
| SDL_FRect * | rSrc = nullptr ) |
Perform a fade effect of this screen to the given Image handler.
| idImage | Image handler. |
| iTime | duration in milliseconds (minimum 50ms, maximum 10000ms). |
| rDst | the destination SDL_FRect structure or nullptr for whole screen (default). |
| rSrc | the image source SDL_FRect structure or nullptr for whole image (default). |
| Sint32 CRM64Pro::ConfigMgr::info | ( | Sint32 | iMode = 0 | ) |
Request Configuration Manager information.
Writes manager information to the default log. Displays: general settings (multithread friendly flag), graphics information (displays, renderer drivers, screens), and audio information (devices, drivers, output).
| iMode | -1 to display only manager information. 0 (default) to display manager plus all objects. A Screen id to display manager and that Screen. |
| Sint32 CRM64Pro::ConfigMgr::audioInit | ( | eAudioFreq | eAF = AF_DEFAULT, |
| eAudioSample | eAS = AS_DEFAULT, | ||
| eAudioMode | eAM = AM_DEFAULT ) |
Initialize the audio system.
If the audio system is already initialized, this method closes it and reopens with new parameters.
| eAF | Audio frequency. Check ::eAudioFreq enum for details. |
| eAS | Audio sampling. Check ::eAudioSample enum for details. |
| eAM | Audio mode. Check ::eAudioMode enum for details. |
| Sint32 CRM64Pro::ConfigMgr::audioStatus | ( | eAudioFreq * | eAF = nullptr, |
| eAudioSample * | eAS = nullptr, | ||
| eAudioMode * | eAM = nullptr ) |
Check audio system status.
| eAF | ::eAudioFreq enum pointer filled in with audio frequency. If nullptr (default), this value is not retrieved. |
| eAS | ::eAudioSample enum pointer filled in with audio sampling. If nullptr (default), this value is not retrieved. |
| eAM | ::eAudioMode enum pointer filled in with audio mode. If nullptr (default), this value is not retrieved. |
| Sint32 CRM64Pro::ConfigMgr::audioClose | ( | ) |
Close the audio system.
Recommended to call at the very end of your application, after closing all resources and before Main::Terminate(). If not called, it will be automatically called on Main::Terminate().
| Sint32 CRM64Pro::ConfigMgr::audioSetDriver | ( | eConfigAudioDriver | eCAD | ) |
Set the audio driver.
| eCAD | audio driver. Check ::eConfigAudioDriver enum for further information. |
| eConfigAudioDriver CRM64Pro::ConfigMgr::audioGetDriver | ( | ) | const |
Get the audio driver.
Returns the audio driver set by default or by audioSetDriver() method. Note that it could differ from the driver in use. Use audioGetDriverInUse() to get the actual driver.
| const char * CRM64Pro::ConfigMgr::audioGetDriverInUse | ( | ) | const |
Get the audio driver name in use.
Returns the audio driver name in use (e.g., "wasapi", "directsound", "pulseaudio"). The audio must be initialized.
| Sint32 CRM64Pro::ConfigMgr::audioSetMasterGain | ( | float | fGain | ) |
Set Master gain (Volume).
Sets the global volume for the mixer device.
| fGain | Volume float (0.0f to 2.0f). 1.0f is nominal. |
| float CRM64Pro::ConfigMgr::audioGetMasterGain | ( | ) | const |
Get Master gain (Volume).
| Sint32 CRM64Pro::ConfigMgr::audioSetTagGain | ( | eAudioTrackTag | eTag, |
| float | fGain ) |
Set Gain (Volume) for a specific audio track tag category.
Updates the stored volume for the tag category and immediately updates all active tracks of that type.
| eTag | The tag category to update (Music, SFX, etc). |
| fGain | Volume (0.0f - 2.0f). 1.0f is nominal. |
| float CRM64Pro::ConfigMgr::audioGetTagGain | ( | eAudioTrackTag | eTag | ) | const |
Get the current gain for a specific audio track tag category.
Retrieves the stored volume multiplier for the given tag.
| eTag | The tag category to query (Music, SFX, etc). |
| MIX_Mixer * CRM64Pro::ConfigMgr::audioGetMixer | ( | ) | const |
Get the internal SDL3 Mixer Device handle.
Returns the raw pointer to the initialized MIX_Mixer device. This is primarily used internally by AudioTrackMgr to create tracks.
| Sint32 CRM64Pro::ConfigMgr::create | ( | const string & | sName, |
| Uint32 | iUnused = 0 ) |
Create a new screen.
| sName | the name to give to the screen object (e.g. 'myScreen'). The object name must be unique with a maximum of 64 characters or will be truncated. |
| iUnused | unused for the time being. |
| Sint32 CRM64Pro::ConfigMgr::close | ( | Sint32 | idScreen | ) |
Close and destroy a screen.
| idScreen | 0 for closing all screens or the Screen id. This removes the screen and all associated resources (SDL window, SDL renderer, etc.). Additionally, it informs ImageMgr to remove all textures created for the screen. |
| Sint32 CRM64Pro::ConfigMgr::getNum | ( | ) | const |
Get number of loaded objects.
| Sint32 CRM64Pro::ConfigMgr::setName | ( | Sint32 | idScreen, |
| const string & | sName ) |
Change the object name.
| idScreen | Screen id. |
| sName | the name to give to the screen object (e.g. 'myScreen'). The object name must be unique with a maximum of 64 characters or will be truncated. |
| void CRM64Pro::ConfigMgr::reset | ( | Sint32 | iMode = 0 | ) |
Set all default values, close audio system, remove all existing screens and create the "default" screen.
| iMode | 0 for resetting general, audio and screen values or 1 for resetting only the screen values. |
| Screen * CRM64Pro::ConfigMgr::get | ( | Sint32 | idScreen = 0 | ) |
Get a pointer to the screen using its handle.
| idScreen | Screen id. By default, selects the default screen. |
| Screen * CRM64Pro::ConfigMgr::get | ( | SDL_Window * | wScreen | ) |
Get a pointer to the screen using a SDL_Window pointer.
| wScreen | SDL_Window pointer. |
| Sint32 CRM64Pro::ConfigMgr::save | ( | const string & | sConfigXML, |
| const string & | sCDC = "" ) |
Save current audio/screens configuration.
| sConfigXML | string containing the [directory]+filename+[extension] of the config XML file. Directory separators '\' and '/' are supported. |
| sCDC | string containing the [directory]+filename+[extension] of a CDC file where the config XML will be saved. Optional. |
| Sint32 CRM64Pro::ConfigMgr::load | ( | const string & | sConfigXML, |
| const string & | sCDC = "" ) |
Load audio/screen configuration.
| sConfigXML | string containing the [directory]+filename+[extension] of the config XML file. Directory separators '\' and '/' are supported. |
| sCDC | string containing the [directory]+filename+[extension] of a CDC file that contains the config XML file. Optional. |
| 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. |