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

attempt to hardcode SET_TRAINING_FIXED_CAMERA_VALUES, which causes the crash whether hardcoded or replaced, maybe due to next hook failing?

This commit is contained in:
GradualSyrup 2024-02-18 20:50:00 -06:00
parent 1f32a641df
commit 19c4fe078d
2 changed files with 11 additions and 15 deletions

View file

@ -127,19 +127,15 @@ static NEEDLE_CHANGE_ACTIVE_CAMERA: &[u8] = &[
];
impl_offset!(CHANGE_ACTIVE_CAMERA);
// OFFSET_SET_TRAINING_FIXED_CAMERA_VALUES = 0x3157bb0
static NEEDLE_SET_TRAINING_FIXED_CAMERA_VALUES: &[u8] = &[
0x01, 0xe4, 0x00, 0x2f,
0x20, 0x00, 0xc0, 0x3d,
0x22, 0x1c, 0xa1, 0x4e,
0x02, 0x44, 0x04, 0x6e,
0xe8, 0x0a, 0x01, 0xf0,
0x08, 0x81, 0x47, 0xf9,
0x08, 0x01, 0x40, 0xf9,
0x40, 0x04, 0x18, 0x6e,
0x00, 0xf5, 0x82, 0x3d,
];
impl_offset!(SET_TRAINING_FIXED_CAMERA_VALUES);
// OFFSET_SET_TRAINING_FIXED_CAMERA_VALUES = 0x3158830 (old: 0x3157bb0)
// static NEEDLE_SET_TRAINING_FIXED_CAMERA_VALUES: &[u8] = &[
// 0x01, 0xe4, 0x00, 0x2f,
// 0x20, 0x00, 0xc0, 0x3d,
// 0x22, 0x1c, 0xa1, 0x4e,
// 0x02, 0x44, 0x04, 0x6e,
// ];
// impl_offset!(SET_TRAINING_FIXED_CAMERA_VALUES);
// OFFSET_DRAW = 0x4b620
static NEEDLE_DRAW: &[u8] = &[

View file

@ -8,7 +8,7 @@ use smash::phx::{Hash40, Vector3f};
use crate::common::consts::*;
use crate::common::offsets::OFFSET_CHANGE_ACTIVE_CAMERA;
use crate::common::offsets::OFFSET_SET_TRAINING_FIXED_CAMERA_VALUES;
//use crate::common::offsets::OFFSET_SET_TRAINING_FIXED_CAMERA_VALUES;
use crate::common::*;
use crate::training::{frame_counter, mash, save_states};
@ -730,7 +730,7 @@ fn get_stage_camera_values(stage_id: i32) -> Option<Vector3f> {
}
// We hook where the training fixed camera fields are initially set, so we can change them later if necessary
#[skyline::hook(offset = *OFFSET_SET_TRAINING_FIXED_CAMERA_VALUES)]
#[skyline::hook(offset = 0x3157bb0)] // TODO: Fix for 13.0.2
pub unsafe fn handle_set_training_fixed_camera_values(
camera_manager: *mut u64, // not actually camera manager - is this even used?????
fixed_camera_values: &mut CameraValuesForTraining,