(svn r11644) -Codechange: merge some functions from tunnel_map.h and bridge_map.h into tunnelbridge_map.h

This commit is contained in:
smatz
2007-12-16 15:38:51 +00:00
parent 8ce9c5f29b
commit 926fe5c9e9
28 changed files with 245 additions and 241 deletions

View File

@@ -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;