From 6862c235fe92ec2bae6ad8f285dba79badd14f31 Mon Sep 17 00:00:00 2001 From: GradualSyrup <68757075+GradualSyrup@users.noreply.github.com> Date: Mon, 5 Feb 2024 16:01:32 -0600 Subject: [PATCH] Toggleable L + R + A Reset (#663) * Working w/ raw offset and no icon * Use dynamic offsets * Add icon * Fixed layout.arc * Cargo fmt --- src/common/offsets.rs | 15 ++++++++++++++- src/static/layout.arc | Bin 4204916 -> 4213268 bytes src/training/mod.rs | 12 ++++++++++++ training_mod_consts/src/lib.rs | 11 +++++++++++ 4 files changed, 37 insertions(+), 1 deletion(-) diff --git a/src/common/offsets.rs b/src/common/offsets.rs index 50eb728..35ef240 100644 --- a/src/common/offsets.rs +++ b/src/common/offsets.rs @@ -344,4 +344,17 @@ static NEEDLE_LAYOUT_ARC_MALLOC: &[u8] = &[ 0xc1, 0xb6, 0x40, 0xf9, 0xc2, 0x57, 0x00, 0xb0, ]; -impl_offset!(LAYOUT_ARC_MALLOC); \ No newline at end of file +impl_offset!(LAYOUT_ARC_MALLOC); + +// OFFSET_TRAINING_RESET_CHECK = 0x1378e30 +static NEEDLE_TRAINING_RESET_CHECK: &[u8] = &[ + 0x1f, 0x09, 0x00, 0x71, + 0x41, 0x1c, 0x00, 0x54, + 0xe8, 0xf9, 0x01, 0xf0, + 0x08, 0x7d, 0x42, 0xf9, + 0x08, 0x01, 0x40, 0xf9, + 0x09, 0xa1, 0x40, 0xb9, + 0x3f, 0x05, 0x00, 0x71, + 0x2b, 0x0a, 0x00, 0x54, +]; +impl_offset!(TRAINING_RESET_CHECK); diff --git a/src/static/layout.arc b/src/static/layout.arc index da059da6af7cb79273b42fd569b6164d31ca4579..a4b9b3b3298642b7a596768c703e15f36b587973 100644 GIT binary patch delta 23244 zcmZ8}3w#vS_5ayP0!s+8Aj0x=d7AK$Ke6mHz^~qB4n13Ft zGB>#R$`S&x)DwC**?7mJP3N7y{1vzCSv2(f+)RF>ux! z-gW4QpD^O<<`5wS&#gL>;9K^+m?eH9j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hBbV&o5)82OtdM*h}_kv|_||pD@E;X; zdOLHTw$8{i(HVJiIU~;(XUuOEM|qG zMrPz$#*931m@&IwkmvX^=efI#JRO&jr`a;{%vnaB5z83kS+1<`>{UjdkjlstO&RGE z!SrE4p61EhdHNwWKwf#C zAFn)rk5`_N$1BgYE6)hymFIZz%5%5O z{m;{}Jow0&r&;mJ6Q_9PsZhL~CpYoRla`qCG$clzUc|@~h8TGY5U)I`hgY7g!z)j} z;gzS=@X8Zqc;yK&=Kkk7Exhtv6<&EF3a>oZgjb$D!Yj`T;g#ok@XGTyc;y)xyz)#7 zUU}{WuRI%qSDxy?E6--&mFFk$%JUA){hu>`aS4`+fk*y%^ed5oS{9((7NN7H%b zQF2~++?!V(+UAu9t9j)?XkK|(nO7bz=9R~SdBqs7-2Xg+%PWt}^2)=myz+1=uRK7? zD-V3~%0rpF@(?AjJm|UeaYblD zXV38ZW1B+jJc;UEP9*WpW1&Hb@ZUon60Np`N)x@GciJV+-tF{B%-Rwfz_fkh#Vw)E z;_}D;x%5hfx+KCKo#Ba^RLGYIw|BhtW1n{(FIv~M+n0#<^R!A_R_~l$|C`4{*FW)p DqpZP) diff --git a/src/training/mod.rs b/src/training/mod.rs index 818d85d..2d4e43a 100644 --- a/src/training/mod.rs +++ b/src/training/mod.rs @@ -418,6 +418,16 @@ pub unsafe fn handle_add_damage( original!()(damage_module, damage_to_add, param_2) } +// Control L+R+A Resets +// This function already checks for training mode, so we don't need to check for training mode here +#[skyline::hook(offset = *OFFSET_TRAINING_RESET_CHECK, inline)] +unsafe fn lra_handle(ctx: &mut InlineCtx) { + let x8 = ctx.registers[8].x.as_mut(); + if !(MENU.lra_reset.as_bool()) { + *x8 = 0; + } +} + // Set Stale Moves to On // One instruction after stale moves toggle register is set to 0 #[skyline::hook(offset = *OFFSET_STALE, inline)] @@ -915,6 +925,8 @@ pub fn training_mods() { handle_article_get_int, handle_fighter_effect, handle_fighter_joint_effect, + // L+R+A Reset + lra_handle ); items::init(); diff --git a/training_mod_consts/src/lib.rs b/training_mod_consts/src/lib.rs index e05a6eb..cad47ff 100644 --- a/training_mod_consts/src/lib.rs +++ b/training_mod_consts/src/lib.rs @@ -93,6 +93,7 @@ pub struct TrainingModpackMenu { pub stale_dodges: OnOff, pub tech_hide: OnOff, pub update_policy: UpdatePolicy, + pub lra_reset: OnOff, } #[repr(C)] @@ -200,6 +201,7 @@ pub static DEFAULTS_MENU: TrainingModpackMenu = TrainingModpackMenu { stale_dodges: OnOff::ON, tech_hide: OnOff::OFF, update_policy: UpdatePolicy::default(), + lra_reset: OnOff::ON, }; pub static mut MENU: TrainingModpackMenu = DEFAULTS_MENU; @@ -729,6 +731,14 @@ impl_toggletrait! { true, 1, } +impl_toggletrait! { + OnOff, + "L+R+A Reset", + "lra_reset", + "L+R+A Reset: Reset Training Room when pressing L+R+A", + true, + 1, +} impl_toggletrait! { RecordSlot, "Recording Slot", @@ -948,6 +958,7 @@ pub unsafe fn create_app<'a>() -> App<'a> { misc_tab_submenus.push(to_submenu_stage_hazards()); misc_tab_submenus.push(to_submenu_hud()); misc_tab_submenus.push(to_submenu_update_policy()); + misc_tab_submenus.push(to_submenu_lra_reset()); let misc_tab = Tab { id: "misc", title: "Misc Settings",