summaryrefslogtreecommitdiff
path: root/src/tunnel_map.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2007-12-16 15:38:51 +0000
committersmatz <smatz@openttd.org>2007-12-16 15:38:51 +0000
commit3cee0abdbaf6c867ca71fec4700823f545556936 (patch)
tree3adebd2b8c9a10a6d993c67b0b5920b3598f2bce /src/tunnel_map.cpp
parentec90ce7e98b29371b0fb139256065ac9991ca289 (diff)
downloadopenttd-3cee0abdbaf6c867ca71fec4700823f545556936.tar.xz
(svn r11644) -Codechange: merge some functions from tunnel_map.h and bridge_map.h into tunnelbridge_map.h
Diffstat (limited to 'src/tunnel_map.cpp')
-rw-r--r--src/tunnel_map.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/tunnel_map.cpp b/src/tunnel_map.cpp
index 593d3fe6b..ac7255155 100644
--- a/src/tunnel_map.cpp
+++ b/src/tunnel_map.cpp
@@ -6,6 +6,8 @@
#include "openttd.h"
#include "tile.h"
#include "tunnel_map.h"
+#include "tunnelbridge_map.h"
+
/**
* Gets the other end of the tunnel. Where a vehicle would reappear when it
@@ -15,7 +17,7 @@
*/
TileIndex GetOtherTunnelEnd(TileIndex tile)
{
- DiagDirection dir = GetTunnelDirection(tile);
+ DiagDirection dir = GetTunnelBridgeDirection(tile);
TileIndexDiff delta = TileOffsByDiagDir(dir);
uint z = GetTileZ(tile);
@@ -24,7 +26,7 @@ TileIndex GetOtherTunnelEnd(TileIndex tile)
tile += delta;
} while (
!IsTunnelTile(tile) ||
- GetTunnelDirection(tile) != dir ||
+ GetTunnelBridgeDirection(tile) != dir ||
GetTileZ(tile) != z
);
@@ -52,7 +54,7 @@ bool IsTunnelInWayDir(TileIndex tile, uint z, DiagDirection dir)
return
z == height &&
IsTunnelTile(tile) &&
- GetTunnelDirection(tile) == dir;
+ GetTunnelBridgeDirection(tile) == dir;
}
/**