|
stmm-games-doc
0.32.0
|
This class is used for both Show and Subshows. More...
Classes | |
| class | Positioner |
| Interface to position the LevelShow during view ticks. More... | |
Public Member Functions | |
| int32_t | getW () const noexcept |
| The width of the Show or Subshow. More... | |
| int32_t | getH () const noexcept |
| The height of the Show or Subshow. More... | |
| FPoint | getPos (int32_t nViewTick, int32_t nTotViewTicks) const noexcept |
| Gets the position of the show or subshow during a view tick. More... | |
| FPoint | getPos () const noexcept |
| Gets the position of the show or subshow during the game tick. More... | |
| double | getMaxX () const noexcept |
| The maximum x coordinate of the level show. More... | |
| double | getMaxY () const noexcept |
| The maximum y coordinate of the level show. More... | |
| bool | isBoardPosVisible (double fX, double fY) const noexcept |
| Tells whether a board position is visible. More... | |
| FPoint | getBoardPos (double fX, double fY) const noexcept |
| The board position given the position relative to this instance. More... | |
| void | setPos (const FPoint &oNewPos) noexcept |
| Sets the level show position within its context. More... | |
| void | setPositioner (Positioner *p0Positioner) noexcept |
| Install a positioner. More... | |
| void | resetPositioner () noexcept |
| Reset the positioner. More... | |
This class is used for both Show and Subshows.
In the case of Show the position is relative to the level's Board origin. In the case of a player Subshow the position is relative to the level's Show origin.
|
noexcept |
The board position given the position relative to this instance.
| fX | The x coordinate in tiles. |
| fY | The y coordinate in tiles. |
|
inlinenoexcept |
The height of the Show or Subshow.
|
inlinenoexcept |
|
inlinenoexcept |
|
noexcept |
Gets the position of the show or subshow during a view tick.
This calls the positioner if one is installed.
| nViewTick | The view tick. Must be >= 0 and < nTotViewTicks. |
| nTotViewTicks | The number of view ticks in the game interval. Must be >= 1. |
|
noexcept |
Gets the position of the show or subshow during the game tick.
This gets the position of the last call to getPos(nViewTick, nTotViewTicks) or setPos().
|
inlinenoexcept |
The width of the Show or Subshow.
|
noexcept |
Tells whether a board position is visible.
| fX | The x board coordinate in tiles. |
| fY | The y board coordinate in tiles. |
|
noexcept |
Reset the positioner.
If no positioner is currently installed has no effect.
|
noexcept |
Sets the level show position within its context.
This must be called within a game tick.
| oNewPos | The new position. |
|
noexcept |
Install a positioner.
The caller should ensure that the positioner isn't deleted while this LevelShow instance is using it.
| p0Positioner | The positioner. Cannot be null. |
1.8.13