summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--station.h5
-rw-r--r--station_map.h6
2 files changed, 6 insertions, 5 deletions
diff --git a/station.h b/station.h
index f62990509..c1538bf9d 100644
--- a/station.h
+++ b/station.h
@@ -194,11 +194,6 @@ uint GetStationPlatforms(const Station *st, TileIndex tile);
void StationPickerDrawSprite(int x, int y, RailType railtype, int image);
RoadStop * GetRoadStopByTile(TileIndex tile, RoadStopType type);
-static inline RoadStopType GetRoadStopType(TileIndex tile)
-{
- return (_m[tile].m5 < 0x47) ? RS_TRUCK : RS_BUS;
-}
-
RoadStop * GetPrimaryRoadStop(const Station *st, RoadStopType type);
uint GetNumRoadStops(const Station* st, RoadStopType type);
RoadStop * AllocateRoadStop( void );
diff --git a/station_map.h b/station_map.h
index 41d9f6ce4..77d1f435f 100644
--- a/station_map.h
+++ b/station_map.h
@@ -60,6 +60,12 @@ typedef enum StationType {
StationType GetStationType(TileIndex);
+static inline RoadStopType GetRoadStopType(TileIndex t)
+{
+ assert(GetStationType(t) == STATION_TRUCK || GetStationType(t) == STATION_BUS);
+ return GetStationType(t) == STATION_TRUCK ? RS_TRUCK : RS_BUS;
+}
+
static inline bool IsRailwayStation(TileIndex t)
{
return _m[t].m5 < RAILWAY_BASE + RAILWAY_SIZE;