author | bjarni |
Sat, 02 Sep 2006 22:47:45 +0000 | |
changeset 4526 | 77ef74d28e76 |
parent 4462 | 808d9d5fb7a3 |
child 4549 | 60410aa1aa88 |
permissions | -rw-r--r-- |
3900
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff
changeset
|
1 |
/* $Id$ */ |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff
changeset
|
2 |
|
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff
changeset
|
3 |
#ifndef YAPF_H |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff
changeset
|
4 |
#define YAPF_H |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff
changeset
|
5 |
|
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff
changeset
|
6 |
#include "../debug.h" |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff
changeset
|
7 |
|
4462
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
8 |
/** Finds the best path for given ship. |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
9 |
@param v - the ship that needs to find a path |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
10 |
@param tile - the tile to find the path from (should be next tile the ship is about to enter) |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
11 |
@param enterdir - diagonal direction which the ship will enter this new tile from |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
12 |
@param tracks - available tracks on the new tile (to choose from) |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
13 |
@return - the best trackdir for next turn or INVALID_TRACKDIR if the path could not be found |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
14 |
*/ |
3900
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff
changeset
|
15 |
Trackdir YapfChooseShipTrack(Vehicle *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks); |
4462
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
16 |
|
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
17 |
/** Finds the best path for given road vehicle. |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
18 |
@param v - the RV that needs to find a path |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
19 |
@param tile - the tile to find the path from (should be next tile the RV is about to enter) |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
20 |
@param enterdir - diagonal direction which the RV will enter this new tile from |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
21 |
@param tracks - available tracks on the new tile (to choose from) |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
22 |
@return - the best trackdir for next turn or INVALID_TRACKDIR if the path could not be found |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
23 |
*/ |
3900
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff
changeset
|
24 |
Trackdir YapfChooseRoadTrack(Vehicle *v, TileIndex tile, DiagDirection enterdir); |
4462
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
25 |
|
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
26 |
/** Finds the best path for given train. |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
27 |
@param v - the train that needs to find a path |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
28 |
@param tile - the tile to find the path from (should be next tile the train is about to enter) |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
29 |
@param enterdir - diagonal direction which the RV will enter this new tile from |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
30 |
@param tracks - available tracks on the new tile (to choose from) |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
31 |
@return - the best trackdir for next turn or INVALID_TRACKDIR if the path could not be found |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
32 |
*/ |
3900
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff
changeset
|
33 |
Trackdir YapfChooseRailTrack(Vehicle *v, TileIndex tile, DiagDirection enterdir, TrackdirBits trackdirs); |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff
changeset
|
34 |
|
4462
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
35 |
/** Used by RV multistop feature to find the nearest road stop that has a free slot. |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
36 |
@param v - RV (its current tile will be the origin) |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
37 |
@param tile - destination tile |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
38 |
@return - distance from origin tile to the destination (number of road tiles) or UINT_MAX if path not found |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
39 |
*/ |
3915
281c7ebd27e0
(svn r5033) -CodeChange: [YAPF] RoadFindPathToStop() can now use YAPF for multistop handling.
KUDr
parents:
3900
diff
changeset
|
40 |
uint YapfRoadVehDistanceToTile(const Vehicle* v, TileIndex tile); |
281c7ebd27e0
(svn r5033) -CodeChange: [YAPF] RoadFindPathToStop() can now use YAPF for multistop handling.
KUDr
parents:
3900
diff
changeset
|
41 |
|
4462
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
42 |
/** Used when user sends RV to the nearest depot or if RV needs servicing. |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
43 |
Returns the nearest depot (or NULL if depot was not found). |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
44 |
*/ |
3900
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff
changeset
|
45 |
Depot* YapfFindNearestRoadDepot(const Vehicle *v); |
4462
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
46 |
|
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
47 |
/** Used when user sends train to the nearest depot or if train needs servicing. |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
48 |
@v - train that needs to go to some depot |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
49 |
@max_distance - max distance (number of track tiles) from the current train position |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
50 |
(used also as optimization - the pathfinder can stop path finding if max_distance |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
51 |
was reached and no depot was seen) |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
52 |
@reverse_penalty - penalty that should be added for the path that requires reversing the train first |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
53 |
@depot_tile - receives the depot tile if depot was found |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
54 |
@reversed - receives true if train needs to reversed first |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
55 |
@return - the true if depot was found. |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
56 |
*/ |
3900
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff
changeset
|
57 |
bool YapfFindNearestRailDepotTwoWay(Vehicle *v, int max_distance, int reverse_penalty, TileIndex* depot_tile, bool* reversed); |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff
changeset
|
58 |
|
4462
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
59 |
/** Returns true if it is better to reverse the train before leaving station */ |
3900
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff
changeset
|
60 |
bool YapfCheckReverseTrain(Vehicle* v); |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff
changeset
|
61 |
|
4462
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
62 |
/** Use this function to notify YAPF that track layout (or signal configuration) has change */ |
3900
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff
changeset
|
63 |
void YapfNotifyTrackLayoutChange(TileIndex tile, Track track); |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff
changeset
|
64 |
|
4462
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
65 |
/** performance measurement helpers */ |
3900
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff
changeset
|
66 |
void* NpfBeginInterval(void); |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff
changeset
|
67 |
int NpfEndInterval(void* perf); |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff
changeset
|
68 |
|
4462
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
69 |
|
3900
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff
changeset
|
70 |
extern int _aystar_stats_open_size; |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff
changeset
|
71 |
extern int _aystar_stats_closed_size; |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff
changeset
|
72 |
|
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff
changeset
|
73 |
|
4462
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
74 |
/** Track followers. They should help whenever any new code will need to walk through |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
75 |
tracks, road or water tiles (pathfinders, signal controllers, vehicle controllers). |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
76 |
It is an attempt to introduce API that should simplify tasks listed above. |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
77 |
If you will need to use it: |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
78 |
1. allocate/declare FollowTrack_t structure; |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
79 |
2. call FollowTrackInit() and provide vehicle (if relevant) |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
80 |
3. call one of 6 FollowTrackXxxx() APIs below |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
81 |
4. check return value (if true then continue else stop) |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
82 |
5. look at FollowTrack_t structure for the result |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
83 |
6. optionally repeat steps 3..5 |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
84 |
7. in case of troubles contact KUDr |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
85 |
*/ |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
86 |
|
3900
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff
changeset
|
87 |
/** Base struct for track followers. */ |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff
changeset
|
88 |
typedef struct FollowTrack_t |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff
changeset
|
89 |
{ |
4462
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
90 |
const Vehicle* m_veh; ///< moving vehicle |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
91 |
TileIndex m_old_tile; ///< the origin (vehicle moved from) before move |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
92 |
Trackdir m_old_td; ///< the trackdir (the vehicle was on) before move |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
93 |
TileIndex m_new_tile; ///< the new tile (the vehicle has entered) |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
94 |
TrackdirBits m_new_td_bits; ///< the new set of available trackdirs |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
95 |
DiagDirection m_exitdir; ///< exit direction (leaving the old tile) |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
96 |
bool m_is_tunnel; ///< last turn passed tunnel |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
97 |
bool m_is_station; ///< last turn passed station |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
98 |
int m_tiles_skipped; ///< number of skipped tunnel or station tiles |
3900
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff
changeset
|
99 |
} FollowTrack_t; |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff
changeset
|
100 |
|
4462
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
101 |
/** Initializes FollowTrack_t structure */ |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
102 |
void FollowTrackInit(FollowTrack_t *This, const Vehicle* v); |
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
103 |
|
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
104 |
/** Main track follower routines */ |
3900
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff
changeset
|
105 |
bool FollowTrackWater (FollowTrack_t *This, TileIndex old_tile, Trackdir old_td); |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff
changeset
|
106 |
bool FollowTrackRoad (FollowTrack_t *This, TileIndex old_tile, Trackdir old_td); |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff
changeset
|
107 |
bool FollowTrackRail (FollowTrack_t *This, TileIndex old_tile, Trackdir old_td); |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff
changeset
|
108 |
bool FollowTrackWaterNo90(FollowTrack_t *This, TileIndex old_tile, Trackdir old_td); |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff
changeset
|
109 |
bool FollowTrackRoadNo90 (FollowTrack_t *This, TileIndex old_tile, Trackdir old_td); |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff
changeset
|
110 |
bool FollowTrackRailNo90 (FollowTrack_t *This, TileIndex old_tile, Trackdir old_td); |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff
changeset
|
111 |
|
4462
808d9d5fb7a3
(svn r6245) -Add: added comments for all YAPF C interface functions (yapf.h) used by other modules, added FollowTrackInit() into YAPF track followers.
KUDr
parents:
3977
diff
changeset
|
112 |
/** Base tile length units */ |
3900
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff
changeset
|
113 |
enum { |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff
changeset
|
114 |
YAPF_TILE_LENGTH = 100, |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff
changeset
|
115 |
YAPF_TILE_CORNER_LENGTH = 71 |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff
changeset
|
116 |
}; |
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff
changeset
|
117 |
|
4984308f9125
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
diff
changeset
|
118 |
#endif /* YAPF_H */ |