mirror of https://github.com/OpenRCT2/OpenRCT2.git
Implement left quarter turn 3
This commit is contained in:
parent
417d4a94ca
commit
a15b721d89
|
@ -1141,6 +1141,11 @@ void track_paint_util_right_quarter_turn_3_tiles_tunnel(sint16 height, uint8 dir
|
|||
|
||||
static const sint8 left_quarter_turn_3_tiles_sprite_map[] = {2, -1, 1, 0};
|
||||
void track_paint_util_left_quarter_turn_3_tiles_paint(sint8 thickness, sint16 height, int direction, uint8 trackSequence, uint32 colourFlags, const uint32 sprites[4][3], uint8 rotation)
|
||||
{
|
||||
track_paint_util_left_quarter_turn_3_tiles_paint_with_height_offset(thickness, height, direction, trackSequence, colourFlags, sprites, rotation, 0);
|
||||
}
|
||||
|
||||
void track_paint_util_left_quarter_turn_3_tiles_paint_with_height_offset(sint8 thickness, sint16 height, int direction, uint8 trackSequence, uint32 colourFlags, const uint32 sprites[4][3], uint8 rotation, sint32 heightOffset)
|
||||
{
|
||||
sint8 sprite = left_quarter_turn_3_tiles_sprite_map[trackSequence];
|
||||
if (sprite < 0) {
|
||||
|
@ -1152,38 +1157,55 @@ void track_paint_util_left_quarter_turn_3_tiles_paint(sint8 thickness, sint16 he
|
|||
switch (direction) {
|
||||
case 0:
|
||||
switch (trackSequence) {
|
||||
case 0: sub_98197C(imageId, 0, 0, 32, 20, thickness, height, 0, 6, height, rotation); break;
|
||||
case 2: sub_98197C(imageId, 0, 0, 16, 16, thickness, height, 16, 0, height, rotation); break;
|
||||
case 3: sub_98197C(imageId, 0, 0, 20, 32, thickness, height, 6, 0, height, rotation); break;
|
||||
case 0: sub_98197C(imageId, 0, 0, 32, 20, thickness, height, 0, 6, height + heightOffset, rotation); break;
|
||||
case 2: sub_98197C(imageId, 0, 0, 16, 16, thickness, height, 16, 0, height + heightOffset, rotation); break;
|
||||
case 3: sub_98197C(imageId, 0, 0, 20, 32, thickness, height, 6, 0, height + heightOffset, rotation); break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 1:
|
||||
switch (trackSequence) {
|
||||
case 0: sub_98197C(imageId, 0, 0, 20, 32, thickness, height, 6, 0, height, rotation); break;
|
||||
case 2: sub_98197C(imageId, 0, 0, 16, 16, thickness, height, 0, 0, height, rotation); break;
|
||||
case 3: sub_98197C(imageId, 0, 0, 32, 20, thickness, height, 0, 6, height, rotation); break;
|
||||
case 0: sub_98197C(imageId, 0, 0, 20, 32, thickness, height, 6, 0, height + heightOffset, rotation); break;
|
||||
case 2: sub_98197C(imageId, 0, 0, 16, 16, thickness, height, 0, 0, height + heightOffset, rotation); break;
|
||||
case 3: sub_98197C(imageId, 0, 0, 32, 20, thickness, height, 0, 6, height + heightOffset, rotation); break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
switch (trackSequence) {
|
||||
case 0: sub_98197C(imageId, 0, 0, 32, 20, thickness, height, 0, 6, height, rotation); break;
|
||||
case 2: sub_98197C(imageId, 0, 0, 16, 16, thickness, height, 0, 16, height, rotation); break;
|
||||
case 3: sub_98197C(imageId, 0, 0, 20, 32, thickness, height, 6, 0, height, rotation); break;
|
||||
case 0: sub_98197C(imageId, 0, 0, 32, 20, thickness, height, 0, 6, height + heightOffset, rotation); break;
|
||||
case 2: sub_98197C(imageId, 0, 0, 16, 16, thickness, height, 0, 16, height + heightOffset, rotation); break;
|
||||
case 3: sub_98197C(imageId, 0, 0, 20, 32, thickness, height, 6, 0, height + heightOffset, rotation); break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 3:
|
||||
switch (trackSequence) {
|
||||
case 0: sub_98197C(imageId, 0, 0, 20, 32, thickness, height, 6, 0, height, rotation); break;
|
||||
case 2: sub_98197C(imageId, 0, 0, 16, 16, thickness, height, 16, 16, height, rotation); break;
|
||||
case 3: sub_98197C(imageId, 0, 0, 32, 20, thickness, height, 0, 6, height, rotation); break;
|
||||
case 0: sub_98197C(imageId, 0, 0, 20, 32, thickness, height, 6, 0, height + heightOffset, rotation); break;
|
||||
case 2: sub_98197C(imageId, 0, 0, 16, 16, thickness, height, 16, 16, height + heightOffset, rotation); break;
|
||||
case 3: sub_98197C(imageId, 0, 0, 32, 20, thickness, height, 0, 6, height + heightOffset, rotation); break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// void track_paint_util_left_quarter_turn_3_tiles_paint_2(sint16 height, int direction, uint8 rotation, uint8 trackSequence, uint32 colourFlags, const sprite_bb sprites[][5])
|
||||
// {
|
||||
// sint8 sprite = right_quarter_turn_5_tiles_sprite_map[trackSequence];
|
||||
// if (sprite < 0) {
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// const sprite_bb *spriteBB = &sprites[direction][sprite];
|
||||
// uint32 imageId = spriteBB->sprite_id | colourFlags;
|
||||
// sub_98197C(imageId,
|
||||
// (sint8)spriteBB->offset.x, (sint8)spriteBB->offset.y,
|
||||
// spriteBB->bb_size.x, spriteBB->bb_size.y, (sint8)spriteBB->bb_size.z,
|
||||
// height + spriteBB->offset.z,
|
||||
// spriteBB->bb_offset.x, spriteBB->bb_offset.y, height + spriteBB->bb_offset.z,
|
||||
// rotation);
|
||||
// }
|
||||
|
||||
void track_paint_util_left_quarter_turn_3_tiles_tunnel(sint16 height, uint8 tunnelType, uint8 direction, uint8 trackSequence)
|
||||
{
|
||||
if (direction == 0 && trackSequence == 0) {
|
||||
|
|
|
@ -234,6 +234,7 @@ void track_paint_util_right_quarter_turn_5_tiles_paint_2(sint16 height, int dire
|
|||
void track_paint_util_right_quarter_turn_3_tiles_paint(sint8 thickness, sint16 height, int direction, uint8 trackSequence, uint32 colourFlags, const uint32 sprites[4][3], const rct_xy16 offsets[4][3], const rct_xy16 boundsLengths[4][3], const rct_xyz16 boundsOffsets[4][3], uint8 rotation);
|
||||
void track_paint_util_right_quarter_turn_3_tiles_tunnel(sint16 height, uint8 direction, uint8 trackSequence, uint8 tunnelType);
|
||||
void track_paint_util_left_quarter_turn_3_tiles_paint(sint8 thickness, sint16 height, int direction, uint8 trackSequence, uint32 colourFlags, const uint32 sprites[4][3], uint8 rotation);
|
||||
void track_paint_util_left_quarter_turn_3_tiles_paint_with_height_offset(sint8 thickness, sint16 height, int direction, uint8 trackSequence, uint32 colourFlags, const uint32 sprites[4][3], uint8 rotation, sint32 heightOffset);
|
||||
void track_paint_util_left_quarter_turn_3_tiles_tunnel(sint16 height, uint8 tunnelType, uint8 direction, uint8 trackSequence);
|
||||
void track_paint_util_left_quarter_turn_1_tile_paint(sint8 thickness, sint16 height, sint16 boundBoxZOffset, int direction, uint32 colourFlags, const uint32 * sprites, uint8 rotation);
|
||||
void track_paint_util_left_quarter_turn_1_tile_tunnel(sint16 height, uint8 direction, uint8 trackSequence);
|
||||
|
|
|
@ -484,6 +484,53 @@ static void paint_log_flume_track_s_bend_right(uint8 rideIndex, uint8 trackSeque
|
|||
paint_util_set_general_support_height(height + 32, 0x20);
|
||||
}
|
||||
|
||||
static void paint_log_flume_track_left_quarter_turn_3_tiles(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
|
||||
{
|
||||
static const uint32 imageIds[4][3] =
|
||||
{
|
||||
{ 21072, 21073, 21074 },
|
||||
{ 21075, 21076, 21077 },
|
||||
{ 21078, 21079, 21080 },
|
||||
{ 21081, 21082, 21083 }
|
||||
};
|
||||
|
||||
static const uint32 imageIdsFront[4][3] =
|
||||
{
|
||||
{ 21060, 21061, 21062 },
|
||||
{ 21063, 21064, 21065 },
|
||||
{ 21066, 21067, 21068 },
|
||||
{ 21069, 21070, 21071 }
|
||||
};
|
||||
|
||||
track_paint_util_left_quarter_turn_3_tiles_paint(2, height, direction, trackSequence, gTrackColours[SCHEME_TRACK], imageIds, get_current_rotation());
|
||||
track_paint_util_left_quarter_turn_3_tiles_paint_with_height_offset(0, height, direction, trackSequence, gTrackColours[SCHEME_TRACK], imageIdsFront, get_current_rotation(), 27);
|
||||
|
||||
if (trackSequence != 1 && trackSequence != 2) {
|
||||
metal_a_supports_paint_setup(3, 4, 0, height, gTrackColours[SCHEME_SUPPORTS]);
|
||||
}
|
||||
|
||||
switch (trackSequence) {
|
||||
case 0:
|
||||
if (direction == 0 || direction == 3) {
|
||||
paint_util_push_tunnel_rotated(direction, height, TUNNEL_0);
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (direction == 2 || direction == 3) {
|
||||
paint_util_push_tunnel_rotated(direction ^ 1, height, TUNNEL_0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
switch (trackSequence) {
|
||||
case 0: paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B4 | SEGMENT_C4 | SEGMENT_CC | SEGMENT_D0, direction), 0xFFFF, 0); break;
|
||||
case 2: paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_B8 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D0, direction), 0xFFFF, 0); break;
|
||||
case 3: paint_util_set_segment_support_height(paint_util_rotate_segments(SEGMENT_C0 | SEGMENT_C4 | SEGMENT_C8 | SEGMENT_D4, direction), 0xFFFF, 0); break;
|
||||
}
|
||||
|
||||
paint_util_set_general_support_height(height + 32, 0x20);
|
||||
}
|
||||
|
||||
static void paint_log_flume_track_on_ride_photo(uint8 rideIndex, uint8 trackSequence, uint8 direction, int height, rct_map_element * mapElement)
|
||||
{
|
||||
uint32 imageId = SPR_STATION_BASE_D | 0x20000000;
|
||||
|
@ -559,6 +606,8 @@ TRACK_PAINT_FUNCTION get_track_paint_function_log_flume(int trackType, int direc
|
|||
return paint_log_flume_track_s_bend_left;
|
||||
case TRACK_ELEM_S_BEND_RIGHT:
|
||||
return paint_log_flume_track_s_bend_right;
|
||||
case TRACK_ELEM_LEFT_QUARTER_TURN_3_TILES:
|
||||
return paint_log_flume_track_left_quarter_turn_3_tiles;
|
||||
|
||||
case TRACK_ELEM_ON_RIDE_PHOTO:
|
||||
return paint_log_flume_track_on_ride_photo;
|
||||
|
|
Loading…
Reference in New Issue