diff options
author | rubidium <rubidium@openttd.org> | 2009-05-22 20:18:45 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-05-22 20:18:45 +0000 |
commit | d37b840cf30ea987ab676f1a3631e112cac06244 (patch) | |
tree | e66cefea331f2f4191a6c169e75e9f272b60ef1e /src/roadveh.h | |
parent | c882248348510265e1926b0abc031b4c6fb0f97f (diff) | |
download | openttd-d37b840cf30ea987ab676f1a3631e112cac06244.tar.xz |
(svn r16389) -Codechange: use RoadVehicle instead of Vehicle where appropriate
Diffstat (limited to 'src/roadveh.h')
-rw-r--r-- | src/roadveh.h | 9 |
1 files changed, 7 insertions, 2 deletions
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 */ |