summaryrefslogtreecommitdiff
path: root/tunnel_map.h
diff options
context:
space:
mode:
Diffstat (limited to 'tunnel_map.h')
-rw-r--r--tunnel_map.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/tunnel_map.h b/tunnel_map.h
index 047f631f9..6ac6cb44b 100644
--- a/tunnel_map.h
+++ b/tunnel_map.h
@@ -9,6 +9,18 @@
#include "rail.h"
+static inline bool IsTunnel(TileIndex t)
+{
+ return !HASBIT(_m[t].m5, 7);
+}
+
+
+static inline bool IsTunnelTile(TileIndex t)
+{
+ return IsTileType(t, MP_TUNNELBRIDGE) && IsTunnel(t);
+}
+
+
static inline DiagDirection GetTunnelDirection(TileIndex t)
{
return (DiagDirection)GB(_m[t].m5, 0, 2);