|
stmm-games-doc
0.32.0
|

Public Member Functions | |
| virtual | ~ThemeContext () noexcept=default |
| virtual shared_ptr< ThemeAnimation > | createAnimation (const shared_ptr< LevelAnimation > &refLevelAnimation) noexcept=0 |
| Create theme animation. More... | |
| virtual void | preloadSound (int32_t nSoundIdx, const std::vector< shared_ptr< stmi::PlaybackCapability >> &aPlaybacks) noexcept=0 |
| Pre-load a sound. More... | |
| virtual shared_ptr< ThemeSound > | createSound (int32_t nSoundIdx, const std::vector< shared_ptr< stmi::PlaybackCapability >> &aPlaybacks, FPoint oXYPosition, double fZPosition, bool bRelative, double fVolume, bool bLoop) noexcept=0 |
| Create a sound. More... | |
| virtual void | drawTile (int32_t nPainterIdx, const Cairo::RefPtr< Cairo::Context > &refCc, const Tile &oTile, int32_t nPlayer, const std::vector< double > &aAniElapsed) noexcept=0 |
| Draw a tile with tile animations. More... | |
| virtual void | drawTile (int32_t nPainterIdx, const Cairo::RefPtr< Cairo::Context > &refCc, const Tile &oTile, int32_t nPlayer) noexcept=0 |
| Draw a tile without tile animations. More... | |
| virtual NSize | getTileSize () const noexcept=0 |
| Get the current tile size. More... | |
| virtual void | setTileSize (NSize oSize) noexcept=0 |
| Set the current tile size. More... | |
| virtual const Glib::RefPtr< Pango::Context > & | getFontContext () noexcept=0 |
| Get the font context. More... | |
|
virtualdefaultnoexcept |
|
pure virtualnoexcept |
Create theme animation.
| refLevelAnimation | The model. Cannot be null. |
Implemented in stmg::StdThemeContext.
|
pure virtualnoexcept |
Create a sound.
| nSoundIdx | The sound index according to Named::sounds(). Must be non-negative. |
| aPlaybacks | All the devices the sound should be played to. Cannot be empty. Devices can be null. |
| oXYPosition | The x and y position at which the sound should be played. |
| fZPosition | The z position. |
| bRelative | Whether the positions are relative to the listener of each capability. |
| fVolume | The volume. |
| bLoop | Whether the sound(s) should loop. |
Implemented in stmg::StdThemeContext.
|
pure virtualnoexcept |
Draw a tile with tile animations.
The elapsed values in aAniElapsed are numbers from 0.0 to 1.0 (or -1.0 if not defined). The index into aAniElapsed is the index into Theme::getNamed().tileAnis().
| nPainterIdx | The painter to use. Must be valid. If -1 the theme's default is used. |
| refCc | The drawing context. Cannot be null. |
| oTile | The tile to draw. |
| nPlayer | The level player or -1 if tile not part of a block. |
| aAniElapsed | The elapsed tile animations. |
Implemented in stmg::StdThemeContext.
|
pure virtualnoexcept |
Draw a tile without tile animations.
| nPainterIdx | The painter to use. Must be valid. If -1 the theme's default is used. |
| refCc | The drawing context. Cannot be null. |
| oTile | The tile to draw. |
| nPlayer | The level player or -1 if tile not part of a block. |
Implemented in stmg::StdThemeContext.
|
pure virtualnoexcept |
Get the font context.
Implemented in stmg::StdThemeContext.
|
pure virtualnoexcept |
|
pure virtualnoexcept |
Pre-load a sound.
| nSoundIdx | The sound index according to Named::sounds(). Must be non-negative. |
| aPlaybacks | All the devices that should pre-load the sound. Cannot be empty. Devices can be null. |
Implemented in stmg::StdThemeContext.
|
pure virtualnoexcept |
Set the current tile size.
| oSize | The new tile size in pixels. Must be positive for both coordinates. |
Implemented in stmg::StdThemeContext.
1.8.13