Skip to content

Commit

Permalink
Adjust children to let them do hide and seek with correct mask counts.
Browse files Browse the repository at this point in the history
  • Loading branch information
PhlexPlexico committed Mar 8, 2024
1 parent 687ca44 commit 9b36513
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion code/mm.ld
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ SECTIONS{
*(.patch_OverrideProgessiveWalletTwo)
}

.patch_CheckMasksOnMoon 0x52293C : {
.patch_CheckMasksOnMoon 0x46AA48 : {
*(.patch_CheckMasksOnMoonOne)
}

Expand Down
4 changes: 2 additions & 2 deletions code/source/asm/hooks.s
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,10 @@ hook_EnteringLocation:

.global hook_CheckMasksOnMoon
hook_CheckMasksOnMoon:
push {r0-r12,lr}
push {r5-r12,lr}
bl CurrentMasksInInventory
cpy r4,r0
pop {r0-r3, r5-r12, lr}
pop {r5-r12, lr}
mov r0,#0x0
bx lr

Expand Down
7 changes: 1 addition & 6 deletions code/source/rnd/savefile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1043,11 +1043,6 @@ namespace rnd {
count += 1;
if (game::HasMask(game::ItemId::GiantMask))
count += 1;
// Function call to check what masks have been given on the moon.
u32 masksFromMoon = util::GetPointer<u32(u32)>(0x2F217C)(0);
#if defined ENABLE_DEBUG || defined DEBUG_PRINT
rnd::util::Print("%s: masksFromMoon is %u\n", __func__, masksFromMoon);
#endif
return count - masksFromMoon;
return count;
}
} // namespace rnd

0 comments on commit 9b36513

Please sign in to comment.