Bomberman Multiplayer
Authoritative multiplayer networking layer for Bomberman.
Loading...
Searching...
No Matches
bomberman::AssetManager Class Reference

Asset Manager. More...

#include <AssetManager.h>

Public Member Functions

void load (SDL_Renderer *renderer)
 Load assets.
 
std::shared_ptr< TTF_Font > getFont () const
 Get font at its default loaded point size.
 
std::shared_ptr< TTF_Font > getFont (int pointSize) const
 Open the same font file at a specific point size.
 
std::shared_ptr< SDL_Texture > getTexture (Texture texture)
 Get textures.
 
std::shared_ptr< Mix_Music > getMusic (MusicEnum music)
 Get music.
 
std::shared_ptr< Mix_Chunk > getSound (SoundEnum sound)
 Get sound.
 

Detailed Description

Asset Manager.

Member Function Documentation

◆ getFont() [1/2]

std::shared_ptr< TTF_Font > bomberman::AssetManager::getFont ( ) const

Get font at its default loaded point size.

Returns
std::shared_ptr<TTF_Font> - loaded font

◆ getFont() [2/2]

std::shared_ptr< TTF_Font > bomberman::AssetManager::getFont ( int  pointSize) const

Open the same font file at a specific point size.

The caller owns the returned instance; it is not cached.

Parameters
pointSizeDesired point size.
Returns
std::shared_ptr<TTF_Font> or nullptr on failure.

◆ getMusic()

std::shared_ptr< Mix_Music > bomberman::AssetManager::getMusic ( MusicEnum  music)

Get music.

Parameters
music- music enumerator
Returns
std::shared_ptr<Mix_Music> - loaded music

◆ getSound()

std::shared_ptr< Mix_Chunk > bomberman::AssetManager::getSound ( SoundEnum  sound)

Get sound.

Parameters
sound- sound enumerator
Returns
std::shared_ptr<Mix_Chunk> - loaded sound

◆ getTexture()

std::shared_ptr< SDL_Texture > bomberman::AssetManager::getTexture ( Texture  texture)

Get textures.

Parameters
texture- texture enumerator
Returns
std::shared_ptr<SDL_Texture> - loaded texture

◆ load()

void bomberman::AssetManager::load ( SDL_Renderer *  renderer)

Load assets.

Parameters
renderer- SDL2 Renderer

The documentation for this class was generated from the following files: