changeset 3497:cd61c2db8e5b draft

(svn r4348) Move IsLevelCrossing() from rail.h to road_map.h
author tron <tron@openttd.org>
date Mon, 10 Apr 2006 20:38:59 +0000
parents 373e8cb52153
children debafc896fd8
files rail.h road_map.h
diffstat 2 files changed, 5 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/rail.h
+++ b/rail.h
@@ -428,13 +428,6 @@
  */
 RailType GetTileRailType(TileIndex tile, Trackdir trackdir);
 
-/**
- * Returns whether the given tile is a level crossing.
- */
-static inline bool IsLevelCrossing(TileIndex tile)
-{
-	return (_m[tile].m5 & 0xF0) == 0x10;
-}
 
 /**
  * Gets the transport type of the given track on the given crossing tile.
--- a/road_map.h
+++ b/road_map.h
@@ -40,6 +40,11 @@
 	return GB(_m[t].m5, 4, 4);
 }
 
+static inline bool IsLevelCrossing(TileIndex t)
+{
+	return GetRoadType(t) == ROAD_CROSSING;
+}
+
 
 static inline RoadBits GetRoadBits(TileIndex t)
 {