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
commitdb9706cb800b0cfa20d36551c796f81619707173 (patch)
tree3b4d33841e65351365a09bb79e14272d518bca1b /road_map.h
parentd1bd1a7035569f1adc87e0a30ab94b4ce97b13b8 (diff)
downloadopenttd-db9706cb800b0cfa20d36551c796f81619707173.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,