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

Block modification listener. More...

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

Public Member Functions

virtual void blockPreModify (LevelBlock &oBlock, const std::vector< int32_t > &aDeleteBrickId, const std::vector< int32_t > &aModifyPosBrickId, const std::vector< int32_t > &aModifyTileBrickId, bool bAddsBricks) noexcept=0
 Pre block modification callback. More...
 
virtual void blockPostModify (LevelBlock &oBlock, const std::vector< int32_t > &aDeletedBrickId, const std::vector< int32_t > &aModifiedPosBrickId, const std::vector< int32_t > &aModifiedTileBrickId, const std::vector< int32_t > &aAddedBrickId) noexcept=0
 Post block modification callback. More...
 
- Public Member Functions inherited from stmg::BlocksListener
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 modification listener.

Member Function Documentation

◆ blockPostModify()

virtual void stmg::BlocksBricksIdListener::blockPostModify ( LevelBlock oBlock,
const std::vector< int32_t > &  aDeletedBrickId,
const std::vector< int32_t > &  aModifiedPosBrickId,
const std::vector< int32_t > &  aModifiedTileBrickId,
const std::vector< int32_t > &  aAddedBrickId 
)
pure virtualnoexcept

Post block modification callback.

Called by LevelBlock::blockModify().

When the visibility of a brick is changed its id is in aModifyPosBrickId.

Note that the implementation might pass all the bricks of a rotated block to aModifyPosBrickId without really checking whether the bricks have really changed position or their visibility. So don't rely on it.

Parameters
oBlockThe modified block.
aDeletedBrickIdThe removed bricks.
aModifiedPosBrickIdThe bricks with modified position.
aModifiedTileBrickIdThe bricks with modified tile.
aAddedBrickIdThe bricks added.

Implemented in stmg::TileAnimatorEvent.

◆ blockPreModify()

virtual void stmg::BlocksBricksIdListener::blockPreModify ( LevelBlock oBlock,
const std::vector< int32_t > &  aDeleteBrickId,
const std::vector< int32_t > &  aModifyPosBrickId,
const std::vector< int32_t > &  aModifyTileBrickId,
bool  bAddsBricks 
)
pure virtualnoexcept

Pre block modification callback.

Called by LevelBlock::blockModify().

When the visibility of a brick is changed its id is in aModifyPosBrickId.

Note that the implementation might pass all the bricks of a rotated block to aModifyPosBrickId without really checking whether the bricks have really changed position or their visibility. So don't rely on it.

Parameters
oBlockThe block that will be modified.
aDeleteBrickIdThe to be removed bricks.
aModifyPosBrickIdThe bricks the position of which will be modified.
aModifyTileBrickIdThe bricks the tile of which will be modified.
bAddsBricksWhether bricks will be added.

Implemented in stmg::TileAnimatorEvent.