diff --git a/src/openrct2/ride/coaster/JuniorRollerCoaster.cpp b/src/openrct2/ride/coaster/JuniorRollerCoaster.cpp index 8ee2f6f5fb..1ae1a74b89 100644 --- a/src/openrct2/ride/coaster/JuniorRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/JuniorRollerCoaster.cpp @@ -2468,8 +2468,8 @@ static void junior_rc_left_bank_paint_setup( image_id = junior_rc_track_pieces_left_bank[direction] | session->TrackColours[SCHEME_TRACK]; sub_98197C( session, image_id, 0, 0, junior_rc_left_bank_bound_lengths[direction].x, junior_rc_left_bank_bound_lengths[direction].y, - (int8_t)junior_rc_left_bank_bound_lengths[direction].z, height, junior_rc_left_bank_bound_offsets[direction].x, - junior_rc_left_bank_bound_offsets[direction].y, height); + static_cast(junior_rc_left_bank_bound_lengths[direction].z), height, + junior_rc_left_bank_bound_offsets[direction].x, junior_rc_left_bank_bound_offsets[direction].y, height); if (direction & 1) { @@ -2732,11 +2732,13 @@ static void junior_rc_s_bend_left_paint_setup( CoordsXY bounds = boundsList[trackSequence]; if (direction == 0 || direction == 2) { - sub_98196C(session, imageId, (int8_t)offset.x, (int8_t)offset.y, bounds.x, bounds.y, 1, height); + sub_98196C( + session, imageId, static_cast(offset.x), static_cast(offset.y), bounds.x, bounds.y, 1, height); } else { - sub_98196C(session, imageId, (int8_t)offset.y, (int8_t)offset.x, bounds.y, bounds.x, 1, height); + sub_98196C( + session, imageId, static_cast(offset.y), static_cast(offset.x), bounds.y, bounds.x, 1, height); } if (direction == 0 || direction == 2) @@ -2836,11 +2838,13 @@ static void junior_rc_s_bend_right_paint_setup( CoordsXY bounds = boundsList[trackSequence]; if (direction == 0 || direction == 2) { - sub_98196C(session, imageId, (int8_t)offset.x, (int8_t)offset.y, bounds.x, bounds.y, 1, height); + sub_98196C( + session, imageId, static_cast(offset.x), static_cast(offset.y), bounds.x, bounds.y, 1, height); } else { - sub_98196C(session, imageId, (int8_t)offset.y, (int8_t)offset.x, bounds.y, bounds.x, 1, height); + sub_98196C( + session, imageId, static_cast(offset.y), static_cast(offset.x), bounds.y, bounds.x, 1, height); } if (direction == 0 || direction == 2) @@ -3086,8 +3090,8 @@ void junior_rc_paint_track_right_quarter_turn_3_tiles_25_deg_up( } if (imageId != 0) sub_98197C( - session, imageId, (int8_t)offset.x, (int8_t)offset.y, boundsLength.x, boundsLength.y, 1, height, boundsOffset.x, - boundsOffset.y, height); + session, imageId, static_cast(offset.x), static_cast(offset.y), boundsLength.x, boundsLength.y, 1, + height, boundsOffset.x, boundsOffset.y, height); if (direction == 0 && trackSequence == 0) { @@ -3165,8 +3169,8 @@ void junior_rc_paint_track_right_quarter_turn_3_tiles_25_deg_down( } if (imageId != 0) sub_98197C( - session, imageId, (int8_t)offset.x, (int8_t)offset.y, boundsLength.x, boundsLength.y, 1, height, boundsOffset.x, - boundsOffset.y, height); + session, imageId, static_cast(offset.x), static_cast(offset.y), boundsLength.x, boundsLength.y, 1, + height, boundsOffset.x, boundsOffset.y, height); if (direction == 0 && trackSequence == 0) { @@ -4951,8 +4955,8 @@ void junior_rc_paint_track_60_deg_up( image_id |= junior_rc_track_pieces_60_deg_up[chainType][direction]; sub_98197C( - session, image_id, (int8_t)junior_rc_60_deg_up_tile_offsets[direction].x, - (int8_t)junior_rc_60_deg_up_tile_offsets[direction].y, junior_rc_60_deg_up_bound_lengths[direction].x, + session, image_id, static_cast(junior_rc_60_deg_up_tile_offsets[direction].x), + static_cast(junior_rc_60_deg_up_tile_offsets[direction].y), junior_rc_60_deg_up_bound_lengths[direction].x, junior_rc_60_deg_up_bound_lengths[direction].y, junior_rc_60_deg_up_bound_thickness[direction], height, junior_rc_60_deg_up_bound_offsets[direction].x, junior_rc_60_deg_up_bound_offsets[direction].y, height); @@ -5027,8 +5031,9 @@ void junior_rc_paint_track_25_deg_up_to_60_deg_up( image_id |= junior_rc_track_pieces_25_deg_up_to_60_deg_up[chainType][direction][0]; sub_98197C( - session, image_id, (int8_t)junior_rc_60_deg_up_tile_offsets[direction].x, - (int8_t)junior_rc_60_deg_up_tile_offsets[direction].y, junior_rc_25_deg_up_to_60_deg_up_bound_lengths[direction][0].x, + session, image_id, static_cast(junior_rc_60_deg_up_tile_offsets[direction].x), + static_cast(junior_rc_60_deg_up_tile_offsets[direction].y), + junior_rc_25_deg_up_to_60_deg_up_bound_lengths[direction][0].x, junior_rc_25_deg_up_to_60_deg_up_bound_lengths[direction][0].y, junior_rc_25_deg_up_to_60_deg_up_bound_thickness[direction], height, junior_rc_25_deg_up_to_60_deg_up_bound_offsets[direction][0].x, @@ -5041,8 +5046,8 @@ void junior_rc_paint_track_25_deg_up_to_60_deg_up( image_id |= junior_rc_track_pieces_25_deg_up_to_60_deg_up[chainType][direction][1]; sub_98197C( - session, image_id, (int8_t)junior_rc_60_deg_up_tile_offsets[direction].x, - (int8_t)junior_rc_60_deg_up_tile_offsets[direction].y, + session, image_id, static_cast(junior_rc_60_deg_up_tile_offsets[direction].x), + static_cast(junior_rc_60_deg_up_tile_offsets[direction].y), junior_rc_25_deg_up_to_60_deg_up_bound_lengths[direction][1].x, junior_rc_25_deg_up_to_60_deg_up_bound_lengths[direction][1].y, junior_rc_25_deg_up_to_60_deg_up_bound_thickness[direction], height, @@ -5105,8 +5110,9 @@ void junior_rc_paint_track_60_deg_up_to_25_deg_up( image_id |= junior_rc_track_pieces_60_deg_up_to_25_deg_up[chainType][direction][0]; sub_98197C( - session, image_id, (int8_t)junior_rc_60_deg_up_tile_offsets[direction].x, - (int8_t)junior_rc_60_deg_up_tile_offsets[direction].y, junior_rc_25_deg_up_to_60_deg_up_bound_lengths[direction][0].x, + session, image_id, static_cast(junior_rc_60_deg_up_tile_offsets[direction].x), + static_cast(junior_rc_60_deg_up_tile_offsets[direction].y), + junior_rc_25_deg_up_to_60_deg_up_bound_lengths[direction][0].x, junior_rc_25_deg_up_to_60_deg_up_bound_lengths[direction][0].y, junior_rc_25_deg_up_to_60_deg_up_bound_thickness[direction], height, junior_rc_25_deg_up_to_60_deg_up_bound_offsets[direction][0].x, @@ -5119,8 +5125,8 @@ void junior_rc_paint_track_60_deg_up_to_25_deg_up( image_id |= junior_rc_track_pieces_60_deg_up_to_25_deg_up[chainType][direction][1]; sub_98197C( - session, image_id, (int8_t)junior_rc_60_deg_up_tile_offsets[direction].x, - (int8_t)junior_rc_60_deg_up_tile_offsets[direction].y, + session, image_id, static_cast(junior_rc_60_deg_up_tile_offsets[direction].x), + static_cast(junior_rc_60_deg_up_tile_offsets[direction].y), junior_rc_25_deg_up_to_60_deg_up_bound_lengths[direction][1].x, junior_rc_25_deg_up_to_60_deg_up_bound_lengths[direction][1].y, junior_rc_25_deg_up_to_60_deg_up_bound_thickness[direction], height, @@ -5418,8 +5424,8 @@ static void junior_rc_flat_to_60_deg_up_paint_setup( image_id |= junior_rc_track_pieces_flat_to_60_deg_up[isChained][direction][0]; sub_98197C( - session, image_id, (int8_t)junior_rc_flat_to_60_deg_up_tile_offsets[direction][0].x, - (int8_t)junior_rc_flat_to_60_deg_up_tile_offsets[direction][0].y, + session, image_id, static_cast(junior_rc_flat_to_60_deg_up_tile_offsets[direction][0].x), + static_cast(junior_rc_flat_to_60_deg_up_tile_offsets[direction][0].y), junior_rc_flat_to_60_deg_up_bound_lengths[direction][0].x, junior_rc_flat_to_60_deg_up_bound_lengths[direction][0].y, junior_rc_flat_to_60_deg_up_bound_thickness[direction], height + 24, junior_rc_flat_to_60_deg_up_bound_offsets[direction][0].x, junior_rc_flat_to_60_deg_up_bound_offsets[direction][0].y, @@ -5432,8 +5438,8 @@ static void junior_rc_flat_to_60_deg_up_paint_setup( image_id |= junior_rc_track_pieces_flat_to_60_deg_up[isChained][direction][1]; sub_98197C( - session, image_id, (int8_t)junior_rc_flat_to_60_deg_up_tile_offsets[direction][1].x, - (int8_t)junior_rc_flat_to_60_deg_up_tile_offsets[direction][1].y, + session, image_id, static_cast(junior_rc_flat_to_60_deg_up_tile_offsets[direction][1].x), + static_cast(junior_rc_flat_to_60_deg_up_tile_offsets[direction][1].y), junior_rc_flat_to_60_deg_up_bound_lengths[direction][1].x, junior_rc_flat_to_60_deg_up_bound_lengths[direction][1].y, junior_rc_flat_to_60_deg_up_bound_thickness[direction], height, junior_rc_flat_to_60_deg_up_bound_offsets[direction][1].x, @@ -5487,8 +5493,8 @@ static void junior_rc_60_deg_up_to_flat_paint_setup( image_id |= junior_rc_track_pieces_60_deg_up_to_flat[isChained][direction][0]; sub_98197C( - session, image_id, (int8_t)junior_rc_60_deg_up_to_flat_tile_offsets[direction][0].x, - (int8_t)junior_rc_60_deg_up_to_flat_tile_offsets[direction][0].y, + session, image_id, static_cast(junior_rc_60_deg_up_to_flat_tile_offsets[direction][0].x), + static_cast(junior_rc_60_deg_up_to_flat_tile_offsets[direction][0].y), junior_rc_flat_to_60_deg_up_bound_lengths[direction][0].x, junior_rc_flat_to_60_deg_up_bound_lengths[direction][0].y, junior_rc_flat_to_60_deg_up_bound_thickness[direction], height + 24, junior_rc_flat_to_60_deg_up_bound_offsets[direction][0].x, junior_rc_flat_to_60_deg_up_bound_offsets[direction][0].y, @@ -5501,8 +5507,8 @@ static void junior_rc_60_deg_up_to_flat_paint_setup( image_id |= junior_rc_track_pieces_60_deg_up_to_flat[isChained][direction][1]; sub_98197C( - session, image_id, (int8_t)junior_rc_60_deg_up_to_flat_tile_offsets[direction][1].x, - (int8_t)junior_rc_60_deg_up_to_flat_tile_offsets[direction][1].y, + session, image_id, static_cast(junior_rc_60_deg_up_to_flat_tile_offsets[direction][1].x), + static_cast(junior_rc_60_deg_up_to_flat_tile_offsets[direction][1].y), junior_rc_flat_to_60_deg_up_bound_lengths[direction][1].x, junior_rc_flat_to_60_deg_up_bound_lengths[direction][1].y, junior_rc_flat_to_60_deg_up_bound_thickness[direction], height, junior_rc_flat_to_60_deg_up_bound_offsets[direction][1].x, diff --git a/src/openrct2/ride/coaster/WildMouse.cpp b/src/openrct2/ride/coaster/WildMouse.cpp index 2bcb08122d..cf6b661920 100644 --- a/src/openrct2/ride/coaster/WildMouse.cpp +++ b/src/openrct2/ride/coaster/WildMouse.cpp @@ -590,8 +590,9 @@ static void wild_mouse_track_right_quarter_turn_3_25_deg_down( int32_t part = trackSequence == 0 ? 0 : 1; const sprite_bb* sbb = &imageIds[direction][part]; sub_98196C( - session, sbb->sprite_id | session->TrackColours[SCHEME_TRACK], (int8_t)sbb->offset.x, (int8_t)sbb->offset.y, - sbb->bb_size.x, sbb->bb_size.y, (int8_t)sbb->bb_size.z, height + (int8_t)sbb->offset.z); + session, sbb->sprite_id | session->TrackColours[SCHEME_TRACK], static_cast(sbb->offset.x), + static_cast(sbb->offset.y), sbb->bb_size.x, sbb->bb_size.y, static_cast(sbb->bb_size.z), + height + static_cast(sbb->offset.z)); } track_paint_util_right_quarter_turn_3_tiles_25_deg_down_tunnel( @@ -658,8 +659,9 @@ static void wild_mouse_track_right_quarter_turn_3_25_deg_up( int32_t part = trackSequence == 0 ? 0 : 1; const sprite_bb* sbb = &imageIds[direction][part]; sub_98196C( - session, sbb->sprite_id | session->TrackColours[SCHEME_TRACK], (int8_t)sbb->offset.x, (int8_t)sbb->offset.y, - sbb->bb_size.x, sbb->bb_size.y, (int8_t)sbb->bb_size.z, height + (int8_t)sbb->offset.z); + session, sbb->sprite_id | session->TrackColours[SCHEME_TRACK], static_cast(sbb->offset.x), + static_cast(sbb->offset.y), sbb->bb_size.x, sbb->bb_size.y, static_cast(sbb->bb_size.z), + height + static_cast(sbb->offset.z)); } track_paint_util_right_quarter_turn_3_tiles_25_deg_up_tunnel(session, height, direction, trackSequence, TUNNEL_1, TUNNEL_2); diff --git a/src/openrct2/ride/coaster/WoodenRollerCoaster.cpp b/src/openrct2/ride/coaster/WoodenRollerCoaster.cpp index 3d202cab60..7995f7e303 100644 --- a/src/openrct2/ride/coaster/WoodenRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/WoodenRollerCoaster.cpp @@ -425,11 +425,12 @@ static void wooden_rc_track_paint_bb(paint_session* session, const sprite_bb_2* uint32_t railsImageId = bb->sprite_id_b | wooden_rc_get_rails_colour(session); sub_98197C( - session, imageId, (int8_t)bb->offset.x, (int8_t)bb->offset.y, bb->bb_size.x, bb->bb_size.y, (int8_t)bb->bb_size.z, - height + bb->offset.z, bb->bb_offset.x, bb->bb_offset.y, height + bb->bb_offset.z); + session, imageId, static_cast(bb->offset.x), static_cast(bb->offset.y), bb->bb_size.x, bb->bb_size.y, + static_cast(bb->bb_size.z), height + bb->offset.z, bb->bb_offset.x, bb->bb_offset.y, height + bb->bb_offset.z); sub_98199C( - session, railsImageId, (int8_t)bb->offset.x, (int8_t)bb->offset.y, bb->bb_size.x, bb->bb_size.y, (int8_t)bb->bb_size.z, - height + bb->offset.z, bb->bb_offset.x, bb->bb_offset.y, height + bb->bb_offset.z); + session, railsImageId, static_cast(bb->offset.x), static_cast(bb->offset.y), bb->bb_size.x, + bb->bb_size.y, static_cast(bb->bb_size.z), height + bb->offset.z, bb->bb_offset.x, bb->bb_offset.y, + height + bb->bb_offset.z); } /** rct2: 0x008AC568 */ diff --git a/src/openrct2/ride/gentle/MonorailCycles.cpp b/src/openrct2/ride/gentle/MonorailCycles.cpp index 4011499472..d206b8953c 100644 --- a/src/openrct2/ride/gentle/MonorailCycles.cpp +++ b/src/openrct2/ride/gentle/MonorailCycles.cpp @@ -169,7 +169,7 @@ static void paint_monorail_cycles_track_flat( { uint32_t imageId = monorail_cycles_track_pieces_flat[(direction & 1)] | session->TrackColours[SCHEME_TRACK]; paint_monorail_cycles_util_7c( - session, (bool)(direction & 1), imageId, 0, 0, 32, 20, 3, height, 0, 6, height, session->CurrentRotation); + session, static_cast(direction & 1), imageId, 0, 0, 32, 20, 3, height, 0, 6, height, session->CurrentRotation); if (direction & 1) { diff --git a/src/openrct2/ride/gentle/SpaceRings.cpp b/src/openrct2/ride/gentle/SpaceRings.cpp index 4cbc68db65..d09fc8022e 100644 --- a/src/openrct2/ride/gentle/SpaceRings.cpp +++ b/src/openrct2/ride/gentle/SpaceRings.cpp @@ -51,7 +51,7 @@ static void paint_space_rings_structure(paint_session* session, Ride* ride, uint session->InteractionType = VIEWPORT_INTERACTION_ITEM_SPRITE; vehicle = GET_VEHICLE(ride->vehicles[vehicleIndex]); session->CurrentlyDrawnItem = vehicle; - frameNum += (int8_t)vehicle->vehicle_sprite_type * 4; + frameNum += static_cast(vehicle->vehicle_sprite_type * 4); } uint32_t imageColourFlags = session->TrackColours[SCHEME_MISC]; diff --git a/src/openrct2/ride/thrill/MagicCarpet.cpp b/src/openrct2/ride/thrill/MagicCarpet.cpp index 5fdc65e84f..1b4db45b46 100644 --- a/src/openrct2/ride/thrill/MagicCarpet.cpp +++ b/src/openrct2/ride/thrill/MagicCarpet.cpp @@ -84,14 +84,14 @@ static void paint_magic_carpet_frame( if (plane == PLANE_BACK) { sub_98197C( - session, imageId, (int8_t)offset.x, (int8_t)offset.y, bbSize.x, bbSize.y, 127, offset.z, bbOffset.x, bbOffset.y, - bbOffset.z); + session, imageId, static_cast(offset.x), static_cast(offset.y), bbSize.x, bbSize.y, 127, offset.z, + bbOffset.x, bbOffset.y, bbOffset.z); } else { sub_98199C( - session, imageId, (int8_t)offset.x, (int8_t)offset.y, bbSize.x, bbSize.y, 127, offset.z, bbOffset.x, bbOffset.y, - bbOffset.z); + session, imageId, static_cast(offset.x), static_cast(offset.y), bbSize.x, bbSize.y, 127, offset.z, + bbOffset.x, bbOffset.y, bbOffset.z); } } @@ -102,7 +102,7 @@ static void paint_magic_carpet_pendulum( uint32_t imageId = swingImageId; if (direction & 2) { - imageId = (0 - ((int32_t)imageId)) & 31; + imageId = (0 - (static_cast(imageId))) & 31; } if (direction & 1) { @@ -114,8 +114,8 @@ static void paint_magic_carpet_pendulum( } imageId |= session->TrackColours[SCHEME_TRACK]; sub_98199C( - session, imageId, (int8_t)offset.x, (int8_t)offset.y, bbSize.x, bbSize.y, 127, offset.z, bbOffset.x, bbOffset.y, - bbOffset.z); + session, imageId, static_cast(offset.x), static_cast(offset.y), bbSize.x, bbSize.y, 127, offset.z, + bbOffset.x, bbOffset.y, bbOffset.z); } static void paint_magic_carpet_vehicle( @@ -151,8 +151,8 @@ static void paint_magic_carpet_vehicle( offset.z += MagicCarpetOscillationZ[swingImageId]; sub_98199C( - session, vehicleImageId | imageColourFlags, (int8_t)offset.x, (int8_t)offset.y, bbSize.x, bbSize.y, 127, offset.z, - bbOffset.x, bbOffset.y, bbOffset.z); + session, vehicleImageId | imageColourFlags, static_cast(offset.x), static_cast(offset.y), bbSize.x, + bbSize.y, 127, offset.z, bbOffset.x, bbOffset.y, bbOffset.z); // Riders rct_drawpixelinfo* dpi = &session->DPI; @@ -168,8 +168,8 @@ static void paint_magic_carpet_vehicle( imageId |= (vehicle->peep_tshirt_colours[peepIndex + 0] << 19); imageId |= (vehicle->peep_tshirt_colours[peepIndex + 1] << 24); sub_98199C( - session, imageId, (int8_t)offset.x, (int8_t)offset.y, bbSize.x, bbSize.y, 127, offset.z, bbOffset.x, - bbOffset.y, bbOffset.z); + session, imageId, static_cast(offset.x), static_cast(offset.y), bbSize.x, bbSize.y, 127, + offset.z, bbOffset.x, bbOffset.y, bbOffset.z); } } } diff --git a/src/openrct2/ride/thrill/PirateShip.cpp b/src/openrct2/ride/thrill/PirateShip.cpp index a529a34cc4..45ddc17fe8 100644 --- a/src/openrct2/ride/thrill/PirateShip.cpp +++ b/src/openrct2/ride/thrill/PirateShip.cpp @@ -81,7 +81,7 @@ static void paint_pirate_ship_structure( baseImageId = rideEntry->vehicles[0].base_image_id + pirate_ship_base_sprite_offset[direction]; if (vehicle != nullptr) { - int32_t rotation = (int8_t)vehicle->vehicle_sprite_type; + int32_t rotation = static_cast(vehicle->vehicle_sprite_type); if (rotation != 0) { if (direction & 2) diff --git a/src/openrct2/ride/thrill/SwingingInverterShip.cpp b/src/openrct2/ride/thrill/SwingingInverterShip.cpp index a3aeb4cef5..29d84358ff 100644 --- a/src/openrct2/ride/thrill/SwingingInverterShip.cpp +++ b/src/openrct2/ride/thrill/SwingingInverterShip.cpp @@ -68,7 +68,7 @@ static void paint_swinging_inverter_ship_structure( uint32_t vehicleImageId = rideEntry->vehicles[0].base_image_id + swinging_inverter_ship_base_sprite_offset[direction]; if (vehicle != nullptr) { - int32_t rotation = (int8_t)vehicle->vehicle_sprite_type; + int32_t rotation = static_cast(vehicle->vehicle_sprite_type); if (rotation != 0) { vehicleImageId = rideEntry->vehicles[0].base_image_id diff --git a/src/openrct2/ride/thrill/TopSpin.cpp b/src/openrct2/ride/thrill/TopSpin.cpp index 9ebc1a992d..db59a18963 100644 --- a/src/openrct2/ride/thrill/TopSpin.cpp +++ b/src/openrct2/ride/thrill/TopSpin.cpp @@ -167,8 +167,8 @@ static void top_spin_paint_vehicle( } sub_98199C( - session, image_id, (int8_t)seatCoords.x, (int8_t)seatCoords.y, lengthX, lengthY, 90, seatCoords.z, boundBoxOffsetX, - boundBoxOffsetY, boundBoxOffsetZ); + session, image_id, static_cast(seatCoords.x), static_cast(seatCoords.y), lengthX, lengthY, 90, + seatCoords.z, boundBoxOffsetX, boundBoxOffsetY, boundBoxOffsetZ); rct_drawpixelinfo* dpi = &session->DPI; if (dpi->zoom_level < 2 && vehicle != nullptr && vehicle->num_peeps != 0) @@ -177,8 +177,8 @@ static void top_spin_paint_vehicle( | SPRITE_ID_PALETTE_COLOUR_2(vehicle->peep_tshirt_colours[0], vehicle->peep_tshirt_colours[1]); sub_98199C( - session, image_id, (int8_t)seatCoords.x, (int8_t)seatCoords.y, lengthX, lengthY, 90, seatCoords.z, boundBoxOffsetX, - boundBoxOffsetY, boundBoxOffsetZ); + session, image_id, static_cast(seatCoords.x), static_cast(seatCoords.y), lengthX, lengthY, 90, + seatCoords.z, boundBoxOffsetX, boundBoxOffsetY, boundBoxOffsetZ); if (vehicle->num_peeps > 2) { @@ -186,8 +186,8 @@ static void top_spin_paint_vehicle( | SPRITE_ID_PALETTE_COLOUR_2(vehicle->peep_tshirt_colours[2], vehicle->peep_tshirt_colours[3]); sub_98199C( - session, image_id, (int8_t)seatCoords.x, (int8_t)seatCoords.y, lengthX, lengthY, 90, seatCoords.z, - boundBoxOffsetX, boundBoxOffsetY, boundBoxOffsetZ); + session, image_id, static_cast(seatCoords.x), static_cast(seatCoords.y), lengthX, lengthY, 90, + seatCoords.z, boundBoxOffsetX, boundBoxOffsetY, boundBoxOffsetZ); } if (vehicle->num_peeps > 4) @@ -196,8 +196,8 @@ static void top_spin_paint_vehicle( | SPRITE_ID_PALETTE_COLOUR_2(vehicle->peep_tshirt_colours[4], vehicle->peep_tshirt_colours[5]); sub_98199C( - session, image_id, (int8_t)seatCoords.x, (int8_t)seatCoords.y, lengthX, lengthY, 90, seatCoords.z, - boundBoxOffsetX, boundBoxOffsetY, boundBoxOffsetZ); + session, image_id, static_cast(seatCoords.x), static_cast(seatCoords.y), lengthX, lengthY, 90, + seatCoords.z, boundBoxOffsetX, boundBoxOffsetY, boundBoxOffsetZ); } if (vehicle->num_peeps > 6) @@ -206,8 +206,8 @@ static void top_spin_paint_vehicle( | SPRITE_ID_PALETTE_COLOUR_2(vehicle->peep_tshirt_colours[6], vehicle->peep_tshirt_colours[7]); sub_98199C( - session, image_id, (int8_t)seatCoords.x, (int8_t)seatCoords.y, lengthX, lengthY, 90, seatCoords.z, - boundBoxOffsetX, boundBoxOffsetY, boundBoxOffsetZ); + session, image_id, static_cast(seatCoords.x), static_cast(seatCoords.y), lengthX, lengthY, 90, + seatCoords.z, boundBoxOffsetX, boundBoxOffsetY, boundBoxOffsetZ); } } diff --git a/src/openrct2/ride/transport/MiniatureRailway.cpp b/src/openrct2/ride/transport/MiniatureRailway.cpp index 5ad5045c07..5075469ef6 100644 --- a/src/openrct2/ride/transport/MiniatureRailway.cpp +++ b/src/openrct2/ride/transport/MiniatureRailway.cpp @@ -950,8 +950,8 @@ static void paint_miniature_railway_track_right_quarter_turn_5_tiles( CoordsXYZ boundsOffset = CoordsXYZ(offset, 0); sub_98199C( - session, imageId, (int8_t)offset.x, (int8_t)offset.y, boundsLength.x, boundsLength.y, 2, height, boundsOffset.x, - boundsOffset.y, height + boundsOffset.z); + session, imageId, static_cast(offset.x), static_cast(offset.y), boundsLength.x, boundsLength.y, + 2, height, boundsOffset.x, boundsOffset.y, height + boundsOffset.z); } } if (direction == 0 && trackSequence == 0) @@ -1066,8 +1066,8 @@ static void paint_miniature_railway_track_s_bend_left( if (!isSupported) { sub_98197C_rotated( - session, direction, imageId, (int8_t)offset.x, (int8_t)offset.y, bounds.x, bounds.y, 2, height, offset.x, offset.y, - height); + session, direction, imageId, static_cast(offset.x), static_cast(offset.y), bounds.x, bounds.y, 2, + height, offset.x, offset.y, height); } else { @@ -1078,8 +1078,8 @@ static void paint_miniature_railway_track_s_bend_left( imageId = miniature_railway_track_pieces_s_bend_left[direction & 1][trackSequence] | session->TrackColours[SCHEME_TRACK]; sub_98199C_rotated( - session, direction, imageId, (int8_t)offset.x, (int8_t)offset.y, bounds.x, bounds.y, 2, height, offset.x, offset.y, - height); + session, direction, imageId, static_cast(offset.x), static_cast(offset.y), bounds.x, bounds.y, 2, + height, offset.x, offset.y, height); } if (direction == 0 || direction == 2) { @@ -1166,8 +1166,8 @@ static void paint_miniature_railway_track_s_bend_right( if (!isSupported) { sub_98197C_rotated( - session, direction, imageId, (int8_t)offset.x, (int8_t)offset.y, bounds.x, bounds.y, 2, height, offset.x, offset.y, - height); + session, direction, imageId, static_cast(offset.x), static_cast(offset.y), bounds.x, bounds.y, 2, + height, offset.x, offset.y, height); } else { @@ -1178,8 +1178,8 @@ static void paint_miniature_railway_track_s_bend_right( imageId = miniature_railway_track_pieces_s_bend_right[direction & 1][trackSequence] | session->TrackColours[SCHEME_TRACK]; sub_98199C_rotated( - session, direction, imageId, (int8_t)offset.x, (int8_t)offset.y, bounds.x, bounds.y, 2, height, offset.x, offset.y, - height); + session, direction, imageId, static_cast(offset.x), static_cast(offset.y), bounds.x, bounds.y, 2, + height, offset.x, offset.y, height); } if (direction == 0 || direction == 2) @@ -1306,8 +1306,8 @@ static void paint_miniature_railway_track_right_quarter_turn_3_tiles( CoordsXYZ boundsOffset(offset, 0); sub_98199C( - session, imageId, (int8_t)offset.x, (int8_t)offset.y, boundsLength.x, boundsLength.y, 3, height, boundsOffset.x, - boundsOffset.y, height + boundsOffset.z); + session, imageId, static_cast(offset.x), static_cast(offset.y), boundsLength.x, boundsLength.y, 3, + height, boundsOffset.x, boundsOffset.y, height + boundsOffset.z); } track_paint_util_right_quarter_turn_3_tiles_tunnel(session, height, direction, trackSequence, TUNNEL_6); @@ -1442,7 +1442,8 @@ static void paint_miniature_railway_track_left_eighth_to_diag( bounds = miniature_railway_track_pieces_right_eight_to_orthog_bounds[direction][index]; offset = miniature_railway_track_pieces_right_eight_to_orthog_offset[direction][index]; } - sub_98197C(session, imageId, 0, 0, bounds.x, bounds.y, (int8_t)bounds.z, height, offset.x, offset.y, height); + sub_98197C( + session, imageId, 0, 0, bounds.x, bounds.y, static_cast(bounds.z), height, offset.x, offset.y, height); } } else @@ -1451,7 +1452,8 @@ static void paint_miniature_railway_track_left_eighth_to_diag( | session->TrackColours[SCHEME_SUPPORTS]; CoordsXY offset = miniature_railway_track_floor_pieces_left_eight_to_diag_offset[direction][trackSequence]; CoordsXYZ bounds = miniature_railway_track_floor_pieces_left_eight_to_diag_bounds[direction][trackSequence]; - sub_98197C(session, imageId, 0, 0, bounds.x, bounds.y, (int8_t)bounds.z, height, offset.x, offset.y, height); + sub_98197C( + session, imageId, 0, 0, bounds.x, bounds.y, static_cast(bounds.z), height, offset.x, offset.y, height); int8_t index = paint_miniature_railway_eighth_to_diag_index[trackSequence]; if (index >= 0) @@ -1459,7 +1461,8 @@ static void paint_miniature_railway_track_left_eighth_to_diag( imageId = miniature_railway_track_pieces_left_eight_to_diag[direction][index] | session->TrackColours[SCHEME_TRACK]; offset = miniature_railway_track_pieces_left_eight_to_diag_offset[direction][index]; bounds = miniature_railway_track_pieces_left_eight_to_diag_bounds[direction][index]; - sub_98199C(session, imageId, 0, 0, bounds.x, bounds.y, (int8_t)bounds.z, height, offset.x, offset.y, height); + sub_98199C( + session, imageId, 0, 0, bounds.x, bounds.y, static_cast(bounds.z), height, offset.x, offset.y, height); } } @@ -1580,7 +1583,8 @@ static void paint_miniature_railway_track_right_eighth_to_diag( bounds = miniature_railway_track_pieces_left_eight_to_orthog_bounds[direction][index]; offset = miniature_railway_track_pieces_left_eight_to_orthog_offset[direction][index]; } - sub_98197C(session, imageId, 0, 0, bounds.x, bounds.y, (int8_t)bounds.z, height, offset.x, offset.y, height); + sub_98197C( + session, imageId, 0, 0, bounds.x, bounds.y, static_cast(bounds.z), height, offset.x, offset.y, height); } } else @@ -1589,7 +1593,8 @@ static void paint_miniature_railway_track_right_eighth_to_diag( | session->TrackColours[SCHEME_SUPPORTS]; CoordsXY offset = miniature_railway_track_floor_pieces_right_eight_to_diag_offset[direction][trackSequence]; CoordsXYZ bounds = miniature_railway_track_floor_pieces_right_eight_to_diag_bounds[direction][trackSequence]; - sub_98197C(session, imageId, 0, 0, bounds.x, bounds.y, (int8_t)bounds.z, height, offset.x, offset.y, height); + sub_98197C( + session, imageId, 0, 0, bounds.x, bounds.y, static_cast(bounds.z), height, offset.x, offset.y, height); int8_t index = paint_miniature_railway_eighth_to_diag_index[trackSequence]; if (index >= 0) @@ -1598,7 +1603,8 @@ static void paint_miniature_railway_track_right_eighth_to_diag( | session->TrackColours[SCHEME_TRACK]; offset = miniature_railway_track_pieces_right_eight_to_diag_offset[direction][index]; bounds = miniature_railway_track_pieces_right_eight_to_diag_bounds[direction][index]; - sub_98199C(session, imageId, 0, 0, bounds.x, bounds.y, (int8_t)bounds.z, height, offset.x, offset.y, height); + sub_98199C( + session, imageId, 0, 0, bounds.x, bounds.y, static_cast(bounds.z), height, offset.x, offset.y, height); } } diff --git a/src/openrct2/ride/transport/Monorail.cpp b/src/openrct2/ride/transport/Monorail.cpp index 0dad9ad9a2..1b7da132f0 100644 --- a/src/openrct2/ride/transport/Monorail.cpp +++ b/src/openrct2/ride/transport/Monorail.cpp @@ -758,11 +758,13 @@ static void paint_monorail_track_s_bend_left( CoordsXY bounds = boundsList[trackSequence]; if (direction == 0 || direction == 2) { - sub_98196C(session, imageId, (int8_t)offset.x, (int8_t)offset.y, bounds.x, bounds.y, 3, height); + sub_98196C( + session, imageId, static_cast(offset.x), static_cast(offset.y), bounds.x, bounds.y, 3, height); } else { - sub_98196C(session, imageId, (int8_t)offset.y, (int8_t)offset.x, bounds.y, bounds.x, 3, height); + sub_98196C( + session, imageId, static_cast(offset.y), static_cast(offset.x), bounds.y, bounds.x, 3, height); } if (direction == 0 || direction == 2) @@ -862,11 +864,13 @@ static void paint_monorail_track_s_bend_right( CoordsXY bounds = boundsList[trackSequence]; if (direction == 0 || direction == 2) { - sub_98196C(session, imageId, (int8_t)offset.x, (int8_t)offset.y, bounds.x, bounds.y, 3, height); + sub_98196C( + session, imageId, static_cast(offset.x), static_cast(offset.y), bounds.x, bounds.y, 3, height); } else { - sub_98196C(session, imageId, (int8_t)offset.y, (int8_t)offset.x, bounds.y, bounds.x, 3, height); + sub_98196C( + session, imageId, static_cast(offset.y), static_cast(offset.x), bounds.y, bounds.x, 3, height); } if (direction == 0 || direction == 2)