1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 11:03:00 +01:00

Fix inverted roller coaster painting

This commit is contained in:
Ted John
2016-10-09 22:29:32 +01:00
parent 62627af582
commit 5a38697f1f
2 changed files with 26 additions and 6 deletions

View File

@@ -62,6 +62,25 @@ static void inverted_rc_track_flat(uint8 rideIndex, uint8 trackSequence, uint8 d
paint_util_set_general_support_height(height + 48, 0x20);
}
static void inverted_rc_track_station(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
static const uint32 imageIds[4][3] = {
{ SPR_STATION_BASE_C_SW_NE, 27131, SPR_STATION_INVERTED_BAR_C_SW_NE },
{ SPR_STATION_BASE_C_NW_SE, 27132, SPR_STATION_INVERTED_BAR_C_NW_SE },
{ SPR_STATION_BASE_C_SW_NE, 27131, SPR_STATION_INVERTED_BAR_C_SW_NE },
{ SPR_STATION_BASE_C_NW_SE, 27132, SPR_STATION_INVERTED_BAR_C_NW_SE },
};
sub_98197C_rotated(direction, imageIds[direction][0] | gTrackColours[SCHEME_MISC], 0, 0, 32, 28, 1, height, 0, 2, height);
sub_98197C_rotated(direction, imageIds[direction][1] | gTrackColours[SCHEME_TRACK], 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29);
sub_98199C_rotated(direction, imageIds[direction][2] | gTrackColours[SCHEME_SUPPORTS], 0, 6, 32, 20, 3, height + 29, 0, 6, height + 29);
track_paint_util_draw_station_metal_supports_2(direction, height, gTrackColours[SCHEME_SUPPORTS], 3);
track_paint_util_draw_station_inverted(rideIndex, trackSequence, direction, height, mapElement);
paint_util_push_tunnel_rotated(direction, height, TUNNEL_9);
paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0);
paint_util_set_general_support_height(height + 48, 0x20);
}
static void inverted_rc_track_25_deg_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
if (track_element_is_lift_hill(mapElement)) {
@@ -3181,32 +3200,27 @@ static void inverted_rc_track_on_ride_photo(uint8 rideIndex, uint8 trackSequence
metal_a_supports_paint_setup(3, 5, 0, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(3, 8, 0, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27129, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29);
sub_98196C_rotated(direction, gTrackColours[SCHEME_MISC] | 25623, 26, 0, 1, 1, 19, height + 3);
break;
case 1:
sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height);
metal_a_supports_paint_setup(3, 6, 0, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(3, 7, 0, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27130, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29);
sub_98196C_rotated(direction, gTrackColours[SCHEME_MISC] | 25624, 6, 0, 1, 1, 19, height + 3);
break;
case 2:
sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height);
metal_a_supports_paint_setup(3, 5, 0, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(3, 8, 0, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27129, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29);
sub_98196C_rotated(direction, gTrackColours[SCHEME_MISC] | 25625, 6, 0, 1, 1, 19, height + 3);
break;
case 3:
sub_98196C_rotated(direction, 0x20000000 | 22432, 0, 0, 32, 32, 1, height);
metal_a_supports_paint_setup(3, 6, 0, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(3, 7, 0, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 27130, 0, 0, 32, 20, 3, height + 29, 0, 6, height + 29);
sub_98196C_rotated(direction, gTrackColours[SCHEME_MISC] | 25626, 26, 0, 1, 1, 19, height + 3);
break;
}
sub_98196C_rotated(direction, 0x00000000, 0, 0, 0, 0, 0, height - 48);
sub_98196C_rotated(direction, 0x00000000, 0, 0, 0, 0, 0, height - 48);
track_paint_util_onride_photo_paint(direction, height + 3, mapElement);
paint_util_push_tunnel_rotated(direction, height, TUNNEL_3);
paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0);
paint_util_set_general_support_height(height + 64, 0x20);
@@ -6503,6 +6517,10 @@ TRACK_PAINT_FUNCTION get_track_paint_function_inverted_rc(int trackType, int dir
switch (trackType) {
case TRACK_ELEM_FLAT:
return inverted_rc_track_flat;
case TRACK_ELEM_END_STATION:
case TRACK_ELEM_BEGIN_STATION:
case TRACK_ELEM_MIDDLE_STATION:
return inverted_rc_track_station;
case TRACK_ELEM_25_DEG_UP:
return inverted_rc_track_25_deg_up;
case TRACK_ELEM_60_DEG_UP:

View File

@@ -125,6 +125,8 @@ enum {
SPR_STATION_INVERTED_LIGHT_BACK_ANGLE_FENCED_NE_SW = 22396,
SPR_STATION_INVERTED_LIGHT_BACK_ANGLE_FENCED_NW_SE = 22397,
SPR_STATION_INVERTED_BAR_C_SW_NE = 22398,
SPR_STATION_INVERTED_BAR_C_NW_SE = 22399,
SPR_STATION_PIER_EDGE_SE = 22404,
SPR_STATION_PIER_EDGE_SW = 22405,