equal
deleted
inserted
replaced
1275 return z + GetPartialZ(x, y, tileh); |
1275 return z + GetPartialZ(x, y, tileh); |
1276 } |
1276 } |
1277 |
1277 |
1278 static uint GetSlopeTileh_TunnelBridge(const TileInfo* ti) |
1278 static uint GetSlopeTileh_TunnelBridge(const TileInfo* ti) |
1279 { |
1279 { |
1280 // not accurate, but good enough for slope graphics drawing |
1280 TileIndex tile = ti->tile; |
1281 return 0; |
1281 Slope tileh = ti->tileh; |
|
1282 uint f; |
|
1283 |
|
1284 if (IsTunnel(tile)) { |
|
1285 return tileh; |
|
1286 } else { |
|
1287 if (IsBridgeRamp(tile)) { |
|
1288 if (HASBIT(BRIDGE_NO_FOUNDATION, tileh)) { |
|
1289 return tileh; |
|
1290 } else { |
|
1291 f = GetBridgeFoundation(tileh, DiagDirToAxis(GetBridgeRampDirection(tile))); |
|
1292 } |
|
1293 } else { |
|
1294 if (IsTransportUnderBridge(tile)) { |
|
1295 f = _bridge_foundations[GetBridgeAxis(tile)][tileh]; |
|
1296 } else { |
|
1297 return tileh; |
|
1298 } |
|
1299 } |
|
1300 } |
|
1301 |
|
1302 if (f == 0) return tileh; |
|
1303 if (f < 15) return SLOPE_FLAT; |
|
1304 return _inclined_tileh[f - 15]; |
1282 } |
1305 } |
1283 |
1306 |
1284 |
1307 |
1285 static void GetAcceptedCargo_TunnelBridge(TileIndex tile, AcceptedCargo ac) |
1308 static void GetAcceptedCargo_TunnelBridge(TileIndex tile, AcceptedCargo ac) |
1286 { |
1309 { |