|
OpenTTD Source 20261112-master-gbcbec5e63f
|
Represents a diagonal tile area. More...
#include <tilearea_diagonal.h>
Data Structures | |
| class | iterator |
| Iterator to iterate over a diagonal area of the map. More... | |
Public Member Functions | |
| DiagonalTileArea (TileIndex tile=INVALID_TILE, int16_t a=0, int16_t b=0) | |
| Construct this tile area with some set values. | |
| DiagonalTileArea (TileIndex start, TileIndex end) | |
| Create a diagonal tile area from two corners. | |
| void | Clear () |
| Clears the TileArea by making the tile invalid and setting a and b to 0. | |
| bool | Contains (TileIndex tile) const |
| Does this tile area contain a tile? | |
| iterator | begin () const |
| Returns an iterator to the start of the tile area. | |
| std::default_sentinel_t | end () const |
| Returns an iterator to the end of the tile area. | |
Data Fields | |
| TileIndex | tile |
| Base tile of the area. | |
| int16_t | a |
| Extent in diagonal "x" direction (may be negative to signify the area stretches to the left). | |
| int16_t | b |
| Extent in diagonal "y" direction (may be negative to signify the area stretches upwards). | |
Represents a diagonal tile area.
Definition at line 16 of file tilearea_diagonal.h.
|
inline |
Construct this tile area with some set values.
| tile | The base tile. |
| a | The "x" extent. |
| b | The "y" extent. |
Definition at line 28 of file tilearea_diagonal.h.
References a, b, INVALID_TILE, and tile.
Referenced by DiagonalTileArea::iterator::iterator().
Create a diagonal tile area from two corners.
| start | First corner of the area. |
| end | Second corner of the area. |
Definition at line 21 of file tilearea_diagonal.cpp.
References a, b, end(), Map::Size(), tile, TileX(), and TileY().
|
inline |
Returns an iterator to the start of the tile area.
Definition at line 99 of file tilearea_diagonal.h.
|
inline |
Clears the TileArea by making the tile invalid and setting a and b to 0.
Definition at line 35 of file tilearea_diagonal.h.
References INVALID_TILE.
| bool DiagonalTileArea::Contains | ( | TileIndex | tile | ) | const |
|
inline |
Returns an iterator to the end of the tile area.
Definition at line 108 of file tilearea_diagonal.h.
Referenced by DiagonalTileArea().
| int16_t DiagonalTileArea::a |
Extent in diagonal "x" direction (may be negative to signify the area stretches to the left).
Definition at line 19 of file tilearea_diagonal.h.
Referenced by Contains(), DiagonalTileArea(), DiagonalTileArea(), and DiagonalTileArea::iterator::iterator().
| int16_t DiagonalTileArea::b |
Extent in diagonal "y" direction (may be negative to signify the area stretches upwards).
Definition at line 20 of file tilearea_diagonal.h.
Referenced by Contains(), DiagonalTileArea(), DiagonalTileArea(), and DiagonalTileArea::iterator::iterator().
| TileIndex DiagonalTileArea::tile |
Base tile of the area.
Definition at line 18 of file tilearea_diagonal.h.
Referenced by Contains(), DiagonalTileArea(), and DiagonalTileArea().