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