summaryrefslogtreecommitdiff
path: root/src/yapf/follow_track.hpp
diff options
context:
space:
mode:
authorKUDr <KUDr@openttd.org>2008-02-25 15:09:22 +0000
committerKUDr <KUDr@openttd.org>2008-02-25 15:09:22 +0000
commitff7e789f83ccd0d2caf71e54b73f290fdb6f2f0b (patch)
treedfcde58a820400b90b5897f28f90326ae4b54aca /src/yapf/follow_track.hpp
parentbde573d1e95cf3e7a8910e2accd1e9794503d94d (diff)
downloadopenttd-ff7e789f83ccd0d2caf71e54b73f290fdb6f2f0b.tar.xz
(svn r12252) -Fix [FS#1801]: Broken FollowTrack_t related functions (thanks michi_cc).
-Fixed by removing FollowTrack_t structure and all related functions. Their purpose was to allow to call track followers from C code. They were: 1. never used 2. obsoleted by switching to C++
Diffstat (limited to 'src/yapf/follow_track.hpp')
-rw-r--r--src/yapf/follow_track.hpp22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/yapf/follow_track.hpp b/src/yapf/follow_track.hpp
index 6987c24a4..afde47dd7 100644
--- a/src/yapf/follow_track.hpp
+++ b/src/yapf/follow_track.hpp
@@ -7,12 +7,32 @@
#include "yapf.hpp"
+
/** Track follower helper template class (can serve pathfinders and vehicle
* controllers). See 6 different typedefs below for 3 different transport
* types w/ of w/o 90-deg turns allowed */
template <TransportType Ttr_type_, bool T90deg_turns_allowed_ = true>
-struct CFollowTrackT : public FollowTrack_t
+struct CFollowTrackT
{
+ enum ErrorCode {
+ EC_NONE,
+ EC_OWNER,
+ EC_RAIL_TYPE,
+ EC_90DEG,
+ EC_NO_WAY,
+ };
+
+ const Vehicle* m_veh; ///< moving vehicle
+ TileIndex m_old_tile; ///< the origin (vehicle moved from) before move
+ Trackdir m_old_td; ///< the trackdir (the vehicle was on) before move
+ TileIndex m_new_tile; ///< the new tile (the vehicle has entered)
+ TrackdirBits m_new_td_bits; ///< the new set of available trackdirs
+ DiagDirection m_exitdir; ///< exit direction (leaving the old tile)
+ bool m_is_tunnel; ///< last turn passed tunnel
+ bool m_is_bridge; ///< last turn passed bridge ramp
+ bool m_is_station; ///< last turn passed station
+ int m_tiles_skipped; ///< number of skipped tunnel or station tiles
+ ErrorCode m_err;
CPerformanceTimer* m_pPerf;
FORCEINLINE CFollowTrackT(const Vehicle* v = NULL, CPerformanceTimer* pPerf = NULL)