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;
TrackStatus GetTileTrackStatus(TileIndex tile, TransportType mode, uint sub_mode, DiagDirection side)
Returns information about trackdirs and signal states.
static debug_inline TileIndex TileXY(uint x, uint y)
Returns the TileIndex of a coordinate.
static debug_inline uint TileY(TileIndex tile)
Get the Y component of a tile.
static debug_inline uint TileX(TileIndex tile)
Get the X component of a tile.
constexpr uint ClampU(const uint a, const uint min, const uint max)
Clamp an unsigned integer between an interval.
TrackdirBits GetTrackdirBitsForRoad(TileIndex tile, RoadTramType rtt)
Wrapper around GetTileTrackStatus() and TrackStatusToTrackdirBits(), as for single tram bits GetTileT...
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...
static debug_inline bool IsNormalRoadTile(Tile t)
Return whether a tile is a normal road tile.
RoadBits GetRoadBits(Tile t, RoadTramType rtt)
Get the present road bits for a specific road type.
RoadBits
Enumeration for the road parts on a tile.
@ ROAD_SW
South-west part.
@ ROAD_NE
North-east part.
@ ROAD_SE
South-east part.
@ ROAD_NW
North-west part.
StationType
Station types.
Base class for all station-ish types.
TileIndex xy
Base tile of the station.
virtual void GetTileArea(TileArea *ta, StationType type) const =0
Get the tile area for a given station type.
Represents the covered area of e.g.
uint16_t w
The width of the area.
TileIndex tile
The base tile of the area.
uint16_t h
The height of the area.
static Titem * Get(size_t index)
Returns Titem with given index.
constexpr TileIndex INVALID_TILE
The very nice invalid tile marker.
TrackdirBits TrackStatusToTrackdirBits(TrackStatus ts)
Returns the present-trackdir-information of a TrackStatus.
TrackdirBits
Allow incrementing of Trackdir variables.
@ TRACKDIR_BIT_Y_NW
Track y-axis, direction north-west.
@ TRACKDIR_BIT_X_NE
Track x-axis, direction north-east.
@ TRACKDIR_BIT_Y_SE
Track y-axis, direction south-east.
@ TRACKDIR_BIT_NONE
No track build.
@ TRACKDIR_BIT_X_SW
Track x-axis, direction south-west.
@ TRANSPORT_ROAD
Transport by road vehicle.