diff --git a/MarathonRecomp/patches/player_patches.cpp b/MarathonRecomp/patches/player_patches.cpp index 5672ed423..0df8a3770 100644 --- a/MarathonRecomp/patches/player_patches.cpp +++ b/MarathonRecomp/patches/player_patches.cpp @@ -465,3 +465,8 @@ void SonicGaugeRestorationGaugeFlagFix(PPCRegister& r_gauge, PPCRegister& r_cont } } } + +bool InfiniteLives() +{ + return Config::InfiniteLives; +} diff --git a/MarathonRecomp/user/config_def.h b/MarathonRecomp/user/config_def.h index 419d9c93b..00024fa8e 100644 --- a/MarathonRecomp/user/config_def.h +++ b/MarathonRecomp/user/config_def.h @@ -97,5 +97,6 @@ CONFIG_DEFINE_HIDDEN("Codes", bool, MidairControlForSnowboards, false); CONFIG_DEFINE_HIDDEN("Codes", bool, ControllableTeleportDash, false); CONFIG_DEFINE_HIDDEN("Codes", bool, ControllableBoundAttack, false); CONFIG_DEFINE_HIDDEN("Codes", bool, ControllableSpinkick, false); +CONFIG_DEFINE_HIDDEN("Codes", bool, InfiniteLives, false); CONFIG_DEFINE("Update", time_t, LastChecked, 0); diff --git a/MarathonRecompLib/config/Marathon.toml b/MarathonRecompLib/config/Marathon.toml index b8fcc0881..f26a01e0b 100644 --- a/MarathonRecompLib/config/Marathon.toml +++ b/MarathonRecompLib/config/Marathon.toml @@ -575,3 +575,8 @@ registers = ["r29"] name = "SonicGaugeRestorationGaugeGemSpriteResetFix" address = 0x82177DFC registers = ["r31"] + +[[midasm_hook]] +name = "InfiniteLives" +address = 0x821857B0 +jump_address_on_true = 0x821857B4