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

Fix suspended monorail painting

This commit is contained in:
Ted John
2016-10-10 00:10:01 +01:00
parent 7c0935f341
commit 3cedd8afa3
2 changed files with 25 additions and 3 deletions

View File

@@ -122,7 +122,6 @@ enum {
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,
@@ -131,7 +130,6 @@ enum {
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,
@@ -146,7 +144,8 @@ 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,

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: