(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 ec90ce7e98
commit 3cee0abdba
28 changed files with 245 additions and 241 deletions

View File

@@ -8,6 +8,8 @@
#include "rail.h"
#include "station_map.h"
#include "tunnel_map.h"
#include "tunnelbridge_map.h"
/* XXX: Below 3 tables store duplicate data. Maybe remove some? */
/* Maps a trackdir to the bit that stores its status in the map arrays, in the
@@ -131,9 +133,9 @@ RailType GetTileRailType(TileIndex tile)
case MP_TUNNELBRIDGE:
if (IsTunnel(tile)) {
if (GetTunnelTransportType(tile) == TRANSPORT_RAIL) return GetRailType(tile);
if (GetTunnelBridgeTransportType(tile) == TRANSPORT_RAIL) return GetRailType(tile);
} else {
if (GetBridgeTransportType(tile) == TRANSPORT_RAIL) return GetRailType(tile);
if (GetTunnelBridgeTransportType(tile) == TRANSPORT_RAIL) return GetRailType(tile);
}
break;