Jazz2::Tiles::ITileMapOwner class

Interface used to notify tile map owner of various events.

Implemented by the level handler so the tile map can call back into it — to play common sound effects and to report destructible-tile animation progress and tile freezing.

Derived classes

class Jazz2::LevelHandler
Level handler of a local game session.

Public functions

auto PlayCommonSfx(StringView identifier, const Vector3f& pos, float gain = 1.0f, float pitch = 1.0f) -> std::shared_ptr<AudioBufferPlayer> pure virtual
Plays a common sound effect.
void OnAdvanceDestructibleTileAnimation(std::int32_t tx, std::int32_t ty, std::int32_t amount) pure virtual
Called when a destructible tile animation is advanced.
void OnTileFrozen(std::int32_t x, std::int32_t y) pure virtual
Called when a tile is frozen.
auto GetLayerEffectsTarget(const Viewport* view) -> LayerEffectsTarget* virtual
Returns what the special tile layers need from the given scene viewport.
void OnLayerEffectsChanged() virtual
Called when the renderer type of a layer changes at runtime, which can need other render passes.

Function documentation

LayerEffectsTarget* Jazz2::Tiles::ITileMapOwner::GetLayerEffectsTarget(const Viewport* view) virtual

Returns what the special tile layers need from the given scene viewport.

Returns nullptr for a viewport that doesn't render the level with them, the special layers are then drawn as they are on the backends that can't show the effects.