79 {
82 s32 id;
83 s8 oldButton;
84 s8 newButton;
85 s32 numLookbackFrames;
86 s32 bufferPos;
87 s32 buttonsPressed;
88 s32 success;
89 s32 i;
90
91 switch (actionCommandStatus->
state) {
92 case 0:
95 if (actionCommandStatus->
showHud) {
97 }
99 actionCommandStatus->
state = 1;
100 break;
101 case 1:
103 actionCommandStatus->
hudPosX += 20;
104 if (actionCommandStatus->
hudPosX > 50) {
105 actionCommandStatus->
hudPosX = 50;
106 }
109 actionCommandStatus->
hudPosX + 21,
110 actionCommandStatus->
hudPosY + 28);
111 break;
112 case 10:
116 break;
117 }
118 actionCommandStatus->
unk_5D = 1;
121 actionCommandStatus->
state = 11;
123
124 case 11:
126
127
128 oldButton = actionCommandStatus->
unk_5C;
129 do {
131 actionCommandStatus->
unk_5C = newButton;
132 } while (oldButton == newButton);
133
138 id,
139 actionCommandStatus->
hudPosX + ((actionCommandStatus->
unk_5D - 1) * 20) + 16,
144 actionCommandStatus->
state = 12;
145
146 case 12:
149 actionCommandStatus->
state = 13;
150 break;
151 }
152
153
154 if (actionCommandStatus->
unk_5D == 15) {
155 break;
156 }
157
158
159
161
163
165
167 if (numLookbackFrames > 20) {
168 numLookbackFrames = 20;
169 }
170
171
173 if (bufferPos < 0) {
175 }
176
177
178 if (numLookbackFrames == 0) {
179 numLookbackFrames = 1;
180 }
181
182
183 for (i = 0; i < numLookbackFrames; i++) {
186 }
187
188
190 break;
191 };
192
193 success = FALSE;
195
196
197 switch (actionCommandStatus->
unk_5C) {
198 case 0:
200 success = TRUE;
201 } else {
203 if (buttonsPressed != 0) {
206 } else {
207 success = TRUE;
208 }
209 }
210 }
211 break;
212 case 1:
214 success = TRUE;
215 } else {
217 if (buttonsPressed != 0) {
220 } else {
221 success = TRUE;
222 }
223 }
224 }
225 break;
226 case 2:
228 success = TRUE;
229 } else {
231 if (buttonsPressed != 0) {
234 } else {
235 success = TRUE;
236 }
237 }
238 }
239 break;
240 }
241
243
247 }
248
249 if (success) {
250
255 id,
256 actionCommandStatus->
hudPosX + ((actionCommandStatus->
unk_5D - 1) * 20),
257 actionCommandStatus->
hudPosY + 7);
258 actionCommandStatus->
unk_5D++;
263 }
264 actionCommandStatus->
state = 11;
267 return;
268 }
269
270 bufferPos++;
271 }
272 }
273 break;
274 case 13:
277 } else {
279 }
283 }
286 actionCommandStatus->
state = 14;
287 break;
288 case 14:
291 } else {
293 }
294 break;
295 }
296}
BSS ActionCommandStatus gActionCommandStatus
void action_command_free(void)
s16 wrongInputFrameCounter
void btl_set_popup_duration(s32 duration)
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_pos(s32 id, s32 x, s32 y)
void hud_element_clear_flags(s32 id, s32 flags)
Turns off the given flags.
@ HUD_ELEMENT_FLAG_DISABLED
void sfx_play_sound(s32 soundID)
s32 * actionCmdDifficultyTable
HudScript * D_802A97C0_42CEB0[3]
HudScript * D_802A97CC_42CEBC[3]
BattleStatus gBattleStatus