From f06a80cb308fb9b5f139c8b3b9b62207a24bab7e Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Sat, 23 Dec 2023 13:25:51 +0100 Subject: [PATCH 1/2] Allow for building roller coasters with all 4 curve types Requested by @RealSteel89 --- src/openrct2-ui/windows/RideConstruction.cpp | 90 +++++++++----------- 1 file changed, 38 insertions(+), 52 deletions(-) diff --git a/src/openrct2-ui/windows/RideConstruction.cpp b/src/openrct2-ui/windows/RideConstruction.cpp index fd92ce165e..acc5d5b6f5 100644 --- a/src/openrct2-ui/windows/RideConstruction.cpp +++ b/src/openrct2-ui/windows/RideConstruction.cpp @@ -48,7 +48,7 @@ static constexpr StringId WINDOW_TITLE = STR_RIDE_CONSTRUCTION_WINDOW_TITLE; static constexpr int32_t WH = 394; -static constexpr int32_t WW = 166; +static constexpr int32_t WW = 210; static constexpr uint16_t ARROW_PULSE_DURATION = 200; // Width of the group boxes, e.g. “Banking” @@ -118,37 +118,37 @@ static Widget _rideConstructionWidgets[] = { MakeWidget ({ 3, 76}, { GW, 41}, WindowWidgetType::Groupbox, WindowColour::Primary , STR_RIDE_CONSTRUCTION_SLOPE ), MakeWidget ({ 3, 120}, { GW, 41}, WindowWidgetType::Groupbox, WindowColour::Primary , STR_RIDE_CONSTRUCTION_ROLL_BANKING ), MakeWidget ({ 6, 29}, { 22, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_LEFT_CURVE_SMALL), STR_RIDE_CONSTRUCTION_LEFT_CURVE_VERY_SMALL_TIP ), - MakeWidget ({ 6, 29}, { 22, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_LEFT_CURVE_SMALL), STR_RIDE_CONSTRUCTION_LEFT_CURVE_SMALL_TIP ), - MakeWidget ({ 28, 29}, { 22, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_LEFT_CURVE), STR_RIDE_CONSTRUCTION_LEFT_CURVE_TIP ), - MakeWidget ({ 50, 29}, { 22, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_LEFT_CURVE_LARGE), STR_RIDE_CONSTRUCTION_LEFT_CURVE_LARGE_TIP ), - MakeWidget ({ 72, 29}, { 22, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_STRAIGHT), STR_RIDE_CONSTRUCTION_STRAIGHT_TIP ), - MakeWidget ({ 94, 29}, { 22, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_RIGHT_CURVE_LARGE), STR_RIDE_CONSTRUCTION_RIGHT_CURVE_LARGE_TIP ), - MakeWidget ({116, 29}, { 22, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_RIGHT_CURVE), STR_RIDE_CONSTRUCTION_RIGHT_CURVE_TIP ), - MakeWidget ({138, 29}, { 22, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_RIGHT_CURVE_SMALL), STR_RIDE_CONSTRUCTION_RIGHT_CURVE_SMALL_TIP ), - MakeWidget ({138, 29}, { 22, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_RIGHT_CURVE_SMALL), STR_RIDE_CONSTRUCTION_RIGHT_CURVE_VERY_SMALL_TIP ), + MakeWidget ({ 28, 29}, { 22, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_LEFT_CURVE_SMALL), STR_RIDE_CONSTRUCTION_LEFT_CURVE_SMALL_TIP ), + MakeWidget ({ 50, 29}, { 22, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_LEFT_CURVE), STR_RIDE_CONSTRUCTION_LEFT_CURVE_TIP ), + MakeWidget ({ 72, 29}, { 22, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_LEFT_CURVE_LARGE), STR_RIDE_CONSTRUCTION_LEFT_CURVE_LARGE_TIP ), + MakeWidget ({ 94, 29}, { 22, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_STRAIGHT), STR_RIDE_CONSTRUCTION_STRAIGHT_TIP ), + MakeWidget ({116, 29}, { 22, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_RIGHT_CURVE_LARGE), STR_RIDE_CONSTRUCTION_RIGHT_CURVE_LARGE_TIP ), + MakeWidget ({138, 29}, { 22, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_RIGHT_CURVE), STR_RIDE_CONSTRUCTION_RIGHT_CURVE_TIP ), + MakeWidget ({160, 29}, { 22, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_RIGHT_CURVE_SMALL), STR_RIDE_CONSTRUCTION_RIGHT_CURVE_SMALL_TIP ), + MakeWidget ({182, 29}, { 22, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_RIGHT_CURVE_SMALL), STR_RIDE_CONSTRUCTION_RIGHT_CURVE_VERY_SMALL_TIP ), MakeWidget ({ 6, 55}, { GW - 6, 14}, WindowWidgetType::Button, WindowColour::Secondary, STR_YELLOW_STRING, STR_RIDE_CONSTRUCTION_OTHER_TRACK_CONFIGURATIONS_TIP), - MakeWidget ({ 23, 88}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_SLOPE_DOWN_STEEP), STR_RIDE_CONSTRUCTION_STEEP_SLOPE_DOWN_TIP ), - MakeWidget ({ 47, 88}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_SLOPE_DOWN), STR_RIDE_CONSTRUCTION_SLOPE_DOWN_TIP ), - MakeWidget ({ 71, 88}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_SLOPE_LEVEL), STR_RIDE_CONSTRUCTION_LEVEL_TIP ), - MakeWidget ({ 95, 88}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_SLOPE_UP), STR_RIDE_CONSTRUCTION_SLOPE_UP_TIP ), - MakeWidget ({119, 88}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_SLOPE_UP_STEEP), STR_RIDE_CONSTRUCTION_STEEP_SLOPE_UP_TIP ), - MakeWidget ({134, 88}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_CHAIN_LIFT), STR_RIDE_CONSTRUCTION_CHAIN_LIFT_TIP ), - MakeWidget ({ 47, 132}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_LEFT_BANK), STR_RIDE_CONSTRUCTION_ROLL_FOR_LEFT_CURVE_TIP ), - MakeWidget ({ 71, 132}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_NO_BANK), STR_RIDE_CONSTRUCTION_NO_ROLL_TIP ), - MakeWidget ({ 95, 132}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_RIGHT_BANK), STR_RIDE_CONSTRUCTION_ROLL_FOR_RIGHT_CURVE_TIP ), + MakeWidget ({ 45, 88}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_SLOPE_DOWN_STEEP), STR_RIDE_CONSTRUCTION_STEEP_SLOPE_DOWN_TIP ), + MakeWidget ({ 69, 88}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_SLOPE_DOWN), STR_RIDE_CONSTRUCTION_SLOPE_DOWN_TIP ), + MakeWidget ({ 93, 88}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_SLOPE_LEVEL), STR_RIDE_CONSTRUCTION_LEVEL_TIP ), + MakeWidget ({117, 88}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_SLOPE_UP), STR_RIDE_CONSTRUCTION_SLOPE_UP_TIP ), + MakeWidget ({141, 88}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_SLOPE_UP_STEEP), STR_RIDE_CONSTRUCTION_STEEP_SLOPE_UP_TIP ), + MakeWidget ({178, 88}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_CHAIN_LIFT), STR_RIDE_CONSTRUCTION_CHAIN_LIFT_TIP ), + MakeWidget ({ 69, 132}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_LEFT_BANK), STR_RIDE_CONSTRUCTION_ROLL_FOR_LEFT_CURVE_TIP ), + MakeWidget ({ 93, 132}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_NO_BANK), STR_RIDE_CONSTRUCTION_NO_ROLL_TIP ), + MakeWidget ({117, 132}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_RIGHT_BANK), STR_RIDE_CONSTRUCTION_ROLL_FOR_RIGHT_CURVE_TIP ), MakeWidget ({ 3, 164}, { GW, 170}, WindowWidgetType::ImgBtn, WindowColour::Secondary, 0xFFFFFFFF, STR_RIDE_CONSTRUCTION_CONSTRUCT_SELECTED_SECTION_TIP), - MakeWidget ({ 60, 338}, { 46, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_DEMOLISH_CURRENT_SECTION), STR_RIDE_CONSTRUCTION_REMOVE_HIGHLIGHTED_SECTION_TIP), - MakeWidget ({ 30, 338}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_PREVIOUS), STR_RIDE_CONSTRUCTION_MOVE_TO_PREVIOUS_SECTION_TIP ), - MakeWidget ({112, 338}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_NEXT), STR_RIDE_CONSTRUCTION_MOVE_TO_NEXT_SECTION_TIP ), + MakeWidget ({ 82, 338}, { 46, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_DEMOLISH_CURRENT_SECTION), STR_RIDE_CONSTRUCTION_REMOVE_HIGHLIGHTED_SECTION_TIP), + MakeWidget ({ 52, 338}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_PREVIOUS), STR_RIDE_CONSTRUCTION_MOVE_TO_PREVIOUS_SECTION_TIP ), + MakeWidget ({134, 338}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_NEXT), STR_RIDE_CONSTRUCTION_MOVE_TO_NEXT_SECTION_TIP ), MakeWidget ({ 3, 362}, { GW, 28}, WindowWidgetType::Groupbox, WindowColour::Primary ), - MakeWidget ({ 9, 372}, { 70, 12}, WindowWidgetType::Button, WindowColour::Secondary, STR_RIDE_CONSTRUCTION_ENTRANCE, STR_RIDE_CONSTRUCTION_ENTRANCE_TIP ), - MakeWidget ({ 87, 372}, { 70, 12}, WindowWidgetType::Button, WindowColour::Secondary, STR_RIDE_CONSTRUCTION_EXIT, STR_RIDE_CONSTRUCTION_EXIT_TIP ), - MakeWidget ({ 72, 338}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_ROTATE_ARROW), STR_ROTATE_90_TIP ), - MakeWidget ({ 19, 132}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_U_SHAPED_TRACK), STR_RIDE_CONSTRUCTION_U_SHAPED_OPEN_TRACK_TIP ), - MakeWidget ({123, 132}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_O_SHAPED_TRACK), STR_RIDE_CONSTRUCTION_O_SHAPED_ENCLOSED_TRACK_TIP ), - MakeWidget ({ 96, 120}, { 67, 41}, WindowWidgetType::Groupbox, WindowColour::Primary , STR_RIDE_CONSTRUCTION_SEAT_ROT ), - MakeSpinnerWidgets({101, 138}, { 58, 12}, WindowWidgetType::Spinner, WindowColour::Secondary, 0, STR_RIDE_CONSTRUCTION_SELECT_SEAT_ROTATION_ANGLE_TIP), - MakeWidget ({139, 338}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_G2_SIMULATE), STR_SIMULATE_RIDE_TIP ), + MakeWidget ({ 31, 372}, { 70, 12}, WindowWidgetType::Button, WindowColour::Secondary, STR_RIDE_CONSTRUCTION_ENTRANCE, STR_RIDE_CONSTRUCTION_ENTRANCE_TIP ), + MakeWidget ({109, 372}, { 70, 12}, WindowWidgetType::Button, WindowColour::Secondary, STR_RIDE_CONSTRUCTION_EXIT, STR_RIDE_CONSTRUCTION_EXIT_TIP ), + MakeWidget ({ 94, 338}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_ROTATE_ARROW), STR_ROTATE_90_TIP ), + MakeWidget ({ 41, 132}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_U_SHAPED_TRACK), STR_RIDE_CONSTRUCTION_U_SHAPED_OPEN_TRACK_TIP ), + MakeWidget ({144, 132}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_O_SHAPED_TRACK), STR_RIDE_CONSTRUCTION_O_SHAPED_ENCLOSED_TRACK_TIP ), + MakeWidget ({118, 120}, { 89, 41}, WindowWidgetType::Groupbox, WindowColour::Primary , STR_RIDE_CONSTRUCTION_SEAT_ROT ), + MakeSpinnerWidgets({123, 138}, { 58, 12}, WindowWidgetType::Spinner, WindowColour::Secondary, 0, STR_RIDE_CONSTRUCTION_SELECT_SEAT_ROTATION_ANGLE_TIP), + MakeWidget ({161, 338}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_G2_SIMULATE), STR_SIMULATE_RIDE_TIP ), WIDGETS_END, }; // clang-format on @@ -1611,32 +1611,20 @@ public: widgets[WIDX_RIGHT_CURVE_SMALL].type = WindowWidgetType::Empty; widgets[WIDX_LEFT_CURVE_VERY_SMALL].type = WindowWidgetType::Empty; widgets[WIDX_RIGHT_CURVE_VERY_SMALL].type = WindowWidgetType::Empty; - widgets[WIDX_LEFT_CURVE_SMALL].left = 28; - widgets[WIDX_LEFT_CURVE_SMALL].right = 49; - widgets[WIDX_RIGHT_CURVE_SMALL].left = 116; - widgets[WIDX_RIGHT_CURVE_SMALL].right = 137; widgets[WIDX_LEFT_CURVE_SMALL].image = ImageId(SPR_RIDE_CONSTRUCTION_LEFT_CURVE); widgets[WIDX_RIGHT_CURVE_SMALL].image = ImageId(SPR_RIDE_CONSTRUCTION_RIGHT_CURVE); if (IsTrackEnabled(TRACK_CURVE_VERTICAL)) { widgets[WIDX_LEFT_CURVE_SMALL].type = WindowWidgetType::FlatBtn; - widgets[WIDX_LEFT_CURVE_SMALL].left = 6; - widgets[WIDX_LEFT_CURVE_SMALL].right = 27; widgets[WIDX_LEFT_CURVE_SMALL].image = ImageId(SPR_RIDE_CONSTRUCTION_LEFT_CURVE_SMALL); widgets[WIDX_RIGHT_CURVE_SMALL].type = WindowWidgetType::FlatBtn; - widgets[WIDX_RIGHT_CURVE_SMALL].left = 138; - widgets[WIDX_RIGHT_CURVE_SMALL].right = 159; widgets[WIDX_RIGHT_CURVE_SMALL].image = ImageId(SPR_RIDE_CONSTRUCTION_RIGHT_CURVE_SMALL); } if (IsTrackEnabled(TRACK_CURVE)) { widgets[WIDX_LEFT_CURVE].type = WindowWidgetType::FlatBtn; widgets[WIDX_RIGHT_CURVE].type = WindowWidgetType::FlatBtn; - widgets[WIDX_LEFT_CURVE_SMALL].left = 6; - widgets[WIDX_LEFT_CURVE_SMALL].right = 27; widgets[WIDX_LEFT_CURVE_SMALL].image = ImageId(SPR_RIDE_CONSTRUCTION_LEFT_CURVE_SMALL); - widgets[WIDX_RIGHT_CURVE_SMALL].left = 138; - widgets[WIDX_RIGHT_CURVE_SMALL].right = 159; widgets[WIDX_RIGHT_CURVE_SMALL].image = ImageId(SPR_RIDE_CONSTRUCTION_RIGHT_CURVE_SMALL); } if (IsTrackEnabled(TRACK_CURVE_SMALL)) @@ -1701,19 +1689,17 @@ public: _currentTrackLiftHill |= CONSTRUCTION_LIFT_HILL_SELECTED; } - int32_t x; if ((IsTrackEnabled(TRACK_LIFT_HILL) && (_currentTrackCurve & RideConstructionSpecialPieceSelected) == 0) || (gCheatsEnableChainLiftOnAllTrack && currentRide->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_HAS_TRACK))) { widgets[WIDX_CHAIN_LIFT].type = WindowWidgetType::FlatBtn; - x = 9; } else { widgets[WIDX_CHAIN_LIFT].type = WindowWidgetType::Empty; - x = 23; } + int32_t x = 45; for (int32_t i = WIDX_SLOPE_DOWN_STEEP; i <= WIDX_SLOPE_UP_STEEP; i++) { widgets[i].left = x; @@ -1813,20 +1799,20 @@ public: widgets[WIDX_BANKING_GROUPBOX].image = ImageId(STR_RIDE_CONSTRUCTION_ROLL_BANKING); widgets[WIDX_BANK_LEFT].image = ImageId(SPR_RIDE_CONSTRUCTION_LEFT_BANK); widgets[WIDX_BANK_LEFT].tooltip = STR_RIDE_CONSTRUCTION_ROLL_FOR_LEFT_CURVE_TIP; - widgets[WIDX_BANK_LEFT].left = 47; - widgets[WIDX_BANK_LEFT].right = 70; + widgets[WIDX_BANK_LEFT].left = 69; + widgets[WIDX_BANK_LEFT].right = 92; widgets[WIDX_BANK_LEFT].top = 132; widgets[WIDX_BANK_LEFT].bottom = 155; widgets[WIDX_BANK_STRAIGHT].image = ImageId(SPR_RIDE_CONSTRUCTION_NO_BANK); widgets[WIDX_BANK_STRAIGHT].tooltip = STR_RIDE_CONSTRUCTION_NO_ROLL_TIP; - widgets[WIDX_BANK_STRAIGHT].left = 71; - widgets[WIDX_BANK_STRAIGHT].right = 94; + widgets[WIDX_BANK_STRAIGHT].left = 93; + widgets[WIDX_BANK_STRAIGHT].right = 116; widgets[WIDX_BANK_STRAIGHT].top = 132; widgets[WIDX_BANK_STRAIGHT].bottom = 155; widgets[WIDX_BANK_RIGHT].image = ImageId(SPR_RIDE_CONSTRUCTION_RIGHT_BANK); widgets[WIDX_BANK_RIGHT].tooltip = STR_RIDE_CONSTRUCTION_ROLL_FOR_RIGHT_CURVE_TIP; - widgets[WIDX_BANK_RIGHT].left = 95; - widgets[WIDX_BANK_RIGHT].right = 118; + widgets[WIDX_BANK_RIGHT].left = 117; + widgets[WIDX_BANK_RIGHT].right = 140; widgets[WIDX_BANK_RIGHT].top = 132; widgets[WIDX_BANK_RIGHT].bottom = 155; widgets[WIDX_BANK_LEFT].type = WindowWidgetType::Empty; @@ -1918,8 +1904,8 @@ public: hold_down_widgets |= (1uLL << WIDX_SPEED_SETTING_SPINNER_UP) | (1uLL << WIDX_SPEED_SETTING_SPINNER_DOWN); } - static constexpr int16_t bankingGroupboxRightNoSeatRotation = 162; - static constexpr int16_t bankingGroupboxRightWithSeatRotation = 92; + static constexpr int16_t bankingGroupboxRightNoSeatRotation = GW; + static constexpr int16_t bankingGroupboxRightWithSeatRotation = 114; widgets[WIDX_BANKING_GROUPBOX].right = bankingGroupboxRightNoSeatRotation; widgets[WIDX_SEAT_ROTATION_GROUPBOX].type = WindowWidgetType::Empty; From 8db5b655bd4e9cc265cc3e36440d511ead22e182 Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Sat, 23 Dec 2023 14:40:59 +0100 Subject: [PATCH 2/2] Add icons for medium curves --- resources/g2/icons/medium-curve-left.png | Bin 0 -> 1049 bytes resources/g2/icons/medium-curve-right.png | Bin 0 -> 1052 bytes resources/g2/sprites.json | 10 ++++++++++ src/openrct2-ui/windows/RideConstruction.cpp | 10 ++-------- src/openrct2/sprites.h | 5 ++++- 5 files changed, 16 insertions(+), 9 deletions(-) create mode 100644 resources/g2/icons/medium-curve-left.png create mode 100644 resources/g2/icons/medium-curve-right.png diff --git a/resources/g2/icons/medium-curve-left.png b/resources/g2/icons/medium-curve-left.png new file mode 100644 index 0000000000000000000000000000000000000000..c59ca8a65eda110245a3c90340bd201fe025704f GIT binary patch literal 1049 zcmWktVQ3p=7=GKdyR>nh5+P+N2F;Hf-ezoXU4Gn;(_L%Up7y$3ZG_;?d3Hep-t2V* z40341OoKfkXc%z>IVG?YGpTZ5kPHr%Vy4$ENGhiUNikr5oHJsDik}(0&-?QHc^)1f z-glQ4V~59&j03>o`O~v!2iHHq176QyTSvZH0`S1nGs|-WIy5viJUs02ct%D>Mn^{v z9XfZ&qcek?T47zH7yTAd-+~ zKohWvjMejayW;ORgQyoleGwgK2w7nO9zet}8OPONP$LMPrZ;)MkxaH#b+24T^?H!< zhnYZx578nKlgYSBNgAz`*sQ@7YJ%PrO(z+O1|zXBEs&fPO~|aA<8x)PY|5ssT28_4 zRXY21oB_W8fh2@7KxkOB9EeqkM4gfCc)p|Pu4bW4p7cx6U^+(T<8(!0Yl>iJrFK#2 z8dW!Z%}%T3x-NpC3`7y5DmYsU3QaQE zVRPMt-b>e9t<|sg4%++3N8)%i5Qv4s0vVBLTH*MdI1tNJ^MyvG>R5Ka!+^+Pih!$P zNK28W3}fVkS}EBu)ONkpYg_&P9%2CE01AKxU;s1#x)`9r@GQzG$k36~<_VA~C@^5g zz~KQ2faCzmQ%L8LnL^DRa&)*?d=xkq;yjj;0&1EpXt9be)oNMWHhMi94ZMO$pfWy2 z3-EeKGzrH&P7^0 z*^7sf7(yz6N)$2~WOE3it)Jc;yZ{WXpIsE-$=`M^49NWJ%g?V1@`d&E`L$I5@0EV! z^!L8C`={=lIZAC)x2e|5^z_R16a3W4g%dOU*VmV~Y~hb*j~!n)zRc-5Up3CPS9ltyI_sM$!=jRq@zc}^c GTmJ)b^~DbW literal 0 HcmV?d00001 diff --git a/resources/g2/icons/medium-curve-right.png b/resources/g2/icons/medium-curve-right.png new file mode 100644 index 0000000000000000000000000000000000000000..41466c32f81c57439d48da95efeb3ae0b89bb437 GIT binary patch literal 1052 zcmWlYZ)h8J7{{Ofy|i_^X@rahjG7lGoHK6MdEyCIy^gfK*=u{%C;@NV*#(vtH+wA^ z9-3)}nFhHRLBfm>^g1HmTx6Zxi@b<(NQ$Xky9k-yi@b;!WiKM+MT8dAo4D3Zwc+I29fKpW7&E2tfpjdS%S1_~b~0S85NlKvx1Q~~#-L|MgCLQR zVnG+NvVzrec&qI1H-e}eL464w>Im6k00BV4Fa^ic!JtkM2E*(KLOqdarPB{eB~+^g zDSwy^M1&9{5mAMVr72lw)FPKL`FvG08j|HELUb?^4KpIi%XD1fl&p{~NhM3MoV4xc zoo=~3sNpR5MF=DyqyeF0bSV(65b+wTII&z?HF~;@b_CKd)4^1f%*B|p%vDv<$;hpO z+A%Y|T4CUrsAJ=Pnjm8oonX0?DCT6jm`YW0xmu~@SXR5)?DcvGf(j4?j4IarF+;KpeYi^=|CVF3X5b!W*C(hvXW<}RdV@yx#HSRzs-WgW2%U! zrI4N^iyCWY#cDB8H`A?JvD>oy{RfBzhykboI)DjK2k2mcyb?I1smL^t+Y$&+D9E#5 zMZpySiGY*<%2CJ=kd;J@EOHI_A3O~_2QdLl%7Ju>%eOrd&k84>Tbwy9eE03zt|R{a%F`znPb@a}_`QRb%WrQ@ zZnZ|?<~n}upLaih)HB^$n0smM_^0dp{L$|p_l+(KGZVWoVBa`+@9sCZubhAA-fu6= z9zJ&M-(x@E!}Hn`=k~Uh>(|c?zQi7WlfJ;cwesQ4otYoEFa7k@ozLzo(_cJuDey`C z#pvjTU-HjazrMP9SztF_o&EiWeM^WlQ2qGNo^eI_3%0L5dECDBh{xQEb!KVq_RHr! F_zzcz!4Uue literal 0 HcmV?d00001 diff --git a/resources/g2/sprites.json b/resources/g2/sprites.json index 3960d54df4..e56820f989 100644 --- a/resources/g2/sprites.json +++ b/resources/g2/sprites.json @@ -24898,5 +24898,15 @@ "x_offset": -5, "y_offset": -20, "palette": "keep" + }, + { + "path": "icons/medium-curve-left.png", + "x_offset": 2, + "y_offset": 6 + }, + { + "path": "icons/medium-curve-right.png", + "x_offset": 1, + "y_offset": 6 } ] diff --git a/src/openrct2-ui/windows/RideConstruction.cpp b/src/openrct2-ui/windows/RideConstruction.cpp index acc5d5b6f5..edafa90f56 100644 --- a/src/openrct2-ui/windows/RideConstruction.cpp +++ b/src/openrct2-ui/windows/RideConstruction.cpp @@ -118,13 +118,13 @@ static Widget _rideConstructionWidgets[] = { MakeWidget ({ 3, 76}, { GW, 41}, WindowWidgetType::Groupbox, WindowColour::Primary , STR_RIDE_CONSTRUCTION_SLOPE ), MakeWidget ({ 3, 120}, { GW, 41}, WindowWidgetType::Groupbox, WindowColour::Primary , STR_RIDE_CONSTRUCTION_ROLL_BANKING ), MakeWidget ({ 6, 29}, { 22, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_LEFT_CURVE_SMALL), STR_RIDE_CONSTRUCTION_LEFT_CURVE_VERY_SMALL_TIP ), - MakeWidget ({ 28, 29}, { 22, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_LEFT_CURVE_SMALL), STR_RIDE_CONSTRUCTION_LEFT_CURVE_SMALL_TIP ), + MakeWidget ({ 28, 29}, { 22, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_G2_ICON_MEDIUM_CURVE_LEFT), STR_RIDE_CONSTRUCTION_LEFT_CURVE_SMALL_TIP ), MakeWidget ({ 50, 29}, { 22, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_LEFT_CURVE), STR_RIDE_CONSTRUCTION_LEFT_CURVE_TIP ), MakeWidget ({ 72, 29}, { 22, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_LEFT_CURVE_LARGE), STR_RIDE_CONSTRUCTION_LEFT_CURVE_LARGE_TIP ), MakeWidget ({ 94, 29}, { 22, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_STRAIGHT), STR_RIDE_CONSTRUCTION_STRAIGHT_TIP ), MakeWidget ({116, 29}, { 22, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_RIGHT_CURVE_LARGE), STR_RIDE_CONSTRUCTION_RIGHT_CURVE_LARGE_TIP ), MakeWidget ({138, 29}, { 22, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_RIGHT_CURVE), STR_RIDE_CONSTRUCTION_RIGHT_CURVE_TIP ), - MakeWidget ({160, 29}, { 22, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_RIGHT_CURVE_SMALL), STR_RIDE_CONSTRUCTION_RIGHT_CURVE_SMALL_TIP ), + MakeWidget ({160, 29}, { 22, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_G2_ICON_MEDIUM_CURVE_RIGHT), STR_RIDE_CONSTRUCTION_RIGHT_CURVE_SMALL_TIP ), MakeWidget ({182, 29}, { 22, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_RIGHT_CURVE_SMALL), STR_RIDE_CONSTRUCTION_RIGHT_CURVE_VERY_SMALL_TIP ), MakeWidget ({ 6, 55}, { GW - 6, 14}, WindowWidgetType::Button, WindowColour::Secondary, STR_YELLOW_STRING, STR_RIDE_CONSTRUCTION_OTHER_TRACK_CONFIGURATIONS_TIP), MakeWidget ({ 45, 88}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_RIDE_CONSTRUCTION_SLOPE_DOWN_STEEP), STR_RIDE_CONSTRUCTION_STEEP_SLOPE_DOWN_TIP ), @@ -1611,21 +1611,15 @@ public: widgets[WIDX_RIGHT_CURVE_SMALL].type = WindowWidgetType::Empty; widgets[WIDX_LEFT_CURVE_VERY_SMALL].type = WindowWidgetType::Empty; widgets[WIDX_RIGHT_CURVE_VERY_SMALL].type = WindowWidgetType::Empty; - widgets[WIDX_LEFT_CURVE_SMALL].image = ImageId(SPR_RIDE_CONSTRUCTION_LEFT_CURVE); - widgets[WIDX_RIGHT_CURVE_SMALL].image = ImageId(SPR_RIDE_CONSTRUCTION_RIGHT_CURVE); if (IsTrackEnabled(TRACK_CURVE_VERTICAL)) { widgets[WIDX_LEFT_CURVE_SMALL].type = WindowWidgetType::FlatBtn; - widgets[WIDX_LEFT_CURVE_SMALL].image = ImageId(SPR_RIDE_CONSTRUCTION_LEFT_CURVE_SMALL); widgets[WIDX_RIGHT_CURVE_SMALL].type = WindowWidgetType::FlatBtn; - widgets[WIDX_RIGHT_CURVE_SMALL].image = ImageId(SPR_RIDE_CONSTRUCTION_RIGHT_CURVE_SMALL); } if (IsTrackEnabled(TRACK_CURVE)) { widgets[WIDX_LEFT_CURVE].type = WindowWidgetType::FlatBtn; widgets[WIDX_RIGHT_CURVE].type = WindowWidgetType::FlatBtn; - widgets[WIDX_LEFT_CURVE_SMALL].image = ImageId(SPR_RIDE_CONSTRUCTION_LEFT_CURVE_SMALL); - widgets[WIDX_RIGHT_CURVE_SMALL].image = ImageId(SPR_RIDE_CONSTRUCTION_RIGHT_CURVE_SMALL); } if (IsTrackEnabled(TRACK_CURVE_SMALL)) { diff --git a/src/openrct2/sprites.h b/src/openrct2/sprites.h index 702db75546..e4a8b937d5 100644 --- a/src/openrct2/sprites.h +++ b/src/openrct2/sprites.h @@ -1497,7 +1497,10 @@ enum SPR_G2_ALPINE_LIFT_TRACK_GENTLE_DIAGONAL = SPR_G2_ALPINE_LIFT_TRACK_FLAT_DIAGONAL + 4, SPR_G2_ALPINE_END = SPR_G2_ALPINE_LIFT_TRACK_GENTLE_DIAGONAL + 12, - SPR_G2_END = SPR_G2_ALPINE_END, + SPR_G2_ICON_MEDIUM_CURVE_LEFT = SPR_G2_ALPINE_END, + SPR_G2_ICON_MEDIUM_CURVE_RIGHT, + + SPR_G2_END, SPR_CSG_BEGIN = SPR_G2_END, SPR_CSG_END = SPR_CSG_BEGIN + RCT1::Limits::Num_LL_CSG_Entries,