src/rail.cpp
changeset 8083 ad22eade501f
parent 7730 4293ba29ce21
child 8088 92fca5b09665
equal deleted inserted replaced
8082:63240e1bd6cc 8083:ad22eade501f
     6 #include "openttd.h"
     6 #include "openttd.h"
     7 #include "bridge_map.h"
     7 #include "bridge_map.h"
     8 #include "rail.h"
     8 #include "rail.h"
     9 #include "station_map.h"
     9 #include "station_map.h"
    10 #include "tunnel_map.h"
    10 #include "tunnel_map.h"
       
    11 #include "tunnelbridge_map.h"
       
    12 
    11 
    13 
    12 /* XXX: Below 3 tables store duplicate data. Maybe remove some? */
    14 /* XXX: Below 3 tables store duplicate data. Maybe remove some? */
    13 /* Maps a trackdir to the bit that stores its status in the map arrays, in the
    15 /* Maps a trackdir to the bit that stores its status in the map arrays, in the
    14  * direction along with the trackdir */
    16  * direction along with the trackdir */
    15 extern const byte _signal_along_trackdir[] = {
    17 extern const byte _signal_along_trackdir[] = {
   129 			if (IsRailwayStationTile(tile)) return GetRailType(tile);
   131 			if (IsRailwayStationTile(tile)) return GetRailType(tile);
   130 			break;
   132 			break;
   131 
   133 
   132 		case MP_TUNNELBRIDGE:
   134 		case MP_TUNNELBRIDGE:
   133 			if (IsTunnel(tile)) {
   135 			if (IsTunnel(tile)) {
   134 				if (GetTunnelTransportType(tile) == TRANSPORT_RAIL) return GetRailType(tile);
   136 				if (GetTunnelBridgeTransportType(tile) == TRANSPORT_RAIL) return GetRailType(tile);
   135 			} else {
   137 			} else {
   136 				if (GetBridgeTransportType(tile) == TRANSPORT_RAIL) return GetRailType(tile);
   138 				if (GetTunnelBridgeTransportType(tile) == TRANSPORT_RAIL) return GetRailType(tile);
   137 			}
   139 			}
   138 			break;
   140 			break;
   139 
   141 
   140 		default:
   142 		default:
   141 			break;
   143 			break;