(svn r4155) -Changed GetRoadStopByTile to use GetStationType and moved it. TODO: unify RS_TRUCK and STATION_TRUCK (same for bus)

This commit is contained in:
celestar
2006-03-29 19:37:18 +00:00
parent 8310a46351
commit 3ae99e17bb
2 changed files with 6 additions and 5 deletions

View File

@@ -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;