summaryrefslogtreecommitdiff
path: root/bridge_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
commit50d681c1e9c87b4b1c7addbbfc1d11226eb51f26 (patch)
tree905d42765705ac20ac00b2134ee9290fb427f3a8 /bridge_map.h
parenta367897eb870b85b968bee63e95637975080418d (diff)
downloadopenttd-50d681c1e9c87b4b1c7addbbfc1d11226eb51f26.tar.xz
(svn r7607) -Codechange: remove direct map accesses for snow/desert on tunnels and bridges.
Diffstat (limited to 'bridge_map.h')
-rw-r--r--bridge_map.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/bridge_map.h b/bridge_map.h
index 34da494bf..1cda0da9d 100644
--- a/bridge_map.h
+++ b/bridge_map.h
@@ -81,6 +81,19 @@ static inline TransportType GetBridgeTransportType(TileIndex t)
}
+static inline bool HasBridgeSnowOrDesert(TileIndex t)
+{
+ assert(IsBridgeTile(t));
+ return HASBIT(_m[t].m4, 7);
+}
+
+
+static inline void SetBridgeSnowOrDesert(TileIndex t, bool snow_or_desert)
+{
+ assert(IsBridgeTile(t));
+ SB(_m[t].m4, 7, 1, snow_or_desert);
+}
+
/**
* Finds the end of a bridge in the specified direction starting at a middle tile
*/