From 5f5daa873a4c0ecced88e4b2a0d6df36691b05a9 Mon Sep 17 00:00:00 2001 From: Marijn van der Werf Date: Sun, 22 May 2016 16:14:27 +0200 Subject: [PATCH 1/7] Add empty functions --- src/ride/gentle/monorail_cycles.c | 81 +++++++++++++++++++++++++++++++ src/ride/track_data.c | 2 +- src/ride/track_paint.h | 1 + 3 files changed, 83 insertions(+), 1 deletion(-) diff --git a/src/ride/gentle/monorail_cycles.c b/src/ride/gentle/monorail_cycles.c index 846fd9695d..e1e5bc12ea 100644 --- a/src/ride/gentle/monorail_cycles.c +++ b/src/ride/gentle/monorail_cycles.c @@ -13,3 +13,84 @@ * A full copy of the GNU General Public License can be found in licence.txt *****************************************************************************/ #pragma endregion + +#include "../../common.h" +#include "../track_paint.h" +#include "../track.h" +#include "../vehicle_paint.h" +#include "../../interface/viewport.h" +#include "../../paint/paint.h" +#include "../../paint/supports.h" +#include "../../world/map.h" + +/** rct2: 0x*/ +static void paint_monorail_cycles_track_flat(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) +{ +} + +/** rct2: 0x*/ +static void paint_monorail_cycles_station(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) +{ +} + +/** rct2: 0x*/ +static void paint_monorail_cycles_track_left_quarter_turn_3_tiles(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) +{ +} + +/** rct2: 0x*/ +static void paint_monorail_cycles_track_right_quarter_turn_3_tiles(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) +{ +} + +/** rct2: 0x*/ +static void paint_monorail_cycles_track_left_quarter_turn_5_tiles(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) +{ +} + +/** rct2: 0x*/ +static void paint_monorail_cycles_track_right_quarter_turn_5_tiles(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) +{ +} + +/** rct2: 0x*/ +static void paint_monorail_cycles_track_s_bend_left(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) +{ +} + +/** rct2: 0x*/ +static void paint_monorail_cycles_track_s_bend_right(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) +{ +} + +/** + * rct2: 0x0088ac88 + */ +TRACK_PAINT_FUNCTION get_track_paint_function_monorail_cycles(int trackType, int direction) { + switch(trackType) { + case TRACK_ELEM_FLAT: + return paint_monorail_cycles_track_flat; + + case TRACK_ELEM_END_STATION: + case TRACK_ELEM_BEGIN_STATION: + case TRACK_ELEM_MIDDLE_STATION: + return paint_monorail_cycles_station; + + case TRACK_ELEM_LEFT_QUARTER_TURN_5_TILES: + return paint_monorail_cycles_track_left_quarter_turn_5_tiles; + case TRACK_ELEM_RIGHT_QUARTER_TURN_5_TILES: + return paint_monorail_cycles_track_right_quarter_turn_5_tiles; + + case TRACK_ELEM_S_BEND_LEFT: + return paint_monorail_cycles_track_s_bend_left; + case TRACK_ELEM_S_BEND_RIGHT: + return paint_monorail_cycles_track_s_bend_right; + + case TRACK_ELEM_LEFT_QUARTER_TURN_3_TILES: + return paint_monorail_cycles_track_left_quarter_turn_3_tiles; + case TRACK_ELEM_RIGHT_QUARTER_TURN_3_TILES: + return paint_monorail_cycles_track_right_quarter_turn_3_tiles; + } + + return NULL; +} diff --git a/src/ride/track_data.c b/src/ride/track_data.c index 0c1acecbff..901504dce6 100644 --- a/src/ride/track_data.c +++ b/src/ride/track_data.c @@ -5634,7 +5634,7 @@ const TRACK_PAINT_FUNCTION_GETTER RideTypeTrackPaintFunctions[91] = { get_track_paint_function_roto_drop, // RIDE_TYPE_ROTO_DROP get_track_paint_function_flying_saucers,// RIDE_TYPE_FLYING_SAUCERS get_track_paint_function_crooked_house, // RIDE_TYPE_CROOKED_HOUSE - 0, // RIDE_TYPE_MONORAIL_CYCLES + get_track_paint_function_monorail_cycles, // RIDE_TYPE_MONORAIL_CYCLES 0, // RIDE_TYPE_COMPACT_INVERTED_COASTER 0, // RIDE_TYPE_WATER_COASTER 0, // RIDE_TYPE_AIR_POWERED_VERTICAL_COASTER diff --git a/src/ride/track_paint.h b/src/ride/track_paint.h index df08014e04..b97a790d2f 100644 --- a/src/ride/track_paint.h +++ b/src/ride/track_paint.h @@ -206,6 +206,7 @@ TRACK_PAINT_FUNCTION get_track_paint_function_mini_golf(int trackType, int direc TRACK_PAINT_FUNCTION get_track_paint_function_roto_drop(int trackType, int direction); TRACK_PAINT_FUNCTION get_track_paint_function_flying_saucers(int trackType, int direction); TRACK_PAINT_FUNCTION get_track_paint_function_crooked_house(int trackType, int direction); +TRACK_PAINT_FUNCTION get_track_paint_function_monorail_cycles(int trackType, int direction); TRACK_PAINT_FUNCTION get_track_paint_function_magic_carpet(int trackType, int direction); TRACK_PAINT_FUNCTION get_track_paint_function_submarine_ride(int trackType, int direction); TRACK_PAINT_FUNCTION get_track_paint_function_enterprise(int trackType, int direction); From f58886e68c40e8200ae6c202a5f983c81d6da908 Mon Sep 17 00:00:00 2001 From: Marijn van der Werf Date: Sun, 22 May 2016 16:25:31 +0200 Subject: [PATCH 2/7] Draw flat track --- src/ride/gentle/monorail_cycles.c | 43 ++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/src/ride/gentle/monorail_cycles.c b/src/ride/gentle/monorail_cycles.c index e1e5bc12ea..21d5bbd357 100644 --- a/src/ride/gentle/monorail_cycles.c +++ b/src/ride/gentle/monorail_cycles.c @@ -23,9 +23,50 @@ #include "../../paint/supports.h" #include "../../world/map.h" -/** rct2: 0x*/ +enum +{ + SPR_MONORAIL_CYCLES_FLAT_SW_NE = 16820, + SPR_MONORAIL_CYCLES_FLAT_NW_SE = 16821, +}; + +static const uint32 monorail_cycles_track_pieces_flat[4] = { + SPR_MONORAIL_CYCLES_FLAT_SW_NE, + SPR_MONORAIL_CYCLES_FLAT_NW_SE +}; + +static paint_struct * paint_monorail_cycles_util_7c( + bool flip, + uint32 image_id, + sint8 x_offset, sint8 y_offset, + sint16 bound_box_length_x, sint16 bound_box_length_y, sint8 bound_box_length_z, + sint16 z_offset, + sint16 bound_box_offset_x, sint16 bound_box_offset_y, sint16 bound_box_offset_z, + uint32 rotation +) +{ + if (flip) { + return sub_98197C(image_id, y_offset, x_offset, bound_box_length_y, bound_box_length_x, bound_box_length_z, z_offset, bound_box_offset_y, bound_box_offset_x, bound_box_offset_z, rotation); + } + + return sub_98197C(image_id, x_offset, y_offset, bound_box_length_x, bound_box_length_y, bound_box_length_z, z_offset, bound_box_offset_x, bound_box_offset_y, bound_box_offset_z, rotation); +} + +/** rct2: 0x0088AD48 */ static void paint_monorail_cycles_track_flat(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { + uint32 imageId = monorail_cycles_track_pieces_flat[(direction & 1)] | RCT2_GLOBAL(0x00F44198, uint32); + paint_monorail_cycles_util_7c((bool) (direction & 1), imageId, 0, 0, 32, 20, 3, height, 0, 6, height, get_current_rotation()); + + if (direction & 1) { + paint_util_push_tunnel_right(height, TUNNEL_0); + } else { + paint_util_push_tunnel_left(height, TUNNEL_0); + } + + metal_a_supports_paint_setup((direction & 1) ? 5 : 4, 4, -1, height, RCT2_GLOBAL(0x00F4419C, uint32)); + + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_D0 | SEGMENT_C4 | SEGMENT_CC, direction), 0xFFFF, 0); + paint_util_set_general_support_height(height + 32, 0x20); } /** rct2: 0x*/ From 1b994578262aded9aef589a9312479997c7d569b Mon Sep 17 00:00:00 2001 From: Marijn van der Werf Date: Sun, 22 May 2016 16:35:31 +0200 Subject: [PATCH 3/7] Draw 3-tile turns --- src/ride/gentle/monorail_cycles.c | 62 ++++++++++++++++++++++++++++++- 1 file changed, 60 insertions(+), 2 deletions(-) diff --git a/src/ride/gentle/monorail_cycles.c b/src/ride/gentle/monorail_cycles.c index 21d5bbd357..274dd8b6ca 100644 --- a/src/ride/gentle/monorail_cycles.c +++ b/src/ride/gentle/monorail_cycles.c @@ -27,6 +27,19 @@ enum { SPR_MONORAIL_CYCLES_FLAT_SW_NE = 16820, SPR_MONORAIL_CYCLES_FLAT_NW_SE = 16821, + + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_SW_SE_PART_0 = 16842, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_SW_SE_PART_1 = 16843, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_SW_SE_PART_2 = 16844, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_NW_SW_PART_0 = 16845, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_NW_SW_PART_1 = 16846, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_NW_SW_PART_2 = 16847, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_NE_NW_PART_0 = 16848, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_NE_NW_PART_1 = 16849, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_NE_NW_PART_2 = 16850, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_SE_NE_PART_0 = 16851, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_SE_NE_PART_1 = 16852, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_SE_NE_PART_2 = 16853, }; static const uint32 monorail_cycles_track_pieces_flat[4] = { @@ -34,6 +47,29 @@ static const uint32 monorail_cycles_track_pieces_flat[4] = { SPR_MONORAIL_CYCLES_FLAT_NW_SE }; +static const uint32 monorail_cycles_track_pieces_flat_quarter_turn_3_tiles[4][3] = { + { + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_SW_SE_PART_0, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_SW_SE_PART_1, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_SW_SE_PART_2 + }, + { + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_NW_SW_PART_0, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_NW_SW_PART_1, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_NW_SW_PART_2 + }, + { + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_NE_NW_PART_0, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_NE_NW_PART_1, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_NE_NW_PART_2 + }, + { + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_SE_NE_PART_0, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_SE_NE_PART_1, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_SE_NE_PART_2 + } +}; + static paint_struct * paint_monorail_cycles_util_7c( bool flip, uint32 image_id, @@ -74,14 +110,36 @@ static void paint_monorail_cycles_station(uint8 rideIndex, uint8 trackSequence, { } -/** rct2: 0x*/ +/** rct2: 0x0088AD88 */ static void paint_monorail_cycles_track_left_quarter_turn_3_tiles(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { + track_paint_util_left_quarter_turn_3_tiles_paint(3, height, direction, trackSequence, RCT2_GLOBAL(0x00F44198, uint32), monorail_cycles_track_pieces_flat_quarter_turn_3_tiles, get_current_rotation()); + track_paint_util_left_quarter_turn_3_tiles_tunnel(height, direction, trackSequence); + + switch (trackSequence) { + case 0: + metal_a_supports_paint_setup(4, 4, -1, height, RCT2_GLOBAL(0x00F4419C, uint32)); + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_D0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_B4, direction), 0xFFFF, 0); + break; + case 2: + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C8 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_B8, direction), 0xFFFF, 0); + break; + case 3: + metal_a_supports_paint_setup(4, 4, -1, height, RCT2_GLOBAL(0x00F4419C, uint32)); + paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C8 | SEGMENT_C4 | SEGMENT_D4 | SEGMENT_C0, direction), 0xFFFF, 0); + break; + } + + paint_util_set_general_support_height(height + 32, 0x20); } -/** rct2: 0x*/ +static const uint8 right_quarter_turn_3_tiles_to_left_turn_map[] = {3, 1, 2, 0}; + +/** rct2: 0x0088AD98 */ static void paint_monorail_cycles_track_right_quarter_turn_3_tiles(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { + trackSequence = right_quarter_turn_3_tiles_to_left_turn_map[trackSequence]; + paint_monorail_cycles_track_left_quarter_turn_3_tiles(rideIndex, trackSequence, (direction + 3) % 4, height, mapElement); } /** rct2: 0x*/ From 75441584b6d36611318f1dee6ffe67d2ab5bd0c5 Mon Sep 17 00:00:00 2001 From: Marijn van der Werf Date: Sun, 22 May 2016 16:50:04 +0200 Subject: [PATCH 4/7] Draw 5-tile turns --- src/ride/gentle/monorail_cycles.c | 131 ++++++++++++++++++++++++++++-- src/ride/track_paint.c | 53 ++++++++++++ src/ride/track_paint.h | 1 + 3 files changed, 179 insertions(+), 6 deletions(-) diff --git a/src/ride/gentle/monorail_cycles.c b/src/ride/gentle/monorail_cycles.c index 274dd8b6ca..5e3858b610 100644 --- a/src/ride/gentle/monorail_cycles.c +++ b/src/ride/gentle/monorail_cycles.c @@ -27,7 +27,26 @@ enum { SPR_MONORAIL_CYCLES_FLAT_SW_NE = 16820, SPR_MONORAIL_CYCLES_FLAT_NW_SE = 16821, - + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_SW_SE_PART_0 = 16822, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_SW_SE_PART_1 = 16823, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_SW_SE_PART_2 = 16824, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_SW_SE_PART_3 = 16825, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_SW_SE_PART_4 = 16826, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_NW_SW_PART_0 = 16827, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_NW_SW_PART_1 = 16828, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_NW_SW_PART_2 = 16829, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_NW_SW_PART_3 = 16830, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_NW_SW_PART_4 = 16831, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_NE_NW_PART_0 = 16832, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_NE_NW_PART_1 = 16833, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_NE_NW_PART_2 = 16834, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_NE_NW_PART_3 = 16835, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_NE_NW_PART_4 = 16836, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_SE_NE_PART_0 = 16837, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_SE_NE_PART_1 = 16838, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_SE_NE_PART_2 = 16839, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_SE_NE_PART_3 = 16840, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_SE_NE_PART_4 = 16841, SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_SW_SE_PART_0 = 16842, SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_SW_SE_PART_1 = 16843, SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_SW_SE_PART_2 = 16844, @@ -47,6 +66,37 @@ static const uint32 monorail_cycles_track_pieces_flat[4] = { SPR_MONORAIL_CYCLES_FLAT_NW_SE }; +static const uint32 monorail_cycles_track_pieces_flat_quarter_turn_5_tiles[4][5] = { + { + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_SW_SE_PART_0, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_SW_SE_PART_1, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_SW_SE_PART_2, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_SW_SE_PART_3, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_SW_SE_PART_4, + }, + { + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_NW_SW_PART_0, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_NW_SW_PART_1, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_NW_SW_PART_2, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_NW_SW_PART_3, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_NW_SW_PART_4, + }, + { + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_NE_NW_PART_0, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_NE_NW_PART_1, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_NE_NW_PART_2, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_NE_NW_PART_3, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_NE_NW_PART_4, + }, + { + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_SE_NE_PART_0, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_SE_NE_PART_1, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_SE_NE_PART_2, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_SE_NE_PART_3, + SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_5_TILES_SE_NE_PART_4, + } +}; + static const uint32 monorail_cycles_track_pieces_flat_quarter_turn_3_tiles[4][3] = { { SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_SW_SE_PART_0, @@ -142,14 +192,83 @@ static void paint_monorail_cycles_track_right_quarter_turn_3_tiles(uint8 rideInd paint_monorail_cycles_track_left_quarter_turn_3_tiles(rideIndex, trackSequence, (direction + 3) % 4, height, mapElement); } -/** rct2: 0x*/ -static void paint_monorail_cycles_track_left_quarter_turn_5_tiles(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) -{ -} +static const sint8 monorail_cycles_track_right_quarter_turn_5_tiles_support_height_offset[][7] = { + {-2, 0, -2, 0, 0, -3, -1}, + {-3, 0, 0, 0, 0, 0, 0}, + {0}, + {0, 0, 0, 0, 0, -2, -3}, +}; -/** rct2: 0x*/ +static const sint8 monorail_cycles_track_right_quarter_turn_5_tiles_support_special[][7] = { + {0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1}, + {0, 0, 1, 0, 0, 1, 1}, + {1, 0, 0, 0, 0, 0, 0}, +}; + +/** rct2: 0x0088ADB8 */ static void paint_monorail_cycles_track_right_quarter_turn_5_tiles(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { + track_paint_util_right_quarter_turn_5_tiles_paint(1, height, direction, trackSequence, RCT2_GLOBAL(0x00F44198, uint32), monorail_cycles_track_pieces_flat_quarter_turn_5_tiles, get_current_rotation()); + + + int supportHeight = height - monorail_cycles_track_right_quarter_turn_5_tiles_support_height_offset[direction][trackSequence]; + int supportSpecial = monorail_cycles_track_right_quarter_turn_5_tiles_support_special[direction][trackSequence]; + switch (trackSequence) { + case 0: + metal_a_supports_paint_setup((direction & 1) ? 5 : 4, 4, 0, supportHeight, RCT2_GLOBAL(0x00F4419C, uint32)); + break; + case 2: + if (direction == 0) metal_a_supports_paint_setup((direction & 1) ? 5 : 4, 8, supportSpecial, supportHeight, RCT2_GLOBAL(0x00F4419C, uint32)); + if (direction == 1) metal_a_supports_paint_setup((direction & 1) ? 5 : 4, 7, supportSpecial, supportHeight, RCT2_GLOBAL(0x00F4419C, uint32)); + if (direction == 2) metal_a_supports_paint_setup((direction & 1) ? 5 : 4, 5, supportSpecial, supportHeight, RCT2_GLOBAL(0x00F4419C, uint32)); + if (direction == 3) metal_a_supports_paint_setup((direction & 1) ? 5 : 4, 6, supportSpecial, supportHeight, RCT2_GLOBAL(0x00F4419C, uint32)); + break; + case 5: + if (direction == 0) metal_a_supports_paint_setup((direction & 1) ? 4 : 5, 7, supportSpecial, supportHeight, RCT2_GLOBAL(0x00F4419C, uint32)); + if (direction == 1) metal_a_supports_paint_setup((direction & 1) ? 4 : 5, 5, supportSpecial, supportHeight, RCT2_GLOBAL(0x00F4419C, uint32)); + if (direction == 2) metal_a_supports_paint_setup((direction & 1) ? 4 : 5, 6, supportSpecial, supportHeight, RCT2_GLOBAL(0x00F4419C, uint32)); + if (direction == 3) metal_a_supports_paint_setup((direction & 1) ? 4 : 5, 8, supportSpecial, supportHeight, RCT2_GLOBAL(0x00F4419C, uint32)); + break; + case 6: + metal_a_supports_paint_setup((direction & 1) ? 4 : 5, 4, supportSpecial, supportHeight, RCT2_GLOBAL(0x00F4419C, uint32)); + break; + } + + if (direction == 0 && trackSequence == 0) { + paint_util_push_tunnel_left(height, TUNNEL_0); + } + + if (direction == 0 && trackSequence == 6) { + paint_util_push_tunnel_right(height, TUNNEL_0); + } + + if (direction == 1 && trackSequence == 6) { + paint_util_push_tunnel_left(height, TUNNEL_0); + } + + if (direction == 3 && trackSequence == 0) { + paint_util_push_tunnel_right(height, TUNNEL_0); + } + + switch (trackSequence) { + case 0: paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_D0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_BC, direction), 0xFFFF, 0); break; + case 2: paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_D0 | SEGMENT_C4 | SEGMENT_D4 | SEGMENT_BC | SEGMENT_C0 | SEGMENT_CC, direction), 0xFFFF, 0); break; + case 3: paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C8 | SEGMENT_CC | SEGMENT_C4, direction), 0xFFFF, 0); break; + case 5: paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_D4 | SEGMENT_C4 | SEGMENT_D0 | SEGMENT_B8 | SEGMENT_C0 | SEGMENT_C8, direction), 0xFFFF, 0); break; + case 6: paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_D4 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_B8, direction), 0xFFFF, 0); break; + } + + paint_util_set_general_support_height(height + 32, 0x20); +} + +static const uint8 left_quarter_turn_5_tiles_to_right_turn_map[] = {6, 4, 5, 3, 1, 2, 0}; + +/** rct2: 0x0088ADA8 */ +static void paint_monorail_cycles_track_left_quarter_turn_5_tiles(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) +{ + trackSequence = left_quarter_turn_5_tiles_to_right_turn_map[trackSequence]; + paint_monorail_cycles_track_right_quarter_turn_5_tiles(rideIndex, trackSequence, (direction + 1) % 4, height, mapElement); } /** rct2: 0x*/ diff --git a/src/ride/track_paint.c b/src/ride/track_paint.c index ff56497844..c14a38cd1d 100644 --- a/src/ride/track_paint.c +++ b/src/ride/track_paint.c @@ -483,6 +483,59 @@ void track_paint_util_draw_pier(rct_ride * ride, const rct_ride_entrance_definit } } +static const sint8 right_quarter_turn_5_tiles_sprite_map[] = {0, -1, 1, 2, -1, 3, 4}; +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], uint8 rotation) +{ + sint8 sprite = right_quarter_turn_5_tiles_sprite_map[trackSequence]; + if (sprite < 0) { + return; + } + + uint32 imageId = sprites[direction][sprite] | colourFlags; + + switch (direction) { + case 0: + switch (trackSequence) { + case 0: sub_98197C(imageId, 0, 0, 32, 20, thickness, height, 0, 6, height, rotation); break; + case 2: sub_98197C(imageId, 0, 0, 32, 16, thickness, height, 0, 16, height, rotation); break; + case 3: sub_98197C(imageId, 0, 0, 16, 16, thickness, height, 0, 0, height, rotation); break; + case 5: sub_98197C(imageId, 0, 0, 16, 32, thickness, height, 16, 0, height, rotation); break; + case 6: sub_98197C(imageId, 0, 0, 20, 32, thickness, height, 6, 0, height, rotation); break; + } + break; + + case 1: + switch (trackSequence) { + case 0: sub_98197C(imageId, 0, 0, 20, 32, thickness, height, 6, 0, height, rotation); break; + case 2: sub_98197C(imageId, 0, 0, 16, 32, thickness, height, 16, 0, height, rotation); break; + case 3: sub_98197C(imageId, 0, 0, 16, 16, thickness, height, 0, 16, height, rotation); break; + case 5: sub_98197C(imageId, 0, 0, 32, 16, thickness, height, 0, 0, height, rotation); break; + case 6: sub_98197C(imageId, 0, 0, 32, 20, thickness, height, 0, 6, height, rotation); break; + } + break; + + case 2: + switch (trackSequence) { + case 0: sub_98197C(imageId, 0, 0, 32, 20, thickness, height, 0, 6, height, rotation); break; + case 2: sub_98197C(imageId, 0, 0, 32, 16, thickness, height, 0, 0, height, rotation); break; + case 3: sub_98197C(imageId, 0, 0, 16, 16, thickness, height, 16, 16, height, rotation); break; + case 5: sub_98197C(imageId, 0, 0, 20, 32, thickness, height, 0, 0, height, rotation); break; + case 6: sub_98197C(imageId, 0, 0, 20, 32, thickness, height, 6, 0, height, rotation); break; + } + break; + + case 3: + switch (trackSequence) { + case 0: sub_98197C(imageId, 0, 0, 20, 32, thickness, height, 6, 0, height, rotation); break; + case 2: sub_98197C(imageId, 0, 0, 16, 32, thickness, height, 0, 0, height, rotation); break; + case 3: sub_98197C(imageId, 0, 0, 16, 16, thickness, height, 16, 0, height, rotation); break; + case 5: sub_98197C(imageId, 0, 0, 32, 16, thickness, height, 0, 16, height, rotation); break; + case 6: sub_98197C(imageId, 0, 0, 32, 20, thickness, height, 0, 6, height, rotation); break; + } + break; + } +} + static const sint8 left_quarter_turn_3_tiles_sprite_map[] = {2, -1, 1, 0}; void track_paint_util_left_quarter_turn_3_tiles_paint(sint8 thickness, sint16 height, int direction, uint8 trackSequence, uint32 colourFlags, const uint32 sprites[4][3], uint8 rotation) { diff --git a/src/ride/track_paint.h b/src/ride/track_paint.h index b97a790d2f..25b54aeecf 100644 --- a/src/ride/track_paint.h +++ b/src/ride/track_paint.h @@ -169,6 +169,7 @@ void track_paint_util_draw_station(uint8 rideIndex, uint8 trackSequence, uint8 d 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_right_quarter_turn_5_tiles_paint(sint8 thickness, sint16 height, int direction, uint8 trackSequence, uint32 colourFlags, const uint32 sprites[4][5], uint8 rotation); void track_paint_util_left_quarter_turn_3_tiles_paint(sint8 thickness, sint16 height, int direction, uint8 trackSequence, uint32 colourFlags, const uint32 sprites[4][3], uint8 rotation); void track_paint_util_left_quarter_turn_3_tiles_tunnel(sint16 height, uint8 direction, uint8 trackSequence); void track_paint_util_left_quarter_turn_1_tile_paint(sint8 thickness, sint16 height, sint16 boundBoxZOffset, int direction, uint32 colourFlags, const uint32 * sprites, uint8 rotation); From b11982b5a6ffac6daf79500b8a61b20380911e52 Mon Sep 17 00:00:00 2001 From: Marijn van der Werf Date: Sun, 22 May 2016 17:50:54 +0200 Subject: [PATCH 5/7] Draw left S-bend --- src/ride/gentle/monorail_cycles.c | 76 ++++++++++++++++++++++++++++++- 1 file changed, 74 insertions(+), 2 deletions(-) diff --git a/src/ride/gentle/monorail_cycles.c b/src/ride/gentle/monorail_cycles.c index 5e3858b610..f7f7a4097e 100644 --- a/src/ride/gentle/monorail_cycles.c +++ b/src/ride/gentle/monorail_cycles.c @@ -59,6 +59,22 @@ enum SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_SE_NE_PART_0 = 16851, SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_SE_NE_PART_1 = 16852, SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_SE_NE_PART_2 = 16853, + SPR_MONORAIL_CYCLES_S_BEND_LEFT_SW_NE_PART_0 = 16854, + SPR_MONORAIL_CYCLES_S_BEND_LEFT_SW_NE_PART_1 = 16855, + SPR_MONORAIL_CYCLES_S_BEND_LEFT_SW_NE_PART_2 = 16856, + SPR_MONORAIL_CYCLES_S_BEND_LEFT_SW_NE_PART_3 = 16857, + SPR_MONORAIL_CYCLES_S_BEND_LEFT_NW_SE_PART_0 = 16858, + SPR_MONORAIL_CYCLES_S_BEND_LEFT_NW_SE_PART_1 = 16859, + SPR_MONORAIL_CYCLES_S_BEND_LEFT_NW_SE_PART_2 = 16860, + SPR_MONORAIL_CYCLES_S_BEND_LEFT_NW_SE_PART_3 = 16861, + SPR_MONORAIL_CYCLES_S_BEND_RIGHT_SW_NE_PART_0 = 16862, + SPR_MONORAIL_CYCLES_S_BEND_RIGHT_SW_NE_PART_1 = 16863, + SPR_MONORAIL_CYCLES_S_BEND_RIGHT_SW_NE_PART_2 = 16864, + SPR_MONORAIL_CYCLES_S_BEND_RIGHT_SW_NE_PART_3 = 16865, + SPR_MONORAIL_CYCLES_S_BEND_RIGHT_NW_SE_PART_0 = 16866, + SPR_MONORAIL_CYCLES_S_BEND_RIGHT_NW_SE_PART_1 = 16867, + SPR_MONORAIL_CYCLES_S_BEND_RIGHT_NW_SE_PART_2 = 16868, + SPR_MONORAIL_CYCLES_S_BEND_RIGHT_NW_SE_PART_3 = 16869, }; static const uint32 monorail_cycles_track_pieces_flat[4] = { @@ -97,6 +113,21 @@ static const uint32 monorail_cycles_track_pieces_flat_quarter_turn_5_tiles[4][5] } }; +static const uint32 monorail_cycles_track_pieces_s_bend_left[2][4] = { + { + SPR_MONORAIL_CYCLES_S_BEND_LEFT_SW_NE_PART_0, + SPR_MONORAIL_CYCLES_S_BEND_LEFT_SW_NE_PART_1, + SPR_MONORAIL_CYCLES_S_BEND_LEFT_SW_NE_PART_2, + SPR_MONORAIL_CYCLES_S_BEND_LEFT_SW_NE_PART_3, + }, + { + SPR_MONORAIL_CYCLES_S_BEND_LEFT_NW_SE_PART_0, + SPR_MONORAIL_CYCLES_S_BEND_LEFT_NW_SE_PART_1, + SPR_MONORAIL_CYCLES_S_BEND_LEFT_NW_SE_PART_2, + SPR_MONORAIL_CYCLES_S_BEND_LEFT_NW_SE_PART_3, + } +}; + static const uint32 monorail_cycles_track_pieces_flat_quarter_turn_3_tiles[4][3] = { { SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_SW_SE_PART_0, @@ -212,7 +243,7 @@ static void paint_monorail_cycles_track_right_quarter_turn_5_tiles(uint8 rideInd track_paint_util_right_quarter_turn_5_tiles_paint(1, height, direction, trackSequence, RCT2_GLOBAL(0x00F44198, uint32), monorail_cycles_track_pieces_flat_quarter_turn_5_tiles, get_current_rotation()); - int supportHeight = height - monorail_cycles_track_right_quarter_turn_5_tiles_support_height_offset[direction][trackSequence]; + int supportHeight = height + monorail_cycles_track_right_quarter_turn_5_tiles_support_height_offset[direction][trackSequence]; int supportSpecial = monorail_cycles_track_right_quarter_turn_5_tiles_support_special[direction][trackSequence]; switch (trackSequence) { case 0: @@ -271,9 +302,50 @@ static void paint_monorail_cycles_track_left_quarter_turn_5_tiles(uint8 rideInde paint_monorail_cycles_track_right_quarter_turn_5_tiles(rideIndex, trackSequence, (direction + 1) % 4, height, mapElement); } -/** rct2: 0x*/ +/** rct2: 0x0088ADC8 */ static void paint_monorail_cycles_track_s_bend_left(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { + if (direction == 2 || direction == 3) { + trackSequence = 3 - trackSequence; + } + + uint32 imageId = monorail_cycles_track_pieces_s_bend_left[direction&1][trackSequence] | RCT2_GLOBAL(0x00F44198, uint32); + switch (trackSequence) { + case 0: paint_monorail_cycles_util_7c(direction, imageId, 0, 0, 32, 20, 1, height, 0, 6, height, get_current_rotation()); break; + case 1: paint_monorail_cycles_util_7c(direction, imageId, 0, 0, 32, 26, 1, height, 0, 0, height, get_current_rotation()); break; + case 2: paint_monorail_cycles_util_7c(direction, imageId, 0, 0, 32, 26, 1, height, 0, 6, height, get_current_rotation()); break; + case 3: paint_monorail_cycles_util_7c(direction, imageId, 0, 0, 32, 20, 1, height, 0, 6, height, get_current_rotation()); break; + } + + if (direction == 0 | direction == 2) { + if (trackSequence == 0) { + paint_util_push_tunnel_left(height, TUNNEL_0); + } + + switch (trackSequence) { + case 0: metal_a_supports_paint_setup(4, 4, 0, height, RCT2_GLOBAL(0x00F4419C, uint32)); break; + case 1: metal_a_supports_paint_setup(4, 5, 0, height, RCT2_GLOBAL(0x00F4419C, uint32)); break; + case 3: metal_a_supports_paint_setup(4, 4, 0, height, RCT2_GLOBAL(0x00F4419C, uint32)); break; + } + } else { + if (trackSequence == 3) { + paint_util_push_tunnel_right(height, TUNNEL_0); + } + + switch (trackSequence) { + case 0: metal_a_supports_paint_setup(5, 4, 0, height, RCT2_GLOBAL(0x00F4419C, uint32)); break; + case 1: metal_a_supports_paint_setup(5, 6, 0, height, RCT2_GLOBAL(0x00F4419C, uint32)); break; + case 3: metal_a_supports_paint_setup(5, 4, 0, height - 2, RCT2_GLOBAL(0x00F4419C, uint32)); break; + } + } + + switch (trackSequence) { + case 0: paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_D0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_B4, direction), 0xFFFF, 0); break; + case 1: paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_D0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_B8 | SEGMENT_C8 | SEGMENT_B4, direction), 0xFFFF, 0); break; + case 2: paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_D0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_C0 | SEGMENT_D4 | SEGMENT_BC, direction), 0xFFFF, 0); break; + case 3: paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_D0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_C0, direction), 0xFFFF, 0); break; + } + paint_util_set_general_support_height(height + 32, 0x20); } /** rct2: 0x*/ From 53c7cb3a0c381fe4e374295aa02b2bde420d4a82 Mon Sep 17 00:00:00 2001 From: Marijn van der Werf Date: Sun, 22 May 2016 18:13:50 +0200 Subject: [PATCH 6/7] Draw right S-bend --- src/ride/gentle/monorail_cycles.c | 56 +++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/src/ride/gentle/monorail_cycles.c b/src/ride/gentle/monorail_cycles.c index f7f7a4097e..65ec776e25 100644 --- a/src/ride/gentle/monorail_cycles.c +++ b/src/ride/gentle/monorail_cycles.c @@ -128,6 +128,21 @@ static const uint32 monorail_cycles_track_pieces_s_bend_left[2][4] = { } }; +static const uint32 monorail_cycles_track_pieces_s_bend_right[2][4] = { + { + SPR_MONORAIL_CYCLES_S_BEND_RIGHT_SW_NE_PART_0, + SPR_MONORAIL_CYCLES_S_BEND_RIGHT_SW_NE_PART_1, + SPR_MONORAIL_CYCLES_S_BEND_RIGHT_SW_NE_PART_2, + SPR_MONORAIL_CYCLES_S_BEND_RIGHT_SW_NE_PART_3, + }, + { + SPR_MONORAIL_CYCLES_S_BEND_RIGHT_NW_SE_PART_0, + SPR_MONORAIL_CYCLES_S_BEND_RIGHT_NW_SE_PART_1, + SPR_MONORAIL_CYCLES_S_BEND_RIGHT_NW_SE_PART_2, + SPR_MONORAIL_CYCLES_S_BEND_RIGHT_NW_SE_PART_3, + } +}; + static const uint32 monorail_cycles_track_pieces_flat_quarter_turn_3_tiles[4][3] = { { SPR_MONORAIL_CYCLES_FLAT_QUARTER_TURN_3_TILES_SW_SE_PART_0, @@ -351,6 +366,47 @@ static void paint_monorail_cycles_track_s_bend_left(uint8 rideIndex, uint8 track /** rct2: 0x*/ static void paint_monorail_cycles_track_s_bend_right(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { + if (direction == 2 || direction == 3) { + trackSequence = 3 - trackSequence; + } + + uint32 imageId = monorail_cycles_track_pieces_s_bend_right[direction&1][trackSequence] | RCT2_GLOBAL(0x00F44198, uint32); + switch (trackSequence) { + case 0: paint_monorail_cycles_util_7c(direction, imageId, 0, 0, 32, 20, 1, height, 0, 6, height, get_current_rotation()); break; + case 1: paint_monorail_cycles_util_7c(direction, imageId, 0, 0, 32, 26, 1, height, 0, 6, height, get_current_rotation()); break; + case 2: paint_monorail_cycles_util_7c(direction, imageId, 0, 0, 32, 26, 1, height, 0, 0, height, get_current_rotation()); break; + case 3: paint_monorail_cycles_util_7c(direction, imageId, 0, 0, 32, 20, 1, height, 0, 6, height, get_current_rotation()); break; + } + + if (direction == 0 | direction == 2) { + if (trackSequence == 0) { + paint_util_push_tunnel_left(height, TUNNEL_0); + } + + switch (trackSequence) { + case 0: metal_a_supports_paint_setup(4, 4, 0, height, RCT2_GLOBAL(0x00F4419C, uint32)); break; + case 1: metal_a_supports_paint_setup(4, 8, 0, height - 2, RCT2_GLOBAL(0x00F4419C, uint32)); break; + case 3: metal_a_supports_paint_setup(4, 4, 0, height, RCT2_GLOBAL(0x00F4419C, uint32)); break; + } + } else { + if (trackSequence == 3) { + paint_util_push_tunnel_right(height, TUNNEL_0); + } + + switch (trackSequence) { + case 0: metal_a_supports_paint_setup(5, 4, 0, height, RCT2_GLOBAL(0x00F4419C, uint32)); break; + case 1: metal_a_supports_paint_setup(5, 7, 0, height, RCT2_GLOBAL(0x00F4419C, uint32)); break; + case 3: metal_a_supports_paint_setup(5, 4, 0, height, RCT2_GLOBAL(0x00F4419C, uint32)); break; + } + } + + switch (trackSequence) { + case 0: paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_D0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_BC, direction), 0xFFFF, 0); break; + case 1: paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_D0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_C0 | SEGMENT_D4 | SEGMENT_BC, direction), 0xFFFF, 0); break; + case 2: paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_D0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_B8 | SEGMENT_C8 | SEGMENT_B4, direction), 0xFFFF, 0); break; + case 3: paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_D0 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_B8, direction), 0xFFFF, 0); break; + } + paint_util_set_general_support_height(height + 32, 0x20); } /** From d34bc77dd2cfa88f263aac102db38700026a86e5 Mon Sep 17 00:00:00 2001 From: Marijn van der Werf Date: Sun, 22 May 2016 18:17:06 +0200 Subject: [PATCH 7/7] Draw station --- src/ride/gentle/monorail_cycles.c | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/src/ride/gentle/monorail_cycles.c b/src/ride/gentle/monorail_cycles.c index 65ec776e25..9735cda50e 100644 --- a/src/ride/gentle/monorail_cycles.c +++ b/src/ride/gentle/monorail_cycles.c @@ -201,9 +201,37 @@ static void paint_monorail_cycles_track_flat(uint8 rideIndex, uint8 trackSequenc paint_util_set_general_support_height(height + 32, 0x20); } -/** rct2: 0x*/ +/** rct2: 0x0088ADD8 */ static void paint_monorail_cycles_station(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { + uint32 imageId; + + if (direction == 0 || direction == 2) { + imageId = SPR_STATION_BASE_B_SW_NE | RCT2_GLOBAL(0x00F441A0, uint32); + sub_98197C(imageId, 0, 0, 32, 28, 1, height - 2, 0, 2, height, get_current_rotation()); + + imageId = SPR_MONORAIL_CYCLES_FLAT_SW_NE | RCT2_GLOBAL(0x00F44198, uint32); + sub_98199C(imageId, 0, 0, 32, 20, 1, height, 0, 0, height, get_current_rotation()); + + metal_a_supports_paint_setup(3, 5, 0, height, RCT2_GLOBAL(0x00F4419C, uint32)); + metal_a_supports_paint_setup(3, 8, 0, height, RCT2_GLOBAL(0x00F4419C, uint32)); + paint_util_push_tunnel_left(height, TUNNEL_6); + } else if (direction == 1 || direction == 3) { + imageId = SPR_STATION_BASE_B_NW_SE | RCT2_GLOBAL(0x00F441A0, uint32); + sub_98197C(imageId, 0, 0, 28, 32, 1, height - 2, 2, 0, height, get_current_rotation()); + + imageId = SPR_MONORAIL_CYCLES_FLAT_NW_SE | RCT2_GLOBAL(0x00F44198, uint32); + sub_98199C(imageId, 0, 0, 20, 32, 1, height, 0, 0, height, get_current_rotation()); + + metal_a_supports_paint_setup(3, 6, 0, height, RCT2_GLOBAL(0x00F4419C, uint32)); + metal_a_supports_paint_setup(3, 7, 0, height, RCT2_GLOBAL(0x00F4419C, uint32)); + paint_util_push_tunnel_right(height, TUNNEL_6); + } + + track_paint_util_draw_station(rideIndex, trackSequence, direction, height, mapElement); + + paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0); + paint_util_set_general_support_height(height + 32, 0x20); } /** rct2: 0x0088AD88 */