diff --git a/MarathonRecomp/patches/player_patches.cpp b/MarathonRecomp/patches/player_patches.cpp index f908c943d..e48e01a6f 100644 --- a/MarathonRecomp/patches/player_patches.cpp +++ b/MarathonRecomp/patches/player_patches.cpp @@ -165,3 +165,16 @@ bool ControllableTeleportDash() { return Config::ControllableTeleportDash; } + +bool ControllableBoundAttack() +{ + return Config::ControllableBoundAttack; +} + +bool ControllableBoundAttack2(PPCCRRegister& cmp) +{ + if (Config::ControllableBoundAttack) + return !cmp.eq; + + return cmp.eq; +} diff --git a/MarathonRecomp/user/config_def.h b/MarathonRecomp/user/config_def.h index ff3d0d1ef..9b9a78c3b 100644 --- a/MarathonRecomp/user/config_def.h +++ b/MarathonRecomp/user/config_def.h @@ -89,5 +89,6 @@ CONFIG_DEFINE_HIDDEN("Codes", bool, PlayerDebugMode, false); CONFIG_DEFINE_HIDDEN("Codes", bool, MidairControlForMachSpeed, false); CONFIG_DEFINE_HIDDEN("Codes", bool, MidairControlForSnowboards, false); CONFIG_DEFINE_HIDDEN("Codes", bool, ControllableTeleportDash, false); +CONFIG_DEFINE_HIDDEN("Codes", bool, ControllableBoundAttack, false); CONFIG_DEFINE("Update", time_t, LastChecked, 0); diff --git a/MarathonRecompLib/config/Marathon.toml b/MarathonRecompLib/config/Marathon.toml index 8989112c2..3f06cc50d 100644 --- a/MarathonRecompLib/config/Marathon.toml +++ b/MarathonRecompLib/config/Marathon.toml @@ -262,3 +262,20 @@ jump_address_on_true = 0x82512C9C name = "ControllableTeleportDash" address = 0x8221C49C jump_address_on_true = 0x8221C4A0 + +[[midasm_hook]] +name = "ControllableBoundAttack" +address = 0x82217EE0 +jump_address_on_true = 0x82217EE4 + +[[midasm_hook]] +name = "ControllableBoundAttack" +address = 0x82217F1C +jump_address_on_true = 0x82217F20 + +[[midasm_hook]] +name = "ControllableBoundAttack2" +address = 0x82217DC8 +registers = ["cr6"] +jump_address_on_true = 0x82217DD8 +jump_address_on_false = 0x82217DCC