OpenTTD
Static Public Member Functions
CYapfCostBase Struct Reference

Base implementation for cost accounting. More...

#include <yapf_costbase.hpp>

Inheritance diagram for CYapfCostBase:
CYapfCostRailT< Types > CYapfT< CYapfRail_TypesT< CYapfAnyDepotRail1, CFollowTrackRail, CRailNodeListTrackDir, CYapfDestinationAnyDepotRailT, CYapfFollowAnyDepotRailT > > CYapfT< CYapfRail_TypesT< CYapfAnyDepotRail2, CFollowTrackRailNo90, CRailNodeListTrackDir, CYapfDestinationAnyDepotRailT, CYapfFollowAnyDepotRailT > > CYapfT< CYapfRail_TypesT< CYapfAnySafeTileRail1, CFollowTrackFreeRail, CRailNodeListTrackDir, CYapfDestinationAnySafeTileRailT, CYapfFollowAnySafeTileRailT > > CYapfT< CYapfRail_TypesT< CYapfAnySafeTileRail2, CFollowTrackFreeRailNo90, CRailNodeListTrackDir, CYapfDestinationAnySafeTileRailT, CYapfFollowAnySafeTileRailT > > CYapfT< CYapfRail_TypesT< CYapfRail1, CFollowTrackRail, CRailNodeListTrackDir, CYapfDestinationTileOrStationRailT, CYapfFollowRailT > > CYapfT< CYapfRail_TypesT< CYapfRail2, CFollowTrackRailNo90, CRailNodeListTrackDir, CYapfDestinationTileOrStationRailT, CYapfFollowRailT > > CYapfAnyDepotRail1 CYapfAnyDepotRail2 CYapfAnySafeTileRail1 CYapfAnySafeTileRail2 CYapfRail1 CYapfRail2

Static Public Member Functions

static bool stSlopeCost (TileIndex tile, Trackdir td)
 Does the given track direction on the given tile yield an uphill penalty?

Detailed Description

Base implementation for cost accounting.

Definition at line 16 of file yapf_costbase.hpp.

Member Function Documentation

static bool CYapfCostBase::stSlopeCost ( TileIndex  tile,
Trackdir  td 
)
inlinestatic

Does the given track direction on the given tile yield an uphill penalty?

Parameters
tileThe tile to check.
tdThe track direction to check.
Returns
True if there's a slope, otherwise false.

Definition at line 23 of file yapf_costbase.hpp.

References DiagDirToAxis(), GetTileSlope(), GetTunnelBridgeDirection(), HasBridgeFlatRamp(), IsBridgeTile(), IsDiagonalTrackdir(), IsTunnelTile(), IsUphillTrackdir(), and TrackdirToExitdir().


The documentation for this struct was generated from the following file: