|
@@ -9,26 +9,23 @@
|
|
|
|
|
|
/** @file yapf.h Entry point for OpenTTD to YAPF. */
|
|
|
|
|
|
#ifndef YAPF_H
|
|
|
#define YAPF_H
|
|
|
|
|
|
#include "../../debug.h"
|
|
|
#include "../../depot_type.h"
|
|
|
#include "../../direction_type.h"
|
|
|
#include "../../station_type.h"
|
|
|
#include "../../pbs.h"
|
|
|
|
|
|
/** Finds the best path for given ship.
|
|
|
* @param v the ship that needs to find a path
|
|
|
* @param tile the tile to find the path from (should be next tile the ship is about to enter)
|
|
|
* @param enterdir diagonal direction which the ship will enter this new tile from
|
|
|
* @param tracks available tracks on the new tile (to choose from)
|
|
|
* @return the best trackdir for next turn or INVALID_TRACKDIR if the path could not be found
|
|
|
* @return the best trackdir for next turn or INVALID_TRACK if the path could not be found
|
|
|
*/
|
|
|
Trackdir YapfChooseShipTrack(const Vehicle *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks);
|
|
|
Track YapfChooseShipTrack(const Vehicle *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks);
|
|
|
|
|
|
/** Finds the best path for given road vehicle.
|
|
|
* @param v the RV that needs to find a path
|
|
|
* @param tile the tile to find the path from (should be next tile the RV is about to enter)
|
|
|
* @param enterdir diagonal direction which the RV will enter this new tile from
|
|
|
* @return the best trackdir for next turn or INVALID_TRACKDIR if the path could not be found
|
|
@@ -42,13 +39,13 @@ Trackdir YapfChooseRoadTrack(const Vehic
|
|
|
* @param tracks available trackdirs on the new tile (to choose from)
|
|
|
* @param path_not_found [out] true is returned if no path can be found (returned Trackdir is only a 'guess')
|
|
|
* @param reserve_track indicates whether YAPF should try to reserve the found path
|
|
|
* @param target [out] the target tile of the reservation, free is set to true if path was reserved
|
|
|
* @return the best trackdir for next turn or INVALID_TRACKDIR if the path could not be found
|
|
|
*/
|
|
|
Trackdir YapfChooseRailTrack(const Vehicle *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks, bool *path_not_found, bool reserve_track, PBSTileInfo *target);
|
|
|
Trackdir YapfChooseRailTrack(const Vehicle *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks, bool *path_not_found, bool reserve_track, struct PBSTileInfo *target);
|
|
|
|
|
|
/** Used by RV multistop feature to find the nearest road stop that has a free slot.
|
|
|
* @param v RV (its current tile will be the origin)
|
|
|
* @param tile destination tile
|
|
|
* @return distance from origin tile to the destination (number of road tiles) or UINT_MAX if path not found
|
|
|
*/
|