|
stmm-games-doc
0.32.0
|
Public Member Functions | |
| virtual void | handleXYEvent (const shared_ptr< stmi::Event > &refXYEvent) noexcept=0 |
| Forward an XYEvent to the view. More... | |
| virtual shared_ptr< GameSound > | createSound (int32_t nSoundIdx, int32_t nTeam, int32_t nMate, FPoint oXYPos, double fZPos, bool bListenerRelative, double fVolume01, bool bLooping) noexcept=0 |
| Create a game sound. More... | |
| virtual void | preloadSound (int32_t nSoundIdx) noexcept=0 |
| Pre-load a sound. More... | |
| virtual bool | removeSound (const shared_ptr< GameSound > &refSound) noexcept=0 |
| Remove a sound. More... | |
| virtual | ~GameView () noexcept=default |
|
virtualdefaultnoexcept |
|
pure virtualnoexcept |
Create a game sound.
The team or mate select the player(s) that should hear the sound. When nTeam is not -1, the sound can only be heard in "per player" sound mode or there is only one human player and nTeam and nMate select it (or its team).
| nSoundIdx | The sound index according to Named::sounds(). Must be valid. |
| nTeam | The team or -1 if a sound directed to all. |
| nMate | The mate or -1 if a sound directed to all or team. |
| oXYPos | The position of the sound on the board. Absolute or relative to the listener. |
| fZPos | The z position of the sound. |
| bListenerRelative | Whether oXYPos is relative to the listener. |
| fVolume01 | The volume. Must be from 0.0 (inaudible) to 1.0 (max). |
| bLooping | Whether the sound should continuously repeat. |
|
pure virtualnoexcept |
Forward an XYEvent to the view.
This function is called while dispatching the queued inputs.
| refXYEvent | The event to handle. Cannot be null. |
|
pure virtualnoexcept |
Pre-load a sound.
Makes sure that subsequent calls to createSound with th e same nSoundIdx are as fast as possible.
| nSoundIdx | The sound index according to Named::sounds(). Must be valid. |
|
pure virtualnoexcept |
Remove a sound.
In order for the sound to be recycled the caller should also remove reference to it.
| refSound | The sound. Cannot be null. |
1.8.13