mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-04 13:42:55 +01:00
Fix bobsleigh coaster painting
This commit is contained in:
@@ -66,6 +66,24 @@ static void bobsleigh_rc_track_flat(uint8 rideIndex, uint8 trackSequence, uint8
|
||||
paint_util_set_general_support_height(height + 32, 0x20);
|
||||
}
|
||||
|
||||
static void bobsleigh_rc_track_station(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
|
||||
{
|
||||
static const uint32 imageIds[4][2] = {
|
||||
{ 14580, SPR_STATION_BASE_B_SW_NE },
|
||||
{ 14581, SPR_STATION_BASE_B_NW_SE },
|
||||
{ 14580, SPR_STATION_BASE_B_SW_NE },
|
||||
{ 14581, SPR_STATION_BASE_B_NW_SE },
|
||||
};
|
||||
|
||||
sub_98197C_rotated(direction, imageIds[direction][0] | gTrackColours[SCHEME_TRACK], 0, 0, 32, 20, 1, height, 0, 6, height + 3);
|
||||
sub_98196C_rotated(direction, imageIds[direction][1] | gTrackColours[SCHEME_MISC], 0, 0, 32, 32, 1, height);
|
||||
track_paint_util_draw_station_metal_supports_2(direction, height, gTrackColours[SCHEME_SUPPORTS], 0);
|
||||
track_paint_util_draw_station(rideIndex, trackSequence, direction, height, mapElement);
|
||||
paint_util_push_tunnel_rotated(direction, height, TUNNEL_6);
|
||||
paint_util_set_segment_support_height(SEGMENTS_ALL, 0xFFFF, 0);
|
||||
paint_util_set_general_support_height(height + 32, 0x20);
|
||||
}
|
||||
|
||||
static void bobsleigh_rc_track_25_deg_up(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
|
||||
{
|
||||
if (track_element_is_lift_hill(mapElement)) {
|
||||
@@ -2191,6 +2209,10 @@ TRACK_PAINT_FUNCTION get_track_paint_function_bobsleigh_rc(int trackType, int di
|
||||
switch (trackType) {
|
||||
case TRACK_ELEM_FLAT:
|
||||
return bobsleigh_rc_track_flat;
|
||||
case TRACK_ELEM_END_STATION:
|
||||
case TRACK_ELEM_BEGIN_STATION:
|
||||
case TRACK_ELEM_MIDDLE_STATION:
|
||||
return bobsleigh_rc_track_station;
|
||||
case TRACK_ELEM_25_DEG_UP:
|
||||
return bobsleigh_rc_track_25_deg_up;
|
||||
case TRACK_ELEM_FLAT_TO_25_DEG_UP:
|
||||
|
||||
@@ -555,13 +555,18 @@ void track_paint_util_draw_pier(rct_ride * ride, const rct_ride_entrance_definit
|
||||
}
|
||||
|
||||
void track_paint_util_draw_station_metal_supports(uint8 direction, uint16 height, uint32 colour)
|
||||
{
|
||||
track_paint_util_draw_station_metal_supports_2(direction, height, colour, 3);
|
||||
}
|
||||
|
||||
void track_paint_util_draw_station_metal_supports_2(uint8 direction, uint16 height, uint32 colour, uint8 type)
|
||||
{
|
||||
if (direction & 1) {
|
||||
metal_a_supports_paint_setup(3, 6, 0, height, colour);
|
||||
metal_a_supports_paint_setup(3, 7, 0, height, colour);
|
||||
metal_a_supports_paint_setup(type, 6, 0, height, colour);
|
||||
metal_a_supports_paint_setup(type, 7, 0, height, colour);
|
||||
} else {
|
||||
metal_a_supports_paint_setup(3, 5, 0, height, colour);
|
||||
metal_a_supports_paint_setup(3, 8, 0, height, colour);
|
||||
metal_a_supports_paint_setup(type, 5, 0, height, colour);
|
||||
metal_a_supports_paint_setup(type, 8, 0, height, colour);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -231,6 +231,7 @@ void track_paint_util_draw_station(uint8 rideIndex, uint8 trackSequence, uint8 d
|
||||
bool track_paint_util_should_paint_supports(rct_xy16 position);
|
||||
void track_paint_util_draw_pier(rct_ride * ride, const rct_ride_entrance_definition * entranceStyle, rct_xy16 position, uint8 direction, int height, rct_map_element * mapElement, uint8 rotation);
|
||||
void track_paint_util_draw_station_metal_supports(uint8 direction, uint16 height, uint32 colour);
|
||||
void track_paint_util_draw_station_metal_supports_2(uint8 direction, uint16 height, uint32 colour, uint8 type);
|
||||
|
||||
void track_paint_util_right_quarter_turn_5_tiles_paint(sint8 thickness, sint16 height, int direction, uint8 trackSequence, uint32 colourFlags, const uint32 sprites[4][5], const rct_xy16 offsets[4][5], const rct_xy16 boundsLengths[4][5], const rct_xyz16 boundsOffsets[4][5], uint8 rotation);
|
||||
void track_paint_util_right_quarter_turn_5_tiles_paint_2(sint16 height, int direction, uint8 rotation, uint8 trackSequence, uint32 colourFlags, const sprite_bb sprites[][5]);
|
||||
|
||||
Reference in New Issue
Block a user