summaryrefslogtreecommitdiff
path: root/src/rail_map.h
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-05-18 01:26:23 +0000
committersmatz <smatz@openttd.org>2009-05-18 01:26:23 +0000
commit0af27062c4d17148f357c0da1f8b9ce996601463 (patch)
tree1d4e22ed82a0995464f2789b1fd4c47ea8609e21 /src/rail_map.h
parentd1f9a90d3217709903530e58a641c18d61c96918 (diff)
downloadopenttd-0af27062c4d17148f357c0da1f8b9ce996601463.tar.xz
(svn r16349) -Codechange: rename IsPlainRailTile() to IsPlainRail(), introduce shiny new IsPlainRailTile()
Diffstat (limited to 'src/rail_map.h')
-rw-r--r--src/rail_map.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/rail_map.h b/src/rail_map.h
index 195aef9f5..bfdc19f6d 100644
--- a/src/rail_map.h
+++ b/src/rail_map.h
@@ -42,13 +42,24 @@ static inline RailTileType GetRailTileType(TileIndex t)
* @pre IsTileType(t, MP_RAILWAY)
* @return true if and only if the tile is normal rail (with or without signals)
*/
-static inline bool IsPlainRailTile(TileIndex t)
+static inline bool IsPlainRail(TileIndex t)
{
RailTileType rtt = GetRailTileType(t);
return rtt == RAIL_TILE_NORMAL || rtt == RAIL_TILE_SIGNALS;
}
/**
+ * Checks whether the tile is a rail tile or rail tile with signals.
+ * @param t the tile to get the information from
+ * @return true if and only if the tile is normal rail (with or without signals)
+ */
+static inline bool IsPlainRailTile(TileIndex t)
+{
+ return IsTileType(t, MP_RAILWAY) && IsPlainRail(t);
+}
+
+
+/**
* Checks if a rail tile has signals.
* @param t the tile to get the information from
* @pre IsTileType(t, MP_RAILWAY)