|
stmm-games-doc
0.32.0
|
Event that animates selected tiles of board and blocks. More...

Classes | |
| struct | Init |
| struct | LocalInit |
Public Types | |
| enum | { LISTENER_GROUP_TILEANI_CHANGED = 10 } |
Public Types inherited from stmg::Event | |
| enum | MSG_FILTER_VALUE_OP { MSG_FILTER_VALUE_OP_FIRST = 0, MSG_FILTER_VALUE_OP_UNCHANGED = 0, MSG_FILTER_VALUE_OP_SET = 1, MSG_FILTER_VALUE_OP_MULT_ADD = 2, MSG_FILTER_VALUE_OP_DIV_ADD = 3, MSG_FILTER_VALUE_OP_PERCENT_ADD = 4, MSG_FILTER_VALUE_OP_PERMILL_ADD = 5, MSG_FILTER_VALUE_OP_MOD_ADD = 6, MSG_FILTER_VALUE_OP_MIN_ADD = 7, MSG_FILTER_VALUE_OP_MAX_ADD = 8, MSG_FILTER_VALUE_OP_LAST = 8 } |
| Value filter. More... | |
| enum | { LISTENER_GROUP_FINISHED = 0 } |
Public Member Functions | |
| TileAnimatorEvent (Init &&oInit) noexcept | |
| Constructor. More... | |
| void | trigger (int32_t nMsg, int32_t nValue, Event *p0TriggeringEvent) noexcept override |
| The trigger function. More... | |
| void | boabloPreFreeze (LevelBlock &oBlock) noexcept override |
| Pre freeze callback. More... | |
| void | boabloPostFreeze (const Coords &oCoords) noexcept override |
| Post freeze callback. More... | |
| void | boabloPreUnfreeze (const Coords &oCoords) noexcept override |
| Pre unfreeze callback. More... | |
| void | boabloPostUnfreeze (LevelBlock &oBlock) noexcept override |
| Post unfreeze callback. More... | |
| void | boardPreScroll (Direction::VALUE eDir, const shared_ptr< TileRect > &refTiles) noexcept override |
| Pre scroll callback. More... | |
| void | boardPostScroll (Direction::VALUE eDir) noexcept override |
| Post scroll callback. More... | |
| void | boardPreInsert (Direction::VALUE eDir, NRect oArea, const shared_ptr< TileRect > &refTiles) noexcept override |
| Pre insert callback. More... | |
| void | boardPostInsert (Direction::VALUE eDir, NRect oArea) noexcept override |
| Post insert callback. More... | |
| void | boardPreDestroy (const Coords &oCoords) noexcept override |
| Pre destroy callback. More... | |
| void | boardPostDestroy (const Coords &oCoords) noexcept override |
| Post destroy callback. More... | |
| void | boardPreModify (const TileCoords &oTileCoords) noexcept override |
| Pre modify callback. More... | |
| void | boardPostModify (const Coords &oCoords) noexcept override |
| Post modify callback. More... | |
| void | blockPreAdd (const LevelBlock &oBlock) noexcept override |
| Pre block added callback. More... | |
| void | blockPostAdd (LevelBlock &oBlock) noexcept override |
| Post block added callback. More... | |
| void | blockPreRemove (LevelBlock &oBlock) noexcept override |
| Pre block removed callback. More... | |
| void | blockPostRemove (const LevelBlock &oBlock) noexcept override |
| Post block removed callback. More... | |
| void | blockPreDestroy (LevelBlock &oBlock) noexcept override |
| Pre block destroyed callback. More... | |
| void | blockPostDestroy (const LevelBlock &oBlock) noexcept override |
| Post block destroyed callback. More... | |
| void | blockPreFuse (LevelBlock &oFusedToBlock, LevelBlock &oFusedBlock) noexcept override |
| Pre block fusion callback. More... | |
| 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 override |
| Post block fusion callback. More... | |
| 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 override |
| Pre block modification callback. More... | |
| 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 override |
| Post block modification callback. More... | |
Public Member Functions inherited from stmg::Event | |
| virtual | ~Event () noexcept=default |
| virtual void | addMsgFilter (int32_t nInFromMsg, int32_t nInToMsg, int32_t nInFromValue, int32_t nInToValue, bool bOutMsgDefined, int32_t nOutMsg, MSG_FILTER_VALUE_OP eOutValueOperator, int32_t nOutValueOperand, int32_t nOutValueAdd) noexcept |
| Add a message filter. More... | |
| virtual void | addListener (int32_t nGroupId, Event *p0ListenerEvent, int32_t nMsg) noexcept |
| Adds a listener to the event. More... | |
| bool | isActive () const noexcept |
| Tells whether the event is active. More... | |
| int32_t | getTriggerTime () const noexcept |
| The triggering time. More... | |
| int32_t | getPriority () const noexcept |
| The priority. More... | |
| int32_t | getDebugTag () const noexcept |
| The debug tag. More... | |
Public Member Functions inherited from stmg::BoardScrollListener | |
| virtual | ~BoardScrollListener () noexcept=default |
Public Member Functions inherited from stmg::BoaBloListener | |
| virtual | ~BoaBloListener () noexcept=default |
Protected Member Functions | |
| void | reInit (Init &&oInit) noexcept |
| Reinitialization. More... | |
Protected Member Functions inherited from stmg::Event | |
| Event (Init &&oInit) noexcept | |
| Constructor. More... | |
| void | reInit (Init &&oInit) noexcept |
| Reinitialization. More... | |
| virtual void | informListeners (int32_t nGroupId, int32_t nValue) noexcept |
| Calls the trigger function of a group of listeners. More... | |
| const Level & | level () const noexcept |
| The level this event belongs to. More... | |
| Level & | level () noexcept |
| The level this event belongs to. More... | |
Event that animates selected tiles of board and blocks.
One animation cycle has a duration in ticks and/or milliseconds (see LocalInit::m_oDuration). At each game tick (and view tick) the progress value of the animation is brought from 0.0 to 1.0 (see TileAnimator::getElapsed01). So it is up to the theme to choose how to use the number to display the tile. For example a tile could be progressively faded: it is shown opaque at value 0.0 and becomes more and more invisible as it gets to value 1.0. Another possibility would be for the theme to show the tile at full scale at 0.0, progressively decrease the size, reaching half size at 0.5 and from there increase the size again to reach full scale at 1.0, creating a pulse effect.
| anonymous enum |
|
explicitnoexcept |
Constructor.
All the ranges must have m_nFrom <= m_nTo. The values are chosen randomly from the ranges. The duration is always at least one tick.
| oInit | The initialization data. |
|
overridevirtualnoexcept |
Post block added callback.
Called by Level::blockAdd().
| oBlock | The level block |
Implements stmg::BlocksListener.
|
overridevirtualnoexcept |
Post block destroyed callback.
Called by LevelBlock::destroy().
| oBlock | The level block |
Implements stmg::BlocksListener.
|
overridevirtualnoexcept |
Post block fusion callback.
Called by LevelBlock::fuseTo().
The TileAnimator references of oResBlock are reset. The TileAnimator references of oFusedBlock are reset.
| oResBlock | is the result of the fusion (what was oFusedToBlock in blockPreFuse). |
| oFusedBlock | is what was added to oResBlock and removed from the level. |
| oFusedToBrickIds | is a map of the brickIds of the original oFusedToBlock to those in oResBlock. |
| oFusedBrickIds | is a map of the brickIds of oFusedBlock to those in oResBlock. |
Implements stmg::BlocksListener.
|
overridevirtualnoexcept |
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.
| oBlock | The modified block. |
| aDeletedBrickId | The removed bricks. |
| aModifiedPosBrickId | The bricks with modified position. |
| aModifiedTileBrickId | The bricks with modified tile. |
| aAddedBrickId | The bricks added. |
Implements stmg::BlocksBricksIdListener.
|
overridevirtualnoexcept |
Post block removed callback.
Called by LevelBlock::remove().
| oBlock | The level block |
Implements stmg::BlocksListener.
|
overridevirtualnoexcept |
Pre block added callback.
Called by Level::blockAdd().
| oBlock | The level block |
Implements stmg::BlocksListener.
|
overridevirtualnoexcept |
Pre block destroyed callback.
Called by LevelBlock::destroy().
| oBlock | The level block |
Implements stmg::BlocksListener.
|
overridevirtualnoexcept |
Pre block fusion callback.
Called by LevelBlock::fuseTo().
| oFusedToBlock | The block to which oFusedBlock will be attached. |
| oFusedBlock | The block that will be removed. |
Implements stmg::BlocksListener.
|
overridevirtualnoexcept |
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.
| oBlock | The block that will be modified. |
| aDeleteBrickId | The to be removed bricks. |
| aModifyPosBrickId | The bricks the position of which will be modified. |
| aModifyTileBrickId | The bricks the tile of which will be modified. |
| bAddsBricks | Whether bricks will be added. |
Implements stmg::BlocksBricksIdListener.
|
overridevirtualnoexcept |
Pre block removed callback.
Called by LevelBlock::remove().
| oBlock | The level block |
Implements stmg::BlocksListener.
|
overridevirtualnoexcept |
Post freeze callback.
The block has been removed and the board modified. Called by LevelBlock::freeze().
| oCoords | The coords of the modified cells. |
Implements stmg::BoaBloListener.
|
overridevirtualnoexcept |
Post unfreeze callback.
The block has been created and the board cells emptied. Called by Level::boabloUnfreeze().
| oBlock |
Implements stmg::BoaBloListener.
|
overridevirtualnoexcept |
Pre freeze callback.
Called by LevelBlock::freeze().
| oBlock | The block that will freeze on the board. |
Implements stmg::BoaBloListener.
|
overridevirtualnoexcept |
Pre unfreeze callback.
Called by Level::boabloUnfreeze().
| oCoords | The coords of the cells that will be used for the block. Is not empty. |
Implements stmg::BoaBloListener.
|
overridevirtualnoexcept |
Post destroy callback.
Called by Level::boardDestroy().
| oCoords | The destroyed tiles (now empty) positions. |
Implements stmg::BoardListener.
|
overridevirtualnoexcept |
Post insert callback.
Called by Level::boardInsert().
| eDir | The direction. |
| oArea | The modified area. |
Implements stmg::BoardListener.
|
overridevirtualnoexcept |
Post modify callback.
Called by Level::boardModify().
| oCoords | The positions of the modified tiles. |
Implements stmg::BoardListener.
|
overridevirtualnoexcept |
Post scroll callback.
Called by Level::boardScroll().
| eDir | The direction of the scroll. |
Implements stmg::BoardScrollListener.
|
overridevirtualnoexcept |
Pre destroy callback.
Called by Level::boardDestroy().
| oCoords | The destroyed tiles' position. |
Implements stmg::BoardListener.
|
overridevirtualnoexcept |
Pre insert callback.
Called by Level::boardInsert().
| eDir | The direction. |
| oArea | The area. Is within board. |
| refTiles | The tiles to insert. |
Implements stmg::BoardListener.
|
overridevirtualnoexcept |
Pre modify callback.
Called by Level::boardModify().
| oTileCoords | The new tiles and their position. |
Implements stmg::BoardListener.
|
overridevirtualnoexcept |
Pre scroll callback.
Called by Level::boardScroll().
| eDir | The direction of the scroll. |
| refTiles | The tiles that will be placed on the freed cells. If null all empty tiles. |
Implements stmg::BoardScrollListener.
|
protectednoexcept |
Reinitialization.
See constructor.
|
overridevirtualnoexcept |
The trigger function.
This function provides the functionality of the event and can be called in two ways.
It can be called by an event through informListeners() this event was listening to. Note: events can listen to themselves.
It can also be called by the timer if the event was active.
When this function is called the event has already been deactivated by the level (if it was active in the first place).
When this function is called the filters of this event have already been applied.
| nMsg | The message received. |
| nValue | The value received. |
| p0TriggeringEvent | The triggering event or null if triggered by timer. |
Implements stmg::Event.
1.8.13