mirror of https://github.com/OpenRCT2/OpenRCT2.git
Draw booster sprites on Steel Twister, Vertical RC and Giga Coaster, fixes #5351
This commit is contained in:
parent
caa9655617
commit
3ad6af679a
|
@ -8153,3 +8153,29 @@ void bolliger_mabillard_track_inverted_flat_to_90_deg_quarter_loop_down(uint8 ri
|
|||
{
|
||||
bolliger_mabillard_track_90_deg_to_inverted_flat_quarter_loop_up(rideIndex, 2 - trackSequence, direction, height, mapElement, supportType);
|
||||
}
|
||||
|
||||
void bolliger_mabillard_track_booster(uint8 rideIndex, uint8 trackSequence, uint8 direction, sint32 height, rct_map_element * mapElement, sint32 supportType)
|
||||
{
|
||||
// These offsets could be moved to the g2.dat file when that supports offsets.
|
||||
sint8 ne_sw_offsetX = 8;
|
||||
sint8 ne_sw_offsetY = -17;
|
||||
sint8 nw_se_offsetX = -17;
|
||||
sint8 nw_se_offsetY = 8;
|
||||
|
||||
switch (direction) {
|
||||
case 0:
|
||||
case 2:
|
||||
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | SPR_G2_BM_BOOSTER_NE_SW, ne_sw_offsetX, ne_sw_offsetY, 32, 20, 3, height, 0, 6, height);
|
||||
break;
|
||||
case 1:
|
||||
case 3:
|
||||
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | SPR_G2_BM_BOOSTER_NW_SE, nw_se_offsetX, nw_se_offsetY, 32, 20, 3, height, 0, 6, height);
|
||||
break;
|
||||
}
|
||||
if (track_paint_util_should_paint_supports(gPaintMapPosition)) {
|
||||
metal_a_supports_paint_setup(supportType, 4, 0, height, gTrackColours[SCHEME_SUPPORTS]);
|
||||
}
|
||||
paint_util_push_tunnel_rotated(direction, height, TUNNEL_6);
|
||||
paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0);
|
||||
paint_util_set_general_support_height(height + 32, 0x20);
|
||||
}
|
|
@ -196,3 +196,5 @@ void bolliger_mabillard_track_right_large_half_loop_down(uint8 rideIndex, uint8
|
|||
void bolliger_mabillard_track_left_large_half_loop_down(uint8 rideIndex, uint8 trackSequence, uint8 direction, sint32 height, rct_map_element * mapElement, sint32 supportType);
|
||||
void bolliger_mabillard_track_90_deg_to_inverted_flat_quarter_loop_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, sint32 height, rct_map_element * mapElement, sint32 supportType);
|
||||
void bolliger_mabillard_track_inverted_flat_to_90_deg_quarter_loop_down(uint8 rideIndex, uint8 trackSequence, uint8 direction, sint32 height, rct_map_element * mapElement, sint32 supportType);
|
||||
|
||||
void bolliger_mabillard_track_booster(uint8 rideIndex, uint8 trackSequence, uint8 direction, sint32 height, rct_map_element * mapElement, sint32 supportType);
|
||||
|
|
|
@ -6151,6 +6151,35 @@ static void giga_rc_track_right_banked_25_deg_down_to_flat(uint8 rideIndex, uint
|
|||
giga_rc_track_flat_to_left_banked_25_deg_up(rideIndex, trackSequence, (direction + 2) & 3, height, mapElement);
|
||||
}
|
||||
|
||||
static void giga_rc_track_booster(uint8 rideIndex, uint8 trackSequence, uint8 direction, sint32 height, rct_map_element * mapElement)
|
||||
{
|
||||
// These offsets could be moved to the g2.dat file when that supports offsets.
|
||||
sint8 ne_sw_offsetX = 7;
|
||||
sint8 ne_sw_offsetY = -15;
|
||||
sint8 nw_se_offsetX = -15;
|
||||
sint8 nw_se_offsetY = 7;
|
||||
|
||||
|
||||
switch (direction) {
|
||||
case 0:
|
||||
case 2:
|
||||
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | SPR_G2_GIGA_RC_BOOSTER_NE_SW, ne_sw_offsetX, ne_sw_offsetY, 32, 20, 3, height, 0, 6, height);
|
||||
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | SPR_G2_GIGA_RC_BOOSTER_NE_SW, ne_sw_offsetX, ne_sw_offsetY, 32, 1, 11, height, 0, 27, height + 5);
|
||||
break;
|
||||
case 1:
|
||||
case 3:
|
||||
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | SPR_G2_GIGA_RC_BOOSTER_NW_SE, nw_se_offsetX, nw_se_offsetY, 32, 20, 3, height, 0, 6, height);
|
||||
sub_98197C_rotated(direction, gTrackColours[SCHEME_TRACK] | SPR_G2_GIGA_RC_BOOSTER_NW_SE, nw_se_offsetX, nw_se_offsetY, 32, 1, 11, height, 0, 27, height + 5);
|
||||
break;
|
||||
}
|
||||
if (track_paint_util_should_paint_supports(gPaintMapPosition)) {
|
||||
metal_a_supports_paint_setup(METAL_SUPPORTS_TUBES, 4, 0, height, gTrackColours[SCHEME_SUPPORTS]);
|
||||
}
|
||||
paint_util_push_tunnel_rotated(direction, height, TUNNEL_6);
|
||||
paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0);
|
||||
paint_util_set_general_support_height(height + 32, 0x20);
|
||||
}
|
||||
|
||||
TRACK_PAINT_FUNCTION get_track_paint_function_giga_rc(sint32 trackType, sint32 direction)
|
||||
{
|
||||
switch (trackType) {
|
||||
|
@ -6432,7 +6461,7 @@ TRACK_PAINT_FUNCTION get_track_paint_function_giga_rc(sint32 trackType, sint32 d
|
|||
return giga_rc_track_right_banked_25_deg_down_to_flat;
|
||||
|
||||
case TRACK_ELEM_BOOSTER:
|
||||
return giga_rc_track_brakes;
|
||||
return giga_rc_track_booster;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -1089,6 +1089,11 @@ static void twister_rc_track_inverted_flat_to_90_deg_quarter_loop_down(uint8 rid
|
|||
bolliger_mabillard_track_inverted_flat_to_90_deg_quarter_loop_down(rideIndex, trackSequence, direction, height, mapElement, METAL_SUPPORTS_TUBES);
|
||||
}
|
||||
|
||||
static void twister_rc_track_booster(uint8 rideIndex, uint8 trackSequence, uint8 direction, sint32 height, rct_map_element * mapElement)
|
||||
{
|
||||
bolliger_mabillard_track_booster(rideIndex, trackSequence, direction, height, mapElement, METAL_SUPPORTS_TUBES);
|
||||
}
|
||||
|
||||
|
||||
TRACK_PAINT_FUNCTION get_track_paint_function_twister_rc(sint32 trackType, sint32 direction)
|
||||
{
|
||||
|
@ -1455,7 +1460,7 @@ TRACK_PAINT_FUNCTION get_track_paint_function_twister_rc(sint32 trackType, sint3
|
|||
return twister_rc_track_inverted_flat_to_90_deg_quarter_loop_down;
|
||||
|
||||
case TRACK_ELEM_BOOSTER:
|
||||
return twister_rc_track_brakes;
|
||||
return twister_rc_track_booster;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -1069,6 +1069,12 @@ static void vertical_drop_rc_track_inverted_flat_to_90_deg_quarter_loop_down(uin
|
|||
bolliger_mabillard_track_inverted_flat_to_90_deg_quarter_loop_down(rideIndex, trackSequence, direction, height, mapElement, METAL_SUPPORTS_BOXED);
|
||||
}
|
||||
|
||||
|
||||
static void vertical_drop_rc_track_booster(uint8 rideIndex, uint8 trackSequence, uint8 direction, sint32 height, rct_map_element * mapElement)
|
||||
{
|
||||
bolliger_mabillard_track_booster(rideIndex, trackSequence, direction, height, mapElement, METAL_SUPPORTS_BOXED);
|
||||
}
|
||||
|
||||
TRACK_PAINT_FUNCTION get_track_paint_function_vertical_drop_rc(sint32 trackType, sint32 direction)
|
||||
{
|
||||
switch (trackType) {
|
||||
|
@ -1434,7 +1440,7 @@ TRACK_PAINT_FUNCTION get_track_paint_function_vertical_drop_rc(sint32 trackType,
|
|||
return vertical_drop_rc_track_inverted_flat_to_90_deg_quarter_loop_down;
|
||||
|
||||
case TRACK_ELEM_BOOSTER:
|
||||
return vertical_drop_rc_track_brakes;
|
||||
return vertical_drop_rc_track_booster;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -755,6 +755,11 @@ enum {
|
|||
SPR_G2_PASTE = SPR_G2_BEGIN + 79,
|
||||
SPR_G2_TAB_DISABLED = SPR_G2_BEGIN + 80,
|
||||
|
||||
SPR_G2_GIGA_RC_BOOSTER_NE_SW = SPR_G2_BEGIN + 81,
|
||||
SPR_G2_GIGA_RC_BOOSTER_NW_SE = SPR_G2_BEGIN + 82,
|
||||
SPR_G2_BM_BOOSTER_NE_SW = SPR_G2_BEGIN + 83,
|
||||
SPR_G2_BM_BOOSTER_NW_SE = SPR_G2_BEGIN + 84,
|
||||
|
||||
// 0x60000, chosen because it's a round hex number
|
||||
// of the last possible range of image ID values that is large enough to fit all csg1 sprites.
|
||||
SPR_CSG_BEGIN = 393216,
|
||||
|
|
Loading…
Reference in New Issue