@@ -670,8 +670,9 @@ void drawMarioSpecialMovesOptions()
670
670
drawText (HelpText, PosX, PosY, Alpha, Color, Scale);
671
671
672
672
// Set the values for the text to use
673
+ int32_t NewPosY = PosY - 54 ;
673
674
PosX += 25 ;
674
- PosY = 90 ;
675
+ PosY = NewPosY ;
675
676
676
677
// Set up array to use for displaying icons
677
678
int32_t IconPosition[3 ];
@@ -682,6 +683,7 @@ void drawMarioSpecialMovesOptions()
682
683
IconPosition[IconPositionY] = PosY - 18 ;
683
684
684
685
// Draw the icons and main text
686
+ uint32_t tempSecondaryMenuOption = SecondaryMenuOption;
685
687
int16_t SpecialMoveIcon;
686
688
687
689
for (uint32_t i = 0 ; i < 8 ; i++)
@@ -700,7 +702,7 @@ void drawMarioSpecialMovesOptions()
700
702
drawIconFromItem (IconPosition, SpecialMoveIcon, Scale);
701
703
702
704
// Draw the main text
703
- if (SecondaryMenuOption == i)
705
+ if (tempSecondaryMenuOption == i)
704
706
{
705
707
Color = 0x5B59DEFF ;
706
708
}
@@ -719,7 +721,7 @@ void drawMarioSpecialMovesOptions()
719
721
uint32_t PouchPtr = reinterpret_cast <uint32_t >(ttyd::mario_pouch::pouchGetPtr ());
720
722
int16_t SpecialMovesBits = *reinterpret_cast <int16_t *>(PouchPtr + 0x8C );
721
723
PosX += 130 ;
722
- PosY = 90 ;
724
+ PosY = NewPosY ;
723
725
724
726
for (uint32_t i = 0 ; i < 8 ; i++)
725
727
{
@@ -771,9 +773,11 @@ void drawFollowersOptions()
771
773
772
774
// Draw the main text
773
775
uint32_t tempStatsFollowerOptionsLinesSize = StatsFollowerOptionsLinesSize;
776
+ uint32_t tempSecondaryMenuOption = SecondaryMenuOption;
777
+
774
778
for (uint32_t i = 0 ; i < tempStatsFollowerOptionsLinesSize; i++)
775
779
{
776
- if (SecondaryMenuOption == i)
780
+ if (tempSecondaryMenuOption == i)
777
781
{
778
782
Color = 0x5B59DEFF ;
779
783
}
@@ -1469,9 +1473,11 @@ void drawMemoryTypeList()
1469
1473
1470
1474
// Draw the main text
1471
1475
uint32_t Size = MemoryTypeLinesSize;
1476
+ uint32_t tempSecondaryMenuOption = SecondaryMenuOption;
1477
+
1472
1478
for (uint32_t i = 0 ; i < Size; i++)
1473
1479
{
1474
- if (SecondaryMenuOption == i)
1480
+ if (tempSecondaryMenuOption == i)
1475
1481
{
1476
1482
Color = 0x5B59DEFF ;
1477
1483
}
@@ -2257,9 +2263,10 @@ void drawAdjustableValue(bool changingItem, uint32_t currentMenu)
2257
2263
}
2258
2264
2259
2265
// Draw each digit of the number
2266
+ uint32_t tempSecondaryMenuOption = SecondaryMenuOption;
2260
2267
for (uint32_t i = 0 ; i < AmountOfNumbers; i++)
2261
2268
{
2262
- if (SecondaryMenuOption == i)
2269
+ if (tempSecondaryMenuOption == i)
2263
2270
{
2264
2271
color = 0x5B59DEFF ;
2265
2272
}
@@ -2396,9 +2403,10 @@ void drawMemoryWatchAdjustableValue(uint32_t currentMenu)
2396
2403
drawText (" 0x" , (x - 30 ), y, alpha, color, scale);
2397
2404
2398
2405
// Draw each digit of the number
2406
+ uint32_t tempSecondaryMenuOption = SecondaryMenuOption;
2399
2407
for (uint32_t i = 0 ; i < AmountOfNumbers; i++)
2400
2408
{
2401
- if (SecondaryMenuOption == i)
2409
+ if (tempSecondaryMenuOption == i)
2402
2410
{
2403
2411
color = 0x5B59DEFF ;
2404
2412
}
@@ -2748,6 +2756,85 @@ void drawCheatsChangeSequence()
2748
2756
drawText (String, PosX, PosY, Alpha, Color, Scale);
2749
2757
}
2750
2758
2759
+ void drawCheatsCurrentYoshiColor ()
2760
+ {
2761
+ uint32_t Color = 0xFFFFFFFF ;
2762
+ uint8_t Alpha = 0xFF ;
2763
+ int32_t PosX = -232 ;
2764
+ int32_t PosY = 120 ;
2765
+ float Scale = 0.6 ;
2766
+
2767
+ // Get the current Yoshi color
2768
+ uint32_t CurrentColorId = getCurrentYoshiColorId ();
2769
+ const char *CurrentColorString = " " ;
2770
+
2771
+ // Make sure the current color is valid
2772
+ const uint32_t ColorIdWhite = 6 ;
2773
+ if (CurrentColorId <= ColorIdWhite)
2774
+ {
2775
+ CurrentColorString = CheatsYoshiColorOptionsLines[CurrentColorId];
2776
+ }
2777
+
2778
+ char *tempDisplayBuffer = DisplayBuffer;
2779
+ sprintf (tempDisplayBuffer,
2780
+ " Current Color: %s" ,
2781
+ CurrentColorString);
2782
+
2783
+ drawText (tempDisplayBuffer, PosX, PosY, Alpha, Color, Scale);
2784
+
2785
+ // Draw the text stating that the player must change partners for the new color to take effect
2786
+ const char *String = " You must swap partners for the new color to\n take effect" ;
2787
+ drawText (String, PosX, PosY - 40 , Alpha, Color, Scale);
2788
+ }
2789
+
2790
+ void drawCheatsChangeYoshiColorOptions ()
2791
+ {
2792
+ // Check for button inputs
2793
+ cheatChangeYoshiColorButtonControls ();
2794
+
2795
+ // Draw the window
2796
+ uint32_t Color = 0x151515F6 ;
2797
+ int32_t PosX = -106 ;
2798
+ int32_t PosY = 123 ;
2799
+ int32_t Width = 212 ;
2800
+ int32_t Height = 239 ;
2801
+ int32_t Curve = 20 ;
2802
+
2803
+ drawWindow (Color, PosX, PosY, Width, Height, Curve);
2804
+
2805
+ // Draw the help text
2806
+ const char *HelpText = " Press A to confirm\n Press B to cancel" ;
2807
+ uint8_t Alpha = 0xFF ;
2808
+ float Scale = 0.6 ;
2809
+ Color = 0xFFFFFFFF ;
2810
+ PosX += 30 ;
2811
+ PosY -= 25 ;
2812
+
2813
+ drawText (HelpText, PosX, PosY, Alpha, Color, Scale);
2814
+
2815
+ // Set the values for the text to use
2816
+ uint32_t tempSecondaryMenuOption = SecondaryMenuOption;
2817
+ PosX += 47 ;
2818
+ PosY -= 54 ;
2819
+
2820
+ uint32_t Size = CheatsYoshiColorOptionsLinesSize;
2821
+ for (uint32_t i = 0 ; i < Size; i++)
2822
+ {
2823
+ // Draw the main text
2824
+ if (tempSecondaryMenuOption == i)
2825
+ {
2826
+ Color = 0x5B59DEFF ;
2827
+ }
2828
+ else
2829
+ {
2830
+ Color = 0xFFFFFFFF ;
2831
+ }
2832
+
2833
+ drawText (CheatsYoshiColorOptionsLines[i], PosX, PosY, Alpha, Color, Scale);
2834
+ PosY -= 20 ;
2835
+ }
2836
+ }
2837
+
2751
2838
void drawCheatsBool (int32_t posY)
2752
2839
{
2753
2840
uint32_t tempMenuSelectedOption = MenuSelectedOption;
0 commit comments