Public Member Functions | |
AssetManager (SDL_Renderer *playfield, SDL_Renderer *backglass, SDL_Renderer *dmd, SDL_Renderer *topper, TTF_Font *f, ISoundManager *soundManager) | |
SDL_Texture * | getPlayfieldTexture () override |
Retrieves the texture used for the playfield. | |
SDL_Texture * | getWheelTexture (SDL_Renderer *renderer) override |
Retrieves the texture used for the wheel for a specific renderer. | |
SDL_Texture * | getBackglassTexture () override |
Retrieves the texture used for the backglass. | |
SDL_Texture * | getDmdTexture () override |
Retrieves the texture used for the dot matrix display (DMD). | |
SDL_Texture * | getTopperTexture () override |
Retrieves the texture used for the topper display. | |
SDL_Texture * | getTitleTexture (SDL_Renderer *renderer) override |
Retrieves the texture used for the title for a specific renderer. | |
IVideoPlayer * | getPlayfieldVideoPlayer () override |
Retrieves the video player associated with the playfield. | |
IVideoPlayer * | getBackglassVideoPlayer () override |
Retrieves the video player associated with the backglass. | |
IVideoPlayer * | getDmdVideoPlayer () override |
Retrieves the video player associated with the dot matrix display (DMD). | |
IVideoPlayer * | getTopperVideoPlayer () override |
Retrieves the video player associated with the topper display. | |
IConfigService * | getSettingsManager () override |
Retrieves the configuration service that manages application settings. | |
SDL_Rect | getTitleRect () override |
Retrieves the rectangle that specifies the title's position and dimensions (x, y, width, height). | |
void | setTitlePosition (int x, int y) override |
Sets the title's position on the display. | |
void | setFont (TTF_Font *font) override |
Sets the current font for text rendering. | |
void | reloadTitleTexture (const std::string &title, SDL_Color color, SDL_Rect &titleRect) override |
Reloads the title texture using a new title string and color, updating the title rectangle accordingly. | |
void | reloadAssets (IWindowManager *windowManager, TTF_Font *font, const std::vector< TableData > &tables, size_t index) override |
Reloads all relevant assets with updated settings, fonts, and table data. | |
void | setSettingsManager (IConfigService *cm) override |
Sets the configuration service (settings manager) responsible for application settings. | |
void | loadTableAssets (size_t index, const std::vector< TableData > &tables) override |
Loads assets for a specific table based on its index and associated table data. | |
void | clearOldVideoPlayers () override |
Clears any existing video players to free resources before initializing new ones. | |
void | cleanupVideoPlayers () override |
Cleans up video players, releasing allocated resources appropriately. | |
void | setSoundManager (ISoundManager *soundManager) override |
Sets the sound manager for audio playback. | |
void | playTableMusic (size_t index, const std::vector< TableData > &tables) override |
Plays table-specific music. | |
void | applyVideoAudioSettings () override |
Applies audio settings to all active video players. | |
void | clearVideoCache () |
void | clearTextureCache () |
SDL_Renderer * | getPlayfieldRenderer () |
SDL_Renderer * | getBackglassRenderer () |
SDL_Renderer * | getDMDRenderer () |
SDL_Renderer * | getTopperRenderer () |
void | setPlayfieldRenderer (SDL_Renderer *renderer) |
void | setBackglassRenderer (SDL_Renderer *renderer) |
void | setDMDRenderer (SDL_Renderer *renderer) |
void | setTopperRenderer (SDL_Renderer *renderer) |
![]() | |
virtual | ~IAssetManager ()=default |
Virtual destructor to ensure derived classes can clean up properly. | |
|
overridevirtual |
Applies audio settings to all active video players.
Updates the volume and mute state of playfield, backglass, and DMD video players based on the current mediaAudioVol and mediaAudioMute settings.
Implements IAssetManager.
|
overridevirtual |
Cleans up video players, releasing allocated resources appropriately.
Implements IAssetManager.
|
overridevirtual |
Clears any existing video players to free resources before initializing new ones.
Implements IAssetManager.
|
inlineoverridevirtual |
Retrieves the texture used for the backglass.
Implements IAssetManager.
|
inlineoverridevirtual |
Retrieves the video player associated with the backglass.
Implements IAssetManager.
|
inlineoverridevirtual |
Retrieves the texture used for the dot matrix display (DMD).
Implements IAssetManager.
|
inlineoverridevirtual |
Retrieves the video player associated with the dot matrix display (DMD).
Implements IAssetManager.
|
inlineoverridevirtual |
Retrieves the texture used for the playfield.
Implements IAssetManager.
|
inlineoverridevirtual |
Retrieves the video player associated with the playfield.
Implements IAssetManager.
|
inlineoverridevirtual |
Retrieves the configuration service that manages application settings.
Implements IAssetManager.
|
inlineoverridevirtual |
Retrieves the rectangle that specifies the title's position and dimensions (x, y, width, height).
Implements IAssetManager.
|
inlineoverridevirtual |
Retrieves the texture used for the title for a specific renderer.
renderer | The SDL renderer to get the texture for. |
Implements IAssetManager.
|
inlineoverridevirtual |
Retrieves the texture used for the topper display.
Implements IAssetManager.
|
inlineoverridevirtual |
Retrieves the video player associated with the topper display.
Implements IAssetManager.
|
inlineoverridevirtual |
Retrieves the texture used for the wheel for a specific renderer.
renderer | The SDL renderer to get the texture for. |
Implements IAssetManager.
|
overridevirtual |
Loads assets for a specific table based on its index and associated table data.
index | The index of the table to load assets for. |
tables | A vector containing table data. |
Implements IAssetManager.
|
overridevirtual |
Plays table-specific music.
index | The index of the table to play music for. |
tables | A vector containing table data with music paths. |
Implements IAssetManager.
|
overridevirtual |
Reloads all relevant assets with updated settings, fonts, and table data.
windowManager | Pointer to the window manager used for rendering. |
font | Pointer to the TTF_Font used for text rendering. |
tables | A vector containing table data necessary for asset creation. |
index | The index of the table data to reload assets for. |
Implements IAssetManager.
|
overridevirtual |
Reloads the title texture using a new title string and color, updating the title rectangle accordingly.
title | The new title string. |
color | The color used for text rendering. |
titleRect | [in,out] Parameter that is updated to reflect the new title's dimensions (width and height) after the texture is reloaded. |
Implements IAssetManager.
|
inlineoverridevirtual |
Sets the current font for text rendering.
font | Pointer to the TTF_Font object to be set. |
Implements IAssetManager.
|
overridevirtual |
Sets the configuration service (settings manager) responsible for application settings.
cm | Pointer to the new IConfigService instance. |
Implements IAssetManager.
|
overridevirtual |
Sets the sound manager for audio playback.
soundManager | Pointer to the ISoundManager instance. |
Implements IAssetManager.
|
inlineoverridevirtual |
Sets the title's position on the display.
x | The new x-coordinate for the title. |
y | The new y-coordinate for the title. |
Implements IAssetManager.