OpenTTD Source 20241224-master-gee860a5c8e
|
Public Types | |
typedef Types::Tpf | Tpf |
pathfinder (derived from THIS class) | |
typedef Types::TrackFollower | TrackFollower |
track follower helper | |
typedef Types::NodeList::Item | Node |
this will be our node type | |
typedef Node::Key | Key |
key to hash tables | |
Public Member Functions | |
void | SetMaxCost (int max_cost) |
bool | PfCalcCost (Node &n, const TrackFollower *) |
Called by YAPF to calculate the cost from the origin to the given node. | |
Protected Member Functions | |
Tpf & | Yapf () |
to access inherited path finder | |
int | SlopeCost (TileIndex tile, TileIndex next_tile, Trackdir) |
int | OneTileCost (TileIndex tile, Trackdir trackdir) |
return one tile cost | |
Protected Attributes | |
int | max_cost |
Definition at line 19 of file yapf_road.cpp.
typedef Node::Key CYapfCostRoadT< Types >::Key |
key to hash tables
Definition at line 25 of file yapf_road.cpp.
typedef Types::NodeList::Item CYapfCostRoadT< Types >::Node |
this will be our node type
Definition at line 24 of file yapf_road.cpp.
typedef Types::Tpf CYapfCostRoadT< Types >::Tpf |
pathfinder (derived from THIS class)
Definition at line 22 of file yapf_road.cpp.
typedef Types::TrackFollower CYapfCostRoadT< Types >::TrackFollower |
track follower helper
Definition at line 23 of file yapf_road.cpp.
|
inlineprotected |
Definition at line 30 of file yapf_road.cpp.
|
inlineprotected |
return one tile cost
Definition at line 58 of file yapf_road.cpp.
References RoadStop::GetByTile(), RoadStop::GetEntry(), RoadStop::Entry::GetLength(), RoadStop::Entry::GetOccupied(), GetRoadStopType(), GetTileType(), IsDiagonalTrackdir(), RoadStop::IsDriveThroughRoadStopContinuation(), IsDriveThroughStopTile(), RoadStop::IsFreeBay(), IsLevelCrossing(), IsRoadWaypoint(), MP_ROAD, MP_STATION, TileOffsByDiagDir(), TrackdirToExitdir(), CYapfCostRoadT< Types >::Yapf(), YAPF_TILE_CORNER_LENGTH, and YAPF_TILE_LENGTH.
|
inline |
Called by YAPF to calculate the cost from the origin to the given node.
Calculates only the cost of given node, adds it to the parent node cost and stores the result into Node::cost member
Definition at line 114 of file yapf_road.cpp.
References Vehicle::current_order, DiagDirToDiagTrackdir(), FindFirstBit(), RoadVehicle::GetDisplayMaxSpeed(), Order::GetMaxSpeed(), GetRoadDepotDirection(), IsRoadDepotTile(), KillFirstBit(), MAX_MAP_SIZE, ReverseDiagDir(), TRACKDIR_BIT_NONE, CYapfCostRoadT< Types >::Yapf(), and YAPF_TILE_LENGTH.
|
inline |
Definition at line 104 of file yapf_road.cpp.
|
inlineprotected |
Definition at line 38 of file yapf_road.cpp.
|
inlineprotected |
to access inherited path finder
Definition at line 33 of file yapf_road.cpp.
Referenced by CYapfCostRoadT< Types >::OneTileCost(), and CYapfCostRoadT< Types >::PfCalcCost().
|
protected |
Definition at line 28 of file yapf_road.cpp.