summaryrefslogtreecommitdiff
path: root/src/road_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/road_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/road_map.cpp')
-rw-r--r--src/road_map.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/road_map.cpp b/src/road_map.cpp
index 7dc26f079..0bdf66dfe 100644
--- a/src/road_map.cpp
+++ b/src/road_map.cpp
@@ -12,6 +12,7 @@
#include "tunnel_map.h"
#include "station_map.h"
#include "depot.h"
+#include "tunnelbridge_map.h"
RoadBits GetAnyRoadBits(TileIndex tile, RoadType rt)
@@ -34,11 +35,11 @@ RoadBits GetAnyRoadBits(TileIndex tile, RoadType rt)
case MP_TUNNELBRIDGE:
if (IsTunnel(tile)) {
- if (GetTunnelTransportType(tile) != TRANSPORT_ROAD) return ROAD_NONE;
- return DiagDirToRoadBits(ReverseDiagDir(GetTunnelDirection(tile)));
+ if (GetTunnelBridgeTransportType(tile) != TRANSPORT_ROAD) return ROAD_NONE;
+ return DiagDirToRoadBits(ReverseDiagDir(GetTunnelBridgeDirection(tile)));
} else {
- if (GetBridgeTransportType(tile) != TRANSPORT_ROAD) return ROAD_NONE;
- return DiagDirToRoadBits(ReverseDiagDir(GetBridgeRampDirection(tile)));
+ if (GetTunnelBridgeTransportType(tile) != TRANSPORT_ROAD) return ROAD_NONE;
+ return DiagDirToRoadBits(ReverseDiagDir(GetTunnelBridgeDirection(tile)));
}
default: return ROAD_NONE;