mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2025-10-30 07:11:05 +00:00
Implemented Werehog battle music toggle
This commit is contained in:
parent
43ec0797b0
commit
90b60ebc8d
2 changed files with 21 additions and 0 deletions
|
|
@ -212,9 +212,20 @@ bool DisableEvilControlTutorialMidAsmHook(PPCRegister& r4, PPCRegister& r5)
|
|||
if (Config::ControlTutorial)
|
||||
return true;
|
||||
|
||||
// Only allow enemy QTE prompts to get through.
|
||||
return r4.u32 == 1 && r5.u32 == 1;
|
||||
}
|
||||
|
||||
void WerehogBattleMusicMidAsmHook(PPCRegister& r3, PPCRegister& r11)
|
||||
{
|
||||
if (Config::WerehogBattleMusic)
|
||||
return;
|
||||
|
||||
// Swap CStateBattle for CStateNormal.
|
||||
if (r11.u8 == 4)
|
||||
r11.u8 = 3;
|
||||
}
|
||||
|
||||
void SetXButtonHomingMidAsmHook(PPCRegister& r30)
|
||||
{
|
||||
r30.u32 = Config::XButtonHoming;
|
||||
|
|
|
|||
|
|
@ -217,3 +217,13 @@ registers = ["r30"]
|
|||
name = "MovieRendererMidAsmHook"
|
||||
address = 0x82AE3200
|
||||
registers = ["r3"]
|
||||
|
||||
[[midasm_hook]]
|
||||
name = "WerehogBattleMusicMidAsmHook"
|
||||
address = 0x82B47278
|
||||
registers = ["r3", "r11"]
|
||||
|
||||
[[midasm_hook]]
|
||||
name = "WerehogBattleMusicMidAsmHook"
|
||||
address = 0x82B47728
|
||||
registers = ["r3", "r11"]
|
||||
Loading…
Add table
Reference in a new issue