mirror of
https://github.com/jugeeya/UltimateTrainingModpack.git
synced 2025-01-19 17:00:15 +00:00
input recording kinda works???
This commit is contained in:
parent
4d91f17283
commit
6f6417e66a
3 changed files with 24 additions and 2 deletions
|
@ -1 +1 @@
|
|||
Subproject commit 5dd3ce1250c1b111781a4e98586d6e50e9fbc4a2
|
||||
Subproject commit 31d3dbaa86d24d33335d8ada715201c50f00750d
|
|
@ -51,12 +51,15 @@ int get_command_flag_cat(u64 module_accessor, int category, int flag, bool& repl
|
|||
} else {
|
||||
if (INPUT_RECORD_STATE == NONE) {
|
||||
if (ControlModule::check_button_on(module_accessor, CONTROL_PAD_BUTTON_CATCH) &&
|
||||
ControlModule::check_button_trigger(module_accessor, CONTROL_PAD_BUTTON_APPEAL_S_L))
|
||||
ControlModule::check_button_trigger(module_accessor, CONTROL_PAD_BUTTON_APPEAL_S_L)) {
|
||||
print_string(module_accessor, "PRERECORD");
|
||||
INPUT_RECORD_STATE = INPUT_PRE_RECORDING;
|
||||
}
|
||||
} else if (INPUT_RECORD_STATE == INPUT_PRE_RECORDING) {
|
||||
if (category == FIGHTER_PAD_COMMAND_CATEGORY1) {
|
||||
curr_pre_frame++;
|
||||
if (curr_pre_frame == NUM_PRE_FRAME - 1) {
|
||||
print_string(module_accessor, "RECORDING");
|
||||
INPUT_RECORD_STATE = INPUT_RECORDING;
|
||||
curr_pre_frame = 0;
|
||||
}
|
||||
|
@ -75,10 +78,24 @@ int get_command_flag_cat(u64 module_accessor, int category, int flag, bool& repl
|
|||
};
|
||||
|
||||
if (curr_frame == NUM_FRAME_INPUTS - 1) {
|
||||
print_string(module_accessor, "PLAYBACK");
|
||||
INPUT_RECORD_STATE = INPUT_PLAYBACK;
|
||||
curr_frame = 0;
|
||||
}
|
||||
}
|
||||
} else if (INPUT_RECORD_STATE == INPUT_PLAYBACK) {
|
||||
if (ControlModule::check_button_on(module_accessor, CONTROL_PAD_BUTTON_CATCH) &&
|
||||
ControlModule::check_button_trigger(module_accessor, CONTROL_PAD_BUTTON_APPEAL_S_R)) {
|
||||
print_string(module_accessor, "STOP");
|
||||
INPUT_RECORD_STATE = NONE;
|
||||
for (size_t i = 0; i < NUM_FRAME_INPUTS; i++)
|
||||
frame_inputs[i] = FrameInput{};
|
||||
curr_frame = 0;
|
||||
}
|
||||
|
||||
if (category == FIGHTER_PAD_COMMAND_CATEGORY1) {
|
||||
curr_frame = (curr_frame + 1) % NUM_FRAME_INPUTS;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include "training/mash.hpp"
|
||||
#include "training/selection.hpp"
|
||||
#include "training/shield.hpp"
|
||||
#include "training/input_recorder.hpp"
|
||||
|
||||
using namespace lib;
|
||||
using namespace app::lua_bind;
|
||||
|
@ -75,6 +76,10 @@ int get_command_flag_cat_replace(u64 module_accessor, int category) {
|
|||
int (*get_command_flag_cat)(u64, int) = (int (*)(u64, int)) load_module_impl(control_module, 0x350);
|
||||
int flag = get_command_flag_cat(control_module, category);
|
||||
|
||||
bool replace;
|
||||
int ret = InputRecorder::get_command_flag_cat(module_accessor, category, flag, replace);
|
||||
if (replace) return ret;
|
||||
|
||||
Mash::get_command_flag_cat(module_accessor, category, flag);
|
||||
Ledge::get_command_flag_cat(module_accessor, category, flag);
|
||||
|
||||
|
|
Loading…
Reference in a new issue