changeset 4344 | 5d0e40cd67b9 |
parent 4304 | 5e26af218efd |
child 4434 | 4175805666a5 |
4343:c5b7f4f03168 | 4344:5d0e40cd67b9 |
---|---|
844 { |
844 { |
845 return GetBridgeHeightRamp(GetSouthernBridgeEnd(t)); |
845 return GetBridgeHeightRamp(GetSouthernBridgeEnd(t)); |
846 } |
846 } |
847 |
847 |
848 static const byte _bridge_foundations[][31] = { |
848 static const byte _bridge_foundations[][31] = { |
849 // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 _S _W _N _E |
849 // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 _S _W _N _E |
850 { 0,16,18, 3,20, 5, 0, 7,22, 0,10,11,12,13,14, 0, 0, 0, 0, 0, 0, 0, 0,18, 0, 0, 0,16, 0,22,20 }, |
850 { 0, 16, 18, 3, 20, 5, 0, 7, 22, 0, 10, 11, 12, 13, 14, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 16, 0, 22, 20 }, |
851 { 0,15,17, 0,19, 5, 6, 7,21, 9,10,11, 0,13,14, 0, 0, 0, 0, 0, 0, 0, 0,17, 0, 0, 0,15, 0,21,19 } |
851 { 0, 15, 17, 0, 19, 5, 6, 7, 21, 9, 10, 11, 0, 13, 14, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 15, 0, 21, 19 } |
852 }; |
852 }; |
853 |
853 |
854 extern const byte _road_sloped_sprites[14]; |
854 extern const byte _road_sloped_sprites[14]; |
855 |
855 |
856 static void DrawBridgePillars(PalSpriteID image, const TileInfo *ti, int x, int y, int z) |
856 static void DrawBridgePillars(PalSpriteID image, const TileInfo *ti, int x, int y, int z) |
1216 STR_501D_STEEL_CANTILEVER_RAIL_BRIDGE, |
1216 STR_501D_STEEL_CANTILEVER_RAIL_BRIDGE, |
1217 STR_501C_STEEL_GIRDER_RAIL_BRIDGE, |
1217 STR_501C_STEEL_GIRDER_RAIL_BRIDGE, |
1218 STR_5027_TUBULAR_RAIL_BRIDGE, |
1218 STR_5027_TUBULAR_RAIL_BRIDGE, |
1219 STR_5027_TUBULAR_RAIL_BRIDGE, |
1219 STR_5027_TUBULAR_RAIL_BRIDGE, |
1220 STR_5027_TUBULAR_RAIL_BRIDGE, |
1220 STR_5027_TUBULAR_RAIL_BRIDGE, |
1221 0,0,0, |
1221 0, 0, 0, |
1222 |
1222 |
1223 STR_5025_WOODEN_ROAD_BRIDGE, |
1223 STR_5025_WOODEN_ROAD_BRIDGE, |
1224 STR_5026_CONCRETE_ROAD_BRIDGE, |
1224 STR_5026_CONCRETE_ROAD_BRIDGE, |
1225 STR_5022_STEEL_GIRDER_ROAD_BRIDGE, |
1225 STR_5022_STEEL_GIRDER_ROAD_BRIDGE, |
1226 STR_5024_REINFORCED_CONCRETE_SUSPENSION, |
1226 STR_5024_REINFORCED_CONCRETE_SUSPENSION, |
1231 STR_5023_STEEL_CANTILEVER_ROAD_BRIDGE, |
1231 STR_5023_STEEL_CANTILEVER_ROAD_BRIDGE, |
1232 STR_5022_STEEL_GIRDER_ROAD_BRIDGE, |
1232 STR_5022_STEEL_GIRDER_ROAD_BRIDGE, |
1233 STR_5028_TUBULAR_ROAD_BRIDGE, |
1233 STR_5028_TUBULAR_ROAD_BRIDGE, |
1234 STR_5028_TUBULAR_ROAD_BRIDGE, |
1234 STR_5028_TUBULAR_ROAD_BRIDGE, |
1235 STR_5028_TUBULAR_ROAD_BRIDGE, |
1235 STR_5028_TUBULAR_ROAD_BRIDGE, |
1236 0,0,0, |
1236 0, 0, 0, |
1237 }; |
1237 }; |
1238 |
1238 |
1239 static void GetTileDesc_TunnelBridge(TileIndex tile, TileDesc *td) |
1239 static void GetTileDesc_TunnelBridge(TileIndex tile, TileDesc *td) |
1240 { |
1240 { |
1241 if (IsTunnel(tile)) { |
1241 if (IsTunnel(tile)) { |
1328 } |
1328 } |
1329 } |
1329 } |
1330 } |
1330 } |
1331 |
1331 |
1332 |
1332 |
1333 static const byte _tunnel_fractcoord_1[4] = {0x8E,0x18,0x81,0xE8}; |
1333 static const byte _tunnel_fractcoord_1[4] = {0x8E, 0x18, 0x81, 0xE8}; |
1334 static const byte _tunnel_fractcoord_2[4] = {0x81,0x98,0x87,0x38}; |
1334 static const byte _tunnel_fractcoord_2[4] = {0x81, 0x98, 0x87, 0x38}; |
1335 static const byte _tunnel_fractcoord_3[4] = {0x82,0x88,0x86,0x48}; |
1335 static const byte _tunnel_fractcoord_3[4] = {0x82, 0x88, 0x86, 0x48}; |
1336 static const byte _exit_tunnel_track[4] = {1,2,1,2}; |
1336 static const byte _exit_tunnel_track[4] = {1, 2, 1, 2}; |
1337 |
1337 |
1338 static const byte _road_exit_tunnel_state[4] = {8, 9, 0, 1}; |
1338 static const byte _road_exit_tunnel_state[4] = {8, 9, 0, 1}; |
1339 static const byte _road_exit_tunnel_frame[4] = {2, 7, 9, 4}; |
1339 static const byte _road_exit_tunnel_frame[4] = {2, 7, 9, 4}; |
1340 |
1340 |
1341 static const byte _tunnel_fractcoord_4[4] = {0x52, 0x85, 0x98, 0x29}; |
1341 static const byte _tunnel_fractcoord_4[4] = {0x52, 0x85, 0x98, 0x29}; |
1342 static const byte _tunnel_fractcoord_5[4] = {0x92, 0x89, 0x58, 0x25}; |
1342 static const byte _tunnel_fractcoord_5[4] = {0x92, 0x89, 0x58, 0x25}; |
1343 static const byte _tunnel_fractcoord_6[4] = {0x92, 0x89, 0x56, 0x45}; |
1343 static const byte _tunnel_fractcoord_6[4] = {0x92, 0x89, 0x56, 0x45}; |
1344 static const byte _tunnel_fractcoord_7[4] = {0x52, 0x85, 0x96, 0x49}; |
1344 static const byte _tunnel_fractcoord_7[4] = {0x52, 0x85, 0x96, 0x49}; |
1345 |
1345 |
1346 static uint32 VehicleEnter_TunnelBridge(Vehicle *v, TileIndex tile, int x, int y) |
1346 static uint32 VehicleEnter_TunnelBridge(Vehicle *v, TileIndex tile, int x, int y) |
1347 { |
1347 { |
1348 if (IsTunnel(tile)) { |
1348 if (IsTunnel(tile)) { |
1349 int z = GetSlopeZ(x, y) - v->z_pos; |
1349 int z = GetSlopeZ(x, y) - v->z_pos; |
1452 return tile; |
1452 return tile; |
1453 #endif |
1453 #endif |
1454 } |
1454 } |
1455 |
1455 |
1456 const TileTypeProcs _tile_type_tunnelbridge_procs = { |
1456 const TileTypeProcs _tile_type_tunnelbridge_procs = { |
1457 DrawTile_TunnelBridge, /* draw_tile_proc */ |
1457 DrawTile_TunnelBridge, /* draw_tile_proc */ |
1458 GetSlopeZ_TunnelBridge, /* get_slope_z_proc */ |
1458 GetSlopeZ_TunnelBridge, /* get_slope_z_proc */ |
1459 ClearTile_TunnelBridge, /* clear_tile_proc */ |
1459 ClearTile_TunnelBridge, /* clear_tile_proc */ |
1460 GetAcceptedCargo_TunnelBridge, /* get_accepted_cargo_proc */ |
1460 GetAcceptedCargo_TunnelBridge, /* get_accepted_cargo_proc */ |
1461 GetTileDesc_TunnelBridge, /* get_tile_desc_proc */ |
1461 GetTileDesc_TunnelBridge, /* get_tile_desc_proc */ |
1462 GetTileTrackStatus_TunnelBridge,/* get_tile_track_status_proc */ |
1462 GetTileTrackStatus_TunnelBridge, /* get_tile_track_status_proc */ |
1463 ClickTile_TunnelBridge, /* click_tile_proc */ |
1463 ClickTile_TunnelBridge, /* click_tile_proc */ |
1464 AnimateTile_TunnelBridge, /* animate_tile_proc */ |
1464 AnimateTile_TunnelBridge, /* animate_tile_proc */ |
1465 TileLoop_TunnelBridge, /* tile_loop_clear */ |
1465 TileLoop_TunnelBridge, /* tile_loop_clear */ |
1466 ChangeTileOwner_TunnelBridge, /* change_tile_owner_clear */ |
1466 ChangeTileOwner_TunnelBridge, /* change_tile_owner_clear */ |
1467 NULL, /* get_produced_cargo_proc */ |
1467 NULL, /* get_produced_cargo_proc */ |
1468 VehicleEnter_TunnelBridge, /* vehicle_enter_tile_proc */ |
1468 VehicleEnter_TunnelBridge, /* vehicle_enter_tile_proc */ |
1469 GetSlopeTileh_TunnelBridge, /* get_slope_tileh_proc */ |
1469 GetSlopeTileh_TunnelBridge, /* get_slope_tileh_proc */ |
1470 }; |
1470 }; |