From d37b840cf30ea987ab676f1a3631e112cac06244 Mon Sep 17 00:00:00 2001 From: rubidium Date: Fri, 22 May 2009 20:18:45 +0000 Subject: (svn r16389) -Codechange: use RoadVehicle instead of Vehicle where appropriate --- src/roadveh.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/roadveh.h') diff --git a/src/roadveh.h b/src/roadveh.h index 2e42972ff..c27ed254d 100644 --- a/src/roadveh.h +++ b/src/roadveh.h @@ -10,6 +10,8 @@ #include "engine_base.h" #include "economy_func.h" +struct RoadVehicle; + /** State information about the Road Vehicle controller */ enum { RDE_NEXT_TILE = 0x80, ///< We should enter the next tile @@ -68,9 +70,9 @@ static inline bool RoadVehHasArticPart(const Vehicle *v) void CcBuildRoadVeh(bool success, TileIndex tile, uint32 p1, uint32 p2); -byte GetRoadVehLength(const Vehicle *v); +byte GetRoadVehLength(const RoadVehicle *v); -void RoadVehUpdateCache(Vehicle *v); +void RoadVehUpdateCache(RoadVehicle *v); /** @@ -104,6 +106,9 @@ struct RoadVehicle : public Vehicle { Trackdir GetVehicleTrackdir() const; TileIndex GetOrderStationLocation(StationID station); bool FindClosestDepot(TileIndex *location, DestinationID *destination, bool *reverse); + RoadVehicle *First() { return (RoadVehicle *)this->Vehicle::First(); } + RoadVehicle *Next() { return (RoadVehicle *)this->Vehicle::Next(); } + const RoadVehicle *Next() const { return (const RoadVehicle *)this->Vehicle::Next(); } }; #endif /* ROADVEH_H */ -- cgit v1.2.3-54-g00ecf