summaryrefslogtreecommitdiff
path: root/tunnel_map.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2006-12-29 09:10:44 +0000
committerrubidium <rubidium@openttd.org>2006-12-29 09:10:44 +0000
commit0d459f909cefe93e20f606dca9b576881dfc4704 (patch)
tree905d42765705ac20ac00b2134ee9290fb427f3a8 /tunnel_map.h
parent9cb975f7f077a4d6e8be2e7e5540a8a85b6ed3f9 (diff)
downloadopenttd-0d459f909cefe93e20f606dca9b576881dfc4704.tar.xz
(svn r7607) -Codechange: remove direct map accesses for snow/desert on tunnels and bridges.
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 9ad54d07e..c9a3a36a3 100644
--- a/tunnel_map.h
+++ b/tunnel_map.h
@@ -35,6 +35,18 @@ static inline TransportType GetTunnelTransportType(TileIndex t)
return (TransportType)GB(_m[t].m5, 2, 2);
}
+static inline bool HasTunnelSnowOrDesert(TileIndex t)
+{
+ assert(IsTunnelTile(t));
+ return HASBIT(_m[t].m4, 7);
+}
+
+static inline void SetTunnelSnowOrDesert(TileIndex t, bool snow_or_desert)
+{
+ assert(IsTunnelTile(t));
+ SB(_m[t].m4, 7, 1, snow_or_desert);
+}
+
TileIndex GetOtherTunnelEnd(TileIndex);
bool IsTunnelInWay(TileIndex, uint z);