# yapf.h

Go to the documentation of this file.

    00001 /* $Id: yapf.h 14949 2009-01-10 00:31:47Z rubidium $ */
    00002
    00005 #ifndef  YAPF_H
    00006 #define  YAPF_H
    00007
    00008 #include "../debug.h"
    00009 #include "../depot_type.h"
    00010 #include "../direction_type.h"
    00011 #include "../pbs.h"
    00012
    00020 Trackdir YapfChooseShipTrack(const Vehicle *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks);
    00021
    00028 Trackdir YapfChooseRoadTrack(const Vehicle *v, TileIndex tile, DiagDirection enterdir);
    00029
    00040 Trackdir YapfChooseRailTrack(const Vehicle *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks, bool *path_not_found, bool reserve_track, PBSTileInfo *target);
    00041
    00047 uint YapfRoadVehDistanceToTile(const Vehicle *v, TileIndex tile);
    00048
    00052 Depot *YapfFindNearestRoadDepot(const Vehicle *v);
    00053
    00064 bool YapfFindNearestRailDepotTwoWay(const Vehicle *v, int max_distance, int reverse_penalty, TileIndex *depot_tile, bool *reversed);
    00065
    00067 bool YapfCheckReverseTrain(const Vehicle *v);
    00068
    00078 bool YapfRailFindNearestSafeTile(const Vehicle *v, TileIndex tile, Trackdir td, bool override_railtype);
    00079
    00081 void YapfNotifyTrackLayoutChange(TileIndex tile, Track track);
    00082
    00084 void *NpfBeginInterval();
    00085 int NpfEndInterval(void *perf);
    00086
    00087
    00088 extern int _aystar_stats_open_size;
    00089 extern int _aystar_stats_closed_size;
    00090
    00091
    00093 enum {
    00094   YAPF_TILE_LENGTH = 100,
    00095   YAPF_TILE_CORNER_LENGTH = 71
    00096 };
    00097
    00098 #endif /* YAPF_H */