From 9b36513be822e9f5aa8e9a374a5b90d63b952573 Mon Sep 17 00:00:00 2001 From: Phlex Date: Fri, 8 Mar 2024 13:30:10 -0600 Subject: [PATCH] Adjust children to let them do hide and seek with correct mask counts. --- code/mm.ld | 2 +- code/source/asm/hooks.s | 4 ++-- code/source/rnd/savefile.cpp | 7 +------ 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/code/mm.ld b/code/mm.ld index e0ca5442..157a77b8 100644 --- a/code/mm.ld +++ b/code/mm.ld @@ -415,7 +415,7 @@ SECTIONS{ *(.patch_OverrideProgessiveWalletTwo) } - .patch_CheckMasksOnMoon 0x52293C : { + .patch_CheckMasksOnMoon 0x46AA48 : { *(.patch_CheckMasksOnMoonOne) } diff --git a/code/source/asm/hooks.s b/code/source/asm/hooks.s index 97693e4b..199640cc 100644 --- a/code/source/asm/hooks.s +++ b/code/source/asm/hooks.s @@ -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 diff --git a/code/source/rnd/savefile.cpp b/code/source/rnd/savefile.cpp index 4be010f0..5b1b61e3 100644 --- a/code/source/rnd/savefile.cpp +++ b/code/source/rnd/savefile.cpp @@ -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(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