equal
deleted
inserted
replaced
23 case MP_STATION: |
23 case MP_STATION: |
24 if (!IsRoadStationTile(tile)) return 0; |
24 if (!IsRoadStationTile(tile)) return 0; |
25 return DiagDirToRoadBits(GetRoadStationDir(tile)); |
25 return DiagDirToRoadBits(GetRoadStationDir(tile)); |
26 |
26 |
27 case MP_TUNNELBRIDGE: |
27 case MP_TUNNELBRIDGE: |
28 if (_m[tile].m5 & 0x80) { |
28 if (IsBridge(tile)) { |
29 // bridge |
29 if (IsBridgeMiddle(tile)) { |
30 if (_m[tile].m5 & 0x40) { |
30 if (!IsTransportUnderBridge(tile) || |
31 // middle part |
31 GetBridgeTransportType(tile) != TRANSPORT_ROAD) { |
32 if ((_m[tile].m5 & 0x38) != 0x28) return 0; // no road under bridge |
32 return 0; |
33 return _m[tile].m5 & 1 ? ROAD_X : ROAD_Y; |
33 } |
|
34 return GetRoadBitsUnderBridge(tile); |
34 } else { |
35 } else { |
35 // ending |
36 // ending |
36 if (GB(_m[tile].m5, 1, 2) != TRANSPORT_ROAD) return 0; // not a road bridge |
37 if (GetBridgeTransportType(tile) != TRANSPORT_ROAD) return 0; |
37 return DiagDirToRoadBits(ReverseDiagDir(GetBridgeRampDirection(tile))); |
38 return DiagDirToRoadBits(ReverseDiagDir(GetBridgeRampDirection(tile))); |
38 } |
39 } |
39 } else { |
40 } else { |
40 // tunnel |
41 // tunnel |
41 if (GetTunnelTransportType(tile) != TRANSPORT_ROAD) return 0; |
42 if (GetTunnelTransportType(tile) != TRANSPORT_ROAD) return 0; |