mirror of
https://github.com/jugeeya/UltimateTrainingModpack.git
synced 2024-11-24 10:54:16 +00:00
Format Rust code using rustfmt
This commit is contained in:
parent
1d8c3bcf48
commit
e0645a071c
2 changed files with 14 additions and 8 deletions
|
@ -86,15 +86,17 @@ pub fn is_operation_cpu(module_accessor: &mut app::BattleObjectModuleAccessor) -
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
let entry_id_int = WorkModule::get_int(module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as i32;
|
let entry_id_int =
|
||||||
|
WorkModule::get_int(module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as i32;
|
||||||
|
|
||||||
if entry_id_int == 0 {
|
if entry_id_int == 0 {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
let entry_id = app::FighterEntryID(entry_id_int);
|
let entry_id = app::FighterEntryID(entry_id_int);
|
||||||
let mgr = *(FIGHTER_MANAGER_ADDR as *mut *mut app::FighterManager);
|
let mgr = *(FIGHTER_MANAGER_ADDR as *mut *mut app::FighterManager);
|
||||||
let fighter_information = FighterManager::get_fighter_information(mgr, entry_id) as *mut app::FighterInformation;
|
let fighter_information =
|
||||||
|
FighterManager::get_fighter_information(mgr, entry_id) as *mut app::FighterInformation;
|
||||||
|
|
||||||
FighterInformation::is_operation_cpu(fighter_information)
|
FighterInformation::is_operation_cpu(fighter_information)
|
||||||
}
|
}
|
||||||
|
|
|
@ -178,7 +178,9 @@ pub unsafe fn save_states(module_accessor: &mut app::BattleObjectModuleAccessor)
|
||||||
// move to correct pos
|
// move to correct pos
|
||||||
if save_state.state == PosMove || save_state.state == NanaPosMove {
|
if save_state.state == PosMove || save_state.state == NanaPosMove {
|
||||||
let status_kind = StatusModule::status_kind(module_accessor) as i32;
|
let status_kind = StatusModule::status_kind(module_accessor) as i32;
|
||||||
if save_state.state == NanaPosMove && (!fighter_is_nana || (status_kind == FIGHTER_STATUS_KIND_STANDBY)) {
|
if save_state.state == NanaPosMove
|
||||||
|
&& (!fighter_is_nana || (status_kind == FIGHTER_STATUS_KIND_STANDBY))
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
SoundModule::stop_all_sound(module_accessor);
|
SoundModule::stop_all_sound(module_accessor);
|
||||||
|
@ -252,14 +254,16 @@ pub unsafe fn save_states(module_accessor: &mut app::BattleObjectModuleAccessor)
|
||||||
// Grab + Dpad down: Save state
|
// Grab + Dpad down: Save state
|
||||||
if ControlModule::check_button_on(module_accessor, *CONTROL_PAD_BUTTON_CATCH)
|
if ControlModule::check_button_on(module_accessor, *CONTROL_PAD_BUTTON_CATCH)
|
||||||
&& ControlModule::check_button_trigger(module_accessor, *CONTROL_PAD_BUTTON_APPEAL_LW)
|
&& ControlModule::check_button_trigger(module_accessor, *CONTROL_PAD_BUTTON_APPEAL_LW)
|
||||||
&& !fighter_is_nana // Don't begin saving state if Nana's delayed input is captured
|
&& !fighter_is_nana
|
||||||
|
// Don't begin saving state if Nana's delayed input is captured
|
||||||
{
|
{
|
||||||
MIRROR_STATE = 1.0;
|
MIRROR_STATE = 1.0;
|
||||||
SAVE_STATE_PLAYER.state = Save;
|
SAVE_STATE_PLAYER.state = Save;
|
||||||
SAVE_STATE_CPU.state = Save;
|
SAVE_STATE_CPU.state = Save;
|
||||||
}
|
}
|
||||||
|
|
||||||
if save_state.state == Save && !fighter_is_nana { // Don't save states with Nana. Should already be fine, just a safety.
|
if save_state.state == Save && !fighter_is_nana {
|
||||||
|
// Don't save states with Nana. Should already be fine, just a safety.
|
||||||
save_state.state = NoAction;
|
save_state.state = NoAction;
|
||||||
|
|
||||||
save_state.x = PostureModule::pos_x(module_accessor);
|
save_state.x = PostureModule::pos_x(module_accessor);
|
||||||
|
|
Loading…
Reference in a new issue