diff --git a/src/ride/coaster/compact_inverted_coaster.c b/src/ride/coaster/compact_inverted_coaster.c index a7b03d53e1..9371a420a4 100644 --- a/src/ride/coaster/compact_inverted_coaster.c +++ b/src/ride/coaster/compact_inverted_coaster.c @@ -40,9 +40,6 @@ static void compact_inverted_rc_track_flat(uint8 rideIndex, uint8 trackSequence, sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26558, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; } - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 4, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); - } } else { switch (direction) { case 0: @@ -54,15 +51,18 @@ static void compact_inverted_rc_track_flat(uint8 rideIndex, uint8 trackSequence, sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26556, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; } - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 4, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); - } } - paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + metal_a_supports_paint_setup(11, 4, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + } + + paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); paint_util_set_general_support_height(height + 48, 0x20); } +/** rct2: 0x008AE950, 0x008AE960, 0x008AE970 */ static void compact_inverted_rc_track_station(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { static const uint32 imageIds[4][3] = { @@ -89,63 +89,57 @@ static void compact_inverted_rc_track_25_deg_up(uint8 rideIndex, uint8 trackSequ switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26621, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26622, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26623, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26624, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); - } break; } } else { switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26569, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26570, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26571, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26572, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); - } break; } } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 6, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 8, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 7, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 5, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_4); } else { paint_util_push_tunnel_rotated(direction, height + 8, TUNNEL_5); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 72, 0x20); } @@ -199,63 +193,57 @@ static void compact_inverted_rc_track_flat_to_25_deg_up(uint8 rideIndex, uint8 t switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26613, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26614, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26615, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26616, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); - } break; } } else { switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26561, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26562, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26563, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26564, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); - } break; } } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 6, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 8, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 7, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 5, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } else { paint_util_push_tunnel_rotated(direction, height, TUNNEL_5); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 64, 0x20); } @@ -313,67 +301,61 @@ static void compact_inverted_rc_track_60_deg_up_to_25_deg_up(uint8 rideIndex, ui switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26631, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 61); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 70, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26635, 0, 0, 32, 10, 49, height + 29, 0, 10, height + 11); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26632, 0, 0, 32, 2, 49, height + 29, 0, 4, height + 11); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 70, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26636, 0, 0, 32, 10, 49, height + 29, 0, 10, height + 11); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26633, 0, 0, 32, 2, 49, height + 29, 0, 4, height + 11); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 70, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26634, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 61); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 70, gTrackColours[SCHEME_SUPPORTS]); - } break; } } else { switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26579, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 61); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 70, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26583, 0, 0, 32, 10, 49, height + 29, 0, 10, height + 11); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26580, 0, 0, 32, 2, 49, height + 29, 0, 4, height + 11); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 70, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26584, 0, 0, 32, 10, 49, height + 29, 0, 10, height + 11); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26581, 0, 0, 32, 2, 49, height + 29, 0, 4, height + 11); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 70, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26582, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 61); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 70, gTrackColours[SCHEME_SUPPORTS]); - } break; } } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 6, 0, height + 70, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 8, 0, height + 70, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 7, 0, height + 70, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 5, 0, height + 70, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_4); } else { paint_util_push_tunnel_rotated(direction, height + 24, TUNNEL_5); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 88, 0x20); } @@ -384,63 +366,57 @@ static void compact_inverted_rc_track_25_deg_up_to_flat(uint8 rideIndex, uint8 t switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26617, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26618, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26619, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26620, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); - } break; } } else { switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26565, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26566, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26567, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26568, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); - } break; } } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 6, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 8, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 7, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 5, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_3); } else { paint_util_push_tunnel_rotated(direction, height + 8, TUNNEL_13); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 56, 0x20); } @@ -499,11 +475,13 @@ static void compact_inverted_rc_track_left_quarter_turn_5(uint8 rideIndex, uint8 sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26689, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -581,7 +559,10 @@ static void compact_inverted_rc_track_left_quarter_turn_5(uint8 rideIndex, uint8 sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26685, 0, 0, 20, 32, 3, height + 29, 6, 0, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 2: paint_util_push_tunnel_right(height, TUNNEL_3); @@ -590,7 +571,6 @@ static void compact_inverted_rc_track_left_quarter_turn_5(uint8 rideIndex, uint8 paint_util_push_tunnel_left(height, TUNNEL_3); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -620,11 +600,13 @@ static void compact_inverted_rc_track_flat_to_left_bank(uint8 rideIndex, uint8 t sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26660, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); if (track_paint_util_should_paint_supports(gPaintMapPosition)) { metal_a_supports_paint_setup(11, 4, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); } + paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); } @@ -645,11 +627,13 @@ static void compact_inverted_rc_track_flat_to_right_bank(uint8 rideIndex, uint8 sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26664, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); if (track_paint_util_should_paint_supports(gPaintMapPosition)) { metal_a_supports_paint_setup(11, 4, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); } + paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); } @@ -670,11 +654,13 @@ static void compact_inverted_rc_track_left_bank_to_flat(uint8 rideIndex, uint8 t sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26662, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); if (track_paint_util_should_paint_supports(gPaintMapPosition)) { metal_a_supports_paint_setup(11, 4, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); } + paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); } @@ -695,11 +681,13 @@ static void compact_inverted_rc_track_right_bank_to_flat(uint8 rideIndex, uint8 sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26658, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); if (track_paint_util_should_paint_supports(gPaintMapPosition)) { metal_a_supports_paint_setup(11, 4, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); } + paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); } @@ -722,11 +710,13 @@ static void compact_inverted_rc_track_banked_left_quarter_turn_5(uint8 rideIndex sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26733, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -804,7 +794,10 @@ static void compact_inverted_rc_track_banked_left_quarter_turn_5(uint8 rideIndex sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26729, 0, 0, 20, 32, 3, height + 29, 6, 0, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 2: paint_util_push_tunnel_right(height, TUNNEL_3); @@ -813,7 +806,6 @@ static void compact_inverted_rc_track_banked_left_quarter_turn_5(uint8 rideIndex paint_util_push_tunnel_left(height, TUNNEL_3); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -832,35 +824,41 @@ static void compact_inverted_rc_track_left_bank_to_25_deg_up(uint8 rideIndex, ui switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26665, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26666, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26667, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26668, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 6, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 8, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 7, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 5, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } else { paint_util_push_tunnel_rotated(direction, height, TUNNEL_5); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 64, 0x20); } @@ -870,35 +868,41 @@ static void compact_inverted_rc_track_right_bank_to_25_deg_up(uint8 rideIndex, u switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26669, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26670, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26671, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26672, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 6, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 8, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 7, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 5, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } else { paint_util_push_tunnel_rotated(direction, height, TUNNEL_5); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 64, 0x20); } @@ -908,35 +912,41 @@ static void compact_inverted_rc_track_25_deg_up_to_left_bank(uint8 rideIndex, ui switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26673, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26674, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26675, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26676, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 6, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 8, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 7, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 5, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_3); } else { paint_util_push_tunnel_rotated(direction, height + 8, TUNNEL_13); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 56, 0x20); } @@ -946,35 +956,41 @@ static void compact_inverted_rc_track_25_deg_up_to_right_bank(uint8 rideIndex, u switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26677, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26678, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26679, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26680, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 6, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 8, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 7, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 5, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_3); } else { paint_util_push_tunnel_rotated(direction, height + 8, TUNNEL_13); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 56, 0x20); } @@ -1019,11 +1035,13 @@ static void compact_inverted_rc_track_left_bank(uint8 rideIndex, uint8 trackSequ sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26684, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); if (track_paint_util_should_paint_supports(gPaintMapPosition)) { metal_a_supports_paint_setup(11, 4, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); } + paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); } @@ -1052,11 +1070,13 @@ static void compact_inverted_rc_track_left_quarter_turn_5_25_deg_up(uint8 rideIn sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26964, 0, 6, 32, 20, 3, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_4); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 88, 0x20); break; case 1: @@ -1134,7 +1154,10 @@ static void compact_inverted_rc_track_left_quarter_turn_5_25_deg_up(uint8 rideIn sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26968, 6, 0, 20, 32, 3, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 2: paint_util_push_tunnel_right(height + 8, TUNNEL_5); @@ -1143,7 +1166,6 @@ static void compact_inverted_rc_track_left_quarter_turn_5_25_deg_up(uint8 rideIn paint_util_push_tunnel_left(height + 8, TUNNEL_5); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 88, 0x20); break; } @@ -1168,11 +1190,13 @@ static void compact_inverted_rc_track_right_quarter_turn_5_25_deg_up(uint8 rideI sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26944, 0, 6, 32, 20, 3, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_4); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 88, 0x20); break; case 1: @@ -1250,7 +1274,10 @@ static void compact_inverted_rc_track_right_quarter_turn_5_25_deg_up(uint8 rideI sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26948, 6, 0, 20, 32, 3, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 0: paint_util_push_tunnel_right(height + 8, TUNNEL_5); @@ -1259,7 +1286,6 @@ static void compact_inverted_rc_track_right_quarter_turn_5_25_deg_up(uint8 rideI paint_util_push_tunnel_left(height + 8, TUNNEL_5); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 88, 0x20); break; } @@ -1298,22 +1324,22 @@ static void compact_inverted_rc_track_s_bend_left(uint8 rideIndex, uint8 trackSe sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26648, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: switch (direction) { case 0: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26642, 0, 0, 32, 26, 3, height + 29); - metal_a_supports_paint_setup(11, 5, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26646, 0, 0, 32, 26, 3, height + 29); - metal_a_supports_paint_setup(11, 6, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26643, 0, 0, 32, 26, 3, height + 29, 0, 6, height + 29); @@ -1322,7 +1348,17 @@ static void compact_inverted_rc_track_s_bend_left(uint8 rideIndex, uint8 trackSe sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26647, 0, 0, 32, 26, 3, height + 29, 0, 6, height + 29); break; } + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 5, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 6, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + break; + } + paint_util_set_general_support_height(height + 48, 0x20); break; case 2: @@ -1335,14 +1371,22 @@ static void compact_inverted_rc_track_s_bend_left(uint8 rideIndex, uint8 trackSe break; case 2: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26642, 0, 0, 32, 26, 3, height + 29); - metal_a_supports_paint_setup(11, 5, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26646, 0, 0, 32, 26, 3, height + 29); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + switch (direction) { + case 2: + metal_a_supports_paint_setup(11, 5, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: metal_a_supports_paint_setup(11, 6, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 48, 0x20); break; case 3: @@ -1360,7 +1404,10 @@ static void compact_inverted_rc_track_s_bend_left(uint8 rideIndex, uint8 trackSe sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26645, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 1: paint_util_push_tunnel_right(height, TUNNEL_3); @@ -1369,7 +1416,6 @@ static void compact_inverted_rc_track_s_bend_left(uint8 rideIndex, uint8 trackSe paint_util_push_tunnel_left(height, TUNNEL_3); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -1394,22 +1440,22 @@ static void compact_inverted_rc_track_s_bend_right(uint8 rideIndex, uint8 trackS sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26656, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26650, 0, 0, 32, 26, 3, height + 29, 0, 6, height + 29); - metal_a_supports_paint_setup(11, 8, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26654, 0, 0, 32, 26, 3, height + 29, 0, 6, height + 29); - metal_a_supports_paint_setup(11, 7, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26651, 0, 0, 32, 26, 3, height + 29); @@ -1418,7 +1464,17 @@ static void compact_inverted_rc_track_s_bend_right(uint8 rideIndex, uint8 trackS sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26655, 0, 0, 32, 26, 3, height + 29); break; } + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 8, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 7, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + break; + } + paint_util_set_general_support_height(height + 48, 0x20); break; case 2: @@ -1431,14 +1487,22 @@ static void compact_inverted_rc_track_s_bend_right(uint8 rideIndex, uint8 trackS break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26650, 0, 0, 32, 26, 3, height + 29, 0, 6, height + 29); - metal_a_supports_paint_setup(11, 8, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26654, 0, 0, 32, 26, 3, height + 29, 0, 6, height + 29); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 2: + metal_a_supports_paint_setup(11, 8, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: metal_a_supports_paint_setup(11, 7, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 48, 0x20); break; case 3: @@ -1456,7 +1520,10 @@ static void compact_inverted_rc_track_s_bend_right(uint8 rideIndex, uint8 trackS sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26653, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 1: paint_util_push_tunnel_right(height, TUNNEL_3); @@ -1465,7 +1532,6 @@ static void compact_inverted_rc_track_s_bend_right(uint8 rideIndex, uint8 trackS paint_util_push_tunnel_left(height, TUNNEL_3); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -1479,25 +1545,37 @@ static void compact_inverted_rc_track_left_vertical_loop(uint8 rideIndex, uint8 switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27017, 0, 6, 32, 2, 3, height + 29, 0, 29, height + 29); - metal_a_supports_paint_setup(11, 6, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27025, 0, 6, 32, 2, 3, height + 29, 0, 29, height + 29); - metal_a_supports_paint_setup(11, 8, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27024, 0, 6, 32, 2, 3, height + 29, 0, 29, height + 29); - metal_a_supports_paint_setup(11, 7, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27032, 0, 6, 32, 10, 7, height + 29, 0, 6, height + 45); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 6, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 8, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 7, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: metal_a_supports_paint_setup(11, 5, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); break; } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_4); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 72, 0x20); break; case 1: @@ -1618,21 +1696,34 @@ static void compact_inverted_rc_track_left_vertical_loop(uint8 rideIndex, uint8 switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27024, 0, 6, 32, 2, 3, height + 29, 0, 29, height + 29); - metal_a_supports_paint_setup(11, 7, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27032, 0, 6, 32, 10, 7, height + 29, 0, 6, height + 45); - metal_a_supports_paint_setup(11, 5, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27017, 0, 6, 32, 2, 3, height + 29, 0, 29, height + 29); - metal_a_supports_paint_setup(11, 6, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27025, 0, 6, 32, 2, 3, height + 29, 0, 29, height + 29); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 7, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 5, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 6, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: metal_a_supports_paint_setup(11, 8, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); break; } + switch (direction) { case 1: paint_util_push_tunnel_right(height - 8, TUNNEL_4); @@ -1641,7 +1732,6 @@ static void compact_inverted_rc_track_left_vertical_loop(uint8 rideIndex, uint8 paint_util_push_tunnel_left(height - 8, TUNNEL_4); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 72, 0x20); break; } @@ -1655,25 +1745,37 @@ static void compact_inverted_rc_track_right_vertical_loop(uint8 rideIndex, uint8 switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27048, 0, 6, 32, 10, 7, height + 29, 0, 6, height + 45); - metal_a_supports_paint_setup(11, 6, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27040, 0, 6, 32, 2, 3, height + 29, 0, 29, height + 29); - metal_a_supports_paint_setup(11, 8, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27041, 0, 6, 32, 2, 3, height + 29, 0, 29, height + 29); - metal_a_supports_paint_setup(11, 7, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27033, 0, 6, 32, 2, 3, height + 29, 0, 29, height + 29); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 6, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 8, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 7, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: metal_a_supports_paint_setup(11, 5, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); break; } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_4); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 72, 0x20); break; case 1: @@ -1794,21 +1896,34 @@ static void compact_inverted_rc_track_right_vertical_loop(uint8 rideIndex, uint8 switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27041, 0, 6, 32, 2, 3, height + 29, 0, 29, height + 29); - metal_a_supports_paint_setup(11, 7, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27033, 0, 6, 32, 2, 3, height + 29, 0, 29, height + 29); - metal_a_supports_paint_setup(11, 5, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27048, 0, 6, 32, 10, 7, height + 29, 0, 6, height + 45); - metal_a_supports_paint_setup(11, 6, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27040, 0, 6, 32, 2, 3, height + 29, 0, 29, height + 29); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 7, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 5, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 6, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: metal_a_supports_paint_setup(11, 8, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); break; } + switch (direction) { case 1: paint_util_push_tunnel_right(height - 8, TUNNEL_4); @@ -1817,7 +1932,6 @@ static void compact_inverted_rc_track_right_vertical_loop(uint8 rideIndex, uint8 paint_util_push_tunnel_left(height - 8, TUNNEL_4); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 72, 0x20); break; } @@ -1842,11 +1956,13 @@ static void compact_inverted_rc_track_left_quarter_turn_3(uint8 rideIndex, uint8 sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26707, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -1885,7 +2001,10 @@ static void compact_inverted_rc_track_left_quarter_turn_3(uint8 rideIndex, uint8 sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26705, 0, 0, 20, 32, 3, height + 29, 6, 0, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 2: paint_util_push_tunnel_right(height, TUNNEL_3); @@ -1894,7 +2013,6 @@ static void compact_inverted_rc_track_left_quarter_turn_3(uint8 rideIndex, uint8 paint_util_push_tunnel_left(height, TUNNEL_3); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -1926,11 +2044,13 @@ static void compact_inverted_rc_track_left_quarter_turn_3_bank(uint8 rideIndex, sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26719, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -1969,7 +2089,10 @@ static void compact_inverted_rc_track_left_quarter_turn_3_bank(uint8 rideIndex, sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26717, 0, 0, 20, 32, 3, height + 29, 6, 0, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 2: paint_util_push_tunnel_right(height, TUNNEL_3); @@ -1978,7 +2101,6 @@ static void compact_inverted_rc_track_left_quarter_turn_3_bank(uint8 rideIndex, paint_util_push_tunnel_left(height, TUNNEL_3); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -2010,11 +2132,13 @@ static void compact_inverted_rc_track_left_quarter_turn_3_25_deg_up(uint8 rideIn sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26922, 0, 6, 32, 20, 3, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_4); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 88, 0x20); break; case 1: @@ -2038,7 +2162,10 @@ static void compact_inverted_rc_track_left_quarter_turn_3_25_deg_up(uint8 rideIn sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26921, 6, 0, 20, 32, 3, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 2: paint_util_push_tunnel_right(height + 8, TUNNEL_5); @@ -2047,7 +2174,6 @@ static void compact_inverted_rc_track_left_quarter_turn_3_25_deg_up(uint8 rideIn paint_util_push_tunnel_left(height + 8, TUNNEL_5); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 88, 0x20); break; } @@ -2072,11 +2198,13 @@ static void compact_inverted_rc_track_right_quarter_turn_3_25_deg_up(uint8 rideI sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26919, 0, 6, 32, 20, 3, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_4); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 88, 0x20); break; case 1: @@ -2100,7 +2228,10 @@ static void compact_inverted_rc_track_right_quarter_turn_3_25_deg_up(uint8 rideI sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26920, 6, 0, 20, 32, 3, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 0: paint_util_push_tunnel_right(height + 8, TUNNEL_5); @@ -2109,7 +2240,6 @@ static void compact_inverted_rc_track_right_quarter_turn_3_25_deg_up(uint8 rideI paint_util_push_tunnel_left(height + 8, TUNNEL_5); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 88, 0x20); break; } @@ -2148,11 +2278,13 @@ static void compact_inverted_rc_track_left_twist_down_to_up(uint8 rideIndex, uin sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27004, 0, 6, 32, 20, 3, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -2222,11 +2354,13 @@ static void compact_inverted_rc_track_right_twist_down_to_up(uint8 rideIndex, ui sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27016, 0, 6, 32, 20, 3, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -2336,7 +2470,10 @@ static void compact_inverted_rc_track_left_twist_up_to_down(uint8 rideIndex, uin sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26999, 0, 6, 32, 20, 3, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 1: paint_util_push_tunnel_right(height, TUNNEL_3); @@ -2345,7 +2482,6 @@ static void compact_inverted_rc_track_left_twist_up_to_down(uint8 rideIndex, uin paint_util_push_tunnel_left(height, TUNNEL_3); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -2410,7 +2546,10 @@ static void compact_inverted_rc_track_right_twist_up_to_down(uint8 rideIndex, ui sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27011, 0, 6, 32, 20, 3, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 1: paint_util_push_tunnel_right(height, TUNNEL_3); @@ -2419,7 +2558,6 @@ static void compact_inverted_rc_track_right_twist_up_to_down(uint8 rideIndex, ui paint_util_push_tunnel_left(height, TUNNEL_3); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -2433,25 +2571,37 @@ static void compact_inverted_rc_track_half_loop_up(uint8 rideIndex, uint8 trackS switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27073, 0, 6, 32, 20, 3, height + 29, 0, 6, height + 45); - metal_a_supports_paint_setup(11, 6, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27081, 0, 6, 32, 20, 3, height + 29, 0, 6, height + 45); - metal_a_supports_paint_setup(11, 8, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27080, 0, 6, 32, 20, 3, height + 29, 0, 6, height + 45); - metal_a_supports_paint_setup(11, 7, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27088, 0, 6, 32, 20, 3, height + 29, 0, 6, height + 45); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 6, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 8, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 7, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: metal_a_supports_paint_setup(11, 5, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); break; } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_4); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 72, 0x20); break; case 1: @@ -2539,11 +2689,13 @@ static void compact_inverted_rc_track_left_corkscrew_up(uint8 rideIndex, uint8 t sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27058, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 33); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 64, 0x20); break; case 1: @@ -2613,11 +2765,13 @@ static void compact_inverted_rc_track_right_corkscrew_up(uint8 rideIndex, uint8 sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27070, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 33); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 64, 0x20); break; case 1: @@ -2779,11 +2933,13 @@ static void compact_inverted_rc_track_brakes(uint8 rideIndex, uint8 trackSequenc sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26560, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); if (track_paint_util_should_paint_supports(gPaintMapPosition)) { metal_a_supports_paint_setup(11, 4, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); } + paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); } @@ -2806,11 +2962,13 @@ static void compact_inverted_rc_track_left_quarter_banked_helix_large_up(uint8 r sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27113, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 35); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -2888,7 +3046,10 @@ static void compact_inverted_rc_track_left_quarter_banked_helix_large_up(uint8 r sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27109, 0, 0, 20, 32, 3, height + 29, 6, 0, height + 43); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 2: paint_util_push_tunnel_right(height + 16, TUNNEL_3); @@ -2897,7 +3058,6 @@ static void compact_inverted_rc_track_left_quarter_banked_helix_large_up(uint8 r paint_util_push_tunnel_left(height + 16, TUNNEL_3); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -2922,11 +3082,13 @@ static void compact_inverted_rc_track_right_quarter_banked_helix_large_up(uint8 sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27104, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 35); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -3004,7 +3166,10 @@ static void compact_inverted_rc_track_right_quarter_banked_helix_large_up(uint8 sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27108, 0, 0, 20, 32, 3, height + 29, 6, 0, height + 43); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 0: paint_util_push_tunnel_right(height + 16, TUNNEL_3); @@ -3013,7 +3178,6 @@ static void compact_inverted_rc_track_right_quarter_banked_helix_large_up(uint8 paint_util_push_tunnel_left(height + 16, TUNNEL_3); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -3038,11 +3202,13 @@ static void compact_inverted_rc_track_left_quarter_banked_helix_large_down(uint8 sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27093, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 43); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height + 16, TUNNEL_3); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -3120,7 +3286,10 @@ static void compact_inverted_rc_track_left_quarter_banked_helix_large_down(uint8 sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27089, 0, 0, 20, 32, 3, height + 29, 6, 0, height + 35); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 2: paint_util_push_tunnel_right(height, TUNNEL_3); @@ -3129,7 +3298,6 @@ static void compact_inverted_rc_track_left_quarter_banked_helix_large_down(uint8 paint_util_push_tunnel_left(height, TUNNEL_3); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -3154,11 +3322,13 @@ static void compact_inverted_rc_track_right_quarter_banked_helix_large_down(uint sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27124, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 43); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height + 16, TUNNEL_3); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -3236,7 +3406,10 @@ static void compact_inverted_rc_track_right_quarter_banked_helix_large_down(uint sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27128, 0, 0, 20, 32, 3, height + 29, 6, 0, height + 35); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 0: paint_util_push_tunnel_right(height, TUNNEL_3); @@ -3245,7 +3418,6 @@ static void compact_inverted_rc_track_right_quarter_banked_helix_large_down(uint paint_util_push_tunnel_left(height, TUNNEL_3); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -3503,11 +3675,13 @@ static void compact_inverted_rc_track_left_eighth_to_diag(uint8 rideIndex, uint8 sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26777, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -3554,22 +3728,34 @@ static void compact_inverted_rc_track_left_eighth_to_diag(uint8 rideIndex, uint8 switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26768, 0, 0, 16, 16, 3, height + 29, 16, 16, height + 29); - metal_a_supports_paint_setup(11, 3, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26772, 0, 0, 16, 18, 3, height + 29, 0, 16, height + 29); - metal_a_supports_paint_setup(11, 1, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26776, 0, 0, 16, 16, 3, height + 29, 0, 0, height + 29); - metal_a_supports_paint_setup(11, 0, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26780, 0, 0, 16, 16, 3, height + 29, 16, 0, height + 29); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 3, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 1, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 0, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: metal_a_supports_paint_setup(11, 2, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -3594,11 +3780,13 @@ static void compact_inverted_rc_track_right_eighth_to_diag(uint8 rideIndex, uint sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26761, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -3645,22 +3833,34 @@ static void compact_inverted_rc_track_right_eighth_to_diag(uint8 rideIndex, uint switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26752, 0, 0, 16, 16, 3, height + 29, 16, 0, height + 29); - metal_a_supports_paint_setup(11, 1, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26756, 0, 0, 16, 16, 3, height + 29, 0, 0, height + 29); - metal_a_supports_paint_setup(11, 0, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26760, 0, 0, 16, 18, 3, height + 29, 0, 16, height + 29); - metal_a_supports_paint_setup(11, 2, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26764, 0, 0, 16, 16, 3, height + 29, 16, 16, height + 29); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 1, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 0, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 2, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: metal_a_supports_paint_setup(11, 3, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -3699,11 +3899,13 @@ static void compact_inverted_rc_track_left_eighth_bank_to_diag(uint8 rideIndex, sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26865, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -3750,22 +3952,34 @@ static void compact_inverted_rc_track_left_eighth_bank_to_diag(uint8 rideIndex, switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26856, 0, 0, 16, 16, 3, height + 29, 16, 16, height + 29); - metal_a_supports_paint_setup(11, 3, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26860, 0, 0, 16, 18, 3, height + 29, 0, 16, height + 29); - metal_a_supports_paint_setup(11, 1, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26864, 0, 0, 16, 16, 3, height + 29, 0, 0, height + 29); - metal_a_supports_paint_setup(11, 0, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26868, 0, 0, 16, 16, 3, height + 29, 16, 0, height + 29); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 3, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 1, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 0, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: metal_a_supports_paint_setup(11, 2, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -3790,11 +4004,13 @@ static void compact_inverted_rc_track_right_eighth_bank_to_diag(uint8 rideIndex, sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26849, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -3841,22 +4057,34 @@ static void compact_inverted_rc_track_right_eighth_bank_to_diag(uint8 rideIndex, switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26840, 0, 0, 16, 16, 3, height + 29, 16, 0, height + 29); - metal_a_supports_paint_setup(11, 1, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26844, 0, 0, 16, 16, 3, height + 29, 0, 0, height + 29); - metal_a_supports_paint_setup(11, 0, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26848, 0, 0, 16, 18, 3, height + 29, 0, 16, height + 29); - metal_a_supports_paint_setup(11, 2, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26852, 0, 0, 16, 16, 3, height + 29, 16, 16, height + 29); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 1, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 0, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 2, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: metal_a_supports_paint_setup(11, 3, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -3934,38 +4162,34 @@ static void compact_inverted_rc_track_diag_flat(uint8 rideIndex, uint8 trackSequ case 3: if (track_element_is_lift_hill(mapElement)) { switch (direction) { - case 0: - metal_a_supports_paint_setup(11, 1, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26810, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 29); - metal_a_supports_paint_setup(11, 0, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(11, 2, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(11, 3, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; } } else { switch (direction) { - case 0: - metal_a_supports_paint_setup(11, 1, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26782, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 29); - metal_a_supports_paint_setup(11, 0, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(11, 2, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(11, 3, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; } } + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 1, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 0, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 2, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 3, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + break; + } + paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -4029,38 +4253,34 @@ static void compact_inverted_rc_track_diag_25_deg_up(uint8 rideIndex, uint8 trac case 3: if (track_element_is_lift_hill(mapElement)) { switch (direction) { - case 0: - metal_a_supports_paint_setup(11, 1, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26822, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 45); - metal_a_supports_paint_setup(11, 0, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(11, 2, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(11, 3, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); break; } } else { switch (direction) { - case 0: - metal_a_supports_paint_setup(11, 1, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26794, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 45); - metal_a_supports_paint_setup(11, 0, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(11, 2, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(11, 3, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); break; } } + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 1, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 0, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 2, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 3, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); + break; + } + paint_util_set_general_support_height(height + 72, 0x20); break; } @@ -4098,12 +4318,18 @@ static void compact_inverted_rc_track_diag_60_deg_up(uint8 rideIndex, uint8 trac paint_util_set_general_support_height(height + 120, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26806, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 29); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_b_supports_paint_setup(11, 1, 32, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26806, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 29); metal_b_supports_paint_setup(11, 0, 36, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -4113,7 +4339,7 @@ static void compact_inverted_rc_track_diag_60_deg_up(uint8 rideIndex, uint8 trac metal_b_supports_paint_setup(11, 3, 36, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 120, 0x20); break; } @@ -4177,38 +4403,34 @@ static void compact_inverted_rc_track_diag_flat_to_25_deg_up(uint8 rideIndex, ui case 3: if (track_element_is_lift_hill(mapElement)) { switch (direction) { - case 0: - metal_a_supports_paint_setup(11, 1, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26814, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); - metal_a_supports_paint_setup(11, 0, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(11, 2, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(11, 3, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; } } else { switch (direction) { - case 0: - metal_a_supports_paint_setup(11, 1, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26786, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); - metal_a_supports_paint_setup(11, 0, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(11, 2, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(11, 3, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; } } + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 1, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 0, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 2, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 3, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); + break; + } + paint_util_set_general_support_height(height + 64, 0x20); break; } @@ -4246,12 +4468,18 @@ static void compact_inverted_rc_track_diag_25_deg_up_to_60_deg_up(uint8 rideInde paint_util_set_general_support_height(height + 88, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26798, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 61); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_b_supports_paint_setup(11, 1, 16, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26798, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 61); metal_b_supports_paint_setup(11, 0, 16, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -4261,7 +4489,7 @@ static void compact_inverted_rc_track_diag_25_deg_up_to_60_deg_up(uint8 rideInde metal_b_supports_paint_setup(11, 3, 16, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 88, 0x20); break; } @@ -4299,12 +4527,18 @@ static void compact_inverted_rc_track_diag_60_deg_up_to_25_deg_up(uint8 rideInde paint_util_set_general_support_height(height + 88, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26802, -16, -16, 16, 16, 3, height + 29, 0, 0, height + 61); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_b_supports_paint_setup(11, 1, 21, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26802, -16, -16, 16, 16, 3, height + 29, 0, 0, height + 61); metal_b_supports_paint_setup(11, 0, 21, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -4314,7 +4548,7 @@ static void compact_inverted_rc_track_diag_60_deg_up_to_25_deg_up(uint8 rideInde metal_b_supports_paint_setup(11, 3, 21, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 88, 0x20); break; } @@ -4378,38 +4612,34 @@ static void compact_inverted_rc_track_diag_25_deg_up_to_flat(uint8 rideIndex, ui case 3: if (track_element_is_lift_hill(mapElement)) { switch (direction) { - case 0: - metal_a_supports_paint_setup(11, 1, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26818, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); - metal_a_supports_paint_setup(11, 0, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(11, 2, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(11, 3, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; } } else { switch (direction) { - case 0: - metal_a_supports_paint_setup(11, 1, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26790, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); - metal_a_supports_paint_setup(11, 0, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(11, 2, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(11, 3, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; } } + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 1, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 0, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 2, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 3, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + } + paint_util_set_general_support_height(height + 72, 0x20); break; } @@ -4473,38 +4703,34 @@ static void compact_inverted_rc_track_diag_25_deg_down(uint8 rideIndex, uint8 tr case 3: if (track_element_is_lift_hill(mapElement)) { switch (direction) { - case 0: - metal_a_supports_paint_setup(11, 1, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26824, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 45); - metal_a_supports_paint_setup(11, 0, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(11, 2, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(11, 3, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); break; } } else { switch (direction) { - case 0: - metal_a_supports_paint_setup(11, 1, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26796, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 45); - metal_a_supports_paint_setup(11, 0, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(11, 2, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(11, 3, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); break; } } + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 1, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 0, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 2, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 3, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); + break; + } + paint_util_set_general_support_height(height + 72, 0x20); break; } @@ -4542,12 +4768,18 @@ static void compact_inverted_rc_track_diag_60_deg_down(uint8 rideIndex, uint8 tr paint_util_set_general_support_height(height + 120, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26808, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 93); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_b_supports_paint_setup(11, 1, 24, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26808, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 93); metal_b_supports_paint_setup(11, 0, 28, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -4557,7 +4789,7 @@ static void compact_inverted_rc_track_diag_60_deg_down(uint8 rideIndex, uint8 tr metal_b_supports_paint_setup(11, 3, 28, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 120, 0x20); break; } @@ -4621,38 +4853,34 @@ static void compact_inverted_rc_track_diag_flat_to_25_deg_down(uint8 rideIndex, case 3: if (track_element_is_lift_hill(mapElement)) { switch (direction) { - case 0: - metal_a_supports_paint_setup(11, 1, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26820, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); - metal_a_supports_paint_setup(11, 0, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(11, 2, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(11, 3, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; } } else { switch (direction) { - case 0: - metal_a_supports_paint_setup(11, 1, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26792, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); - metal_a_supports_paint_setup(11, 0, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(11, 2, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(11, 3, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; } } + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 1, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 0, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 2, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 3, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + } + paint_util_set_general_support_height(height + 72, 0x20); break; } @@ -4690,12 +4918,18 @@ static void compact_inverted_rc_track_diag_25_deg_down_to_60_deg_down(uint8 ride paint_util_set_general_support_height(height + 88, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26804, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 61); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_b_supports_paint_setup(11, 1, 17, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26804, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 61); metal_b_supports_paint_setup(11, 0, 17, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -4705,7 +4939,7 @@ static void compact_inverted_rc_track_diag_25_deg_down_to_60_deg_down(uint8 ride metal_b_supports_paint_setup(11, 3, 17, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 88, 0x20); break; } @@ -4743,12 +4977,18 @@ static void compact_inverted_rc_track_diag_60_deg_down_to_25_deg_down(uint8 ride paint_util_set_general_support_height(height + 88, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26800, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 61); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_b_supports_paint_setup(11, 1, 8, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26800, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 61); metal_b_supports_paint_setup(11, 0, 8, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -4758,7 +4998,7 @@ static void compact_inverted_rc_track_diag_60_deg_down_to_25_deg_down(uint8 ride metal_b_supports_paint_setup(11, 3, 8, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 88, 0x20); break; } @@ -4822,38 +5062,34 @@ static void compact_inverted_rc_track_diag_25_deg_down_to_flat(uint8 rideIndex, case 3: if (track_element_is_lift_hill(mapElement)) { switch (direction) { - case 0: - metal_a_supports_paint_setup(11, 1, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26816, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); - metal_a_supports_paint_setup(11, 0, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(11, 2, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(11, 3, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; } } else { switch (direction) { - case 0: - metal_a_supports_paint_setup(11, 1, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26788, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); - metal_a_supports_paint_setup(11, 0, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(11, 2, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(11, 3, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; } } + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 1, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 0, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 2, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 3, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); + break; + } + paint_util_set_general_support_height(height + 64, 0x20); break; } @@ -4891,12 +5127,18 @@ static void compact_inverted_rc_track_diag_flat_to_left_bank(uint8 rideIndex, ui paint_util_set_general_support_height(height + 48, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26874, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 29); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(11, 1, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26874, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 29); metal_a_supports_paint_setup(11, 0, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -4906,7 +5148,7 @@ static void compact_inverted_rc_track_diag_flat_to_left_bank(uint8 rideIndex, ui metal_a_supports_paint_setup(11, 3, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -4944,12 +5186,18 @@ static void compact_inverted_rc_track_diag_flat_to_right_bank(uint8 rideIndex, u paint_util_set_general_support_height(height + 48, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26878, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 29); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(11, 1, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26878, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 29); metal_a_supports_paint_setup(11, 0, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -4959,7 +5207,7 @@ static void compact_inverted_rc_track_diag_flat_to_right_bank(uint8 rideIndex, u metal_a_supports_paint_setup(11, 3, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -4997,12 +5245,18 @@ static void compact_inverted_rc_track_diag_left_bank_to_flat(uint8 rideIndex, ui paint_util_set_general_support_height(height + 48, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26880, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 29); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(11, 1, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26880, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 29); metal_a_supports_paint_setup(11, 0, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -5012,7 +5266,7 @@ static void compact_inverted_rc_track_diag_left_bank_to_flat(uint8 rideIndex, ui metal_a_supports_paint_setup(11, 3, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -5050,12 +5304,18 @@ static void compact_inverted_rc_track_diag_right_bank_to_flat(uint8 rideIndex, u paint_util_set_general_support_height(height + 48, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26876, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 29); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(11, 1, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26876, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 29); metal_a_supports_paint_setup(11, 0, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -5065,7 +5325,7 @@ static void compact_inverted_rc_track_diag_right_bank_to_flat(uint8 rideIndex, u metal_a_supports_paint_setup(11, 3, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -5103,12 +5363,18 @@ static void compact_inverted_rc_track_diag_left_bank_to_25_deg_up(uint8 rideInde paint_util_set_general_support_height(height + 64, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26890, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(11, 1, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26890, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); metal_a_supports_paint_setup(11, 0, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -5118,7 +5384,7 @@ static void compact_inverted_rc_track_diag_left_bank_to_25_deg_up(uint8 rideInde metal_a_supports_paint_setup(11, 3, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 64, 0x20); break; } @@ -5156,12 +5422,18 @@ static void compact_inverted_rc_track_diag_right_bank_to_25_deg_up(uint8 rideInd paint_util_set_general_support_height(height + 64, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26894, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(11, 1, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26894, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); metal_a_supports_paint_setup(11, 0, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -5171,7 +5443,7 @@ static void compact_inverted_rc_track_diag_right_bank_to_25_deg_up(uint8 rideInd metal_a_supports_paint_setup(11, 3, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 64, 0x20); break; } @@ -5209,12 +5481,18 @@ static void compact_inverted_rc_track_diag_25_deg_up_to_left_bank(uint8 rideInde paint_util_set_general_support_height(height + 72, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26882, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(11, 1, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26882, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); metal_a_supports_paint_setup(11, 0, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -5224,7 +5502,7 @@ static void compact_inverted_rc_track_diag_25_deg_up_to_left_bank(uint8 rideInde metal_a_supports_paint_setup(11, 3, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 72, 0x20); break; } @@ -5262,12 +5540,18 @@ static void compact_inverted_rc_track_diag_25_deg_up_to_right_bank(uint8 rideInd paint_util_set_general_support_height(height + 72, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26886, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(11, 1, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26886, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); metal_a_supports_paint_setup(11, 0, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -5277,7 +5561,7 @@ static void compact_inverted_rc_track_diag_25_deg_up_to_right_bank(uint8 rideInd metal_a_supports_paint_setup(11, 3, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 72, 0x20); break; } @@ -5315,12 +5599,18 @@ static void compact_inverted_rc_track_diag_left_bank_to_25_deg_down(uint8 rideIn paint_util_set_general_support_height(height + 72, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26888, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(11, 1, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26888, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); metal_a_supports_paint_setup(11, 0, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -5330,7 +5620,7 @@ static void compact_inverted_rc_track_diag_left_bank_to_25_deg_down(uint8 rideIn metal_a_supports_paint_setup(11, 3, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 72, 0x20); break; } @@ -5368,12 +5658,18 @@ static void compact_inverted_rc_track_diag_right_bank_to_25_deg_down(uint8 rideI paint_util_set_general_support_height(height + 72, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26884, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(11, 1, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26884, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); metal_a_supports_paint_setup(11, 0, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -5383,7 +5679,7 @@ static void compact_inverted_rc_track_diag_right_bank_to_25_deg_down(uint8 rideI metal_a_supports_paint_setup(11, 3, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 72, 0x20); break; } @@ -5421,12 +5717,18 @@ static void compact_inverted_rc_track_diag_25_deg_down_to_left_bank(uint8 rideIn paint_util_set_general_support_height(height + 64, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26896, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(11, 1, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26896, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); metal_a_supports_paint_setup(11, 0, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -5436,7 +5738,7 @@ static void compact_inverted_rc_track_diag_25_deg_down_to_left_bank(uint8 rideIn metal_a_supports_paint_setup(11, 3, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 64, 0x20); break; } @@ -5474,12 +5776,18 @@ static void compact_inverted_rc_track_diag_25_deg_down_to_right_bank(uint8 rideI paint_util_set_general_support_height(height + 64, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26892, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(11, 1, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26892, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); metal_a_supports_paint_setup(11, 0, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -5489,7 +5797,7 @@ static void compact_inverted_rc_track_diag_25_deg_down_to_right_bank(uint8 rideI metal_a_supports_paint_setup(11, 3, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 64, 0x20); break; } @@ -5527,12 +5835,18 @@ static void compact_inverted_rc_track_diag_left_bank(uint8 rideIndex, uint8 trac paint_util_set_general_support_height(height + 48, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26870, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 29); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(11, 1, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26870, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 29); metal_a_supports_paint_setup(11, 0, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -5542,7 +5856,7 @@ static void compact_inverted_rc_track_diag_left_bank(uint8 rideIndex, uint8 trac metal_a_supports_paint_setup(11, 3, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -5580,12 +5894,18 @@ static void compact_inverted_rc_track_diag_right_bank(uint8 rideIndex, uint8 tra paint_util_set_general_support_height(height + 48, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26872, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 29); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(11, 1, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26872, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 29); metal_a_supports_paint_setup(11, 0, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -5595,7 +5915,7 @@ static void compact_inverted_rc_track_diag_right_bank(uint8 rideIndex, uint8 tra metal_a_supports_paint_setup(11, 3, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -5614,11 +5934,13 @@ static void compact_inverted_rc_track_block_brakes(uint8 rideIndex, uint8 trackS sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26560, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); if (track_paint_util_should_paint_supports(gPaintMapPosition)) { metal_a_supports_paint_setup(11, 4, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); } + paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); } diff --git a/src/ride/coaster/corkscrew_roller_coaster.c b/src/ride/coaster/corkscrew_roller_coaster.c index 5c9a479f39..fcff2188ce 100644 --- a/src/ride/coaster/corkscrew_roller_coaster.c +++ b/src/ride/coaster/corkscrew_roller_coaster.c @@ -67,6 +67,7 @@ static void corkscrew_rc_track_flat(uint8 rideIndex, uint8 trackSequence, uint8 paint_util_set_general_support_height(height + 32, 0x20); } +/** rct2: 0x008A7D68, 0x008A7D78, 0x008A7D88 */ static void corkscrew_rc_track_station(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { static const uint32 imageIds[4][3] = { @@ -2188,11 +2189,13 @@ static void corkscrew_rc_track_left_corkscrew_up(uint8 rideIndex, uint8 trackSeq sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 16619, 0, 0, 32, 20, 3, height, 0, 6, height + 4); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(0, 4, 0, height, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_0); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -2228,7 +2231,10 @@ static void corkscrew_rc_track_left_corkscrew_up(uint8 rideIndex, uint8 trackSeq sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 16621, 0, 0, 20, 32, 3, height, 6, 0, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(0, 4, 0, height + 35, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 2: paint_util_push_tunnel_right(height + 8, TUNNEL_0); @@ -2237,7 +2243,6 @@ static void corkscrew_rc_track_left_corkscrew_up(uint8 rideIndex, uint8 trackSeq paint_util_push_tunnel_left(height + 8, TUNNEL_0); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -2302,7 +2307,10 @@ static void corkscrew_rc_track_right_corkscrew_up(uint8 rideIndex, uint8 trackSe sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 16633, 0, 0, 20, 32, 3, height, 6, 0, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(0, 4, 0, height + 35, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 0: paint_util_push_tunnel_right(height + 8, TUNNEL_0); @@ -2311,7 +2319,6 @@ static void corkscrew_rc_track_right_corkscrew_up(uint8 rideIndex, uint8 trackSe paint_util_push_tunnel_left(height + 8, TUNNEL_0); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } diff --git a/src/ride/coaster/flying_roller_coaster.c b/src/ride/coaster/flying_roller_coaster.c index 0295b00137..c19a47c1b6 100644 --- a/src/ride/coaster/flying_roller_coaster.c +++ b/src/ride/coaster/flying_roller_coaster.c @@ -78,9 +78,6 @@ static void flying_rc_track_flat(uint8 rideIndex, uint8 trackSequence, uint8 dir sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27132, 0, 0, 32, 20, 1, height + 24, 0, 6, height + 22); break; } - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 4, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); - } } else { switch (direction) { case 0: @@ -92,16 +89,19 @@ static void flying_rc_track_flat(uint8 rideIndex, uint8 trackSequence, uint8 dir sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27130, 0, 0, 32, 20, 1, height + 24, 0, 6, height + 22); break; } - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 4, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); - } } - paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + metal_a_supports_paint_setup(11, 4, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); + } + + paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); paint_util_set_general_support_height(height + 32, 0x20); } } +/** rct2: 0x007C7244, 0x007C7254, 0x007C7264 */ static void flying_rc_track_station(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { static const uint32 imageIds[4][3] = { @@ -157,63 +157,57 @@ static void flying_rc_track_25_deg_up(uint8 rideIndex, uint8 trackSequence, uint switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27249, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27250, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27251, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27252, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); - } break; } } else { switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27221, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27222, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27223, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27224, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); - } break; } } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 6, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 8, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 7, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 5, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_7); } else { paint_util_push_tunnel_rotated(direction, height + 8, TUNNEL_8); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 56, 0x20); } } @@ -304,63 +298,57 @@ static void flying_rc_track_flat_to_25_deg_up(uint8 rideIndex, uint8 trackSequen switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27241, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27242, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27243, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27244, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); - } break; } } else { switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27213, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27214, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27215, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27216, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); - } break; } } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 6, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 8, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 7, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 5, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); } else { paint_util_push_tunnel_rotated(direction, height, TUNNEL_8); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); } } @@ -456,37 +444,43 @@ static void flying_rc_track_60_deg_up_to_25_deg_up(uint8 rideIndex, uint8 trackS switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27231, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 56); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 71, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27235, 0, 0, 32, 10, 49, height + 24, 0, 10, height + 6); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27232, 0, 0, 32, 2, 49, height + 24, 0, 4, height + 6); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 71, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27236, 0, 0, 32, 10, 49, height + 24, 0, 10, height + 6); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27233, 0, 0, 32, 2, 49, height + 24, 0, 4, height + 6); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 71, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27234, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 56); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 71, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 6, 0, height + 71, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 8, 0, height + 71, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 7, 0, height + 71, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 5, 0, height + 71, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_7); } else { paint_util_push_tunnel_rotated(direction, height + 24, TUNNEL_8); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 72, 0x20); } } @@ -524,63 +518,57 @@ static void flying_rc_track_25_deg_up_to_flat(uint8 rideIndex, uint8 trackSequen switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27245, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27246, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27247, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27248, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); - } break; } } else { switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27217, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27218, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27219, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27220, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); - } break; } } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 6, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 8, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 7, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 5, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_6); } else { paint_util_push_tunnel_rotated(direction, height + 8, TUNNEL_14); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 40, 0x20); } } @@ -753,11 +741,13 @@ static void flying_rc_track_left_quarter_turn_5(uint8 rideIndex, uint8 trackSequ sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27137, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 22); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; case 1: @@ -835,7 +825,10 @@ static void flying_rc_track_left_quarter_turn_5(uint8 rideIndex, uint8 trackSequ sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27133, 0, 0, 20, 32, 3, height + 24, 6, 0, height + 22); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 2: paint_util_push_tunnel_right(height, TUNNEL_6); @@ -844,7 +837,6 @@ static void flying_rc_track_left_quarter_turn_5(uint8 rideIndex, uint8 trackSequ paint_util_push_tunnel_left(height, TUNNEL_6); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; } @@ -899,11 +891,13 @@ static void flying_rc_track_flat_to_left_bank(uint8 rideIndex, uint8 trackSequen sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27272, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 22); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); if (track_paint_util_should_paint_supports(gPaintMapPosition)) { metal_a_supports_paint_setup(11, 4, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); } + paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); } } @@ -949,11 +943,13 @@ static void flying_rc_track_flat_to_right_bank(uint8 rideIndex, uint8 trackSeque sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27276, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 22); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); if (track_paint_util_should_paint_supports(gPaintMapPosition)) { metal_a_supports_paint_setup(11, 4, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); } + paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); } } @@ -999,11 +995,13 @@ static void flying_rc_track_left_bank_to_flat(uint8 rideIndex, uint8 trackSequen sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27274, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 22); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); if (track_paint_util_should_paint_supports(gPaintMapPosition)) { metal_a_supports_paint_setup(11, 4, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); } + paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); } } @@ -1049,11 +1047,13 @@ static void flying_rc_track_right_bank_to_flat(uint8 rideIndex, uint8 trackSeque sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27270, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 22); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); if (track_paint_util_should_paint_supports(gPaintMapPosition)) { metal_a_supports_paint_setup(11, 4, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); } + paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); } } @@ -1192,11 +1192,13 @@ static void flying_rc_track_banked_left_quarter_turn_5(uint8 rideIndex, uint8 tr sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27157, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; case 1: @@ -1274,7 +1276,10 @@ static void flying_rc_track_banked_left_quarter_turn_5(uint8 rideIndex, uint8 tr sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27153, 0, 0, 20, 32, 3, height + 24, 6, 0, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 2: paint_util_push_tunnel_right(height, TUNNEL_6); @@ -1283,7 +1288,6 @@ static void flying_rc_track_banked_left_quarter_turn_5(uint8 rideIndex, uint8 tr paint_util_push_tunnel_left(height, TUNNEL_6); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; } @@ -1331,35 +1335,41 @@ static void flying_rc_track_left_bank_to_25_deg_up(uint8 rideIndex, uint8 trackS switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27277, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27278, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27279, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27280, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 6, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 8, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 7, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 5, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); } else { paint_util_push_tunnel_rotated(direction, height, TUNNEL_8); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); } } @@ -1398,35 +1408,41 @@ static void flying_rc_track_right_bank_to_25_deg_up(uint8 rideIndex, uint8 track switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27281, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27282, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27283, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27284, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 6, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 8, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 7, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 5, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); } else { paint_util_push_tunnel_rotated(direction, height, TUNNEL_8); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); } } @@ -1465,35 +1481,41 @@ static void flying_rc_track_25_deg_up_to_left_bank(uint8 rideIndex, uint8 trackS switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27285, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27286, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27287, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27288, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 6, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 8, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 7, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 5, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_6); } else { paint_util_push_tunnel_rotated(direction, height + 8, TUNNEL_14); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 40, 0x20); } } @@ -1532,35 +1554,41 @@ static void flying_rc_track_25_deg_up_to_right_bank(uint8 rideIndex, uint8 track switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27289, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27290, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27291, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27292, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 6, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 8, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 7, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 5, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_6); } else { paint_util_push_tunnel_rotated(direction, height + 8, TUNNEL_14); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 40, 0x20); } } @@ -1628,11 +1656,13 @@ static void flying_rc_track_left_bank(uint8 rideIndex, uint8 trackSequence, uint sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27296, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 22); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); if (track_paint_util_should_paint_supports(gPaintMapPosition)) { metal_a_supports_paint_setup(11, 4, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); } + paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); } } @@ -1775,11 +1805,13 @@ static void flying_rc_track_left_quarter_turn_5_25_deg_up(uint8 rideIndex, uint8 sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27332, 0, 6, 32, 20, 3, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_7); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 72, 0x20); break; case 1: @@ -1857,7 +1889,10 @@ static void flying_rc_track_left_quarter_turn_5_25_deg_up(uint8 rideIndex, uint8 sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27336, 6, 0, 20, 32, 3, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 2: paint_util_push_tunnel_right(height + 8, TUNNEL_8); @@ -1866,7 +1901,6 @@ static void flying_rc_track_left_quarter_turn_5_25_deg_up(uint8 rideIndex, uint8 paint_util_push_tunnel_left(height + 8, TUNNEL_8); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 72, 0x20); break; } @@ -2005,11 +2039,13 @@ static void flying_rc_track_right_quarter_turn_5_25_deg_up(uint8 rideIndex, uint sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27312, 0, 6, 32, 20, 3, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_7); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 72, 0x20); break; case 1: @@ -2087,7 +2123,10 @@ static void flying_rc_track_right_quarter_turn_5_25_deg_up(uint8 rideIndex, uint sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27316, 6, 0, 20, 32, 3, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 0: paint_util_push_tunnel_right(height + 8, TUNNEL_8); @@ -2096,7 +2135,6 @@ static void flying_rc_track_right_quarter_turn_5_25_deg_up(uint8 rideIndex, uint paint_util_push_tunnel_left(height + 8, TUNNEL_8); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 72, 0x20); break; } @@ -2229,22 +2267,22 @@ static void flying_rc_track_s_bend_left(uint8 rideIndex, uint8 trackSequence, ui sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27260, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 22); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; case 1: switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27254, 0, 0, 32, 26, 3, height + 24, 0, 0, height + 22); - metal_a_supports_paint_setup(11, 5, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27258, 0, 0, 32, 26, 3, height + 24, 0, 0, height + 22); - metal_a_supports_paint_setup(11, 6, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27255, 0, 0, 32, 26, 3, height + 24, 0, 6, height + 22); @@ -2253,7 +2291,17 @@ static void flying_rc_track_s_bend_left(uint8 rideIndex, uint8 trackSequence, ui sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27259, 0, 0, 32, 26, 3, height + 24, 0, 6, height + 22); break; } + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 5, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 6, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); + break; + } + paint_util_set_general_support_height(height + 32, 0x20); break; case 2: @@ -2266,14 +2314,22 @@ static void flying_rc_track_s_bend_left(uint8 rideIndex, uint8 trackSequence, ui break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27254, 0, 0, 32, 26, 3, height + 24, 0, 0, height + 22); - metal_a_supports_paint_setup(11, 5, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27258, 0, 0, 32, 26, 3, height + 24, 0, 0, height + 22); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + switch (direction) { + case 2: + metal_a_supports_paint_setup(11, 5, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: metal_a_supports_paint_setup(11, 6, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 32, 0x20); break; case 3: @@ -2291,7 +2347,10 @@ static void flying_rc_track_s_bend_left(uint8 rideIndex, uint8 trackSequence, ui sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27257, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 22); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 1: paint_util_push_tunnel_right(height, TUNNEL_6); @@ -2300,7 +2359,6 @@ static void flying_rc_track_s_bend_left(uint8 rideIndex, uint8 trackSequence, ui paint_util_push_tunnel_left(height, TUNNEL_6); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; } @@ -2419,22 +2477,22 @@ static void flying_rc_track_s_bend_right(uint8 rideIndex, uint8 trackSequence, u sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27268, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 22); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; case 1: switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27262, 0, 0, 32, 26, 3, height + 24, 0, 6, height + 22); - metal_a_supports_paint_setup(11, 8, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27266, 0, 0, 32, 26, 3, height + 24, 0, 6, height + 22); - metal_a_supports_paint_setup(11, 7, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27263, 0, 0, 32, 26, 3, height + 24, 0, 0, height + 22); @@ -2443,7 +2501,17 @@ static void flying_rc_track_s_bend_right(uint8 rideIndex, uint8 trackSequence, u sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27267, 0, 0, 32, 26, 3, height + 24, 0, 0, height + 22); break; } + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 8, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 7, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); + break; + } + paint_util_set_general_support_height(height + 32, 0x20); break; case 2: @@ -2456,14 +2524,22 @@ static void flying_rc_track_s_bend_right(uint8 rideIndex, uint8 trackSequence, u break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27262, 0, 0, 32, 26, 3, height + 24, 0, 6, height + 22); - metal_a_supports_paint_setup(11, 8, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27266, 0, 0, 32, 26, 3, height + 24, 0, 6, height + 22); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 2: + metal_a_supports_paint_setup(11, 8, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: metal_a_supports_paint_setup(11, 7, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 32, 0x20); break; case 3: @@ -2481,7 +2557,10 @@ static void flying_rc_track_s_bend_right(uint8 rideIndex, uint8 trackSequence, u sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27265, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 22); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 1: paint_util_push_tunnel_right(height, TUNNEL_6); @@ -2490,7 +2569,6 @@ static void flying_rc_track_s_bend_right(uint8 rideIndex, uint8 trackSequence, u paint_util_push_tunnel_left(height, TUNNEL_6); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; } @@ -2590,11 +2668,13 @@ static void flying_rc_track_left_quarter_turn_3(uint8 rideIndex, uint8 trackSequ sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27389, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 22); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; case 1: @@ -2633,7 +2713,10 @@ static void flying_rc_track_left_quarter_turn_3(uint8 rideIndex, uint8 trackSequ sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27387, 0, 0, 20, 32, 3, height + 24, 6, 0, height + 22); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 2: paint_util_push_tunnel_right(height, TUNNEL_6); @@ -2642,7 +2725,6 @@ static void flying_rc_track_left_quarter_turn_3(uint8 rideIndex, uint8 trackSequ paint_util_push_tunnel_left(height, TUNNEL_6); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; } @@ -2751,11 +2833,13 @@ static void flying_rc_track_left_quarter_turn_3_bank(uint8 rideIndex, uint8 trac sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27401, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 22); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; case 1: @@ -2794,7 +2878,10 @@ static void flying_rc_track_left_quarter_turn_3_bank(uint8 rideIndex, uint8 trac sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27399, 0, 0, 20, 32, 3, height + 24, 6, 0, height + 22); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 2: paint_util_push_tunnel_right(height, TUNNEL_6); @@ -2803,7 +2890,6 @@ static void flying_rc_track_left_quarter_turn_3_bank(uint8 rideIndex, uint8 trac paint_util_push_tunnel_left(height, TUNNEL_6); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; } @@ -2895,11 +2981,13 @@ static void flying_rc_track_left_quarter_turn_3_25_deg_up(uint8 rideIndex, uint8 sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27420, 0, 6, 32, 20, 3, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_7); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 72, 0x20); break; case 1: @@ -2923,7 +3011,10 @@ static void flying_rc_track_left_quarter_turn_3_25_deg_up(uint8 rideIndex, uint8 sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27419, 6, 0, 20, 32, 3, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 2: paint_util_push_tunnel_right(height + 8, TUNNEL_8); @@ -2932,7 +3023,6 @@ static void flying_rc_track_left_quarter_turn_3_25_deg_up(uint8 rideIndex, uint8 paint_util_push_tunnel_left(height + 8, TUNNEL_8); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 72, 0x20); break; } @@ -3020,11 +3110,13 @@ static void flying_rc_track_right_quarter_turn_3_25_deg_up(uint8 rideIndex, uint sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27417, 0, 6, 32, 20, 3, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_7); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 72, 0x20); break; case 1: @@ -3048,7 +3140,10 @@ static void flying_rc_track_right_quarter_turn_3_25_deg_up(uint8 rideIndex, uint sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27418, 6, 0, 20, 32, 3, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 0: paint_util_push_tunnel_right(height + 8, TUNNEL_8); @@ -3057,7 +3152,6 @@ static void flying_rc_track_right_quarter_turn_3_25_deg_up(uint8 rideIndex, uint paint_util_push_tunnel_left(height + 8, TUNNEL_8); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 72, 0x20); break; } @@ -4821,11 +4915,13 @@ static void flying_rc_track_brakes(uint8 rideIndex, uint8 trackSequence, uint8 d sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27338, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); if (track_paint_util_should_paint_supports(gPaintMapPosition)) { metal_a_supports_paint_setup(11, 4, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); } + paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); } } @@ -4850,11 +4946,13 @@ static void flying_rc_track_left_quarter_banked_helix_large_up(uint8 rideIndex, sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27197, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 30); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 41, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_9); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -4932,7 +5030,10 @@ static void flying_rc_track_left_quarter_banked_helix_large_up(uint8 rideIndex, sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27193, 0, 0, 20, 32, 3, height + 24, 6, 0, height + 38); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 53, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 2: paint_util_push_tunnel_right(height + 16, TUNNEL_9); @@ -4941,7 +5042,6 @@ static void flying_rc_track_left_quarter_banked_helix_large_up(uint8 rideIndex, paint_util_push_tunnel_left(height + 16, TUNNEL_9); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -4962,11 +5062,13 @@ static void flying_rc_track_left_quarter_banked_helix_large_up(uint8 rideIndex, sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27197, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 30); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 41, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_9); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -5044,7 +5146,10 @@ static void flying_rc_track_left_quarter_banked_helix_large_up(uint8 rideIndex, sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27193, 0, 0, 20, 32, 3, height + 24, 6, 0, height + 38); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 53, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 2: paint_util_push_tunnel_right(height + 16, TUNNEL_9); @@ -5053,7 +5158,6 @@ static void flying_rc_track_left_quarter_banked_helix_large_up(uint8 rideIndex, paint_util_push_tunnel_left(height + 16, TUNNEL_9); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -5080,11 +5184,13 @@ static void flying_rc_track_right_quarter_banked_helix_large_up(uint8 rideIndex, sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27188, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 30); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 41, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_9); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -5162,7 +5268,10 @@ static void flying_rc_track_right_quarter_banked_helix_large_up(uint8 rideIndex, sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27192, 0, 0, 20, 32, 3, height + 24, 6, 0, height + 38); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 53, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 0: paint_util_push_tunnel_right(height + 16, TUNNEL_9); @@ -5171,7 +5280,6 @@ static void flying_rc_track_right_quarter_banked_helix_large_up(uint8 rideIndex, paint_util_push_tunnel_left(height + 16, TUNNEL_9); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -5192,11 +5300,13 @@ static void flying_rc_track_right_quarter_banked_helix_large_up(uint8 rideIndex, sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27188, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 30); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 41, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_9); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -5274,7 +5384,10 @@ static void flying_rc_track_right_quarter_banked_helix_large_up(uint8 rideIndex, sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27192, 0, 0, 20, 32, 3, height + 24, 6, 0, height + 38); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 53, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 0: paint_util_push_tunnel_right(height + 16, TUNNEL_9); @@ -5283,7 +5396,6 @@ static void flying_rc_track_right_quarter_banked_helix_large_up(uint8 rideIndex, paint_util_push_tunnel_left(height + 16, TUNNEL_9); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -5310,11 +5422,13 @@ static void flying_rc_track_left_quarter_banked_helix_large_down(uint8 rideIndex sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27177, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 38); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 53, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height + 16, TUNNEL_9); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -5392,7 +5506,10 @@ static void flying_rc_track_left_quarter_banked_helix_large_down(uint8 rideIndex sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27173, 0, 0, 20, 32, 3, height + 24, 6, 0, height + 30); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 41, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 2: paint_util_push_tunnel_right(height, TUNNEL_9); @@ -5401,7 +5518,6 @@ static void flying_rc_track_left_quarter_banked_helix_large_down(uint8 rideIndex paint_util_push_tunnel_left(height, TUNNEL_9); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -5422,11 +5538,13 @@ static void flying_rc_track_left_quarter_banked_helix_large_down(uint8 rideIndex sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27177, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 38); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 53, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height + 16, TUNNEL_9); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -5504,7 +5622,10 @@ static void flying_rc_track_left_quarter_banked_helix_large_down(uint8 rideIndex sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27173, 0, 0, 20, 32, 3, height + 24, 6, 0, height + 30); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 41, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 2: paint_util_push_tunnel_right(height, TUNNEL_9); @@ -5513,7 +5634,6 @@ static void flying_rc_track_left_quarter_banked_helix_large_down(uint8 rideIndex paint_util_push_tunnel_left(height, TUNNEL_9); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -5540,11 +5660,13 @@ static void flying_rc_track_right_quarter_banked_helix_large_down(uint8 rideInde sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27208, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 38); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 53, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height + 16, TUNNEL_9); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -5622,7 +5744,10 @@ static void flying_rc_track_right_quarter_banked_helix_large_down(uint8 rideInde sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27212, 0, 0, 20, 32, 3, height + 24, 6, 0, height + 30); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 41, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 0: paint_util_push_tunnel_right(height, TUNNEL_9); @@ -5631,7 +5756,6 @@ static void flying_rc_track_right_quarter_banked_helix_large_down(uint8 rideInde paint_util_push_tunnel_left(height, TUNNEL_9); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -5652,11 +5776,13 @@ static void flying_rc_track_right_quarter_banked_helix_large_down(uint8 rideInde sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27208, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 38); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 53, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height + 16, TUNNEL_9); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -5734,7 +5860,10 @@ static void flying_rc_track_right_quarter_banked_helix_large_down(uint8 rideInde sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27212, 0, 0, 20, 32, 3, height + 24, 6, 0, height + 30); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 41, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 0: paint_util_push_tunnel_right(height, TUNNEL_9); @@ -5743,7 +5872,6 @@ static void flying_rc_track_right_quarter_banked_helix_large_down(uint8 rideInde paint_util_push_tunnel_left(height, TUNNEL_9); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -5782,35 +5910,41 @@ static void flying_rc_track_25_deg_up_left_banked(uint8 rideIndex, uint8 trackSe switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27711, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27712, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27713, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27714, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 6, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 8, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 7, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 5, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_7); } else { paint_util_push_tunnel_rotated(direction, height + 8, TUNNEL_8); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 72, 0x20); } } @@ -5847,35 +5981,41 @@ static void flying_rc_track_25_deg_up_right_banked(uint8 rideIndex, uint8 trackS switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27715, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27716, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27717, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27718, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 6, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 8, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 7, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 5, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_7); } else { paint_util_push_tunnel_rotated(direction, height + 8, TUNNEL_8); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 72, 0x20); } } @@ -6072,11 +6212,13 @@ static void flying_rc_track_left_eighth_to_diag(uint8 rideIndex, uint8 trackSequ sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27519, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 22); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; case 1: @@ -6123,22 +6265,34 @@ static void flying_rc_track_left_eighth_to_diag(uint8 rideIndex, uint8 trackSequ switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27510, 0, 0, 16, 16, 3, height + 24, 16, 16, height + 22); - metal_a_supports_paint_setup(11, 3, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27514, 0, 0, 16, 18, 3, height + 24, 0, 16, height + 22); - metal_a_supports_paint_setup(11, 1, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27518, 0, 0, 16, 16, 3, height + 24, 0, 0, height + 22); - metal_a_supports_paint_setup(11, 0, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27522, 0, 0, 16, 16, 3, height + 24, 16, 0, height + 22); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 3, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 1, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 0, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: metal_a_supports_paint_setup(11, 2, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 32, 0x20); break; } @@ -6252,11 +6406,13 @@ static void flying_rc_track_right_eighth_to_diag(uint8 rideIndex, uint8 trackSeq sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27503, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 22); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; case 1: @@ -6303,22 +6459,34 @@ static void flying_rc_track_right_eighth_to_diag(uint8 rideIndex, uint8 trackSeq switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27494, 0, 0, 16, 16, 3, height + 24, 16, 0, height + 22); - metal_a_supports_paint_setup(11, 1, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27498, 0, 0, 16, 16, 3, height + 24, 0, 0, height + 22); - metal_a_supports_paint_setup(11, 0, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27502, 0, 0, 16, 18, 3, height + 24, 0, 16, height + 22); - metal_a_supports_paint_setup(11, 2, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27506, 0, 0, 16, 16, 3, height + 24, 16, 16, height + 22); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 1, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 0, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 2, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: metal_a_supports_paint_setup(11, 3, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 32, 0x20); break; } @@ -6446,11 +6614,13 @@ static void flying_rc_track_left_eighth_bank_to_diag(uint8 rideIndex, uint8 trac sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27551, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 22); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; case 1: @@ -6497,22 +6667,34 @@ static void flying_rc_track_left_eighth_bank_to_diag(uint8 rideIndex, uint8 trac switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27542, 0, 0, 16, 16, 3, height + 24, 16, 16, height + 22); - metal_a_supports_paint_setup(11, 3, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27546, 0, 0, 16, 18, 3, height + 24, 0, 16, height + 22); - metal_a_supports_paint_setup(11, 1, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27550, 0, 0, 16, 16, 3, height + 24, 0, 0, height + 22); - metal_a_supports_paint_setup(11, 0, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27554, 0, 0, 16, 16, 3, height + 24, 16, 0, height + 22); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 3, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 1, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 0, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: metal_a_supports_paint_setup(11, 2, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 32, 0x20); break; } @@ -6626,11 +6808,13 @@ static void flying_rc_track_right_eighth_bank_to_diag(uint8 rideIndex, uint8 tra sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27535, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 22); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; case 1: @@ -6677,22 +6861,34 @@ static void flying_rc_track_right_eighth_bank_to_diag(uint8 rideIndex, uint8 tra switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27526, 0, 0, 16, 16, 3, height + 24, 16, 0, height + 22); - metal_a_supports_paint_setup(11, 1, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27530, 0, 0, 16, 16, 3, height + 24, 0, 0, height + 22); - metal_a_supports_paint_setup(11, 0, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27534, 0, 0, 16, 18, 3, height + 24, 0, 16, height + 22); - metal_a_supports_paint_setup(11, 2, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27538, 0, 0, 16, 16, 3, height + 24, 16, 16, height + 22); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 1, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 0, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 2, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: metal_a_supports_paint_setup(11, 3, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 32, 0x20); break; } @@ -6863,38 +7059,34 @@ static void flying_rc_track_diag_flat(uint8 rideIndex, uint8 trackSequence, uint case 3: if (track_element_is_lift_hill(mapElement)) { switch (direction) { - case 0: - metal_a_supports_paint_setup(11, 1, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27612, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 22); - metal_a_supports_paint_setup(11, 0, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(11, 2, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(11, 3, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; } } else { switch (direction) { - case 0: - metal_a_supports_paint_setup(11, 1, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27556, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 22); - metal_a_supports_paint_setup(11, 0, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(11, 2, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(11, 3, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; } } + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 1, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 0, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 2, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 3, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); + break; + } + paint_util_set_general_support_height(height + 32, 0x20); break; } @@ -7051,38 +7243,34 @@ static void flying_rc_track_diag_25_deg_up(uint8 rideIndex, uint8 trackSequence, case 3: if (track_element_is_lift_hill(mapElement)) { switch (direction) { - case 0: - metal_a_supports_paint_setup(11, 1, 0, height + 51, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27624, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 40); - metal_a_supports_paint_setup(11, 0, 0, height + 51, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(11, 2, 0, height + 51, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(11, 3, 0, height + 51, gTrackColours[SCHEME_SUPPORTS]); break; } } else { switch (direction) { - case 0: - metal_a_supports_paint_setup(11, 1, 0, height + 51, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27568, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 40); - metal_a_supports_paint_setup(11, 0, 0, height + 51, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(11, 2, 0, height + 51, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(11, 3, 0, height + 51, gTrackColours[SCHEME_SUPPORTS]); break; } } + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 1, 0, height + 51, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 0, 0, height + 51, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 2, 0, height + 51, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 3, 0, height + 51, gTrackColours[SCHEME_SUPPORTS]); + break; + } + paint_util_set_general_support_height(height + 56, 0x20); break; } @@ -7213,12 +7401,18 @@ static void flying_rc_track_diag_60_deg_up(uint8 rideIndex, uint8 trackSequence, paint_util_set_general_support_height(height + 104, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27580, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 24); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_b_supports_paint_setup(11, 1, 32, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27580, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 24); metal_b_supports_paint_setup(11, 0, 36, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -7228,7 +7422,7 @@ static void flying_rc_track_diag_60_deg_up(uint8 rideIndex, uint8 trackSequence, metal_b_supports_paint_setup(11, 3, 36, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 104, 0x20); break; } @@ -7385,38 +7579,34 @@ static void flying_rc_track_diag_flat_to_25_deg_up(uint8 rideIndex, uint8 trackS case 3: if (track_element_is_lift_hill(mapElement)) { switch (direction) { - case 0: - metal_a_supports_paint_setup(11, 1, 0, height + 43, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27616, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 32); - metal_a_supports_paint_setup(11, 0, 0, height + 43, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(11, 2, 0, height + 43, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(11, 3, 0, height + 43, gTrackColours[SCHEME_SUPPORTS]); break; } } else { switch (direction) { - case 0: - metal_a_supports_paint_setup(11, 1, 0, height + 43, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27560, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 32); - metal_a_supports_paint_setup(11, 0, 0, height + 43, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(11, 2, 0, height + 43, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(11, 3, 0, height + 43, gTrackColours[SCHEME_SUPPORTS]); break; } } + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 1, 0, height + 43, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 0, 0, height + 43, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 2, 0, height + 43, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 3, 0, height + 43, gTrackColours[SCHEME_SUPPORTS]); + break; + } + paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -7547,12 +7737,18 @@ static void flying_rc_track_diag_25_deg_up_to_60_deg_up(uint8 rideIndex, uint8 t paint_util_set_general_support_height(height + 72, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27572, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 56); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_b_supports_paint_setup(11, 1, 16, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27572, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 56); metal_b_supports_paint_setup(11, 0, 16, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -7562,7 +7758,7 @@ static void flying_rc_track_diag_25_deg_up_to_60_deg_up(uint8 rideIndex, uint8 t metal_b_supports_paint_setup(11, 3, 16, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 72, 0x20); break; } @@ -7693,12 +7889,18 @@ static void flying_rc_track_diag_60_deg_up_to_25_deg_up(uint8 rideIndex, uint8 t paint_util_set_general_support_height(height + 72, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27576, -16, -16, 16, 16, 3, height + 24, 0, 0, height + 56); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_b_supports_paint_setup(11, 1, 21, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27576, -16, -16, 16, 16, 3, height + 24, 0, 0, height + 56); metal_b_supports_paint_setup(11, 0, 21, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -7708,7 +7910,7 @@ static void flying_rc_track_diag_60_deg_up_to_25_deg_up(uint8 rideIndex, uint8 t metal_b_supports_paint_setup(11, 3, 21, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 72, 0x20); break; } @@ -7865,38 +8067,34 @@ static void flying_rc_track_diag_25_deg_up_to_flat(uint8 rideIndex, uint8 trackS case 3: if (track_element_is_lift_hill(mapElement)) { switch (direction) { - case 0: - metal_a_supports_paint_setup(11, 1, 0, height + 45, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27620, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 32); - metal_a_supports_paint_setup(11, 0, 0, height + 45, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(11, 2, 0, height + 45, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(11, 3, 0, height + 45, gTrackColours[SCHEME_SUPPORTS]); break; } } else { switch (direction) { - case 0: - metal_a_supports_paint_setup(11, 1, 0, height + 45, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27564, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 32); - metal_a_supports_paint_setup(11, 0, 0, height + 45, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(11, 2, 0, height + 45, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(11, 3, 0, height + 45, gTrackColours[SCHEME_SUPPORTS]); break; } } + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 1, 0, height + 45, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 0, 0, height + 45, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 2, 0, height + 45, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 3, 0, height + 45, gTrackColours[SCHEME_SUPPORTS]); + break; + } + paint_util_set_general_support_height(height + 56, 0x20); break; } @@ -8027,12 +8225,18 @@ static void flying_rc_track_diag_25_deg_down(uint8 rideIndex, uint8 trackSequenc paint_util_set_general_support_height(height + 56, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27570, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 40); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(11, 1, 0, height + 51, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27570, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 40); metal_a_supports_paint_setup(11, 0, 0, height + 51, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -8042,7 +8246,7 @@ static void flying_rc_track_diag_25_deg_down(uint8 rideIndex, uint8 trackSequenc metal_a_supports_paint_setup(11, 3, 0, height + 51, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 56, 0x20); break; } @@ -8173,12 +8377,18 @@ static void flying_rc_track_diag_60_deg_down(uint8 rideIndex, uint8 trackSequenc paint_util_set_general_support_height(height + 104, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27582, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 88); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_b_supports_paint_setup(11, 1, 24, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27582, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 88); metal_b_supports_paint_setup(11, 0, 28, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -8188,7 +8398,7 @@ static void flying_rc_track_diag_60_deg_down(uint8 rideIndex, uint8 trackSequenc metal_b_supports_paint_setup(11, 3, 28, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 104, 0x20); break; } @@ -8319,12 +8529,18 @@ static void flying_rc_track_diag_flat_to_25_deg_down(uint8 rideIndex, uint8 trac paint_util_set_general_support_height(height + 56, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27566, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 32); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(11, 1, 0, height + 45, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27566, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 32); metal_a_supports_paint_setup(11, 0, 0, height + 45, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -8334,7 +8550,7 @@ static void flying_rc_track_diag_flat_to_25_deg_down(uint8 rideIndex, uint8 trac metal_a_supports_paint_setup(11, 3, 0, height + 45, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 56, 0x20); break; } @@ -8465,12 +8681,18 @@ static void flying_rc_track_diag_25_deg_down_to_60_deg_down(uint8 rideIndex, uin paint_util_set_general_support_height(height + 72, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27578, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 56); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_b_supports_paint_setup(11, 1, 17, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27578, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 56); metal_b_supports_paint_setup(11, 0, 17, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -8480,7 +8702,7 @@ static void flying_rc_track_diag_25_deg_down_to_60_deg_down(uint8 rideIndex, uin metal_b_supports_paint_setup(11, 3, 17, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 72, 0x20); break; } @@ -8611,12 +8833,18 @@ static void flying_rc_track_diag_60_deg_down_to_25_deg_down(uint8 rideIndex, uin paint_util_set_general_support_height(height + 72, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27574, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 56); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_b_supports_paint_setup(11, 1, 8, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27574, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 56); metal_b_supports_paint_setup(11, 0, 8, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -8626,7 +8854,7 @@ static void flying_rc_track_diag_60_deg_down_to_25_deg_down(uint8 rideIndex, uin metal_b_supports_paint_setup(11, 3, 8, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 72, 0x20); break; } @@ -8757,12 +8985,18 @@ static void flying_rc_track_diag_25_deg_down_to_flat(uint8 rideIndex, uint8 trac paint_util_set_general_support_height(height + 48, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27562, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 32); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(11, 1, 0, height + 43, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27562, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 32); metal_a_supports_paint_setup(11, 0, 0, height + 43, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -8772,7 +9006,7 @@ static void flying_rc_track_diag_25_deg_down_to_flat(uint8 rideIndex, uint8 trac metal_a_supports_paint_setup(11, 3, 0, height + 43, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -8862,12 +9096,18 @@ static void flying_rc_track_diag_flat_to_left_bank(uint8 rideIndex, uint8 trackS paint_util_set_general_support_height(height + 32, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27588, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 22); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(11, 1, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27588, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 22); metal_a_supports_paint_setup(11, 0, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -8877,7 +9117,7 @@ static void flying_rc_track_diag_flat_to_left_bank(uint8 rideIndex, uint8 trackS metal_a_supports_paint_setup(11, 3, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 32, 0x20); break; } @@ -8967,12 +9207,18 @@ static void flying_rc_track_diag_flat_to_right_bank(uint8 rideIndex, uint8 track paint_util_set_general_support_height(height + 32, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27592, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 22); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(11, 1, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27592, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 22); metal_a_supports_paint_setup(11, 0, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -8982,7 +9228,7 @@ static void flying_rc_track_diag_flat_to_right_bank(uint8 rideIndex, uint8 track metal_a_supports_paint_setup(11, 3, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 32, 0x20); break; } @@ -9072,12 +9318,18 @@ static void flying_rc_track_diag_left_bank_to_flat(uint8 rideIndex, uint8 trackS paint_util_set_general_support_height(height + 32, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27594, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 22); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(11, 1, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27594, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 22); metal_a_supports_paint_setup(11, 0, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -9087,7 +9339,7 @@ static void flying_rc_track_diag_left_bank_to_flat(uint8 rideIndex, uint8 trackS metal_a_supports_paint_setup(11, 3, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 32, 0x20); break; } @@ -9177,12 +9429,18 @@ static void flying_rc_track_diag_right_bank_to_flat(uint8 rideIndex, uint8 track paint_util_set_general_support_height(height + 32, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27590, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 22); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(11, 1, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27590, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 22); metal_a_supports_paint_setup(11, 0, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -9192,7 +9450,7 @@ static void flying_rc_track_diag_right_bank_to_flat(uint8 rideIndex, uint8 track metal_a_supports_paint_setup(11, 3, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 32, 0x20); break; } @@ -9282,12 +9540,18 @@ static void flying_rc_track_diag_left_bank_to_25_deg_up(uint8 rideIndex, uint8 t paint_util_set_general_support_height(height + 48, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27604, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 32); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(11, 1, 0, height + 43, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27604, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 32); metal_a_supports_paint_setup(11, 0, 0, height + 43, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -9297,7 +9561,7 @@ static void flying_rc_track_diag_left_bank_to_25_deg_up(uint8 rideIndex, uint8 t metal_a_supports_paint_setup(11, 3, 0, height + 43, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -9387,12 +9651,18 @@ static void flying_rc_track_diag_right_bank_to_25_deg_up(uint8 rideIndex, uint8 paint_util_set_general_support_height(height + 48, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27608, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 32); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(11, 1, 0, height + 43, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27608, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 32); metal_a_supports_paint_setup(11, 0, 0, height + 43, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -9402,7 +9672,7 @@ static void flying_rc_track_diag_right_bank_to_25_deg_up(uint8 rideIndex, uint8 metal_a_supports_paint_setup(11, 3, 0, height + 43, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -9492,12 +9762,18 @@ static void flying_rc_track_diag_25_deg_up_to_left_bank(uint8 rideIndex, uint8 t paint_util_set_general_support_height(height + 56, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27596, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 32); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(11, 1, 0, height + 45, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27596, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 32); metal_a_supports_paint_setup(11, 0, 0, height + 45, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -9507,7 +9783,7 @@ static void flying_rc_track_diag_25_deg_up_to_left_bank(uint8 rideIndex, uint8 t metal_a_supports_paint_setup(11, 3, 0, height + 45, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 56, 0x20); break; } @@ -9597,12 +9873,18 @@ static void flying_rc_track_diag_25_deg_up_to_right_bank(uint8 rideIndex, uint8 paint_util_set_general_support_height(height + 56, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27600, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 32); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(11, 1, 0, height + 45, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27600, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 32); metal_a_supports_paint_setup(11, 0, 0, height + 45, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -9612,7 +9894,7 @@ static void flying_rc_track_diag_25_deg_up_to_right_bank(uint8 rideIndex, uint8 metal_a_supports_paint_setup(11, 3, 0, height + 45, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 56, 0x20); break; } @@ -9702,12 +9984,18 @@ static void flying_rc_track_diag_left_bank_to_25_deg_down(uint8 rideIndex, uint8 paint_util_set_general_support_height(height + 56, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27602, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 32); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(11, 1, 0, height + 45, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27602, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 32); metal_a_supports_paint_setup(11, 0, 0, height + 45, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -9717,7 +10005,7 @@ static void flying_rc_track_diag_left_bank_to_25_deg_down(uint8 rideIndex, uint8 metal_a_supports_paint_setup(11, 3, 0, height + 45, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 56, 0x20); break; } @@ -9807,12 +10095,18 @@ static void flying_rc_track_diag_right_bank_to_25_deg_down(uint8 rideIndex, uint paint_util_set_general_support_height(height + 56, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27598, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 32); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(11, 1, 0, height + 45, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27598, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 32); metal_a_supports_paint_setup(11, 0, 0, height + 45, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -9822,7 +10116,7 @@ static void flying_rc_track_diag_right_bank_to_25_deg_down(uint8 rideIndex, uint metal_a_supports_paint_setup(11, 3, 0, height + 45, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 56, 0x20); break; } @@ -9912,12 +10206,18 @@ static void flying_rc_track_diag_25_deg_down_to_left_bank(uint8 rideIndex, uint8 paint_util_set_general_support_height(height + 48, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27610, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 32); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(11, 1, 0, height + 43, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27610, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 32); metal_a_supports_paint_setup(11, 0, 0, height + 43, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -9927,7 +10227,7 @@ static void flying_rc_track_diag_25_deg_down_to_left_bank(uint8 rideIndex, uint8 metal_a_supports_paint_setup(11, 3, 0, height + 43, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -10017,12 +10317,18 @@ static void flying_rc_track_diag_25_deg_down_to_right_bank(uint8 rideIndex, uint paint_util_set_general_support_height(height + 48, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27606, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 32); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(11, 1, 0, height + 43, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27606, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 32); metal_a_supports_paint_setup(11, 0, 0, height + 43, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -10032,7 +10338,7 @@ static void flying_rc_track_diag_25_deg_down_to_right_bank(uint8 rideIndex, uint metal_a_supports_paint_setup(11, 3, 0, height + 43, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -10121,12 +10427,18 @@ static void flying_rc_track_diag_left_bank(uint8 rideIndex, uint8 trackSequence, paint_util_set_general_support_height(height + 32, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27584, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 22); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(11, 1, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27584, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 22); metal_a_supports_paint_setup(11, 0, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -10136,7 +10448,7 @@ static void flying_rc_track_diag_left_bank(uint8 rideIndex, uint8 trackSequence, metal_a_supports_paint_setup(11, 3, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 32, 0x20); break; } @@ -10225,12 +10537,18 @@ static void flying_rc_track_diag_right_bank(uint8 rideIndex, uint8 trackSequence paint_util_set_general_support_height(height + 32, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27586, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 22); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(11, 1, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27586, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 22); metal_a_supports_paint_setup(11, 0, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -10240,7 +10558,7 @@ static void flying_rc_track_diag_right_bank(uint8 rideIndex, uint8 trackSequence metal_a_supports_paint_setup(11, 3, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 32, 0x20); break; } @@ -10307,7 +10625,10 @@ static void flying_rc_track_left_flyer_twist_up(uint8 rideIndex, uint8 trackSequ sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27433, 0, 6, 32, 20, 3, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 1: paint_util_push_tunnel_right(height, TUNNEL_6); @@ -10316,7 +10637,6 @@ static void flying_rc_track_left_flyer_twist_up(uint8 rideIndex, uint8 trackSequ paint_util_push_tunnel_left(height, TUNNEL_6); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; } @@ -10377,7 +10697,10 @@ static void flying_rc_track_left_flyer_twist_up(uint8 rideIndex, uint8 trackSequ sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27433, 0, 6, 32, 20, 3, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 1: paint_util_push_tunnel_right(height, TUNNEL_6); @@ -10386,7 +10709,6 @@ static void flying_rc_track_left_flyer_twist_up(uint8 rideIndex, uint8 trackSequ paint_util_push_tunnel_left(height, TUNNEL_6); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; } @@ -10453,7 +10775,10 @@ static void flying_rc_track_right_flyer_twist_up(uint8 rideIndex, uint8 trackSeq sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27445, 0, 6, 32, 20, 3, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 1: paint_util_push_tunnel_right(height, TUNNEL_6); @@ -10462,7 +10787,6 @@ static void flying_rc_track_right_flyer_twist_up(uint8 rideIndex, uint8 trackSeq paint_util_push_tunnel_left(height, TUNNEL_6); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; } @@ -10523,7 +10847,10 @@ static void flying_rc_track_right_flyer_twist_up(uint8 rideIndex, uint8 trackSeq sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27445, 0, 6, 32, 20, 3, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 1: paint_util_push_tunnel_right(height, TUNNEL_6); @@ -10532,7 +10859,6 @@ static void flying_rc_track_right_flyer_twist_up(uint8 rideIndex, uint8 trackSeq paint_util_push_tunnel_left(height, TUNNEL_6); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; } @@ -10559,11 +10885,13 @@ static void flying_rc_track_left_flyer_twist_down(uint8 rideIndex, uint8 trackSe sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27438, 0, 6, 32, 20, 3, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; case 1: @@ -10629,11 +10957,13 @@ static void flying_rc_track_left_flyer_twist_down(uint8 rideIndex, uint8 trackSe sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27438, 0, 6, 32, 20, 3, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; case 1: @@ -10705,11 +11035,13 @@ static void flying_rc_track_right_flyer_twist_down(uint8 rideIndex, uint8 trackS sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27450, 0, 6, 32, 20, 3, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; case 1: @@ -10775,11 +11107,13 @@ static void flying_rc_track_right_flyer_twist_down(uint8 rideIndex, uint8 trackS sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27450, 0, 6, 32, 20, 3, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; case 1: @@ -11216,11 +11550,13 @@ static void flying_rc_track_block_brakes(uint8 rideIndex, uint8 trackSequence, u sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27338, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); if (track_paint_util_should_paint_supports(gPaintMapPosition)) { metal_a_supports_paint_setup(11, 4, 0, height + 39, gTrackColours[SCHEME_SUPPORTS]); } + paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); } } @@ -11303,11 +11639,13 @@ static void flying_rc_track_left_banked_quarter_turn_3_25_deg_up(uint8 rideIndex sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27760, 0, 6, 32, 20, 3, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_7); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 88, 0x20); break; case 1: @@ -11331,7 +11669,10 @@ static void flying_rc_track_left_banked_quarter_turn_3_25_deg_up(uint8 rideIndex sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27759, 6, 0, 20, 32, 3, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 2: paint_util_push_tunnel_right(height + 8, TUNNEL_8); @@ -11340,7 +11681,6 @@ static void flying_rc_track_left_banked_quarter_turn_3_25_deg_up(uint8 rideIndex paint_util_push_tunnel_left(height + 8, TUNNEL_8); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 88, 0x20); break; } @@ -11428,11 +11768,13 @@ static void flying_rc_track_right_banked_quarter_turn_3_25_deg_up(uint8 rideInde sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27757, 0, 6, 32, 20, 3, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_7); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 88, 0x20); break; case 1: @@ -11456,7 +11798,10 @@ static void flying_rc_track_right_banked_quarter_turn_3_25_deg_up(uint8 rideInde sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27758, 6, 0, 20, 32, 3, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 0: paint_util_push_tunnel_right(height + 8, TUNNEL_8); @@ -11465,7 +11810,6 @@ static void flying_rc_track_right_banked_quarter_turn_3_25_deg_up(uint8 rideInde paint_util_push_tunnel_left(height + 8, TUNNEL_8); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 88, 0x20); break; } @@ -11618,11 +11962,13 @@ static void flying_rc_track_left_banked_quarter_turn_5_25_deg_up(uint8 rideIndex sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27802, 0, 6, 32, 20, 3, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_7); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 88, 0x20); break; case 1: @@ -11700,7 +12046,10 @@ static void flying_rc_track_left_banked_quarter_turn_5_25_deg_up(uint8 rideIndex sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27806, 6, 0, 20, 32, 3, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 2: paint_util_push_tunnel_right(height + 8, TUNNEL_8); @@ -11709,7 +12058,6 @@ static void flying_rc_track_left_banked_quarter_turn_5_25_deg_up(uint8 rideIndex paint_util_push_tunnel_left(height + 8, TUNNEL_8); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 88, 0x20); break; } @@ -11848,11 +12196,13 @@ static void flying_rc_track_right_banked_quarter_turn_5_25_deg_up(uint8 rideInde sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27782, 0, 6, 32, 20, 3, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_7); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 88, 0x20); break; case 1: @@ -11930,7 +12280,10 @@ static void flying_rc_track_right_banked_quarter_turn_5_25_deg_up(uint8 rideInde sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27786, 6, 0, 20, 32, 3, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 0: paint_util_push_tunnel_right(height + 8, TUNNEL_8); @@ -11939,7 +12292,6 @@ static void flying_rc_track_right_banked_quarter_turn_5_25_deg_up(uint8 rideInde paint_util_push_tunnel_left(height + 8, TUNNEL_8); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 88, 0x20); break; } @@ -11993,35 +12345,41 @@ static void flying_rc_track_25_deg_up_to_left_banked_25_deg_up(uint8 rideIndex, switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27719, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27720, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27721, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27722, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 6, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 8, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 7, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 5, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_7); } else { paint_util_push_tunnel_rotated(direction, height + 8, TUNNEL_8); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 72, 0x20); } } @@ -12059,35 +12417,41 @@ static void flying_rc_track_25_deg_up_to_right_banked_25_deg_up(uint8 rideIndex, switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27723, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27724, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27725, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27726, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 6, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 8, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 7, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 5, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_7); } else { paint_util_push_tunnel_rotated(direction, height + 8, TUNNEL_8); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 72, 0x20); } } @@ -12125,35 +12489,41 @@ static void flying_rc_track_left_banked_25_deg_up_to_25_deg_up(uint8 rideIndex, switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27727, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27728, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27729, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27730, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 6, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 8, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 7, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 5, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_7); } else { paint_util_push_tunnel_rotated(direction, height + 8, TUNNEL_8); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 72, 0x20); } } @@ -12191,35 +12561,41 @@ static void flying_rc_track_right_banked_25_deg_up_to_25_deg_up(uint8 rideIndex, switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27731, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27732, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27733, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27734, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 6, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 8, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 7, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 5, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_7); } else { paint_util_push_tunnel_rotated(direction, height + 8, TUNNEL_8); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 72, 0x20); } } @@ -12280,35 +12656,41 @@ static void flying_rc_track_left_banked_flat_to_left_banked_25_deg_up(uint8 ride switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27735, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27736, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27737, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27738, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 6, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 8, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 7, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 5, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); } else { paint_util_push_tunnel_rotated(direction, height, TUNNEL_8); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 64, 0x20); } } @@ -12345,35 +12727,41 @@ static void flying_rc_track_right_banked_flat_to_right_banked_25_deg_up(uint8 ri switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27739, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27740, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27741, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27742, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 6, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 8, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 7, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 5, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); } else { paint_util_push_tunnel_rotated(direction, height, TUNNEL_8); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 64, 0x20); } } @@ -12410,35 +12798,41 @@ static void flying_rc_track_left_banked_25_deg_up_to_left_banked_flat(uint8 ride switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27743, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27744, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27745, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27746, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 6, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 8, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 7, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 5, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_6); } else { paint_util_push_tunnel_rotated(direction, height + 8, TUNNEL_14); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 56, 0x20); } } @@ -12475,35 +12869,41 @@ static void flying_rc_track_right_banked_25_deg_up_to_right_banked_flat(uint8 ri switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27747, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27748, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27749, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27750, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 6, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 8, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 7, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 5, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_6); } else { paint_util_push_tunnel_rotated(direction, height + 8, TUNNEL_14); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 56, 0x20); } } @@ -12565,35 +12965,41 @@ static void flying_rc_track_flat_to_left_banked_25_deg_up(uint8 rideIndex, uint8 switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27695, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27696, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27697, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27698, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 6, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 8, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 7, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 5, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); } else { paint_util_push_tunnel_rotated(direction, height, TUNNEL_8); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 64, 0x20); } } @@ -12631,35 +13037,41 @@ static void flying_rc_track_flat_to_right_banked_25_deg_up(uint8 rideIndex, uint switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27699, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27700, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27701, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27702, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 6, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 8, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 7, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 5, 0, height + 49, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); } else { paint_util_push_tunnel_rotated(direction, height, TUNNEL_8); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 64, 0x20); } } @@ -12697,35 +13109,41 @@ static void flying_rc_track_left_banked_25_deg_up_to_flat(uint8 rideIndex, uint8 switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27703, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27704, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27705, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27706, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 6, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 8, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 7, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 5, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_6); } else { paint_util_push_tunnel_rotated(direction, height + 8, TUNNEL_14); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 56, 0x20); } } @@ -12763,35 +13181,41 @@ static void flying_rc_track_right_banked_25_deg_up_to_flat(uint8 rideIndex, uint switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27707, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27708, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27709, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27710, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 6, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 8, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 7, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 5, 0, height + 47, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_6); } else { paint_util_push_tunnel_rotated(direction, height + 8, TUNNEL_14); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 56, 0x20); } } diff --git a/src/ride/coaster/inverted_hairpin_coaster.c b/src/ride/coaster/inverted_hairpin_coaster.c index d272e64ac5..1baeb2d690 100644 --- a/src/ride/coaster/inverted_hairpin_coaster.c +++ b/src/ride/coaster/inverted_hairpin_coaster.c @@ -44,9 +44,6 @@ static void inverted_hairpin_rc_track_flat(uint8 rideIndex, uint8 trackSequence, sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17033, 0, 0, 32, 20, 1, height + 24, 0, 6, height + 22); break; } - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); - } } else { switch (direction) { case 0: @@ -58,15 +55,18 @@ static void inverted_hairpin_rc_track_flat(uint8 rideIndex, uint8 trackSequence, sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17027, 0, 0, 32, 20, 1, height + 24, 0, 6, height + 22); break; } - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); - } } - paint_util_push_tunnel_rotated(direction, height, TUNNEL_0); + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + metal_a_supports_paint_setup(11, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); + } + + paint_util_push_tunnel_rotated(direction, height, TUNNEL_0); paint_util_set_general_support_height(height + 32, 0x20); } +/** rct2: 0x00890D84, 0x00890D94, 0x00890DA4 */ static void inverted_hairpin_rc_track_station(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { static const uint32 imageIds[4][3] = { @@ -93,63 +93,57 @@ static void inverted_hairpin_rc_track_25_deg_up(uint8 rideIndex, uint8 trackSequ switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17070, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17071, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17072, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17073, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); - } break; } } else { switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17042, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17043, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17044, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17045, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); - } break; } } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 6, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 8, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 7, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 5, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_1); } else { paint_util_push_tunnel_rotated(direction, height + 8, TUNNEL_2); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 56, 0x20); } @@ -203,63 +197,57 @@ static void inverted_hairpin_rc_track_flat_to_25_deg_up(uint8 rideIndex, uint8 t switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17062, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 40, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17063, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 40, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17064, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 40, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17065, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 40, gTrackColours[SCHEME_SUPPORTS]); - } break; } } else { switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17034, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 40, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17035, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 40, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17036, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 40, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17037, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 40, gTrackColours[SCHEME_SUPPORTS]); - } break; } } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 6, 0, height + 40, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 8, 0, height + 40, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 7, 0, height + 40, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 5, 0, height + 40, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_0); } else { paint_util_push_tunnel_rotated(direction, height, TUNNEL_2); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); } @@ -317,67 +305,61 @@ static void inverted_hairpin_rc_track_60_deg_up_to_25_deg_up(uint8 rideIndex, ui switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17080, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 56); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17084, 0, 0, 32, 10, 49, height + 24, 0, 10, height + 6); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17081, 0, 0, 32, 2, 49, height + 24, 0, 4, height + 6); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17085, 0, 0, 32, 10, 49, height + 24, 0, 10, height + 6); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17082, 0, 0, 32, 2, 49, height + 24, 0, 4, height + 6); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17083, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 56); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; } } else { switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17052, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 56); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17056, 0, 0, 32, 10, 49, height + 24, 0, 10, height + 6); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17053, 0, 0, 32, 2, 49, height + 24, 0, 4, height + 6); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17057, 0, 0, 32, 10, 49, height + 24, 0, 10, height + 6); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17054, 0, 0, 32, 2, 49, height + 24, 0, 4, height + 6); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17055, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 56); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; } } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 6, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 8, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 7, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 5, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_1); } else { paint_util_push_tunnel_rotated(direction, height + 24, TUNNEL_2); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 72, 0x20); } @@ -388,63 +370,57 @@ static void inverted_hairpin_rc_track_25_deg_up_to_flat(uint8 rideIndex, uint8 t switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17066, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17067, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17068, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17069, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); - } break; } } else { switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17038, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17039, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17040, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17041, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); - } break; } } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 6, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 8, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 7, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 5, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_0); } else { paint_util_push_tunnel_rotated(direction, height + 8, TUNNEL_12); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 40, 0x20); } @@ -503,11 +479,13 @@ static void inverted_hairpin_rc_track_left_quarter_turn_3(uint8 rideIndex, uint8 sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17120, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 22); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_0); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; case 1: @@ -546,7 +524,10 @@ static void inverted_hairpin_rc_track_left_quarter_turn_3(uint8 rideIndex, uint8 sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17118, 0, 0, 20, 32, 3, height + 24, 6, 0, height + 22); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 2: paint_util_push_tunnel_right(height, TUNNEL_0); @@ -555,7 +536,6 @@ static void inverted_hairpin_rc_track_left_quarter_turn_3(uint8 rideIndex, uint8 paint_util_push_tunnel_left(height, TUNNEL_0); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; } @@ -587,11 +567,13 @@ static void inverted_hairpin_rc_track_left_quarter_turn_3_25_deg_up(uint8 rideIn sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17139, 0, 6, 32, 20, 3, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_1); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 72, 0x20); break; case 1: @@ -615,7 +597,10 @@ static void inverted_hairpin_rc_track_left_quarter_turn_3_25_deg_up(uint8 rideIn sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17138, 6, 0, 20, 32, 3, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 2: paint_util_push_tunnel_right(height + 8, TUNNEL_2); @@ -624,7 +609,6 @@ static void inverted_hairpin_rc_track_left_quarter_turn_3_25_deg_up(uint8 rideIn paint_util_push_tunnel_left(height + 8, TUNNEL_2); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 72, 0x20); break; } @@ -649,11 +633,13 @@ static void inverted_hairpin_rc_track_right_quarter_turn_3_25_deg_up(uint8 rideI sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17136, 0, 6, 32, 20, 3, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_1); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 72, 0x20); break; case 1: @@ -677,7 +663,10 @@ static void inverted_hairpin_rc_track_right_quarter_turn_3_25_deg_up(uint8 rideI sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17137, 6, 0, 20, 32, 3, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 0: paint_util_push_tunnel_right(height + 8, TUNNEL_2); @@ -686,7 +675,6 @@ static void inverted_hairpin_rc_track_right_quarter_turn_3_25_deg_up(uint8 rideI paint_util_push_tunnel_left(height + 8, TUNNEL_2); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 72, 0x20); break; } @@ -723,7 +711,10 @@ static void inverted_hairpin_rc_track_left_quarter_turn_1(uint8 rideIndex, uint8 sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17117, 0, 0, 24, 24, 3, height + 24, 6, 6, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 0: paint_util_push_tunnel_left(height, TUNNEL_0); @@ -736,7 +727,6 @@ static void inverted_hairpin_rc_track_left_quarter_turn_1(uint8 rideIndex, uint8 paint_util_push_tunnel_left(height, TUNNEL_0); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); } @@ -800,51 +790,59 @@ static void inverted_hairpin_rc_track_60_deg_up_to_flat(uint8 rideIndex, uint8 t switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17108, 0, 0, 30, 20, 3, height + 24, 0, 6, height + 48); - metal_a_supports_paint_setup(11, 6, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17112, 0, 0, 32, 10, 41, height + 24, 0, 10, height + 6); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17109, 0, 0, 32, 2, 41, height + 24, 0, 4, height + 6); - metal_a_supports_paint_setup(11, 8, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17113, 0, 0, 32, 10, 41, height + 24, 0, 10, height + 6); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17110, 0, 0, 32, 2, 41, height + 24, 0, 4, height + 6); - metal_a_supports_paint_setup(11, 7, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17111, 0, 0, 30, 20, 3, height + 24, 0, 6, height + 48); - metal_a_supports_paint_setup(11, 5, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); break; } } else { switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17096, 0, 0, 30, 20, 3, height + 24, 0, 6, height + 48); - metal_a_supports_paint_setup(11, 6, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17100, 0, 0, 32, 10, 41, height + 24, 0, 10, height + 6); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17097, 0, 0, 32, 2, 41, height + 24, 0, 4, height + 6); - metal_a_supports_paint_setup(11, 8, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17101, 0, 0, 32, 10, 41, height + 24, 0, 10, height + 6); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17098, 0, 0, 32, 2, 41, height + 24, 0, 4, height + 6); - metal_a_supports_paint_setup(11, 7, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17099, 0, 0, 30, 20, 3, height + 24, 0, 6, height + 48); - metal_a_supports_paint_setup(11, 5, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); break; } } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 6, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 8, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 7, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 5, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); + break; + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_1); } else { paint_util_push_tunnel_rotated(direction, height + 24, TUNNEL_0); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 56, 0x20); } @@ -873,11 +871,13 @@ static void inverted_hairpin_rc_track_brakes(uint8 rideIndex, uint8 trackSequenc sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17029, 0, 0, 32, 20, 1, height + 24, 0, 6, height + 22); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); if (track_paint_util_should_paint_supports(gPaintMapPosition)) { metal_a_supports_paint_setup(11, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); } + paint_util_push_tunnel_rotated(direction, height, TUNNEL_0); - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); } @@ -894,11 +894,13 @@ static void inverted_hairpin_rc_track_block_brakes(uint8 rideIndex, uint8 trackS sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17029, 0, 0, 32, 20, 1, height + 24, 0, 6, height + 22); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); if (track_paint_util_should_paint_supports(gPaintMapPosition)) { metal_a_supports_paint_setup(11, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); } + paint_util_push_tunnel_rotated(direction, height, TUNNEL_0); - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); } diff --git a/src/ride/coaster/inverted_impulse_coaster.c b/src/ride/coaster/inverted_impulse_coaster.c index fd9ba0ba7d..b0113dabf4 100644 --- a/src/ride/coaster/inverted_impulse_coaster.c +++ b/src/ride/coaster/inverted_impulse_coaster.c @@ -39,14 +39,17 @@ static void inverted_impulse_rc_track_flat(uint8 rideIndex, uint8 trackSequence, sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 19663, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); if (track_paint_util_should_paint_supports(gPaintMapPosition)) { metal_a_supports_paint_setup(11, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); } + paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); } +/** rct2: 0x008B0470, 0x008B0480, 0x008B0490 */ static void inverted_impulse_rc_track_station(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { static const uint32 imageIds[4][3] = { @@ -72,35 +75,41 @@ static void inverted_impulse_rc_track_25_deg_up(uint8 rideIndex, uint8 trackSequ switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 19672, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 19673, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 19674, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 19675, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 6, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 8, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 7, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 5, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_4); } else { paint_util_push_tunnel_rotated(direction, height + 8, TUNNEL_5); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 72, 0x20); } @@ -136,27 +145,39 @@ static void inverted_impulse_rc_track_flat_to_25_deg_up(uint8 rideIndex, uint8 t switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 19664, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - metal_a_supports_paint_setup(11, 6, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 19665, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - metal_a_supports_paint_setup(11, 8, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 19666, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - metal_a_supports_paint_setup(11, 7, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 19667, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 6, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 8, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 7, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: metal_a_supports_paint_setup(11, 5, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); break; } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } else { paint_util_push_tunnel_rotated(direction, height, TUNNEL_5); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 64, 0x20); } @@ -222,27 +243,39 @@ static void inverted_impulse_rc_track_25_deg_up_to_flat(uint8 rideIndex, uint8 t switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 19668, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - metal_a_supports_paint_setup(11, 6, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 19669, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - metal_a_supports_paint_setup(11, 8, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 19670, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - metal_a_supports_paint_setup(11, 7, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 19671, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 6, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 8, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 7, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: metal_a_supports_paint_setup(11, 5, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); break; } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_3); } else { paint_util_push_tunnel_rotated(direction, height + 8, TUNNEL_13); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 56, 0x20); } diff --git a/src/ride/coaster/inverted_roller_coaster.c b/src/ride/coaster/inverted_roller_coaster.c index c2ec722de5..9e6274e14c 100644 --- a/src/ride/coaster/inverted_roller_coaster.c +++ b/src/ride/coaster/inverted_roller_coaster.c @@ -40,9 +40,6 @@ static void inverted_rc_track_flat(uint8 rideIndex, uint8 trackSequence, uint8 d sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27132, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; } - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); - } } else { switch (direction) { case 0: @@ -54,15 +51,18 @@ static void inverted_rc_track_flat(uint8 rideIndex, uint8 trackSequence, uint8 d sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27130, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; } - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); - } } - paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + metal_a_supports_paint_setup(3, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + } + + paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); paint_util_set_general_support_height(height + 48, 0x20); } +/** rct2: 0x008A9558, 0x008A9568, 0x008A9578 */ static void inverted_rc_track_station(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { static const uint32 imageIds[4][3] = { @@ -89,63 +89,57 @@ static void inverted_rc_track_25_deg_up(uint8 rideIndex, uint8 trackSequence, ui switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27249, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 6, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27250, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 8, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27251, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 7, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27252, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 5, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; } } else { switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27221, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 6, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27222, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 8, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27223, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 7, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27224, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 5, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; } } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(3, 6, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(3, 8, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(3, 7, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(3, 5, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_4); } else { paint_util_push_tunnel_rotated(direction, height + 8, TUNNEL_5); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 72, 0x20); } @@ -182,63 +176,57 @@ static void inverted_rc_track_flat_to_25_deg_up(uint8 rideIndex, uint8 trackSequ switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27241, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 6, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27242, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 8, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27243, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 7, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27244, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 5, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); - } break; } } else { switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27213, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 6, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27214, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 8, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27215, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 7, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27216, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 5, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); - } break; } } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(3, 6, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(3, 8, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(3, 7, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(3, 5, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } else { paint_util_push_tunnel_rotated(direction, height, TUNNEL_5); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 64, 0x20); } @@ -276,37 +264,43 @@ static void inverted_rc_track_60_deg_up_to_25_deg_up(uint8 rideIndex, uint8 trac switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27231, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 61); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 6, 0, height + 76, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27235, 0, 0, 32, 10, 49, height + 29, 0, 10, height + 11); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27232, 0, 0, 32, 2, 49, height + 29, 0, 4, height + 11); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 8, 0, height + 76, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27236, 0, 0, 32, 10, 49, height + 29, 0, 10, height + 11); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27233, 0, 0, 32, 2, 49, height + 29, 0, 4, height + 11); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 7, 0, height + 76, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27234, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 61); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 5, 0, height + 76, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(3, 6, 0, height + 76, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(3, 8, 0, height + 76, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(3, 7, 0, height + 76, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(3, 5, 0, height + 76, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_4); } else { paint_util_push_tunnel_rotated(direction, height + 24, TUNNEL_5); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 88, 0x20); } @@ -317,63 +311,57 @@ static void inverted_rc_track_25_deg_up_to_flat(uint8 rideIndex, uint8 trackSequ switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27245, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 6, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27246, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 8, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27247, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 7, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27248, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 5, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; } } else { switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27217, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 6, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27218, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 8, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27219, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 7, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27220, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 5, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; } } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(3, 6, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(3, 8, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(3, 7, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(3, 5, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_3); } else { paint_util_push_tunnel_rotated(direction, height + 8, TUNNEL_13); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 56, 0x20); } @@ -432,11 +420,13 @@ static void inverted_rc_track_left_quarter_turn_5(uint8 rideIndex, uint8 trackSe sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27137, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -514,7 +504,10 @@ static void inverted_rc_track_left_quarter_turn_5(uint8 rideIndex, uint8 trackSe sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27133, 0, 0, 20, 32, 3, height + 29, 6, 0, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 2: paint_util_push_tunnel_right(height, TUNNEL_3); @@ -523,7 +516,6 @@ static void inverted_rc_track_left_quarter_turn_5(uint8 rideIndex, uint8 trackSe paint_util_push_tunnel_left(height, TUNNEL_3); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -553,11 +545,13 @@ static void inverted_rc_track_flat_to_left_bank(uint8 rideIndex, uint8 trackSequ sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27272, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); if (track_paint_util_should_paint_supports(gPaintMapPosition)) { metal_a_supports_paint_setup(3, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); } + paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); } @@ -578,11 +572,13 @@ static void inverted_rc_track_flat_to_right_bank(uint8 rideIndex, uint8 trackSeq sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27276, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); if (track_paint_util_should_paint_supports(gPaintMapPosition)) { metal_a_supports_paint_setup(3, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); } + paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); } @@ -603,11 +599,13 @@ static void inverted_rc_track_left_bank_to_flat(uint8 rideIndex, uint8 trackSequ sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27274, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); if (track_paint_util_should_paint_supports(gPaintMapPosition)) { metal_a_supports_paint_setup(3, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); } + paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); } @@ -628,11 +626,13 @@ static void inverted_rc_track_right_bank_to_flat(uint8 rideIndex, uint8 trackSeq sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27270, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); if (track_paint_util_should_paint_supports(gPaintMapPosition)) { metal_a_supports_paint_setup(3, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); } + paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); } @@ -655,11 +655,13 @@ static void inverted_rc_track_banked_left_quarter_turn_5(uint8 rideIndex, uint8 sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27157, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -737,7 +739,10 @@ static void inverted_rc_track_banked_left_quarter_turn_5(uint8 rideIndex, uint8 sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27153, 0, 0, 20, 32, 3, height + 29, 6, 0, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 2: paint_util_push_tunnel_right(height, TUNNEL_3); @@ -746,7 +751,6 @@ static void inverted_rc_track_banked_left_quarter_turn_5(uint8 rideIndex, uint8 paint_util_push_tunnel_left(height, TUNNEL_3); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -765,35 +769,41 @@ static void inverted_rc_track_left_bank_to_25_deg_up(uint8 rideIndex, uint8 trac switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27277, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 6, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27278, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 8, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27279, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 7, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27280, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 5, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(3, 6, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(3, 8, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(3, 7, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(3, 5, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } else { paint_util_push_tunnel_rotated(direction, height, TUNNEL_5); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 64, 0x20); } @@ -803,35 +813,41 @@ static void inverted_rc_track_right_bank_to_25_deg_up(uint8 rideIndex, uint8 tra switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27281, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 6, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27282, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 8, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27283, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 7, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27284, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 5, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(3, 6, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(3, 8, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(3, 7, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(3, 5, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } else { paint_util_push_tunnel_rotated(direction, height, TUNNEL_5); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 64, 0x20); } @@ -841,35 +857,41 @@ static void inverted_rc_track_25_deg_up_to_left_bank(uint8 rideIndex, uint8 trac switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27285, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 6, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27286, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 8, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27287, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 7, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27288, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 5, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(3, 6, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(3, 8, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(3, 7, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(3, 5, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_3); } else { paint_util_push_tunnel_rotated(direction, height + 8, TUNNEL_13); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 56, 0x20); } @@ -879,35 +901,41 @@ static void inverted_rc_track_25_deg_up_to_right_bank(uint8 rideIndex, uint8 tra switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27289, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 6, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27290, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 8, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27291, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 7, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27292, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 5, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(3, 6, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(3, 8, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(3, 7, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(3, 5, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_3); } else { paint_util_push_tunnel_rotated(direction, height + 8, TUNNEL_13); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 56, 0x20); } @@ -952,11 +980,13 @@ static void inverted_rc_track_left_bank(uint8 rideIndex, uint8 trackSequence, ui sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27296, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); if (track_paint_util_should_paint_supports(gPaintMapPosition)) { metal_a_supports_paint_setup(3, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); } + paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); } @@ -985,11 +1015,13 @@ static void inverted_rc_track_left_quarter_turn_5_25_deg_up(uint8 rideIndex, uin sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27332, 0, 6, 32, 20, 3, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_4); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 88, 0x20); break; case 1: @@ -1067,7 +1099,10 @@ static void inverted_rc_track_left_quarter_turn_5_25_deg_up(uint8 rideIndex, uin sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27336, 6, 0, 20, 32, 3, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 2: paint_util_push_tunnel_right(height + 8, TUNNEL_5); @@ -1076,7 +1111,6 @@ static void inverted_rc_track_left_quarter_turn_5_25_deg_up(uint8 rideIndex, uin paint_util_push_tunnel_left(height + 8, TUNNEL_5); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 88, 0x20); break; } @@ -1101,11 +1135,13 @@ static void inverted_rc_track_right_quarter_turn_5_25_deg_up(uint8 rideIndex, ui sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27312, 0, 6, 32, 20, 3, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_4); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 88, 0x20); break; case 1: @@ -1183,7 +1219,10 @@ static void inverted_rc_track_right_quarter_turn_5_25_deg_up(uint8 rideIndex, ui sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27316, 6, 0, 20, 32, 3, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 0: paint_util_push_tunnel_right(height + 8, TUNNEL_5); @@ -1192,7 +1231,6 @@ static void inverted_rc_track_right_quarter_turn_5_25_deg_up(uint8 rideIndex, ui paint_util_push_tunnel_left(height + 8, TUNNEL_5); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 88, 0x20); break; } @@ -1231,22 +1269,22 @@ static void inverted_rc_track_s_bend_left(uint8 rideIndex, uint8 trackSequence, sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27260, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: switch (direction) { case 0: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27254, 0, 0, 32, 26, 3, height + 29); - metal_a_supports_paint_setup(3, 5, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27258, 0, 0, 32, 26, 3, height + 29); - metal_a_supports_paint_setup(3, 6, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27255, 0, 0, 32, 26, 3, height + 29, 0, 6, height + 29); @@ -1255,7 +1293,17 @@ static void inverted_rc_track_s_bend_left(uint8 rideIndex, uint8 trackSequence, sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27259, 0, 0, 32, 26, 3, height + 29, 0, 6, height + 29); break; } + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(3, 5, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(3, 6, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + } + paint_util_set_general_support_height(height + 48, 0x20); break; case 2: @@ -1268,14 +1316,22 @@ static void inverted_rc_track_s_bend_left(uint8 rideIndex, uint8 trackSequence, break; case 2: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27254, 0, 0, 32, 26, 3, height + 29); - metal_a_supports_paint_setup(3, 5, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27258, 0, 0, 32, 26, 3, height + 29); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + switch (direction) { + case 2: + metal_a_supports_paint_setup(3, 5, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: metal_a_supports_paint_setup(3, 6, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 48, 0x20); break; case 3: @@ -1293,7 +1349,10 @@ static void inverted_rc_track_s_bend_left(uint8 rideIndex, uint8 trackSequence, sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27257, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 1: paint_util_push_tunnel_right(height, TUNNEL_3); @@ -1302,7 +1361,6 @@ static void inverted_rc_track_s_bend_left(uint8 rideIndex, uint8 trackSequence, paint_util_push_tunnel_left(height, TUNNEL_3); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -1327,22 +1385,22 @@ static void inverted_rc_track_s_bend_right(uint8 rideIndex, uint8 trackSequence, sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27268, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27262, 0, 0, 32, 26, 3, height + 29, 0, 6, height + 29); - metal_a_supports_paint_setup(3, 8, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27266, 0, 0, 32, 26, 3, height + 29, 0, 6, height + 29); - metal_a_supports_paint_setup(3, 7, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27263, 0, 0, 32, 26, 3, height + 29); @@ -1351,7 +1409,17 @@ static void inverted_rc_track_s_bend_right(uint8 rideIndex, uint8 trackSequence, sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27267, 0, 0, 32, 26, 3, height + 29); break; } + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(3, 8, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(3, 7, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + } + paint_util_set_general_support_height(height + 48, 0x20); break; case 2: @@ -1364,14 +1432,22 @@ static void inverted_rc_track_s_bend_right(uint8 rideIndex, uint8 trackSequence, break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27262, 0, 0, 32, 26, 3, height + 29, 0, 6, height + 29); - metal_a_supports_paint_setup(3, 8, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27266, 0, 0, 32, 26, 3, height + 29, 0, 6, height + 29); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 2: + metal_a_supports_paint_setup(3, 8, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: metal_a_supports_paint_setup(3, 7, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 48, 0x20); break; case 3: @@ -1389,7 +1465,10 @@ static void inverted_rc_track_s_bend_right(uint8 rideIndex, uint8 trackSequence, sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27265, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 1: paint_util_push_tunnel_right(height, TUNNEL_3); @@ -1398,7 +1477,6 @@ static void inverted_rc_track_s_bend_right(uint8 rideIndex, uint8 trackSequence, paint_util_push_tunnel_left(height, TUNNEL_3); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -1412,25 +1490,37 @@ static void inverted_rc_track_left_vertical_loop(uint8 rideIndex, uint8 trackSeq switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27355, 0, 6, 32, 2, 3, height + 29, 0, 29, height + 29); - metal_a_supports_paint_setup(3, 6, 0, height + 55, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27363, 0, 6, 32, 2, 3, height + 29, 0, 29, height + 29); - metal_a_supports_paint_setup(3, 8, 0, height + 55, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27362, 0, 6, 32, 2, 3, height + 29, 0, 29, height + 29); - metal_a_supports_paint_setup(3, 7, 0, height + 55, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27370, 0, 6, 32, 10, 7, height + 29, 0, 6, height + 45); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(3, 6, 0, height + 55, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(3, 8, 0, height + 55, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(3, 7, 0, height + 55, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: metal_a_supports_paint_setup(3, 5, 0, height + 55, gTrackColours[SCHEME_SUPPORTS]); break; } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_4); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 72, 0x20); break; case 1: @@ -1551,21 +1641,34 @@ static void inverted_rc_track_left_vertical_loop(uint8 rideIndex, uint8 trackSeq switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27362, 0, 6, 32, 2, 3, height + 29, 0, 29, height + 29); - metal_a_supports_paint_setup(3, 7, 0, height + 55, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27370, 0, 6, 32, 10, 7, height + 29, 0, 6, height + 45); - metal_a_supports_paint_setup(3, 5, 0, height + 55, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27355, 0, 6, 32, 2, 3, height + 29, 0, 29, height + 29); - metal_a_supports_paint_setup(3, 6, 0, height + 55, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27363, 0, 6, 32, 2, 3, height + 29, 0, 29, height + 29); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(3, 7, 0, height + 55, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(3, 5, 0, height + 55, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(3, 6, 0, height + 55, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: metal_a_supports_paint_setup(3, 8, 0, height + 55, gTrackColours[SCHEME_SUPPORTS]); break; } + switch (direction) { case 1: paint_util_push_tunnel_right(height - 8, TUNNEL_4); @@ -1574,7 +1677,6 @@ static void inverted_rc_track_left_vertical_loop(uint8 rideIndex, uint8 trackSeq paint_util_push_tunnel_left(height - 8, TUNNEL_4); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 72, 0x20); break; } @@ -1588,25 +1690,37 @@ static void inverted_rc_track_right_vertical_loop(uint8 rideIndex, uint8 trackSe switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27386, 0, 6, 32, 10, 7, height + 29, 0, 6, height + 45); - metal_a_supports_paint_setup(3, 6, 0, height + 55, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27378, 0, 6, 32, 2, 3, height + 29, 0, 29, height + 29); - metal_a_supports_paint_setup(3, 8, 0, height + 55, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27379, 0, 6, 32, 2, 3, height + 29, 0, 29, height + 29); - metal_a_supports_paint_setup(3, 7, 0, height + 55, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27371, 0, 6, 32, 2, 3, height + 29, 0, 29, height + 29); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(3, 6, 0, height + 55, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(3, 8, 0, height + 55, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(3, 7, 0, height + 55, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: metal_a_supports_paint_setup(3, 5, 0, height + 55, gTrackColours[SCHEME_SUPPORTS]); break; } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_4); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 72, 0x20); break; case 1: @@ -1727,21 +1841,34 @@ static void inverted_rc_track_right_vertical_loop(uint8 rideIndex, uint8 trackSe switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27379, 0, 6, 32, 2, 3, height + 29, 0, 29, height + 29); - metal_a_supports_paint_setup(3, 7, 0, height + 55, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27371, 0, 6, 32, 2, 3, height + 29, 0, 29, height + 29); - metal_a_supports_paint_setup(3, 5, 0, height + 55, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27386, 0, 6, 32, 10, 7, height + 29, 0, 6, height + 45); - metal_a_supports_paint_setup(3, 6, 0, height + 55, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27378, 0, 6, 32, 2, 3, height + 29, 0, 29, height + 29); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(3, 7, 0, height + 55, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(3, 5, 0, height + 55, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(3, 6, 0, height + 55, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: metal_a_supports_paint_setup(3, 8, 0, height + 55, gTrackColours[SCHEME_SUPPORTS]); break; } + switch (direction) { case 1: paint_util_push_tunnel_right(height - 8, TUNNEL_4); @@ -1750,7 +1877,6 @@ static void inverted_rc_track_right_vertical_loop(uint8 rideIndex, uint8 trackSe paint_util_push_tunnel_left(height - 8, TUNNEL_4); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 72, 0x20); break; } @@ -1775,11 +1901,13 @@ static void inverted_rc_track_left_quarter_turn_3(uint8 rideIndex, uint8 trackSe sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27389, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -1818,7 +1946,10 @@ static void inverted_rc_track_left_quarter_turn_3(uint8 rideIndex, uint8 trackSe sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27387, 0, 0, 20, 32, 3, height + 29, 6, 0, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 2: paint_util_push_tunnel_right(height, TUNNEL_3); @@ -1827,7 +1958,6 @@ static void inverted_rc_track_left_quarter_turn_3(uint8 rideIndex, uint8 trackSe paint_util_push_tunnel_left(height, TUNNEL_3); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -1859,11 +1989,13 @@ static void inverted_rc_track_left_quarter_turn_3_bank(uint8 rideIndex, uint8 tr sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27401, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -1902,7 +2034,10 @@ static void inverted_rc_track_left_quarter_turn_3_bank(uint8 rideIndex, uint8 tr sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27399, 0, 0, 20, 32, 3, height + 29, 6, 0, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 2: paint_util_push_tunnel_right(height, TUNNEL_3); @@ -1911,7 +2046,6 @@ static void inverted_rc_track_left_quarter_turn_3_bank(uint8 rideIndex, uint8 tr paint_util_push_tunnel_left(height, TUNNEL_3); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -1943,11 +2077,13 @@ static void inverted_rc_track_left_quarter_turn_3_25_deg_up(uint8 rideIndex, uin sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27420, 0, 6, 32, 20, 3, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_4); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 88, 0x20); break; case 1: @@ -1971,7 +2107,10 @@ static void inverted_rc_track_left_quarter_turn_3_25_deg_up(uint8 rideIndex, uin sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27419, 6, 0, 20, 32, 3, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 2: paint_util_push_tunnel_right(height + 8, TUNNEL_5); @@ -1980,7 +2119,6 @@ static void inverted_rc_track_left_quarter_turn_3_25_deg_up(uint8 rideIndex, uin paint_util_push_tunnel_left(height + 8, TUNNEL_5); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 88, 0x20); break; } @@ -2005,11 +2143,13 @@ static void inverted_rc_track_right_quarter_turn_3_25_deg_up(uint8 rideIndex, ui sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27417, 0, 6, 32, 20, 3, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_4); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 88, 0x20); break; case 1: @@ -2033,7 +2173,10 @@ static void inverted_rc_track_right_quarter_turn_3_25_deg_up(uint8 rideIndex, ui sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27418, 6, 0, 20, 32, 3, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 0: paint_util_push_tunnel_right(height + 8, TUNNEL_5); @@ -2042,7 +2185,6 @@ static void inverted_rc_track_right_quarter_turn_3_25_deg_up(uint8 rideIndex, ui paint_util_push_tunnel_left(height + 8, TUNNEL_5); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 88, 0x20); break; } @@ -2081,11 +2223,13 @@ static void inverted_rc_track_left_twist_down_to_up(uint8 rideIndex, uint8 track sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27438, 0, 6, 32, 20, 3, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -2155,11 +2299,13 @@ static void inverted_rc_track_right_twist_down_to_up(uint8 rideIndex, uint8 trac sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27450, 0, 6, 32, 20, 3, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -2269,7 +2415,10 @@ static void inverted_rc_track_left_twist_up_to_down(uint8 rideIndex, uint8 track sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27433, 0, 6, 32, 20, 3, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 1: paint_util_push_tunnel_right(height, TUNNEL_3); @@ -2278,7 +2427,6 @@ static void inverted_rc_track_left_twist_up_to_down(uint8 rideIndex, uint8 track paint_util_push_tunnel_left(height, TUNNEL_3); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -2343,7 +2491,10 @@ static void inverted_rc_track_right_twist_up_to_down(uint8 rideIndex, uint8 trac sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27445, 0, 6, 32, 20, 3, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 1: paint_util_push_tunnel_right(height, TUNNEL_3); @@ -2352,7 +2503,6 @@ static void inverted_rc_track_right_twist_up_to_down(uint8 rideIndex, uint8 trac paint_util_push_tunnel_left(height, TUNNEL_3); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -2366,25 +2516,37 @@ static void inverted_rc_track_half_loop_up(uint8 rideIndex, uint8 trackSequence, switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27451, 0, 6, 32, 20, 3, height + 29, 0, 6, height + 45); - metal_a_supports_paint_setup(3, 6, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27459, 0, 6, 32, 20, 3, height + 29, 0, 6, height + 45); - metal_a_supports_paint_setup(3, 8, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27458, 0, 6, 32, 20, 3, height + 29, 0, 6, height + 45); - metal_a_supports_paint_setup(3, 7, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27466, 0, 6, 32, 20, 3, height + 29, 0, 6, height + 45); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(3, 6, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(3, 8, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(3, 7, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: metal_a_supports_paint_setup(3, 5, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); break; } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_4); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 72, 0x20); break; case 1: @@ -2472,11 +2634,13 @@ static void inverted_rc_track_left_corkscrew_up(uint8 rideIndex, uint8 trackSequ sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27476, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 33); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 64, 0x20); break; case 1: @@ -2546,11 +2710,13 @@ static void inverted_rc_track_right_corkscrew_up(uint8 rideIndex, uint8 trackSeq sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27488, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 33); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 64, 0x20); break; case 1: @@ -2712,11 +2878,13 @@ static void inverted_rc_track_brakes(uint8 rideIndex, uint8 trackSequence, uint8 sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27338, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); if (track_paint_util_should_paint_supports(gPaintMapPosition)) { metal_a_supports_paint_setup(3, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); } + paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); } @@ -2739,11 +2907,13 @@ static void inverted_rc_track_left_quarter_banked_helix_large_up(uint8 rideIndex sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27197, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 35); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -2821,7 +2991,10 @@ static void inverted_rc_track_left_quarter_banked_helix_large_up(uint8 rideIndex sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27193, 0, 0, 20, 32, 3, height + 29, 6, 0, height + 43); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 58, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 2: paint_util_push_tunnel_right(height + 16, TUNNEL_3); @@ -2830,7 +3003,6 @@ static void inverted_rc_track_left_quarter_banked_helix_large_up(uint8 rideIndex paint_util_push_tunnel_left(height + 16, TUNNEL_3); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -2855,11 +3027,13 @@ static void inverted_rc_track_right_quarter_banked_helix_large_up(uint8 rideInde sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27188, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 35); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -2937,7 +3111,10 @@ static void inverted_rc_track_right_quarter_banked_helix_large_up(uint8 rideInde sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27192, 0, 0, 20, 32, 3, height + 29, 6, 0, height + 43); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 58, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 0: paint_util_push_tunnel_right(height + 16, TUNNEL_3); @@ -2946,7 +3123,6 @@ static void inverted_rc_track_right_quarter_banked_helix_large_up(uint8 rideInde paint_util_push_tunnel_left(height + 16, TUNNEL_3); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -2971,11 +3147,13 @@ static void inverted_rc_track_left_quarter_banked_helix_large_down(uint8 rideInd sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27177, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 43); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 58, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height + 16, TUNNEL_3); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -3053,7 +3231,10 @@ static void inverted_rc_track_left_quarter_banked_helix_large_down(uint8 rideInd sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27173, 0, 0, 20, 32, 3, height + 29, 6, 0, height + 35); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 2: paint_util_push_tunnel_right(height, TUNNEL_3); @@ -3062,7 +3243,6 @@ static void inverted_rc_track_left_quarter_banked_helix_large_down(uint8 rideInd paint_util_push_tunnel_left(height, TUNNEL_3); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -3087,11 +3267,13 @@ static void inverted_rc_track_right_quarter_banked_helix_large_down(uint8 rideIn sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27208, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 43); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 58, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height + 16, TUNNEL_3); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -3169,7 +3351,10 @@ static void inverted_rc_track_right_quarter_banked_helix_large_down(uint8 rideIn sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27212, 0, 0, 20, 32, 3, height + 29, 6, 0, height + 35); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 0: paint_util_push_tunnel_right(height, TUNNEL_3); @@ -3178,7 +3363,6 @@ static void inverted_rc_track_right_quarter_banked_helix_large_down(uint8 rideIn paint_util_push_tunnel_left(height, TUNNEL_3); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -3190,35 +3374,41 @@ static void inverted_rc_track_25_deg_up_left_banked(uint8 rideIndex, uint8 track switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27711, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 6, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27712, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 8, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27713, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 7, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27714, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 5, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(3, 6, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(3, 8, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(3, 7, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(3, 5, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_4); } else { paint_util_push_tunnel_rotated(direction, height + 8, TUNNEL_5); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 72, 0x20); } @@ -3228,35 +3418,41 @@ static void inverted_rc_track_25_deg_up_right_banked(uint8 rideIndex, uint8 trac switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27715, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 6, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27716, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 8, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27717, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 7, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27718, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 5, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(3, 6, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(3, 8, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(3, 7, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(3, 5, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_4); } else { paint_util_push_tunnel_rotated(direction, height + 8, TUNNEL_5); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 72, 0x20); } @@ -3326,11 +3522,13 @@ static void inverted_rc_track_left_eighth_to_diag(uint8 rideIndex, uint8 trackSe sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27519, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -3377,22 +3575,34 @@ static void inverted_rc_track_left_eighth_to_diag(uint8 rideIndex, uint8 trackSe switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27510, 0, 0, 16, 16, 3, height + 29, 16, 16, height + 29); - metal_a_supports_paint_setup(3, 3, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27514, 0, 0, 16, 18, 3, height + 29, 0, 16, height + 29); - metal_a_supports_paint_setup(3, 1, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27518, 0, 0, 16, 16, 3, height + 29, 0, 0, height + 29); - metal_a_supports_paint_setup(3, 0, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27522, 0, 0, 16, 16, 3, height + 29, 16, 0, height + 29); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(3, 3, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(3, 1, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(3, 0, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: metal_a_supports_paint_setup(3, 2, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -3417,11 +3627,13 @@ static void inverted_rc_track_right_eighth_to_diag(uint8 rideIndex, uint8 trackS sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27503, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -3468,22 +3680,34 @@ static void inverted_rc_track_right_eighth_to_diag(uint8 rideIndex, uint8 trackS switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27494, 0, 0, 16, 16, 3, height + 29, 16, 0, height + 29); - metal_a_supports_paint_setup(3, 1, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27498, 0, 0, 16, 16, 3, height + 29, 0, 0, height + 29); - metal_a_supports_paint_setup(3, 0, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27502, 0, 0, 16, 18, 3, height + 29, 0, 16, height + 29); - metal_a_supports_paint_setup(3, 2, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27506, 0, 0, 16, 16, 3, height + 29, 16, 16, height + 29); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(3, 1, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(3, 0, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(3, 2, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: metal_a_supports_paint_setup(3, 3, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -3522,11 +3746,13 @@ static void inverted_rc_track_left_eighth_bank_to_diag(uint8 rideIndex, uint8 tr sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27551, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -3573,22 +3799,34 @@ static void inverted_rc_track_left_eighth_bank_to_diag(uint8 rideIndex, uint8 tr switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27542, 0, 0, 16, 16, 3, height + 29, 16, 16, height + 29); - metal_a_supports_paint_setup(3, 3, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27546, 0, 0, 16, 18, 3, height + 29, 0, 16, height + 29); - metal_a_supports_paint_setup(3, 1, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27550, 0, 0, 16, 16, 3, height + 29, 0, 0, height + 29); - metal_a_supports_paint_setup(3, 0, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27554, 0, 0, 16, 16, 3, height + 29, 16, 0, height + 29); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(3, 3, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(3, 1, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(3, 0, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: metal_a_supports_paint_setup(3, 2, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -3613,11 +3851,13 @@ static void inverted_rc_track_right_eighth_bank_to_diag(uint8 rideIndex, uint8 t sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27535, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -3664,22 +3904,34 @@ static void inverted_rc_track_right_eighth_bank_to_diag(uint8 rideIndex, uint8 t switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27526, 0, 0, 16, 16, 3, height + 29, 16, 0, height + 29); - metal_a_supports_paint_setup(3, 1, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27530, 0, 0, 16, 16, 3, height + 29, 0, 0, height + 29); - metal_a_supports_paint_setup(3, 0, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27534, 0, 0, 16, 18, 3, height + 29, 0, 16, height + 29); - metal_a_supports_paint_setup(3, 2, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27538, 0, 0, 16, 16, 3, height + 29, 16, 16, height + 29); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(3, 1, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(3, 0, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(3, 2, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: metal_a_supports_paint_setup(3, 3, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -3757,38 +4009,34 @@ static void inverted_rc_track_diag_flat(uint8 rideIndex, uint8 trackSequence, ui case 3: if (track_element_is_lift_hill(mapElement)) { switch (direction) { - case 0: - metal_a_supports_paint_setup(3, 1, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27612, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 29); - metal_a_supports_paint_setup(3, 0, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(3, 2, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(3, 3, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; } } else { switch (direction) { - case 0: - metal_a_supports_paint_setup(3, 1, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27556, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 29); - metal_a_supports_paint_setup(3, 0, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(3, 2, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(3, 3, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; } } + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(3, 1, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(3, 0, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(3, 2, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(3, 3, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + } + paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -3852,38 +4100,34 @@ static void inverted_rc_track_diag_25_deg_up(uint8 rideIndex, uint8 trackSequenc case 3: if (track_element_is_lift_hill(mapElement)) { switch (direction) { - case 0: - metal_a_supports_paint_setup(3, 1, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27624, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 45); - metal_a_supports_paint_setup(3, 0, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(3, 2, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(3, 3, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); break; } } else { switch (direction) { - case 0: - metal_a_supports_paint_setup(3, 1, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27568, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 45); - metal_a_supports_paint_setup(3, 0, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(3, 2, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(3, 3, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); break; } } + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(3, 1, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(3, 0, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(3, 2, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(3, 3, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); + break; + } + paint_util_set_general_support_height(height + 72, 0x20); break; } @@ -3921,12 +4165,18 @@ static void inverted_rc_track_diag_60_deg_up(uint8 rideIndex, uint8 trackSequenc paint_util_set_general_support_height(height + 120, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27580, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 29); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_b_supports_paint_setup(3, 1, 32, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27580, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 29); metal_b_supports_paint_setup(3, 0, 36, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -3936,7 +4186,7 @@ static void inverted_rc_track_diag_60_deg_up(uint8 rideIndex, uint8 trackSequenc metal_b_supports_paint_setup(3, 3, 36, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 120, 0x20); break; } @@ -4000,38 +4250,34 @@ static void inverted_rc_track_diag_flat_to_25_deg_up(uint8 rideIndex, uint8 trac case 3: if (track_element_is_lift_hill(mapElement)) { switch (direction) { - case 0: - metal_a_supports_paint_setup(3, 1, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27616, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); - metal_a_supports_paint_setup(3, 0, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(3, 2, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(3, 3, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); break; } } else { switch (direction) { - case 0: - metal_a_supports_paint_setup(3, 1, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27560, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); - metal_a_supports_paint_setup(3, 0, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(3, 2, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(3, 3, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); break; } } + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(3, 1, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(3, 0, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(3, 2, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(3, 3, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); + break; + } + paint_util_set_general_support_height(height + 64, 0x20); break; } @@ -4069,12 +4315,18 @@ static void inverted_rc_track_diag_25_deg_up_to_60_deg_up(uint8 rideIndex, uint8 paint_util_set_general_support_height(height + 88, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27572, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 61); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_b_supports_paint_setup(3, 1, 16, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27572, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 61); metal_b_supports_paint_setup(3, 0, 16, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -4084,7 +4336,7 @@ static void inverted_rc_track_diag_25_deg_up_to_60_deg_up(uint8 rideIndex, uint8 metal_b_supports_paint_setup(3, 3, 16, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 88, 0x20); break; } @@ -4122,12 +4374,18 @@ static void inverted_rc_track_diag_60_deg_up_to_25_deg_up(uint8 rideIndex, uint8 paint_util_set_general_support_height(height + 88, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27576, -16, -16, 16, 16, 3, height + 29, 0, 0, height + 61); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_b_supports_paint_setup(3, 1, 21, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27576, -16, -16, 16, 16, 3, height + 29, 0, 0, height + 61); metal_b_supports_paint_setup(3, 0, 21, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -4137,7 +4395,7 @@ static void inverted_rc_track_diag_60_deg_up_to_25_deg_up(uint8 rideIndex, uint8 metal_b_supports_paint_setup(3, 3, 21, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 88, 0x20); break; } @@ -4201,38 +4459,34 @@ static void inverted_rc_track_diag_25_deg_up_to_flat(uint8 rideIndex, uint8 trac case 3: if (track_element_is_lift_hill(mapElement)) { switch (direction) { - case 0: - metal_a_supports_paint_setup(3, 1, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27620, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); - metal_a_supports_paint_setup(3, 0, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(3, 2, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(3, 3, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); break; } } else { switch (direction) { - case 0: - metal_a_supports_paint_setup(3, 1, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27564, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); - metal_a_supports_paint_setup(3, 0, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(3, 2, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(3, 3, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); break; } } + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(3, 1, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(3, 0, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(3, 2, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(3, 3, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); + break; + } + paint_util_set_general_support_height(height + 72, 0x20); break; } @@ -4296,38 +4550,34 @@ static void inverted_rc_track_diag_25_deg_down(uint8 rideIndex, uint8 trackSeque case 3: if (track_element_is_lift_hill(mapElement)) { switch (direction) { - case 0: - metal_a_supports_paint_setup(3, 1, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27626, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 45); - metal_a_supports_paint_setup(3, 0, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(3, 2, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(3, 3, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); break; } } else { switch (direction) { - case 0: - metal_a_supports_paint_setup(3, 1, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27570, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 45); - metal_a_supports_paint_setup(3, 0, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(3, 2, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(3, 3, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); break; } } + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(3, 1, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(3, 0, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(3, 2, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(3, 3, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); + break; + } + paint_util_set_general_support_height(height + 72, 0x20); break; } @@ -4365,12 +4615,18 @@ static void inverted_rc_track_diag_60_deg_down(uint8 rideIndex, uint8 trackSeque paint_util_set_general_support_height(height + 120, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27582, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 93); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_b_supports_paint_setup(3, 1, 24, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27582, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 93); metal_b_supports_paint_setup(3, 0, 28, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -4380,7 +4636,7 @@ static void inverted_rc_track_diag_60_deg_down(uint8 rideIndex, uint8 trackSeque metal_b_supports_paint_setup(3, 3, 28, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 120, 0x20); break; } @@ -4444,38 +4700,34 @@ static void inverted_rc_track_diag_flat_to_25_deg_down(uint8 rideIndex, uint8 tr case 3: if (track_element_is_lift_hill(mapElement)) { switch (direction) { - case 0: - metal_a_supports_paint_setup(3, 1, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27622, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); - metal_a_supports_paint_setup(3, 0, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(3, 2, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(3, 3, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); break; } } else { switch (direction) { - case 0: - metal_a_supports_paint_setup(3, 1, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27566, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); - metal_a_supports_paint_setup(3, 0, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(3, 2, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(3, 3, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); break; } } + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(3, 1, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(3, 0, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(3, 2, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(3, 3, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); + break; + } + paint_util_set_general_support_height(height + 72, 0x20); break; } @@ -4513,12 +4765,18 @@ static void inverted_rc_track_diag_25_deg_down_to_60_deg_down(uint8 rideIndex, u paint_util_set_general_support_height(height + 88, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27578, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 61); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_b_supports_paint_setup(3, 1, 17, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27578, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 61); metal_b_supports_paint_setup(3, 0, 17, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -4528,7 +4786,7 @@ static void inverted_rc_track_diag_25_deg_down_to_60_deg_down(uint8 rideIndex, u metal_b_supports_paint_setup(3, 3, 17, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 88, 0x20); break; } @@ -4566,12 +4824,18 @@ static void inverted_rc_track_diag_60_deg_down_to_25_deg_down(uint8 rideIndex, u paint_util_set_general_support_height(height + 88, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27574, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 61); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_b_supports_paint_setup(3, 1, 8, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27574, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 61); metal_b_supports_paint_setup(3, 0, 8, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -4581,7 +4845,7 @@ static void inverted_rc_track_diag_60_deg_down_to_25_deg_down(uint8 rideIndex, u metal_b_supports_paint_setup(3, 3, 8, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 88, 0x20); break; } @@ -4645,38 +4909,34 @@ static void inverted_rc_track_diag_25_deg_down_to_flat(uint8 rideIndex, uint8 tr case 3: if (track_element_is_lift_hill(mapElement)) { switch (direction) { - case 0: - metal_a_supports_paint_setup(3, 1, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27618, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); - metal_a_supports_paint_setup(3, 0, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(3, 2, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(3, 3, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); break; } } else { switch (direction) { - case 0: - metal_a_supports_paint_setup(3, 1, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27562, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); - metal_a_supports_paint_setup(3, 0, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(3, 2, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(3, 3, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); break; } } + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(3, 1, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(3, 0, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(3, 2, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(3, 3, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); + break; + } + paint_util_set_general_support_height(height + 64, 0x20); break; } @@ -4714,12 +4974,18 @@ static void inverted_rc_track_diag_flat_to_left_bank(uint8 rideIndex, uint8 trac paint_util_set_general_support_height(height + 48, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27588, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 29); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(3, 1, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27588, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 29); metal_a_supports_paint_setup(3, 0, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -4729,7 +4995,7 @@ static void inverted_rc_track_diag_flat_to_left_bank(uint8 rideIndex, uint8 trac metal_a_supports_paint_setup(3, 3, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -4767,12 +5033,18 @@ static void inverted_rc_track_diag_flat_to_right_bank(uint8 rideIndex, uint8 tra paint_util_set_general_support_height(height + 48, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27592, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 29); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(3, 1, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27592, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 29); metal_a_supports_paint_setup(3, 0, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -4782,7 +5054,7 @@ static void inverted_rc_track_diag_flat_to_right_bank(uint8 rideIndex, uint8 tra metal_a_supports_paint_setup(3, 3, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -4820,12 +5092,18 @@ static void inverted_rc_track_diag_left_bank_to_flat(uint8 rideIndex, uint8 trac paint_util_set_general_support_height(height + 48, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27594, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 29); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(3, 1, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27594, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 29); metal_a_supports_paint_setup(3, 0, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -4835,7 +5113,7 @@ static void inverted_rc_track_diag_left_bank_to_flat(uint8 rideIndex, uint8 trac metal_a_supports_paint_setup(3, 3, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -4873,12 +5151,18 @@ static void inverted_rc_track_diag_right_bank_to_flat(uint8 rideIndex, uint8 tra paint_util_set_general_support_height(height + 48, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27590, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 29); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(3, 1, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27590, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 29); metal_a_supports_paint_setup(3, 0, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -4888,7 +5172,7 @@ static void inverted_rc_track_diag_right_bank_to_flat(uint8 rideIndex, uint8 tra metal_a_supports_paint_setup(3, 3, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -4926,12 +5210,18 @@ static void inverted_rc_track_diag_left_bank_to_25_deg_up(uint8 rideIndex, uint8 paint_util_set_general_support_height(height + 64, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27604, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(3, 1, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27604, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); metal_a_supports_paint_setup(3, 0, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -4941,7 +5231,7 @@ static void inverted_rc_track_diag_left_bank_to_25_deg_up(uint8 rideIndex, uint8 metal_a_supports_paint_setup(3, 3, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 64, 0x20); break; } @@ -4979,12 +5269,18 @@ static void inverted_rc_track_diag_right_bank_to_25_deg_up(uint8 rideIndex, uint paint_util_set_general_support_height(height + 64, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27608, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(3, 1, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27608, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); metal_a_supports_paint_setup(3, 0, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -4994,7 +5290,7 @@ static void inverted_rc_track_diag_right_bank_to_25_deg_up(uint8 rideIndex, uint metal_a_supports_paint_setup(3, 3, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 64, 0x20); break; } @@ -5032,12 +5328,18 @@ static void inverted_rc_track_diag_25_deg_up_to_left_bank(uint8 rideIndex, uint8 paint_util_set_general_support_height(height + 72, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27596, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(3, 1, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27596, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); metal_a_supports_paint_setup(3, 0, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -5047,7 +5349,7 @@ static void inverted_rc_track_diag_25_deg_up_to_left_bank(uint8 rideIndex, uint8 metal_a_supports_paint_setup(3, 3, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 72, 0x20); break; } @@ -5085,12 +5387,18 @@ static void inverted_rc_track_diag_25_deg_up_to_right_bank(uint8 rideIndex, uint paint_util_set_general_support_height(height + 72, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27600, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(3, 1, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27600, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); metal_a_supports_paint_setup(3, 0, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -5100,7 +5408,7 @@ static void inverted_rc_track_diag_25_deg_up_to_right_bank(uint8 rideIndex, uint metal_a_supports_paint_setup(3, 3, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 72, 0x20); break; } @@ -5138,12 +5446,18 @@ static void inverted_rc_track_diag_left_bank_to_25_deg_down(uint8 rideIndex, uin paint_util_set_general_support_height(height + 72, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27602, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(3, 1, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27602, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); metal_a_supports_paint_setup(3, 0, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -5153,7 +5467,7 @@ static void inverted_rc_track_diag_left_bank_to_25_deg_down(uint8 rideIndex, uin metal_a_supports_paint_setup(3, 3, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 72, 0x20); break; } @@ -5191,12 +5505,18 @@ static void inverted_rc_track_diag_right_bank_to_25_deg_down(uint8 rideIndex, ui paint_util_set_general_support_height(height + 72, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27598, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(3, 1, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27598, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); metal_a_supports_paint_setup(3, 0, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -5206,7 +5526,7 @@ static void inverted_rc_track_diag_right_bank_to_25_deg_down(uint8 rideIndex, ui metal_a_supports_paint_setup(3, 3, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 72, 0x20); break; } @@ -5244,12 +5564,18 @@ static void inverted_rc_track_diag_25_deg_down_to_left_bank(uint8 rideIndex, uin paint_util_set_general_support_height(height + 64, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27610, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(3, 1, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27610, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); metal_a_supports_paint_setup(3, 0, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -5259,7 +5585,7 @@ static void inverted_rc_track_diag_25_deg_down_to_left_bank(uint8 rideIndex, uin metal_a_supports_paint_setup(3, 3, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 64, 0x20); break; } @@ -5297,12 +5623,18 @@ static void inverted_rc_track_diag_25_deg_down_to_right_bank(uint8 rideIndex, ui paint_util_set_general_support_height(height + 64, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27606, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(3, 1, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27606, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); metal_a_supports_paint_setup(3, 0, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -5312,7 +5644,7 @@ static void inverted_rc_track_diag_25_deg_down_to_right_bank(uint8 rideIndex, ui metal_a_supports_paint_setup(3, 3, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 64, 0x20); break; } @@ -5350,12 +5682,18 @@ static void inverted_rc_track_diag_left_bank(uint8 rideIndex, uint8 trackSequenc paint_util_set_general_support_height(height + 48, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27584, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 29); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(3, 1, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27584, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 29); metal_a_supports_paint_setup(3, 0, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -5365,7 +5703,7 @@ static void inverted_rc_track_diag_left_bank(uint8 rideIndex, uint8 trackSequenc metal_a_supports_paint_setup(3, 3, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -5403,12 +5741,18 @@ static void inverted_rc_track_diag_right_bank(uint8 rideIndex, uint8 trackSequen paint_util_set_general_support_height(height + 48, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27586, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 29); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(3, 1, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27586, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 29); metal_a_supports_paint_setup(3, 0, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -5418,7 +5762,7 @@ static void inverted_rc_track_diag_right_bank(uint8 rideIndex, uint8 trackSequen metal_a_supports_paint_setup(3, 3, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -5735,11 +6079,13 @@ static void inverted_rc_track_block_brakes(uint8 rideIndex, uint8 trackSequence, sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27338, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); if (track_paint_util_should_paint_supports(gPaintMapPosition)) { metal_a_supports_paint_setup(3, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); } + paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); } @@ -5762,11 +6108,13 @@ static void inverted_rc_track_left_banked_quarter_turn_3_25_deg_up(uint8 rideInd sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27760, 0, 6, 32, 20, 3, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_4); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 88, 0x20); break; case 1: @@ -5790,7 +6138,10 @@ static void inverted_rc_track_left_banked_quarter_turn_3_25_deg_up(uint8 rideInd sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27759, 6, 0, 20, 32, 3, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 2: paint_util_push_tunnel_right(height + 8, TUNNEL_5); @@ -5799,7 +6150,6 @@ static void inverted_rc_track_left_banked_quarter_turn_3_25_deg_up(uint8 rideInd paint_util_push_tunnel_left(height + 8, TUNNEL_5); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 88, 0x20); break; } @@ -5824,11 +6174,13 @@ static void inverted_rc_track_right_banked_quarter_turn_3_25_deg_up(uint8 rideIn sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27757, 0, 6, 32, 20, 3, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_4); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 88, 0x20); break; case 1: @@ -5852,7 +6204,10 @@ static void inverted_rc_track_right_banked_quarter_turn_3_25_deg_up(uint8 rideIn sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27758, 6, 0, 20, 32, 3, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 0: paint_util_push_tunnel_right(height + 8, TUNNEL_5); @@ -5861,7 +6216,6 @@ static void inverted_rc_track_right_banked_quarter_turn_3_25_deg_up(uint8 rideIn paint_util_push_tunnel_left(height + 8, TUNNEL_5); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 88, 0x20); break; } @@ -5900,11 +6254,13 @@ static void inverted_rc_track_left_banked_quarter_turn_5_25_deg_up(uint8 rideInd sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27802, 0, 6, 32, 20, 3, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_4); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 88, 0x20); break; case 1: @@ -5982,7 +6338,10 @@ static void inverted_rc_track_left_banked_quarter_turn_5_25_deg_up(uint8 rideInd sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27806, 6, 0, 20, 32, 3, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 2: paint_util_push_tunnel_right(height + 8, TUNNEL_5); @@ -5991,7 +6350,6 @@ static void inverted_rc_track_left_banked_quarter_turn_5_25_deg_up(uint8 rideInd paint_util_push_tunnel_left(height + 8, TUNNEL_5); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 88, 0x20); break; } @@ -6016,11 +6374,13 @@ static void inverted_rc_track_right_banked_quarter_turn_5_25_deg_up(uint8 rideIn sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27782, 0, 6, 32, 20, 3, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_4); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 88, 0x20); break; case 1: @@ -6098,7 +6458,10 @@ static void inverted_rc_track_right_banked_quarter_turn_5_25_deg_up(uint8 rideIn sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27786, 6, 0, 20, 32, 3, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 0: paint_util_push_tunnel_right(height + 8, TUNNEL_5); @@ -6107,7 +6470,6 @@ static void inverted_rc_track_right_banked_quarter_turn_5_25_deg_up(uint8 rideIn paint_util_push_tunnel_left(height + 8, TUNNEL_5); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 88, 0x20); break; } @@ -6133,35 +6495,41 @@ static void inverted_rc_track_25_deg_up_to_left_banked_25_deg_up(uint8 rideIndex switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27719, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 6, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27720, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 8, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27721, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 7, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27722, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 5, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(3, 6, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(3, 8, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(3, 7, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(3, 5, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_4); } else { paint_util_push_tunnel_rotated(direction, height + 8, TUNNEL_5); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 72, 0x20); } @@ -6171,35 +6539,41 @@ static void inverted_rc_track_25_deg_up_to_right_banked_25_deg_up(uint8 rideInde switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27723, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 6, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27724, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 8, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27725, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 7, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27726, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 5, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(3, 6, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(3, 8, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(3, 7, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(3, 5, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_4); } else { paint_util_push_tunnel_rotated(direction, height + 8, TUNNEL_5); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 72, 0x20); } @@ -6209,35 +6583,41 @@ static void inverted_rc_track_left_banked_25_deg_up_to_25_deg_up(uint8 rideIndex switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27727, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 6, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27728, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 8, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27729, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 7, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27730, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 5, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(3, 6, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(3, 8, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(3, 7, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(3, 5, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_4); } else { paint_util_push_tunnel_rotated(direction, height + 8, TUNNEL_5); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 72, 0x20); } @@ -6247,35 +6627,41 @@ static void inverted_rc_track_right_banked_25_deg_up_to_25_deg_up(uint8 rideInde switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27731, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 6, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27732, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 8, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27733, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 7, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27734, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 5, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(3, 6, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(3, 8, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(3, 7, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(3, 5, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_4); } else { paint_util_push_tunnel_rotated(direction, height + 8, TUNNEL_5); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 72, 0x20); } @@ -6309,35 +6695,41 @@ static void inverted_rc_track_left_banked_flat_to_left_banked_25_deg_up(uint8 ri switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27735, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 6, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27736, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 8, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27737, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 7, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27738, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 5, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(3, 6, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(3, 8, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(3, 7, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(3, 5, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } else { paint_util_push_tunnel_rotated(direction, height, TUNNEL_5); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 64, 0x20); } @@ -6347,35 +6739,41 @@ static void inverted_rc_track_right_banked_flat_to_right_banked_25_deg_up(uint8 switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27739, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 6, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27740, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 8, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27741, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 7, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27742, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 5, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(3, 6, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(3, 8, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(3, 7, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(3, 5, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } else { paint_util_push_tunnel_rotated(direction, height, TUNNEL_5); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 64, 0x20); } @@ -6385,35 +6783,41 @@ static void inverted_rc_track_left_banked_25_deg_up_to_left_banked_flat(uint8 ri switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27743, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 6, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27744, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 8, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27745, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 7, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27746, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 5, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(3, 6, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(3, 8, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(3, 7, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(3, 5, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_3); } else { paint_util_push_tunnel_rotated(direction, height + 8, TUNNEL_13); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 56, 0x20); } @@ -6423,35 +6827,41 @@ static void inverted_rc_track_right_banked_25_deg_up_to_right_banked_flat(uint8 switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27747, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 6, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27748, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 8, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27749, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 7, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27750, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 5, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(3, 6, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(3, 8, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(3, 7, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(3, 5, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_3); } else { paint_util_push_tunnel_rotated(direction, height + 8, TUNNEL_13); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 56, 0x20); } @@ -6485,35 +6895,41 @@ static void inverted_rc_track_flat_to_left_banked_25_deg_up(uint8 rideIndex, uin switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27695, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 6, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27696, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 8, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27697, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 7, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27698, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 5, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(3, 6, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(3, 8, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(3, 7, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(3, 5, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } else { paint_util_push_tunnel_rotated(direction, height, TUNNEL_5); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 64, 0x20); } @@ -6523,35 +6939,41 @@ static void inverted_rc_track_flat_to_right_banked_25_deg_up(uint8 rideIndex, ui switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27699, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 6, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27700, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 8, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27701, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 7, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27702, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 5, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(3, 6, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(3, 8, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(3, 7, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(3, 5, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } else { paint_util_push_tunnel_rotated(direction, height, TUNNEL_5); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 64, 0x20); } @@ -6561,35 +6983,41 @@ static void inverted_rc_track_left_banked_25_deg_up_to_flat(uint8 rideIndex, uin switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27703, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 6, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27704, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 8, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27705, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 7, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27706, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 5, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(3, 6, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(3, 8, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(3, 7, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(3, 5, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_3); } else { paint_util_push_tunnel_rotated(direction, height + 8, TUNNEL_13); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 56, 0x20); } @@ -6599,35 +7027,41 @@ static void inverted_rc_track_right_banked_25_deg_up_to_flat(uint8 rideIndex, ui switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27707, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 6, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27708, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 8, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27709, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 7, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27710, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 5, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(3, 6, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(3, 8, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(3, 7, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(3, 5, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_3); } else { paint_util_push_tunnel_rotated(direction, height + 8, TUNNEL_13); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 56, 0x20); } diff --git a/src/ride/coaster/lim_launched_roller_coaster.c b/src/ride/coaster/lim_launched_roller_coaster.c index a6d4e1d87a..ce34769253 100644 --- a/src/ride/coaster/lim_launched_roller_coaster.c +++ b/src/ride/coaster/lim_launched_roller_coaster.c @@ -26,6 +26,7 @@ #include "../track_data.h" #include "../track_paint.h" +/** rct2: 0x008A6D50, 0x008A6D60, 0x008A6D70 */ static void lim_launched_rc_track_station(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { static const uint32 imageIds[4][3] = { @@ -48,6 +49,7 @@ static void lim_launched_rc_track_station(uint8 rideIndex, uint8 trackSequence, paint_util_set_general_support_height(height + 32, 0x20); } +/** rct2: 0x008A65E0 */ static void lim_launched_rc_track_left_vertical_loop(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { switch (trackSequence) { @@ -223,6 +225,7 @@ static void lim_launched_rc_track_left_vertical_loop(uint8 rideIndex, uint8 trac } } +/** rct2: 0x008A65F0 */ static void lim_launched_rc_track_right_vertical_loop(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { switch (trackSequence) { @@ -392,6 +395,7 @@ static void lim_launched_rc_track_right_vertical_loop(uint8 rideIndex, uint8 tra } } +/** rct2: 0x008A6D10 */ static void lim_launched_rc_track_left_twist_down_to_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { switch (trackSequence) { @@ -476,6 +480,7 @@ static void lim_launched_rc_track_left_twist_down_to_up(uint8 rideIndex, uint8 t } } +/** rct2: 0x008A6D20 */ static void lim_launched_rc_track_right_twist_down_to_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { switch (trackSequence) { @@ -560,6 +565,7 @@ static void lim_launched_rc_track_right_twist_down_to_up(uint8 rideIndex, uint8 } } +/** rct2: 0x008A6D30 */ static void lim_launched_rc_track_left_twist_up_to_down(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { switch (trackSequence) { @@ -644,6 +650,7 @@ static void lim_launched_rc_track_left_twist_up_to_down(uint8 rideIndex, uint8 t } } +/** rct2: 0x008A6D40 */ static void lim_launched_rc_track_right_twist_up_to_down(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { switch (trackSequence) { @@ -728,6 +735,7 @@ static void lim_launched_rc_track_right_twist_up_to_down(uint8 rideIndex, uint8 } } +/** rct2: 0x008A6CD0 */ static void lim_launched_rc_track_left_corkscrew_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { switch (trackSequence) { @@ -746,11 +754,13 @@ static void lim_launched_rc_track_left_corkscrew_up(uint8 rideIndex, uint8 track sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 15743, 0, 0, 32, 20, 3, height, 0, 6, height + 4); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(0, 4, 0, height, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_0); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -786,7 +796,10 @@ static void lim_launched_rc_track_left_corkscrew_up(uint8 rideIndex, uint8 track sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 15745, 0, 0, 20, 32, 3, height, 6, 0, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(0, 4, 0, height + 35, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 2: paint_util_push_tunnel_right(height + 8, TUNNEL_0); @@ -795,12 +808,12 @@ static void lim_launched_rc_track_left_corkscrew_up(uint8 rideIndex, uint8 track paint_util_push_tunnel_left(height + 8, TUNNEL_0); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } } +/** rct2: 0x008A6CE0 */ static void lim_launched_rc_track_right_corkscrew_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { switch (trackSequence) { @@ -859,7 +872,10 @@ static void lim_launched_rc_track_right_corkscrew_up(uint8 rideIndex, uint8 trac sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 15757, 0, 0, 20, 32, 3, height, 6, 0, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(0, 4, 0, height + 35, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 0: paint_util_push_tunnel_right(height + 8, TUNNEL_0); @@ -868,22 +884,24 @@ static void lim_launched_rc_track_right_corkscrew_up(uint8 rideIndex, uint8 trac paint_util_push_tunnel_left(height + 8, TUNNEL_0); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } } +/** rct2: 0x008A6CF0 */ static void lim_launched_rc_track_left_corkscrew_down(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { lim_launched_rc_track_right_corkscrew_up(rideIndex, 2 - trackSequence, (direction + 1) & 3, height, mapElement); } +/** rct2: 0x008A6D00 */ static void lim_launched_rc_track_right_corkscrew_down(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { lim_launched_rc_track_left_corkscrew_up(rideIndex, 2 - trackSequence, (direction - 1) & 3, height, mapElement); } +/** rct2: 0x008A6D80 */ static void lim_launched_rc_track_brakes(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { switch (direction) { @@ -904,6 +922,7 @@ static void lim_launched_rc_track_brakes(uint8 rideIndex, uint8 trackSequence, u paint_util_set_general_support_height(height + 32, 0x20); } +/** rct2: 0x008A6C10 */ static void lim_launched_rc_track_90_deg_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { switch (trackSequence) { @@ -931,11 +950,13 @@ static void lim_launched_rc_track_90_deg_up(uint8 rideIndex, uint8 trackSequence } } +/** rct2: 0x008A6C20 */ static void lim_launched_rc_track_90_deg_down(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { lim_launched_rc_track_90_deg_up(rideIndex, trackSequence, (direction + 2) & 3, height, mapElement); } +/** rct2: 0x008A6C30 */ static void lim_launched_rc_track_60_deg_up_to_90_deg_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { switch (trackSequence) { @@ -966,11 +987,13 @@ static void lim_launched_rc_track_60_deg_up_to_90_deg_up(uint8 rideIndex, uint8 } } +/** rct2: 0x008A6C40 */ static void lim_launched_rc_track_90_deg_down_to_60_deg_down(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { lim_launched_rc_track_60_deg_up_to_90_deg_up(rideIndex, trackSequence, (direction + 2) & 3, height, mapElement); } +/** rct2: 0x008A6C50 */ static void lim_launched_rc_track_90_deg_up_to_60_deg_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { switch (direction) { @@ -999,6 +1022,7 @@ static void lim_launched_rc_track_90_deg_up_to_60_deg_up(uint8 rideIndex, uint8 paint_util_set_general_support_height(height + 80, 0x20); } +/** rct2: 0x008A6C60 */ static void lim_launched_rc_track_60_deg_down_to_90_deg_down(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { switch (trackSequence) { @@ -1028,6 +1052,7 @@ static void lim_launched_rc_track_60_deg_down_to_90_deg_down(uint8 rideIndex, ui } } +/** rct2: 0x008A6C70 */ static void lim_launched_rc_track_90_deg_to_inverted_flat_quarter_loop_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { switch (trackSequence) { @@ -1091,11 +1116,13 @@ static void lim_launched_rc_track_90_deg_to_inverted_flat_quarter_loop_up(uint8 } } +/** rct2: 0x008A6C80 */ static void lim_launched_rc_track_inverted_flat_to_90_deg_quarter_loop_down(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { lim_launched_rc_track_90_deg_to_inverted_flat_quarter_loop_up(rideIndex, 2 - trackSequence, direction, height, mapElement); } +/** rct2: 0x008A6D90 */ static void lim_launched_rc_track_block_brakes(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { switch (direction) { @@ -1145,6 +1172,7 @@ static void lim_launched_rc_track_left_quarter_turn_1_90_deg_up(uint8 rideIndex, } } +/** rct2: 0x008A6CA0 */ static void lim_launched_rc_track_right_quarter_turn_1_90_deg_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { switch (trackSequence) { @@ -1174,11 +1202,13 @@ static void lim_launched_rc_track_right_quarter_turn_1_90_deg_up(uint8 rideIndex } } +/** rct2: 0x008A6CB0 */ static void lim_launched_rc_track_left_quarter_turn_1_90_deg_down(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { lim_launched_rc_track_right_quarter_turn_1_90_deg_up(rideIndex, trackSequence, (direction + 1) & 3, height, mapElement); } +/** rct2: 0x008A6CC0 */ static void lim_launched_rc_track_right_quarter_turn_1_90_deg_down(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { lim_launched_rc_track_left_quarter_turn_1_90_deg_up(rideIndex, trackSequence, (direction - 1) & 3, height, mapElement); diff --git a/src/ride/coaster/mine_train_coaster.c b/src/ride/coaster/mine_train_coaster.c index 3315d68e61..90e2beeaa5 100644 --- a/src/ride/coaster/mine_train_coaster.c +++ b/src/ride/coaster/mine_train_coaster.c @@ -67,6 +67,7 @@ static void mine_train_rc_track_flat(uint8 rideIndex, uint8 trackSequence, uint8 paint_util_set_general_support_height(height + 32, 0x20); } +/** rct2: 0x0071C154, 0x0071C164, 0x0071C174 */ static void mine_train_rc_track_station(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { static const uint32 imageIds[4][3] = { @@ -3504,32 +3505,32 @@ static void mine_train_rc_track_diag_25_deg_up(uint8 rideIndex, uint8 trackSeque switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 20398, -16, -16, 32, 32, 1, height, -16, -16, height); - wooden_a_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: - wooden_a_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } } else { switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 20370, -16, -16, 32, 32, 1, height, -16, -16, height); - wooden_a_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: - wooden_a_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } } @@ -3540,33 +3541,33 @@ static void mine_train_rc_track_diag_25_deg_up(uint8 rideIndex, uint8 trackSeque if (track_element_is_lift_hill(mapElement)) { switch (direction) { case 0: - wooden_a_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 20400, -16, -16, 32, 32, 1, height, -16, -16, height); - wooden_a_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } } else { switch (direction) { case 0: - wooden_a_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 20372, -16, -16, 32, 32, 1, height, -16, -16, height); - wooden_a_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } } @@ -3610,16 +3611,16 @@ static void mine_train_rc_track_diag_60_deg_up(uint8 rideIndex, uint8 trackSeque switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 20382, -16, -16, 32, 32, 1, height, -16, -16, height); - wooden_a_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: - wooden_a_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0); @@ -3628,17 +3629,17 @@ static void mine_train_rc_track_diag_60_deg_up(uint8 rideIndex, uint8 trackSeque case 2: switch (direction) { case 0: - wooden_a_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 20384, -16, -16, 32, 32, 1, height, -16, -16, height); - wooden_a_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0); @@ -3788,16 +3789,16 @@ static void mine_train_rc_track_diag_25_deg_up_to_60_deg_up(uint8 rideIndex, uin switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 20374, -16, -16, 32, 32, 1, height, -16, -16, height); - wooden_a_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: - wooden_a_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0); @@ -3806,17 +3807,17 @@ static void mine_train_rc_track_diag_25_deg_up_to_60_deg_up(uint8 rideIndex, uin case 2: switch (direction) { case 0: - wooden_a_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 20376, -16, -16, 32, 32, 1, height, -16, -16, height); - wooden_a_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0); @@ -3851,16 +3852,16 @@ static void mine_train_rc_track_diag_60_deg_up_to_25_deg_up(uint8 rideIndex, uin switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 20378, -16, -16, 32, 32, 1, height, -16, -16, height); - wooden_a_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: - wooden_a_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0); @@ -3869,17 +3870,17 @@ static void mine_train_rc_track_diag_60_deg_up_to_25_deg_up(uint8 rideIndex, uin case 2: switch (direction) { case 0: - wooden_a_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 20380, -16, -16, 32, 32, 1, height, -16, -16, height); - wooden_a_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0); @@ -3923,32 +3924,32 @@ static void mine_train_rc_track_diag_25_deg_up_to_flat(uint8 rideIndex, uint8 tr switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 20394, -16, -16, 32, 32, 1, height, -16, -16, height); - wooden_a_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: - wooden_a_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } } else { switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 20366, -16, -16, 32, 32, 1, height, -16, -16, height); - wooden_a_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: - wooden_a_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } } @@ -3959,33 +3960,33 @@ static void mine_train_rc_track_diag_25_deg_up_to_flat(uint8 rideIndex, uint8 tr if (track_element_is_lift_hill(mapElement)) { switch (direction) { case 0: - wooden_a_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 20396, -16, -16, 32, 32, 1, height, -16, -16, height); - wooden_a_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } } else { switch (direction) { case 0: - wooden_a_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 20368, -16, -16, 32, 32, 1, height, -16, -16, height); - wooden_a_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } } @@ -4038,32 +4039,32 @@ static void mine_train_rc_track_diag_25_deg_down(uint8 rideIndex, uint8 trackSeq switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 20400, -16, -16, 32, 32, 1, height, -16, -16, height); - wooden_a_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: - wooden_a_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } } else { switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 20372, -16, -16, 32, 32, 1, height, -16, -16, height); - wooden_a_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: - wooden_a_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } } @@ -4074,33 +4075,33 @@ static void mine_train_rc_track_diag_25_deg_down(uint8 rideIndex, uint8 trackSeq if (track_element_is_lift_hill(mapElement)) { switch (direction) { case 0: - wooden_a_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 20398, -16, -16, 32, 32, 1, height, -16, -16, height); - wooden_a_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } } else { switch (direction) { case 0: - wooden_a_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 20370, -16, -16, 32, 32, 1, height, -16, -16, height); - wooden_a_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } } @@ -4144,16 +4145,16 @@ static void mine_train_rc_track_diag_60_deg_down(uint8 rideIndex, uint8 trackSeq switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 20384, -16, -16, 32, 32, 1, height, -16, -16, height); - wooden_a_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: - wooden_a_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0); @@ -4162,17 +4163,17 @@ static void mine_train_rc_track_diag_60_deg_down(uint8 rideIndex, uint8 trackSeq case 2: switch (direction) { case 0: - wooden_a_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 20382, -16, -16, 32, 32, 1, height, -16, -16, height); - wooden_a_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0); @@ -4216,32 +4217,32 @@ static void mine_train_rc_track_diag_flat_to_25_deg_down(uint8 rideIndex, uint8 switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 20396, -16, -16, 32, 32, 1, height, -16, -16, height); - wooden_a_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: - wooden_a_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } } else { switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 20368, -16, -16, 32, 32, 1, height, -16, -16, height); - wooden_a_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: - wooden_a_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } } @@ -4252,33 +4253,33 @@ static void mine_train_rc_track_diag_flat_to_25_deg_down(uint8 rideIndex, uint8 if (track_element_is_lift_hill(mapElement)) { switch (direction) { case 0: - wooden_a_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 20394, -16, -16, 32, 32, 1, height, -16, -16, height); - wooden_a_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } } else { switch (direction) { case 0: - wooden_a_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 20366, -16, -16, 32, 32, 1, height, -16, -16, height); - wooden_a_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } } @@ -4322,16 +4323,16 @@ static void mine_train_rc_track_diag_25_deg_down_to_60_deg_down(uint8 rideIndex, switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 20380, -16, -16, 32, 32, 1, height, -16, -16, height); - wooden_a_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: - wooden_a_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0); @@ -4340,17 +4341,17 @@ static void mine_train_rc_track_diag_25_deg_down_to_60_deg_down(uint8 rideIndex, case 2: switch (direction) { case 0: - wooden_a_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 20378, -16, -16, 32, 32, 1, height, -16, -16, height); - wooden_a_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0); @@ -4385,16 +4386,16 @@ static void mine_train_rc_track_diag_60_deg_down_to_25_deg_down(uint8 rideIndex, switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 20376, -16, -16, 32, 32, 1, height, -16, -16, height); - wooden_a_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: - wooden_a_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0); @@ -4403,17 +4404,17 @@ static void mine_train_rc_track_diag_60_deg_down_to_25_deg_down(uint8 rideIndex, case 2: switch (direction) { case 0: - wooden_a_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 20374, -16, -16, 32, 32, 1, height, -16, -16, height); - wooden_a_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0); @@ -4948,16 +4949,16 @@ static void mine_train_rc_track_diag_25_deg_up_to_left_bank(uint8 rideIndex, uin case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 20416, -16, -16, 32, 32, 1, height, -16, -16, height); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 20420, -16, -16, 32, 32, 0, height, -16, -16, height + 35); - wooden_a_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: - wooden_a_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0); @@ -4966,17 +4967,17 @@ static void mine_train_rc_track_diag_25_deg_up_to_left_bank(uint8 rideIndex, uin case 2: switch (direction) { case 0: - wooden_a_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 20418, -16, -16, 32, 32, 1, height, -16, -16, height); - wooden_a_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0); @@ -5011,16 +5012,16 @@ static void mine_train_rc_track_diag_25_deg_up_to_right_bank(uint8 rideIndex, ui switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 20421, -16, -16, 32, 32, 1, height, -16, -16, height); - wooden_a_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: - wooden_a_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0); @@ -5029,18 +5030,18 @@ static void mine_train_rc_track_diag_25_deg_up_to_right_bank(uint8 rideIndex, ui case 2: switch (direction) { case 0: - wooden_a_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 20423, -16, -16, 32, 32, 1, height, -16, -16, height); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 20425, -16, -16, 32, 32, 0, height, -16, -16, height + 35); - wooden_a_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0); @@ -5076,16 +5077,16 @@ static void mine_train_rc_track_diag_left_bank_to_25_deg_down(uint8 rideIndex, u case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 20423, -16, -16, 32, 32, 1, height, -16, -16, height); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 20425, -16, -16, 32, 32, 0, height, -16, -16, height + 35); - wooden_a_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: - wooden_a_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0); @@ -5094,17 +5095,17 @@ static void mine_train_rc_track_diag_left_bank_to_25_deg_down(uint8 rideIndex, u case 2: switch (direction) { case 0: - wooden_a_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 20421, -16, -16, 32, 32, 1, height, -16, -16, height); - wooden_a_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0); @@ -5139,16 +5140,16 @@ static void mine_train_rc_track_diag_right_bank_to_25_deg_down(uint8 rideIndex, switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 20418, -16, -16, 32, 32, 1, height, -16, -16, height); - wooden_a_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: - wooden_a_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0); @@ -5157,18 +5158,18 @@ static void mine_train_rc_track_diag_right_bank_to_25_deg_down(uint8 rideIndex, case 2: switch (direction) { case 0: - wooden_a_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(10, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(11, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 20416, -16, -16, 32, 32, 1, height, -16, -16, height); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 20420, -16, -16, 32, 32, 0, height, -16, -16, height + 35); - wooden_a_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(8, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(9, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0); diff --git a/src/ride/coaster/mini_suspended_coaster.c b/src/ride/coaster/mini_suspended_coaster.c index d5879e3a9a..c55dae1b3a 100644 --- a/src/ride/coaster/mini_suspended_coaster.c +++ b/src/ride/coaster/mini_suspended_coaster.c @@ -34,16 +34,10 @@ static void mini_suspended_rc_track_flat(uint8 rideIndex, uint8 trackSequence, u case 0: case 2: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28433, 0, 6, 32, 20, 1, height + 24); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(1, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: case 3: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28434, 0, 6, 32, 20, 1, height + 24); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(2, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); - } break; } } else { @@ -51,24 +45,33 @@ static void mini_suspended_rc_track_flat(uint8 rideIndex, uint8 trackSequence, u case 0: case 2: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28383, 0, 6, 32, 20, 1, height + 24); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(1, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: case 3: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28384, 0, 6, 32, 20, 1, height + 24); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(2, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); - } break; } } - paint_util_push_tunnel_rotated(direction, height, TUNNEL_0); + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + case 2: + metal_a_supports_paint_setup(1, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + case 3: + metal_a_supports_paint_setup(2, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + + paint_util_push_tunnel_rotated(direction, height, TUNNEL_0); paint_util_set_general_support_height(height + 48, 0x20); } +/** rct2: 0x008AFF4C, 0x008AFF5C, 0x008AFF6C */ static void mini_suspended_rc_track_station(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { static const uint32 imageIds[4][3] = { @@ -95,63 +98,57 @@ static void mini_suspended_rc_track_25_deg_up(uint8 rideIndex, uint8 trackSequen switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28435, 0, 6, 32, 20, 1, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(1, 6, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28441, 0, 6, 32, 20, 1, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(2, 8, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28437, 0, 6, 32, 20, 1, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(1, 7, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28442, 0, 6, 32, 20, 1, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(2, 5, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); - } break; } } else { switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28385, 0, 6, 32, 20, 1, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(1, 6, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28391, 0, 6, 32, 20, 1, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(2, 8, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28387, 0, 6, 32, 20, 1, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(1, 7, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28392, 0, 6, 32, 20, 1, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(2, 5, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); - } break; } } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(1, 6, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(2, 8, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(1, 7, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(2, 5, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_1); } else { paint_util_push_tunnel_rotated(direction, height + 8, TUNNEL_2); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 72, 0x20); } @@ -162,63 +159,57 @@ static void mini_suspended_rc_track_flat_to_25_deg_up(uint8 rideIndex, uint8 tra switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28436, 0, 6, 32, 20, 1, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(1, 6, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28443, 0, 6, 32, 20, 1, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(2, 8, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28438, 0, 6, 32, 20, 1, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(1, 7, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28444, 0, 6, 32, 20, 1, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(2, 5, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); - } break; } } else { switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28386, 0, 6, 32, 20, 1, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(1, 6, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28393, 0, 6, 32, 20, 1, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(2, 8, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28388, 0, 6, 32, 20, 1, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(1, 7, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28394, 0, 6, 32, 20, 1, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(2, 5, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); - } break; } } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(1, 6, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(2, 8, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(1, 7, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(2, 5, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_0); } else { paint_util_push_tunnel_rotated(direction, height, TUNNEL_2); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 64, 0x20); } @@ -229,63 +220,57 @@ static void mini_suspended_rc_track_25_deg_up_to_flat(uint8 rideIndex, uint8 tra switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28440, 0, 6, 32, 20, 1, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(1, 6, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28446, 0, 6, 32, 20, 1, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(2, 8, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28439, 0, 6, 32, 20, 1, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(1, 7, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28445, 0, 6, 32, 20, 1, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(2, 5, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); - } break; } } else { switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28390, 0, 6, 32, 20, 1, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(1, 6, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28396, 0, 6, 32, 20, 1, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(2, 8, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28389, 0, 6, 32, 20, 1, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(1, 7, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28395, 0, 6, 32, 20, 1, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(2, 5, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); - } break; } } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(1, 6, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(2, 8, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(1, 7, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(2, 5, 0, height + 38, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_0); } else { paint_util_push_tunnel_rotated(direction, height + 8, TUNNEL_12); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 56, 0x20); } @@ -315,25 +300,33 @@ static void mini_suspended_rc_track_left_quarter_turn_5(uint8 rideIndex, uint8 t switch (direction) { case 0: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28406, 0, 6, 32, 20, 1, height + 24); - metal_a_supports_paint_setup(1, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28411, 0, 6, 32, 20, 1, height + 24); - metal_a_supports_paint_setup(2, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28416, 0, 6, 32, 20, 1, height + 24); - metal_a_supports_paint_setup(1, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28401, 0, 6, 32, 20, 1, height + 24); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + switch (direction) { + case 0: + case 2: + metal_a_supports_paint_setup(1, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + case 3: metal_a_supports_paint_setup(2, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_0); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -400,21 +393,30 @@ static void mini_suspended_rc_track_left_quarter_turn_5(uint8 rideIndex, uint8 t switch (direction) { case 0: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28402, 6, 0, 20, 32, 1, height + 24); - metal_a_supports_paint_setup(2, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28407, 6, 0, 20, 32, 1, height + 24); - metal_a_supports_paint_setup(1, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28412, 6, 0, 20, 32, 1, height + 24); - metal_a_supports_paint_setup(2, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28397, 6, 0, 20, 32, 1, height + 24); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); + switch (direction) { + case 0: + case 2: + metal_a_supports_paint_setup(2, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + case 3: metal_a_supports_paint_setup(1, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; } + switch (direction) { case 2: paint_util_push_tunnel_right(height, TUNNEL_0); @@ -423,7 +425,6 @@ static void mini_suspended_rc_track_left_quarter_turn_5(uint8 rideIndex, uint8 t paint_util_push_tunnel_left(height, TUNNEL_0); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -444,36 +445,42 @@ static void mini_suspended_rc_track_s_bend_left(uint8 rideIndex, uint8 trackSequ switch (direction) { case 0: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28421, 0, 6, 32, 20, 1, height + 24); - metal_a_supports_paint_setup(1, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28428, 0, 6, 32, 20, 1, height + 24); - metal_a_supports_paint_setup(2, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28424, 0, 6, 32, 20, 1, height + 24); - metal_a_supports_paint_setup(1, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28425, 0, 6, 32, 20, 1, height + 24); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + case 2: + metal_a_supports_paint_setup(1, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + case 3: metal_a_supports_paint_setup(2, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_0); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: switch (direction) { case 0: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28422, 0, 0, 32, 26, 1, height + 24); - metal_a_supports_paint_setup(1, 5, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28427, 0, 0, 32, 26, 1, height + 24); - metal_a_supports_paint_setup(2, 6, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28423, 0, 6, 32, 26, 1, height + 24); @@ -482,7 +489,17 @@ static void mini_suspended_rc_track_s_bend_left(uint8 rideIndex, uint8 trackSequ sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28426, 0, 6, 32, 26, 1, height + 24); break; } + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(1, 5, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(2, 6, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); + break; + } + paint_util_set_general_support_height(height + 48, 0x20); break; case 2: @@ -495,35 +512,52 @@ static void mini_suspended_rc_track_s_bend_left(uint8 rideIndex, uint8 trackSequ break; case 2: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28422, 0, 0, 32, 26, 1, height + 24); - metal_a_supports_paint_setup(1, 5, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28427, 0, 0, 32, 26, 1, height + 24); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + switch (direction) { + case 2: + metal_a_supports_paint_setup(1, 5, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: metal_a_supports_paint_setup(2, 6, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 48, 0x20); break; case 3: switch (direction) { case 0: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28424, 0, 6, 32, 20, 1, height + 24); - metal_a_supports_paint_setup(1, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28425, 0, 6, 32, 20, 1, height + 24); - metal_a_supports_paint_setup(2, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28421, 0, 6, 32, 20, 1, height + 24); - metal_a_supports_paint_setup(1, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28428, 0, 6, 32, 20, 1, height + 24); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + case 2: + metal_a_supports_paint_setup(1, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + case 3: metal_a_supports_paint_setup(2, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; } + switch (direction) { case 1: paint_util_push_tunnel_right(height, TUNNEL_0); @@ -532,7 +566,6 @@ static void mini_suspended_rc_track_s_bend_left(uint8 rideIndex, uint8 trackSequ paint_util_push_tunnel_left(height, TUNNEL_0); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -546,36 +579,42 @@ static void mini_suspended_rc_track_s_bend_right(uint8 rideIndex, uint8 trackSeq switch (direction) { case 0: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28417, 0, 6, 32, 20, 1, height + 24); - metal_a_supports_paint_setup(1, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28432, 0, 6, 32, 20, 1, height + 24); - metal_a_supports_paint_setup(2, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28420, 0, 6, 32, 20, 1, height + 24); - metal_a_supports_paint_setup(1, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28429, 0, 6, 32, 20, 1, height + 24); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + case 2: + metal_a_supports_paint_setup(1, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + case 3: metal_a_supports_paint_setup(2, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_0); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: switch (direction) { case 0: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28418, 0, 6, 32, 26, 1, height + 24); - metal_a_supports_paint_setup(1, 8, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28431, 0, 6, 32, 26, 1, height + 24); - metal_a_supports_paint_setup(2, 7, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28419, 0, 0, 32, 26, 1, height + 24); @@ -584,7 +623,17 @@ static void mini_suspended_rc_track_s_bend_right(uint8 rideIndex, uint8 trackSeq sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28430, 0, 0, 32, 26, 1, height + 24); break; } + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(1, 8, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(2, 7, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); + break; + } + paint_util_set_general_support_height(height + 48, 0x20); break; case 2: @@ -597,35 +646,52 @@ static void mini_suspended_rc_track_s_bend_right(uint8 rideIndex, uint8 trackSeq break; case 2: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28418, 0, 6, 32, 26, 1, height + 24); - metal_a_supports_paint_setup(1, 8, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28431, 0, 6, 32, 26, 1, height + 24); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 2: + metal_a_supports_paint_setup(1, 8, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: metal_a_supports_paint_setup(2, 7, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 48, 0x20); break; case 3: switch (direction) { case 0: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28420, 0, 6, 32, 20, 1, height + 24); - metal_a_supports_paint_setup(1, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28429, 0, 6, 32, 20, 1, height + 24); - metal_a_supports_paint_setup(2, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28417, 0, 6, 32, 20, 1, height + 24); - metal_a_supports_paint_setup(1, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28432, 0, 6, 32, 20, 1, height + 24); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + case 2: + metal_a_supports_paint_setup(1, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + case 3: metal_a_supports_paint_setup(2, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; } + switch (direction) { case 1: paint_util_push_tunnel_right(height, TUNNEL_0); @@ -634,7 +700,6 @@ static void mini_suspended_rc_track_s_bend_right(uint8 rideIndex, uint8 trackSeq paint_util_push_tunnel_left(height, TUNNEL_0); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -648,25 +713,33 @@ static void mini_suspended_rc_track_left_quarter_turn_3(uint8 rideIndex, uint8 t switch (direction) { case 0: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28452, 0, 6, 32, 20, 3, height + 24); - metal_a_supports_paint_setup(1, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28455, 0, 6, 32, 20, 3, height + 24); - metal_a_supports_paint_setup(2, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28458, 0, 6, 32, 20, 3, height + 24); - metal_a_supports_paint_setup(1, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28449, 0, 6, 32, 20, 3, height + 24); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + switch (direction) { + case 0: + case 2: + metal_a_supports_paint_setup(1, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + case 3: metal_a_supports_paint_setup(2, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_0); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; case 1: @@ -694,21 +767,30 @@ static void mini_suspended_rc_track_left_quarter_turn_3(uint8 rideIndex, uint8 t switch (direction) { case 0: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28450, 6, 0, 20, 32, 3, height + 24); - metal_a_supports_paint_setup(2, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28453, 6, 0, 20, 32, 3, height + 24); - metal_a_supports_paint_setup(1, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28456, 6, 0, 20, 32, 3, height + 24); - metal_a_supports_paint_setup(2, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28447, 6, 0, 20, 32, 3, height + 24); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); + switch (direction) { + case 0: + case 2: + metal_a_supports_paint_setup(2, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + case 3: metal_a_supports_paint_setup(1, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; } + switch (direction) { case 2: paint_util_push_tunnel_right(height, TUNNEL_0); @@ -717,7 +799,6 @@ static void mini_suspended_rc_track_left_quarter_turn_3(uint8 rideIndex, uint8 t paint_util_push_tunnel_left(height, TUNNEL_0); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; } @@ -738,25 +819,33 @@ static void mini_suspended_rc_track_left_eighth_to_diag(uint8 rideIndex, uint8 t switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28475, 0, 0, 32, 20, 1, height + 24, 0, 6, height + 24); - metal_a_supports_paint_setup(1, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28479, 0, 0, 32, 20, 1, height + 24, 0, 6, height + 24); - metal_a_supports_paint_setup(2, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28483, 0, 0, 32, 20, 1, height + 24, 0, 6, height + 24); - metal_a_supports_paint_setup(1, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28487, 0, 0, 32, 20, 1, height + 24, 0, 6, height + 24); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + switch (direction) { + case 0: + case 2: + metal_a_supports_paint_setup(1, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + case 3: metal_a_supports_paint_setup(2, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_0); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -803,22 +892,34 @@ static void mini_suspended_rc_track_left_eighth_to_diag(uint8 rideIndex, uint8 t switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28478, 0, 0, 16, 16, 1, height + 24, 16, 16, height + 24); - metal_a_supports_paint_setup(1, 3, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28482, 0, 0, 16, 18, 1, height + 24, 0, 16, height + 24); - metal_a_supports_paint_setup(2, 1, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28486, 0, 0, 16, 16, 1, height + 24, 0, 0, height + 24); - metal_a_supports_paint_setup(1, 0, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28490, 0, 0, 16, 16, 1, height + 24, 16, 0, height + 24); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(1, 3, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(2, 1, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(1, 0, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: metal_a_supports_paint_setup(2, 2, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -832,25 +933,33 @@ static void mini_suspended_rc_track_right_eighth_to_diag(uint8 rideIndex, uint8 switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28459, 0, 0, 32, 20, 1, height + 24, 0, 6, height + 24); - metal_a_supports_paint_setup(1, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28463, 0, 0, 32, 20, 1, height + 24, 0, 6, height + 24); - metal_a_supports_paint_setup(2, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28467, 0, 0, 32, 20, 1, height + 24, 0, 6, height + 24); - metal_a_supports_paint_setup(1, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28471, 0, 0, 32, 20, 1, height + 24, 0, 6, height + 24); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + case 2: + metal_a_supports_paint_setup(1, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + case 3: metal_a_supports_paint_setup(2, 4, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_0); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -897,22 +1006,34 @@ static void mini_suspended_rc_track_right_eighth_to_diag(uint8 rideIndex, uint8 switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28462, 0, 0, 16, 16, 1, height + 24, 16, 0, height + 24); - metal_a_supports_paint_setup(1, 1, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28466, 0, 0, 16, 16, 1, height + 24, 0, 0, height + 24); - metal_a_supports_paint_setup(2, 0, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28470, 0, 0, 16, 18, 1, height + 24, 0, 16, height + 24); - metal_a_supports_paint_setup(1, 2, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28474, 0, 0, 16, 16, 1, height + 24, 16, 16, height + 24); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(1, 1, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(2, 0, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(1, 2, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: metal_a_supports_paint_setup(2, 3, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -990,38 +1111,34 @@ static void mini_suspended_rc_track_diag_flat(uint8 rideIndex, uint8 trackSequen case 3: if (track_element_is_lift_hill(mapElement)) { switch (direction) { - case 0: - metal_a_supports_paint_setup(1, 1, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28508, -16, -16, 32, 32, 1, height + 24, -16, -16, height + 24); - metal_a_supports_paint_setup(2, 0, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(1, 2, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(2, 3, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; } } else { switch (direction) { - case 0: - metal_a_supports_paint_setup(1, 1, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28492, -16, -16, 32, 32, 1, height + 24, -16, -16, height + 24); - metal_a_supports_paint_setup(2, 0, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(1, 2, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(2, 3, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); break; } } + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(1, 1, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(2, 0, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(1, 2, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(2, 3, 0, height + 30, gTrackColours[SCHEME_SUPPORTS]); + break; + } + paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -1085,38 +1202,34 @@ static void mini_suspended_rc_track_diag_25_deg_up(uint8 rideIndex, uint8 trackS case 3: if (track_element_is_lift_hill(mapElement)) { switch (direction) { - case 0: - metal_a_supports_paint_setup(1, 1, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28520, -16, -16, 32, 32, 1, height + 24, -16, -16, height + 40); - metal_a_supports_paint_setup(2, 0, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(1, 2, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(2, 3, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; } } else { switch (direction) { - case 0: - metal_a_supports_paint_setup(1, 1, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28504, -16, -16, 32, 32, 1, height + 24, -16, -16, height + 40); - metal_a_supports_paint_setup(2, 0, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(1, 2, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(2, 3, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; } } + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(1, 1, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(2, 0, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(1, 2, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(2, 3, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); + break; + } + paint_util_set_general_support_height(height + 72, 0x20); break; } @@ -1180,38 +1293,34 @@ static void mini_suspended_rc_track_diag_flat_to_25_deg_up(uint8 rideIndex, uint case 3: if (track_element_is_lift_hill(mapElement)) { switch (direction) { - case 0: - metal_a_supports_paint_setup(1, 1, 0, height + 34, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28512, -16, -16, 32, 32, 1, height + 24, -16, -16, height + 32); - metal_a_supports_paint_setup(2, 0, 0, height + 34, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(1, 2, 0, height + 34, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(2, 3, 0, height + 34, gTrackColours[SCHEME_SUPPORTS]); break; } } else { switch (direction) { - case 0: - metal_a_supports_paint_setup(1, 1, 0, height + 34, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28496, -16, -16, 32, 32, 1, height + 24, -16, -16, height + 32); - metal_a_supports_paint_setup(2, 0, 0, height + 34, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(1, 2, 0, height + 34, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(2, 3, 0, height + 34, gTrackColours[SCHEME_SUPPORTS]); break; } } + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(1, 1, 0, height + 34, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(2, 0, 0, height + 34, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(1, 2, 0, height + 34, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(2, 3, 0, height + 34, gTrackColours[SCHEME_SUPPORTS]); + break; + } + paint_util_set_general_support_height(height + 64, 0x20); break; } @@ -1275,38 +1384,34 @@ static void mini_suspended_rc_track_diag_25_deg_up_to_flat(uint8 rideIndex, uint case 3: if (track_element_is_lift_hill(mapElement)) { switch (direction) { - case 0: - metal_b_supports_paint_setup(1, 1, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28516, -16, -16, 32, 32, 1, height + 24, -16, -16, height + 32); - metal_a_supports_paint_setup(2, 0, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(1, 2, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(2, 3, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; } } else { switch (direction) { - case 0: - metal_b_supports_paint_setup(1, 1, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28500, -16, -16, 32, 32, 1, height + 24, -16, -16, height + 32); - metal_a_supports_paint_setup(2, 0, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(1, 2, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(2, 3, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; } } + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_b_supports_paint_setup(1, 1, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(2, 0, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(1, 2, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(2, 3, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + break; + } + paint_util_set_general_support_height(height + 72, 0x20); break; } @@ -1370,38 +1475,34 @@ static void mini_suspended_rc_track_diag_25_deg_down(uint8 rideIndex, uint8 trac case 3: if (track_element_is_lift_hill(mapElement)) { switch (direction) { - case 0: - metal_a_supports_paint_setup(1, 1, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28522, -16, -16, 32, 32, 1, height + 24, -16, -16, height + 40); - metal_a_supports_paint_setup(2, 0, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(1, 2, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(2, 3, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; } } else { switch (direction) { - case 0: - metal_a_supports_paint_setup(1, 1, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28506, -16, -16, 32, 32, 1, height + 24, -16, -16, height + 40); - metal_a_supports_paint_setup(2, 0, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(1, 2, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(2, 3, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; } } + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(1, 1, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(2, 0, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(1, 2, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(2, 3, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); + break; + } + paint_util_set_general_support_height(height + 72, 0x20); break; } @@ -1465,38 +1566,34 @@ static void mini_suspended_rc_track_diag_flat_to_25_deg_down(uint8 rideIndex, ui case 3: if (track_element_is_lift_hill(mapElement)) { switch (direction) { - case 0: - metal_a_supports_paint_setup(1, 1, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28518, -16, -16, 32, 32, 1, height + 24, -16, -16, height + 32); - metal_a_supports_paint_setup(2, 0, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(1, 2, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(2, 3, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; } } else { switch (direction) { - case 0: - metal_a_supports_paint_setup(1, 1, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28502, -16, -16, 32, 32, 1, height + 24, -16, -16, height + 32); - metal_a_supports_paint_setup(2, 0, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(1, 2, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(2, 3, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; } } + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(1, 1, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(2, 0, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(1, 2, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(2, 3, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + break; + } + paint_util_set_general_support_height(height + 72, 0x20); break; } @@ -1560,38 +1657,34 @@ static void mini_suspended_rc_track_diag_25_deg_down_to_flat(uint8 rideIndex, ui case 3: if (track_element_is_lift_hill(mapElement)) { switch (direction) { - case 0: - metal_a_supports_paint_setup(1, 1, 0, height + 34, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28514, -16, -16, 32, 32, 1, height + 24, -16, -16, height + 32); - metal_a_supports_paint_setup(2, 0, 0, height + 34, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(1, 2, 0, height + 34, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(2, 3, 0, height + 34, gTrackColours[SCHEME_SUPPORTS]); break; } } else { switch (direction) { - case 0: - metal_a_supports_paint_setup(1, 1, 0, height + 34, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 28498, -16, -16, 32, 32, 1, height + 24, -16, -16, height + 32); - metal_a_supports_paint_setup(2, 0, 0, height + 34, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(1, 2, 0, height + 34, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(2, 3, 0, height + 34, gTrackColours[SCHEME_SUPPORTS]); break; } } + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(1, 1, 0, height + 34, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(2, 0, 0, height + 34, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(1, 2, 0, height + 34, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(2, 3, 0, height + 34, gTrackColours[SCHEME_SUPPORTS]); + break; + } + paint_util_set_general_support_height(height + 64, 0x20); break; } diff --git a/src/ride/coaster/multi_dimension_roller_coaster.c b/src/ride/coaster/multi_dimension_roller_coaster.c index dad51ab0fc..4eea05edbc 100644 --- a/src/ride/coaster/multi_dimension_roller_coaster.c +++ b/src/ride/coaster/multi_dimension_roller_coaster.c @@ -73,15 +73,18 @@ static void multi_dimension_rc_track_flat(uint8 rideIndex, uint8 trackSequence, sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26228, 0, 0, 32, 20, 1, height + 24, 0, 6, height + 22); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); if (track_paint_util_should_paint_supports(gPaintMapPosition)) { metal_a_supports_paint_setup(11, 4, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); } + paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); } } +/** rct2: 0x00792F98, 0x00792FA8, 0x00792FB8 */ static void multi_dimension_rc_track_station(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { static const uint32 imageIds[4][3] = { @@ -169,35 +172,41 @@ static void multi_dimension_rc_track_25_deg_up(uint8 rideIndex, uint8 trackSeque switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26253, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26254, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26255, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26256, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 6, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 8, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 7, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 5, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_7); } else { paint_util_push_tunnel_rotated(direction, height + 8, TUNNEL_8); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 56, 0x20); } } @@ -307,35 +316,41 @@ static void multi_dimension_rc_track_flat_to_25_deg_up(uint8 rideIndex, uint8 tr switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26245, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26246, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26247, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26248, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 6, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 8, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 7, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 5, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); } else { paint_util_push_tunnel_rotated(direction, height, TUNNEL_8); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); } } @@ -431,37 +446,43 @@ static void multi_dimension_rc_track_60_deg_up_to_25_deg_up(uint8 rideIndex, uin switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26263, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 56); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 68, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26267, 0, 0, 32, 10, 49, height + 24, 0, 10, height + 6); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26264, 0, 0, 32, 2, 49, height + 24, 0, 4, height + 6); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 68, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26268, 0, 0, 32, 10, 49, height + 24, 0, 10, height + 6); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26265, 0, 0, 32, 2, 49, height + 24, 0, 4, height + 6); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 68, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26266, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 56); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 68, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 6, 0, height + 68, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 8, 0, height + 68, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 7, 0, height + 68, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 5, 0, height + 68, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_7); } else { paint_util_push_tunnel_rotated(direction, height + 24, TUNNEL_8); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 72, 0x20); } } @@ -518,35 +539,41 @@ static void multi_dimension_rc_track_25_deg_up_to_flat(uint8 rideIndex, uint8 tr switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26249, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26250, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26251, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26252, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 6, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 8, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 7, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 5, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_6); } else { paint_util_push_tunnel_rotated(direction, height + 8, TUNNEL_14); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 40, 0x20); } } @@ -719,11 +746,13 @@ static void multi_dimension_rc_track_left_quarter_turn_5(uint8 rideIndex, uint8 sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26305, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 22); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; case 1: @@ -801,7 +830,10 @@ static void multi_dimension_rc_track_left_quarter_turn_5(uint8 rideIndex, uint8 sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26301, 0, 0, 20, 32, 3, height + 24, 6, 0, height + 22); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 2: paint_util_push_tunnel_right(height, TUNNEL_6); @@ -810,7 +842,6 @@ static void multi_dimension_rc_track_left_quarter_turn_5(uint8 rideIndex, uint8 paint_util_push_tunnel_left(height, TUNNEL_6); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; } @@ -865,11 +896,13 @@ static void multi_dimension_rc_track_flat_to_left_bank(uint8 rideIndex, uint8 tr sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26276, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 22); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); if (track_paint_util_should_paint_supports(gPaintMapPosition)) { metal_a_supports_paint_setup(11, 4, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); } + paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); } } @@ -915,11 +948,13 @@ static void multi_dimension_rc_track_flat_to_right_bank(uint8 rideIndex, uint8 t sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26280, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 22); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); if (track_paint_util_should_paint_supports(gPaintMapPosition)) { metal_a_supports_paint_setup(11, 4, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); } + paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); } } @@ -965,11 +1000,13 @@ static void multi_dimension_rc_track_left_bank_to_flat(uint8 rideIndex, uint8 tr sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26278, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 22); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); if (track_paint_util_should_paint_supports(gPaintMapPosition)) { metal_a_supports_paint_setup(11, 4, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); } + paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); } } @@ -1015,11 +1052,13 @@ static void multi_dimension_rc_track_right_bank_to_flat(uint8 rideIndex, uint8 t sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26274, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 22); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); if (track_paint_util_should_paint_supports(gPaintMapPosition)) { metal_a_supports_paint_setup(11, 4, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); } + paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); } } @@ -1158,11 +1197,13 @@ static void multi_dimension_rc_track_banked_left_quarter_turn_5(uint8 rideIndex, sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26349, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; case 1: @@ -1240,7 +1281,10 @@ static void multi_dimension_rc_track_banked_left_quarter_turn_5(uint8 rideIndex, sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26345, 0, 0, 20, 32, 3, height + 24, 6, 0, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 2: paint_util_push_tunnel_right(height, TUNNEL_6); @@ -1249,7 +1293,6 @@ static void multi_dimension_rc_track_banked_left_quarter_turn_5(uint8 rideIndex, paint_util_push_tunnel_left(height, TUNNEL_6); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; } @@ -1297,35 +1340,41 @@ static void multi_dimension_rc_track_left_bank_to_25_deg_up(uint8 rideIndex, uin switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26281, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26282, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26283, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26284, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 6, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 8, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 7, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 5, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); } else { paint_util_push_tunnel_rotated(direction, height, TUNNEL_8); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); } } @@ -1364,35 +1413,41 @@ static void multi_dimension_rc_track_right_bank_to_25_deg_up(uint8 rideIndex, ui switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26285, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26286, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26287, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26288, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 6, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 8, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 7, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 5, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); } else { paint_util_push_tunnel_rotated(direction, height, TUNNEL_8); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); } } @@ -1431,35 +1486,41 @@ static void multi_dimension_rc_track_25_deg_up_to_left_bank(uint8 rideIndex, uin switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26289, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26290, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26291, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26292, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 6, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 8, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 7, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 5, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_6); } else { paint_util_push_tunnel_rotated(direction, height + 8, TUNNEL_14); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 40, 0x20); } } @@ -1498,35 +1559,41 @@ static void multi_dimension_rc_track_25_deg_up_to_right_bank(uint8 rideIndex, ui switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26293, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 6, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26294, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 8, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26295, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 7, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26296, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 32); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(11, 5, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 6, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 8, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 7, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 5, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_6); } else { paint_util_push_tunnel_rotated(direction, height + 8, TUNNEL_14); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 40, 0x20); } } @@ -1594,11 +1661,13 @@ static void multi_dimension_rc_track_left_bank(uint8 rideIndex, uint8 trackSeque sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26300, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 22); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); if (track_paint_util_should_paint_supports(gPaintMapPosition)) { metal_a_supports_paint_setup(11, 4, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); } + paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); } } @@ -1721,22 +1790,22 @@ static void multi_dimension_rc_track_s_bend_left(uint8 rideIndex, uint8 trackSeq sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26236, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 22); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; case 1: switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26230, 0, 0, 32, 26, 3, height + 24, 0, 0, height + 22); - metal_a_supports_paint_setup(11, 5, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26234, 0, 0, 32, 26, 3, height + 24, 0, 0, height + 22); - metal_a_supports_paint_setup(11, 6, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26231, 0, 0, 32, 26, 3, height + 24, 0, 6, height + 22); @@ -1745,7 +1814,17 @@ static void multi_dimension_rc_track_s_bend_left(uint8 rideIndex, uint8 trackSeq sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26235, 0, 0, 32, 26, 3, height + 24, 0, 6, height + 22); break; } + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 5, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 6, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + break; + } + paint_util_set_general_support_height(height + 32, 0x20); break; case 2: @@ -1758,14 +1837,22 @@ static void multi_dimension_rc_track_s_bend_left(uint8 rideIndex, uint8 trackSeq break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26230, 0, 0, 32, 26, 3, height + 24, 0, 0, height + 22); - metal_a_supports_paint_setup(11, 5, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26234, 0, 0, 32, 26, 3, height + 24, 0, 0, height + 22); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + switch (direction) { + case 2: + metal_a_supports_paint_setup(11, 5, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: metal_a_supports_paint_setup(11, 6, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 32, 0x20); break; case 3: @@ -1783,7 +1870,10 @@ static void multi_dimension_rc_track_s_bend_left(uint8 rideIndex, uint8 trackSeq sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26233, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 22); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 1: paint_util_push_tunnel_right(height, TUNNEL_6); @@ -1792,7 +1882,6 @@ static void multi_dimension_rc_track_s_bend_left(uint8 rideIndex, uint8 trackSeq paint_util_push_tunnel_left(height, TUNNEL_6); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; } @@ -1911,22 +2000,22 @@ static void multi_dimension_rc_track_s_bend_right(uint8 rideIndex, uint8 trackSe sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26244, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 22); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; case 1: switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26238, 0, 0, 32, 26, 3, height + 24, 0, 6, height + 22); - metal_a_supports_paint_setup(11, 8, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26242, 0, 0, 32, 26, 3, height + 24, 0, 6, height + 22); - metal_a_supports_paint_setup(11, 7, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26239, 0, 0, 32, 26, 3, height + 24, 0, 0, height + 22); @@ -1935,7 +2024,17 @@ static void multi_dimension_rc_track_s_bend_right(uint8 rideIndex, uint8 trackSe sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26243, 0, 0, 32, 26, 3, height + 24, 0, 0, height + 22); break; } + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 8, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 7, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + break; + } + paint_util_set_general_support_height(height + 32, 0x20); break; case 2: @@ -1948,14 +2047,22 @@ static void multi_dimension_rc_track_s_bend_right(uint8 rideIndex, uint8 trackSe break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26238, 0, 0, 32, 26, 3, height + 24, 0, 6, height + 22); - metal_a_supports_paint_setup(11, 8, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26242, 0, 0, 32, 26, 3, height + 24, 0, 6, height + 22); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 2: + metal_a_supports_paint_setup(11, 8, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: metal_a_supports_paint_setup(11, 7, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 32, 0x20); break; case 3: @@ -1973,7 +2080,10 @@ static void multi_dimension_rc_track_s_bend_right(uint8 rideIndex, uint8 trackSe sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26241, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 22); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 1: paint_util_push_tunnel_right(height, TUNNEL_6); @@ -1982,7 +2092,6 @@ static void multi_dimension_rc_track_s_bend_right(uint8 rideIndex, uint8 trackSe paint_util_push_tunnel_left(height, TUNNEL_6); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; } @@ -2082,11 +2191,13 @@ static void multi_dimension_rc_track_left_quarter_turn_3(uint8 rideIndex, uint8 sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26323, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 22); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; case 1: @@ -2125,7 +2236,10 @@ static void multi_dimension_rc_track_left_quarter_turn_3(uint8 rideIndex, uint8 sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26321, 0, 0, 20, 32, 3, height + 24, 6, 0, height + 22); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 2: paint_util_push_tunnel_right(height, TUNNEL_6); @@ -2134,7 +2248,6 @@ static void multi_dimension_rc_track_left_quarter_turn_3(uint8 rideIndex, uint8 paint_util_push_tunnel_left(height, TUNNEL_6); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; } @@ -2243,11 +2356,13 @@ static void multi_dimension_rc_track_left_quarter_turn_3_bank(uint8 rideIndex, u sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26335, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 22); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; case 1: @@ -2286,7 +2401,10 @@ static void multi_dimension_rc_track_left_quarter_turn_3_bank(uint8 rideIndex, u sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26333, 0, 0, 20, 32, 3, height + 24, 6, 0, height + 22); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 2: paint_util_push_tunnel_right(height, TUNNEL_6); @@ -2295,7 +2413,6 @@ static void multi_dimension_rc_track_left_quarter_turn_3_bank(uint8 rideIndex, u paint_util_push_tunnel_left(height, TUNNEL_6); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; } @@ -3896,11 +4013,13 @@ static void multi_dimension_rc_track_brakes(uint8 rideIndex, uint8 trackSequence sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26550, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); if (track_paint_util_should_paint_supports(gPaintMapPosition)) { metal_a_supports_paint_setup(11, 4, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); } + paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); } } @@ -4320,11 +4439,13 @@ static void multi_dimension_rc_track_left_eighth_to_diag(uint8 rideIndex, uint8 sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26417, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 22); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; case 1: @@ -4371,22 +4492,34 @@ static void multi_dimension_rc_track_left_eighth_to_diag(uint8 rideIndex, uint8 switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26408, 0, 0, 16, 16, 3, height + 24, 16, 16, height + 22); - metal_a_supports_paint_setup(11, 3, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26412, 0, 0, 16, 18, 3, height + 24, 0, 16, height + 22); - metal_a_supports_paint_setup(11, 1, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26416, 0, 0, 16, 16, 3, height + 24, 0, 0, height + 22); - metal_a_supports_paint_setup(11, 0, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26420, 0, 0, 16, 16, 3, height + 24, 16, 0, height + 22); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 3, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 1, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 0, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: metal_a_supports_paint_setup(11, 2, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 32, 0x20); break; } @@ -4500,11 +4633,13 @@ static void multi_dimension_rc_track_right_eighth_to_diag(uint8 rideIndex, uint8 sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26401, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 22); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; case 1: @@ -4551,22 +4686,34 @@ static void multi_dimension_rc_track_right_eighth_to_diag(uint8 rideIndex, uint8 switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26392, 0, 0, 16, 16, 3, height + 24, 16, 0, height + 22); - metal_a_supports_paint_setup(11, 1, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26396, 0, 0, 16, 16, 3, height + 24, 0, 0, height + 22); - metal_a_supports_paint_setup(11, 0, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26400, 0, 0, 16, 18, 3, height + 24, 0, 16, height + 22); - metal_a_supports_paint_setup(11, 2, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26404, 0, 0, 16, 16, 3, height + 24, 16, 16, height + 22); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 1, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 0, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 2, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: metal_a_supports_paint_setup(11, 3, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 32, 0x20); break; } @@ -4694,11 +4841,13 @@ static void multi_dimension_rc_track_left_eighth_bank_to_diag(uint8 rideIndex, u sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26449, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 22); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; case 1: @@ -4745,22 +4894,34 @@ static void multi_dimension_rc_track_left_eighth_bank_to_diag(uint8 rideIndex, u switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26440, 0, 0, 16, 16, 3, height + 24, 16, 16, height + 22); - metal_a_supports_paint_setup(11, 3, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26444, 0, 0, 16, 18, 3, height + 24, 0, 16, height + 22); - metal_a_supports_paint_setup(11, 1, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26448, 0, 0, 16, 16, 3, height + 24, 0, 0, height + 22); - metal_a_supports_paint_setup(11, 0, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26452, 0, 0, 16, 16, 3, height + 24, 16, 0, height + 22); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 3, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 1, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 0, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: metal_a_supports_paint_setup(11, 2, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 32, 0x20); break; } @@ -4874,11 +5035,13 @@ static void multi_dimension_rc_track_right_eighth_bank_to_diag(uint8 rideIndex, sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26433, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 22); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; case 1: @@ -4925,22 +5088,34 @@ static void multi_dimension_rc_track_right_eighth_bank_to_diag(uint8 rideIndex, switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26424, 0, 0, 16, 16, 3, height + 24, 16, 0, height + 22); - metal_a_supports_paint_setup(11, 1, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26428, 0, 0, 16, 16, 3, height + 24, 0, 0, height + 22); - metal_a_supports_paint_setup(11, 0, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26432, 0, 0, 16, 18, 3, height + 24, 0, 16, height + 22); - metal_a_supports_paint_setup(11, 2, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26436, 0, 0, 16, 16, 3, height + 24, 16, 16, height + 22); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 1, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 0, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 2, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: metal_a_supports_paint_setup(11, 3, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 32, 0x20); break; } @@ -5111,38 +5286,34 @@ static void multi_dimension_rc_track_diag_flat(uint8 rideIndex, uint8 trackSeque case 3: if (track_element_is_lift_hill(mapElement)) { switch (direction) { - case 0: - metal_a_supports_paint_setup(11, 1, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26482, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 22); - metal_a_supports_paint_setup(11, 0, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(11, 2, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(11, 3, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; } } else { switch (direction) { - case 0: - metal_a_supports_paint_setup(11, 1, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26454, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 22); - metal_a_supports_paint_setup(11, 0, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(11, 2, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(11, 3, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; } } + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 1, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 0, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 2, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 3, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + break; + } + paint_util_set_general_support_height(height + 32, 0x20); break; } @@ -5299,38 +5470,34 @@ static void multi_dimension_rc_track_diag_25_deg_up(uint8 rideIndex, uint8 track case 3: if (track_element_is_lift_hill(mapElement)) { switch (direction) { - case 0: - metal_a_supports_paint_setup(11, 1, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26494, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 40); - metal_a_supports_paint_setup(11, 0, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(11, 2, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(11, 3, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); break; } } else { switch (direction) { - case 0: - metal_a_supports_paint_setup(11, 1, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26466, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 40); - metal_a_supports_paint_setup(11, 0, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(11, 2, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(11, 3, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); break; } } + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 1, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 0, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 2, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 3, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); + break; + } + paint_util_set_general_support_height(height + 56, 0x20); break; } @@ -5419,12 +5586,18 @@ static void multi_dimension_rc_track_diag_60_deg_up(uint8 rideIndex, uint8 track paint_util_set_general_support_height(height + 104, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26478, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 24); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_b_supports_paint_setup(11, 1, 32, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26478, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 24); metal_b_supports_paint_setup(11, 0, 36, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -5434,7 +5607,7 @@ static void multi_dimension_rc_track_diag_60_deg_up(uint8 rideIndex, uint8 track metal_b_supports_paint_setup(11, 3, 36, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 104, 0x20); break; } @@ -5591,38 +5764,34 @@ static void multi_dimension_rc_track_diag_flat_to_25_deg_up(uint8 rideIndex, uin case 3: if (track_element_is_lift_hill(mapElement)) { switch (direction) { - case 0: - metal_a_supports_paint_setup(11, 1, 0, height + 40, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26486, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 32); - metal_a_supports_paint_setup(11, 0, 0, height + 40, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(11, 2, 0, height + 40, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(11, 3, 0, height + 40, gTrackColours[SCHEME_SUPPORTS]); break; } } else { switch (direction) { - case 0: - metal_a_supports_paint_setup(11, 1, 0, height + 40, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26458, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 32); - metal_a_supports_paint_setup(11, 0, 0, height + 40, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(11, 2, 0, height + 40, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(11, 3, 0, height + 40, gTrackColours[SCHEME_SUPPORTS]); break; } } + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 1, 0, height + 40, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 0, 0, height + 40, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 2, 0, height + 40, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 3, 0, height + 40, gTrackColours[SCHEME_SUPPORTS]); + break; + } + paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -5711,12 +5880,18 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_60_deg_up(uint8 rideIndex paint_util_set_general_support_height(height + 72, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26470, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 56); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_b_supports_paint_setup(11, 1, 16, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26470, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 56); metal_b_supports_paint_setup(11, 0, 16, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -5726,7 +5901,7 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_60_deg_up(uint8 rideIndex metal_b_supports_paint_setup(11, 3, 16, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 72, 0x20); break; } @@ -5815,12 +5990,18 @@ static void multi_dimension_rc_track_diag_60_deg_up_to_25_deg_up(uint8 rideIndex paint_util_set_general_support_height(height + 72, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26474, -16, -16, 16, 16, 3, height + 24, 0, 0, height + 56); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_b_supports_paint_setup(11, 1, 21, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26474, -16, -16, 16, 16, 3, height + 24, 0, 0, height + 56); metal_b_supports_paint_setup(11, 0, 21, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -5830,7 +6011,7 @@ static void multi_dimension_rc_track_diag_60_deg_up_to_25_deg_up(uint8 rideIndex metal_b_supports_paint_setup(11, 3, 21, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 72, 0x20); break; } @@ -5987,38 +6168,34 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_flat(uint8 rideIndex, uin case 3: if (track_element_is_lift_hill(mapElement)) { switch (direction) { - case 0: - metal_a_supports_paint_setup(11, 1, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26490, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 32); - metal_a_supports_paint_setup(11, 0, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(11, 2, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(11, 3, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; } } else { switch (direction) { - case 0: - metal_a_supports_paint_setup(11, 1, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26462, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 32); - metal_a_supports_paint_setup(11, 0, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(11, 2, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(11, 3, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; } } + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(11, 1, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(11, 0, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(11, 2, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(11, 3, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); + break; + } + paint_util_set_general_support_height(height + 56, 0x20); break; } @@ -6149,12 +6326,18 @@ static void multi_dimension_rc_track_diag_25_deg_down(uint8 rideIndex, uint8 tra paint_util_set_general_support_height(height + 56, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26468, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 40); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(11, 1, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26468, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 40); metal_a_supports_paint_setup(11, 0, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -6164,7 +6347,7 @@ static void multi_dimension_rc_track_diag_25_deg_down(uint8 rideIndex, uint8 tra metal_a_supports_paint_setup(11, 3, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 56, 0x20); break; } @@ -6253,12 +6436,18 @@ static void multi_dimension_rc_track_diag_60_deg_down(uint8 rideIndex, uint8 tra paint_util_set_general_support_height(height + 104, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26480, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 88); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_b_supports_paint_setup(11, 1, 24, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26480, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 88); metal_b_supports_paint_setup(11, 0, 28, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -6268,7 +6457,7 @@ static void multi_dimension_rc_track_diag_60_deg_down(uint8 rideIndex, uint8 tra metal_b_supports_paint_setup(11, 3, 28, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 104, 0x20); break; } @@ -6399,12 +6588,18 @@ static void multi_dimension_rc_track_diag_flat_to_25_deg_down(uint8 rideIndex, u paint_util_set_general_support_height(height + 56, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26464, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 32); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(11, 1, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26464, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 32); metal_a_supports_paint_setup(11, 0, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -6414,7 +6609,7 @@ static void multi_dimension_rc_track_diag_flat_to_25_deg_down(uint8 rideIndex, u metal_a_supports_paint_setup(11, 3, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 56, 0x20); break; } @@ -6503,12 +6698,18 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_60_deg_down(uint8 rideI paint_util_set_general_support_height(height + 72, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26476, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 56); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_b_supports_paint_setup(11, 1, 17, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26476, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 56); metal_b_supports_paint_setup(11, 0, 17, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -6518,7 +6719,7 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_60_deg_down(uint8 rideI metal_b_supports_paint_setup(11, 3, 17, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 72, 0x20); break; } @@ -6607,12 +6808,18 @@ static void multi_dimension_rc_track_diag_60_deg_down_to_25_deg_down(uint8 rideI paint_util_set_general_support_height(height + 72, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26472, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 56); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_b_supports_paint_setup(11, 1, 8, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26472, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 56); metal_b_supports_paint_setup(11, 0, 8, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -6622,7 +6829,7 @@ static void multi_dimension_rc_track_diag_60_deg_down_to_25_deg_down(uint8 rideI metal_b_supports_paint_setup(11, 3, 8, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 72, 0x20); break; } @@ -6753,12 +6960,18 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_flat(uint8 rideIndex, u paint_util_set_general_support_height(height + 48, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26460, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 32); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(11, 1, 0, height + 40, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26460, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 32); metal_a_supports_paint_setup(11, 0, 0, height + 40, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -6768,7 +6981,7 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_flat(uint8 rideIndex, u metal_a_supports_paint_setup(11, 3, 0, height + 40, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -6858,12 +7071,18 @@ static void multi_dimension_rc_track_diag_flat_to_left_bank(uint8 rideIndex, uin paint_util_set_general_support_height(height + 32, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26502, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 22); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(11, 1, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26502, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 22); metal_a_supports_paint_setup(11, 0, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -6873,7 +7092,7 @@ static void multi_dimension_rc_track_diag_flat_to_left_bank(uint8 rideIndex, uin metal_a_supports_paint_setup(11, 3, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 32, 0x20); break; } @@ -6963,12 +7182,18 @@ static void multi_dimension_rc_track_diag_flat_to_right_bank(uint8 rideIndex, ui paint_util_set_general_support_height(height + 32, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26506, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 22); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(11, 1, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26506, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 22); metal_a_supports_paint_setup(11, 0, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -6978,7 +7203,7 @@ static void multi_dimension_rc_track_diag_flat_to_right_bank(uint8 rideIndex, ui metal_a_supports_paint_setup(11, 3, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 32, 0x20); break; } @@ -7068,12 +7293,18 @@ static void multi_dimension_rc_track_diag_left_bank_to_flat(uint8 rideIndex, uin paint_util_set_general_support_height(height + 32, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26508, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 22); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(11, 1, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26508, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 22); metal_a_supports_paint_setup(11, 0, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -7083,7 +7314,7 @@ static void multi_dimension_rc_track_diag_left_bank_to_flat(uint8 rideIndex, uin metal_a_supports_paint_setup(11, 3, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 32, 0x20); break; } @@ -7173,12 +7404,18 @@ static void multi_dimension_rc_track_diag_right_bank_to_flat(uint8 rideIndex, ui paint_util_set_general_support_height(height + 32, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26504, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 22); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(11, 1, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26504, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 22); metal_a_supports_paint_setup(11, 0, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -7188,7 +7425,7 @@ static void multi_dimension_rc_track_diag_right_bank_to_flat(uint8 rideIndex, ui metal_a_supports_paint_setup(11, 3, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 32, 0x20); break; } @@ -7278,12 +7515,18 @@ static void multi_dimension_rc_track_diag_left_bank_to_25_deg_up(uint8 rideIndex paint_util_set_general_support_height(height + 48, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26518, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 32); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(11, 1, 0, height + 40, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26518, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 32); metal_a_supports_paint_setup(11, 0, 0, height + 40, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -7293,7 +7536,7 @@ static void multi_dimension_rc_track_diag_left_bank_to_25_deg_up(uint8 rideIndex metal_a_supports_paint_setup(11, 3, 0, height + 40, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -7383,12 +7626,18 @@ static void multi_dimension_rc_track_diag_right_bank_to_25_deg_up(uint8 rideInde paint_util_set_general_support_height(height + 48, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26522, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 32); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(11, 1, 0, height + 40, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26522, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 32); metal_a_supports_paint_setup(11, 0, 0, height + 40, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -7398,7 +7647,7 @@ static void multi_dimension_rc_track_diag_right_bank_to_25_deg_up(uint8 rideInde metal_a_supports_paint_setup(11, 3, 0, height + 40, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -7488,12 +7737,18 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_left_bank(uint8 rideIndex paint_util_set_general_support_height(height + 56, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26510, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 32); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(11, 1, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26510, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 32); metal_a_supports_paint_setup(11, 0, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -7503,7 +7758,7 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_left_bank(uint8 rideIndex metal_a_supports_paint_setup(11, 3, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 56, 0x20); break; } @@ -7593,12 +7848,18 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_right_bank(uint8 rideInde paint_util_set_general_support_height(height + 56, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26514, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 32); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(11, 1, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26514, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 32); metal_a_supports_paint_setup(11, 0, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -7608,7 +7869,7 @@ static void multi_dimension_rc_track_diag_25_deg_up_to_right_bank(uint8 rideInde metal_a_supports_paint_setup(11, 3, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 56, 0x20); break; } @@ -7698,12 +7959,18 @@ static void multi_dimension_rc_track_diag_left_bank_to_25_deg_down(uint8 rideInd paint_util_set_general_support_height(height + 56, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26516, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 32); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(11, 1, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26516, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 32); metal_a_supports_paint_setup(11, 0, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -7713,7 +7980,7 @@ static void multi_dimension_rc_track_diag_left_bank_to_25_deg_down(uint8 rideInd metal_a_supports_paint_setup(11, 3, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 56, 0x20); break; } @@ -7803,12 +8070,18 @@ static void multi_dimension_rc_track_diag_right_bank_to_25_deg_down(uint8 rideIn paint_util_set_general_support_height(height + 56, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26512, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 32); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(11, 1, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26512, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 32); metal_a_supports_paint_setup(11, 0, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -7818,7 +8091,7 @@ static void multi_dimension_rc_track_diag_right_bank_to_25_deg_down(uint8 rideIn metal_a_supports_paint_setup(11, 3, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 56, 0x20); break; } @@ -7908,12 +8181,18 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_left_bank(uint8 rideInd paint_util_set_general_support_height(height + 48, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26524, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 32); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(11, 1, 0, height + 40, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26524, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 32); metal_a_supports_paint_setup(11, 0, 0, height + 40, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -7923,7 +8202,7 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_left_bank(uint8 rideInd metal_a_supports_paint_setup(11, 3, 0, height + 40, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -8013,12 +8292,18 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_right_bank(uint8 rideIn paint_util_set_general_support_height(height + 48, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26520, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 32); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(11, 1, 0, height + 40, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26520, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 32); metal_a_supports_paint_setup(11, 0, 0, height + 40, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -8028,7 +8313,7 @@ static void multi_dimension_rc_track_diag_25_deg_down_to_right_bank(uint8 rideIn metal_a_supports_paint_setup(11, 3, 0, height + 40, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -8117,12 +8402,18 @@ static void multi_dimension_rc_track_diag_left_bank(uint8 rideIndex, uint8 track paint_util_set_general_support_height(height + 32, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26498, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 22); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(11, 1, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26498, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 22); metal_a_supports_paint_setup(11, 0, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -8132,7 +8423,7 @@ static void multi_dimension_rc_track_diag_left_bank(uint8 rideIndex, uint8 track metal_a_supports_paint_setup(11, 3, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 32, 0x20); break; } @@ -8221,12 +8512,18 @@ static void multi_dimension_rc_track_diag_right_bank(uint8 rideIndex, uint8 trac paint_util_set_general_support_height(height + 32, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26500, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 22); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(11, 1, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26500, -16, -16, 32, 32, 3, height + 24, -16, -16, height + 22); metal_a_supports_paint_setup(11, 0, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -8236,7 +8533,7 @@ static void multi_dimension_rc_track_diag_right_bank(uint8 rideIndex, uint8 trac metal_a_supports_paint_setup(11, 3, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 32, 0x20); break; } @@ -8303,7 +8600,10 @@ static void multi_dimension_rc_track_left_flyer_twist_up(uint8 rideIndex, uint8 sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26371, 0, 6, 32, 20, 3, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 1: paint_util_push_tunnel_right(height, TUNNEL_6); @@ -8312,7 +8612,6 @@ static void multi_dimension_rc_track_left_flyer_twist_up(uint8 rideIndex, uint8 paint_util_push_tunnel_left(height, TUNNEL_6); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; } @@ -8373,7 +8672,10 @@ static void multi_dimension_rc_track_left_flyer_twist_up(uint8 rideIndex, uint8 sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26371, 0, 6, 32, 20, 3, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 1: paint_util_push_tunnel_right(height, TUNNEL_6); @@ -8382,7 +8684,6 @@ static void multi_dimension_rc_track_left_flyer_twist_up(uint8 rideIndex, uint8 paint_util_push_tunnel_left(height, TUNNEL_6); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; } @@ -8449,7 +8750,10 @@ static void multi_dimension_rc_track_right_flyer_twist_up(uint8 rideIndex, uint8 sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26383, 0, 6, 32, 20, 3, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 1: paint_util_push_tunnel_right(height, TUNNEL_6); @@ -8458,7 +8762,6 @@ static void multi_dimension_rc_track_right_flyer_twist_up(uint8 rideIndex, uint8 paint_util_push_tunnel_left(height, TUNNEL_6); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; } @@ -8519,7 +8822,10 @@ static void multi_dimension_rc_track_right_flyer_twist_up(uint8 rideIndex, uint8 sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26383, 0, 6, 32, 20, 3, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 1: paint_util_push_tunnel_right(height, TUNNEL_6); @@ -8528,7 +8834,6 @@ static void multi_dimension_rc_track_right_flyer_twist_up(uint8 rideIndex, uint8 paint_util_push_tunnel_left(height, TUNNEL_6); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; } @@ -8555,11 +8860,13 @@ static void multi_dimension_rc_track_left_flyer_twist_down(uint8 rideIndex, uint sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26376, 0, 6, 32, 20, 3, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; case 1: @@ -8625,11 +8932,13 @@ static void multi_dimension_rc_track_left_flyer_twist_down(uint8 rideIndex, uint sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26376, 0, 6, 32, 20, 3, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; case 1: @@ -8701,11 +9010,13 @@ static void multi_dimension_rc_track_right_flyer_twist_down(uint8 rideIndex, uin sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26388, 0, 6, 32, 20, 3, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; case 1: @@ -8771,11 +9082,13 @@ static void multi_dimension_rc_track_right_flyer_twist_down(uint8 rideIndex, uin sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26388, 0, 6, 32, 20, 3, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(11, 4, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); break; case 1: @@ -8986,11 +9299,13 @@ static void multi_dimension_rc_track_block_brakes(uint8 rideIndex, uint8 trackSe sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26552, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); if (track_paint_util_should_paint_supports(gPaintMapPosition)) { metal_a_supports_paint_setup(11, 4, 0, height + 36, gTrackColours[SCHEME_SUPPORTS]); } + paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 32, 0x20); } } diff --git a/src/ride/coaster/side_friction_roller_coaster.c b/src/ride/coaster/side_friction_roller_coaster.c index b9464a3f46..fd7b3c9ea2 100644 --- a/src/ride/coaster/side_friction_roller_coaster.c +++ b/src/ride/coaster/side_friction_roller_coaster.c @@ -73,6 +73,7 @@ static void side_friction_rc_track_flat(uint8 rideIndex, uint8 trackSequence, ui paint_util_set_general_support_height(height + 32, 0x20); } +/** rct2: 0x007784AC, 0x007784BC, 0x007784CC */ static void side_friction_rc_track_station(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { static const uint32 imageIds[4] = { @@ -1232,16 +1233,16 @@ static void side_friction_rc_track_diag_25_deg_up(uint8 rideIndex, uint8 trackSe case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21864, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21868, -16, -16, 32, 32, 0, height, -16, -16, height + 43); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } } else { @@ -1249,16 +1250,16 @@ static void side_friction_rc_track_diag_25_deg_up(uint8 rideIndex, uint8 trackSe case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21840, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21844, -16, -16, 32, 32, 0, height, -16, -16, height + 43); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } } @@ -1269,35 +1270,35 @@ static void side_friction_rc_track_diag_25_deg_up(uint8 rideIndex, uint8 trackSe if (track_element_is_lift_hill(mapElement)) { switch (direction) { case 0: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21866, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21869, -16, -16, 32, 32, 0, height, -16, -16, height + 43); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } } else { switch (direction) { case 0: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21842, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21845, -16, -16, 32, 32, 0, height, -16, -16, height + 43); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } } @@ -1470,16 +1471,16 @@ static void side_friction_rc_track_diag_25_deg_up_to_flat(uint8 rideIndex, uint8 case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21858, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21862, -16, -16, 32, 32, 0, height, -16, -16, height + 35); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } } else { @@ -1487,16 +1488,16 @@ static void side_friction_rc_track_diag_25_deg_up_to_flat(uint8 rideIndex, uint8 case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21834, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21838, -16, -16, 32, 32, 0, height, -16, -16, height + 35); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } } @@ -1507,35 +1508,35 @@ static void side_friction_rc_track_diag_25_deg_up_to_flat(uint8 rideIndex, uint8 if (track_element_is_lift_hill(mapElement)) { switch (direction) { case 0: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21860, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21863, -16, -16, 32, 32, 0, height, -16, -16, height + 35); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } } else { switch (direction) { case 0: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21836, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21839, -16, -16, 32, 32, 0, height, -16, -16, height + 35); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } } @@ -1589,16 +1590,16 @@ static void side_friction_rc_track_diag_25_deg_down(uint8 rideIndex, uint8 track case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21866, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21869, -16, -16, 32, 32, 0, height, -16, -16, height + 43); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } } else { @@ -1606,16 +1607,16 @@ static void side_friction_rc_track_diag_25_deg_down(uint8 rideIndex, uint8 track case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21842, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21845, -16, -16, 32, 32, 0, height, -16, -16, height + 43); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } } @@ -1626,35 +1627,35 @@ static void side_friction_rc_track_diag_25_deg_down(uint8 rideIndex, uint8 track if (track_element_is_lift_hill(mapElement)) { switch (direction) { case 0: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21864, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21868, -16, -16, 32, 32, 0, height, -16, -16, height + 43); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } } else { switch (direction) { case 0: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21840, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21844, -16, -16, 32, 32, 0, height, -16, -16, height + 43); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } } @@ -1708,16 +1709,16 @@ static void side_friction_rc_track_diag_flat_to_25_deg_down(uint8 rideIndex, uin case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21860, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21863, -16, -16, 32, 32, 0, height, -16, -16, height + 35); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } } else { @@ -1725,16 +1726,16 @@ static void side_friction_rc_track_diag_flat_to_25_deg_down(uint8 rideIndex, uin case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21836, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21839, -16, -16, 32, 32, 0, height, -16, -16, height + 35); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } } @@ -1745,35 +1746,35 @@ static void side_friction_rc_track_diag_flat_to_25_deg_down(uint8 rideIndex, uin if (track_element_is_lift_hill(mapElement)) { switch (direction) { case 0: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21858, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21862, -16, -16, 32, 32, 0, height, -16, -16, height + 35); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } } else { switch (direction) { case 0: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21834, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21838, -16, -16, 32, 32, 0, height, -16, -16, height + 35); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } } diff --git a/src/ride/coaster/stand_up_roller_coaster.c b/src/ride/coaster/stand_up_roller_coaster.c index 4b322473e5..613b23b93f 100644 --- a/src/ride/coaster/stand_up_roller_coaster.c +++ b/src/ride/coaster/stand_up_roller_coaster.c @@ -67,6 +67,7 @@ static void stand_up_rc_track_flat(uint8 rideIndex, uint8 trackSequence, uint8 d paint_util_set_general_support_height(height + 32, 0x20); } +/** rct2: 0x008A7384, 0x008A7394, 0x008A73A4 */ static void stand_up_rc_track_station(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { static const uint32 imageIds[4][3] = { @@ -2415,11 +2416,13 @@ static void stand_up_rc_track_left_corkscrew_up(uint8 rideIndex, uint8 trackSequ sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25600, 0, 0, 32, 20, 3, height, 0, 6, height + 4); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(0, 4, 0, height, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_0); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -2455,7 +2458,10 @@ static void stand_up_rc_track_left_corkscrew_up(uint8 rideIndex, uint8 trackSequ sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25602, 0, 0, 20, 32, 3, height, 6, 0, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(0, 4, 0, height + 35, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 2: paint_util_push_tunnel_right(height + 8, TUNNEL_0); @@ -2464,7 +2470,6 @@ static void stand_up_rc_track_left_corkscrew_up(uint8 rideIndex, uint8 trackSequ paint_util_push_tunnel_left(height + 8, TUNNEL_0); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -2529,7 +2534,10 @@ static void stand_up_rc_track_right_corkscrew_up(uint8 rideIndex, uint8 trackSeq sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25614, 0, 0, 20, 32, 3, height, 6, 0, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(0, 4, 0, height + 35, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 0: paint_util_push_tunnel_right(height + 8, TUNNEL_0); @@ -2538,7 +2546,6 @@ static void stand_up_rc_track_right_corkscrew_up(uint8 rideIndex, uint8 trackSeq paint_util_push_tunnel_left(height + 8, TUNNEL_0); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } diff --git a/src/ride/coaster/suspended_swinging_coaster.c b/src/ride/coaster/suspended_swinging_coaster.c index 4fcfc2ae10..7cbf9074d8 100644 --- a/src/ride/coaster/suspended_swinging_coaster.c +++ b/src/ride/coaster/suspended_swinging_coaster.c @@ -26,6 +26,7 @@ #include "../track_data.h" #include "../track_paint.h" +/** rct2: 0x008A8958 */ static void suspended_swinging_rc_track_flat(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { if (track_element_is_lift_hill(mapElement)) { @@ -39,9 +40,6 @@ static void suspended_swinging_rc_track_flat(uint8 rideIndex, uint8 trackSequenc sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25964, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; } - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(0, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); - } } else { switch (direction) { case 0: @@ -53,15 +51,18 @@ static void suspended_swinging_rc_track_flat(uint8 rideIndex, uint8 trackSequenc sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25962, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; } - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(0, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); - } } - paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + metal_a_supports_paint_setup(0, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + } + + paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); paint_util_set_general_support_height(height + 48, 0x20); } +/** rct2: 0x008A8AA8, 0x008A8AB8, 0x008A8AC8 */ static void suspended_swinging_rc_track_station(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { static const uint32 imageIds[4][3] = { @@ -81,72 +82,68 @@ static void suspended_swinging_rc_track_station(uint8 rideIndex, uint8 trackSequ paint_util_set_general_support_height(height + 48, 0x20); } +/** rct2: 0x008A8968 */ static void suspended_swinging_rc_track_25_deg_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { if (track_element_is_lift_hill(mapElement)) { switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26001, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(0, 6, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26002, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(0, 8, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26003, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(0, 7, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26004, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(0, 5, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; } } else { switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25973, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(0, 6, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25974, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(0, 8, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25975, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(0, 7, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25976, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 45); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(0, 5, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); - } break; } } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(0, 6, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(0, 8, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(0, 7, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(0, 5, 0, height + 62, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_4); } else { paint_util_push_tunnel_rotated(direction, height + 8, TUNNEL_5); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 72, 0x20); } +/** rct2: 0x008A8978 */ static void suspended_swinging_rc_track_60_deg_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { switch (direction) { @@ -172,72 +169,68 @@ static void suspended_swinging_rc_track_60_deg_up(uint8 rideIndex, uint8 trackSe paint_util_set_general_support_height(height + 120, 0x20); } +/** rct2: 0x008A8988 */ static void suspended_swinging_rc_track_flat_to_25_deg_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { if (track_element_is_lift_hill(mapElement)) { switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25993, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(0, 6, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25994, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(0, 8, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25995, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(0, 7, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25996, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(0, 5, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); - } break; } } else { switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25965, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(0, 6, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25966, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(0, 8, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25967, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(0, 7, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25968, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(0, 5, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); - } break; } } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(0, 6, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(0, 8, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(0, 7, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(0, 5, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } else { paint_util_push_tunnel_rotated(direction, height, TUNNEL_5); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 64, 0x20); } +/** rct2: 0x008A8998 */ static void suspended_swinging_rc_track_25_deg_up_to_60_deg_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { switch (direction) { @@ -265,172 +258,169 @@ static void suspended_swinging_rc_track_25_deg_up_to_60_deg_up(uint8 rideIndex, paint_util_set_general_support_height(height + 88, 0x20); } +/** rct2: 0x008A89A8 */ static void suspended_swinging_rc_track_60_deg_up_to_25_deg_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { if (track_element_is_lift_hill(mapElement)) { switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25983, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 61); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(0, 6, 0, height + 76, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25987, 0, 0, 32, 10, 49, height + 29, 0, 10, height + 11); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26090, 0, 0, 32, 2, 49, height + 29, 0, 4, height + 11); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(0, 8, 0, height + 76, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25988, 0, 0, 32, 10, 49, height + 29, 0, 10, height + 11); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25985, 0, 0, 32, 2, 49, height + 29, 0, 4, height + 11); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(0, 7, 0, height + 76, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25986, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 61); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(0, 5, 0, height + 76, gTrackColours[SCHEME_SUPPORTS]); - } break; } } else { switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25983, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 61); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(0, 6, 0, height + 76, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25987, 0, 0, 32, 10, 49, height + 29, 0, 10, height + 11); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25984, 0, 0, 32, 2, 49, height + 29, 0, 4, height + 11); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(0, 8, 0, height + 76, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25988, 0, 0, 32, 10, 49, height + 29, 0, 10, height + 11); sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25985, 0, 0, 32, 2, 49, height + 29, 0, 4, height + 11); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(0, 7, 0, height + 76, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25986, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 61); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(0, 5, 0, height + 76, gTrackColours[SCHEME_SUPPORTS]); - } break; } } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(0, 6, 0, height + 76, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(0, 8, 0, height + 76, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(0, 7, 0, height + 76, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(0, 5, 0, height + 76, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_4); } else { paint_util_push_tunnel_rotated(direction, height + 24, TUNNEL_5); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 88, 0x20); } +/** rct2: 0x008A89B8 */ static void suspended_swinging_rc_track_25_deg_up_to_flat(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { if (track_element_is_lift_hill(mapElement)) { switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25997, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(0, 6, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25998, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(0, 8, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25999, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(0, 7, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26000, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(0, 5, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; } } else { switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25969, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(0, 6, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25970, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(0, 8, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25971, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(0, 7, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25972, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 37); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(0, 5, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; } } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(0, 6, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(0, 8, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(0, 7, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(0, 5, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_3); } else { paint_util_push_tunnel_rotated(direction, height + 8, TUNNEL_13); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 56, 0x20); } +/** rct2: 0x008A89C8 */ static void suspended_swinging_rc_track_25_deg_down(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { suspended_swinging_rc_track_25_deg_up(rideIndex, trackSequence, (direction + 2) & 3, height, mapElement); } +/** rct2: 0x008A89D8 */ static void suspended_swinging_rc_track_60_deg_down(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { suspended_swinging_rc_track_60_deg_up(rideIndex, trackSequence, (direction + 2) & 3, height, mapElement); } +/** rct2: 0x008A89E8 */ static void suspended_swinging_rc_track_flat_to_25_deg_down(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { suspended_swinging_rc_track_25_deg_up_to_flat(rideIndex, trackSequence, (direction + 2) & 3, height, mapElement); } +/** rct2: 0x008A89F8 */ static void suspended_swinging_rc_track_25_deg_down_to_60_deg_down(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { suspended_swinging_rc_track_60_deg_up_to_25_deg_up(rideIndex, trackSequence, (direction + 2) & 3, height, mapElement); } +/** rct2: 0x008A8A08 */ static void suspended_swinging_rc_track_60_deg_down_to_25_deg_down(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { suspended_swinging_rc_track_25_deg_up_to_60_deg_up(rideIndex, trackSequence, (direction + 2) & 3, height, mapElement); } +/** rct2: 0x008A8A18 */ static void suspended_swinging_rc_track_25_deg_down_to_flat(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { suspended_swinging_rc_track_flat_to_25_deg_up(rideIndex, trackSequence, (direction + 2) & 3, height, mapElement); } +/** rct2: 0x008A8A28 */ static void suspended_swinging_rc_track_left_quarter_turn_5(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { switch (trackSequence) { @@ -449,11 +439,13 @@ static void suspended_swinging_rc_track_left_quarter_turn_5(uint8 rideIndex, uin sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26009, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(0, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -531,7 +523,10 @@ static void suspended_swinging_rc_track_left_quarter_turn_5(uint8 rideIndex, uin sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26005, 0, 0, 20, 32, 3, height + 29, 6, 0, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(0, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 2: paint_util_push_tunnel_right(height, TUNNEL_3); @@ -540,18 +535,19 @@ static void suspended_swinging_rc_track_left_quarter_turn_5(uint8 rideIndex, uin paint_util_push_tunnel_left(height, TUNNEL_3); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } } +/** rct2: 0x008A8A38 */ static void suspended_swinging_rc_track_right_quarter_turn_5(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; suspended_swinging_rc_track_left_quarter_turn_5(rideIndex, trackSequence, (direction - 1) & 3, height, mapElement); } +/** rct2: 0x008A8A48 */ static void suspended_swinging_rc_track_left_quarter_turn_5_25_deg_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { switch (trackSequence) { @@ -570,11 +566,13 @@ static void suspended_swinging_rc_track_left_quarter_turn_5_25_deg_up(uint8 ride sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26112, 0, 6, 32, 20, 3, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(0, 4, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_4); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 88, 0x20); break; case 1: @@ -652,7 +650,10 @@ static void suspended_swinging_rc_track_left_quarter_turn_5_25_deg_up(uint8 ride sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26116, 6, 0, 20, 32, 3, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(0, 4, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 2: paint_util_push_tunnel_right(height + 8, TUNNEL_5); @@ -661,12 +662,12 @@ static void suspended_swinging_rc_track_left_quarter_turn_5_25_deg_up(uint8 ride paint_util_push_tunnel_left(height + 8, TUNNEL_5); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 88, 0x20); break; } } +/** rct2: 0x008A8A58 */ static void suspended_swinging_rc_track_right_quarter_turn_5_25_deg_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { switch (trackSequence) { @@ -685,11 +686,13 @@ static void suspended_swinging_rc_track_right_quarter_turn_5_25_deg_up(uint8 rid sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26092, 0, 6, 32, 20, 3, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(0, 4, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_4); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 88, 0x20); break; case 1: @@ -767,7 +770,10 @@ static void suspended_swinging_rc_track_right_quarter_turn_5_25_deg_up(uint8 rid sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26096, 6, 0, 20, 32, 3, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(0, 4, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 0: paint_util_push_tunnel_right(height + 8, TUNNEL_5); @@ -776,24 +782,26 @@ static void suspended_swinging_rc_track_right_quarter_turn_5_25_deg_up(uint8 rid paint_util_push_tunnel_left(height + 8, TUNNEL_5); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 88, 0x20); break; } } +/** rct2: 0x008A8A68 */ static void suspended_swinging_rc_track_left_quarter_turn_5_25_deg_down(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; suspended_swinging_rc_track_right_quarter_turn_5_25_deg_up(rideIndex, trackSequence, (direction + 1) & 3, height, mapElement); } +/** rct2: 0x008A8A78 */ static void suspended_swinging_rc_track_right_quarter_turn_5_25_deg_down(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { trackSequence = mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[trackSequence]; suspended_swinging_rc_track_left_quarter_turn_5_25_deg_up(rideIndex, trackSequence, (direction - 1) & 3, height, mapElement); } +/** rct2: 0x008A8A88 */ static void suspended_swinging_rc_track_s_bend_left(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { switch (trackSequence) { @@ -812,22 +820,22 @@ static void suspended_swinging_rc_track_s_bend_left(uint8 rideIndex, uint8 track sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26143, 0, 6, 32, 20, 3, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(0, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: switch (direction) { case 0: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26140, 0, 0, 32, 26, 3, height + 29); - metal_a_supports_paint_setup(0, 5, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26145, 0, 0, 32, 26, 3, height + 29); - metal_a_supports_paint_setup(0, 6, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26141, 0, 6, 32, 26, 3, height + 29); @@ -836,7 +844,17 @@ static void suspended_swinging_rc_track_s_bend_left(uint8 rideIndex, uint8 track sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26144, 0, 6, 32, 26, 3, height + 29); break; } + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(0, 5, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(0, 6, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + } + paint_util_set_general_support_height(height + 48, 0x20); break; case 2: @@ -849,14 +867,22 @@ static void suspended_swinging_rc_track_s_bend_left(uint8 rideIndex, uint8 track break; case 2: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26140, 0, 0, 32, 26, 3, height + 29); - metal_a_supports_paint_setup(0, 5, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26145, 0, 0, 32, 26, 3, height + 29); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + switch (direction) { + case 2: + metal_a_supports_paint_setup(0, 5, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: metal_a_supports_paint_setup(0, 6, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 48, 0x20); break; case 3: @@ -874,7 +900,10 @@ static void suspended_swinging_rc_track_s_bend_left(uint8 rideIndex, uint8 track sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26146, 0, 6, 32, 20, 3, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(0, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 1: paint_util_push_tunnel_right(height, TUNNEL_3); @@ -883,12 +912,12 @@ static void suspended_swinging_rc_track_s_bend_left(uint8 rideIndex, uint8 track paint_util_push_tunnel_left(height, TUNNEL_3); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } } +/** rct2: 0x008A8A98 */ static void suspended_swinging_rc_track_s_bend_right(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { switch (trackSequence) { @@ -907,22 +936,22 @@ static void suspended_swinging_rc_track_s_bend_right(uint8 rideIndex, uint8 trac sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26147, 0, 6, 32, 20, 3, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(0, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: switch (direction) { case 0: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26136, 0, 6, 32, 26, 3, height + 29); - metal_a_supports_paint_setup(0, 8, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26149, 0, 6, 32, 26, 3, height + 29); - metal_a_supports_paint_setup(0, 7, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26137, 0, 0, 32, 26, 3, height + 29); @@ -931,7 +960,17 @@ static void suspended_swinging_rc_track_s_bend_right(uint8 rideIndex, uint8 trac sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26148, 0, 0, 32, 26, 3, height + 29); break; } + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(0, 8, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(0, 7, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + } + paint_util_set_general_support_height(height + 48, 0x20); break; case 2: @@ -944,14 +983,22 @@ static void suspended_swinging_rc_track_s_bend_right(uint8 rideIndex, uint8 trac break; case 2: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26136, 0, 6, 32, 26, 3, height + 29); - metal_a_supports_paint_setup(0, 8, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26149, 0, 6, 32, 26, 3, height + 29); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 2: + metal_a_supports_paint_setup(0, 8, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: metal_a_supports_paint_setup(0, 7, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 48, 0x20); break; case 3: @@ -969,7 +1016,10 @@ static void suspended_swinging_rc_track_s_bend_right(uint8 rideIndex, uint8 trac sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26150, 0, 6, 32, 20, 3, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(0, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 1: paint_util_push_tunnel_right(height, TUNNEL_3); @@ -978,12 +1028,12 @@ static void suspended_swinging_rc_track_s_bend_right(uint8 rideIndex, uint8 trac paint_util_push_tunnel_left(height, TUNNEL_3); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } } +/** rct2: 0x008A8AD8 */ static void suspended_swinging_rc_track_left_quarter_turn_3(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { switch (trackSequence) { @@ -1002,11 +1052,13 @@ static void suspended_swinging_rc_track_left_quarter_turn_3(uint8 rideIndex, uin sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26067, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(0, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -1045,7 +1097,10 @@ static void suspended_swinging_rc_track_left_quarter_turn_3(uint8 rideIndex, uin sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26065, 0, 0, 20, 32, 3, height + 29, 6, 0, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(0, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 2: paint_util_push_tunnel_right(height, TUNNEL_3); @@ -1054,18 +1109,19 @@ static void suspended_swinging_rc_track_left_quarter_turn_3(uint8 rideIndex, uin paint_util_push_tunnel_left(height, TUNNEL_3); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } } +/** rct2: 0x008A8AE8 */ static void suspended_swinging_rc_track_right_quarter_turn_3(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; suspended_swinging_rc_track_left_quarter_turn_3(rideIndex, trackSequence, (direction - 1) & 3, height, mapElement); } +/** rct2: 0x008A8AF8 */ static void suspended_swinging_rc_track_left_quarter_turn_3_25_deg_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { switch (trackSequence) { @@ -1084,11 +1140,13 @@ static void suspended_swinging_rc_track_left_quarter_turn_3_25_deg_up(uint8 ride sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26128, 0, 6, 32, 20, 3, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(0, 4, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_4); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 88, 0x20); break; case 1: @@ -1112,7 +1170,10 @@ static void suspended_swinging_rc_track_left_quarter_turn_3_25_deg_up(uint8 ride sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26127, 6, 0, 20, 32, 3, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(0, 4, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 2: paint_util_push_tunnel_right(height + 8, TUNNEL_5); @@ -1121,12 +1182,12 @@ static void suspended_swinging_rc_track_left_quarter_turn_3_25_deg_up(uint8 ride paint_util_push_tunnel_left(height + 8, TUNNEL_5); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 88, 0x20); break; } } +/** rct2: 0x008A8B08 */ static void suspended_swinging_rc_track_right_quarter_turn_3_25_deg_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { switch (trackSequence) { @@ -1145,11 +1206,13 @@ static void suspended_swinging_rc_track_right_quarter_turn_3_25_deg_up(uint8 rid sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26125, 0, 6, 32, 20, 3, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(0, 4, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_4); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 88, 0x20); break; case 1: @@ -1173,7 +1236,10 @@ static void suspended_swinging_rc_track_right_quarter_turn_3_25_deg_up(uint8 rid sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26126, 6, 0, 20, 32, 3, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(0, 4, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 0: paint_util_push_tunnel_right(height + 8, TUNNEL_5); @@ -1182,24 +1248,26 @@ static void suspended_swinging_rc_track_right_quarter_turn_3_25_deg_up(uint8 rid paint_util_push_tunnel_left(height + 8, TUNNEL_5); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 88, 0x20); break; } } +/** rct2: 0x008A8B18 */ static void suspended_swinging_rc_track_left_quarter_turn_3_25_deg_down(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; suspended_swinging_rc_track_right_quarter_turn_3_25_deg_up(rideIndex, trackSequence, (direction + 1) & 3, height, mapElement); } +/** rct2: 0x008A8B28 */ static void suspended_swinging_rc_track_right_quarter_turn_3_25_deg_down(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; suspended_swinging_rc_track_left_quarter_turn_3_25_deg_up(rideIndex, trackSequence, (direction - 1) & 3, height, mapElement); } +/** rct2: 0x008A8B38 */ static void suspended_swinging_rc_track_brakes(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { switch (direction) { @@ -1212,14 +1280,17 @@ static void suspended_swinging_rc_track_brakes(uint8 rideIndex, uint8 trackSeque sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26118, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); if (track_paint_util_should_paint_supports(gPaintMapPosition)) { metal_a_supports_paint_setup(0, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); } + paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); } +/** rct2: 0x008A8B48 */ static void suspended_swinging_rc_track_left_quarter_helix_large_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { switch (trackSequence) { @@ -1238,11 +1309,13 @@ static void suspended_swinging_rc_track_left_quarter_helix_large_up(uint8 rideIn sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26049, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 35); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(0, 4, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -1320,7 +1393,10 @@ static void suspended_swinging_rc_track_left_quarter_helix_large_up(uint8 rideIn sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26045, 0, 0, 20, 32, 3, height + 29, 6, 0, height + 43); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(0, 4, 0, height + 58, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 2: paint_util_push_tunnel_right(height + 16, TUNNEL_3); @@ -1329,12 +1405,12 @@ static void suspended_swinging_rc_track_left_quarter_helix_large_up(uint8 rideIn paint_util_push_tunnel_left(height + 16, TUNNEL_3); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } } +/** rct2: 0x008A8B58 */ static void suspended_swinging_rc_track_right_quarter_helix_large_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { switch (trackSequence) { @@ -1353,11 +1429,13 @@ static void suspended_swinging_rc_track_right_quarter_helix_large_up(uint8 rideI sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26040, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 35); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(0, 4, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -1435,7 +1513,10 @@ static void suspended_swinging_rc_track_right_quarter_helix_large_up(uint8 rideI sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26044, 0, 0, 20, 32, 3, height + 29, 6, 0, height + 43); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(0, 4, 0, height + 58, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 0: paint_util_push_tunnel_right(height + 16, TUNNEL_3); @@ -1444,12 +1525,12 @@ static void suspended_swinging_rc_track_right_quarter_helix_large_up(uint8 rideI paint_util_push_tunnel_left(height + 16, TUNNEL_3); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } } +/** rct2: 0x008A8B68 */ static void suspended_swinging_rc_track_left_quarter_helix_large_down(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { switch (trackSequence) { @@ -1468,11 +1549,13 @@ static void suspended_swinging_rc_track_left_quarter_helix_large_down(uint8 ride sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26029, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 43); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(0, 4, 0, height + 58, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height + 16, TUNNEL_3); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -1550,7 +1633,10 @@ static void suspended_swinging_rc_track_left_quarter_helix_large_down(uint8 ride sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26025, 0, 0, 20, 32, 3, height + 29, 6, 0, height + 35); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(0, 4, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 2: paint_util_push_tunnel_right(height, TUNNEL_3); @@ -1559,12 +1645,12 @@ static void suspended_swinging_rc_track_left_quarter_helix_large_down(uint8 ride paint_util_push_tunnel_left(height, TUNNEL_3); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } } +/** rct2: 0x008A8B78 */ static void suspended_swinging_rc_track_right_quarter_helix_large_down(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { switch (trackSequence) { @@ -1583,11 +1669,13 @@ static void suspended_swinging_rc_track_right_quarter_helix_large_down(uint8 rid sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26060, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 43); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(0, 4, 0, height + 58, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height + 16, TUNNEL_3); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -1665,7 +1753,10 @@ static void suspended_swinging_rc_track_right_quarter_helix_large_down(uint8 rid sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26064, 0, 0, 20, 32, 3, height + 29, 6, 0, height + 35); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(0, 4, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 0: paint_util_push_tunnel_right(height, TUNNEL_3); @@ -1674,12 +1765,12 @@ static void suspended_swinging_rc_track_right_quarter_helix_large_down(uint8 rid paint_util_push_tunnel_left(height, TUNNEL_3); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } } +/** rct2: 0x008A8B88 */ static void suspended_swinging_rc_track_left_eighth_to_diag(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { switch (trackSequence) { @@ -1698,11 +1789,13 @@ static void suspended_swinging_rc_track_left_eighth_to_diag(uint8 rideIndex, uin sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26179, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(0, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -1749,27 +1842,40 @@ static void suspended_swinging_rc_track_left_eighth_to_diag(uint8 rideIndex, uin switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26170, 0, 0, 16, 16, 3, height + 29, 16, 16, height + 29); - metal_a_supports_paint_setup(0, 3, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26174, 0, 0, 16, 18, 3, height + 29, 0, 16, height + 29); - metal_a_supports_paint_setup(0, 1, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26178, 0, 0, 16, 16, 3, height + 29, 0, 0, height + 29); - metal_a_supports_paint_setup(0, 0, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26182, 0, 0, 16, 16, 3, height + 29, 16, 0, height + 29); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(0, 3, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(0, 1, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(0, 0, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: metal_a_supports_paint_setup(0, 2, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 48, 0x20); break; } } +/** rct2: 0x008A8B98 */ static void suspended_swinging_rc_track_right_eighth_to_diag(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { switch (trackSequence) { @@ -1788,11 +1894,13 @@ static void suspended_swinging_rc_track_right_eighth_to_diag(uint8 rideIndex, ui sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26163, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(0, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -1839,39 +1947,54 @@ static void suspended_swinging_rc_track_right_eighth_to_diag(uint8 rideIndex, ui switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26154, 0, 0, 16, 16, 3, height + 29, 16, 0, height + 29); - metal_a_supports_paint_setup(0, 1, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26158, 0, 0, 16, 16, 3, height + 29, 0, 0, height + 29); - metal_a_supports_paint_setup(0, 0, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26162, 0, 0, 16, 18, 3, height + 29, 0, 16, height + 29); - metal_a_supports_paint_setup(0, 2, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26166, 0, 0, 16, 16, 3, height + 29, 16, 16, height + 29); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(0, 1, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(0, 0, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(0, 2, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: metal_a_supports_paint_setup(0, 3, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 48, 0x20); break; } } +/** rct2: 0x008A8BA8 */ static void suspended_swinging_rc_track_left_eighth_to_orthogonal(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; suspended_swinging_rc_track_right_eighth_to_diag(rideIndex, trackSequence, (direction + 2) & 3, height, mapElement); } +/** rct2: 0x008A8BB8 */ static void suspended_swinging_rc_track_right_eighth_to_orthogonal(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { trackSequence = mapLeftEighthTurnToOrthogonal[trackSequence]; suspended_swinging_rc_track_left_eighth_to_diag(rideIndex, trackSequence, (direction + 3) & 3, height, mapElement); } +/** rct2: 0x008A8BC8 */ static void suspended_swinging_rc_track_diag_flat(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { switch (trackSequence) { @@ -1929,43 +2052,40 @@ static void suspended_swinging_rc_track_diag_flat(uint8 rideIndex, uint8 trackSe case 3: if (track_element_is_lift_hill(mapElement)) { switch (direction) { - case 0: - metal_a_supports_paint_setup(0, 1, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26212, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 29); - metal_a_supports_paint_setup(0, 0, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(0, 2, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(0, 3, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; } } else { switch (direction) { - case 0: - metal_a_supports_paint_setup(0, 1, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26184, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 29); - metal_a_supports_paint_setup(0, 0, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(0, 2, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(0, 3, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; } } + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(0, 1, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(0, 0, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(0, 2, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(0, 3, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); + break; + } + paint_util_set_general_support_height(height + 48, 0x20); break; } } +/** rct2: 0x008A8BF8 */ static void suspended_swinging_rc_track_diag_25_deg_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { switch (trackSequence) { @@ -2023,43 +2143,40 @@ static void suspended_swinging_rc_track_diag_25_deg_up(uint8 rideIndex, uint8 tr case 3: if (track_element_is_lift_hill(mapElement)) { switch (direction) { - case 0: - metal_a_supports_paint_setup(0, 1, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26224, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 45); - metal_a_supports_paint_setup(0, 0, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(0, 2, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(0, 3, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); break; } } else { switch (direction) { - case 0: - metal_a_supports_paint_setup(0, 1, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26196, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 45); - metal_a_supports_paint_setup(0, 0, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(0, 2, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(0, 3, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); break; } } + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(0, 1, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(0, 0, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(0, 2, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(0, 3, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); + break; + } + paint_util_set_general_support_height(height + 72, 0x20); break; } } +/** rct2: 0x008A8C58 */ static void suspended_swinging_rc_track_diag_60_deg_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { switch (trackSequence) { @@ -2091,12 +2208,18 @@ static void suspended_swinging_rc_track_diag_60_deg_up(uint8 rideIndex, uint8 tr paint_util_set_general_support_height(height + 120, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26208, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 29); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_b_supports_paint_setup(0, 1, 32, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26208, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 29); metal_b_supports_paint_setup(0, 0, 36, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -2106,12 +2229,13 @@ static void suspended_swinging_rc_track_diag_60_deg_up(uint8 rideIndex, uint8 tr metal_b_supports_paint_setup(0, 3, 36, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 120, 0x20); break; } } +/** rct2: 0x008A8BD8 */ static void suspended_swinging_rc_track_diag_flat_to_25_deg_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { switch (trackSequence) { @@ -2169,43 +2293,40 @@ static void suspended_swinging_rc_track_diag_flat_to_25_deg_up(uint8 rideIndex, case 3: if (track_element_is_lift_hill(mapElement)) { switch (direction) { - case 0: - metal_a_supports_paint_setup(0, 1, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26216, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); - metal_a_supports_paint_setup(0, 0, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(0, 2, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(0, 3, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); break; } } else { switch (direction) { - case 0: - metal_a_supports_paint_setup(0, 1, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26188, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); - metal_a_supports_paint_setup(0, 0, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(0, 2, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(0, 3, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); break; } } + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(0, 1, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(0, 0, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(0, 2, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(0, 3, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); + break; + } + paint_util_set_general_support_height(height + 64, 0x20); break; } } +/** rct2: 0x008A8C38 */ static void suspended_swinging_rc_track_diag_25_deg_up_to_60_deg_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { switch (trackSequence) { @@ -2237,12 +2358,18 @@ static void suspended_swinging_rc_track_diag_25_deg_up_to_60_deg_up(uint8 rideIn paint_util_set_general_support_height(height + 88, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26200, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 61); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_b_supports_paint_setup(0, 1, 16, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26200, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 61); metal_b_supports_paint_setup(0, 0, 16, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -2252,12 +2379,13 @@ static void suspended_swinging_rc_track_diag_25_deg_up_to_60_deg_up(uint8 rideIn metal_b_supports_paint_setup(0, 3, 16, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 88, 0x20); break; } } +/** rct2: 0x008A8C48 */ static void suspended_swinging_rc_track_diag_60_deg_up_to_25_deg_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { switch (trackSequence) { @@ -2289,12 +2417,18 @@ static void suspended_swinging_rc_track_diag_60_deg_up_to_25_deg_up(uint8 rideIn paint_util_set_general_support_height(height + 88, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26204, -16, -16, 16, 16, 3, height + 29, 0, 0, height + 61); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_b_supports_paint_setup(0, 1, 21, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26204, -16, -16, 16, 16, 3, height + 29, 0, 0, height + 61); metal_b_supports_paint_setup(0, 0, 21, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -2304,12 +2438,13 @@ static void suspended_swinging_rc_track_diag_60_deg_up_to_25_deg_up(uint8 rideIn metal_b_supports_paint_setup(0, 3, 21, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 88, 0x20); break; } } +/** rct2: 0x008A8BE8 */ static void suspended_swinging_rc_track_diag_25_deg_up_to_flat(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { switch (trackSequence) { @@ -2367,43 +2502,40 @@ static void suspended_swinging_rc_track_diag_25_deg_up_to_flat(uint8 rideIndex, case 3: if (track_element_is_lift_hill(mapElement)) { switch (direction) { - case 0: - metal_b_supports_paint_setup(0, 1, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26220, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); - metal_a_supports_paint_setup(0, 0, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(0, 2, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(0, 3, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); break; } } else { switch (direction) { - case 0: - metal_b_supports_paint_setup(0, 1, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26192, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); - metal_a_supports_paint_setup(0, 0, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(0, 2, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(0, 3, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); break; } } + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_b_supports_paint_setup(0, 1, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(0, 0, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(0, 2, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(0, 3, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); + break; + } + paint_util_set_general_support_height(height + 72, 0x20); break; } } +/** rct2: 0x008A8C28 */ static void suspended_swinging_rc_track_diag_25_deg_down(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { switch (trackSequence) { @@ -2461,43 +2593,40 @@ static void suspended_swinging_rc_track_diag_25_deg_down(uint8 rideIndex, uint8 case 3: if (track_element_is_lift_hill(mapElement)) { switch (direction) { - case 0: - metal_a_supports_paint_setup(0, 1, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26226, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 45); - metal_a_supports_paint_setup(0, 0, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(0, 2, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(0, 3, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); break; } } else { switch (direction) { - case 0: - metal_a_supports_paint_setup(0, 1, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26198, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 45); - metal_a_supports_paint_setup(0, 0, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(0, 2, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(0, 3, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); break; } } + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(0, 1, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(0, 0, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(0, 2, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(0, 3, 0, height + 56, gTrackColours[SCHEME_SUPPORTS]); + break; + } + paint_util_set_general_support_height(height + 72, 0x20); break; } } +/** rct2: 0x008A8C88 */ static void suspended_swinging_rc_track_diag_60_deg_down(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { switch (trackSequence) { @@ -2540,6 +2669,7 @@ static void suspended_swinging_rc_track_diag_60_deg_down(uint8 rideIndex, uint8 } } +/** rct2: 0x008A8C08 */ static void suspended_swinging_rc_track_diag_flat_to_25_deg_down(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { switch (trackSequence) { @@ -2597,43 +2727,40 @@ static void suspended_swinging_rc_track_diag_flat_to_25_deg_down(uint8 rideIndex case 3: if (track_element_is_lift_hill(mapElement)) { switch (direction) { - case 0: - metal_a_supports_paint_setup(0, 1, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26222, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); - metal_a_supports_paint_setup(0, 0, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(0, 2, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(0, 3, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); break; } } else { switch (direction) { - case 0: - metal_a_supports_paint_setup(0, 1, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26194, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); - metal_a_supports_paint_setup(0, 0, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(0, 2, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(0, 3, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); break; } } + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(0, 1, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(0, 0, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(0, 2, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(0, 3, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); + break; + } + paint_util_set_general_support_height(height + 72, 0x20); break; } } +/** rct2: 0x008A8C68 */ static void suspended_swinging_rc_track_diag_25_deg_down_to_60_deg_down(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { switch (trackSequence) { @@ -2665,12 +2792,18 @@ static void suspended_swinging_rc_track_diag_25_deg_down_to_60_deg_down(uint8 ri paint_util_set_general_support_height(height + 88, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26206, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 61); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_b_supports_paint_setup(0, 1, 17, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26206, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 61); metal_b_supports_paint_setup(0, 0, 17, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -2680,12 +2813,13 @@ static void suspended_swinging_rc_track_diag_25_deg_down_to_60_deg_down(uint8 ri metal_b_supports_paint_setup(0, 3, 17, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 88, 0x20); break; } } +/** rct2: 0x008A8C78 */ static void suspended_swinging_rc_track_diag_60_deg_down_to_25_deg_down(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { switch (trackSequence) { @@ -2717,12 +2851,18 @@ static void suspended_swinging_rc_track_diag_60_deg_down_to_25_deg_down(uint8 ri paint_util_set_general_support_height(height + 88, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26202, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 61); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_b_supports_paint_setup(0, 1, 8, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26202, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 61); metal_b_supports_paint_setup(0, 0, 8, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -2732,12 +2872,13 @@ static void suspended_swinging_rc_track_diag_60_deg_down_to_25_deg_down(uint8 ri metal_b_supports_paint_setup(0, 3, 8, height + 44, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 88, 0x20); break; } } +/** rct2: 0x008A8C18 */ static void suspended_swinging_rc_track_diag_25_deg_down_to_flat(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { switch (trackSequence) { @@ -2795,43 +2936,40 @@ static void suspended_swinging_rc_track_diag_25_deg_down_to_flat(uint8 rideIndex case 3: if (track_element_is_lift_hill(mapElement)) { switch (direction) { - case 0: - metal_a_supports_paint_setup(0, 1, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26218, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); - metal_a_supports_paint_setup(0, 0, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(0, 2, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(0, 3, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); break; } } else { switch (direction) { - case 0: - metal_a_supports_paint_setup(0, 1, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); - break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26190, -16, -16, 32, 32, 3, height + 29, -16, -16, height + 37); - metal_a_supports_paint_setup(0, 0, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); - break; - case 2: - metal_a_supports_paint_setup(0, 2, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); - break; - case 3: - metal_a_supports_paint_setup(0, 3, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); break; } } + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(0, 1, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(0, 0, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(0, 2, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(0, 3, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); + break; + } + paint_util_set_general_support_height(height + 64, 0x20); break; } } +/** rct2: 0x008A8B38 */ static void suspended_swinging_rc_track_block_brakes(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { switch (direction) { @@ -2844,11 +2982,13 @@ static void suspended_swinging_rc_track_block_brakes(uint8 rideIndex, uint8 trac sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26118, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); if (track_paint_util_should_paint_supports(gPaintMapPosition)) { metal_a_supports_paint_setup(0, 4, 0, height + 44, gTrackColours[SCHEME_SUPPORTS]); } + paint_util_push_tunnel_rotated(direction, height, TUNNEL_3); - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); } diff --git a/src/ride/coaster/twister_roller_coaster.c b/src/ride/coaster/twister_roller_coaster.c index 19820931b9..691c7fb719 100644 --- a/src/ride/coaster/twister_roller_coaster.c +++ b/src/ride/coaster/twister_roller_coaster.c @@ -67,6 +67,7 @@ static void twister_rc_track_flat(uint8 rideIndex, uint8 trackSequence, uint8 di paint_util_set_general_support_height(height + 32, 0x20); } +/** rct2: 0x008AB8F4, 0x008AB904, 0x008AB914 */ static void twister_rc_track_station(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { static const uint32 imageIds[4][3] = { @@ -2191,11 +2192,13 @@ static void twister_rc_track_left_corkscrew_up(uint8 rideIndex, uint8 trackSeque sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17699, 0, 0, 32, 20, 3, height, 0, 6, height + 4); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(0, 4, 0, height, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_6); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -2231,7 +2234,10 @@ static void twister_rc_track_left_corkscrew_up(uint8 rideIndex, uint8 trackSeque sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17701, 0, 0, 20, 32, 3, height, 6, 0, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(0, 4, 0, height + 35, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 2: paint_util_push_tunnel_right(height + 8, TUNNEL_6); @@ -2240,7 +2246,6 @@ static void twister_rc_track_left_corkscrew_up(uint8 rideIndex, uint8 trackSeque paint_util_push_tunnel_left(height + 8, TUNNEL_6); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -2305,7 +2310,10 @@ static void twister_rc_track_right_corkscrew_up(uint8 rideIndex, uint8 trackSequ sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17713, 0, 0, 20, 32, 3, height, 6, 0, height + 24); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(0, 4, 0, height + 35, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 0: paint_util_push_tunnel_right(height + 8, TUNNEL_6); @@ -2314,7 +2322,6 @@ static void twister_rc_track_right_corkscrew_up(uint8 rideIndex, uint8 trackSequ paint_util_push_tunnel_left(height + 8, TUNNEL_6); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } diff --git a/src/ride/coaster/wooden_roller_coaster.c b/src/ride/coaster/wooden_roller_coaster.c index cb7a7191f5..38240024a6 100644 --- a/src/ride/coaster/wooden_roller_coaster.c +++ b/src/ride/coaster/wooden_roller_coaster.c @@ -4996,16 +4996,16 @@ static void wooden_rc_track_diag_25_deg_up(uint8 rideIndex, uint8 trackSequence, sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24931, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24069, -16, -16, 32, 32, 0, height, -16, -16, height + 43); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24935, -16, -16, 32, 32, 0, height, -16, -16, height + 43); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } } else { @@ -5015,16 +5015,16 @@ static void wooden_rc_track_diag_25_deg_up(uint8 rideIndex, uint8 trackSequence, sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24889, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24027, -16, -16, 32, 32, 0, height, -16, -16, height + 43); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24893, -16, -16, 32, 32, 0, height, -16, -16, height + 43); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } } @@ -5035,39 +5035,39 @@ static void wooden_rc_track_diag_25_deg_up(uint8 rideIndex, uint8 trackSequence, if (track_element_is_lift_hill(mapElement)) { switch (direction) { case 0: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24067, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24933, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24070, -16, -16, 32, 32, 0, height, -16, -16, height + 43); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24936, -16, -16, 32, 32, 0, height, -16, -16, height + 43); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } } else { switch (direction) { case 0: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24025, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24891, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24028, -16, -16, 32, 32, 0, height, -16, -16, height + 43); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24894, -16, -16, 32, 32, 0, height, -16, -16, height + 43); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } } @@ -5117,16 +5117,16 @@ static void wooden_rc_track_diag_60_deg_up(uint8 rideIndex, uint8 trackSequence, sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24907, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24045, -16, -16, 32, 32, 0, height, -16, -16, height + 91); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24911, -16, -16, 32, 32, 0, height, -16, -16, height + 91); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0); @@ -5135,20 +5135,20 @@ static void wooden_rc_track_diag_60_deg_up(uint8 rideIndex, uint8 trackSequence, case 2: switch (direction) { case 0: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24043, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24909, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24046, -16, -16, 32, 32, 0, height, -16, -16, height + 91); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24912, -16, -16, 32, 32, 0, height, -16, -16, height + 91); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0); @@ -5319,16 +5319,16 @@ static void wooden_rc_track_diag_25_deg_up_to_60_deg_up(uint8 rideIndex, uint8 t sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24895, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24033, -16, -16, 32, 32, 0, height, -16, -16, height + 59); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24899, -16, -16, 32, 32, 0, height, -16, -16, height + 59); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0); @@ -5337,20 +5337,20 @@ static void wooden_rc_track_diag_25_deg_up_to_60_deg_up(uint8 rideIndex, uint8 t case 2: switch (direction) { case 0: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24031, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24897, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24034, -16, -16, 32, 32, 0, height, -16, -16, height + 59); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24900, -16, -16, 32, 32, 0, height, -16, -16, height + 59); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0); @@ -5390,16 +5390,16 @@ static void wooden_rc_track_diag_60_deg_up_to_25_deg_up(uint8 rideIndex, uint8 t sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24901, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24039, -16, -16, 32, 32, 0, height, -16, -16, height + 59); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24905, -16, -16, 32, 32, 0, height, -16, -16, height + 59); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0); @@ -5408,20 +5408,20 @@ static void wooden_rc_track_diag_60_deg_up_to_25_deg_up(uint8 rideIndex, uint8 t case 2: switch (direction) { case 0: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24037, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24903, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24040, -16, -16, 32, 32, 0, height, -16, -16, height + 59); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24906, -16, -16, 32, 32, 0, height, -16, -16, height + 59); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0); @@ -5471,16 +5471,16 @@ static void wooden_rc_track_diag_25_deg_up_to_flat(uint8 rideIndex, uint8 trackS sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24925, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24063, -16, -16, 32, 32, 0, height, -16, -16, height + 35); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24929, -16, -16, 32, 32, 0, height, -16, -16, height + 35); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } } else { @@ -5490,16 +5490,16 @@ static void wooden_rc_track_diag_25_deg_up_to_flat(uint8 rideIndex, uint8 trackS sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24883, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24021, -16, -16, 32, 32, 0, height, -16, -16, height + 35); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24887, -16, -16, 32, 32, 0, height, -16, -16, height + 35); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } } @@ -5510,39 +5510,39 @@ static void wooden_rc_track_diag_25_deg_up_to_flat(uint8 rideIndex, uint8 trackS if (track_element_is_lift_hill(mapElement)) { switch (direction) { case 0: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24061, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24927, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24064, -16, -16, 32, 32, 0, height, -16, -16, height + 35); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24930, -16, -16, 32, 32, 0, height, -16, -16, height + 35); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } } else { switch (direction) { case 0: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24019, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24885, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24022, -16, -16, 32, 32, 0, height, -16, -16, height + 35); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24888, -16, -16, 32, 32, 0, height, -16, -16, height + 35); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } } @@ -5602,16 +5602,16 @@ static void wooden_rc_track_diag_25_deg_down(uint8 rideIndex, uint8 trackSequenc sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24933, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24070, -16, -16, 32, 32, 0, height, -16, -16, height + 43); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24936, -16, -16, 32, 32, 0, height, -16, -16, height + 43); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } } else { @@ -5621,16 +5621,16 @@ static void wooden_rc_track_diag_25_deg_down(uint8 rideIndex, uint8 trackSequenc sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24891, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24028, -16, -16, 32, 32, 0, height, -16, -16, height + 43); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24894, -16, -16, 32, 32, 0, height, -16, -16, height + 43); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } } @@ -5641,39 +5641,39 @@ static void wooden_rc_track_diag_25_deg_down(uint8 rideIndex, uint8 trackSequenc if (track_element_is_lift_hill(mapElement)) { switch (direction) { case 0: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24065, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24931, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24069, -16, -16, 32, 32, 0, height, -16, -16, height + 43); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24935, -16, -16, 32, 32, 0, height, -16, -16, height + 43); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } } else { switch (direction) { case 0: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24023, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24889, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24027, -16, -16, 32, 32, 0, height, -16, -16, height + 43); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24893, -16, -16, 32, 32, 0, height, -16, -16, height + 43); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } } @@ -5723,16 +5723,16 @@ static void wooden_rc_track_diag_60_deg_down(uint8 rideIndex, uint8 trackSequenc sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24909, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24046, -16, -16, 32, 32, 0, height, -16, -16, height + 91); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24912, -16, -16, 32, 32, 0, height, -16, -16, height + 91); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0); @@ -5741,20 +5741,20 @@ static void wooden_rc_track_diag_60_deg_down(uint8 rideIndex, uint8 trackSequenc case 2: switch (direction) { case 0: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24041, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24907, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24045, -16, -16, 32, 32, 0, height, -16, -16, height + 91); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24911, -16, -16, 32, 32, 0, height, -16, -16, height + 91); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0); @@ -5804,16 +5804,16 @@ static void wooden_rc_track_diag_flat_to_25_deg_down(uint8 rideIndex, uint8 trac sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24927, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24064, -16, -16, 32, 32, 0, height, -16, -16, height + 35); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24930, -16, -16, 32, 32, 0, height, -16, -16, height + 35); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } } else { @@ -5823,16 +5823,16 @@ static void wooden_rc_track_diag_flat_to_25_deg_down(uint8 rideIndex, uint8 trac sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24885, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24022, -16, -16, 32, 32, 0, height, -16, -16, height + 35); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24888, -16, -16, 32, 32, 0, height, -16, -16, height + 35); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } } @@ -5843,39 +5843,39 @@ static void wooden_rc_track_diag_flat_to_25_deg_down(uint8 rideIndex, uint8 trac if (track_element_is_lift_hill(mapElement)) { switch (direction) { case 0: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24059, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24925, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24063, -16, -16, 32, 32, 0, height, -16, -16, height + 35); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24929, -16, -16, 32, 32, 0, height, -16, -16, height + 35); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } } else { switch (direction) { case 0: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24017, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24883, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24021, -16, -16, 32, 32, 0, height, -16, -16, height + 35); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24887, -16, -16, 32, 32, 0, height, -16, -16, height + 35); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } } @@ -5925,16 +5925,16 @@ static void wooden_rc_track_diag_25_deg_down_to_60_deg_down(uint8 rideIndex, uin sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24903, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24040, -16, -16, 32, 32, 0, height, -16, -16, height + 59); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24906, -16, -16, 32, 32, 0, height, -16, -16, height + 59); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0); @@ -5943,20 +5943,20 @@ static void wooden_rc_track_diag_25_deg_down_to_60_deg_down(uint8 rideIndex, uin case 2: switch (direction) { case 0: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24035, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24901, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24039, -16, -16, 32, 32, 0, height, -16, -16, height + 59); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24905, -16, -16, 32, 32, 0, height, -16, -16, height + 59); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0); @@ -5996,16 +5996,16 @@ static void wooden_rc_track_diag_60_deg_down_to_25_deg_down(uint8 rideIndex, uin sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24897, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24034, -16, -16, 32, 32, 0, height, -16, -16, height + 59); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24900, -16, -16, 32, 32, 0, height, -16, -16, height + 59); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0); @@ -6014,20 +6014,20 @@ static void wooden_rc_track_diag_60_deg_down_to_25_deg_down(uint8 rideIndex, uin case 2: switch (direction) { case 0: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24029, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24895, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24033, -16, -16, 32, 32, 0, height, -16, -16, height + 59); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24899, -16, -16, 32, 32, 0, height, -16, -16, height + 59); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0); @@ -6624,16 +6624,16 @@ static void wooden_rc_track_diag_25_deg_up_to_left_bank(uint8 rideIndex, uint8 t sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24955, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24093, -16, -16, 32, 32, 0, height, -16, -16, height + 35); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24959, -16, -16, 32, 32, 0, height, -16, -16, height + 35); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0); @@ -6642,20 +6642,20 @@ static void wooden_rc_track_diag_25_deg_up_to_left_bank(uint8 rideIndex, uint8 t case 2: switch (direction) { case 0: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24091, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24957, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24094, -16, -16, 32, 32, 0, height, -16, -16, height + 35); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24960, -16, -16, 32, 32, 0, height, -16, -16, height + 35); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0); @@ -6695,16 +6695,16 @@ static void wooden_rc_track_diag_25_deg_up_to_right_bank(uint8 rideIndex, uint8 sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24961, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24099, -16, -16, 32, 32, 0, height, -16, -16, height + 35); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24965, -16, -16, 32, 32, 0, height, -16, -16, height + 35); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0); @@ -6713,20 +6713,20 @@ static void wooden_rc_track_diag_25_deg_up_to_right_bank(uint8 rideIndex, uint8 case 2: switch (direction) { case 0: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24097, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24963, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24100, -16, -16, 32, 32, 0, height, -16, -16, height + 35); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24966, -16, -16, 32, 32, 0, height, -16, -16, height + 35); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0); @@ -6766,16 +6766,16 @@ static void wooden_rc_track_diag_left_bank_to_25_deg_down(uint8 rideIndex, uint8 sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24963, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24100, -16, -16, 32, 32, 0, height, -16, -16, height + 35); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24966, -16, -16, 32, 32, 0, height, -16, -16, height + 35); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0); @@ -6784,20 +6784,20 @@ static void wooden_rc_track_diag_left_bank_to_25_deg_down(uint8 rideIndex, uint8 case 2: switch (direction) { case 0: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24095, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24961, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24099, -16, -16, 32, 32, 0, height, -16, -16, height + 35); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24965, -16, -16, 32, 32, 0, height, -16, -16, height + 35); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0); @@ -6837,16 +6837,16 @@ static void wooden_rc_track_diag_right_bank_to_25_deg_down(uint8 rideIndex, uint sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24957, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24094, -16, -16, 32, 32, 0, height, -16, -16, height + 35); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24960, -16, -16, 32, 32, 0, height, -16, -16, height + 35); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0); @@ -6855,20 +6855,20 @@ static void wooden_rc_track_diag_right_bank_to_25_deg_down(uint8 rideIndex, uint case 2: switch (direction) { case 0: - wooden_a_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(4, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 1: - wooden_a_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(5, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 2: sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24089, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24955, -16, -16, 32, 32, 2, height, -16, -16, height); sub_98197C_rotated(direction, wooden_rc_get_track_colour() | 24093, -16, -16, 32, 32, 0, height, -16, -16, height + 35); sub_98199C_rotated(direction, wooden_rc_get_rails_colour() | 24959, -16, -16, 32, 32, 0, height, -16, -16, height + 35); - wooden_a_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(2, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; case 3: - wooden_a_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); + wooden_b_supports_paint_setup(3, 0, height + 16, gTrackColours[SCHEME_SUPPORTS], NULL); break; } paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0); diff --git a/src/ride/transport/suspended_monorail.c b/src/ride/transport/suspended_monorail.c index a31d54efab..2ae519f5a3 100644 --- a/src/ride/transport/suspended_monorail.c +++ b/src/ride/transport/suspended_monorail.c @@ -39,14 +39,17 @@ static void suspended_monorail_track_flat(uint8 rideIndex, uint8 trackSequence, sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25854, 0, 0, 32, 20, 3, height + 32, 0, 6, height + 32); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); if (track_paint_util_should_paint_supports(gPaintMapPosition)) { metal_a_supports_paint_setup(3, 4, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); } + paint_util_push_tunnel_rotated(direction, height, TUNNEL_9); - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); } +/** rct2: 0x008637A4, 0x008637B4, 0x008637C4 */ static void suspended_monorail_track_station(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { static const uint32 imageIds[4][3] = { @@ -72,35 +75,41 @@ static void suspended_monorail_track_25_deg_up(uint8 rideIndex, uint8 trackSeque switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25945, 0, 0, 32, 20, 3, height + 32, 0, 6, height + 48); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 6, 0, height + 60, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25946, 0, 0, 32, 20, 3, height + 32, 0, 6, height + 48); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 8, 0, height + 60, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25947, 0, 0, 32, 20, 3, height + 32, 0, 6, height + 48); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 7, 0, height + 60, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25948, 0, 0, 32, 20, 3, height + 32, 0, 6, height + 48); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 5, 0, height + 60, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(3, 6, 0, height + 60, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(3, 8, 0, height + 60, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(3, 7, 0, height + 60, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(3, 5, 0, height + 60, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_7); } else { paint_util_push_tunnel_rotated(direction, height + 8, TUNNEL_8); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 72, 0x20); } @@ -110,35 +119,41 @@ static void suspended_monorail_track_flat_to_25_deg_up(uint8 rideIndex, uint8 tr switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25937, 0, 0, 32, 20, 3, height + 32, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 6, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25938, 0, 0, 32, 20, 3, height + 32, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 8, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25939, 0, 0, 32, 20, 3, height + 32, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 7, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25940, 0, 0, 32, 20, 3, height + 32, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 5, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(3, 6, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(3, 8, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(3, 7, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(3, 5, 0, height + 52, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_9); } else { paint_util_push_tunnel_rotated(direction, height, TUNNEL_8); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 64, 0x20); } @@ -148,35 +163,41 @@ static void suspended_monorail_track_25_deg_up_to_flat(uint8 rideIndex, uint8 tr switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25941, 0, 0, 32, 20, 3, height + 32, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 6, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); - } break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25942, 0, 0, 32, 20, 3, height + 32, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 8, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); - } break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25943, 0, 0, 32, 20, 3, height + 32, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 7, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); - } break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25944, 0, 0, 32, 20, 3, height + 32, 0, 6, height + 40); - if (track_paint_util_should_paint_supports(gPaintMapPosition)) { - metal_a_supports_paint_setup(3, 5, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); - } break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + if (track_paint_util_should_paint_supports(gPaintMapPosition)) { + switch (direction) { + case 0: + metal_a_supports_paint_setup(3, 6, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(3, 8, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(3, 7, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: + metal_a_supports_paint_setup(3, 5, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); + break; + } + } + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height - 8, TUNNEL_9); } else { paint_util_push_tunnel_rotated(direction, height + 8, TUNNEL_15); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 56, 0x20); } @@ -217,11 +238,13 @@ static void suspended_monorail_track_left_quarter_turn_5(uint8 rideIndex, uint8 sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25871, 0, 0, 32, 20, 3, height + 32, 0, 6, height + 32); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_9); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -299,7 +322,10 @@ static void suspended_monorail_track_left_quarter_turn_5(uint8 rideIndex, uint8 sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25867, 0, 0, 20, 32, 3, height + 32, 6, 0, height + 32); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 2: paint_util_push_tunnel_right(height, TUNNEL_9); @@ -308,7 +334,6 @@ static void suspended_monorail_track_left_quarter_turn_5(uint8 rideIndex, uint8 paint_util_push_tunnel_left(height, TUNNEL_9); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -340,22 +365,22 @@ static void suspended_monorail_track_s_bend_left(uint8 rideIndex, uint8 trackSeq sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25926, 0, 0, 32, 20, 3, height + 32, 0, 6, height + 32); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_9); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: switch (direction) { case 0: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25920, 0, 0, 32, 26, 3, height + 32); - metal_a_supports_paint_setup(3, 5, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25924, 0, 0, 32, 26, 3, height + 32); - metal_a_supports_paint_setup(3, 6, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25921, 0, 0, 32, 26, 3, height + 32, 0, 6, height + 32); @@ -364,7 +389,17 @@ static void suspended_monorail_track_s_bend_left(uint8 rideIndex, uint8 trackSeq sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25925, 0, 0, 32, 26, 3, height + 32, 0, 6, height + 32); break; } + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(3, 5, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(3, 6, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); + break; + } + paint_util_set_general_support_height(height + 48, 0x20); break; case 2: @@ -377,14 +412,22 @@ static void suspended_monorail_track_s_bend_left(uint8 rideIndex, uint8 trackSeq break; case 2: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25920, 0, 0, 32, 26, 3, height + 32); - metal_a_supports_paint_setup(3, 5, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25924, 0, 0, 32, 26, 3, height + 32); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + switch (direction) { + case 2: + metal_a_supports_paint_setup(3, 5, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: metal_a_supports_paint_setup(3, 6, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 48, 0x20); break; case 3: @@ -402,7 +445,10 @@ static void suspended_monorail_track_s_bend_left(uint8 rideIndex, uint8 trackSeq sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25923, 0, 0, 32, 20, 3, height + 32, 0, 6, height + 32); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 1: paint_util_push_tunnel_right(height, TUNNEL_9); @@ -411,7 +457,6 @@ static void suspended_monorail_track_s_bend_left(uint8 rideIndex, uint8 trackSeq paint_util_push_tunnel_left(height, TUNNEL_9); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -436,22 +481,22 @@ static void suspended_monorail_track_s_bend_right(uint8 rideIndex, uint8 trackSe sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25934, 0, 0, 32, 20, 3, height + 32, 0, 6, height + 32); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_9); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25928, 0, 0, 32, 26, 3, height + 32, 0, 6, height + 32); - metal_a_supports_paint_setup(3, 8, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25932, 0, 0, 32, 26, 3, height + 32, 0, 6, height + 32); - metal_a_supports_paint_setup(3, 7, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25929, 0, 0, 32, 26, 3, height + 32); @@ -460,7 +505,17 @@ static void suspended_monorail_track_s_bend_right(uint8 rideIndex, uint8 trackSe sub_98196C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25933, 0, 0, 32, 26, 3, height + 32); break; } + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_BC | SEGMENT_C0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(3, 8, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(3, 7, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); + break; + } + paint_util_set_general_support_height(height + 48, 0x20); break; case 2: @@ -473,14 +528,22 @@ static void suspended_monorail_track_s_bend_right(uint8 rideIndex, uint8 trackSe break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25928, 0, 0, 32, 26, 3, height + 32, 0, 6, height + 32); - metal_a_supports_paint_setup(3, 8, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25932, 0, 0, 32, 26, 3, height + 32, 0, 6, height + 32); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + switch (direction) { + case 2: + metal_a_supports_paint_setup(3, 8, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: metal_a_supports_paint_setup(3, 7, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 48, 0x20); break; case 3: @@ -498,7 +561,10 @@ static void suspended_monorail_track_s_bend_right(uint8 rideIndex, uint8 trackSe sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25931, 0, 0, 32, 20, 3, height + 32, 0, 6, height + 32); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 1: paint_util_push_tunnel_right(height, TUNNEL_9); @@ -507,7 +573,6 @@ static void suspended_monorail_track_s_bend_right(uint8 rideIndex, uint8 trackSe paint_util_push_tunnel_left(height, TUNNEL_9); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -532,11 +597,13 @@ static void suspended_monorail_track_left_quarter_turn_3(uint8 rideIndex, uint8 sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25857, 0, 0, 32, 20, 3, height + 32, 0, 6, height + 32); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_9); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -575,7 +642,10 @@ static void suspended_monorail_track_left_quarter_turn_3(uint8 rideIndex, uint8 sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25855, 0, 0, 20, 32, 3, height + 32, 6, 0, height + 32); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); + switch (direction) { case 2: paint_util_push_tunnel_right(height, TUNNEL_9); @@ -584,7 +654,6 @@ static void suspended_monorail_track_left_quarter_turn_3(uint8 rideIndex, uint8 paint_util_push_tunnel_left(height, TUNNEL_9); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D4, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -616,11 +685,13 @@ static void suspended_monorail_track_left_eighth_to_diag(uint8 rideIndex, uint8 sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25915, 0, 0, 32, 20, 3, height + 32, 0, 6, height + 32); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_9); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -667,22 +738,34 @@ static void suspended_monorail_track_left_eighth_to_diag(uint8 rideIndex, uint8 switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25906, 0, 0, 16, 16, 3, height + 32, 16, 16, height + 32); - metal_a_supports_paint_setup(3, 3, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25910, 0, 0, 16, 18, 3, height + 32, 0, 16, height + 32); - metal_a_supports_paint_setup(3, 1, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25914, 0, 0, 16, 16, 3, height + 32, 0, 0, height + 32); - metal_a_supports_paint_setup(3, 0, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25918, 0, 0, 16, 16, 3, height + 32, 16, 0, height + 32); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(3, 3, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(3, 1, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(3, 0, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: metal_a_supports_paint_setup(3, 2, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -707,11 +790,13 @@ static void suspended_monorail_track_right_eighth_to_diag(uint8 rideIndex, uint8 sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25899, 0, 0, 32, 20, 3, height + 32, 0, 6, height + 32); break; } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); metal_a_supports_paint_setup(3, 4, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); + if (direction == 0 || direction == 3) { paint_util_push_tunnel_rotated(direction, height, TUNNEL_9); } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); paint_util_set_general_support_height(height + 48, 0x20); break; case 1: @@ -758,22 +843,34 @@ static void suspended_monorail_track_right_eighth_to_diag(uint8 rideIndex, uint8 switch (direction) { case 0: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25890, 0, 0, 16, 16, 3, height + 32, 16, 0, height + 32); - metal_a_supports_paint_setup(3, 1, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; case 1: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25894, 0, 0, 16, 16, 3, height + 32, 0, 0, height + 32); - metal_a_supports_paint_setup(3, 0, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; case 2: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25898, 0, 0, 16, 18, 3, height + 32, 0, 16, height + 32); - metal_a_supports_paint_setup(3, 2, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; case 3: sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25902, 0, 0, 16, 16, 3, height + 32, 16, 16, height + 32); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + switch (direction) { + case 0: + metal_a_supports_paint_setup(3, 1, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); + break; + case 1: + metal_a_supports_paint_setup(3, 0, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); + break; + case 2: + metal_a_supports_paint_setup(3, 2, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); + break; + case 3: metal_a_supports_paint_setup(3, 3, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_D0 | SEGMENT_D4, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -825,12 +922,18 @@ static void suspended_monorail_track_diag_flat(uint8 rideIndex, uint8 trackSeque paint_util_set_general_support_height(height + 48, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25936, -16, -16, 32, 32, 3, height + 32, -16, -16, height + 32); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(3, 1, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25936, -16, -16, 32, 32, 3, height + 32, -16, -16, height + 32); metal_a_supports_paint_setup(3, 0, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -840,7 +943,7 @@ static void suspended_monorail_track_diag_flat(uint8 rideIndex, uint8 trackSeque metal_a_supports_paint_setup(3, 3, 0, height + 42, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 48, 0x20); break; } @@ -878,12 +981,18 @@ static void suspended_monorail_track_diag_25_deg_up(uint8 rideIndex, uint8 track paint_util_set_general_support_height(height + 72, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25958, -16, -16, 32, 32, 3, height + 32, -16, -16, height + 48); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(3, 1, 0, height + 55, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25958, -16, -16, 32, 32, 3, height + 32, -16, -16, height + 48); metal_a_supports_paint_setup(3, 0, 0, height + 55, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -893,7 +1002,7 @@ static void suspended_monorail_track_diag_25_deg_up(uint8 rideIndex, uint8 track metal_a_supports_paint_setup(3, 3, 0, height + 57, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 72, 0x20); break; } @@ -931,12 +1040,18 @@ static void suspended_monorail_track_diag_flat_to_25_deg_up(uint8 rideIndex, uin paint_util_set_general_support_height(height + 64, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25950, -16, -16, 32, 32, 3, height + 32, -16, -16, height + 40); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(3, 1, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25950, -16, -16, 32, 32, 3, height + 32, -16, -16, height + 40); metal_a_supports_paint_setup(3, 0, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -946,7 +1061,7 @@ static void suspended_monorail_track_diag_flat_to_25_deg_up(uint8 rideIndex, uin metal_a_supports_paint_setup(3, 3, 0, height + 50, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 64, 0x20); break; } @@ -984,12 +1099,18 @@ static void suspended_monorail_track_diag_25_deg_up_to_flat(uint8 rideIndex, uin paint_util_set_general_support_height(height + 72, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25954, -16, -16, 32, 32, 3, height + 32, -16, -16, height + 40); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(3, 1, 0, height + 51, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25954, -16, -16, 32, 32, 3, height + 32, -16, -16, height + 40); metal_a_supports_paint_setup(3, 0, 0, height + 51, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -999,7 +1120,7 @@ static void suspended_monorail_track_diag_25_deg_up_to_flat(uint8 rideIndex, uin metal_a_supports_paint_setup(3, 3, 0, height + 51, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 72, 0x20); break; } @@ -1037,12 +1158,18 @@ static void suspended_monorail_track_diag_25_deg_down(uint8 rideIndex, uint8 tra paint_util_set_general_support_height(height + 72, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25960, -16, -16, 32, 32, 3, height + 32, -16, -16, height + 48); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(3, 1, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25960, -16, -16, 32, 32, 3, height + 32, -16, -16, height + 48); metal_a_supports_paint_setup(3, 0, 0, height + 54, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -1052,7 +1179,7 @@ static void suspended_monorail_track_diag_25_deg_down(uint8 rideIndex, uint8 tra metal_a_supports_paint_setup(3, 3, 0, height + 58, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 72, 0x20); break; } @@ -1090,12 +1217,18 @@ static void suspended_monorail_track_diag_flat_to_25_deg_down(uint8 rideIndex, u paint_util_set_general_support_height(height + 72, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25956, -16, -16, 32, 32, 3, height + 32, -16, -16, height + 40); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(3, 1, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25956, -16, -16, 32, 32, 3, height + 32, -16, -16, height + 40); metal_a_supports_paint_setup(3, 0, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -1105,7 +1238,7 @@ static void suspended_monorail_track_diag_flat_to_25_deg_down(uint8 rideIndex, u metal_a_supports_paint_setup(3, 3, 0, height + 48, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 72, 0x20); break; } @@ -1143,12 +1276,18 @@ static void suspended_monorail_track_diag_25_deg_down_to_flat(uint8 rideIndex, u paint_util_set_general_support_height(height + 64, 0x20); break; case 3: + switch (direction) { + case 1: + sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25952, -16, -16, 32, 32, 3, height + 32, -16, -16, height + 40); + break; + } + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); switch (direction) { case 0: metal_a_supports_paint_setup(3, 1, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); break; case 1: - sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25952, -16, -16, 32, 32, 3, height + 32, -16, -16, height + 40); metal_a_supports_paint_setup(3, 0, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); break; case 2: @@ -1158,7 +1297,7 @@ static void suspended_monorail_track_diag_25_deg_down_to_flat(uint8 rideIndex, u metal_a_supports_paint_setup(3, 3, 0, height + 46, gTrackColours[SCHEME_SUPPORTS]); break; } - paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 64, 0x20); break; } diff --git a/test/testpaint/generate.cpp b/test/testpaint/generate.cpp index 9eec9ff9f5..417774d751 100644 --- a/test/testpaint/generate.cpp +++ b/test/testpaint/generate.cpp @@ -724,7 +724,7 @@ private: "metal_a_supports_paint_setup", "metal_b_supports_paint_setup", "wooden_a_supports_paint_setup", - "wooden_a_supports_paint_setup", + "wooden_b_supports_paint_setup", }; return functionNames[function]; } diff --git a/test/testpaint/intercept.c b/test/testpaint/intercept.c index 6a0c6dabfd..9bd7539a6d 100644 --- a/test/testpaint/intercept.c +++ b/test/testpaint/intercept.c @@ -400,7 +400,7 @@ static void printFunctionCall(utf8string out, size_t len, function_call call) { snprintf(out, len, "wooden_a_supports_paint_setup(%d, %d, %d, %s)", call.supports.type, call.supports.special, call.supports.height, imageId); return; case SUPPORTS_WOOD_B: - snprintf(out, len, "wooden_a_supports_paint_setup(%d, %d, %d, %s)", call.supports.type, call.supports.special, call.supports.height, imageId); + snprintf(out, len, "wooden_b_supports_paint_setup(%d, %d, %d, %s)", call.supports.type, call.supports.special, call.supports.height, imageId); return; case SUPPORTS_METAL_A: