OpenTTD Source: CYapfCostBase Struct Reference

OpenTTD Source 15.0-beta1

Static Public Member Functions
CYapfCostBase Struct Reference

Base implementation for cost accounting. More...

`#include <yapf_costbase.hpp>`

Inheritance diagram for CYapfCostBase:

## 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 20 of file yapf_costbase.hpp.

## Member Function Documentation

## ◆ stSlopeCost()

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

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

Parameters

  tile | The tile to check.
  td | The track direction to check.

Returns
  True if there's a slope, otherwise false.

Definition at line 27 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:

- src/pathfinder/yapf/yapf_costbase.hpp