Go to the documentation of this file.
10 #ifndef PATHFINDER_FUNC_H
11 #define PATHFINDER_FUNC_H
13 #include "../tile_cmd.h"
14 #include "../waypoint_base.h"
36 uint maxx = minx + ta.
w - 1;
37 uint maxy = miny + ta.
h - 1;
uint32 TileIndex
The index/ID of a Tile.
static Titem * Get(size_t index)
Returns Titem with given index.
TrackdirBits
Enumeration of bitmasks for the TrackDirs.
virtual void GetTileArea(TileArea *ta, StationType type) const =0
Get the tile area for a given station type.
@ ROAD_SW
South-west part.
static uint ClampU(const uint a, const uint min, const uint max)
Clamp an unsigned integer between an interval.
static uint TileY(TileIndex tile)
Get the Y component of a tile.
static uint TileX(TileIndex tile)
Get the X component of a tile.
TrackStatus GetTileTrackStatus(TileIndex tile, TransportType mode, uint sub_mode, DiagDirection side)
Returns information about trackdirs and signal states.
StationType
Station types.
@ TRANSPORT_ROAD
Transport by road vehicle.
RoadBits
Enumeration for the road parts on a tile.
static RoadBits GetRoadBits(TileIndex t, RoadTramType rtt)
Get the present road bits for a specific road type.
@ TRACKDIR_BIT_X_NE
Track x-axis, direction north-east.
uint16 w
The width of the area.
Represents the covered area of e.g.
@ ROAD_NE
North-east part.
@ ROAD_SE
South-east part.
@ TRACKDIR_BIT_Y_SE
Track y-axis, direction south-east.
@ ROAD_NW
North-west part.
static TileIndex CalcClosestStationTile(StationID station, TileIndex tile, StationType station_type)
Calculates the tile of given station that is closest to a given tile for this we assume the station i...
uint16 h
The height of the area.
static TrackdirBits GetTrackdirBitsForRoad(TileIndex tile, RoadTramType rtt)
Wrapper around GetTileTrackStatus() and TrackStatusToTrackdirBits(), as for single tram bits GetTileT...
@ TRACKDIR_BIT_NONE
No track build.
static TileIndex TileXY(uint x, uint y)
Returns the TileIndex of a coordinate.
@ TRACKDIR_BIT_Y_NW
Track y-axis, direction north-west.
TileIndex tile
The base tile of the area.
static TrackdirBits TrackStatusToTrackdirBits(TrackStatus ts)
Returns the present-trackdir-information of a TrackStatus.
TileIndex xy
Base tile of the station.
Base class for all station-ish types.
static const TileIndex INVALID_TILE
The very nice invalid tile marker.
static bool IsNormalRoadTile(TileIndex t)
Return whether a tile is a normal road tile.
@ TRACKDIR_BIT_X_SW
Track x-axis, direction south-west.