From f4a8818dbfd894cc8f601fddd12bf44c3ba4fc13 Mon Sep 17 00:00:00 2001 From: tron Date: Mon, 10 Apr 2006 20:38:59 +0000 Subject: [PATCH] (svn r4348) Move IsLevelCrossing() from rail.h to road_map.h --- rail.h | 7 ------- road_map.h | 5 +++++ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/rail.h b/rail.h index 12dbe4f617..f8357ed35f 100644 --- a/rail.h +++ b/rail.h @@ -428,13 +428,6 @@ static inline SignalState GetSignalState(TileIndex tile, Trackdir trackdir) */ 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. diff --git a/road_map.h b/road_map.h index d7858cfc95..b93dd85818 100644 --- a/road_map.h +++ b/road_map.h @@ -40,6 +40,11 @@ static inline RoadType GetRoadType(TileIndex t) return GB(_m[t].m5, 4, 4); } +static inline bool IsLevelCrossing(TileIndex t) +{ + return GetRoadType(t) == ROAD_CROSSING; +} + static inline RoadBits GetRoadBits(TileIndex t) {