diff options
author | frosch <frosch@openttd.org> | 2008-04-02 13:57:25 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2008-04-02 13:57:25 +0000 |
commit | 5e5e074a5dc68ed495de3234fda15989db34e23d (patch) | |
tree | 870c22ef8f7efe26779dd29c1c614c71b05bb3f2 /src/pathfind.h | |
parent | b0ee3117803b73a7ce326ad9a1c54dff936c4379 (diff) | |
download | openttd-5e5e074a5dc68ed495de3234fda15989db34e23d.tar.xz |
(svn r12540) -Codechange: Enumify some values in original pathfinder and remove an unused variable.
Diffstat (limited to 'src/pathfind.h')
-rw-r--r-- | src/pathfind.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/pathfind.h b/src/pathfind.h index e63c750c5..11f9bff90 100644 --- a/src/pathfind.h +++ b/src/pathfind.h @@ -58,7 +58,6 @@ struct TrackPathFinder { TransportType tracktype; uint sub_type; - byte var2; bool disable_tile_hash; uint16 hash_head[0x400]; @@ -67,7 +66,15 @@ struct TrackPathFinder { TrackPathFinderLink links[0x400]; ///< hopefully, this is enough. }; -void FollowTrack(TileIndex tile, uint16 flags, uint sub_type, DiagDirection direction, TPFEnumProc* enum_proc, TPFAfterProc* after_proc, void* data); +/** Some flags to modify the behaviour of original pathfinder */ +enum PathfindFlags { + PATHFIND_FLAGS_NONE = 0, + PATHFIND_FLAGS_SHIP_MODE = 0x0800, ///< pathfinder with some optimizations for ships, but does not work for other types. + PATHFIND_FLAGS_DISABLE_TILE_HASH = 0x1000, ///< do not check for searching in circles +}; +DECLARE_ENUM_AS_BIT_SET(PathfindFlags) + +void FollowTrack(TileIndex tile, PathfindFlags flags, TransportType tt, uint sub_type, DiagDirection direction, TPFEnumProc* enum_proc, TPFAfterProc* after_proc, void* data); void NewTrainPathfind(TileIndex tile, TileIndex dest, RailTypes railtypes, DiagDirection direction, NTPEnumProc* enum_proc, void* data); #endif /* PATHFIND_H */ |