From ce95692d8a2229d60755c4489ea30a3fee35bce1 Mon Sep 17 00:00:00 2001 From: Hyper <34012267+hyperbx@users.noreply.github.com> Date: Thu, 17 Oct 2024 22:21:36 +0100 Subject: [PATCH] Implemented hooks for disabling hints --- UnleashedRecomp/game.cpp | 5 +++++ UnleashedRecompLib/config/SWA.toml | 14 +++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/UnleashedRecomp/game.cpp b/UnleashedRecomp/game.cpp index 6acd3d9..839c2f0 100644 --- a/UnleashedRecomp/game.cpp +++ b/UnleashedRecomp/game.cpp @@ -72,6 +72,11 @@ void CSDOffsetMidAsmHook(PPCRegister& f1, PPCRegister& f2) } } +bool DisableHintsMidAsmHook() +{ + return !Config::Hints; +} + /* Hook function that gets the game region and force result to zero for Japanese to display the correct logos. */ diff --git a/UnleashedRecompLib/config/SWA.toml b/UnleashedRecompLib/config/SWA.toml index 8646af7..53dded8 100644 --- a/UnleashedRecompLib/config/SWA.toml +++ b/UnleashedRecompLib/config/SWA.toml @@ -130,4 +130,16 @@ registers = ["f1", "f2"] name = "CSDOffsetMidAsmHook" address = 0x830C0A78 registers = ["f1", "f2"] -return = true \ No newline at end of file +return = true + +# Disable hint volumes +[[midasm_hook]] +name = "DisableHintsMidAsmHook" +address = 0x827A2504 +jump_address_on_true = 0x827A251C + +# Disable hint rings +[[midasm_hook]] +name = "DisableHintsMidAsmHook" +address = 0x827A2E34 +jump_address_on_true = 0x827A2E4C \ No newline at end of file