mirror of
https://github.com/jugeeya/UltimateTrainingModpack.git
synced 2024-11-27 20:34:03 +00:00
Greatly improve recording playback
This commit is contained in:
parent
1c6103a9ce
commit
05a9073415
2 changed files with 13 additions and 3 deletions
|
@ -172,7 +172,14 @@ fn into_transition_term(starting_status: StartingStatus) -> i32 {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub unsafe fn get_command_flag_cat(module_accessor: &mut BattleObjectModuleAccessor) {
|
pub unsafe fn handle_recording() {
|
||||||
|
let player_module_accessor = get_module_accessor(FighterId::Player);
|
||||||
|
let cpu_module_accessor = get_module_accessor(FighterId::CPU);
|
||||||
|
handle_recording_for_fighter(&mut *player_module_accessor);
|
||||||
|
handle_recording_for_fighter(&mut *cpu_module_accessor);
|
||||||
|
}
|
||||||
|
|
||||||
|
unsafe fn handle_recording_for_fighter(module_accessor: &mut BattleObjectModuleAccessor) {
|
||||||
// Allow this because sometimes we want to make sure our NNSDK doesn't have
|
// Allow this because sometimes we want to make sure our NNSDK doesn't have
|
||||||
// an erroneous definition
|
// an erroneous definition
|
||||||
#[allow(clippy::unnecessary_cast)]
|
#[allow(clippy::unnecessary_cast)]
|
||||||
|
|
|
@ -138,7 +138,6 @@ fn once_per_frame_per_fighter(
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
input_record::get_command_flag_cat(module_accessor);
|
|
||||||
combo::get_command_flag_cat(module_accessor);
|
combo::get_command_flag_cat(module_accessor);
|
||||||
hitbox_visualizer::get_command_flag_cat(module_accessor);
|
hitbox_visualizer::get_command_flag_cat(module_accessor);
|
||||||
save_states::save_states(module_accessor);
|
save_states::save_states(module_accessor);
|
||||||
|
@ -797,6 +796,7 @@ static OPCF_OFFSET: usize = 0x06b7fdc;
|
||||||
// One instruction after the CPU Control function completes
|
// One instruction after the CPU Control function completes
|
||||||
#[skyline::hook(offset = OPCF_OFFSET, inline)]
|
#[skyline::hook(offset = OPCF_OFFSET, inline)]
|
||||||
unsafe fn handle_once_per_cpu_frame(_ctx: &mut InlineCtx) {
|
unsafe fn handle_once_per_cpu_frame(_ctx: &mut InlineCtx) {
|
||||||
|
input_record::handle_recording();
|
||||||
frame_counter::tick_ingame();
|
frame_counter::tick_ingame();
|
||||||
tech::hide_tech();
|
tech::hide_tech();
|
||||||
// Tick notifications
|
// Tick notifications
|
||||||
|
@ -881,7 +881,10 @@ pub fn training_mods() {
|
||||||
// Enable Custom Stages for Training Mode
|
// Enable Custom Stages for Training Mode
|
||||||
// Specifically, we prevent a field in StageSelectInfo of the Scene that controls if the Custom Stage tab is loaded
|
// Specifically, we prevent a field in StageSelectInfo of the Scene that controls if the Custom Stage tab is loaded
|
||||||
// from being set to false when we load the SSS in Training Mode
|
// from being set to false when we load the SSS in Training Mode
|
||||||
skyline::patching::Patch::in_text(0x184d1d8).nop().unwrap();
|
static SSS_TRAINING_OFFSET: usize = 0x184d1d8;
|
||||||
|
skyline::patching::Patch::in_text(SSS_TRAINING_OFFSET)
|
||||||
|
.nop()
|
||||||
|
.unwrap();
|
||||||
|
|
||||||
skyline::install_hooks!(
|
skyline::install_hooks!(
|
||||||
// Mash airdodge/jump
|
// Mash airdodge/jump
|
||||||
|
|
Loading…
Reference in a new issue