diff options
author | rubidium <rubidium@openttd.org> | 2006-12-29 09:10:44 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2006-12-29 09:10:44 +0000 |
commit | 0d459f909cefe93e20f606dca9b576881dfc4704 (patch) | |
tree | 905d42765705ac20ac00b2134ee9290fb427f3a8 /bridge_map.h | |
parent | 9cb975f7f077a4d6e8be2e7e5540a8a85b6ed3f9 (diff) | |
download | openttd-0d459f909cefe93e20f606dca9b576881dfc4704.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.h | 13 |
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 */ |