summaryrefslogtreecommitdiff
path: root/road_map.h
diff options
context:
space:
mode:
authorcelestar <celestar@openttd.org>2006-03-24 15:24:16 +0000
committercelestar <celestar@openttd.org>2006-03-24 15:24:16 +0000
commit842eac5d7fb8c5408f75797f243876dc20a1454e (patch)
tree3b4d33841e65351365a09bb79e14272d518bca1b /road_map.h
parent0977a8a04e9c28d714a6b599d19bc8006f39ca03 (diff)
downloadopenttd-842eac5d7fb8c5408f75797f243876dc20a1454e.tar.xz
(svn r4088) -Codechange: Introduce {Unb,B}arCrossing and IsCrossingBarred to put and get the status of a level crossing
Diffstat (limited to 'road_map.h')
-rw-r--r--road_map.h14
1 files changed, 14 insertions, 0 deletions
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,