Skip to content

Commit 676843a

Browse files
committed
Removed the FixRoomProblems assembly file
1 parent 27fedb2 commit 676843a

File tree

2 files changed

+6
-17
lines changed

2 files changed

+6
-17
lines changed

ttyd-tools/rel/source/assembly/FixRoomProblems.s

Lines changed: 0 additions & 11 deletions
This file was deleted.

ttyd-tools/rel/source/main.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ extern "C"
5252
void BranchBackPreventTextboxSelection();
5353
void StartPreventJumpAndHammer();
5454
void BranchBackPreventJumpAndHammer();
55-
void StartFixRoomProblems();
56-
void BranchBackFixRoomProblems();
5755
void StartDisableDPadOptionsDisplay();
5856
void BranchBackDisableDPadOptionsDisplay();
5957
}
@@ -158,7 +156,7 @@ void preventTextboxOptionSelection(char *currentText, void *storeAddress,
158156
reinterpret_cast<uint32_t>(storeAddress) + 0x9C) = NewOption;
159157
}
160158

161-
void fixRoomProblems()
159+
uint32_t fixRoomProblems()
162160
{
163161
// Prevent the game from crashing if the player entered las_08 with the Sequence as 385 and GSW(1121) at 7
164162
if (compareStringToNextMap("las_08"))
@@ -176,6 +174,9 @@ void fixRoomProblems()
176174
}
177175
}
178176
}
177+
178+
// The overwritten instruction sets r3 to 512, so return 512
179+
return 512;
179180
}
180181

181182
const char *replaceJumpFallAnim(char *jumpFallString)
@@ -660,16 +661,15 @@ void initAddressOverwrites()
660661
writeStandardBranch(PreventTextboxSelectionAddress,
661662
StartPreventTextboxSelection, BranchBackPreventTextboxSelection);
662663

663-
writeStandardBranch(FixRoomProblemsAddress,
664-
StartFixRoomProblems, BranchBackFixRoomProblems);
665-
666664
writeStandardBranch(DisableDPadOptionsDisplayAddress,
667665
StartDisableDPadOptionsDisplay, BranchBackDisableDPadOptionsDisplay);
668666

669667
patch::writeBranch(PreventPreBattleSoftlockAddress, reinterpret_cast<void *>(preventPreBattleSoftlock));
670668

671669
patch::writeBranch(ArtAttackHitboxesAddress, reinterpret_cast<void *>(displayArtAttackHitboxes));
672670

671+
patch::writeBranchLR(FixRoomProblemsAddress, reinterpret_cast<void *>(fixRoomProblems));
672+
673673
*reinterpret_cast<uint32_t *>(DebugModeInitialzeAddress) = 0x3800FFFF; // li r0,-1
674674
*reinterpret_cast<uint32_t *>(DebugModeShowBuildDateAddress) = 0x60000000; // nop
675675

0 commit comments

Comments
 (0)