@@ -738,20 +738,23 @@ void initAddressOverwrites()
738
738
739
739
patch::writeBranchBL (FallThroughMostObjectsBowserAddress, reinterpret_cast <void *>(StartFallThroughMostObjectsBowser));
740
740
741
- *reinterpret_cast <uint32_t *>(DebugModeInitialzeAddress) = 0x3800FFFF ; // li r0,-1
742
- *reinterpret_cast <uint32_t *>(DebugModeShowBuildDateAddress) = 0x60000000 ; // nop
741
+ patch::overwriteAddressValue (DebugModeInitialzeAddress, 0x3800FFFF ); // li r0,-1
743
742
744
- *reinterpret_cast <uint32_t *>(PauseMenuPartnerMenuAddress) = 0x60000000 ; // nop
745
- *reinterpret_cast <uint32_t *>(PauseMenuBadgeMenuAddress) = 0x60000000 ; // nop
743
+ patch::overwriteAddressValue (DebugModeShowBuildDateAddress, 0x60000000 ); // nop
746
744
747
- * reinterpret_cast < uint32_t *>(PreventImportantItemCutscenesAddress) = 0x48000030 ; // b 0x30
745
+ patch::overwriteAddressValue (PauseMenuPartnerMenuAddress, 0x60000000 ) ; // nop
748
746
749
- *reinterpret_cast <uint32_t *>(msgWindowMrAddress) = 0x38830001 ; // addi r4,r3,1
747
+ patch::overwriteAddressValue (PauseMenuBadgeMenuAddress, 0x60000000 ); // nop
748
+
749
+ patch::overwriteAddressValue (PreventImportantItemCutscenesAddress, 0x48000030 ); // b 0x30
750
+
751
+ patch::overwriteAddressValue (msgWindowMrAddress, 0x38830001 ); // addi r4,r3,1
750
752
751
753
// Set the initial value for the debug mode variable
752
- *reinterpret_cast <int32_t *>(
753
- reinterpret_cast <uint32_t >(
754
- ttyd::seq_title::seqTitleWorkPointer2) + 0x30 ) = -1 ;
754
+ int32_t *DebugModeVar = reinterpret_cast <int32_t *>(
755
+ reinterpret_cast <uint32_t >(ttyd::seq_title::seqTitleWorkPointer2) + 0x30 );
756
+
757
+ patch::overwriteAddressValue (DebugModeVar, static_cast <uint32_t >(-1 ));
755
758
}
756
759
757
760
void Mod::run ()
0 commit comments