yapf/yapf.h
changeset 4870 0ee22ed51ada
parent 4549 60410aa1aa88
child 5573 afa6f92a71fd
equal deleted inserted replaced
4869:cded5f3a83c9 4870:0ee22ed51ada
    25 
    25 
    26 /** Finds the best path for given train.
    26 /** Finds the best path for given train.
    27  * @param v        the train that needs to find a path
    27  * @param v        the train that needs to find a path
    28  * @param tile     the tile to find the path from (should be next tile the train is about to enter)
    28  * @param tile     the tile to find the path from (should be next tile the train is about to enter)
    29  * @param enterdir diagonal direction which the RV will enter this new tile from
    29  * @param enterdir diagonal direction which the RV will enter this new tile from
    30  * @param tracks   available tracks on the new tile (to choose from)
    30  * @param trackdirs available trackdirs on the new tile (to choose from)
       
    31  * @param no_path_found [out] true is returned if no path can be found (returned Trackdir is only a 'guess')
    31  * @return         the best trackdir for next turn or INVALID_TRACKDIR if the path could not be found
    32  * @return         the best trackdir for next turn or INVALID_TRACKDIR if the path could not be found
    32  */
    33  */
    33 Trackdir YapfChooseRailTrack(Vehicle *v, TileIndex tile, DiagDirection enterdir, TrackdirBits trackdirs);
    34 Trackdir YapfChooseRailTrack(Vehicle *v, TileIndex tile, DiagDirection enterdir, TrackdirBits trackdirs, bool *path_not_found);
    34 
    35 
    35 /** Used by RV multistop feature to find the nearest road stop that has a free slot.
    36 /** Used by RV multistop feature to find the nearest road stop that has a free slot.
    36  * @param v      RV (its current tile will be the origin)
    37  * @param v      RV (its current tile will be the origin)
    37  * @param tile   destination tile
    38  * @param tile   destination tile
    38  * @return       distance from origin tile to the destination (number of road tiles) or UINT_MAX if path not found
    39  * @return       distance from origin tile to the destination (number of road tiles) or UINT_MAX if path not found