stmm-games-doc  0.32.0
Public Member Functions | List of all members
stmg::BlocksListener Class Referenceabstract

Block listener. More...

Inheritance diagram for stmg::BlocksListener:
Inheritance graph
[legend]

Public Member Functions

virtual void blockPreAdd (const LevelBlock &oBlock) noexcept=0
 Pre block added callback. More...
 
virtual void blockPostAdd (LevelBlock &oBlock) noexcept=0
 Post block added callback. More...
 
virtual void blockPreRemove (LevelBlock &oBlock) noexcept=0
 Pre block removed callback. More...
 
virtual void blockPostRemove (const LevelBlock &oBlock) noexcept=0
 Post block removed callback. More...
 
virtual void blockPreDestroy (LevelBlock &oBlock) noexcept=0
 Pre block destroyed callback. More...
 
virtual void blockPostDestroy (const LevelBlock &oBlock) noexcept=0
 Post block destroyed callback. More...
 
virtual void blockPreFuse (LevelBlock &oFusedToBlock, LevelBlock &oFusedBlock) noexcept=0
 Pre block fusion callback. More...
 
virtual void blockPostFuse (LevelBlock &oResBlock, const LevelBlock &oFusedBlock, const std::unordered_map< int32_t, int32_t > &oFusedToBrickIds, const std::unordered_map< int32_t, int32_t > &oFusedBrickIds) noexcept=0
 Post block fusion callback. More...
 
- Public Member Functions inherited from stmg::BoaBloListener
virtual ~BoaBloListener () noexcept=default
 
virtual void boabloPreFreeze (LevelBlock &oBlock) noexcept=0
 Pre freeze callback. More...
 
virtual void boabloPostFreeze (const Coords &oCoords) noexcept=0
 Post freeze callback. More...
 
virtual void boabloPreUnfreeze (const Coords &oCoords) noexcept=0
 Pre unfreeze callback. More...
 
virtual void boabloPostUnfreeze (LevelBlock &oBlock) noexcept=0
 Post unfreeze callback. More...
 

Detailed Description

Block listener.

Member Function Documentation

◆ blockPostAdd()

virtual void stmg::BlocksListener::blockPostAdd ( LevelBlock oBlock)
pure virtualnoexcept

Post block added callback.

Called by Level::blockAdd().

Parameters
oBlockThe level block

Implemented in stmg::FakeLevelView, and stmg::TileAnimatorEvent.

◆ blockPostDestroy()

virtual void stmg::BlocksListener::blockPostDestroy ( const LevelBlock oBlock)
pure virtualnoexcept

Post block destroyed callback.

Called by LevelBlock::destroy().

Parameters
oBlockThe level block

Implemented in stmg::FakeLevelView, and stmg::TileAnimatorEvent.

◆ blockPostFuse()

virtual void stmg::BlocksListener::blockPostFuse ( LevelBlock oResBlock,
const LevelBlock oFusedBlock,
const std::unordered_map< int32_t, int32_t > &  oFusedToBrickIds,
const std::unordered_map< int32_t, int32_t > &  oFusedBrickIds 
)
pure virtualnoexcept

Post block fusion callback.

Called by LevelBlock::fuseTo().

The TileAnimator references of oResBlock are reset. The TileAnimator references of oFusedBlock are reset.

Parameters
oResBlockis the result of the fusion (what was oFusedToBlock in blockPreFuse).
oFusedBlockis what was added to oResBlock and removed from the level.
oFusedToBrickIdsis a map of the brickIds of the original oFusedToBlock to those in oResBlock.
oFusedBrickIdsis a map of the brickIds of oFusedBlock to those in oResBlock.

Implemented in stmg::FakeLevelView, and stmg::TileAnimatorEvent.

◆ blockPostRemove()

virtual void stmg::BlocksListener::blockPostRemove ( const LevelBlock oBlock)
pure virtualnoexcept

Post block removed callback.

Called by LevelBlock::remove().

Parameters
oBlockThe level block

Implemented in stmg::FakeLevelView, and stmg::TileAnimatorEvent.

◆ blockPreAdd()

virtual void stmg::BlocksListener::blockPreAdd ( const LevelBlock oBlock)
pure virtualnoexcept

Pre block added callback.

Called by Level::blockAdd().

Parameters
oBlockThe level block

Implemented in stmg::FakeLevelView, and stmg::TileAnimatorEvent.

◆ blockPreDestroy()

virtual void stmg::BlocksListener::blockPreDestroy ( LevelBlock oBlock)
pure virtualnoexcept

Pre block destroyed callback.

Called by LevelBlock::destroy().

Parameters
oBlockThe level block

Implemented in stmg::FakeLevelView, and stmg::TileAnimatorEvent.

◆ blockPreFuse()

virtual void stmg::BlocksListener::blockPreFuse ( LevelBlock oFusedToBlock,
LevelBlock oFusedBlock 
)
pure virtualnoexcept

Pre block fusion callback.

Called by LevelBlock::fuseTo().

Parameters
oFusedToBlockThe block to which oFusedBlock will be attached.
oFusedBlockThe block that will be removed.

Implemented in stmg::FakeLevelView, and stmg::TileAnimatorEvent.

◆ blockPreRemove()

virtual void stmg::BlocksListener::blockPreRemove ( LevelBlock oBlock)
pure virtualnoexcept

Pre block removed callback.

Called by LevelBlock::remove().

Parameters
oBlockThe level block

Implemented in stmg::FakeLevelView, and stmg::TileAnimatorEvent.