diff options
author | tron <tron@openttd.org> | 2006-03-15 16:44:50 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-03-15 16:44:50 +0000 |
commit | 3d9c76d8b81794ad2e13242eafca1022b6dfbca6 (patch) | |
tree | 64e50bf99a33465decab370d13970df72c292068 /bridge_map.h | |
parent | 962852b732e02e77438a4a9f8225f87f5009aa55 (diff) | |
download | openttd-3d9c76d8b81794ad2e13242eafca1022b6dfbca6.tar.xz |
(svn r3887) Add a function to get the other bridge end when you're at a bridge ramp
Diffstat (limited to 'bridge_map.h')
-rw-r--r-- | bridge_map.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/bridge_map.h b/bridge_map.h index 6b2c92cdf..9d504f06c 100644 --- a/bridge_map.h +++ b/bridge_map.h @@ -10,6 +10,12 @@ #include "tile.h" +static inline bool IsBridgeRamp(TileIndex t) +{ + return !HASBIT(_m[t].m5, 6); +} + + /** * Get the direction pointing onto the bridge */ @@ -22,6 +28,12 @@ static inline DiagDirection GetBridgeRampDirection(TileIndex t) } +/** + * Starting at one bridge end finds the other bridge end + */ +TileIndex GetOtherBridgeEnd(TileIndex); + + static inline void SetClearUnderBridge(TileIndex t) { SetTileOwner(t, OWNER_NONE); |