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 | 626109f3f967a9ab4918808351fde640aafaa27b (patch) | |
tree | 64e50bf99a33465decab370d13970df72c292068 /bridge_map.h | |
parent | bd5def0092b9373a137aa2f37db76152bc839444 (diff) | |
download | openttd-626109f3f967a9ab4918808351fde640aafaa27b.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); |