mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2025-01-23 19:02:04 -05:00
Draw up-flat / flat-down
This commit is contained in:
parent
ae9cf7dfbe
commit
3d49f6ada3
1 changed files with 59 additions and 3 deletions
|
@ -33,7 +33,10 @@ enum
|
|||
SPR_GO_KARTS_FLAT_TO_25_DEG_UP_NW_SE = 20773,
|
||||
SPR_GO_KARTS_FLAT_TO_25_DEG_UP_NE_SW = 20774,
|
||||
SPR_GO_KARTS_FLAT_TO_25_DEG_UP_SE_NW = 20775,
|
||||
|
||||
SPR_GO_KARTS_25_DEG_UP_TO_FLAT_SW_NE = 20776,
|
||||
SPR_GO_KARTS_25_DEG_UP_TO_FLAT_NW_SE = 20777,
|
||||
SPR_GO_KARTS_25_DEG_UP_TO_FLAT_NE_SW = 20778,
|
||||
SPR_GO_KARTS_25_DEG_UP_TO_FLAT_SE_NW = 20779,
|
||||
SPR_GO_KARTS_25_DEG_UP_SW_NE = 20780,
|
||||
SPR_GO_KARTS_25_DEG_UP_NW_SE = 20781,
|
||||
SPR_GO_KARTS_25_DEG_UP_NE_SW = 20782,
|
||||
|
@ -42,7 +45,10 @@ enum
|
|||
SPR_GO_KARTS_FLAT_TO_25_DEG_UP_FRONT_NW_SE = 20785,
|
||||
SPR_GO_KARTS_FLAT_TO_25_DEG_UP_FRONT_NE_SW = 20786,
|
||||
SPR_GO_KARTS_FLAT_TO_25_DEG_UP_FRONT_SE_NW = 20787,
|
||||
|
||||
SPR_GO_KARTS_25_DEG_UP_TO_FLAT_FRONT_SW_NE = 20788,
|
||||
SPR_GO_KARTS_25_DEG_UP_TO_FLAT_FRONT_NW_SE = 20789,
|
||||
SPR_GO_KARTS_25_DEG_UP_TO_FLAT_FRONT_NE_SW = 20790,
|
||||
SPR_GO_KARTS_25_DEG_UP_TO_FLAT_FRONT_SE_NW = 20791,
|
||||
SPR_GO_KARTS_25_DEG_UP_FRONT_SW_NE = 20792,
|
||||
SPR_GO_KARTS_25_DEG_UP_FRONT_NW_SE = 20793,
|
||||
SPR_GO_KARTS_25_DEG_UP_FRONT_NE_SW = 20794,
|
||||
|
@ -63,6 +69,13 @@ static const uint32 go_karts_track_pieces_flat_to_25_deg_up[4][2] = {
|
|||
{SPR_GO_KARTS_FLAT_TO_25_DEG_UP_SE_NW, SPR_GO_KARTS_FLAT_TO_25_DEG_UP_FRONT_SE_NW},
|
||||
};
|
||||
|
||||
static const uint32 go_karts_track_pieces_25_deg_up_to_flat[4][2] = {
|
||||
{SPR_GO_KARTS_25_DEG_UP_TO_FLAT_SW_NE, SPR_GO_KARTS_25_DEG_UP_TO_FLAT_FRONT_SW_NE},
|
||||
{SPR_GO_KARTS_25_DEG_UP_TO_FLAT_NW_SE, SPR_GO_KARTS_25_DEG_UP_TO_FLAT_FRONT_NW_SE},
|
||||
{SPR_GO_KARTS_25_DEG_UP_TO_FLAT_NE_SW, SPR_GO_KARTS_25_DEG_UP_TO_FLAT_FRONT_NE_SW},
|
||||
{SPR_GO_KARTS_25_DEG_UP_TO_FLAT_SE_NW, SPR_GO_KARTS_25_DEG_UP_TO_FLAT_FRONT_SE_NW},
|
||||
};
|
||||
|
||||
/** rct2: 0x0074A748 */
|
||||
static void paint_go_karts_track_flat(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
|
||||
{
|
||||
|
@ -188,6 +201,48 @@ static void paint_go_karts_track_flat_to_25_deg_up(uint8 rideIndex, uint8 trackS
|
|||
/** rct2: 0x */
|
||||
static void paint_go_karts_track_25_deg_up_to_flat(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
|
||||
{
|
||||
uint32 imageId;
|
||||
paint_struct * ps;
|
||||
|
||||
imageId = go_karts_track_pieces_25_deg_up_to_flat[direction][0] | RCT2_GLOBAL(0x00F44198, uint32);
|
||||
if (direction == 0 || direction == 2) {
|
||||
ps = sub_98197C(imageId, 0, 0, 32, 28, 1, height, 0, 2, height, get_current_rotation());
|
||||
} else {
|
||||
ps = sub_98197C(imageId, 0, 0, 28, 32, 1, height, 2, 0, height, get_current_rotation());
|
||||
}
|
||||
|
||||
if (direction == 1 || direction == 2) {
|
||||
RCT2_GLOBAL(0x009DEA58, paint_struct*) = ps;
|
||||
}
|
||||
|
||||
imageId = go_karts_track_pieces_25_deg_up_to_flat[direction][1] | RCT2_GLOBAL(0x00F44198, uint32);
|
||||
if (direction == 0 || direction == 2) {
|
||||
sub_98197C(imageId, 0, 0, 32, 1, 11, height, 0, 29, height + 2, get_current_rotation());
|
||||
} else {
|
||||
sub_98197C(imageId, 0, 0, 1, 32, 1, height, 29, 0, height + 2, get_current_rotation());
|
||||
}
|
||||
|
||||
switch (direction) {
|
||||
case 0:
|
||||
wooden_a_supports_paint_setup(0, 5, height, RCT2_GLOBAL(0x00F4419C, uint32), NULL);
|
||||
paint_util_push_tunnel_left(height - 8, TUNNEL_6);
|
||||
break;
|
||||
case 1:
|
||||
wooden_a_supports_paint_setup(1, 6, height, RCT2_GLOBAL(0x00F4419C, uint32), NULL);
|
||||
paint_util_push_tunnel_right(height + 8, TUNNEL_14);
|
||||
break;
|
||||
case 2:
|
||||
wooden_a_supports_paint_setup(0, 7, height, RCT2_GLOBAL(0x00F4419C, uint32), NULL);
|
||||
paint_util_push_tunnel_left(height + 8, TUNNEL_14);
|
||||
break;
|
||||
case 3:
|
||||
wooden_a_supports_paint_setup(1, 8, height, RCT2_GLOBAL(0x00F4419C, uint32), NULL);
|
||||
paint_util_push_tunnel_right(height - 8, TUNNEL_6);
|
||||
break;
|
||||
}
|
||||
|
||||
paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0);
|
||||
paint_util_set_general_support_height(height + 40, 0x20);
|
||||
}
|
||||
|
||||
/** rct2: 0x0074A788 */
|
||||
|
@ -196,9 +251,10 @@ static void paint_go_karts_track_25_deg_down(uint8 rideIndex, uint8 trackSequenc
|
|||
paint_go_karts_track_25_deg_up(rideIndex, trackSequence, (direction + 2) % 4, height, mapElement);
|
||||
}
|
||||
|
||||
/** rct2: 0x */
|
||||
/** rct2: 0x0074A798 */
|
||||
static void paint_go_karts_track_flat_to_25_deg_down(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
|
||||
{
|
||||
paint_go_karts_track_25_deg_up_to_flat(rideIndex, trackSequence, (direction + 2) % 4, height, mapElement);
|
||||
}
|
||||
|
||||
/** rct2: 0x0074A7A8 */
|
||||
|
|
Loading…
Add table
Reference in a new issue