OpenTTD Source
20241108-master-g80f628063a
|
Implementation of YAPF for ships. More...
#include "../../stdafx.h"
#include "../../ship.h"
#include "../../industry.h"
#include "../../vehicle_func.h"
#include "yapf.hpp"
#include "yapf_node_ship.hpp"
#include "yapf_ship_regions.h"
#include "../water_regions.h"
#include "../../safeguards.h"
Go to the source code of this file.
Data Structures | |
class | CYapfDestinationTileWaterT< Types > |
class | CYapfFollowShipT< Types > |
Node Follower module of YAPF for ships. More... | |
class | CYapfCostShipT< Types > |
Cost Provider module of YAPF for ships. More... | |
struct | CYapfShip_TypesT< Tpf_, Ttrack_follower, Tnode_list > |
Config struct of YAPF for ships. More... | |
struct | CYapfShip |
Functions | |
Track | YapfShipChooseTrack (const Ship *v, TileIndex tile, bool &path_found, ShipPathCache &path_cache) |
Ship controller helper - path finder invoker. More... | |
bool | YapfShipCheckReverse (const Ship *v, Trackdir *trackdir) |
Returns true if it is better to reverse the ship before leaving depot using YAPF. More... | |
Implementation of YAPF for ships.
Definition in file yapf_ship.cpp.
Returns true if it is better to reverse the ship before leaving depot using YAPF.
v | the ship leaving the depot |
trackdir | [out] the best of all possible reversed trackdirs |
Definition at line 435 of file yapf_ship.cpp.
Track YapfShipChooseTrack | ( | const Ship * | v, |
TileIndex | tile, | ||
bool & | path_found, | ||
ShipPathCache & | path_cache | ||
) |
Ship controller helper - path finder invoker.
Finds the best path for given ship using YAPF.
Definition at line 427 of file yapf_ship.cpp.
References ChooseShipTrack(), Ship::GetVehicleTrackdir(), INVALID_TRACK, INVALID_TRACKDIR, TRACKDIR_BIT_NONE, TrackdirToTrack(), and TrackdirToTrackdirBits().
Referenced by ChooseShipTrack().