mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +00:00
(svn r4348) Move IsLevelCrossing() from rail.h to road_map.h
This commit is contained in:
parent
8166a53179
commit
f4a8818dbf
7
rail.h
7
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.
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user