mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 19:13:07 +01:00
Implement downwards slope
This commit is contained in:
@@ -72,6 +72,29 @@ enum
|
||||
SPR_RIVER_RAPIDS_25_DEG_UP_FRONT_NW_SE = 21161,
|
||||
SPR_RIVER_RAPIDS_25_DEG_UP_FRONT_NE_SW = 21162,
|
||||
SPR_RIVER_RAPIDS_25_DEG_UP_FRONT_SE_NW = 21163,
|
||||
|
||||
SPR_RIVER_RAPIDS_25_DEG_DOWN_SW_NE = 21180,
|
||||
SPR_RIVER_RAPIDS_25_DEG_DOWN_NW_SE = 21181,
|
||||
SPR_RIVER_RAPIDS_25_DEG_DOWN_NE_SW = 21182,
|
||||
SPR_RIVER_RAPIDS_25_DEG_DOWN_SE_NW = 21183,
|
||||
SPR_RIVER_RAPIDS_25_DEG_DOWN_FRONT_SW_NE = 21184,
|
||||
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,
|
||||
};
|
||||
|
||||
static const uint32 river_rapids_track_pieces_25_deg_up[][2] = {
|
||||
{SPR_RIVER_RAPIDS_25_DEG_UP_SW_NE, SPR_RIVER_RAPIDS_25_DEG_UP_FRONT_SW_NE},
|
||||
{SPR_RIVER_RAPIDS_25_DEG_UP_NW_SE, SPR_RIVER_RAPIDS_25_DEG_UP_FRONT_NW_SE},
|
||||
{SPR_RIVER_RAPIDS_25_DEG_UP_NE_SW, SPR_RIVER_RAPIDS_25_DEG_UP_FRONT_NE_SW},
|
||||
{SPR_RIVER_RAPIDS_25_DEG_UP_SE_NW, SPR_RIVER_RAPIDS_25_DEG_UP_FRONT_SE_NW},
|
||||
};
|
||||
|
||||
static const uint32 river_rapids_track_pieces_25_deg_down[][2] = {
|
||||
{SPR_RIVER_RAPIDS_25_DEG_DOWN_SW_NE, SPR_RIVER_RAPIDS_25_DEG_DOWN_FRONT_SW_NE},
|
||||
{SPR_RIVER_RAPIDS_25_DEG_DOWN_NW_SE, SPR_RIVER_RAPIDS_25_DEG_DOWN_FRONT_NW_SE},
|
||||
{SPR_RIVER_RAPIDS_25_DEG_DOWN_NE_SW, SPR_RIVER_RAPIDS_25_DEG_DOWN_FRONT_NE_SW},
|
||||
{SPR_RIVER_RAPIDS_25_DEG_DOWN_SE_NW, SPR_RIVER_RAPIDS_25_DEG_DOWN_FRONT_SE_NW},
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -177,18 +200,17 @@ static void paint_river_rapids_station(uint8 rideIndex, uint8 trackSequence, uin
|
||||
|
||||
}
|
||||
|
||||
/** rct2: 0x00757660 */
|
||||
static void paint_river_rapids_track_25_deg_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
|
||||
static void paint_river_rapids_track_25_deg(uint8 direction, int height, const uint32 sprites[4][2])
|
||||
{
|
||||
uint32 imageId;
|
||||
paint_struct * ps;
|
||||
|
||||
switch (direction) {
|
||||
case 0:
|
||||
imageId = SPR_RIVER_RAPIDS_25_DEG_UP_SW_NE | RCT2_GLOBAL(0x00F44198, uint32);
|
||||
imageId = sprites[direction][0] | RCT2_GLOBAL(0x00F44198, uint32);
|
||||
sub_98197C(imageId, 0, 0, 32, 24, 4, height, 0, 4, height, get_current_rotation());
|
||||
|
||||
imageId = SPR_RIVER_RAPIDS_25_DEG_UP_FRONT_SW_NE | RCT2_GLOBAL(0x00F44198, uint32);
|
||||
imageId = sprites[direction][1] | RCT2_GLOBAL(0x00F44198, uint32);
|
||||
sub_98197C(imageId, 0, 0, 32, 1, 34, height, 0, 27, height + 16, get_current_rotation());
|
||||
|
||||
wooden_a_supports_paint_setup(0, 9, height, RCT2_GLOBAL(0x00F4419C, uint32), NULL);
|
||||
@@ -196,11 +218,11 @@ static void paint_river_rapids_track_25_deg_up(uint8 rideIndex, uint8 trackSeque
|
||||
break;
|
||||
|
||||
case 1:
|
||||
imageId = SPR_RIVER_RAPIDS_25_DEG_UP_NW_SE | RCT2_GLOBAL(0x00F44198, uint32);
|
||||
imageId = sprites[direction][0] | RCT2_GLOBAL(0x00F44198, uint32);
|
||||
ps = sub_98197C(imageId, 0, 0, 24, 32, 4, height, 4, 0, height, get_current_rotation());
|
||||
RCT2_GLOBAL(0x009DEA58, paint_struct*) = ps;
|
||||
|
||||
imageId = SPR_RIVER_RAPIDS_25_DEG_UP_FRONT_NW_SE | RCT2_GLOBAL(0x00F44198, uint32);
|
||||
imageId = sprites[direction][1] | RCT2_GLOBAL(0x00F44198, uint32);
|
||||
sub_98197C(imageId, 0, 0, 1, 32, 34, height, 27, 0, height + 16, get_current_rotation());
|
||||
|
||||
wooden_a_supports_paint_setup(1, 10, height, RCT2_GLOBAL(0x00F4419C, uint32), NULL);
|
||||
@@ -208,11 +230,11 @@ static void paint_river_rapids_track_25_deg_up(uint8 rideIndex, uint8 trackSeque
|
||||
break;
|
||||
|
||||
case 2:
|
||||
imageId = SPR_RIVER_RAPIDS_25_DEG_UP_NE_SW | RCT2_GLOBAL(0x00F44198, uint32);
|
||||
imageId = sprites[direction][0] | RCT2_GLOBAL(0x00F44198, uint32);
|
||||
ps = sub_98197C(imageId, 0, 0, 32, 24, 4, height, 0, 4, height, get_current_rotation());
|
||||
RCT2_GLOBAL(0x009DEA58, paint_struct*) = ps;
|
||||
|
||||
imageId = SPR_RIVER_RAPIDS_25_DEG_UP_FRONT_NE_SW | RCT2_GLOBAL(0x00F44198, uint32);
|
||||
imageId = sprites[direction][1] | RCT2_GLOBAL(0x00F44198, uint32);
|
||||
sub_98197C(imageId, 0, 0, 32, 1, 34, height, 0, 27, height + 16, get_current_rotation());
|
||||
|
||||
wooden_a_supports_paint_setup(0, 11, height, RCT2_GLOBAL(0x00F4419C, uint32), NULL);
|
||||
@@ -220,10 +242,10 @@ static void paint_river_rapids_track_25_deg_up(uint8 rideIndex, uint8 trackSeque
|
||||
break;
|
||||
|
||||
case 3:
|
||||
imageId = SPR_RIVER_RAPIDS_25_DEG_UP_SE_NW | RCT2_GLOBAL(0x00F44198, uint32);
|
||||
imageId = sprites[direction][0] | RCT2_GLOBAL(0x00F44198, uint32);
|
||||
sub_98197C(imageId, 0, 0, 24, 32, 4, height, 4, 0, height, get_current_rotation());
|
||||
|
||||
imageId = SPR_RIVER_RAPIDS_25_DEG_UP_FRONT_SE_NW | RCT2_GLOBAL(0x00F44198, uint32);
|
||||
imageId = sprites[direction][1] | RCT2_GLOBAL(0x00F44198, uint32);
|
||||
sub_98197C(imageId, 0, 0, 1, 32, 34, height, 27, 0, height + 16, get_current_rotation());
|
||||
|
||||
wooden_a_supports_paint_setup(1, 12, height, RCT2_GLOBAL(0x00F4419C, uint32), NULL);
|
||||
@@ -235,6 +257,12 @@ static void paint_river_rapids_track_25_deg_up(uint8 rideIndex, uint8 trackSeque
|
||||
paint_util_set_general_support_height(height + 56, 0x20);
|
||||
}
|
||||
|
||||
/** rct2: 0x00757660 */
|
||||
static void paint_river_rapids_track_25_deg_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
|
||||
{
|
||||
paint_river_rapids_track_25_deg(direction, height, river_rapids_track_pieces_25_deg_up);
|
||||
}
|
||||
|
||||
/** rct2: 0x00757670 */
|
||||
static void paint_river_rapids_track_flat_to_25_deg_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
|
||||
{
|
||||
@@ -352,10 +380,10 @@ static void paint_river_rapids_track_25_deg_up_to_flat(uint8 rideIndex, uint8 tr
|
||||
paint_util_force_set_general_support_height(height + 40, 0x20);
|
||||
}
|
||||
|
||||
/** rct2: 0x */
|
||||
/** rct2: 0x00757690 */
|
||||
static void paint_river_rapids_track_25_deg_down(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
|
||||
{
|
||||
|
||||
paint_river_rapids_track_25_deg((direction + 2) % 4, height, river_rapids_track_pieces_25_deg_down);
|
||||
}
|
||||
|
||||
/** rct2: 0x */
|
||||
|
||||
Reference in New Issue
Block a user