src/yapf/follow_track.hpp
changeset 9439 c4e61c3f1d50
parent 8962 1b263c69799d
child 9490 01c07bde5e84
equal deleted inserted replaced
9438:e6aa429e06fc 9439:c4e61c3f1d50
    20 		EC_RAIL_TYPE,
    20 		EC_RAIL_TYPE,
    21 		EC_90DEG,
    21 		EC_90DEG,
    22 		EC_NO_WAY,
    22 		EC_NO_WAY,
    23 	};
    23 	};
    24 
    24 
    25 	const Vehicle*      m_veh;           ///< moving vehicle
    25 	const Vehicle      *m_veh;           ///< moving vehicle
    26 	TileIndex           m_old_tile;      ///< the origin (vehicle moved from) before move
    26 	TileIndex           m_old_tile;      ///< the origin (vehicle moved from) before move
    27 	Trackdir            m_old_td;        ///< the trackdir (the vehicle was on) before move
    27 	Trackdir            m_old_td;        ///< the trackdir (the vehicle was on) before move
    28 	TileIndex           m_new_tile;      ///< the new tile (the vehicle has entered)
    28 	TileIndex           m_new_tile;      ///< the new tile (the vehicle has entered)
    29 	TrackdirBits        m_new_td_bits;   ///< the new set of available trackdirs
    29 	TrackdirBits        m_new_td_bits;   ///< the new set of available trackdirs
    30 	DiagDirection       m_exitdir;       ///< exit direction (leaving the old tile)
    30 	DiagDirection       m_exitdir;       ///< exit direction (leaving the old tile)
    31 	bool                m_is_tunnel;     ///< last turn passed tunnel
    31 	bool                m_is_tunnel;     ///< last turn passed tunnel
    32 	bool                m_is_bridge;     ///< last turn passed bridge ramp
    32 	bool                m_is_bridge;     ///< last turn passed bridge ramp
    33 	bool                m_is_station;    ///< last turn passed station
    33 	bool                m_is_station;    ///< last turn passed station
    34 	int                 m_tiles_skipped; ///< number of skipped tunnel or station tiles
    34 	int                 m_tiles_skipped; ///< number of skipped tunnel or station tiles
    35 	ErrorCode           m_err;
    35 	ErrorCode           m_err;
    36 	CPerformanceTimer* m_pPerf;
    36 	CPerformanceTimer  *m_pPerf;
    37 
    37 
    38 	FORCEINLINE CFollowTrackT(const Vehicle* v = NULL, CPerformanceTimer* pPerf = NULL)
    38 	FORCEINLINE CFollowTrackT(const Vehicle *v = NULL, CPerformanceTimer* pPerf = NULL)
    39 	{
    39 	{
    40 		Init(v, pPerf);
    40 		Init(v, pPerf);
    41 	}
    41 	}
    42 
    42 
    43 	FORCEINLINE void Init(const Vehicle* v, CPerformanceTimer* pPerf)
    43 	FORCEINLINE void Init(const Vehicle *v, CPerformanceTimer* pPerf)
    44 	{
    44 	{
    45 		assert(!IsRailTT() || (v != NULL && v->type == VEH_TRAIN));
    45 		assert(!IsRailTT() || (v != NULL && v->type == VEH_TRAIN));
    46 		m_veh = v;
    46 		m_veh = v;
    47 		m_pPerf = pPerf;
    47 		m_pPerf = pPerf;
    48 		// don't worry, all is inlined so compiler should remove unnecessary initializations
    48 		// don't worry, all is inlined so compiler should remove unnecessary initializations