|
OpenTTD Source 20260421-master-gc2fbc6fdeb
|
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 *follower) |
| Called by YAPF to calculate the cost from the origin to the given node. | |
Protected Member Functions | |
| Tpf & | Yapf () |
| Access the 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 24 of file yapf_road.cpp.
| typedef Types::NodeList::Item CYapfCostRoadT< Types >::Node |
this will be our node type
Definition at line 23 of file yapf_road.cpp.
| typedef Types::Tpf CYapfCostRoadT< Types >::Tpf |
pathfinder (derived from THIS class)
Definition at line 21 of file yapf_road.cpp.
| typedef Types::TrackFollower CYapfCostRoadT< Types >::TrackFollower |
track follower helper
Definition at line 22 of file yapf_road.cpp.
|
inlineprotected |
Definition at line 29 of file yapf_road.cpp.
|
inlineprotected |
Return one tile cost.
| tile | The tile to consider. |
| trackdir | The direction of travel. |
Definition at line 62 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(), Road, Station, TileOffsByDiagDir(), TrackdirToExitdir(), 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.
| n | The node to consider. |
| follower | The track follower to the next node. |
true iff the costs could be calculated. 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, Yapf(), and YAPF_TILE_LENGTH.
|
inline |
Definition at line 108 of file yapf_road.cpp.
|
inlineprotected |
Definition at line 37 of file yapf_road.cpp.
|
inlineprotected |
Access the inherited path finder.
Definition at line 32 of file yapf_road.cpp.
Referenced by OneTileCost(), and PfCalcCost().
|
protected |
Definition at line 27 of file yapf_road.cpp.