From db9706cb800b0cfa20d36551c796f81619707173 Mon Sep 17 00:00:00 2001 From: celestar Date: Fri, 24 Mar 2006 15:24:16 +0000 Subject: (svn r4088) -Codechange: Introduce {Unb,B}arCrossing and IsCrossingBarred to put and get the status of a level crossing --- road_map.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'road_map.h') diff --git a/road_map.h b/road_map.h index feb7656cb..412616a65 100644 --- a/road_map.h +++ b/road_map.h @@ -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, -- cgit v1.2.3-54-g00ecf