OpenTTD Source
20241108-master-g80f628063a
|
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. More... | |
DiagonalTileArea (TileIndex start, TileIndex end) | |
Create a diagonal tile area from two corners. More... | |
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? More... | |
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" estent. |
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().
bool DiagonalTileArea::Contains | ( | TileIndex | tile | ) | const |