@@ -1428,7 +1428,7 @@ void drawErrorMessage(const char *line)
1428
1428
1429
1429
int32_t TextPosX = -130 ;
1430
1430
// int32_t WindowWidth = 305;
1431
- uint16_t LineLength = ttyd::fontmgr::FontGetMessageWidth (line);
1431
+ uint32_t LineLength = ttyd::fontmgr::FontGetMessageWidth (line);
1432
1432
int32_t WindowWidth = 80 + (LineLength >> 1 ) - (LineLength % 10 );
1433
1433
drawErrorWindow (line, TextPosX, WindowWidth);
1434
1434
}
@@ -2551,7 +2551,7 @@ void drawPalaceSkipDetails()
2551
2551
PhantomEmberPosY,
2552
2552
PartnerPosY);
2553
2553
2554
- // uint16_t LineLength = ttyd::fontmgr::FontGetMessageWidth(tempDisplayBuffer);
2554
+ // uint32_t LineLength = ttyd::fontmgr::FontGetMessageWidth(tempDisplayBuffer);
2555
2555
// int32_t WindowWidth = 245 + (LineLength >> 1) - (LineLength % 10);
2556
2556
2557
2557
/* drawTextWithWindow(tempDisplayBuffer, PosX, PosY, Alpha, TextColor,
@@ -2593,8 +2593,8 @@ void drawActionCommandsTiming()
2593
2593
#endif
2594
2594
2595
2595
uint32_t MarioBattlePointer = reinterpret_cast <uint32_t >(getMarioBattlePointer ());
2596
- uint8_t SimplifiersEquipped = *reinterpret_cast <uint8_t *>(MarioBattlePointer + SimplifierOffset);
2597
- uint8_t UnsimplifiersEquipped = *reinterpret_cast <uint8_t *>(MarioBattlePointer + UnsimplifierOffset);
2596
+ uint32_t SimplifiersEquipped = *reinterpret_cast <uint8_t *>(MarioBattlePointer + SimplifierOffset);
2597
+ uint32_t UnsimplifiersEquipped = *reinterpret_cast <uint8_t *>(MarioBattlePointer + UnsimplifierOffset);
2598
2598
2599
2599
int32_t CommandDifficulty = UnsimplifiersEquipped - SimplifiersEquipped + 3 ;
2600
2600
if (CommandDifficulty < 0 )
@@ -2606,42 +2606,42 @@ void drawActionCommandsTiming()
2606
2606
CommandDifficulty = 6 ;
2607
2607
}
2608
2608
2609
- int8_t temp_Last_A_Frame = DisplayActionCommands.Last_A_Frame ;
2610
- int8_t temp_Last_B_Frame = DisplayActionCommands.Last_B_Frame ;
2609
+ int32_t temp_Last_A_Frame = DisplayActionCommands.Last_A_Frame ;
2610
+ int32_t temp_Last_B_Frame = DisplayActionCommands.Last_B_Frame ;
2611
2611
2612
- uint8_t TypeToDraw = DisplayActionCommands.TypeToDraw ;
2612
+ int32_t TypeToDraw = DisplayActionCommands.TypeToDraw ;
2613
2613
const char *TextToDraw;
2614
2614
char *tempDisplayBuffer = DisplayBuffer;
2615
2615
2616
- const int8_t SuccessfulTiming = 0 ;
2617
- const int8_t PressedTooManyButtons = 1 ;
2618
- const int8_t PressedTooEarly = 2 ;
2616
+ const int32_t SuccessfulTiming = 0 ;
2617
+ const int32_t PressedTooManyButtons = 1 ;
2618
+ const int32_t PressedTooEarly = 2 ;
2619
2619
2620
2620
// Check to see which text should be displayed
2621
2621
switch (TypeToDraw)
2622
2622
{
2623
2623
case SuccessfulTiming:
2624
2624
{
2625
- int8_t CurrentDifficultyFrames;
2626
- int8_t FramePressed;
2627
- const char *String ;
2625
+ int32_t CurrentDifficultyFrames;
2626
+ int32_t FramePressed;
2627
+ char Button ;
2628
2628
2629
- if (temp_Last_B_Frame > -1 )
2629
+ if (temp_Last_A_Frame > -1 )
2630
2630
{
2631
- CurrentDifficultyFrames = SuperguardFrames [CommandDifficulty];
2632
- FramePressed = CurrentDifficultyFrames - temp_Last_B_Frame ;
2633
- String = " B " ;
2631
+ CurrentDifficultyFrames = GuardFrames [CommandDifficulty];
2632
+ FramePressed = CurrentDifficultyFrames - temp_Last_A_Frame ;
2633
+ Button = ' A ' ;
2634
2634
}
2635
2635
else
2636
2636
{
2637
- CurrentDifficultyFrames = GuardFrames [CommandDifficulty];
2638
- FramePressed = CurrentDifficultyFrames - temp_Last_A_Frame ;
2639
- String = " A " ;
2637
+ CurrentDifficultyFrames = SuperguardFrames [CommandDifficulty];
2638
+ FramePressed = CurrentDifficultyFrames - temp_Last_B_Frame ;
2639
+ Button = ' B ' ;
2640
2640
}
2641
2641
2642
2642
sprintf (tempDisplayBuffer,
2643
- " Pressed %s on frame %d of %d " ,
2644
- String ,
2643
+ " Pressed %c on frame %ld of %ld " ,
2644
+ Button ,
2645
2645
FramePressed,
2646
2646
CurrentDifficultyFrames);
2647
2647
@@ -2655,21 +2655,21 @@ void drawActionCommandsTiming()
2655
2655
}
2656
2656
case PressedTooEarly:
2657
2657
{
2658
- int8_t CurrentDifficultyFrames;
2659
- int8_t FramesEarly;
2660
- const char *String ;
2658
+ int32_t CurrentDifficultyFrames;
2659
+ int32_t FramesEarly;
2660
+ char Button ;
2661
2661
2662
- if (temp_Last_B_Frame > -1 )
2662
+ if (temp_Last_A_Frame > -1 )
2663
2663
{
2664
- CurrentDifficultyFrames = SuperguardFrames [CommandDifficulty];
2665
- FramesEarly = temp_Last_B_Frame - CurrentDifficultyFrames + 1 ;
2666
- String = " B " ;
2664
+ CurrentDifficultyFrames = GuardFrames [CommandDifficulty];
2665
+ FramesEarly = temp_Last_A_Frame - CurrentDifficultyFrames + 1 ;
2666
+ Button = ' A ' ;
2667
2667
}
2668
2668
else
2669
2669
{
2670
- CurrentDifficultyFrames = GuardFrames [CommandDifficulty];
2671
- FramesEarly = temp_Last_A_Frame - CurrentDifficultyFrames + 1 ;
2672
- String = " A " ;
2670
+ CurrentDifficultyFrames = SuperguardFrames [CommandDifficulty];
2671
+ FramesEarly = temp_Last_B_Frame - CurrentDifficultyFrames + 1 ;
2672
+ Button = ' B ' ;
2673
2673
}
2674
2674
2675
2675
const char *CheckForPlural;
@@ -2683,8 +2683,8 @@ void drawActionCommandsTiming()
2683
2683
}
2684
2684
2685
2685
sprintf (tempDisplayBuffer,
2686
- " Pressed %s %d frame%s early" ,
2687
- String ,
2686
+ " Pressed %c %ld frame%s early" ,
2687
+ Button ,
2688
2688
FramesEarly,
2689
2689
CheckForPlural);
2690
2690
@@ -2703,10 +2703,13 @@ void drawActionCommandsTiming()
2703
2703
uint8_t Alpha = 0xFF ;
2704
2704
int32_t TextPosX = -232 ;
2705
2705
int32_t TextPosY = -105 ;
2706
- int32_t WindowWidth = 320 ;
2706
+ // int32_t WindowWidth = 320;
2707
2707
int32_t WindowCurve = 10 ;
2708
2708
float Scale = 0.75 ;
2709
2709
2710
+ uint32_t LineLength = ttyd::fontmgr::FontGetMessageWidth (TextToDraw);
2711
+ int32_t WindowWidth = 129 + (LineLength >> 1 ) - (LineLength % 10 );
2712
+
2710
2713
drawTextWithWindow (TextToDraw, TextPosX, TextPosY, Alpha, TextColor,
2711
2714
Scale, WindowWidth, WindowColor, WindowCurve);
2712
2715
@@ -2737,7 +2740,7 @@ void drawTitleScreenInfo()
2737
2740
PosX += 113 ;
2738
2741
PosY -= 14 ;
2739
2742
2740
- const char *String = " Practice Codes v3.0.6 \n Created by Zephiles" ;
2743
+ const char *String = " Practice Codes v3.0.7 \n Created by Zephiles" ;
2741
2744
drawText (String, PosX, PosY, Alpha, TextColor, Scale);
2742
2745
}
2743
2746
0 commit comments