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