From c51b81c24781faad386950578a1045c9dd038fc5 Mon Sep 17 00:00:00 2001 From: rubidium Date: Mon, 31 Mar 2008 00:06:17 +0000 Subject: (svn r12489) -Codechange: split station.h into station_base.h and station_func.h. --- src/station_map.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/station_map.h') diff --git a/src/station_map.h b/src/station_map.h index f2a2f86dd..826fb4e3d 100644 --- a/src/station_map.h +++ b/src/station_map.h @@ -8,8 +8,10 @@ #include "rail_map.h" #include "road_map.h" #include "water_map.h" -#include "station.h" +#include "station_func.h" +#include "station_base.h" #include "rail.h" +#include "newgrf_station.h" typedef byte StationGfx; @@ -49,10 +51,10 @@ static inline StationType GetStationType(TileIndex t) return (StationType)GB(_m[t].m6, 3, 3); } -static inline RoadStop::Type GetRoadStopType(TileIndex t) +static inline RoadStopType GetRoadStopType(TileIndex t) { assert(GetStationType(t) == STATION_TRUCK || GetStationType(t) == STATION_BUS); - return GetStationType(t) == STATION_TRUCK ? RoadStop::TRUCK : RoadStop::BUS; + return GetStationType(t) == STATION_TRUCK ? ROADSTOP_TRUCK : ROADSTOP_BUS; } static inline StationGfx GetStationGfx(TileIndex t) @@ -260,15 +262,15 @@ static inline void MakeRailStation(TileIndex t, Owner o, StationID sid, Axis a, SetRailType(t, rt); } -static inline void MakeRoadStop(TileIndex t, Owner o, StationID sid, RoadStop::Type rst, RoadTypes rt, DiagDirection d) +static inline void MakeRoadStop(TileIndex t, Owner o, StationID sid, RoadStopType rst, RoadTypes rt, DiagDirection d) { - MakeStation(t, o, sid, (rst == RoadStop::BUS ? STATION_BUS : STATION_TRUCK), d); + MakeStation(t, o, sid, (rst == ROADSTOP_BUS ? STATION_BUS : STATION_TRUCK), d); SetRoadTypes(t, rt); } -static inline void MakeDriveThroughRoadStop(TileIndex t, Owner o, StationID sid, RoadStop::Type rst, RoadTypes rt, Axis a, bool on_town_road) +static inline void MakeDriveThroughRoadStop(TileIndex t, Owner o, StationID sid, RoadStopType rst, RoadTypes rt, Axis a, bool on_town_road) { - MakeStation(t, o, sid, (rst == RoadStop::BUS ? STATION_BUS : STATION_TRUCK), GFX_TRUCK_BUS_DRIVETHROUGH_OFFSET + a); + MakeStation(t, o, sid, (rst == ROADSTOP_BUS ? STATION_BUS : STATION_TRUCK), GFX_TRUCK_BUS_DRIVETHROUGH_OFFSET + a); SB(_m[t].m6, 2, 1, on_town_road); SetRoadTypes(t, rt); } -- cgit v1.2.3-54-g00ecf