File tree Expand file tree Collapse file tree 3 files changed +42
-0
lines changed Expand file tree Collapse file tree 3 files changed +42
-0
lines changed Original file line number Diff line number Diff line change @@ -118,6 +118,9 @@ class Mod
118
118
// Display all menus inside of the Pause Menu
119
119
void pauseMenuDisplayAllMenus ();
120
120
121
+ // Display Sequence Position in the Pause Menu
122
+ void pauseMenuDisplaySequence ();
123
+
121
124
// Button Input Display
122
125
void buttonInputDisplay ();
123
126
uint32_t mButtonInputDisplayCounter ;
Original file line number Diff line number Diff line change
1
+ #include " mod.h"
2
+
3
+ #include < ttyd/mariost.h>
4
+ #include < ttyd/swdrv.h>
5
+ #include < ttyd/fontmgr.h>
6
+
7
+ #include < cstdio>
8
+
9
+ extern uint32_t PauseMenuAddressesStart;
10
+
11
+ namespace mod {
12
+
13
+ void Mod::pauseMenuDisplaySequence ()
14
+ {
15
+ uint32_t PauseMenuAddress = *reinterpret_cast <uint32_t *>(PauseMenuAddressesStart);
16
+ uint32_t CurrentTab = *reinterpret_cast <uint32_t *>(PauseMenuAddress + 0x40 );
17
+ uint32_t CurrentMenu = *reinterpret_cast <uint32_t *>(PauseMenuAddress + 0x24 );
18
+
19
+ if ((ttyd::mariost::marioStGetSystemLevel () == 15 ) && (CurrentTab == 0 ) && ((CurrentMenu == 10 ) || ((CurrentMenu == 11 ))))
20
+ {
21
+ // Currently in the pause menu and Current Tab is Mario's stats
22
+ uint32_t SequencePosition = ttyd::swdrv::swByteGet (0 );
23
+
24
+ sprintf (mDisplayBuffer ,
25
+ " Seq: %lu" ,
26
+ SequencePosition);
27
+
28
+ ttyd::fontmgr::FontDrawStart ();
29
+ uint32_t color = 0xFFFFFFFF ;
30
+ ttyd::fontmgr::FontDrawColor (reinterpret_cast <uint8_t *>(&color));
31
+ ttyd::fontmgr::FontDrawEdge ();
32
+ ttyd::fontmgr::FontDrawMessage (80 , 50 , mDisplayBuffer );
33
+ }
34
+ }
35
+
36
+ }
Original file line number Diff line number Diff line change @@ -85,6 +85,9 @@ void Mod::updateEarly()
85
85
// --Codes (With Display)--
86
86
reinterpret_cast <Mod *>(user)->onScreenTimer ();
87
87
reinterpret_cast <Mod *>(user)->buttonInputDisplay ();
88
+
89
+ // --Misc--
90
+ reinterpret_cast <Mod *>(user)->pauseMenuDisplaySequence ();
88
91
}, this );
89
92
90
93
// Call original function
You can’t perform that action at this time.
0 commit comments