From 1f32a641df97d369c6e4e467e44fb93b34f597f9 Mon Sep 17 00:00:00 2001 From: GradualSyrup <68757075+GradualSyrup@users.noreply.github.com> Date: Sun, 18 Feb 2024 20:34:46 -0600 Subject: [PATCH] MALLOC crashing so TODOing it, up to crash on fixed_camera --- src/common/offsets.rs | 27 ++++++++++----------------- src/training/ui/mod.rs | 5 +++-- 2 files changed, 13 insertions(+), 19 deletions(-) diff --git a/src/common/offsets.rs b/src/common/offsets.rs index a55a928..b8337f4 100644 --- a/src/common/offsets.rs +++ b/src/common/offsets.rs @@ -315,31 +315,24 @@ static NEEDLE_ACTIVATE_AUTONOMY: &[u8] = &[ ]; impl_offset!(ACTIVATE_AUTONOMY); -// OFFSET_POKEMON_DECIDE = 0x34cdc64 +// OFFSET_POKEMON_DECIDE = 0x34ce8e4 static NEEDLE_POKEMON_DECIDE: &[u8] = &[ 0x28, 0x69, 0x2b, 0x38, 0x48, 0x26, 0x8b, 0x52, 0x2a, 0x69, 0x28, 0x38, 0x88, 0x12, 0x40, 0xf9, - 0x49, 0x01, 0x80, 0x52, - 0x14, 0x29, 0x40, 0xf9, - 0xe9, 0x0b, 0x00, 0xb9, - 0x29, 0xdf, 0x00, 0xb0, ]; impl_offset!(POKEMON_DECIDE); -// OFFSET_LAYOUT_ARC_MALLOC = 0x37730d4 -static NEEDLE_LAYOUT_ARC_MALLOC: &[u8] = &[ - 0xe3, 0xe6, 0x06, 0x94, - 0xa0, 0x05, 0x00, 0xb4, - 0xe1, 0x03, 0x15, 0xaa, - 0xe2, 0x03, 0x17, 0xaa, - 0xc0, 0xb6, 0x00, 0xf9, - 0x72, 0x2e, 0x09, 0x94, - 0xc1, 0xb6, 0x40, 0xf9, - 0xc2, 0x57, 0x00, 0xb0, -]; -impl_offset!(LAYOUT_ARC_MALLOC); +// // OFFSET_LAYOUT_ARC_MALLOC = 0x3773d54 (old: 0x37730d4) + +// static NEEDLE_LAYOUT_ARC_MALLOC: &[u8] = &[ +// 0xe3, 0xe6, 0x06, 0x94, +// 0xa0, 0x05, 0x00, 0xb4, +// 0xe1, 0x03, 0x15, 0xaa, +// 0xe2, 0x03, 0x17, 0xaa, +// ]; +// impl_offset!(LAYOUT_ARC_MALLOC); // OFFSET_TRAINING_RESET_CHECK = 0x1378e50 static NEEDLE_TRAINING_RESET_CHECK: &[u8] = &[ diff --git a/src/training/ui/mod.rs b/src/training/ui/mod.rs index b18f4fd..25fe544 100644 --- a/src/training/ui/mod.rs +++ b/src/training/ui/mod.rs @@ -6,7 +6,8 @@ use smash::ui2d::SmashTextBox; use training_mod_consts::{OnOff, MENU}; use crate::common::menu::QUICK_MENU_ACTIVE; -use crate::common::offsets::{OFFSET_DRAW, OFFSET_LAYOUT_ARC_MALLOC}; +//use crate::common::offsets::{OFFSET_DRAW, OFFSET_LAYOUT_ARC_MALLOC}; +use crate::common::offsets::{OFFSET_DRAW}; use crate::common::{is_ready_go, is_training_mode}; #[cfg(feature = "layout_arc_from_file")] use crate::consts::LAYOUT_ARC_PATH; @@ -128,7 +129,7 @@ static mut LAYOUT_ARC: &mut [u8; LAYOUT_ARC_SIZE] = &mut [0u8; LAYOUT_ARC_SIZE]; /// label_material.set_white_res_color(LABEL_WHITE_SELECTED_COLOR); /// label_material.set_black_res_color(LABEL_BLACK_SELECTED_COLOR); /// ``` -#[skyline::hook(offset = *OFFSET_LAYOUT_ARC_MALLOC, inline)] +#[skyline::hook(offset = 0x37730d4, inline)] // TODO: Fix for 13.0.2 unsafe fn handle_layout_arc_malloc(ctx: &mut skyline::hooks::InlineCtx) { if !is_training_mode() { return;