Fix station and on-ride photo painting for generated rides
This commit is contained in:
Michał Janiszewski authored and GitHub committed 2016-10-10 08:00:09 +02:00
commit 4d4cc68d91
30 files changed
+977 -12128

No files matched your search

+22
View File
@@ -66,6 +66,24 @@ static void bobsleigh_rc_track_flat(uint8 rideIndex, uint8 trackSequence, uint8
paint_util_set_general_support_height(height + 32, 0x20);
}
static void bobsleigh_rc_track_station(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
static const uint32 imageIds[4][2] = {
{ 14580, SPR_STATION_BASE_B_SW_NE },
{ 14581, SPR_STATION_BASE_B_NW_SE },
{ 14580, SPR_STATION_BASE_B_SW_NE },
{ 14581, SPR_STATION_BASE_B_NW_SE },
};
sub_98197C_rotated(direction, imageIds[direction][0] | gTrackColours[SCHEME_TRACK], 0, 0, 32, 20, 1, height, 0, 6, height + 3);
sub_98196C_rotated(direction, imageIds[direction][1] | gTrackColours[SCHEME_MISC], 0, 0, 32, 32, 1, height);
track_paint_util_draw_station_metal_supports_2(direction, height, gTrackColours[SCHEME_SUPPORTS], 0);
track_paint_util_draw_station(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 bobsleigh_rc_track_25_deg_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
if (track_element_is_lift_hill(mapElement)) {
@@ -2191,6 +2209,10 @@ TRACK_PAINT_FUNCTION get_track_paint_function_bobsleigh_rc(int trackType, int di
switch (trackType) {
case TRACK_ELEM_FLAT:
return bobsleigh_rc_track_flat;
case TRACK_ELEM_END_STATION:
case TRACK_ELEM_BEGIN_STATION:
case TRACK_ELEM_MIDDLE_STATION:
return bobsleigh_rc_track_station;
case TRACK_ELEM_25_DEG_UP:
return bobsleigh_rc_track_25_deg_up;
case TRACK_ELEM_FLAT_TO_25_DEG_UP:
+24 -6
View File
@@ -62,6 +62,25 @@ static void compact_inverted_rc_track_flat(uint8 rideIndex, uint8 trackSequence,
paint_util_set_general_support_height(height + 48, 0x20);
}
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] = {
{ SPR_STATION_BASE_C_SW_NE, 26557, SPR_STATION_INVERTED_BAR_A_SW_NE },
{ SPR_STATION_BASE_C_NW_SE, 26558, SPR_STATION_INVERTED_BAR_A_NW_SE },
{ SPR_STATION_BASE_C_SW_NE, 26557, SPR_STATION_INVERTED_BAR_A_SW_NE },
{ SPR_STATION_BASE_C_NW_SE, 26558, SPR_STATION_INVERTED_BAR_A_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], 11);
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 compact_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)) {
@@ -3174,32 +3193,27 @@ static void compact_inverted_rc_track_on_ride_photo(uint8 rideIndex, uint8 track
metal_a_supports_paint_setup(11, 5, 0, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(11, 8, 0, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26555, 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(11, 6, 0, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(11, 7, 0, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26556, 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(11, 5, 0, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(11, 8, 0, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26555, 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(11, 6, 0, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(11, 7, 0, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26556, 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);
@@ -5504,6 +5518,10 @@ TRACK_PAINT_FUNCTION get_track_paint_function_compact_inverted_rc(int trackType,
switch (trackType) {
case TRACK_ELEM_FLAT:
return compact_inverted_rc_track_flat;
case TRACK_ELEM_END_STATION:
case TRACK_ELEM_BEGIN_STATION:
case TRACK_ELEM_MIDDLE_STATION:
return compact_inverted_rc_track_station;
case TRACK_ELEM_25_DEG_UP:
return compact_inverted_rc_track_25_deg_up;
case TRACK_ELEM_60_DEG_UP:
+27 -6
View File
@@ -66,6 +66,28 @@ static void corkscrew_rc_track_flat(uint8 rideIndex, uint8 trackSequence, uint8
paint_util_set_general_support_height(height + 32, 0x20);
}
static void corkscrew_rc_track_station(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
static const uint32 imageIds[4][3] = {
{ 16236, 16232, SPR_STATION_BASE_A_SW_NE },
{ 16237, 16233, SPR_STATION_BASE_A_NW_SE },
{ 16236, 16232, SPR_STATION_BASE_A_SW_NE },
{ 16237, 16233, SPR_STATION_BASE_A_NW_SE },
};
if (mapElement->properties.track.type == TRACK_ELEM_END_STATION) {
sub_98197C_rotated(direction, imageIds[direction][1] | gTrackColours[SCHEME_TRACK], 0, 0, 32, 20, 1, height, 0, 6, height + 3);
} else {
sub_98197C_rotated(direction, imageIds[direction][0] | gTrackColours[SCHEME_TRACK], 0, 0, 32, 20, 1, height, 0, 6, height + 3);
}
sub_98196C_rotated(direction, imageIds[direction][2] | gTrackColours[SCHEME_MISC], 0, 0, 32, 32, 1, height);
track_paint_util_draw_station_metal_supports_2(direction, height, gTrackColours[SCHEME_SUPPORTS], 0);
track_paint_util_draw_station_2(rideIndex, trackSequence, direction, height, mapElement, 9, 11);
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 corkscrew_rc_track_25_deg_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
if (track_element_is_lift_hill(mapElement)) {
@@ -3160,32 +3182,27 @@ static void corkscrew_rc_track_on_ride_photo(uint8 rideIndex, uint8 trackSequenc
metal_a_supports_paint_setup(0, 5, 0, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(0, 8, 0, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 16224, 0, 0, 32, 20, 0, height, 0, 6, height + 3);
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(0, 6, 0, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(0, 7, 0, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 16225, 0, 0, 32, 20, 0, height, 0, 6, height + 3);
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(0, 5, 0, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(0, 8, 0, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 16224, 0, 0, 32, 20, 0, height, 0, 6, height + 3);
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(0, 6, 0, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(0, 7, 0, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 16225, 0, 0, 32, 20, 0, height, 0, 6, height + 3);
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_0);
paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0);
paint_util_set_general_support_height(height + 48, 0x20);
@@ -5772,6 +5789,10 @@ TRACK_PAINT_FUNCTION get_track_paint_function_corkscrew_rc(int trackType, int di
switch (trackType) {
case TRACK_ELEM_FLAT:
return corkscrew_rc_track_flat;
case TRACK_ELEM_END_STATION:
case TRACK_ELEM_BEGIN_STATION:
case TRACK_ELEM_MIDDLE_STATION:
return corkscrew_rc_track_station;
case TRACK_ELEM_25_DEG_UP:
return corkscrew_rc_track_25_deg_up;
case TRACK_ELEM_60_DEG_UP:
+27 -6
View File
@@ -66,6 +66,28 @@ static void flying_rc_track_flat(uint8 rideIndex, uint8 trackSequence, uint8 dir
paint_util_set_general_support_height(height + 32, 0x20);
}
static void flying_rc_track_station(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
static const uint32 imageIds[4][3] = {
{ 17154, 17150, SPR_STATION_BASE_A_SW_NE },
{ 17155, 17151, SPR_STATION_BASE_A_NW_SE },
{ 17154, 17150, SPR_STATION_BASE_A_SW_NE },
{ 17155, 17151, SPR_STATION_BASE_A_NW_SE },
};
if (mapElement->properties.track.type == TRACK_ELEM_END_STATION) {
sub_98197C_rotated(direction, imageIds[direction][1] | gTrackColours[SCHEME_TRACK], 0, 0, 32, 20, 1, height, 0, 6, height + 3);
} else {
sub_98197C_rotated(direction, imageIds[direction][0] | gTrackColours[SCHEME_TRACK], 0, 0, 32, 20, 1, height, 0, 6, height + 3);
}
sub_98196C_rotated(direction, imageIds[direction][2] | gTrackColours[SCHEME_MISC], 0, 0, 32, 32, 1, height);
track_paint_util_draw_station_metal_supports_2(direction, height, gTrackColours[SCHEME_SUPPORTS], 11);
track_paint_util_draw_station_2(rideIndex, trackSequence, direction, height, mapElement, 9, 11);
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 flying_rc_track_25_deg_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
switch (direction) {
@@ -2942,32 +2964,27 @@ static void flying_rc_track_on_ride_photo(uint8 rideIndex, uint8 trackSequence,
metal_a_supports_paint_setup(11, 5, 0, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(11, 8, 0, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17146, 0, 0, 32, 20, 0, height, 0, 6, height + 3);
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(11, 6, 0, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(11, 7, 0, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17147, 0, 0, 32, 20, 0, height, 0, 6, height + 3);
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(11, 5, 0, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(11, 8, 0, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17146, 0, 0, 32, 20, 0, height, 0, 6, height + 3);
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(11, 6, 0, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(11, 7, 0, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17147, 0, 0, 32, 20, 0, height, 0, 6, height + 3);
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_6);
paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0);
paint_util_set_general_support_height(height + 48, 0x20);
@@ -6605,6 +6622,10 @@ TRACK_PAINT_FUNCTION get_track_paint_function_flying_rc(int trackType, int direc
switch (trackType) {
case TRACK_ELEM_FLAT:
return flying_rc_track_flat;
case TRACK_ELEM_END_STATION:
case TRACK_ELEM_BEGIN_STATION:
case TRACK_ELEM_MIDDLE_STATION:
return flying_rc_track_station;
case TRACK_ELEM_25_DEG_UP:
return flying_rc_track_25_deg_up;
case TRACK_ELEM_60_DEG_UP:
+27 -6
View File
@@ -80,6 +80,28 @@ static void giga_rc_track_flat(uint8 rideIndex, uint8 trackSequence, uint8 direc
paint_util_set_general_support_height(height + 32, 0x20);
}
static void giga_rc_track_station(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
static const uint32 imageIds[4][3] = {
{ 18084, 18076, SPR_STATION_BASE_A_SW_NE },
{ 18085, 18077, SPR_STATION_BASE_A_NW_SE },
{ 18084, 18076, SPR_STATION_BASE_A_SW_NE },
{ 18085, 18077, SPR_STATION_BASE_A_NW_SE },
};
if (mapElement->properties.track.type == TRACK_ELEM_END_STATION) {
sub_98197C_rotated(direction, imageIds[direction][1] | gTrackColours[SCHEME_TRACK], 0, 0, 32, 20, 1, height, 0, 6, height + 3);
} else {
sub_98197C_rotated(direction, imageIds[direction][0] | gTrackColours[SCHEME_TRACK], 0, 0, 32, 20, 1, height, 0, 6, height + 3);
}
sub_98196C_rotated(direction, imageIds[direction][2] | gTrackColours[SCHEME_MISC], 0, 0, 32, 32, 1, height);
track_paint_util_draw_station_metal_supports_2(direction, height, gTrackColours[SCHEME_SUPPORTS], 0);
track_paint_util_draw_station_2(rideIndex, trackSequence, direction, height, mapElement, 9, 11);
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 giga_rc_track_25_deg_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
if (track_element_is_cable_lift(mapElement)) {
@@ -2682,32 +2704,27 @@ static void giga_rc_track_on_ride_photo(uint8 rideIndex, uint8 trackSequence, ui
metal_a_supports_paint_setup(0, 5, 0, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(0, 8, 0, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 18074, 0, 0, 32, 20, 0, height, 0, 6, height + 3);
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(0, 6, 0, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(0, 7, 0, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 18075, 0, 0, 32, 20, 0, height, 0, 6, height + 3);
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(0, 5, 0, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(0, 8, 0, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 18074, 0, 0, 32, 20, 0, height, 0, 6, height + 3);
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(0, 6, 0, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(0, 7, 0, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 18075, 0, 0, 32, 20, 0, height, 0, 6, height + 3);
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_6);
paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0);
paint_util_set_general_support_height(height + 48, 0x20);
@@ -6031,6 +6048,10 @@ TRACK_PAINT_FUNCTION get_track_paint_function_giga_rc(int trackType, int directi
switch (trackType) {
case TRACK_ELEM_FLAT:
return giga_rc_track_flat;
case TRACK_ELEM_END_STATION:
case TRACK_ELEM_BEGIN_STATION:
case TRACK_ELEM_MIDDLE_STATION:
return giga_rc_track_station;
case TRACK_ELEM_25_DEG_UP:
return giga_rc_track_25_deg_up;
case TRACK_ELEM_60_DEG_UP:
+30 -8
View File
@@ -72,6 +72,24 @@ static void heartline_twister_rc_track_flat(uint8 rideIndex, uint8 trackSequence
paint_util_set_general_support_height(height + 32, 0x20);
}
static void heartline_twister_rc_track_station(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
static const uint32 imageIds[4][3] = {
{ 19732, SPR_STATION_BASE_B_SW_NE },
{ 19733, SPR_STATION_BASE_B_NW_SE },
{ 19732, SPR_STATION_BASE_B_SW_NE },
{ 19733, SPR_STATION_BASE_B_NW_SE },
};
sub_98197C_rotated(direction, imageIds[direction][0] | gTrackColours[SCHEME_TRACK], 0, 0, 32, 20, 1, height, 0, 6, height + 3);
sub_98196C_rotated(direction, imageIds[direction][1] | gTrackColours[SCHEME_MISC], 0, 0, 32, 32, 1, height);
track_paint_util_draw_station_metal_supports_2(direction, height, gTrackColours[SCHEME_SUPPORTS], 0);
track_paint_util_draw_station(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 heartline_twister_rc_track_25_deg_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
if (track_element_is_lift_hill(mapElement)) {
@@ -491,28 +509,28 @@ static void heartline_twister_rc_track_heartline_transfer_up(uint8 rideIndex, ui
sub_98199C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21308, 0, 0, 32, 20, 2, height + 16, 0, 6, height + 16);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21318, 0, 0, 32, 1, 34, height + 8, 0, 27, height + 8);
sub_98199C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21312, 0, 0, 32, 1, 34, height + 16, 0, 27, height + 16);
wooden_a_supports_paint_setup(6, 5, height + 8, 0x00000000, NULL);
wooden_a_supports_paint_setup(6, 5, height + 8, gTrackColours[SCHEME_SUPPORTS], NULL);
break;
case 1:
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21315, 0, 0, 32, 20, 2, height + 8, 0, 6, height + 8);
sub_98199C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21309, 0, 0, 32, 20, 2, height + 16, 0, 6, height + 16);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21319, 0, 0, 32, 1, 34, height + 8, 0, 27, height + 8);
sub_98199C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21313, 0, 0, 32, 1, 34, height + 16, 0, 27, height + 16);
wooden_a_supports_paint_setup(7, 6, height + 8, 0x00000000, NULL);
wooden_a_supports_paint_setup(7, 6, height + 8, gTrackColours[SCHEME_SUPPORTS], NULL);
break;
case 2:
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21316, 0, 0, 32, 20, 2, height + 8, 0, 6, height + 8);
sub_98199C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21306, 0, 0, 32, 20, 2, height + 16, 0, 6, height + 16);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21320, 0, 0, 32, 1, 34, height + 8, 0, 27, height + 8);
sub_98199C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21310, 0, 0, 32, 1, 34, height + 16, 0, 27, height + 16);
wooden_a_supports_paint_setup(6, 7, height + 8, 0x00000000, NULL);
wooden_a_supports_paint_setup(6, 7, height + 8, gTrackColours[SCHEME_SUPPORTS], NULL);
break;
case 3:
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21317, 0, 0, 32, 20, 2, height + 8, 0, 6, height + 8);
sub_98199C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21307, 0, 0, 32, 20, 2, height + 16, 0, 6, height + 16);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21321, 0, 0, 32, 1, 34, height + 8, 0, 27, height + 8);
sub_98199C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21311, 0, 0, 32, 1, 34, height + 16, 0, 27, height + 16);
wooden_a_supports_paint_setup(7, 8, height + 8, 0x00000000, NULL);
wooden_a_supports_paint_setup(7, 8, height + 8, gTrackColours[SCHEME_SUPPORTS], NULL);
break;
}
paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0);
@@ -611,28 +629,28 @@ static void heartline_twister_rc_track_heartline_transfer_down(uint8 rideIndex,
sub_98199C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21308, 0, 0, 32, 20, 2, height + 16, 0, 6, height + 16);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21318, 0, 0, 32, 1, 34, height + 8, 0, 27, height + 8);
sub_98199C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21312, 0, 0, 32, 1, 34, height + 16, 0, 27, height + 16);
wooden_a_supports_paint_setup(6, 5, height + 8, 0x00000000, NULL);
wooden_a_supports_paint_setup(6, 5, height + 8, gTrackColours[SCHEME_SUPPORTS], NULL);
break;
case 1:
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21315, 0, 0, 32, 20, 2, height + 8, 0, 6, height + 8);
sub_98199C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21309, 0, 0, 32, 20, 2, height + 16, 0, 6, height + 16);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21319, 0, 0, 32, 1, 34, height + 8, 0, 27, height + 8);
sub_98199C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21313, 0, 0, 32, 1, 34, height + 16, 0, 27, height + 16);
wooden_a_supports_paint_setup(7, 6, height + 8, 0x00000000, NULL);
wooden_a_supports_paint_setup(7, 6, height + 8, gTrackColours[SCHEME_SUPPORTS], NULL);
break;
case 2:
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21316, 0, 0, 32, 20, 2, height + 8, 0, 6, height + 8);
sub_98199C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21306, 0, 0, 32, 20, 2, height + 16, 0, 6, height + 16);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21320, 0, 0, 32, 1, 34, height + 8, 0, 27, height + 8);
sub_98199C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21310, 0, 0, 32, 1, 34, height + 16, 0, 27, height + 16);
wooden_a_supports_paint_setup(6, 7, height + 8, 0x00000000, NULL);
wooden_a_supports_paint_setup(6, 7, height + 8, gTrackColours[SCHEME_SUPPORTS], NULL);
break;
case 3:
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21317, 0, 0, 32, 20, 2, height + 8, 0, 6, height + 8);
sub_98199C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21307, 0, 0, 32, 20, 2, height + 16, 0, 6, height + 16);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21321, 0, 0, 32, 1, 34, height + 8, 0, 27, height + 8);
sub_98199C_rotated(direction, gTrackColours[SCHEME_TRACK] | 21311, 0, 0, 32, 1, 34, height + 16, 0, 27, height + 16);
wooden_a_supports_paint_setup(7, 8, height + 8, 0x00000000, NULL);
wooden_a_supports_paint_setup(7, 8, height + 8, gTrackColours[SCHEME_SUPPORTS], NULL);
break;
}
paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0);
@@ -1031,6 +1049,10 @@ TRACK_PAINT_FUNCTION get_track_paint_function_heartline_twister_rc(int trackType
switch (trackType) {
case TRACK_ELEM_FLAT:
return heartline_twister_rc_track_flat;
case TRACK_ELEM_END_STATION:
case TRACK_ELEM_BEGIN_STATION:
case TRACK_ELEM_MIDDLE_STATION:
return heartline_twister_rc_track_station;
case TRACK_ELEM_25_DEG_UP:
return heartline_twister_rc_track_25_deg_up;
case TRACK_ELEM_60_DEG_UP:
@@ -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:
@@ -46,6 +46,25 @@ static void inverted_impulse_rc_track_flat(uint8 rideIndex, uint8 trackSequence,
paint_util_set_general_support_height(height + 48, 0x20);
}
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] = {
{ SPR_STATION_BASE_C_SW_NE, 19662, SPR_STATION_INVERTED_BAR_B_SW_NE },
{ SPR_STATION_BASE_C_NW_SE, 19663, SPR_STATION_INVERTED_BAR_B_NW_SE },
{ SPR_STATION_BASE_C_SW_NE, 19662, SPR_STATION_INVERTED_BAR_B_SW_NE },
{ SPR_STATION_BASE_C_NW_SE, 19663, SPR_STATION_INVERTED_BAR_B_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], 11);
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_impulse_rc_track_25_deg_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
switch (direction) {
@@ -449,6 +468,10 @@ TRACK_PAINT_FUNCTION get_track_paint_function_inverted_impulse_rc(int trackType,
switch (trackType) {
case TRACK_ELEM_FLAT:
return inverted_impulse_rc_track_flat;
case TRACK_ELEM_END_STATION:
case TRACK_ELEM_BEGIN_STATION:
case TRACK_ELEM_MIDDLE_STATION:
return inverted_impulse_rc_track_station;
case TRACK_ELEM_25_DEG_UP:
return inverted_impulse_rc_track_25_deg_up;
case TRACK_ELEM_60_DEG_UP:
+24 -6
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:
+27 -6
View File
@@ -66,6 +66,28 @@ static void lay_down_rc_track_flat(uint8 rideIndex, uint8 trackSequence, uint8 d
paint_util_set_general_support_height(height + 32, 0x20);
}
static void lay_down_rc_track_station(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
static const uint32 imageIds[4][3] = {
{ 16236, 16232, SPR_STATION_BASE_A_SW_NE },
{ 16237, 16233, SPR_STATION_BASE_A_NW_SE },
{ 16236, 16232, SPR_STATION_BASE_A_SW_NE },
{ 16237, 16233, SPR_STATION_BASE_A_NW_SE },
};
if (mapElement->properties.track.type == TRACK_ELEM_END_STATION) {
sub_98197C_rotated(direction, imageIds[direction][1] | gTrackColours[SCHEME_TRACK], 0, 0, 32, 20, 1, height, 0, 6, height + 3);
} else {
sub_98197C_rotated(direction, imageIds[direction][0] | gTrackColours[SCHEME_TRACK], 0, 0, 32, 20, 1, height, 0, 6, height + 3);
}
sub_98196C_rotated(direction, imageIds[direction][2] | gTrackColours[SCHEME_MISC], 0, 0, 32, 32, 1, height);
track_paint_util_draw_station_metal_supports_2(direction, height, gTrackColours[SCHEME_SUPPORTS], 11);
track_paint_util_draw_station_2(rideIndex, trackSequence, direction, height, mapElement, 9, 11);
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 lay_down_rc_track_25_deg_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
if (track_element_is_lift_hill(mapElement)) {
@@ -2910,32 +2932,27 @@ static void lay_down_rc_track_on_ride_photo(uint8 rideIndex, uint8 trackSequence
metal_a_supports_paint_setup(11, 5, 0, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(11, 8, 0, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 16224, 0, 0, 32, 20, 0, height, 0, 6, height + 3);
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(11, 6, 0, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(11, 7, 0, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 16225, 0, 0, 32, 20, 0, height, 0, 6, height + 3);
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(11, 5, 0, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(11, 8, 0, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 16224, 0, 0, 32, 20, 0, height, 0, 6, height + 3);
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(11, 6, 0, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(11, 7, 0, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 16225, 0, 0, 32, 20, 0, height, 0, 6, height + 3);
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_0);
paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0);
paint_util_set_general_support_height(height + 48, 0x20);
@@ -6072,6 +6089,10 @@ TRACK_PAINT_FUNCTION get_track_paint_function_lay_down_rc(int trackType, int dir
switch (trackType) {
case TRACK_ELEM_FLAT:
return lay_down_rc_track_flat;
case TRACK_ELEM_END_STATION:
case TRACK_ELEM_BEGIN_STATION:
case TRACK_ELEM_MIDDLE_STATION:
return lay_down_rc_track_station;
case TRACK_ELEM_25_DEG_UP:
return lay_down_rc_track_25_deg_up;
case TRACK_ELEM_60_DEG_UP:
File diff suppressed because it is too large. Load diff
+23 -6
View File
@@ -66,6 +66,24 @@ static void looping_rc_track_flat(uint8 rideIndex, uint8 trackSequence, uint8 di
paint_util_set_general_support_height(height + 32, 0x20);
}
static void looping_rc_track_station(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
static const uint32 imageIds[4][2] = {
{ 15016, SPR_STATION_BASE_B_SW_NE },
{ 15017, SPR_STATION_BASE_B_NW_SE },
{ 15016, SPR_STATION_BASE_B_SW_NE },
{ 15017, SPR_STATION_BASE_B_NW_SE },
};
sub_98197C_rotated(direction, imageIds[direction][0] | gTrackColours[SCHEME_TRACK], 0, 0, 32, 20, 1, height, 0, 6, height + 3);
sub_98196C_rotated(direction, imageIds[direction][1] | gTrackColours[SCHEME_MISC], 0, 0, 32, 32, 1, height);
track_paint_util_draw_station_metal_supports_2(direction, height, gTrackColours[SCHEME_SUPPORTS], 0);
track_paint_util_draw_station(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 looping_rc_track_25_deg_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
if (track_element_is_lift_hill(mapElement)) {
@@ -2974,32 +2992,27 @@ static void looping_rc_track_on_ride_photo(uint8 rideIndex, uint8 trackSequence,
metal_a_supports_paint_setup(0, 5, 0, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(0, 8, 0, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 15004, 0, 0, 32, 20, 0, height, 0, 6, height + 3);
sub_98196C_rotated(direction, gTrackColours[SCHEME_MISC] | 25623, 26, 0, 1, 1, 19, height + 3);
break;
case 1:
sub_98196C_rotated(direction, gTrackColours[SCHEME_MISC] | 22432, 0, 0, 32, 32, 1, height);
metal_a_supports_paint_setup(0, 6, 0, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(0, 7, 0, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 15005, 0, 0, 32, 20, 0, height, 0, 6, height + 3);
sub_98196C_rotated(direction, gTrackColours[SCHEME_MISC] | 25624, 6, 0, 1, 1, 19, height + 3);
break;
case 2:
sub_98196C_rotated(direction, gTrackColours[SCHEME_MISC] | 22432, 0, 0, 32, 32, 1, height);
metal_a_supports_paint_setup(0, 5, 0, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(0, 8, 0, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 15004, 0, 0, 32, 20, 0, height, 0, 6, height + 3);
sub_98196C_rotated(direction, gTrackColours[SCHEME_MISC] | 25625, 6, 0, 1, 1, 19, height + 3);
break;
case 3:
sub_98196C_rotated(direction, gTrackColours[SCHEME_MISC] | 22432, 0, 0, 32, 32, 1, height);
metal_a_supports_paint_setup(0, 6, 0, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(0, 7, 0, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 15005, 0, 0, 32, 20, 0, height, 0, 6, height + 3);
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_0);
paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0);
paint_util_set_general_support_height(height + 48, 0x20);
@@ -6171,6 +6184,10 @@ TRACK_PAINT_FUNCTION get_track_paint_function_looping_rc(int trackType, int dire
switch (trackType) {
case TRACK_ELEM_FLAT:
return looping_rc_track_flat;
case TRACK_ELEM_END_STATION:
case TRACK_ELEM_BEGIN_STATION:
case TRACK_ELEM_MIDDLE_STATION:
return looping_rc_track_station;
case TRACK_ELEM_25_DEG_UP:
return looping_rc_track_25_deg_up;
case TRACK_ELEM_60_DEG_UP:
+23 -6
View File
@@ -49,6 +49,24 @@ static void mine_ride_track_flat(uint8 rideIndex, uint8 trackSequence, uint8 dir
paint_util_set_general_support_height(height + 32, 0x20);
}
static void mine_ride_track_station(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
static const uint32 imageIds[4][3] = {
{ 19338, SPR_STATION_BASE_A_SW_NE },
{ 19339, SPR_STATION_BASE_A_NW_SE },
{ 19338, SPR_STATION_BASE_A_SW_NE },
{ 19339, SPR_STATION_BASE_A_NW_SE },
};
sub_98197C_rotated(direction, imageIds[direction][0] | gTrackColours[SCHEME_TRACK], 0, 0, 32, 20, 1, height, 0, 6, height + 3);
sub_98196C_rotated(direction, imageIds[direction][1] | gTrackColours[SCHEME_MISC], 0, 0, 32, 32, 1, height);
track_paint_util_draw_station_metal_supports_2(direction, height, gTrackColours[SCHEME_SUPPORTS], 0);
track_paint_util_draw_station_2(rideIndex, trackSequence, direction, height, mapElement, 9, 11);
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 mine_ride_track_25_deg_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
switch (direction) {
@@ -2017,32 +2035,27 @@ static void mine_ride_track_on_ride_photo(uint8 rideIndex, uint8 trackSequence,
metal_a_supports_paint_setup(1, 5, 6, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(1, 8, 6, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 19338, 0, 0, 32, 20, 0, height, 0, 6, height + 3);
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(2, 6, 6, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(2, 7, 6, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 19339, 0, 0, 32, 20, 0, height, 0, 6, height + 3);
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(1, 5, 6, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(1, 8, 6, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 19338, 0, 0, 32, 20, 0, height, 0, 6, height + 3);
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(2, 6, 6, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(2, 7, 6, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 19339, 0, 0, 32, 20, 0, height, 0, 6, height + 3);
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_6);
paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0);
paint_util_set_general_support_height(height + 48, 0x20);
@@ -3553,6 +3566,10 @@ TRACK_PAINT_FUNCTION get_track_paint_function_mine_ride(int trackType, int direc
switch (trackType) {
case TRACK_ELEM_FLAT:
return mine_ride_track_flat;
case TRACK_ELEM_END_STATION:
case TRACK_ELEM_BEGIN_STATION:
case TRACK_ELEM_MIDDLE_STATION:
return mine_ride_track_station;
case TRACK_ELEM_25_DEG_UP:
return mine_ride_track_25_deg_up;
case TRACK_ELEM_FLAT_TO_25_DEG_UP:
+27 -4
View File
@@ -66,6 +66,28 @@ static void mine_train_rc_track_flat(uint8 rideIndex, uint8 trackSequence, uint8
paint_util_set_general_support_height(height + 32, 0x20);
}
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] = {
{ 20064, 20060, SPR_STATION_BASE_B_SW_NE },
{ 20065, 20061, SPR_STATION_BASE_B_NW_SE },
{ 20064, 20060, SPR_STATION_BASE_B_SW_NE },
{ 20065, 20061, SPR_STATION_BASE_B_NW_SE },
};
sub_98197C_rotated(direction, imageIds[direction][2] | gTrackColours[SCHEME_MISC], 0, 0, 32, 28, 1, height - 2, 0, 2, height);
if (mapElement->properties.track.type == TRACK_ELEM_END_STATION) {
sub_98199C_rotated(direction, imageIds[direction][1] | gTrackColours[SCHEME_TRACK], 0, 0, 32, 20, 1, height, 0, 0, height);
} else {
sub_98199C_rotated(direction, imageIds[direction][0] | gTrackColours[SCHEME_TRACK], 0, 0, 32, 20, 1, height, 0, 0, height);
}
track_paint_util_draw_station_metal_supports_2(direction, height, gTrackColours[SCHEME_SUPPORTS], 3);
track_paint_util_draw_station(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 mine_train_rc_track_25_deg_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
if (track_element_is_lift_hill(mapElement)) {
@@ -2784,30 +2806,27 @@ static void mine_train_rc_track_on_ride_photo(uint8 rideIndex, uint8 trackSequen
wooden_a_supports_paint_setup(6, 0, height, gTrackColours[SCHEME_SUPPORTS], NULL);
sub_98196C_rotated(direction, gTrackColours[SCHEME_MISC] | 25623, 26, 0, 1, 1, 19, height + 2);
sub_98196C_rotated(direction, gTrackColours[SCHEME_MISC] | 25623, 26, 31, 1, 1, 19, height + 2);
sub_98196C_rotated(direction, gTrackColours[SCHEME_MISC] | 25617, 6, 0, 1, 1, 19, height + 2);
break;
case 1:
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 20053, 0, 0, 32, 20, 1, height, 0, 6, height);
wooden_a_supports_paint_setup(7, 0, height, gTrackColours[SCHEME_SUPPORTS], NULL);
sub_98196C_rotated(direction, gTrackColours[SCHEME_MISC] | 25624, 6, 0, 1, 1, 19, height + 2);
sub_98196C_rotated(direction, gTrackColours[SCHEME_MISC] | 25624, 6, 31, 1, 1, 19, height + 2);
sub_98196C_rotated(direction, gTrackColours[SCHEME_MISC] | 25618, 26, 0, 1, 1, 19, height + 2);
break;
case 2:
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 20052, 0, 0, 32, 20, 1, height, 0, 6, height);
wooden_a_supports_paint_setup(6, 0, height, gTrackColours[SCHEME_SUPPORTS], NULL);
sub_98196C_rotated(direction, gTrackColours[SCHEME_MISC] | 25625, 6, 0, 1, 1, 19, height + 2);
sub_98196C_rotated(direction, gTrackColours[SCHEME_MISC] | 25625, 6, 31, 1, 1, 19, height + 2);
sub_98196C_rotated(direction, gTrackColours[SCHEME_MISC] | 25615, 26, 31, 1, 1, 19, height + 2);
break;
case 3:
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 20053, 0, 0, 32, 20, 1, height, 0, 6, height);
wooden_a_supports_paint_setup(7, 0, height, gTrackColours[SCHEME_SUPPORTS], NULL);
sub_98196C_rotated(direction, gTrackColours[SCHEME_MISC] | 25626, 26, 0, 1, 1, 19, height + 2);
sub_98196C_rotated(direction, gTrackColours[SCHEME_MISC] | 25626, 26, 31, 1, 1, 19, height + 2);
sub_98196C_rotated(direction, gTrackColours[SCHEME_MISC] | 25616, 6, 31, 1, 1, 19, height + 2);
break;
}
track_paint_util_onride_photo_paint(direction, height + 3, 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 + 48, 0x20);
@@ -5355,6 +5374,10 @@ TRACK_PAINT_FUNCTION get_track_paint_function_mine_train_rc(int trackType, int d
switch (trackType) {
case TRACK_ELEM_FLAT:
return mine_train_rc_track_flat;
case TRACK_ELEM_END_STATION:
case TRACK_ELEM_BEGIN_STATION:
case TRACK_ELEM_MIDDLE_STATION:
return mine_train_rc_track_station;
case TRACK_ELEM_25_DEG_UP:
return mine_train_rc_track_25_deg_up;
case TRACK_ELEM_60_DEG_UP:
+27 -6
View File
@@ -78,6 +78,28 @@ static void mini_rc_track_flat(uint8 rideIndex, uint8 trackSequence, uint8 direc
paint_util_set_general_support_height(height + 32, 0x20);
}
static void mini_rc_track_station(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
static const uint32 imageIds[4][3] = {
{ 18746, 18742, SPR_STATION_BASE_A_SW_NE },
{ 18747, 18743, SPR_STATION_BASE_A_NW_SE },
{ 18746, 18742, SPR_STATION_BASE_A_SW_NE },
{ 18747, 18743, SPR_STATION_BASE_A_NW_SE },
};
if (mapElement->properties.track.type == TRACK_ELEM_END_STATION) {
sub_98197C_rotated(direction, imageIds[direction][1] | gTrackColours[SCHEME_TRACK], 0, 0, 32, 20, 1, height, 0, 6, height + 3);
} else {
sub_98197C_rotated(direction, imageIds[direction][0] | gTrackColours[SCHEME_TRACK], 0, 0, 32, 20, 1, height, 0, 6, height + 3);
}
sub_98196C_rotated(direction, imageIds[direction][2] | gTrackColours[SCHEME_MISC], 0, 0, 32, 32, 1, height);
track_paint_util_draw_station_metal_supports_2(direction, height, gTrackColours[SCHEME_SUPPORTS], 0);
track_paint_util_draw_station_2(rideIndex, trackSequence, direction, height, mapElement, 9, 11);
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 mini_rc_track_25_deg_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
if (track_element_is_lift_hill(mapElement)) {
@@ -2842,32 +2864,27 @@ static void mini_rc_track_on_ride_photo(uint8 rideIndex, uint8 trackSequence, ui
metal_a_supports_paint_setup(1, 5, 6, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(1, 8, 6, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 18738, 0, 0, 32, 20, 0, height, 0, 6, height + 3);
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(2, 6, 6, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(2, 7, 6, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 18739, 0, 0, 32, 20, 0, height, 0, 6, height + 3);
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(1, 5, 6, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(1, 8, 6, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 18738, 0, 0, 32, 20, 0, height, 0, 6, height + 3);
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(2, 6, 6, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(2, 7, 6, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 18739, 0, 0, 32, 20, 0, height, 0, 6, height + 3);
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_6);
paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0);
paint_util_set_general_support_height(height + 48, 0x20);
@@ -5929,6 +5946,10 @@ TRACK_PAINT_FUNCTION get_track_paint_function_mini_rc(int trackType, int directi
switch (trackType) {
case TRACK_ELEM_FLAT:
return mini_rc_track_flat;
case TRACK_ELEM_END_STATION:
case TRACK_ELEM_BEGIN_STATION:
case TRACK_ELEM_MIDDLE_STATION:
return mini_rc_track_station;
case TRACK_ELEM_25_DEG_UP:
return mini_rc_track_25_deg_up;
case TRACK_ELEM_60_DEG_UP:
+23
View File
@@ -68,6 +68,25 @@ static void mini_suspended_rc_track_flat(uint8 rideIndex, uint8 trackSequence, u
paint_util_set_general_support_height(height + 48, 0x20);
}
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] = {
{ SPR_STATION_BASE_C_SW_NE, 28433, SPR_STATION_INVERTED_BAR_E_SW_NE },
{ SPR_STATION_BASE_C_NW_SE, 28434, SPR_STATION_INVERTED_BAR_E_NW_SE },
{ SPR_STATION_BASE_C_SW_NE, 28433, SPR_STATION_INVERTED_BAR_E_SW_NE },
{ SPR_STATION_BASE_C_NW_SE, 28434, SPR_STATION_INVERTED_BAR_E_NW_SE },
};
sub_98197C_rotated(direction, imageIds[direction][0] | gTrackColours[SCHEME_MISC], 0, 0, 32, 28, 1, height, 0, 2, height);
sub_98196C_rotated(direction, imageIds[direction][1] | gTrackColours[SCHEME_TRACK], 0, 6, 32, 20, 1, height + 24);
sub_98199C_rotated(direction, imageIds[direction][2] | gTrackColours[SCHEME_SUPPORTS], 0, 6, 32, 20, 1, height + 24, 0, 2, height);
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_6);
paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0);
paint_util_set_general_support_height(height + 32, 0x20);
}
static void mini_suspended_rc_track_25_deg_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
if (track_element_is_lift_hill(mapElement)) {
@@ -1559,6 +1578,10 @@ TRACK_PAINT_FUNCTION get_track_paint_function_mini_suspended_rc(int trackType, i
switch (trackType) {
case TRACK_ELEM_FLAT:
return mini_suspended_rc_track_flat;
case TRACK_ELEM_END_STATION:
case TRACK_ELEM_BEGIN_STATION:
case TRACK_ELEM_MIDDLE_STATION:
return mini_suspended_rc_track_station;
case TRACK_ELEM_25_DEG_UP:
return mini_suspended_rc_track_25_deg_up;
case TRACK_ELEM_FLAT_TO_25_DEG_UP:
@@ -81,6 +81,41 @@ static void multi_dimension_rc_track_flat(uint8 rideIndex, uint8 trackSequence,
}
}
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] = {
{ 15810, 15812, SPR_STATION_INVERTED_BAR_A_SW_NE },
{ 15811, 15813, SPR_STATION_INVERTED_BAR_A_NW_SE },
{ 15810, 15812, SPR_STATION_INVERTED_BAR_A_SW_NE },
{ 15811, 15813, SPR_STATION_INVERTED_BAR_A_NW_SE },
};
if (mapElement->properties.track.type == TRACK_ELEM_END_STATION) {
sub_98197C_rotated(direction, imageIds[direction][1] | gTrackColours[SCHEME_TRACK], 0, 0, 32, 26, 1, height, 0, 3, height + 3);
} else {
sub_98197C_rotated(direction, imageIds[direction][0] | gTrackColours[SCHEME_TRACK], 0, 0, 32, 26, 1, height, 0, 3, height + 3);
}
track_paint_util_draw_station_metal_supports_2(direction, height, gTrackColours[SCHEME_SUPPORTS], 11);
rct_ride * ride = get_ride(rideIndex);
const rct_ride_entrance_definition * entranceStyle = &RideEntranceDefinitions[ride->entrance_style];
if (direction == 0 || direction == 2) {
track_paint_util_draw_station_covers(EDGE_NW, false, entranceStyle, direction, height);
} else {
track_paint_util_draw_station_covers(EDGE_NE, false, entranceStyle, direction, height);
}
if (direction == 0 || direction == 2) {
track_paint_util_draw_station_covers(EDGE_SE, false, entranceStyle, direction, height);
} else {
track_paint_util_draw_station_covers(EDGE_SW, false, entranceStyle, direction, height);
}
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 multi_dimension_rc_track_25_deg_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
if (!track_element_is_inverted(mapElement)) {
@@ -3833,32 +3868,27 @@ static void multi_dimension_rc_track_on_ride_photo(uint8 rideIndex, uint8 trackS
metal_a_supports_paint_setup(11, 5, 0, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(11, 8, 0, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 15806, 0, 0, 32, 20, 0, height, 0, 6, height + 3);
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(11, 6, 0, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(11, 7, 0, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 15807, 0, 0, 32, 20, 0, height, 0, 6, height + 3);
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(11, 5, 0, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(11, 8, 0, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 15806, 0, 0, 32, 20, 0, height, 0, 6, height + 3);
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(11, 6, 0, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(11, 7, 0, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 15807, 0, 0, 32, 20, 0, height, 0, 6, height + 3);
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_6);
paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0);
paint_util_set_general_support_height(height + 48, 0x20);
@@ -3869,32 +3899,27 @@ static void multi_dimension_rc_track_on_ride_photo(uint8 rideIndex, uint8 trackS
metal_a_supports_paint_setup(11, 5, 0, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(11, 8, 0, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26227, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 24);
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(11, 6, 0, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(11, 7, 0, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26228, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 24);
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(11, 5, 0, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(11, 8, 0, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26227, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 24);
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(11, 6, 0, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(11, 7, 0, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 26228, 0, 0, 32, 20, 3, height + 24, 0, 6, height + 24);
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_6);
paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0);
paint_util_set_general_support_height(height + 64, 0x20);
@@ -9260,6 +9285,10 @@ TRACK_PAINT_FUNCTION get_track_paint_function_multi_dimension_rc(int trackType,
switch (trackType) {
case TRACK_ELEM_FLAT:
return multi_dimension_rc_track_flat;
case TRACK_ELEM_END_STATION:
case TRACK_ELEM_BEGIN_STATION:
case TRACK_ELEM_MIDDLE_STATION:
return multi_dimension_rc_track_station;
case TRACK_ELEM_25_DEG_UP:
return multi_dimension_rc_track_25_deg_up;
case TRACK_ELEM_60_DEG_UP:
@@ -79,6 +79,24 @@ static void reverser_rc_track_flat(uint8 rideIndex, uint8 trackSequence, uint8 d
paint_util_set_general_support_height(height + 32, 0x20);
}
static void reverser_rc_track_station(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
static const uint32 imageIds[4][3] = {
{ 21506, SPR_STATION_BASE_A_SW_NE },
{ 21507, SPR_STATION_BASE_A_NW_SE },
{ 21506, SPR_STATION_BASE_A_SW_NE },
{ 21507, SPR_STATION_BASE_A_NW_SE },
};
sub_98197C_rotated(direction, imageIds[direction][1] | gTrackColours[SCHEME_MISC], 0, 0, 32, 27, 2, height, 0, 2, height);
sub_98199C_rotated(direction, imageIds[direction][0] | gTrackColours[SCHEME_TRACK], 0, 0, 32, 27, 2, height, 0, 2, height);
wooden_a_supports_paint_setup(direction & 1, 0, height, gTrackColours[SCHEME_SUPPORTS], NULL);
track_paint_util_draw_station_2(rideIndex, trackSequence, direction, height, mapElement, 9, 11);
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 reverser_rc_track_25_deg_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
if (track_element_is_lift_hill(mapElement)) {
@@ -1005,6 +1023,10 @@ TRACK_PAINT_FUNCTION get_track_paint_function_reverser_rc(int trackType, int dir
switch (trackType) {
case TRACK_ELEM_FLAT:
return reverser_rc_track_flat;
case TRACK_ELEM_END_STATION:
case TRACK_ELEM_BEGIN_STATION:
case TRACK_ELEM_MIDDLE_STATION:
return reverser_rc_track_station;
case TRACK_ELEM_25_DEG_UP:
return reverser_rc_track_25_deg_up;
case TRACK_ELEM_FLAT_TO_25_DEG_UP:
@@ -72,6 +72,23 @@ static void side_friction_rc_track_flat(uint8 rideIndex, uint8 trackSequence, ui
paint_util_set_general_support_height(height + 32, 0x20);
}
static void side_friction_rc_track_station(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
static const uint32 imageIds[4] = {
21610,
21611,
21610,
21611,
};
sub_98197C_rotated(direction, imageIds[direction] | gTrackColours[SCHEME_TRACK], 0, 0, 32, 27, 2, height, 0, 2, height);
wooden_a_supports_paint_setup(direction & 1, 0, height, gTrackColours[SCHEME_SUPPORTS], NULL);
track_paint_util_draw_station_2(rideIndex, trackSequence, direction, height, mapElement, 9, 11);
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 side_friction_rc_track_25_deg_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
if (track_element_is_lift_hill(mapElement)) {
@@ -1882,6 +1899,10 @@ TRACK_PAINT_FUNCTION get_track_paint_function_side_friction_rc(int trackType, in
switch (trackType) {
case TRACK_ELEM_FLAT:
return side_friction_rc_track_flat;
case TRACK_ELEM_END_STATION:
case TRACK_ELEM_BEGIN_STATION:
case TRACK_ELEM_MIDDLE_STATION:
return side_friction_rc_track_station;
case TRACK_ELEM_25_DEG_UP:
return side_friction_rc_track_25_deg_up;
case TRACK_ELEM_FLAT_TO_25_DEG_UP:
File diff suppressed because it is too large. Load diff
+27 -6
View File
@@ -66,6 +66,28 @@ static void stand_up_rc_track_flat(uint8 rideIndex, uint8 trackSequence, uint8 d
paint_util_set_general_support_height(height + 32, 0x20);
}
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] = {
{ 25567, 25571, SPR_STATION_BASE_A_SW_NE },
{ 25568, 25572, SPR_STATION_BASE_A_NW_SE },
{ 25567, 25571, SPR_STATION_BASE_A_SW_NE },
{ 25568, 25572, SPR_STATION_BASE_A_NW_SE },
};
if (mapElement->properties.track.type == TRACK_ELEM_END_STATION) {
sub_98197C_rotated(direction, imageIds[direction][1] | gTrackColours[SCHEME_TRACK], 0, 6, 32, 20, 1, height, 0, 6, height + 3);
} else {
sub_98197C_rotated(direction, imageIds[direction][0] | gTrackColours[SCHEME_TRACK], 0, 6, 32, 20, 1, height, 0, 6, height + 3);
}
sub_98196C_rotated(direction, imageIds[direction][2] | gTrackColours[SCHEME_MISC], 0, 0, 32, 32, 1, height);
track_paint_util_draw_station_metal_supports_2(direction, height, gTrackColours[SCHEME_SUPPORTS], 0);
track_paint_util_draw_station_2(rideIndex, trackSequence, direction, height, mapElement, 9, 11);
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 stand_up_rc_track_25_deg_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
if (track_element_is_lift_hill(mapElement)) {
@@ -3305,32 +3327,27 @@ static void stand_up_rc_track_on_ride_photo(uint8 rideIndex, uint8 trackSequence
metal_a_supports_paint_setup(0, 5, 0, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(0, 8, 0, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25229, 0, 6, 32, 20, 1, height, 0, 6, height + 3);
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(0, 6, 0, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(0, 7, 0, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25230, 0, 6, 32, 20, 1, height, 0, 6, height + 3);
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(0, 5, 0, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(0, 8, 0, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25229, 0, 6, 32, 20, 1, height, 0, 6, height + 3);
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(0, 6, 0, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(0, 7, 0, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 25230, 0, 6, 32, 20, 1, height, 0, 6, height + 3);
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_0);
paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0);
paint_util_set_general_support_height(height + 48, 0x20);
@@ -5707,6 +5724,10 @@ TRACK_PAINT_FUNCTION get_track_paint_function_stand_up_rc(int trackType, int dir
switch (trackType) {
case TRACK_ELEM_FLAT:
return stand_up_rc_track_flat;
case TRACK_ELEM_END_STATION:
case TRACK_ELEM_BEGIN_STATION:
case TRACK_ELEM_MIDDLE_STATION:
return stand_up_rc_track_station;
case TRACK_ELEM_25_DEG_UP:
return stand_up_rc_track_25_deg_up;
case TRACK_ELEM_60_DEG_UP:
+22
View File
@@ -60,6 +60,24 @@ static void steeplechase_track_flat(uint8 rideIndex, uint8 trackSequence, uint8
paint_util_set_general_support_height(height + 32, 0x20);
}
static void steeplechase_track_station(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
static const uint32 imageIds[4][3] = {
{ 28635, SPR_STATION_BASE_B_SW_NE },
{ 28636, SPR_STATION_BASE_B_NW_SE },
{ 28635, SPR_STATION_BASE_B_SW_NE },
{ 28636, SPR_STATION_BASE_B_NW_SE },
};
sub_98197C_rotated(direction, imageIds[direction][1] | gTrackColours[SCHEME_MISC], 0, 0, 32, 28, 3, height - 2, 0, 2, height);
sub_98199C_rotated(direction, imageIds[direction][0] | gTrackColours[SCHEME_TRACK], 0, 6, 32, 20, 3, height, 0, 0, height);
track_paint_util_draw_station_metal_supports_2(direction, height, gTrackColours[SCHEME_SUPPORTS], 3);
track_paint_util_draw_station(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 steeplechase_track_25_deg_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
if (track_element_is_lift_hill(mapElement)) {
@@ -1541,6 +1559,10 @@ TRACK_PAINT_FUNCTION get_track_paint_function_steeplechase(int trackType, int di
switch (trackType) {
case TRACK_ELEM_FLAT:
return steeplechase_track_flat;
case TRACK_ELEM_END_STATION:
case TRACK_ELEM_BEGIN_STATION:
case TRACK_ELEM_MIDDLE_STATION:
return steeplechase_track_station;
case TRACK_ELEM_25_DEG_UP:
return steeplechase_track_25_deg_up;
case TRACK_ELEM_FLAT_TO_25_DEG_UP:
@@ -62,6 +62,25 @@ static void suspended_swinging_rc_track_flat(uint8 rideIndex, uint8 trackSequenc
paint_util_set_general_support_height(height + 48, 0x20);
}
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] = {
{ SPR_STATION_BASE_C_SW_NE, 25963, SPR_STATION_INVERTED_BAR_D_SW_NE },
{ SPR_STATION_BASE_C_NW_SE, 25964, SPR_STATION_INVERTED_BAR_D_NW_SE },
{ SPR_STATION_BASE_C_SW_NE, 25963, SPR_STATION_INVERTED_BAR_D_SW_NE },
{ SPR_STATION_BASE_C_NW_SE, 25964, SPR_STATION_INVERTED_BAR_D_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], 0);
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 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)) {
@@ -2838,6 +2857,10 @@ TRACK_PAINT_FUNCTION get_track_paint_function_suspended_swinging_rc(int trackTyp
switch (trackType) {
case TRACK_ELEM_FLAT:
return suspended_swinging_rc_track_flat;
case TRACK_ELEM_END_STATION:
case TRACK_ELEM_BEGIN_STATION:
case TRACK_ELEM_MIDDLE_STATION:
return suspended_swinging_rc_track_station;
case TRACK_ELEM_25_DEG_UP:
return suspended_swinging_rc_track_25_deg_up;
case TRACK_ELEM_60_DEG_UP:
+30 -6
View File
@@ -66,6 +66,31 @@ static void twister_rc_track_flat(uint8 rideIndex, uint8 trackSequence, uint8 di
paint_util_set_general_support_height(height + 32, 0x20);
}
static void twister_rc_track_station(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
static const uint32 imageIds[4][3] = {
{ 17154, 17150, SPR_STATION_BASE_A_SW_NE },
{ 17155, 17151, SPR_STATION_BASE_A_NW_SE },
{ 17154, 17150, SPR_STATION_BASE_A_SW_NE },
{ 17155, 17151, SPR_STATION_BASE_A_NW_SE },
};
if (mapElement->properties.track.type == TRACK_ELEM_END_STATION) {
sub_98197C_rotated(direction, imageIds[direction][1] | gTrackColours[SCHEME_TRACK], 0, 0, 32, 20, 1, height, 0, 6, height + 3);
} else {
sub_98197C_rotated(direction, imageIds[direction][0] | gTrackColours[SCHEME_TRACK], 0, 0, 32, 20, 1, height, 0, 6, height + 3);
}
sub_98196C_rotated(direction, imageIds[direction][2] | gTrackColours[SCHEME_MISC], 0, 0, 32, 32, 1, height);
track_paint_util_draw_station_metal_supports_2(direction, height, gTrackColours[SCHEME_SUPPORTS], 0);
rct_ride * ride = get_ride(rideIndex);
track_paint_util_draw_station_platform(ride, direction, height, 9, 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 twister_rc_track_25_deg_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
if (track_element_is_lift_hill(mapElement)) {
@@ -3222,32 +3247,27 @@ static void twister_rc_track_on_ride_photo(uint8 rideIndex, uint8 trackSequence,
metal_a_supports_paint_setup(0, 5, 0, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(0, 8, 0, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17146, 0, 0, 32, 20, 0, height, 0, 6, height + 3);
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(0, 6, 0, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(0, 7, 0, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17147, 0, 0, 32, 20, 0, height, 0, 6, height + 3);
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(0, 5, 0, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(0, 8, 0, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17146, 0, 0, 32, 20, 0, height, 0, 6, height + 3);
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(0, 6, 0, height, gTrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(0, 7, 0, height, gTrackColours[SCHEME_SUPPORTS]);
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | 17147, 0, 0, 32, 20, 0, height, 0, 6, height + 3);
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_6);
paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0);
paint_util_set_general_support_height(height + 48, 0x20);
@@ -7651,6 +7671,10 @@ TRACK_PAINT_FUNCTION get_track_paint_function_twister_rc(int trackType, int dire
switch (trackType) {
case TRACK_ELEM_FLAT:
return twister_rc_track_flat;
case TRACK_ELEM_END_STATION:
case TRACK_ELEM_BEGIN_STATION:
case TRACK_ELEM_MIDDLE_STATION:
return twister_rc_track_station;
case TRACK_ELEM_25_DEG_UP:
return twister_rc_track_25_deg_up;
case TRACK_ELEM_60_DEG_UP:
@@ -66,6 +66,31 @@ static void vertical_drop_rc_track_flat(uint8 rideIndex, uint8 trackSequence, ui
paint_util_set_general_support_height(height + 32, 0x20);
}
static void vertical_drop_rc_track_station(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
static const uint32 imageIds[4][3] = {
{ 17154, 17150, SPR_STATION_BASE_A_SW_NE },
{ 17155, 17151, SPR_STATION_BASE_A_NW_SE },
{ 17154, 17150, SPR_STATION_BASE_A_SW_NE },
{ 17155, 17151, SPR_STATION_BASE_A_NW_SE },
};
if (mapElement->properties.track.type == TRACK_ELEM_END_STATION) {
sub_98197C_rotated(direction, imageIds[direction][1] | gTrackColours[SCHEME_TRACK], 0, 0, 32, 20, 1, height, 0, 6, height + 3);
} else {
sub_98197C_rotated(direction, imageIds[direction][0] | gTrackColours[SCHEME_TRACK], 0, 0, 32, 20, 1, height, 0, 6, height + 3);
}
sub_98196C_rotated(direction, imageIds[direction][2] | gTrackColours[SCHEME_MISC], 0, 0, 32, 32, 1, height);
track_paint_util_draw_station_metal_supports_2(direction, height, gTrackColours[SCHEME_SUPPORTS], 3);
rct_ride * ride = get_ride(rideIndex);
track_paint_util_draw_station_platform(ride, direction, height, 9, 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 vertical_drop_rc_track_25_deg_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
if (track_element_is_lift_hill(mapElement)) {
@@ -3081,32 +3106,27 @@ static void vertical_drop_rc_track_on_ride_photo(uint8 rideIndex, uint8 trackSeq
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] | 17146, 0, 0, 32, 20, 0, height, 0, 6, height + 3);
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] | 17147, 0, 0, 32, 20, 0, height, 0, 6, height + 3);
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] | 17146, 0, 0, 32, 20, 0, height, 0, 6, height + 3);
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] | 17147, 0, 0, 32, 20, 0, height, 0, 6, height + 3);
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_6);
paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0);
paint_util_set_general_support_height(height + 48, 0x20);
@@ -7126,6 +7146,10 @@ TRACK_PAINT_FUNCTION get_track_paint_function_vertical_drop_rc(int trackType, in
switch (trackType) {
case TRACK_ELEM_FLAT:
return vertical_drop_rc_track_flat;
case TRACK_ELEM_END_STATION:
case TRACK_ELEM_BEGIN_STATION:
case TRACK_ELEM_MIDDLE_STATION:
return vertical_drop_rc_track_station;
case TRACK_ELEM_25_DEG_UP:
return vertical_drop_rc_track_25_deg_up;
case TRACK_ELEM_60_DEG_UP:
+175 -22
View File
@@ -286,6 +286,11 @@ bool track_paint_util_should_paint_supports(rct_xy16 position)
}
void track_paint_util_draw_station(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
track_paint_util_draw_station_2(rideIndex, trackSequence, direction, height, mapElement, 5, 7);
}
void track_paint_util_draw_station_2(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement, int fenceOffsetA, int fenceOffsetB)
{
rct_xy16 position = {gPaintMapPosition.x, gPaintMapPosition.y};
rct_ride * ride = get_ride(rideIndex);
@@ -310,7 +315,7 @@ void track_paint_util_draw_station(uint8 rideIndex, uint8 trackSequence, uint8 d
} else {
imageId = (hasFence ? SPR_STATION_PLATFORM_FENCED_SW_NE : SPR_STATION_PLATFORM_SW_NE) | gTrackColours[SCHEME_SUPPORTS];
}
sub_98196C(imageId, 0, 0, 32, 8, 1, height + 5, get_current_rotation());
sub_98196C(imageId, 0, 0, 32, 8, 1, height + fenceOffsetA, get_current_rotation());
//height -= 5 (height)
track_paint_util_draw_station_covers(EDGE_NW, hasFence, entranceStyle, direction, height);
//height += 5 (height + 5)
@@ -322,7 +327,7 @@ void track_paint_util_draw_station(uint8 rideIndex, uint8 trackSequence, uint8 d
} else {
imageId = SPR_STATION_PLATFORM_SW_NE | gTrackColours[SCHEME_SUPPORTS];
}
sub_98196C(imageId, 0, 24, 32, 8, 1, height + 5, get_current_rotation());
sub_98196C(imageId, 0, 24, 32, 8, 1, height + fenceOffsetA, get_current_rotation());
//height += 2 (height + 7)
hasFence = track_paint_util_has_fence(EDGE_SE, position, mapElement, ride, get_current_rotation());
@@ -334,15 +339,15 @@ void track_paint_util_draw_station(uint8 rideIndex, uint8 trackSequence, uint8 d
} else {
imageId = SPR_STATION_FENCE_SW_NE | gTrackColours[SCHEME_SUPPORTS];
}
sub_98196C(imageId, 0, 31, 32, 1, 7, height + 7, get_current_rotation());
sub_98196C(imageId, 0, 31, 32, 1, 7, height + fenceOffsetB, get_current_rotation());
} else if (mapElement->properties.track.type == TRACK_ELEM_BEGIN_STATION && direction == 0) {
// Addition: draw only small fence if there is an entrance/exit at the beginning
imageId = SPR_STATION_FENCE_SMALL_NW_SE | gTrackColours[SCHEME_SUPPORTS];
sub_98196C(imageId, 31, 23, 1, 8, 7, height + 7, get_current_rotation());
sub_98196C(imageId, 31, 23, 1, 8, 7, height + fenceOffsetB, get_current_rotation());
} else if (mapElement->properties.track.type == TRACK_ELEM_END_STATION && direction == 2) {
// Addition: draw only small fence if there is an entrance/exit at the end
imageId = SPR_STATION_LIGHT_BACK_NE_SW | gTrackColours[SCHEME_SUPPORTS];
sub_98196C(imageId, 31, 23, 1, 8, 7, height + 7, get_current_rotation());
sub_98196C(imageId, 31, 23, 1, 8, 7, height + fenceOffsetB, get_current_rotation());
}
//height -= 7 (height)
track_paint_util_draw_station_covers(EDGE_SE, hasFence, entranceStyle, direction, height);
@@ -350,10 +355,10 @@ void track_paint_util_draw_station(uint8 rideIndex, uint8 trackSequence, uint8 d
if (mapElement->properties.track.type == TRACK_ELEM_BEGIN_STATION && direction == 0) {
imageId = SPR_STATION_FENCE_SMALL_NW_SE | gTrackColours[SCHEME_SUPPORTS];
sub_98196C(imageId, 31, 0, 1, 8, 7, height + 7, get_current_rotation());
sub_98196C(imageId, 31, 0, 1, 8, 7, height + fenceOffsetB, get_current_rotation());
} else if (mapElement->properties.track.type == TRACK_ELEM_END_STATION && direction == 2) {
imageId = SPR_STATION_LIGHT_BACK_NE_SW | gTrackColours[SCHEME_SUPPORTS];
sub_98196C(imageId, 31, 0, 1, 8, 7, height + 7, get_current_rotation());
sub_98196C(imageId, 31, 0, 1, 8, 7, height + fenceOffsetB, get_current_rotation());
}
} else if (direction == 1 || direction == 3) {
//height += 5 (height + 5);
@@ -370,7 +375,7 @@ void track_paint_util_draw_station(uint8 rideIndex, uint8 trackSequence, uint8 d
} else {
imageId = (hasFence ? SPR_STATION_PLATFORM_FENCED_NW_SE : SPR_STATION_PLATFORM_NW_SE) | gTrackColours[SCHEME_SUPPORTS];
}
sub_98196C(imageId, 0, 0, 8, 32, 1, height + 5, get_current_rotation());
sub_98196C(imageId, 0, 0, 8, 32, 1, height + fenceOffsetA, get_current_rotation());
//height -= 5 (height)
track_paint_util_draw_station_covers(EDGE_NE, hasFence, entranceStyle, direction, height);
//height += 5 (height + 5)
@@ -382,7 +387,7 @@ void track_paint_util_draw_station(uint8 rideIndex, uint8 trackSequence, uint8 d
} else {
imageId = SPR_STATION_PLATFORM_NW_SE | gTrackColours[SCHEME_SUPPORTS];
}
sub_98196C(imageId, 24, 0, 8, 32, 1, height + 5, get_current_rotation());
sub_98196C(imageId, 24, 0, 8, 32, 1, height + fenceOffsetA, get_current_rotation());
//height += 2 (height + 7)
hasFence = track_paint_util_has_fence(EDGE_SW, position, mapElement, ride, get_current_rotation());
@@ -394,15 +399,15 @@ void track_paint_util_draw_station(uint8 rideIndex, uint8 trackSequence, uint8 d
} else {
imageId = SPR_STATION_FENCE_NW_SE | gTrackColours[SCHEME_SUPPORTS];
}
sub_98196C(imageId, 31, 0, 1, 32, 7, height + 7, get_current_rotation());
sub_98196C(imageId, 31, 0, 1, 32, 7, height + fenceOffsetB, get_current_rotation());
} else if (mapElement->properties.track.type == TRACK_ELEM_BEGIN_STATION && direction == 3) {
// Addition: draw only small fence if there is an entrance/exit at the beginning
imageId = SPR_STATION_FENCE_SMALL_SW_NE | gTrackColours[SCHEME_SUPPORTS];
sub_98196C(imageId, 23, 31, 8, 1, 7, height + 7, get_current_rotation());
sub_98196C(imageId, 23, 31, 8, 1, 7, height + fenceOffsetB, get_current_rotation());
} else if (mapElement->properties.track.type == TRACK_ELEM_END_STATION && direction == 1) {
// Addition: draw only small fence if there is an entrance/exit at the end
imageId = SPR_STATION_LIGHT_BACK_NW_SE | gTrackColours[SCHEME_SUPPORTS];
sub_98196C(imageId, 23, 31, 8, 1, 7, height + 7, get_current_rotation());
sub_98196C(imageId, 23, 31, 8, 1, 7, height + fenceOffsetB, get_current_rotation());
}
//height -= 7 (height)
@@ -411,15 +416,154 @@ void track_paint_util_draw_station(uint8 rideIndex, uint8 trackSequence, uint8 d
if (mapElement->properties.track.type == TRACK_ELEM_BEGIN_STATION && direction == 3) {
imageId = SPR_STATION_FENCE_SMALL_SW_NE | gTrackColours[SCHEME_SUPPORTS];
sub_98196C(imageId, 0, 31, 8, 1, 7, height + 7, get_current_rotation());
sub_98196C(imageId, 0, 31, 8, 1, 7, height + fenceOffsetB, get_current_rotation());
} else if (mapElement->properties.track.type == TRACK_ELEM_END_STATION && direction == 1) {
imageId = SPR_STATION_LIGHT_BACK_NW_SE | gTrackColours[SCHEME_SUPPORTS];
sub_98196C(imageId, 0, 31, 8, 1, 7, height + 7, get_current_rotation());
sub_98196C(imageId, 0, 31, 8, 1, 7, height + fenceOffsetB, get_current_rotation());
}
}
}
void track_paint_util_draw_station_inverted(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
rct_xy16 position = {gPaintMapPosition.x, gPaintMapPosition.y};
rct_ride * ride = get_ride(rideIndex);
const rct_ride_entrance_definition * entranceStyle = &RideEntranceDefinitions[ride->entrance_style];
const bool hasGreenLight = (bool) (mapElement->properties.track.sequence & 0x80);
bool hasFence;
uint32 imageId;
if (direction == 0 || direction == 2) {
//height += 5 (height + 5);
hasFence = track_paint_util_has_fence(EDGE_NW, position, mapElement, ride, get_current_rotation());
if (mapElement->properties.track.type == TRACK_ELEM_END_STATION && direction == 0) {
if (hasGreenLight) {
imageId = (hasFence ? SPR_STATION_PLATFORM_FENCED_END_GREEN_LIGHT_SW_NE : SPR_STATION_PLATFORM_END_GREEN_LIGHT_SW_NE) | gTrackColours[SCHEME_SUPPORTS];
} else {
imageId = (hasFence ? SPR_STATION_PLATFORM_FENCED_END_RED_LIGHT_SW_NE : SPR_STATION_PLATFORM_END_RED_LIGHT_SW_NE) | gTrackColours[SCHEME_SUPPORTS];
}
} else if (mapElement->properties.track.type == TRACK_ELEM_BEGIN_STATION && direction == 2) {
imageId = (hasFence ? SPR_STATION_PLATFORM_BEGIN_FENCED_SW_NE : SPR_STATION_PLATFORM_BEGIN_SW_NE) | gTrackColours[SCHEME_SUPPORTS];
} else {
imageId = (hasFence ? SPR_STATION_PLATFORM_FENCED_SW_NE : SPR_STATION_PLATFORM_SW_NE) | gTrackColours[SCHEME_SUPPORTS];
}
sub_98196C(imageId, 0, 0, 32, 8, 1, height + 6, get_current_rotation());
//height -= 5 (height)
track_paint_util_draw_station_covers_2(EDGE_NW, hasFence, entranceStyle, direction, height, true);
//height += 5 (height + 5)
if (mapElement->properties.track.type == TRACK_ELEM_END_STATION && direction == 0) {
imageId = (hasGreenLight ? SPR_STATION_PLATFORM_END_GREEN_LIGHT_SW_NE : SPR_STATION_PLATFORM_END_RED_LIGHT_SW_NE) | gTrackColours[SCHEME_SUPPORTS];
} else if (mapElement->properties.track.type == TRACK_ELEM_BEGIN_STATION && direction == 2) {
imageId = SPR_STATION_PLATFORM_BEGIN_SW_NE | gTrackColours[SCHEME_SUPPORTS];
} else {
imageId = SPR_STATION_PLATFORM_SW_NE | gTrackColours[SCHEME_SUPPORTS];
}
sub_98196C(imageId, 0, 24, 32, 8, 1, height + 6, get_current_rotation());
//height += 2 (height + 7)
hasFence = track_paint_util_has_fence(EDGE_SE, position, mapElement, ride, get_current_rotation());
if (hasFence) {
if (mapElement->properties.track.type == TRACK_ELEM_BEGIN_STATION && direction == 0) {
imageId = SPR_STATION_INVERTED_BEGIN_ANGLE_FENCE_SW_NE | gTrackColours[SCHEME_SUPPORTS];
} else if (mapElement->properties.track.type == TRACK_ELEM_END_STATION && direction == 2) {
imageId = SPR_STATION_INVERTED_LIGHT_BACK_ANGLE_FENCED_NE_SW | gTrackColours[SCHEME_SUPPORTS];
} else {
imageId = SPR_STATION_INVERTED_FENCE_SW_NE | gTrackColours[SCHEME_SUPPORTS];
}
sub_98196C(imageId, 0, 31, 32, 1, 7, height + 8, get_current_rotation());
} else if (mapElement->properties.track.type == TRACK_ELEM_BEGIN_STATION && direction == 0) {
// Addition: draw only small fence if there is an entrance/exit at the beginning
imageId = SPR_STATION_FENCE_SMALL_NW_SE | gTrackColours[SCHEME_SUPPORTS];
sub_98196C(imageId, 31, 23, 1, 8, 7, height + 8, get_current_rotation());
} else if (mapElement->properties.track.type == TRACK_ELEM_END_STATION && direction == 2) {
// Addition: draw only small fence if there is an entrance/exit at the end
imageId = SPR_STATION_LIGHT_BACK_NE_SW | gTrackColours[SCHEME_SUPPORTS];
sub_98196C(imageId, 31, 23, 1, 8, 7, height + 8, get_current_rotation());
}
//height -= 7 (height)
track_paint_util_draw_station_covers_2(EDGE_SE, hasFence, entranceStyle, direction, height, true);
//height += 7 (height + 7)
if (mapElement->properties.track.type == TRACK_ELEM_BEGIN_STATION && direction == 0) {
imageId = SPR_STATION_FENCE_SMALL_NW_SE | gTrackColours[SCHEME_SUPPORTS];
sub_98196C(imageId, 31, 0, 1, 8, 7, height + 8, get_current_rotation());
} else if (mapElement->properties.track.type == TRACK_ELEM_END_STATION && direction == 2) {
imageId = SPR_STATION_LIGHT_BACK_NE_SW | gTrackColours[SCHEME_SUPPORTS];
sub_98196C(imageId, 31, 0, 1, 8, 7, height + 8, get_current_rotation());
}
} else if (direction == 1 || direction == 3) {
//height += 5 (height + 5);
hasFence = track_paint_util_has_fence(EDGE_NE, position, mapElement, ride, get_current_rotation());
if (mapElement->properties.track.type == TRACK_ELEM_END_STATION && direction == 3) {
if (hasGreenLight) {
imageId = (hasFence ? SPR_STATION_PLATFORM_FENCED_END_GREEN_LIGHT_NW_SE : SPR_STATION_PLATFORM_END_GREEN_LIGHT_NW_SE) | gTrackColours[SCHEME_SUPPORTS];
} else {
imageId = (hasFence ? SPR_STATION_PLATFORM_FENCED_END_RED_LIGHT_NW_SE : SPR_STATION_PLATFORM_END_RED_LIGHT_NW_SE) | gTrackColours[SCHEME_SUPPORTS];
}
} else if (mapElement->properties.track.type == TRACK_ELEM_BEGIN_STATION && direction == 1) {
imageId = (hasFence ? SPR_STATION_PLATFORM_BEGIN_FENCED_NW_SE : SPR_STATION_PLATFORM_BEGIN_NW_SE) | gTrackColours[SCHEME_SUPPORTS];
} else {
imageId = (hasFence ? SPR_STATION_PLATFORM_FENCED_NW_SE : SPR_STATION_PLATFORM_NW_SE) | gTrackColours[SCHEME_SUPPORTS];
}
sub_98196C(imageId, 0, 0, 8, 32, 1, height + 6, get_current_rotation());
//height -= 5 (height)
track_paint_util_draw_station_covers_2(EDGE_NE, hasFence, entranceStyle, direction, height, true);
//height += 5 (height + 5)
if (mapElement->properties.track.type == TRACK_ELEM_END_STATION && direction == 3) {
imageId = (hasGreenLight ? SPR_STATION_PLATFORM_END_GREEN_LIGHT_NW_SE : SPR_STATION_PLATFORM_END_RED_LIGHT_NW_SE) | gTrackColours[SCHEME_SUPPORTS];
} else if (mapElement->properties.track.type == TRACK_ELEM_BEGIN_STATION && direction == 1) {
imageId = SPR_STATION_PLATFORM_BEGIN_NW_SE | gTrackColours[SCHEME_SUPPORTS];
} else {
imageId = SPR_STATION_PLATFORM_NW_SE | gTrackColours[SCHEME_SUPPORTS];
}
sub_98196C(imageId, 24, 0, 8, 32, 1, height + 6, get_current_rotation());
//height += 2 (height + 7)
hasFence = track_paint_util_has_fence(EDGE_SW, position, mapElement, ride, get_current_rotation());
if (hasFence) {
if (mapElement->properties.track.type == TRACK_ELEM_BEGIN_STATION && direction == 3) {
imageId = SPR_STATION_INVERTED_BEGIN_ANGLE_FENCE_NW_SE | gTrackColours[SCHEME_SUPPORTS];
} else if (mapElement->properties.track.type == TRACK_ELEM_END_STATION && direction == 1) {
imageId = SPR_STATION_INVERTED_LIGHT_BACK_ANGLE_FENCED_NW_SE | gTrackColours[SCHEME_SUPPORTS];
} else {
imageId = SPR_STATION_INVERTED_FENCE_NW_SE | gTrackColours[SCHEME_SUPPORTS];
}
sub_98196C(imageId, 31, 0, 1, 32, 7, height + 8, get_current_rotation());
} else if (mapElement->properties.track.type == TRACK_ELEM_BEGIN_STATION && direction == 3) {
// Addition: draw only small fence if there is an entrance/exit at the beginning
imageId = SPR_STATION_FENCE_SMALL_SW_NE | gTrackColours[SCHEME_SUPPORTS];
sub_98196C(imageId, 23, 31, 8, 1, 7, height + 8, get_current_rotation());
} else if (mapElement->properties.track.type == TRACK_ELEM_END_STATION && direction == 1) {
// Addition: draw only small fence if there is an entrance/exit at the end
imageId = SPR_STATION_LIGHT_BACK_NW_SE | gTrackColours[SCHEME_SUPPORTS];
sub_98196C(imageId, 23, 31, 8, 1, 7, height + 8, get_current_rotation());
}
//height -= 7 (height)
track_paint_util_draw_station_covers_2(EDGE_SW, hasFence, entranceStyle, direction, height, true);
//height += 7 (height + 7)
if (mapElement->properties.track.type == TRACK_ELEM_BEGIN_STATION && direction == 3) {
imageId = SPR_STATION_FENCE_SMALL_SW_NE | gTrackColours[SCHEME_SUPPORTS];
sub_98196C(imageId, 0, 31, 8, 1, 7, height + 8, get_current_rotation());
} else if (mapElement->properties.track.type == TRACK_ELEM_END_STATION && direction == 1) {
imageId = SPR_STATION_LIGHT_BACK_NW_SE | gTrackColours[SCHEME_SUPPORTS];
sub_98196C(imageId, 0, 31, 8, 1, 7, height + 8, get_current_rotation());
}
}
}
bool track_paint_util_draw_station_covers(enum edge edge, bool hasFence, const rct_ride_entrance_definition * entranceStyle, uint8 direction, uint16 height)
{
return track_paint_util_draw_station_covers_2(edge, hasFence, entranceStyle, direction, height, false);
}
bool track_paint_util_draw_station_covers_2(enum edge edge, bool hasFence, const rct_ride_entrance_definition * entranceStyle, uint8 direction, uint16 height, bool tall)
{
if (!(g141E9DB & (G141E9DB_FLAG_1 | G141E9DB_FLAG_2))) {
return false;
@@ -433,22 +577,22 @@ bool track_paint_util_draw_station_covers(enum edge edge, bool hasFence, const r
offset = (rct_xyz16) {0, 0, height};
switch (edge) {
case EDGE_NE:
bounds = (rct_xyz16) {1, 30, 0};
bounds = (rct_xyz16) {1, 30, (tall ? 46 : 0)};
boundsOffset = (rct_xyz16) {0, 1, height + 1};
imageOffset = hasFence ? SPR_STATION_COVER_OFFSET_SE_NW_BACK_1 : SPR_STATION_COVER_OFFSET_SE_NW_BACK_0;
break;
case EDGE_SE:
bounds = (rct_xyz16) {32, 32, 0};
boundsOffset = (rct_xyz16) {1, 0, height + 23};
boundsOffset = (rct_xyz16) {(tall ? 0 : 1), 0, height + (tall ? 47 : 23)};
imageOffset = SPR_STATION_COVER_OFFSET_NE_SW_FRONT;
break;
case EDGE_SW:
bounds = (rct_xyz16) {32, 32, 0};
boundsOffset = (rct_xyz16) {0, 0, height + 23};
boundsOffset = (rct_xyz16) {0, 0, height + (tall ? 47 : 23)};
imageOffset = SPR_STATION_COVER_OFFSET_SE_NW_FRONT;
break;
case EDGE_NW:
bounds = (rct_xyz16) {30, 1, 30};
bounds = (rct_xyz16) {30, 1, (tall ? 46 : 0)};
boundsOffset = (rct_xyz16) {1, 0, height + 1};
imageOffset = hasFence ? SPR_STATION_COVER_OFFSET_NE_SW_BACK_1 : SPR_STATION_COVER_OFFSET_NE_SW_BACK_0;
break;
@@ -462,6 +606,10 @@ bool track_paint_util_draw_station_covers(enum edge edge, bool hasFence, const r
return false;
}
if (tall) {
imageOffset += 6;
}
if (baseImageId & 0x40000000) {
imageId = (baseImageId & 0xBFFFFFFF) + imageOffset;
sub_98197C(imageId, (sint8)offset.x, (sint8)offset.y, bounds.x, bounds.y, (sint8)bounds.z, offset.z, boundsOffset.x, boundsOffset.y, boundsOffset.z, get_current_rotation());
@@ -555,13 +703,18 @@ void track_paint_util_draw_pier(rct_ride * ride, const rct_ride_entrance_definit
}
void track_paint_util_draw_station_metal_supports(uint8 direction, uint16 height, uint32 colour)
{
track_paint_util_draw_station_metal_supports_2(direction, height, colour, 3);
}
void track_paint_util_draw_station_metal_supports_2(uint8 direction, uint16 height, uint32 colour, uint8 type)
{
if (direction & 1) {
metal_a_supports_paint_setup(3, 6, 0, height, colour);
metal_a_supports_paint_setup(3, 7, 0, height, colour);
metal_a_supports_paint_setup(type, 6, 0, height, colour);
metal_a_supports_paint_setup(type, 7, 0, height, colour);
} else {
metal_a_supports_paint_setup(3, 5, 0, height, colour);
metal_a_supports_paint_setup(3, 8, 0, height, colour);
metal_a_supports_paint_setup(type, 5, 0, height, colour);
metal_a_supports_paint_setup(type, 8, 0, height, colour);
}
}
+26 -3
View File
@@ -118,7 +118,18 @@ enum {
SPR_STATION_PLATFORM_END_RED_LIGHT_NW_SE = 22389,
SPR_STATION_PLATFORM_END_GREEN_LIGHT_SW_NE = 22390,
SPR_STATION_PLATFORM_END_GREEN_LIGHT_NW_SE = 22391,
SPR_STATION_INVERTED_FENCE_SW_NE = 22392,
SPR_STATION_INVERTED_FENCE_NW_SE = 22393,
SPR_STATION_INVERTED_BEGIN_ANGLE_FENCE_SW_NE = 22394,
SPR_STATION_INVERTED_BEGIN_ANGLE_FENCE_NW_SE = 22395,
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_INVERTED_BAR_D_SW_NE = 22400,
SPR_STATION_INVERTED_BAR_D_NW_SE = 22401,
SPR_STATION_INVERTED_BAR_E_SW_NE = 22402,
SPR_STATION_INVERTED_BAR_E_NW_SE = 22403,
SPR_STATION_PIER_EDGE_SE = 22404,
SPR_STATION_PIER_EDGE_SW = 22405,
SPR_STATION_PIER_EDGE_NW = 22406,
@@ -133,12 +144,20 @@ enum {
SPR_STATION_NARROW_EDGE_FENCED_NE = 22415,
SPR_STATION_NARROW_EDGE_NW = 22416,
SPR_STATION_NARROW_EDGE_NE = 22417,
SPR_STATION_INVERTED_BAR_F_SW_NE = 22418,
SPR_STATION_INVERTED_BAR_F_NW_SE = 22419,
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,
SPR_STATION_INVERTED_BAR_B_NW_SE = 22425,
SPR_STATION_BASE_A_SW_NE = 22426,
SPR_STATION_BASE_A_NW_SE = 22427,
SPR_STATION_BASE_B_SW_NE = 22428,
SPR_STATION_BASE_B_NW_SE = 22429,
SPR_STATION_BASE_C_SW_NE = 22430,
SPR_STATION_BASE_C_NW_SE = 22431,
SPR_STATION_BASE_D = 22432,
SPR_ON_RIDE_PHOTO_CAMERA_N = 25615,
@@ -226,11 +245,15 @@ bool track_paint_util_has_fence(enum edge edge, rct_xy16 position, rct_map_eleme
void track_paint_util_paint_floor(uint8 edges, uint32 colourFlags, uint16 height, const uint32 floorSprites[4], uint8 rotation);
void track_paint_util_paint_fences(uint8 edges, rct_xy16 position, rct_map_element * mapElement, rct_ride * ride, uint32 colourFlags, uint16 height, const uint32 fenceSprites[4], uint8 rotation);
bool track_paint_util_draw_station_covers(enum edge edge, bool hasFence, const rct_ride_entrance_definition * entranceStyle, uint8 direction, uint16 height);
bool track_paint_util_draw_station_covers_2(enum edge edge, bool hasFence, const rct_ride_entrance_definition * entranceStyle, uint8 direction, uint16 height, bool tall);
void track_paint_util_draw_station_platform(rct_ride *ride, uint8 direction, int height, int zOffset, rct_map_element * mapElement);
void track_paint_util_draw_station(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement);
void track_paint_util_draw_station_2(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement, int fenceOffsetA, int fenceOffsetB);
void track_paint_util_draw_station_inverted(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement);
bool track_paint_util_should_paint_supports(rct_xy16 position);
void track_paint_util_draw_pier(rct_ride * ride, const rct_ride_entrance_definition * entranceStyle, rct_xy16 position, uint8 direction, int height, rct_map_element * mapElement, uint8 rotation);
void track_paint_util_draw_station_metal_supports(uint8 direction, uint16 height, uint32 colour);
void track_paint_util_draw_station_metal_supports_2(uint8 direction, uint16 height, uint32 colour, uint8 type);
void track_paint_util_right_quarter_turn_5_tiles_paint(sint8 thickness, sint16 height, int direction, uint8 trackSequence, uint32 colourFlags, const uint32 sprites[4][5], const rct_xy16 offsets[4][5], const rct_xy16 boundsLengths[4][5], const rct_xyz16 boundsOffsets[4][5], uint8 rotation);
void track_paint_util_right_quarter_turn_5_tiles_paint_2(sint16 height, int direction, uint8 rotation, uint8 trackSequence, uint32 colourFlags, const sprite_bb sprites[][5]);
+23
View File
@@ -46,6 +46,25 @@ static void suspended_monorail_track_flat(uint8 rideIndex, uint8 trackSequence,
paint_util_set_general_support_height(height + 48, 0x20);
}
static void suspended_monorail_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, 25853, SPR_STATION_INVERTED_BAR_F_SW_NE },
{ SPR_STATION_BASE_C_NW_SE, 25854, SPR_STATION_INVERTED_BAR_F_NW_SE },
{ SPR_STATION_BASE_C_SW_NE, 25853, SPR_STATION_INVERTED_BAR_F_SW_NE },
{ SPR_STATION_BASE_C_NW_SE, 25854, SPR_STATION_INVERTED_BAR_F_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 + 32, 0, 6, height + 32);
sub_98199C_rotated(direction, imageIds[direction][2] | gTrackColours[SCHEME_SUPPORTS], 0, 6, 32, 20, 3, height + 32, 0, 6, height + 32);
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 suspended_monorail_track_25_deg_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
{
switch (direction) {
@@ -1126,6 +1145,10 @@ TRACK_PAINT_FUNCTION get_track_paint_function_suspended_monorail(int trackType,
switch (trackType) {
case TRACK_ELEM_FLAT:
return suspended_monorail_track_flat;
case TRACK_ELEM_END_STATION:
case TRACK_ELEM_BEGIN_STATION:
case TRACK_ELEM_MIDDLE_STATION:
return suspended_monorail_track_station;
case TRACK_ELEM_25_DEG_UP:
return suspended_monorail_track_25_deg_up;
case TRACK_ELEM_FLAT_TO_25_DEG_UP:
+1
View File
@@ -511,6 +511,7 @@ static bool testTrackElement(uint8 rideType, uint8 trackType, utf8string *error)
unk_140E9A8 = &dpi;
rct_ride ride = { 0 };
// ride.entrance_style = RIDE_ENTRANCE_STYLE_CANVAS_TENT;
rct_ride_entry rideEntry = { 0 };
rct_ride_entry_vehicle vehicleEntry = {.base_image_id = 0x70000};
+3
View File
@@ -66,6 +66,8 @@
<PreprocessorDefinitions>__TESTPAINT__;DEBUG;NO_VEHICLES;OPENGL_NO_LINK;_CRT_SECURE_NO_WARNINGS;_USE_MATH_DEFINES;CURL_STATICLIB;SDL_MAIN_HANDLED;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>true</TreatWarningAsError>
<DisableSpecificWarnings>4200</DisableSpecificWarnings>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<MinimalRebuild>false</MinimalRebuild>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -78,6 +80,7 @@
<PreprocessorDefinitions>__TESTPAINT__;NO_VEHICLES;OPENGL_NO_LINK;_CRT_SECURE_NO_WARNINGS;_USE_MATH_DEFINES;CURL_STATICLIB;SDL_MAIN_HANDLED;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TreatWarningAsError>true</TreatWarningAsError>
<DisableSpecificWarnings>4200</DisableSpecificWarnings>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>