|
OpenTTD Source 20251116-master-g21329071df
|
Represents a diagonal tile area. More...
#include <tilearea_type.h>
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? | |
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 70 of file tilearea_type.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 82 of file tilearea_type.h.
Create a diagonal tile area from two corners.
| start | First corner of the area. |
| end | Second corner of the area. |
Definition at line 172 of file tilearea.cpp.
References a, b, Map::Size(), TileX(), and TileY().
|
inline |
Clears the TileArea by making the tile invalid and setting a and b to 0.
Definition at line 91 of file tilearea_type.h.
References INVALID_TILE.
| bool DiagonalTileArea::Contains | ( | TileIndex | tile | ) | const |
| int16_t DiagonalTileArea::a |
Extent in diagonal "x" direction (may be negative to signify the area stretches to the left)
Definition at line 73 of file tilearea_type.h.
Referenced by Contains(), and DiagonalTileArea().
| int16_t DiagonalTileArea::b |
Extent in diagonal "y" direction (may be negative to signify the area stretches upwards)
Definition at line 74 of file tilearea_type.h.
Referenced by Contains(), and DiagonalTileArea().
| TileIndex DiagonalTileArea::tile |