The IAssetManager interface provides methods to manage and access various assets used in the application. More...
#include <iasset_manager.h>
Public Member Functions | |
virtual | ~IAssetManager ()=default |
Virtual destructor to ensure derived classes can clean up properly. | |
virtual SDL_Texture * | getPlayfieldTexture ()=0 |
Retrieves the texture used for the playfield. | |
virtual SDL_Texture * | getWheelTexture (SDL_Renderer *renderer)=0 |
Retrieves the texture used for the wheel for a specific renderer. | |
virtual SDL_Texture * | getBackglassTexture ()=0 |
Retrieves the texture used for the backglass. | |
virtual SDL_Texture * | getDmdTexture ()=0 |
Retrieves the texture used for the dot matrix display (DMD). | |
virtual SDL_Texture * | getTopperTexture ()=0 |
Retrieves the texture used for the topper display. | |
virtual SDL_Texture * | getTitleTexture (SDL_Renderer *renderer)=0 |
Retrieves the texture used for the title for a specific renderer. | |
virtual IVideoPlayer * | getPlayfieldVideoPlayer ()=0 |
Retrieves the video player associated with the playfield. | |
virtual IVideoPlayer * | getBackglassVideoPlayer ()=0 |
Retrieves the video player associated with the backglass. | |
virtual IVideoPlayer * | getDmdVideoPlayer ()=0 |
Retrieves the video player associated with the dot matrix display (DMD). | |
virtual IVideoPlayer * | getTopperVideoPlayer ()=0 |
Retrieves the video player associated with the topper display. | |
virtual IConfigService * | getSettingsManager ()=0 |
Retrieves the configuration service that manages application settings. | |
virtual SDL_Rect | getTitleRect ()=0 |
Retrieves the rectangle that specifies the title's position and dimensions (x, y, width, height). | |
virtual void | setTitlePosition (int x, int y)=0 |
Sets the title's position on the display. | |
virtual void | setFont (TTF_Font *font)=0 |
Sets the current font for text rendering. | |
virtual void | reloadTitleTexture (const std::string &title, SDL_Color color, SDL_Rect &titleRect)=0 |
Reloads the title texture using a new title string and color, updating the title rectangle accordingly. | |
virtual void | reloadAssets (IWindowManager *windowManager, TTF_Font *font, const std::vector< TableData > &tables, size_t index)=0 |
Reloads all relevant assets with updated settings, fonts, and table data. | |
virtual void | setSettingsManager (IConfigService *cm)=0 |
Sets the configuration service (settings manager) responsible for application settings. | |
virtual void | loadTableAssets (size_t index, const std::vector< TableData > &tables)=0 |
Loads assets for a specific table based on its index and associated table data. | |
virtual void | clearOldVideoPlayers ()=0 |
Clears any existing video players to free resources before initializing new ones. | |
virtual void | cleanupVideoPlayers ()=0 |
Cleans up video players, releasing allocated resources appropriately. | |
virtual void | setSoundManager (ISoundManager *soundManager)=0 |
Sets the sound manager for audio playback. | |
virtual void | playTableMusic (size_t index, const std::vector< TableData > &tables)=0 |
Plays table-specific music. | |
virtual void | applyVideoAudioSettings ()=0 |
Applies audio settings to all active video players. | |
The IAssetManager interface provides methods to manage and access various assets used in the application.
Interface for asset management (forward declaration).
This interface abstracts asset management functionality including handling textures, video players, configuration settings, fonts, audio, and positions for display elements. Implementations of this interface should ensure proper resource management and provide mechanisms for updating assets dynamically.
|
pure virtual |
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.
Implemented in AssetManager.
|
pure virtual |
Cleans up video players, releasing allocated resources appropriately.
Implemented in AssetManager.
|
pure virtual |
Clears any existing video players to free resources before initializing new ones.
Implemented in AssetManager.
|
pure virtual |
Retrieves the texture used for the backglass.
Implemented in AssetManager.
|
pure virtual |
Retrieves the video player associated with the backglass.
Implemented in AssetManager.
|
pure virtual |
Retrieves the texture used for the dot matrix display (DMD).
Implemented in AssetManager.
|
pure virtual |
Retrieves the video player associated with the dot matrix display (DMD).
Implemented in AssetManager.
|
pure virtual |
Retrieves the texture used for the playfield.
Implemented in AssetManager.
|
pure virtual |
Retrieves the video player associated with the playfield.
Implemented in AssetManager.
|
pure virtual |
Retrieves the configuration service that manages application settings.
Implemented in AssetManager.
|
pure virtual |
Retrieves the rectangle that specifies the title's position and dimensions (x, y, width, height).
Implemented in AssetManager.
|
pure virtual |
Retrieves the texture used for the title for a specific renderer.
renderer | The SDL renderer to get the texture for. |
Implemented in AssetManager.
|
pure virtual |
Retrieves the texture used for the topper display.
Implemented in AssetManager.
|
pure virtual |
Retrieves the video player associated with the topper display.
Implemented in AssetManager.
|
pure virtual |
Retrieves the texture used for the wheel for a specific renderer.
renderer | The SDL renderer to get the texture for. |
Implemented in AssetManager.
|
pure virtual |
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. |
Implemented in AssetManager.
|
pure virtual |
Plays table-specific music.
index | The index of the table to play music for. |
tables | A vector containing table data with music paths. |
Implemented in AssetManager.
|
pure virtual |
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. |
Implemented in AssetManager.
|
pure virtual |
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. |
Implemented in AssetManager.
|
pure virtual |
Sets the current font for text rendering.
font | Pointer to the TTF_Font object to be set. |
Implemented in AssetManager.
|
pure virtual |
Sets the configuration service (settings manager) responsible for application settings.
cm | Pointer to the new IConfigService instance. |
Implemented in AssetManager.
|
pure virtual |
Sets the sound manager for audio playback.
soundManager | Pointer to the ISoundManager instance. |
Implemented in AssetManager.
|
pure virtual |
Sets the title's position on the display.
x | The new x-coordinate for the title. |
y | The new y-coordinate for the title. |
Implemented in AssetManager.