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
447dc19db5
commit
914a320dae
1 changed files with 64 additions and 2 deletions
|
@ -43,6 +43,10 @@ enum
|
|||
SPR_VIRGINIA_REEL_FLAT_TO_25_DEG_UP_NW_SE = 21461,
|
||||
SPR_VIRGINIA_REEL_FLAT_TO_25_DEG_UP_NE_SW = 21462,
|
||||
SPR_VIRGINIA_REEL_FLAT_TO_25_DEG_UP_SE_NW = 21463,
|
||||
SPR_VIRGINIA_REEL_25_DEG_UP_TO_FLAT_SW_NE = 21464,
|
||||
SPR_VIRGINIA_REEL_25_DEG_UP_TO_FLAT_NW_SE = 21465,
|
||||
SPR_VIRGINIA_REEL_25_DEG_UP_TO_FLAT_NE_SW = 21466,
|
||||
SPR_VIRGINIA_REEL_25_DEG_UP_TO_FLAT_SE_NW = 21467,
|
||||
|
||||
SPR_VIRGINIA_REEL_FLAT_LIFT_HILL_SW_NE = 21488,
|
||||
SPR_VIRGINIA_REEL_FLAT_LIFT_HILL_NW_SE = 21489,
|
||||
|
@ -52,6 +56,10 @@ enum
|
|||
SPR_VIRGINIA_REEL_FLAT_TO_25_DEG_UP_LIFT_HILL_NW_SE = 21493,
|
||||
SPR_VIRGINIA_REEL_FLAT_TO_25_DEG_UP_LIFT_HILL_NE_SW = 21494,
|
||||
SPR_VIRGINIA_REEL_FLAT_TO_25_DEG_UP_LIFT_HILL_SE_NW = 21495,
|
||||
SPR_VIRGINIA_REEL_25_DEG_UP_TO_FLAT_LIFT_HILL_SW_NE = 21496,
|
||||
SPR_VIRGINIA_REEL_25_DEG_UP_TO_FLAT_LIFT_HILL_NW_SE = 21497,
|
||||
SPR_VIRGINIA_REEL_25_DEG_UP_TO_FLAT_LIFT_HILL_NE_SW = 21498,
|
||||
SPR_VIRGINIA_REEL_25_DEG_UP_TO_FLAT_LIFT_HILL_SE_NW = 21499,
|
||||
};
|
||||
|
||||
static const uint32 virginia_reel_track_pieces_flat[4] = {
|
||||
|
@ -82,6 +90,20 @@ static const uint32 virginia_reel_track_pieces_flat_to_25_deg_up_lift_hill[4] =
|
|||
SPR_VIRGINIA_REEL_FLAT_TO_25_DEG_UP_LIFT_HILL_SE_NW,
|
||||
};
|
||||
|
||||
static const uint32 virginia_reel_track_pieces_25_deg_up_to_flat[4] = {
|
||||
SPR_VIRGINIA_REEL_25_DEG_UP_TO_FLAT_SW_NE,
|
||||
SPR_VIRGINIA_REEL_25_DEG_UP_TO_FLAT_NW_SE,
|
||||
SPR_VIRGINIA_REEL_25_DEG_UP_TO_FLAT_NE_SW,
|
||||
SPR_VIRGINIA_REEL_25_DEG_UP_TO_FLAT_SE_NW,
|
||||
};
|
||||
|
||||
static const uint32 virginia_reel_track_pieces_25_deg_up_to_flat_lift_hill[4] = {
|
||||
SPR_VIRGINIA_REEL_25_DEG_UP_TO_FLAT_LIFT_HILL_SW_NE,
|
||||
SPR_VIRGINIA_REEL_25_DEG_UP_TO_FLAT_LIFT_HILL_NW_SE,
|
||||
SPR_VIRGINIA_REEL_25_DEG_UP_TO_FLAT_LIFT_HILL_NE_SW,
|
||||
SPR_VIRGINIA_REEL_25_DEG_UP_TO_FLAT_LIFT_HILL_SE_NW,
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* rct2: 0x006D5B48
|
||||
|
@ -213,9 +235,48 @@ static void paint_viriginia_reel_track_flat_to_25_deg_up(uint8 rideIndex, uint8
|
|||
paint_util_set_general_support_height(height + 48, 0x20);
|
||||
}
|
||||
|
||||
/** rct2: 0x */
|
||||
/** rct2: 0x00811294 */
|
||||
static void paint_viriginia_reel_track_25_deg_up_to_flat(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
|
||||
{
|
||||
const uint32 * sprites = virginia_reel_track_pieces_25_deg_up_to_flat;
|
||||
if (mapElement->type & 0x80) {
|
||||
sprites = virginia_reel_track_pieces_25_deg_up_to_flat_lift_hill;
|
||||
}
|
||||
|
||||
uint32 imageId = sprites[direction] | RCT2_GLOBAL(0x00F44198, uint32);
|
||||
paint_struct * ps;
|
||||
|
||||
if (direction & 1) {
|
||||
ps = sub_98197C(imageId, 0, 0, 27, 32, 2, height, 2, 0, height, get_current_rotation());
|
||||
} else {
|
||||
ps = sub_98197C(imageId, 0, 0, 32, 27, 2, height, 0, 2, height, get_current_rotation());
|
||||
}
|
||||
|
||||
if (direction == 1 || direction == 2) {
|
||||
RCT2_GLOBAL(0x009DEA58, paint_struct*) = ps;
|
||||
}
|
||||
|
||||
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: 0x */
|
||||
|
@ -223,9 +284,10 @@ static void paint_viriginia_reel_track_25_deg_down(uint8 rideIndex, uint8 trackS
|
|||
{
|
||||
}
|
||||
|
||||
/** rct2: 0x */
|
||||
/** rct2: 0x008112B4 */
|
||||
static void paint_viriginia_reel_track_flat_to_25_deg_down(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
|
||||
{
|
||||
paint_viriginia_reel_track_25_deg_up_to_flat(rideIndex, trackSequence, (direction + 2) % 4, height, mapElement);
|
||||
}
|
||||
|
||||
/** rct2: 0x008112C4 */
|
||||
|
|
Loading…
Add table
Reference in a new issue