From 53cc7e8a5c6f1b72c1c0187c1ea9374a924ef832 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sat, 2 Aug 2008 22:51:53 +0000 Subject: (svn r13944) -Add [YAPP]: Add YAPF provider to find a safe tile and reserve a path. (michi_cc) --- src/yapf/yapf.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/yapf/yapf.h') diff --git a/src/yapf/yapf.h b/src/yapf/yapf.h index fb39854b2..45ba94eb3 100644 --- a/src/yapf/yapf.h +++ b/src/yapf/yapf.h @@ -66,6 +66,17 @@ bool YapfFindNearestRailDepotTwoWay(const Vehicle *v, int max_distance, int reve /** Returns true if it is better to reverse the train before leaving station */ bool YapfCheckReverseTrain(const Vehicle* v); +/** + * Try to extend the reserved path of a train to the nearest safe tile. + * + * @param v The train that needs to find a safe tile. + * @param tile Last tile of the current reserved path. + * @param td Last trackdir of the current reserved path. + * @param override_railtype Should all physically compabtible railtypes be searched, even if the vehicle can't on them on it own? + * @return True if the path could be extended to a safe tile. + */ +bool YapfRailFindNearestSafeTile(const Vehicle *v, TileIndex tile, Trackdir td, bool override_railtype); + /** Use this function to notify YAPF that track layout (or signal configuration) has change */ void YapfNotifyTrackLayoutChange(TileIndex tile, Track track); -- cgit v1.2.3-54-g00ecf