summaryrefslogtreecommitdiff
path: root/bridge_map.h
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-03-15 17:27:15 +0000
committertron <tron@openttd.org>2006-03-15 17:27:15 +0000
commitf262ae6c8b03f4a66397a2f70780d23328d90d51 (patch)
treedfff458d3f484bf166116fb807438f023da5fa3b /bridge_map.h
parentdcf6c85bf2a9b88e8b2839e3aebc91e5576d111e (diff)
downloadopenttd-f262ae6c8b03f4a66397a2f70780d23328d90d51.tar.xz
(svn r3889) Change a part of the bridge drawing code to make it more comprehensible and add the needed accessors
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
*/