12 #ifndef YAPF_COSTBASE_HPP 13 #define YAPF_COSTBASE_HPP static bool IsBridgeTile(TileIndex t)
checks if there is a bridge on this tile
static DiagDirection TrackdirToExitdir(Trackdir trackdir)
Maps a trackdir to the (4-way) direction the tile is exited when following that trackdir.
static bool IsUphillTrackdir(Slope slope, Trackdir dir)
Checks whether a trackdir on a specific slope is going uphill.
Slope GetTileSlope(TileIndex tile, int *h)
Return the slope of a given tile inside the map.
Base implementation for cost accounting.
Trackdir
Enumeration for tracks and directions.
static bool stSlopeCost(TileIndex tile, Trackdir td)
Does the given track direction on the given tile yield an uphill penalty?
static DiagDirection GetTunnelBridgeDirection(TileIndex t)
Get the direction pointing to the other end.
static Axis DiagDirToAxis(DiagDirection d)
Convert a DiagDirection to the axis.
bool HasBridgeFlatRamp(Slope tileh, Axis axis)
Determines if the track on a bridge ramp is flat or goes up/down.
uint32 TileIndex
The index/ID of a Tile.
static bool IsDiagonalTrackdir(Trackdir trackdir)
Checks if a given Trackdir is diagonal.
Slope
Enumeration for the slope-type.
static bool IsTunnelTile(TileIndex t)
Is this a tunnel (entrance)?
Axis
Allow incrementing of DiagDirDiff variables.