diff --git a/resources/g2/sprites.json b/resources/g2/sprites.json index 7105f9b22a..6fa94c7119 100644 --- a/resources/g2/sprites.json +++ b/resources/g2/sprites.json @@ -6535,6 +6535,246 @@ "x": -25, "y": -5 }, + { + "path": "track/bm/large_corkscrew_left_1_1.png", + "x": -24, + "y": -11, + "palette": "keep" + }, + { + "path": "track/bm/large_corkscrew_left_1_2.png", + "x": -24, + "y": -72, + "palette": "keep" + }, + { + "path": "track/bm/large_corkscrew_left_1_3.png", + "x": -28, + "y": -38, + "palette": "keep" + }, + { + "path": "track/bm/large_corkscrew_left_1_4.png", + "x": -24, + "y": -50, + "palette": "keep" + }, + { + "path": "track/bm/large_corkscrew_left_1_5.png", + "x": -24, + "y": -37, + "palette": "keep" + }, + { + "path": "track/bm/large_corkscrew_left_2_1.png", + "x": -24, + "y": -4, + "palette": "keep" + }, + { + "path": "track/bm/large_corkscrew_left_2_2.png", + "x": -32, + "y": -16, + "palette": "keep" + }, + { + "path": "track/bm/large_corkscrew_left_2_3.png", + "x": -25, + "y": -52, + "palette": "keep" + }, + { + "path": "track/bm/large_corkscrew_left_2_4.png", + "x": -22, + "y": -58, + "palette": "keep" + }, + { + "path": "track/bm/large_corkscrew_left_2_5.png", + "x": -17, + "y": -38, + "palette": "keep" + }, + { + "path": "track/bm/large_corkscrew_left_3_1.png", + "x": -16, + "y": -5, + "palette": "keep" + }, + { + "path": "track/bm/large_corkscrew_left_3_2.png", + "x": -18, + "y": -21, + "palette": "keep" + }, + { + "path": "track/bm/large_corkscrew_left_3_3.png", + "x": 10, + "y": -31, + "palette": "keep" + }, + { + "path": "track/bm/large_corkscrew_left_3_4.png", + "x": -8, + "y": -38, + "palette": "keep" + }, + { + "path": "track/bm/large_corkscrew_left_3_5.png", + "x": -16, + "y": -30, + "palette": "keep" + }, + { + "path": "track/bm/large_corkscrew_left_4_1.png", + "x": -26, + "y": -11, + "palette": "keep" + }, + { + "path": "track/bm/large_corkscrew_left_4_2.png", + "x": -26, + "y": -28, + "palette": "keep" + }, + { + "path": "track/bm/large_corkscrew_left_4_3.png", + "x": -16, + "y": -14, + "palette": "keep" + }, + { + "path": "track/bm/large_corkscrew_left_4_4.png", + "x": -45, + "y": -39, + "palette": "keep" + }, + { + "path": "track/bm/large_corkscrew_left_4_5.png", + "x": -25, + "y": -31, + "palette": "keep" + }, + { + "path": "track/bm/large_corkscrew_right_1_1.png", + "x": -24, + "y": -11, + "palette": "keep" + }, + { + "path": "track/bm/large_corkscrew_right_1_2.png", + "x": -26, + "y": -28, + "palette": "keep" + }, + { + "path": "track/bm/large_corkscrew_right_1_3.png", + "x": -23, + "y": -13, + "palette": "keep" + }, + { + "path": "track/bm/large_corkscrew_right_1_4.png", + "x": -31, + "y": -38, + "palette": "keep" + }, + { + "path": "track/bm/large_corkscrew_right_1_5.png", + "x": -32, + "y": -30, + "palette": "keep" + }, + { + "path": "track/bm/large_corkscrew_right_2_1.png", + "x": -24, + "y": -4, + "palette": "keep" + }, + { + "path": "track/bm/large_corkscrew_right_2_2.png", + "x": -16, + "y": -19, + "palette": "keep" + }, + { + "path": "track/bm/large_corkscrew_right_2_3.png", + "x": -24, + "y": -30, + "palette": "keep" + }, + { + "path": "track/bm/large_corkscrew_right_2_4.png", + "x": -16, + "y": -38, + "palette": "keep" + }, + { + "path": "track/bm/large_corkscrew_right_2_5.png", + "x": -26, + "y": -30, + "palette": "keep" + }, + { + "path": "track/bm/large_corkscrew_right_3_1.png", + "x": -42, + "y": -8, + "palette": "keep" + }, + { + "path": "track/bm/large_corkscrew_right_3_2.png", + "x": -16, + "y": -15, + "palette": "keep" + }, + { + "path": "track/bm/large_corkscrew_right_3_3.png", + "x": -28, + "y": -51, + "palette": "keep" + }, + { + "path": "track/bm/large_corkscrew_right_3_4.png", + "x": -31, + "y": -57, + "palette": "keep" + }, + { + "path": "track/bm/large_corkscrew_right_3_5.png", + "x": -25, + "y": -38, + "palette": "keep" + }, + { + "path": "track/bm/large_corkscrew_right_4_1.png", + "x": -26, + "y": -11, + "palette": "keep" + }, + { + "path": "track/bm/large_corkscrew_right_4_2.png", + "x": -11, + "y": -73, + "palette": "keep" + }, + { + "path": "track/bm/large_corkscrew_right_4_3.png", + "x": 9, + "y": -38, + "palette": "keep" + }, + { + "path": "track/bm/large_corkscrew_right_4_4.png", + "x": -18, + "y": -51, + "palette": "keep" + }, + { + "path": "track/bm/large_corkscrew_right_4_5.png", + "x": -25, + "y": -37, + "palette": "keep" + }, { "path": "track/railway/quarter_turn_3_tiles_sw_se_part_3.png", "x": -8, diff --git a/resources/g2/track/bm/large_corkscrew_left_1_1.png b/resources/g2/track/bm/large_corkscrew_left_1_1.png new file mode 100644 index 0000000000..b937ad056d Binary files /dev/null and b/resources/g2/track/bm/large_corkscrew_left_1_1.png differ diff --git a/resources/g2/track/bm/large_corkscrew_left_1_2.png b/resources/g2/track/bm/large_corkscrew_left_1_2.png new file mode 100644 index 0000000000..d6e0841d5a Binary files /dev/null and b/resources/g2/track/bm/large_corkscrew_left_1_2.png differ diff --git a/resources/g2/track/bm/large_corkscrew_left_1_3.png b/resources/g2/track/bm/large_corkscrew_left_1_3.png new file mode 100644 index 0000000000..e47904d100 Binary files /dev/null and b/resources/g2/track/bm/large_corkscrew_left_1_3.png differ diff --git a/resources/g2/track/bm/large_corkscrew_left_1_4.png b/resources/g2/track/bm/large_corkscrew_left_1_4.png new file mode 100644 index 0000000000..f4dfc39086 Binary files /dev/null and b/resources/g2/track/bm/large_corkscrew_left_1_4.png differ diff --git a/resources/g2/track/bm/large_corkscrew_left_1_5.png b/resources/g2/track/bm/large_corkscrew_left_1_5.png new file mode 100644 index 0000000000..4014f0976e Binary files /dev/null and b/resources/g2/track/bm/large_corkscrew_left_1_5.png differ diff --git a/resources/g2/track/bm/large_corkscrew_left_2_1.png b/resources/g2/track/bm/large_corkscrew_left_2_1.png new file mode 100644 index 0000000000..46c8168400 Binary files /dev/null and b/resources/g2/track/bm/large_corkscrew_left_2_1.png differ diff --git a/resources/g2/track/bm/large_corkscrew_left_2_2.png b/resources/g2/track/bm/large_corkscrew_left_2_2.png new file mode 100644 index 0000000000..267bd68fb9 Binary files /dev/null and b/resources/g2/track/bm/large_corkscrew_left_2_2.png differ diff --git a/resources/g2/track/bm/large_corkscrew_left_2_3.png b/resources/g2/track/bm/large_corkscrew_left_2_3.png new file mode 100644 index 0000000000..62b43ff094 Binary files /dev/null and b/resources/g2/track/bm/large_corkscrew_left_2_3.png differ diff --git a/resources/g2/track/bm/large_corkscrew_left_2_4.png b/resources/g2/track/bm/large_corkscrew_left_2_4.png new file mode 100644 index 0000000000..462697c346 Binary files /dev/null and b/resources/g2/track/bm/large_corkscrew_left_2_4.png differ diff --git a/resources/g2/track/bm/large_corkscrew_left_2_5.png b/resources/g2/track/bm/large_corkscrew_left_2_5.png new file mode 100644 index 0000000000..8722af6b72 Binary files /dev/null and b/resources/g2/track/bm/large_corkscrew_left_2_5.png differ diff --git a/resources/g2/track/bm/large_corkscrew_left_3_1.png b/resources/g2/track/bm/large_corkscrew_left_3_1.png new file mode 100644 index 0000000000..ebcc865602 Binary files /dev/null and b/resources/g2/track/bm/large_corkscrew_left_3_1.png differ diff --git a/resources/g2/track/bm/large_corkscrew_left_3_2.png b/resources/g2/track/bm/large_corkscrew_left_3_2.png new file mode 100644 index 0000000000..fd757e21f4 Binary files /dev/null and b/resources/g2/track/bm/large_corkscrew_left_3_2.png differ diff --git a/resources/g2/track/bm/large_corkscrew_left_3_3.png b/resources/g2/track/bm/large_corkscrew_left_3_3.png new file mode 100644 index 0000000000..b04b68d9d0 Binary files /dev/null and b/resources/g2/track/bm/large_corkscrew_left_3_3.png differ diff --git a/resources/g2/track/bm/large_corkscrew_left_3_4.png b/resources/g2/track/bm/large_corkscrew_left_3_4.png new file mode 100644 index 0000000000..96e2458635 Binary files /dev/null and b/resources/g2/track/bm/large_corkscrew_left_3_4.png differ diff --git a/resources/g2/track/bm/large_corkscrew_left_3_5.png b/resources/g2/track/bm/large_corkscrew_left_3_5.png new file mode 100644 index 0000000000..1a81938aa2 Binary files /dev/null and b/resources/g2/track/bm/large_corkscrew_left_3_5.png differ diff --git a/resources/g2/track/bm/large_corkscrew_left_4_1.png b/resources/g2/track/bm/large_corkscrew_left_4_1.png new file mode 100644 index 0000000000..f041c29e87 Binary files /dev/null and b/resources/g2/track/bm/large_corkscrew_left_4_1.png differ diff --git a/resources/g2/track/bm/large_corkscrew_left_4_2.png b/resources/g2/track/bm/large_corkscrew_left_4_2.png new file mode 100644 index 0000000000..bd44b2b32f Binary files /dev/null and b/resources/g2/track/bm/large_corkscrew_left_4_2.png differ diff --git a/resources/g2/track/bm/large_corkscrew_left_4_3.png b/resources/g2/track/bm/large_corkscrew_left_4_3.png new file mode 100644 index 0000000000..6dbd298591 Binary files /dev/null and b/resources/g2/track/bm/large_corkscrew_left_4_3.png differ diff --git a/resources/g2/track/bm/large_corkscrew_left_4_4.png b/resources/g2/track/bm/large_corkscrew_left_4_4.png new file mode 100644 index 0000000000..9500e7fa17 Binary files /dev/null and b/resources/g2/track/bm/large_corkscrew_left_4_4.png differ diff --git a/resources/g2/track/bm/large_corkscrew_left_4_5.png b/resources/g2/track/bm/large_corkscrew_left_4_5.png new file mode 100644 index 0000000000..b53d083246 Binary files /dev/null and b/resources/g2/track/bm/large_corkscrew_left_4_5.png differ diff --git a/resources/g2/track/bm/large_corkscrew_right_1_1.png b/resources/g2/track/bm/large_corkscrew_right_1_1.png new file mode 100644 index 0000000000..30971a185b Binary files /dev/null and b/resources/g2/track/bm/large_corkscrew_right_1_1.png differ diff --git a/resources/g2/track/bm/large_corkscrew_right_1_2.png b/resources/g2/track/bm/large_corkscrew_right_1_2.png new file mode 100644 index 0000000000..040838d28f Binary files /dev/null and b/resources/g2/track/bm/large_corkscrew_right_1_2.png differ diff --git a/resources/g2/track/bm/large_corkscrew_right_1_3.png b/resources/g2/track/bm/large_corkscrew_right_1_3.png new file mode 100644 index 0000000000..d3e9b08ec7 Binary files /dev/null and b/resources/g2/track/bm/large_corkscrew_right_1_3.png differ diff --git a/resources/g2/track/bm/large_corkscrew_right_1_4.png b/resources/g2/track/bm/large_corkscrew_right_1_4.png new file mode 100644 index 0000000000..1c1589c5b8 Binary files /dev/null and b/resources/g2/track/bm/large_corkscrew_right_1_4.png differ diff --git a/resources/g2/track/bm/large_corkscrew_right_1_5.png b/resources/g2/track/bm/large_corkscrew_right_1_5.png new file mode 100644 index 0000000000..b3041ef5d7 Binary files /dev/null and b/resources/g2/track/bm/large_corkscrew_right_1_5.png differ diff --git a/resources/g2/track/bm/large_corkscrew_right_2_1.png b/resources/g2/track/bm/large_corkscrew_right_2_1.png new file mode 100644 index 0000000000..4f30664251 Binary files /dev/null and b/resources/g2/track/bm/large_corkscrew_right_2_1.png differ diff --git a/resources/g2/track/bm/large_corkscrew_right_2_2.png b/resources/g2/track/bm/large_corkscrew_right_2_2.png new file mode 100644 index 0000000000..1dab5438ec Binary files /dev/null and b/resources/g2/track/bm/large_corkscrew_right_2_2.png differ diff --git a/resources/g2/track/bm/large_corkscrew_right_2_3.png b/resources/g2/track/bm/large_corkscrew_right_2_3.png new file mode 100644 index 0000000000..5f95313384 Binary files /dev/null and b/resources/g2/track/bm/large_corkscrew_right_2_3.png differ diff --git a/resources/g2/track/bm/large_corkscrew_right_2_4.png b/resources/g2/track/bm/large_corkscrew_right_2_4.png new file mode 100644 index 0000000000..6a12983643 Binary files /dev/null and b/resources/g2/track/bm/large_corkscrew_right_2_4.png differ diff --git a/resources/g2/track/bm/large_corkscrew_right_2_5.png b/resources/g2/track/bm/large_corkscrew_right_2_5.png new file mode 100644 index 0000000000..0f5ae1de43 Binary files /dev/null and b/resources/g2/track/bm/large_corkscrew_right_2_5.png differ diff --git a/resources/g2/track/bm/large_corkscrew_right_3_1.png b/resources/g2/track/bm/large_corkscrew_right_3_1.png new file mode 100644 index 0000000000..c1b7b42f8b Binary files /dev/null and b/resources/g2/track/bm/large_corkscrew_right_3_1.png differ diff --git a/resources/g2/track/bm/large_corkscrew_right_3_2.png b/resources/g2/track/bm/large_corkscrew_right_3_2.png new file mode 100644 index 0000000000..9c70daf17d Binary files /dev/null and b/resources/g2/track/bm/large_corkscrew_right_3_2.png differ diff --git a/resources/g2/track/bm/large_corkscrew_right_3_3.png b/resources/g2/track/bm/large_corkscrew_right_3_3.png new file mode 100644 index 0000000000..31440f8c96 Binary files /dev/null and b/resources/g2/track/bm/large_corkscrew_right_3_3.png differ diff --git a/resources/g2/track/bm/large_corkscrew_right_3_4.png b/resources/g2/track/bm/large_corkscrew_right_3_4.png new file mode 100644 index 0000000000..7ca6485de3 Binary files /dev/null and b/resources/g2/track/bm/large_corkscrew_right_3_4.png differ diff --git a/resources/g2/track/bm/large_corkscrew_right_3_5.png b/resources/g2/track/bm/large_corkscrew_right_3_5.png new file mode 100644 index 0000000000..2e3b6f7ad3 Binary files /dev/null and b/resources/g2/track/bm/large_corkscrew_right_3_5.png differ diff --git a/resources/g2/track/bm/large_corkscrew_right_4_1.png b/resources/g2/track/bm/large_corkscrew_right_4_1.png new file mode 100644 index 0000000000..23cbf7e7c2 Binary files /dev/null and b/resources/g2/track/bm/large_corkscrew_right_4_1.png differ diff --git a/resources/g2/track/bm/large_corkscrew_right_4_2.png b/resources/g2/track/bm/large_corkscrew_right_4_2.png new file mode 100644 index 0000000000..571036237a Binary files /dev/null and b/resources/g2/track/bm/large_corkscrew_right_4_2.png differ diff --git a/resources/g2/track/bm/large_corkscrew_right_4_3.png b/resources/g2/track/bm/large_corkscrew_right_4_3.png new file mode 100644 index 0000000000..6e283d5260 Binary files /dev/null and b/resources/g2/track/bm/large_corkscrew_right_4_3.png differ diff --git a/resources/g2/track/bm/large_corkscrew_right_4_4.png b/resources/g2/track/bm/large_corkscrew_right_4_4.png new file mode 100644 index 0000000000..a75a2ecb91 Binary files /dev/null and b/resources/g2/track/bm/large_corkscrew_right_4_4.png differ diff --git a/resources/g2/track/bm/large_corkscrew_right_4_5.png b/resources/g2/track/bm/large_corkscrew_right_4_5.png new file mode 100644 index 0000000000..886e59b616 Binary files /dev/null and b/resources/g2/track/bm/large_corkscrew_right_4_5.png differ diff --git a/src/openrct2/paint/track/coaster/TwisterRollerCoaster.cpp b/src/openrct2/paint/track/coaster/TwisterRollerCoaster.cpp index de70dc8eab..424a3d0fe5 100644 --- a/src/openrct2/paint/track/coaster/TwisterRollerCoaster.cpp +++ b/src/openrct2/paint/track/coaster/TwisterRollerCoaster.cpp @@ -14582,6 +14582,453 @@ static void TwisterRCTrackFlyerHalfLoopUp( } } +static void TwisterRCTrackLeftLargeCorkscrewUp( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement, SupportType supportType) +{ + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex((SPR_G2_BM_TRACK_LARGE_CORKSCREW + 0)), + { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex((SPR_G2_BM_TRACK_LARGE_CORKSCREW + 5)), + { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex((SPR_G2_BM_TRACK_LARGE_CORKSCREW + 10)), + { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex((SPR_G2_BM_TRACK_LARGE_CORKSCREW + 15)), + { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); + break; + } + + MetalASupportsPaintSetup(session, supportType.metal, MetalSupportPlace::Centre, 0, height, session.SupportColours); + + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height, kTunnelGroup, TunnelSubType::Flat); + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, + PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex((SPR_G2_BM_TRACK_LARGE_CORKSCREW + 1)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + MetalASupportsPaintSetup( + session, supportType.metal, MetalSupportPlace::TopRightSide, 21, height, session.SupportColours); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex((SPR_G2_BM_TRACK_LARGE_CORKSCREW + 6)), + { 0, 0, height }, { { 0, 6, height + 48 }, { 32, 20, 3 } }); + MetalASupportsPaintSetup( + session, supportType.metal, MetalSupportPlace::BottomRightSide, 19, height, session.SupportColours); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex((SPR_G2_BM_TRACK_LARGE_CORKSCREW + 11)), + { 0, 0, height }, { { 0, 6, height }, { 30, 20, 3 } }); + MetalASupportsPaintSetup( + session, supportType.metal, MetalSupportPlace::BottomLeftSide, 20, height, session.SupportColours); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex((SPR_G2_BM_TRACK_LARGE_CORKSCREW + 16)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + MetalASupportsPaintSetup( + session, supportType.metal, MetalSupportPlace::TopLeftSide, 16, height, session.SupportColours); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); + break; + case 2: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex((SPR_G2_BM_TRACK_LARGE_CORKSCREW + 2)), + { 0, 0, height }, { { 0, 31, height }, { 48, 1, 64 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex((SPR_G2_BM_TRACK_LARGE_CORKSCREW + 7)), + { 0, 0, height }, { { 2, 2, height + 40 }, { 28, 28, 1 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex((SPR_G2_BM_TRACK_LARGE_CORKSCREW + 12)), + { 0, 0, height }, { { 2, 2, height + 48 }, { 28, 28, 1 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex((SPR_G2_BM_TRACK_LARGE_CORKSCREW + 17)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, + PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); + break; + case 3: + PaintUtilSetGeneralSupportHeight(session, height + 48); + break; + case 4: + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::leftCorner, PaintSegment::bottomLeftSide, PaintSegment::bottomCorner, + PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex((SPR_G2_BM_TRACK_LARGE_CORKSCREW + 3)), + { 0, 0, height }, { { 2, 2, height + 50 }, { 28, 28, 0 } }); + MetalASupportsPaintSetup( + session, supportType.metal, MetalSupportPlace::TopLeftSide, 0, height + 63, session.SupportColours); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex((SPR_G2_BM_TRACK_LARGE_CORKSCREW + 8)), + { 0, 0, height }, { { 2, 2, height + 50 }, { 28, 28, 0 } }); + MetalASupportsPaintSetup( + session, supportType.metal, MetalSupportPlace::TopRightSide, 0, height + 63, session.SupportColours); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex((SPR_G2_BM_TRACK_LARGE_CORKSCREW + 13)), + { 0, 0, height }, { { 2, 2, height + 50 }, { 24, 28, 0 } }); + MetalASupportsPaintSetup( + session, supportType.metal, MetalSupportPlace::BottomRightSide, 0, height + 63, session.SupportColours); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex((SPR_G2_BM_TRACK_LARGE_CORKSCREW + 18)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + MetalASupportsPaintSetup( + session, supportType.metal, MetalSupportPlace::BottomLeftSide, 0, height + 63, session.SupportColours); + break; + } + + PaintUtilSetGeneralSupportHeight(session, height + 64); + break; + case 5: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex((SPR_G2_BM_TRACK_LARGE_CORKSCREW + 4)), + { 0, 0, height }, { { 2, 2, height + 40 }, { 28, 28, 1 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex((SPR_G2_BM_TRACK_LARGE_CORKSCREW + 9)), + { 0, 0, height }, { { 2, 2, height + 40 }, { 28, 28, 1 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex((SPR_G2_BM_TRACK_LARGE_CORKSCREW + 14)), + { 0, 0, height }, { { 2, 2, height + 40 }, { 26, 28, 1 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex((SPR_G2_BM_TRACK_LARGE_CORKSCREW + 19)), + { 0, 0, height }, { { 2, 2, height + 40 }, { 26, 28, 1 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::leftCorner, PaintSegment::bottomLeftSide, PaintSegment::bottomCorner, + PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + switch (direction) + { + case 2: + PaintUtilPushTunnelRight(session, height + 8, kTunnelGroup, TunnelSubType::Flat); + break; + case 3: + PaintUtilPushTunnelLeft(session, height + 8, kTunnelGroup, TunnelSubType::Flat); + break; + } + PaintUtilSetGeneralSupportHeight(session, height + 48); + break; + } +} + +static void TwisterRCTrackRightLargeCorkscrewUp( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement, SupportType supportType) +{ + switch (trackSequence) + { + case 0: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex((SPR_G2_BM_TRACK_LARGE_CORKSCREW + 20)), + { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex((SPR_G2_BM_TRACK_LARGE_CORKSCREW + 25)), + { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex((SPR_G2_BM_TRACK_LARGE_CORKSCREW + 30)), + { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex((SPR_G2_BM_TRACK_LARGE_CORKSCREW + 35)), + { 0, 0, height }, { { 0, 6, height + 4 }, { 32, 20, 3 } }); + break; + } + + MetalASupportsPaintSetup(session, supportType.metal, MetalSupportPlace::Centre, 0, height, session.SupportColours); + + if (direction == 0 || direction == 3) + { + PaintUtilPushTunnelRotated(session, direction, height, kTunnelGroup, TunnelSubType::Flat); + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::bottomRightSide, PaintSegment::centre, PaintSegment::rightCorner, + PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 40); + break; + case 1: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex((SPR_G2_BM_TRACK_LARGE_CORKSCREW + 21)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + MetalASupportsPaintSetup( + session, supportType.metal, MetalSupportPlace::TopRightSide, 16, height, session.SupportColours); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex((SPR_G2_BM_TRACK_LARGE_CORKSCREW + 26)), + { 0, 0, height }, { { 0, 6, height }, { 30, 20, 3 } }); + MetalASupportsPaintSetup( + session, supportType.metal, MetalSupportPlace::BottomRightSide, 20, height, session.SupportColours); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex((SPR_G2_BM_TRACK_LARGE_CORKSCREW + 31)), + { 0, 0, height }, { { 0, 6, height + 48 }, { 32, 20, 3 } }); + MetalASupportsPaintSetup( + session, supportType.metal, MetalSupportPlace::BottomLeftSide, 19, height, session.SupportColours); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex((SPR_G2_BM_TRACK_LARGE_CORKSCREW + 36)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + MetalASupportsPaintSetup( + session, supportType.metal, MetalSupportPlace::TopLeftSide, 21, height, session.SupportColours); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, + PaintSegment::bottomRightSide, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 56); + break; + case 2: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex((SPR_G2_BM_TRACK_LARGE_CORKSCREW + 22)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex((SPR_G2_BM_TRACK_LARGE_CORKSCREW + 27)), + { 0, 0, height }, { { 2, 2, height + 48 }, { 28, 28, 1 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex((SPR_G2_BM_TRACK_LARGE_CORKSCREW + 32)), + { 0, 0, height }, { { 2, 2, height + 48 }, { 28, 28, 1 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex((SPR_G2_BM_TRACK_LARGE_CORKSCREW + 37)), + { 0, 0, height }, { { 0, 31, height }, { 48, 1, 64 } }); + break; + } + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomRightSide, + PaintSegment::bottomLeftSide), + direction), + 0xFFFF, 0); + PaintUtilSetGeneralSupportHeight(session, height + 48); + break; + case 3: + PaintUtilSetGeneralSupportHeight(session, height + 48); + break; + case 4: + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::leftCorner, PaintSegment::bottomLeftSide, PaintSegment::bottomCorner, + PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex((SPR_G2_BM_TRACK_LARGE_CORKSCREW + 23)), + { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } }); + MetalASupportsPaintSetup( + session, supportType.metal, MetalSupportPlace::BottomRightSide, 0, height + 63, session.SupportColours); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex((SPR_G2_BM_TRACK_LARGE_CORKSCREW + 28)), + { 0, 0, height }, { { 2, 2, height + 50 }, { 24, 28, 0 } }); + MetalASupportsPaintSetup( + session, supportType.metal, MetalSupportPlace::BottomLeftSide, 0, height + 63, session.SupportColours); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex((SPR_G2_BM_TRACK_LARGE_CORKSCREW + 33)), + { 0, 0, height }, { { 2, 2, height + 50 }, { 28, 28, 0 } }); + MetalASupportsPaintSetup( + session, supportType.metal, MetalSupportPlace::TopLeftSide, 0, height + 63, session.SupportColours); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex((SPR_G2_BM_TRACK_LARGE_CORKSCREW + 38)), + { 0, 0, height }, { { 2, 2, height + 50 }, { 28, 28, 0 } }); + MetalASupportsPaintSetup( + session, supportType.metal, MetalSupportPlace::TopRightSide, 0, height + 63, session.SupportColours); + break; + } + PaintUtilSetGeneralSupportHeight(session, height + 64); + break; + case 5: + switch (direction) + { + case 0: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex((SPR_G2_BM_TRACK_LARGE_CORKSCREW + 24)), + { 0, 0, height }, { { 2, 2, height + 40 }, { 26, 28, 1 } }); + break; + case 1: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex((SPR_G2_BM_TRACK_LARGE_CORKSCREW + 29)), + { 0, 0, height }, { { 2, 2, height + 40 }, { 26, 28, 1 } }); + break; + case 2: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex((SPR_G2_BM_TRACK_LARGE_CORKSCREW + 34)), + { 0, 0, height }, { { 2, 2, height + 40 }, { 28, 28, 1 } }); + break; + case 3: + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex((SPR_G2_BM_TRACK_LARGE_CORKSCREW + 39)), + { 0, 0, height }, { { 2, 2, height + 40 }, { 28, 28, 1 } }); + break; + } + + PaintUtilSetSegmentSupportHeight( + session, + PaintUtilRotateSegments( + EnumsToFlags( + PaintSegment::leftCorner, PaintSegment::bottomLeftSide, PaintSegment::bottomCorner, + PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide), + direction), + 0xFFFF, 0); + switch (direction) + { + case 0: + PaintUtilPushTunnelRight(session, height + 8, kTunnelGroup, TunnelSubType::Flat); + break; + case 1: + PaintUtilPushTunnelLeft(session, height + 8, kTunnelGroup, TunnelSubType::Flat); + break; + } + PaintUtilSetGeneralSupportHeight(session, height + 48); + break; + } +} + +static void TwisterRCTrackLeftLargeCorkscrewDown( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement, SupportType supportType) +{ + TwisterRCTrackRightLargeCorkscrewUp( + session, ride, 5 - trackSequence, (direction + 1) & 3, height, trackElement, supportType); +} + +static void TwisterRCTrackRightLargeCorkscrewDown( + PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, + const TrackElement& trackElement, SupportType supportType) +{ + TwisterRCTrackLeftLargeCorkscrewUp( + session, ride, 5 - trackSequence, (direction - 1) & 3, height, trackElement, supportType); +} + TRACK_PAINT_FUNCTION GetTrackPaintFunctionTwisterRC(OpenRCT2::TrackElemType trackType) { switch (trackType) @@ -14968,6 +15415,17 @@ TRACK_PAINT_FUNCTION GetTrackPaintFunctionTwisterRC(OpenRCT2::TrackElemType trac return TwisterRCTrackRightFlyerTwistUp; case TrackElemType::FlyerHalfLoopUninvertedUp: return TwisterRCTrackFlyerHalfLoopUp; + + // Large corkscrews + case TrackElemType::LeftLargeCorkscrewUp: + return TwisterRCTrackLeftLargeCorkscrewUp; + case TrackElemType::RightLargeCorkscrewUp: + return TwisterRCTrackRightLargeCorkscrewUp; + case TrackElemType::LeftLargeCorkscrewDown: + return TwisterRCTrackLeftLargeCorkscrewDown; + case TrackElemType::RightLargeCorkscrewDown: + return TwisterRCTrackRightLargeCorkscrewDown; + default: return nullptr; } diff --git a/src/openrct2/ride/rtd/coaster/TwisterRollerCoaster.h b/src/openrct2/ride/rtd/coaster/TwisterRollerCoaster.h index 31ecb9ca85..81a60da118 100644 --- a/src/openrct2/ride/rtd/coaster/TwisterRollerCoaster.h +++ b/src/openrct2/ride/rtd/coaster/TwisterRollerCoaster.h @@ -23,7 +23,7 @@ constexpr RideTypeDescriptor TwisterRollerCoasterRTD = .TrackPaintFunctions = TrackDrawerDescriptor({ .Drawer = GetTrackPaintFunctionTwisterRC, .supportType = MetalSupportType::Tubes, - .enabledTrackGroups = {TrackGroup::flat, TrackGroup::straight, TrackGroup::stationEnd, TrackGroup::liftHill, TrackGroup::flatRollBanking, TrackGroup::verticalLoop, TrackGroup::slope, TrackGroup::slopeSteepUp, TrackGroup::slopeSteepDown, TrackGroup::slopeCurve, TrackGroup::slopeCurveSteep, TrackGroup::sBend, TrackGroup::curveSmall, TrackGroup::curve, TrackGroup::curveLarge, TrackGroup::halfLoop, TrackGroup::corkscrew, TrackGroup::helixDownBankedHalf, TrackGroup::helixUpBankedHalf, TrackGroup::brakes, TrackGroup::onridePhoto, TrackGroup::slopeVertical, TrackGroup::barrelRoll, TrackGroup::poweredLift, TrackGroup::halfLoopLarge, TrackGroup::slopeCurveBanked, TrackGroup::blockBrakes, TrackGroup::slopeRollBanking, TrackGroup::slopeSteepLong, TrackGroup::curveVertical, TrackGroup::quarterLoop, TrackGroup::booster, TrackGroup::twist, TrackGroup::diagBrakes, TrackGroup::diagBlockBrakes}, + .enabledTrackGroups = {TrackGroup::flat, TrackGroup::straight, TrackGroup::stationEnd, TrackGroup::liftHill, TrackGroup::flatRollBanking, TrackGroup::verticalLoop, TrackGroup::slope, TrackGroup::slopeSteepUp, TrackGroup::slopeSteepDown, TrackGroup::slopeCurve, TrackGroup::slopeCurveSteep, TrackGroup::sBend, TrackGroup::curveSmall, TrackGroup::curve, TrackGroup::curveLarge, TrackGroup::halfLoop, TrackGroup::corkscrew, TrackGroup::helixDownBankedHalf, TrackGroup::helixUpBankedHalf, TrackGroup::brakes, TrackGroup::onridePhoto, TrackGroup::slopeVertical, TrackGroup::barrelRoll, TrackGroup::poweredLift, TrackGroup::halfLoopLarge, TrackGroup::slopeCurveBanked, TrackGroup::blockBrakes, TrackGroup::slopeRollBanking, TrackGroup::slopeSteepLong, TrackGroup::curveVertical, TrackGroup::quarterLoop, TrackGroup::booster, TrackGroup::twist, TrackGroup::diagBrakes, TrackGroup::diagBlockBrakes, TrackGroup::corkscrewLarge}, .extraTrackGroups = {TrackGroup::liftHillSteep, TrackGroup::brakeForDrop}, }), .InvertedTrackPaintFunctions = {}, diff --git a/src/openrct2/sprites.h b/src/openrct2/sprites.h index a51ea9ca72..35129f442c 100644 --- a/src/openrct2/sprites.h +++ b/src/openrct2/sprites.h @@ -1286,7 +1286,8 @@ enum : ImageIndex SPR_G2_BM_DIAG_BRAKES = SPR_G2_BM_RC_BEGIN, SPR_G2_BM_BOOSTER_NE_SW = SPR_G2_BM_DIAG_BRAKES + 6, SPR_G2_BM_BOOSTER_NW_SE, - SPR_G2_BM_RC_END, + SPR_G2_BM_TRACK_LARGE_CORKSCREW, + SPR_G2_BM_RC_END = SPR_G2_BM_TRACK_LARGE_CORKSCREW + 40, SPR_G2_MINIATURE_RAILWAY_BEGIN = SPR_G2_BM_RC_END, SPR_G2_MINIATURE_RAILWAY_QUARTER_TURN_3_TILES_SW_SE_PART_3 = SPR_G2_MINIATURE_RAILWAY_BEGIN,