56 TrackdirByte the_dir; |
56 TrackdirByte the_dir; |
57 |
57 |
58 TransportType tracktype; |
58 TransportType tracktype; |
59 uint sub_type; |
59 uint sub_type; |
60 |
60 |
61 byte var2; |
|
62 bool disable_tile_hash; |
61 bool disable_tile_hash; |
63 |
62 |
64 uint16 hash_head[0x400]; |
63 uint16 hash_head[0x400]; |
65 TileIndex hash_tile[0x400]; ///< stores the link index when multi link. |
64 TileIndex hash_tile[0x400]; ///< stores the link index when multi link. |
66 |
65 |
67 TrackPathFinderLink links[0x400]; ///< hopefully, this is enough. |
66 TrackPathFinderLink links[0x400]; ///< hopefully, this is enough. |
68 }; |
67 }; |
69 |
68 |
70 void FollowTrack(TileIndex tile, uint16 flags, uint sub_type, DiagDirection direction, TPFEnumProc* enum_proc, TPFAfterProc* after_proc, void* data); |
69 /** Some flags to modify the behaviour of original pathfinder */ |
|
70 enum PathfindFlags { |
|
71 PATHFIND_FLAGS_NONE = 0, |
|
72 PATHFIND_FLAGS_SHIP_MODE = 0x0800, ///< pathfinder with some optimizations for ships, but does not work for other types. |
|
73 PATHFIND_FLAGS_DISABLE_TILE_HASH = 0x1000, ///< do not check for searching in circles |
|
74 }; |
|
75 DECLARE_ENUM_AS_BIT_SET(PathfindFlags) |
|
76 |
|
77 void FollowTrack(TileIndex tile, PathfindFlags flags, TransportType tt, uint sub_type, DiagDirection direction, TPFEnumProc* enum_proc, TPFAfterProc* after_proc, void* data); |
71 void NewTrainPathfind(TileIndex tile, TileIndex dest, RailTypes railtypes, DiagDirection direction, NTPEnumProc* enum_proc, void* data); |
78 void NewTrainPathfind(TileIndex tile, TileIndex dest, RailTypes railtypes, DiagDirection direction, NTPEnumProc* enum_proc, void* data); |
72 |
79 |
73 #endif /* PATHFIND_H */ |
80 #endif /* PATHFIND_H */ |