From 30c4f2232bc0106a64cdcd1d65652ee5eb6f9f85 Mon Sep 17 00:00:00 2001 From: Marijn van der Werf Date: Tue, 24 May 2016 14:20:05 +0200 Subject: [PATCH] Draw station --- src/ride/gentle/car_ride.c | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/src/ride/gentle/car_ride.c b/src/ride/gentle/car_ride.c index e17f060f14..b35fc0a630 100644 --- a/src/ride/gentle/car_ride.c +++ b/src/ride/gentle/car_ride.c @@ -325,9 +325,44 @@ static void paint_car_ride_track_25_deg_down_to_flat(uint8 rideIndex, uint8 trac paint_car_ride_track_flat_to_25_deg_up(rideIndex, trackSequence, (direction + 2) % 4, height, mapElement); } -/** rct2: 0x */ +/** rct2: 0x006F7338, 0x006F7348, 0x006F7358 */ static void paint_car_ride_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()); + } 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 = car_ride_track_pieces_flat[direction] | RCT2_GLOBAL(0x00F44198, uint32); + if (direction == 0 || direction == 2) { + sub_98196C(imageId, 0, 6, 32, 20, 1, height, get_current_rotation()); + } else { + sub_98196C(imageId, 6, 0, 20, 32, 1, height, get_current_rotation()); + } + + if (direction == 0 || direction == 2) { + paint_util_push_tunnel_left(height, TUNNEL_6); + } else { + paint_util_push_tunnel_right(height, TUNNEL_6); + } + + if (direction == 0 || direction == 2) { + 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)); + } else { + 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)); + } + + 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: 0x006F7378 */