diff options
author | tron <tron@openttd.org> | 2006-07-27 05:30:53 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-07-27 05:30:53 +0000 |
commit | 2bb9fd390106356830b6c77cd93eb03efdf12f78 (patch) | |
tree | 402e84c5a08dd81d1c5453aa00229a86afbb0248 /rail_map.h | |
parent | b0d5005cadad967b67f65f6f154cf4b8e749f7b6 (diff) | |
download | openttd-2bb9fd390106356830b6c77cd93eb03efdf12f78.tar.xz |
(svn r5624) Use {IsPlainRailTile,IsRailDepot,IsRailWaypoint,HasSignals}() instead of GetRailTile{T,Subt}ype() - this is more concise and a bit more flexible if/when the rail tile encoding changes
Diffstat (limited to 'rail_map.h')
-rw-r--r-- | rail_map.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/rail_map.h b/rail_map.h index df897c91d..cf099b53b 100644 --- a/rail_map.h +++ b/rail_map.h @@ -60,6 +60,14 @@ static inline RailTileSubtype GetRailTileSubtype(TileIndex tile) } +static inline bool IsRailDepot(TileIndex t) +{ + return + GetRailTileType(t) == RAIL_TILE_DEPOT_WAYPOINT && + GetRailTileSubtype(t) == RAIL_SUBTYPE_DEPOT; +} + + static inline bool IsRailWaypoint(TileIndex t) { return |