1
0
Fork 0
mirror of https://github.com/jugeeya/UltimateTrainingModpack.git synced 2024-11-28 04:44:06 +00:00

MALLOC crashing so TODOing it, up to crash on fixed_camera

This commit is contained in:
GradualSyrup 2024-02-18 20:34:46 -06:00
parent 927612e6e5
commit 1f32a641df
2 changed files with 13 additions and 19 deletions

View file

@ -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] = &[

View file

@ -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;