Mercurial > hg > openttd
diff src/rail_map.h @ 8954:454ba10a0cff draft
(svn r12745) -Codechange: a bit of naming conventions, introduce Is*DepotTile()
author | smatz <smatz@openttd.org> |
---|---|
date | Thu, 17 Apr 2008 00:44:20 +0000 |
parents | 8207d9e330cc |
children | c8a0fa0e208a |
line wrap: on
line diff
--- a/src/rail_map.h +++ b/src/rail_map.h @@ -72,7 +72,18 @@ } /** - * Is this tile a rail depot? + * Is this rail tile a rail waypoint? + * @param t the tile to get the information from + * @pre IsTileType(t, MP_RAILWAY) + * @return true if and only if the tile is a rail waypoint + */ +static inline bool IsRailWaypoint(TileIndex t) +{ + return GetRailTileType(t) == RAIL_TILE_WAYPOINT; +} + +/** + * Is this rail tile a rail depot? * @param t the tile to get the information from * @pre IsTileType(t, MP_RAILWAY) * @return true if and only if the tile is a rail depot @@ -83,17 +94,16 @@ } /** - * Is this tile a rail waypoint? + * Is this tile rail tile and a rail depot? * @param t the tile to get the information from * @pre IsTileType(t, MP_RAILWAY) - * @return true if and only if the tile is a rail waypoint + * @return true if and only if the tile is a rail depot */ -static inline bool IsRailWaypoint(TileIndex t) +static inline bool IsRailDepotTile(TileIndex t) { - return GetRailTileType(t) == RAIL_TILE_WAYPOINT; + return IsTileType(t, MP_RAILWAY) && IsRailDepot(t); } - /** * Gets the rail type of the given tile * @param t the tile to get the rail type from