(svn r4348) Move IsLevelCrossing() from rail.h to road_map.h
authortron
Mon, 10 Apr 2006 20:38:59 +0000
changeset 3497 b3b7e1664379
parent 3496 2775485abdf6
child 3498 3441bc83c28a
(svn r4348) Move IsLevelCrossing() from rail.h to road_map.h
rail.h
road_map.h
--- a/rail.h	Mon Apr 10 16:20:47 2006 +0000
+++ b/rail.h	Mon Apr 10 20:38:59 2006 +0000
@@ -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	Mon Apr 10 16:20:47 2006 +0000
+++ b/road_map.h	Mon Apr 10 20:38:59 2006 +0000
@@ -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)
 {