From f188d35dac3608264880c5c5455777d160d77a7c Mon Sep 17 00:00:00 2001 From: celestar Date: Wed, 29 Mar 2006 19:37:18 +0000 Subject: (svn r4155) -Changed GetRoadStopByTile to use GetStationType and moved it. TODO: unify RS_TRUCK and STATION_TRUCK (same for bus) --- station_map.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'station_map.h') 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; -- cgit v1.2.3-54-g00ecf