yapf/yapf.h
changeset 3900 4984308f9125
child 3915 281c7ebd27e0
equal deleted inserted replaced
3899:4c5b1de6cb17 3900:4984308f9125
       
     1 /* $Id$ */
       
     2 
       
     3 #ifndef  YAPF_H
       
     4 #define  YAPF_H
       
     5 
       
     6 #include "../debug.h"
       
     7 
       
     8 Trackdir YapfChooseShipTrack(Vehicle *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks);
       
     9 Trackdir YapfChooseRoadTrack(Vehicle *v, TileIndex tile, DiagDirection enterdir);
       
    10 Trackdir YapfChooseRailTrack(Vehicle *v, TileIndex tile, DiagDirection enterdir, TrackdirBits trackdirs);
       
    11 
       
    12 Depot* YapfFindNearestRoadDepot(const Vehicle *v);
       
    13 bool YapfFindNearestRailDepotTwoWay(Vehicle *v, int max_distance, int reverse_penalty, TileIndex* depot_tile, bool* reversed);
       
    14 
       
    15 bool YapfCheckReverseTrain(Vehicle* v);
       
    16 
       
    17 void YapfNotifyTrackLayoutChange(TileIndex tile, Track track);
       
    18 
       
    19 
       
    20 void* NpfBeginInterval(void);
       
    21 int NpfEndInterval(void* perf);
       
    22 
       
    23 extern int _aystar_stats_open_size;
       
    24 extern int _aystar_stats_closed_size;
       
    25 
       
    26 
       
    27 /** Base struct for track followers. */
       
    28 typedef struct FollowTrack_t
       
    29 {
       
    30 	Vehicle*      m_veh;
       
    31 	TileIndex     m_old_tile;
       
    32 	Trackdir      m_old_td;
       
    33 	TileIndex     m_new_tile;
       
    34 	TrackdirBits  m_new_td_bits;
       
    35 //	TrackdirBits  m_red_td_bits;
       
    36 	DiagDirection m_exitdir;
       
    37 	bool          m_is_tunnel;
       
    38 	int           m_tunnel_tiles_skipped;
       
    39 } FollowTrack_t;
       
    40 
       
    41 /** track followers */
       
    42 bool FollowTrackWater    (FollowTrack_t *This, TileIndex old_tile, Trackdir old_td);
       
    43 bool FollowTrackRoad     (FollowTrack_t *This, TileIndex old_tile, Trackdir old_td);
       
    44 bool FollowTrackRail     (FollowTrack_t *This, TileIndex old_tile, Trackdir old_td);
       
    45 bool FollowTrackWaterNo90(FollowTrack_t *This, TileIndex old_tile, Trackdir old_td);
       
    46 bool FollowTrackRoadNo90 (FollowTrack_t *This, TileIndex old_tile, Trackdir old_td);
       
    47 bool FollowTrackRailNo90 (FollowTrack_t *This, TileIndex old_tile, Trackdir old_td);
       
    48 
       
    49 enum {
       
    50 	YAPF_TILE_LENGTH = 100,
       
    51 	YAPF_TILE_CORNER_LENGTH = 71
       
    52 };
       
    53 
       
    54 #endif /* YAPF_H */