4#define NAMESPACE action_command_tidal_wave
36API_CALLABLE(N(
init)) {
78API_CALLABLE(N(start)) {
102 battleStatus->
flags1 &= ~BS_FLAGS1_FREE_ACTION_COMMAND;
115 s32 numLookbackFrames;
121 switch (acs->
state) {
145 acs->tidalWave.inputCount = 1;
156 oldButton = acs->tidalWave.prevButton;
159 acs->tidalWave.prevButton = newButton;
160 }
while (oldButton == newButton);
162 hid = acs->
hudElemIDs[acs->tidalWave.inputCount];
181 if (acs->tidalWave.inputCount == 15) {
194 if (numLookbackFrames > 20) {
195 numLookbackFrames = 20;
205 if (numLookbackFrames == 0) {
206 numLookbackFrames = 1;
210 for (i = 0; i < numLookbackFrames; i++) {
224 switch (acs->tidalWave.prevButton) {
230 if (buttonsPressed != 0) {
244 if (buttonsPressed != 0) {
258 if (buttonsPressed != 0) {
278 hid = acs->
hudElemIDs[acs->tidalWave.inputCount];
282 acs->tidalWave.inputCount++;
BSS ActionCommandStatus gActionCommandStatus
void action_command_free(void)
void increment_action_command_attempt_count(void)
s32 adjust_action_command_difficulty(s32 difficultyLevel)
void increment_action_command_success_count(void)
void action_command_init_status(void)
s16 wrongInputFrameCounter
#define AC_QUALITY_FAILED
HudScript HES_CDownButtonHeld
HudScript HES_BButtonHeld
HudScript HES_PressAButton
HudScript HES_AButtonDown
HudScript HES_PressBButton
HudScript HES_PressCDownButton
@ ACTION_COMMAND_TIDAL_WAVE
void btl_set_popup_duration(s32 duration)
s32 evt_get_variable(Evt *script, Bytecode var)
void hud_element_set_scale(s32 index, f32 scale)
void hud_element_set_alpha(s32 id, s32 opacity)
void hud_element_set_script(s32 id, HudScript *anim)
void hud_element_set_render_depth(s32 id, s32 z)
void hud_element_set_render_pos(s32 id, s32 x, s32 y)
s32 hud_element_create(HudScript *anim)
Creates a new HUD element and returns its ID.
void hud_element_set_flags(s32 id, s32 flags)
Turns on the given flags.
void hud_element_clear_flags(s32 id, s32 flags)
Turns off the given flags.
void hud_element_draw_clipped(s32 id)
void hud_element_free(s32 id)
@ HUD_ELEMENT_FLAG_DISABLED
void sfx_play_sound(s32 soundID)
s32 * actionCmdDifficultyTable
@ TIDAL_WAVE_STATE_AWAIT_INPUT
@ TIDAL_WAVE_STATE_WRAPUP
@ TIDAL_WAVE_STATE_NEXT_BUTTON
@ TIDAL_WAVE_STATE_DISPOSE
@ TIDAL_WAVE_STATE_APPEAR
HudScript * HudButtonsUp[TIDAL_WAVE_INPUT_COUNT]
s32 actionCmdTableTidalWave[]
@ TIDAL_WAVE_INPUT_C_DOWN
HudScript * HudButtonsDown[TIDAL_WAVE_INPUT_COUNT]
BattleStatus gBattleStatus
void N init(Npc *bombette)