summaryrefslogtreecommitdiff
path: root/bridge_map.h
diff options
context:
space:
mode:
Diffstat (limited to 'bridge_map.h')
-rw-r--r--bridge_map.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/bridge_map.h b/bridge_map.h
index 9d504f06c..7214425c6 100644
--- a/bridge_map.h
+++ b/bridge_map.h
@@ -28,6 +28,23 @@ static inline DiagDirection GetBridgeRampDirection(TileIndex t)
}
+static inline bool IsClearUnderBridge(TileIndex t)
+{
+ return GB(_m[t].m5, 3, 3) == 0;
+}
+
+
+static inline bool IsTransportUnderBridge(TileIndex t)
+{
+ return HASBIT(_m[t].m5, 5);
+}
+
+static inline TransportType GetTransportTypeUnderBridge(TileIndex t)
+{
+ return (TransportType)GB(_m[t].m5, 3, 2);
+}
+
+
/**
* Starting at one bridge end finds the other bridge end
*/