diff options
author | tron <tron@openttd.org> | 2006-03-15 17:27:15 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-03-15 17:27:15 +0000 |
commit | 23d5188b7bf9eb9a097f5296501f2506aeff6aeb (patch) | |
tree | dfff458d3f484bf166116fb807438f023da5fa3b /bridge_map.h | |
parent | e74d77211fab8ea22aad6d95bcbb855aebe3c85c (diff) | |
download | openttd-23d5188b7bf9eb9a097f5296501f2506aeff6aeb.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.h | 17 |
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 */ |