@@ -52,8 +52,6 @@ extern "C"
52
52
void BranchBackPreventTextboxSelection ();
53
53
void StartPreventJumpAndHammer ();
54
54
void BranchBackPreventJumpAndHammer ();
55
- void StartFixRoomProblems ();
56
- void BranchBackFixRoomProblems ();
57
55
void StartDisableDPadOptionsDisplay ();
58
56
void BranchBackDisableDPadOptionsDisplay ();
59
57
}
@@ -158,7 +156,7 @@ void preventTextboxOptionSelection(char *currentText, void *storeAddress,
158
156
reinterpret_cast <uint32_t >(storeAddress) + 0x9C ) = NewOption;
159
157
}
160
158
161
- void fixRoomProblems ()
159
+ uint32_t fixRoomProblems ()
162
160
{
163
161
// Prevent the game from crashing if the player entered las_08 with the Sequence as 385 and GSW(1121) at 7
164
162
if (compareStringToNextMap (" las_08" ))
@@ -176,6 +174,9 @@ void fixRoomProblems()
176
174
}
177
175
}
178
176
}
177
+
178
+ // The overwritten instruction sets r3 to 512, so return 512
179
+ return 512 ;
179
180
}
180
181
181
182
const char *replaceJumpFallAnim (char *jumpFallString)
@@ -660,16 +661,15 @@ void initAddressOverwrites()
660
661
writeStandardBranch (PreventTextboxSelectionAddress,
661
662
StartPreventTextboxSelection, BranchBackPreventTextboxSelection);
662
663
663
- writeStandardBranch (FixRoomProblemsAddress,
664
- StartFixRoomProblems, BranchBackFixRoomProblems);
665
-
666
664
writeStandardBranch (DisableDPadOptionsDisplayAddress,
667
665
StartDisableDPadOptionsDisplay, BranchBackDisableDPadOptionsDisplay);
668
666
669
667
patch::writeBranch (PreventPreBattleSoftlockAddress, reinterpret_cast <void *>(preventPreBattleSoftlock));
670
668
671
669
patch::writeBranch (ArtAttackHitboxesAddress, reinterpret_cast <void *>(displayArtAttackHitboxes));
672
670
671
+ patch::writeBranchLR (FixRoomProblemsAddress, reinterpret_cast <void *>(fixRoomProblems));
672
+
673
673
*reinterpret_cast <uint32_t *>(DebugModeInitialzeAddress) = 0x3800FFFF ; // li r0,-1
674
674
*reinterpret_cast <uint32_t *>(DebugModeShowBuildDateAddress) = 0x60000000 ; // nop
675
675
0 commit comments