diff --git a/MarathonRecomp/patches/player_patches.cpp b/MarathonRecomp/patches/player_patches.cpp index 5401308c4..e4b169a90 100644 --- a/MarathonRecomp/patches/player_patches.cpp +++ b/MarathonRecomp/patches/player_patches.cpp @@ -184,6 +184,20 @@ bool ControllableSpinkick() return Config::ControllableSpinkick; } +bool RestoreChaosSpearFlips() +{ + return Config::RestoreChaosSpearFlips; +} + +void RestoreChaosBoostJump(PPCRegister& r10, PPCRegister& r11) +{ + if (!Config::RestoreChaosBoostJump) + return; + + r10.u32 = 1; + r11.u32 = 2; +} + bool RestoreChainJumpFlips1(PPCRegister& f3, PPCRegister& r1) { if (Config::RestoreChainJumpFlips) diff --git a/MarathonRecomp/user/config_def.h b/MarathonRecomp/user/config_def.h index fabeb4518..8e9c4c699 100644 --- a/MarathonRecomp/user/config_def.h +++ b/MarathonRecomp/user/config_def.h @@ -84,6 +84,8 @@ CONFIG_DEFINE_HIDDEN("Codes", bool, FixPowerUpJingleDuration, false); CONFIG_DEFINE_HIDDEN("Codes", bool, UseOfficialTitleOnTitleBar, false); CONFIG_DEFINE_HIDDEN("Codes", bool, DisableLowResolutionFontOnCustomUI, false); CONFIG_DEFINE_HIDDEN("Codes", bool, RestoreContextualHUDColours, false); +CONFIG_DEFINE_HIDDEN("Codes", bool, RestoreChaosSpearFlips, false); +CONFIG_DEFINE_HIDDEN("Codes", bool, RestoreChaosBoostJump, false); CONFIG_DEFINE_HIDDEN("Codes", bool, RestoreChainJumpFlips, false); CONFIG_DEFINE_HIDDEN("Codes", bool, DisableEdgeGrabLeftover, false); CONFIG_DEFINE_HIDDEN("Codes", bool, TailsGauge, false); diff --git a/MarathonRecompLib/config/Marathon.toml b/MarathonRecompLib/config/Marathon.toml index 8cdebc621..30a36d860 100644 --- a/MarathonRecompLib/config/Marathon.toml +++ b/MarathonRecompLib/config/Marathon.toml @@ -338,6 +338,16 @@ name = "NOP" address = 0x8258E600 jump_address = 0x8258E604 +[[midasm_hook]] +name = "RestoreChaosSpearFlips" +address = 0x821A6730 +jump_address_on_true = 0x821A6734 + +[[midasm_hook]] +name = "RestoreChaosBoostJump" +address = 0x821A6988 +registers = ["r10", "r11"] + [[midasm_hook]] name = "RestoreChainJumpFlips1" address = 0x82199650