summaryrefslogtreecommitdiff
path: root/src/bridge_map.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/bridge_map.cpp')
-rw-r--r--src/bridge_map.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/bridge_map.cpp b/src/bridge_map.cpp
index 318249a4f..8509f305f 100644
--- a/src/bridge_map.cpp
+++ b/src/bridge_map.cpp
@@ -8,6 +8,7 @@
#include "bridge.h"
#include "variables.h"
#include "landscape.h"
+#include "tunnelbridge_map.h"
TileIndex GetBridgeEnd(TileIndex tile, DiagDirection dir)
@@ -17,7 +18,7 @@ TileIndex GetBridgeEnd(TileIndex tile, DiagDirection dir)
dir = ReverseDiagDir(dir);
do {
tile += delta;
- } while (!IsBridgeTile(tile) || GetBridgeRampDirection(tile) != dir);
+ } while (!IsBridgeTile(tile) || GetTunnelBridgeDirection(tile) != dir);
return tile;
}
@@ -38,14 +39,14 @@ TileIndex GetSouthernBridgeEnd(TileIndex t)
TileIndex GetOtherBridgeEnd(TileIndex tile)
{
assert(IsBridgeTile(tile));
- return GetBridgeEnd(tile, GetBridgeRampDirection(tile));
+ return GetBridgeEnd(tile, GetTunnelBridgeDirection(tile));
}
uint GetBridgeHeight(TileIndex t)
{
uint h;
Slope tileh = GetTileSlope(t, &h);
- Foundation f = GetBridgeFoundation(tileh, DiagDirToAxis(GetBridgeRampDirection(t)));
+ Foundation f = GetBridgeFoundation(tileh, DiagDirToAxis(GetTunnelBridgeDirection(t)));
/* one height level extra for the ramp */
return h + TILE_HEIGHT + ApplyFoundationToSlope(f, &tileh);