diff options
author | celestar <celestar@openttd.org> | 2006-03-29 19:37:18 +0000 |
---|---|---|
committer | celestar <celestar@openttd.org> | 2006-03-29 19:37:18 +0000 |
commit | 3ae99e17bbf4ceb9b10019473f48c9b73221af55 (patch) | |
tree | 7a0d4bdad6d3567a2b54f69e19309a9d581123cf /station_map.h | |
parent | 8310a463513375d2a31eab0795d923a0eed1c2b1 (diff) | |
download | openttd-3ae99e17bbf4ceb9b10019473f48c9b73221af55.tar.xz |
(svn r4155) -Changed GetRoadStopByTile to use GetStationType and moved it. TODO: unify RS_TRUCK and STATION_TRUCK (same for bus)
Diffstat (limited to 'station_map.h')
-rw-r--r-- | station_map.h | 6 |
1 files changed, 6 insertions, 0 deletions
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; |