(svn r4088) -Codechange: Introduce {Unb,B}arCrossing and IsCrossingBarred to put and get the status of a level crossing

This commit is contained in:
celestar
2006-03-24 15:24:16 +00:00
parent 0977a8a04e
commit 842eac5d7f
3 changed files with 22 additions and 9 deletions

View File

@@ -66,6 +66,20 @@ static inline void SetCrossingRoadOwner(TileIndex t, Owner o)
_m[t].m3 = o;
}
static inline void UnbarCrossing(TileIndex t)
{
CLRBIT(_m[t].m5, 2);
}
static inline void BarCrossing(TileIndex t)
{
SETBIT(_m[t].m5, 2);
}
static inline bool IsCrossingBarred(TileIndex t)
{
return HASBIT(_m[t].m5, 2);
}
typedef enum RoadType {
ROAD_NORMAL,