OpenTTD Source 20250905-master-g122023be8d
|
Commonly used classes and utilities for YAPF. More...
Go to the source code of this file.
Data Structures | |
class | CYapfOriginTileT< Types > |
YAPF origin provider base class - used when origin is one tile / multiple trackdirs. More... | |
class | CYapfOriginTileTwoWayT< Types > |
YAPF origin provider base class - used when there are two tile/trackdir origins. More... | |
class | CYapfT< Ttypes > |
YAPF template that uses Ttypes template argument to determine all YAPF components (base classes) from which the actual YAPF is composed. More... | |
Functions | |
int | OctileDistanceCost (TileIndex start_tile, Trackdir start_td, TileIndex destination_tile) |
Calculates the octile distance cost between a starting tile / trackdir and a destination tile. | |
Commonly used classes and utilities for YAPF.
Definition in file yapf_common.hpp.
|
inline |
Calculates the octile distance cost between a starting tile / trackdir and a destination tile.
start_tile | Starting tile. |
start_td | Starting trackdir. |
destination_tile | Destination tile. |
Definition at line 129 of file yapf_common.hpp.
References abs(), TileX(), TileY(), TrackdirToExitdir(), YAPF_TILE_CORNER_LENGTH, and YAPF_TILE_LENGTH.
Referenced by CYapfDestinationTileOrStationRailT< Types >::PfCalcEstimate(), CYapfDestinationTileRoadT< Types >::PfCalcEstimate(), and CYapfDestinationTileWaterT< Types >::PfCalcEstimate().