Fix Homing Attack on Jump not affecting Cool Edge Act 3 (Day) (#904)
Some checks failed
validate-internal / build (push) Failing after 14m58s

This commit is contained in:
Hyper 2025-03-07 01:54:17 +00:00 committed by GitHub
parent c64ef1fe15
commit a9e280e116
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 19 additions and 7 deletions

View file

@ -318,6 +318,18 @@ void PostureSpaceHurrierDPadSupportYMidAsmHook(PPCRegister& pPadState, PPCVRegis
vector.f32[3] = -1.0f;
}
void SetXButtonHomingMidAsmHook(PPCRegister& r1)
{
auto pXButtonHoming = (bool*)(g_memory.base + r1.u32 + 0x63);
*pXButtonHoming = !Config::HomingAttackOnJump;
}
bool IsHomingAttackOnJump()
{
return Config::HomingAttackOnJump;
}
// ------------- WORLD MAP ------------- //
bool WorldMapDeadzoneMidAsmHook(PPCRegister& pPadState)

View file

@ -95,13 +95,6 @@ void PostUnleashMidAsmHook(PPCRegister& r30)
g_isUnleashCancelled = false;
}
void SetXButtonHomingMidAsmHook(PPCRegister& r1)
{
auto pXButtonHoming = (bool*)(g_memory.base + r1.u32 + 0x63);
*pXButtonHoming = !Config::HomingAttackOnJump;
}
// SWA::Player::CEvilSonicContext
PPC_FUNC_IMPL(__imp__sub_823B49D8);
PPC_FUNC(sub_823B49D8)

View file

@ -197,11 +197,18 @@ address = 0x823A4FF0
registers = ["r4", "r5"]
return_on_false = true
# Set default value for XButtonHoming.
[[midasm_hook]]
name = "SetXButtonHomingMidAsmHook"
address = 0x8237AC90
registers = ["r1"]
# Disable XML reading for XButtonHoming.
[[midasm_hook]]
name = "IsHomingAttackOnJump"
address = 0x8237ACE4
jump_address_on_true = 0x8237ACE8
# Down force HFR fix
[[midasm_hook]]
name = "DownForceDeltaTimeFixMidAsmHook"