Represents the covered area of e.g. More...
#include <tilearea_type.h>
Public Member Functions | |
| TileArea () | |
| Just construct this tile area. | |
| TileArea (TileIndex tile, uint8 w, uint8 h) | |
| Construct this tile area with some set values. | |
| TileArea (TileIndex start, TileIndex end) | |
| Construct this tile area based on two points. | |
| void | Add (TileIndex to_add) |
| Add a single tile to a tile area; enlarge if needed. | |
| void | Clear () |
| Clears the 'tile area', i.e. | |
| bool | Intersects (const TileArea &ta) const |
| Does this tile area intersect with another? | |
| void | ClampToMap () |
| Clamp the tile area to map borders. | |
Data Fields | |
| TileIndex | tile |
| The base tile of the area. | |
| uint16 | w |
| The width of the area. | |
| uint16 | h |
| The height of the area. | |
Represents the covered area of e.g.
a rail station
Definition at line 18 of file tilearea_type.h.
| TileArea::TileArea | ( | TileIndex | tile, | |
| uint8 | w, | |||
| uint8 | h | |||
| ) | [inline] |
Construct this tile area with some set values.
| tile | the base tile | |
| w | the width | |
| h | the height |
Definition at line 32 of file tilearea_type.h.
| void TileArea::Add | ( | TileIndex | to_add | ) |
Add a single tile to a tile area; enlarge if needed.
| to_add | The tile to add |
Definition at line 42 of file tilearea.cpp.
References h, INVALID_TILE, max(), min(), tile, TileX(), TileXY(), TileY(), and w.
Referenced by CmdBuildRoadStop(), and RemoveRoadStop().
| void TileArea::Clear | ( | ) | [inline] |
Clears the 'tile area', i.e.
make the tile invalid.
Definition at line 42 of file tilearea_type.h.
References h, INVALID_TILE, tile, and w.
Referenced by RemoveRoadStop().
| bool TileArea::Intersects | ( | const TileArea & | ta | ) | const |
Does this tile area intersect with another?
| ta | the other tile area to check against. |
Definition at line 74 of file tilearea.cpp.
References h, tile, TileX(), TileY(), and w.
Referenced by GetProductionAroundTiles().
1.6.1