mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2025-04-28 21:37:58 +03:00
Fix "Disable Boost Filter" code not affecting certain parts of the game. (#1468)
* hook different part of the code to affect Eggmanland too * Update UnleashedRecomp/patches/misc_patches.cpp Co-authored-by: Skyth (Asilkan) <19259897+blueskythlikesclouds@users.noreply.github.com> --------- Co-authored-by: Skyth (Asilkan) <19259897+blueskythlikesclouds@users.noreply.github.com>
This commit is contained in:
parent
8ca5f1bf53
commit
d0cc13c2fd
2 changed files with 11 additions and 10 deletions
|
@ -157,12 +157,18 @@ PPC_FUNC(sub_824C1E60)
|
||||||
__imp__sub_824C1E60(ctx, base);
|
__imp__sub_824C1E60(ctx, base);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove boost filter
|
// This function is called in various places but primarily for the boost filter
|
||||||
void DisableBoostFilterMidAsmHook(PPCRegister& r11)
|
// when the second argument (r4) is set to "boost". Whilst boosting the third argument (f1)
|
||||||
|
// will go up to 1.0f and then down to 0.0f as the player lets off of the boost button.
|
||||||
|
// To avoid the boost filter from kicking in at all if the function is called with "boost"
|
||||||
|
// we set the third argument to zero no matter what (if the code is on).
|
||||||
|
PPC_FUNC_IMPL(__imp__sub_82B4DB48);
|
||||||
|
PPC_FUNC(sub_82B4DB48)
|
||||||
{
|
{
|
||||||
if (Config::DisableBoostFilter)
|
if (Config::DisableBoostFilter && strcmp((const char*)(base + ctx.r4.u32), "boost") == 0)
|
||||||
{
|
{
|
||||||
if (r11.u32 == 1)
|
ctx.f1.f64 = 0.0;
|
||||||
r11.u32 = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__imp__sub_82B4DB48(ctx, base);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1101,11 +1101,6 @@ name = "ObjGrindDashPanelAllocMidAsmHook"
|
||||||
address = 0x82614948
|
address = 0x82614948
|
||||||
registers = ["r3"]
|
registers = ["r3"]
|
||||||
|
|
||||||
[[midasm_hook]]
|
|
||||||
name = "DisableBoostFilterMidAsmHook"
|
|
||||||
address = 0x82B48C9C
|
|
||||||
registers = ["r11"]
|
|
||||||
|
|
||||||
[[midasm_hook]]
|
[[midasm_hook]]
|
||||||
name = "UseAlternateTitleMidAsmHook"
|
name = "UseAlternateTitleMidAsmHook"
|
||||||
address = 0x82580F44
|
address = 0x82580F44
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue