Fix Homing Attack on Jump not affecting Cool Edge Act 3 (Day) (#904)

This commit is contained in:
Hyper
2025-03-07 01:54:17 +00:00
committed by GitHub
parent c64ef1fe15
commit a9e280e116
3 changed files with 19 additions and 7 deletions
+12
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)
@@ -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)
+7
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"