From babcdce5361ec498506f46ede0d57368bcf08713 Mon Sep 17 00:00:00 2001 From: Marijn van der Werf Date: Thu, 19 May 2016 21:12:03 +0200 Subject: [PATCH] Draw right turn --- src/ride/water/river_rapids.c | 68 ++++++++++++++++++++++++++++++----- 1 file changed, 60 insertions(+), 8 deletions(-) diff --git a/src/ride/water/river_rapids.c b/src/ride/water/river_rapids.c index 0d3dd76b81..82d4ef20bc 100644 --- a/src/ride/water/river_rapids.c +++ b/src/ride/water/river_rapids.c @@ -96,17 +96,21 @@ enum SPR_RIVER_RAPIDS_25_DEG_DOWN_FRONT_NW_SE = 21185, SPR_RIVER_RAPIDS_25_DEG_DOWN_FRONT_NE_SW = 21186, SPR_RIVER_RAPIDS_25_DEG_DOWN_FRONT_SE_NW = 21187, - + SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_SW_SE = 21188, + SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_SE_NE = 21189, + SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_NE_NW = 21190, + SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_NW_SW = 21191, SPR_RIVER_RAPIDS_LEFT_QUARTER_TURN_1_TILE_SE_SW = 21192, SPR_RIVER_RAPIDS_LEFT_QUARTER_TURN_1_TILE_SW_NW = 21193, SPR_RIVER_RAPIDS_LEFT_QUARTER_TURN_1_TILE_NW_NE = 21194, SPR_RIVER_RAPIDS_LEFT_QUARTER_TURN_1_TILE_NE_SE = 21195, - - SPR_RIVER_RAPIDS_LEFT_QUARTER_TURN_1_TILE_FRONT_A_NW_NE = 21198, - + SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_FRONT_SW_SE = 21196, + SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_FRONT_SE_NE = 21197, + SPR_RIVER_RAPIDS_QUARTER_TURN_1_TILE_FRONT_LEFT_NW_NE = 21198, + SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_FRONT_NW_SW = 21199, SPR_RIVER_RAPIDS_LEFT_QUARTER_TURN_1_TILE_FRONT_SE_SW = 21200, SPR_RIVER_RAPIDS_LEFT_QUARTER_TURN_1_TILE_FRONT_SW_NW = 21201, - SPR_RIVER_RAPIDS_LEFT_QUARTER_TURN_1_TILE_FRONT_B_NW_NE = 21202, + SPR_RIVER_RAPIDS_QUARTER_TURN_1_TILE_FRONT_RIGHT_NW_NE = 21202, SPR_RIVER_RAPIDS_LEFT_QUARTER_TURN_1_TILE_FRONT_NE_SE = 21203, }; @@ -480,10 +484,10 @@ static void paint_river_rapids_track_left_quarter_turn_1_tile(uint8 rideIndex, u imageId = SPR_RIVER_RAPIDS_LEFT_QUARTER_TURN_1_TILE_NW_NE | RCT2_GLOBAL(0x00F44198, uint32); sub_98197C(imageId, 0, 0, 28, 28, 11, height, 0, 0, height, get_current_rotation()); - imageId = SPR_RIVER_RAPIDS_LEFT_QUARTER_TURN_1_TILE_FRONT_A_NW_NE | RCT2_GLOBAL(0x00F44198, uint32); + imageId = SPR_RIVER_RAPIDS_QUARTER_TURN_1_TILE_FRONT_LEFT_NW_NE | RCT2_GLOBAL(0x00F44198, uint32); sub_98197C(imageId, 0, 0, 1, 30, 7, height, 27, 1, height + 13, get_current_rotation()); - imageId = SPR_RIVER_RAPIDS_LEFT_QUARTER_TURN_1_TILE_FRONT_B_NW_NE | RCT2_GLOBAL(0x00F44198, uint32); + imageId = SPR_RIVER_RAPIDS_QUARTER_TURN_1_TILE_FRONT_RIGHT_NW_NE | RCT2_GLOBAL(0x00F44198, uint32); sub_98197C(imageId, 0, 0, 30, 1, 7, height, 1, 27, height + 13, get_current_rotation()); break; @@ -514,10 +518,58 @@ static void paint_river_rapids_track_left_quarter_turn_1_tile(uint8 rideIndex, u paint_util_set_general_support_height(height + 32, 0x20); } -/** rct2: 0x */ +/** rct2: 0x00757700 */ static void paint_river_rapids_track_right_quarter_turn_1_tile(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement) { + uint32 imageId; + switch (direction) { + case 0: + imageId = SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_SW_SE | RCT2_GLOBAL(0x00F44198, uint32); + sub_98197C(imageId, 0, 0, 28, 28, 11, height, 4, 4, height, get_current_rotation()); + + imageId = SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_FRONT_SW_SE | RCT2_GLOBAL(0x00F44198, uint32); + sub_98197C(imageId, 0, 0, 1, 1, 7, height, 28, 28, height + 13, get_current_rotation()); + + paint_util_push_tunnel_left(height, TUNNEL_6); + paint_util_push_tunnel_right(height, TUNNEL_6); + break; + + case 1: + imageId = SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_SE_NE | RCT2_GLOBAL(0x00F44198, uint32); + sub_98197C(imageId, 0, 0, 28, 26, 11, height, 4, 2, height, get_current_rotation()); + + imageId = SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_FRONT_SE_NE | RCT2_GLOBAL(0x00F44198, uint32); + sub_98197C(imageId, 0, 0, 2, 1, 7, height, 28, 27, height + 13, get_current_rotation()); + + paint_util_push_tunnel_left(height, TUNNEL_6); + break; + + case 2: + imageId = SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_NE_NW | RCT2_GLOBAL(0x00F44198, uint32); + sub_98197C(imageId, 0, 0, 28, 28, 11, height, 0, 0, height, get_current_rotation()); + + imageId = SPR_RIVER_RAPIDS_QUARTER_TURN_1_TILE_FRONT_LEFT_NW_NE | RCT2_GLOBAL(0x00F44198, uint32); + sub_98197C(imageId, 0, 0, 1, 30, 7, height, 27, 1, height + 13, get_current_rotation()); + + imageId = SPR_RIVER_RAPIDS_QUARTER_TURN_1_TILE_FRONT_RIGHT_NW_NE | RCT2_GLOBAL(0x00F44198, uint32); + sub_98197C(imageId, 0, 0, 30, 1, 7, height, 1, 27, height + 13, get_current_rotation()); + break; + + case 3: + imageId = SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_NW_SW | RCT2_GLOBAL(0x00F44198, uint32); + sub_98197C(imageId, 0, 0, 26, 28, 11, height, 2, 4, height, get_current_rotation()); + + imageId = SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_FRONT_NW_SW | RCT2_GLOBAL(0x00F44198, uint32); + sub_98197C(imageId, 0, 0, 1, 28, 7, height, 27, 2, height + 13, get_current_rotation()); + + paint_util_push_tunnel_right(height, TUNNEL_6); + break; + } + + wooden_a_supports_paint_setup(1 - (direction & 1), 0, height, RCT2_GLOBAL(0x00F4419C, uint32), NULL); + paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0); + paint_util_set_general_support_height(height + 32, 0x20); } /** rct2: 0x */