pathfind.h
changeset 3153 e83501906eae
parent 2493 f6b4300cc2b0
child 3323 89aed4056b8f
equal deleted inserted replaced
3152:00aa2d4cf39e 3153:e83501906eae
     1 /* $Id$ */
     1 /* $Id$ */
     2 
     2 
     3 #ifndef PATHFIND_H
     3 #ifndef PATHFIND_H
     4 #define PATHFIND_H
     4 #define PATHFIND_H
       
     5 
       
     6 #include "direction.h"
     5 
     7 
     6 //#define PF_BENCH // perform simple benchmarks on the train pathfinder (not
     8 //#define PF_BENCH // perform simple benchmarks on the train pathfinder (not
     7 //supported on all archs)
     9 //supported on all archs)
     8 
    10 
     9 typedef struct TrackPathFinder TrackPathFinder;
    11 typedef struct TrackPathFinder TrackPathFinder;
    56 	TileIndex hash_tile[0x400]; /* stores the link index when multi link. */
    58 	TileIndex hash_tile[0x400]; /* stores the link index when multi link. */
    57 
    59 
    58 	TrackPathFinderLink links[0x400]; /* hopefully, this is enough. */
    60 	TrackPathFinderLink links[0x400]; /* hopefully, this is enough. */
    59 };
    61 };
    60 
    62 
    61 void FollowTrack(TileIndex tile, uint16 flags, byte direction, TPFEnumProc *enum_proc, TPFAfterProc *after_proc, void *data);
    63 void FollowTrack(TileIndex tile, uint16 flags, DiagDirection direction, TPFEnumProc* enum_proc, TPFAfterProc* after_proc, void* data);
    62 
    64 
    63 typedef struct {
    65 typedef struct {
    64 	TileIndex tile;
    66 	TileIndex tile;
    65 	int length;
    67 	int length;
    66 } FindLengthOfTunnelResult;
    68 } FindLengthOfTunnelResult;
    67 FindLengthOfTunnelResult FindLengthOfTunnel(TileIndex tile, uint direction);
    69 FindLengthOfTunnelResult FindLengthOfTunnel(TileIndex tile, uint direction);
    68 
    70 
    69 void NewTrainPathfind(TileIndex tile, TileIndex dest, byte direction, NTPEnumProc *enum_proc, void *data);
    71 void NewTrainPathfind(TileIndex tile, TileIndex dest, DiagDirection direction, NTPEnumProc* enum_proc, void* data);
    70 
    72 
    71 #endif /* PATHFIND_H */
    73 #endif /* PATHFIND_H */