|
OpenTTD
|
Structure contains cached list of stations nearby. More...
#include <station_type.h>
Public Member Functions | |
| StationFinder (const TileArea &area) | |
| Constructs StationFinder. | |
| const StationList * | GetStations () |
| Run a tile loop to find stations around a tile, on demand. | |
Private Attributes | |
| StationList | stations |
| List of stations nearby. | |
Private Attributes inherited from OrthogonalTileArea | |
| TileIndex | tile |
| The base tile of the area. | |
| uint16 | w |
| The width of the area. | |
| uint16 | h |
| The height of the area. | |
Additional Inherited Members | |
Private Member Functions inherited from OrthogonalTileArea | |
| OrthogonalTileArea (TileIndex tile=INVALID_TILE, uint8 w=0, uint8 h=0) | |
| Construct this tile area with some set values. | |
| OrthogonalTileArea (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 OrthogonalTileArea &ta) const |
| Does this tile area intersect with another? | |
| bool | Contains (TileIndex tile) const |
| Does this tile area contain a tile? | |
| void | ClampToMap () |
| Clamp the tile area to map borders. | |
| TileIndex | GetCenterTile () const |
| Get the center tile. | |
Structure contains cached list of stations nearby.
The list is created upon first call to GetStations()
Definition at line 104 of file station_type.h.
|
inline |
Constructs StationFinder.
| area | the area to search from |
Definition at line 111 of file station_type.h.
| const StationList * StationFinder::GetStations | ( | ) |
Run a tile loop to find stations around a tile, on demand.
Cache the result for further requests
Definition at line 3825 of file station_cmd.cpp.
References FindStationsAroundTiles(), INVALID_TILE, and stations.
Referenced by HouseScopeResolver::GetVariable(), and TileLoop_Town().
1.8.1.2