1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-06 06:32:56 +01:00

Fix inverted hairpin coaster painting

This commit is contained in:
Ted John
2016-10-09 21:56:17 +01:00
parent a7e3fa5471
commit 53bc7d51c8
2 changed files with 25 additions and 0 deletions

View File

@@ -66,6 +66,25 @@ static void inverted_hairpin_rc_track_flat(uint8 rideIndex, uint8 trackSequence,
paint_util_set_general_support_height(height + 32, 0x20);
}
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] = {
{ SPR_STATION_BASE_C_SW_NE, 17028, SPR_STATION_INVERTED_BAR_0_SW_NE },
{ SPR_STATION_BASE_C_NW_SE, 17029, SPR_STATION_INVERTED_BAR_0_NW_SE },
{ SPR_STATION_BASE_C_SW_NE, 17028, SPR_STATION_INVERTED_BAR_0_SW_NE },
{ SPR_STATION_BASE_C_NW_SE, 17029, SPR_STATION_INVERTED_BAR_0_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 + 24, 0, 6, height + 24);
sub_98199C_rotated(direction, imageIds[direction][2] | gTrackColours[SCHEME_SUPPORTS], 0, 6, 32, 20, 1, height + 24, 0, 6, height + 24);
track_paint_util_draw_station_metal_supports_2(direction, height, gTrackColours[SCHEME_SUPPORTS], 11);
track_paint_util_draw_station_inverted(rideIndex, trackSequence, direction, height, mapElement);
paint_util_push_tunnel_rotated(direction, height, TUNNEL_6);
paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0);
paint_util_set_general_support_height(height + 32, 0x20);
}
static void inverted_hairpin_rc_track_25_deg_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
if (track_element_is_lift_hill(mapElement)) {
@@ -861,6 +880,10 @@ TRACK_PAINT_FUNCTION get_track_paint_function_inverted_hairpin_rc(int trackType,
switch (trackType) {
case TRACK_ELEM_FLAT:
return inverted_hairpin_rc_track_flat;
case TRACK_ELEM_END_STATION:
case TRACK_ELEM_BEGIN_STATION:
case TRACK_ELEM_MIDDLE_STATION:
return inverted_hairpin_rc_track_station;
case TRACK_ELEM_25_DEG_UP:
return inverted_hairpin_rc_track_25_deg_up;
case TRACK_ELEM_60_DEG_UP:

View File

@@ -141,6 +141,8 @@ enum {
SPR_STATION_NARROW_EDGE_NW = 22416,
SPR_STATION_NARROW_EDGE_NE = 22417,
SPR_STATION_INVERTED_BAR_0_SW_NE = 22420,
SPR_STATION_INVERTED_BAR_0_NW_SE = 22421,
SPR_STATION_INVERTED_BAR_A_SW_NE = 22422,
SPR_STATION_INVERTED_BAR_A_NW_SE = 22423,
SPR_STATION_INVERTED_BAR_B_SW_NE = 22424,