Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
action_cmd.c
Go to the documentation of this file.
1#include "common.h"
2#include "ld_addrs.h"
3
5 33, 33, 117,
6 29, 35, 163,
7 70, 12, 180,
8 107, 0, 120,
9 115, 13, 19,
10};
11
13 0, 228, 134,
14 46, 180, 242,
15 117, 112, 255,
16 243, 4, 188,
17 247, 13, 5,
18};
19
21 45, 56, 210,
22 84, 40, 209,
23 125, 44, 181,
24 161, 27, 85,
25 255, 255, 255,
26};
27
28Difficulty1D actionCmdTableJump = { 7, 6, 5, 4, 3, 2, 1, 0 };
29Difficulty1D actionCmdTableHammer = { 11, 10, 9, 8, 7, 6, 5, 4 };
30Difficulty1D actionCmdTableFlee = { 130, 120, 110, 100, 90, 80, 70, 60 };
31Difficulty1D actionCmdTableBreakFree = { 130, 120, 110, 100, 90, 80, 70, 60 };
32Difficulty1D actionCmdTableWhirlwind = { 130, 120, 110, 100, 90, 80, 70, 60 };
33Difficulty1D actionCmdTableStopLeech = { 130, 120, 110, 100, 90, 80, 70, 60 };
34Difficulty1D actionCmdTable07 = { 130, 120, 110, 100, 90, 80, 70, 60 };
35Difficulty1D actionCmdTableDizzyShell = { 130, 120, 110, 100, 90, 80, 70, 60 };
36Difficulty1D actionCmdTableFireShell = { 130, 120, 110, 100, 90, 80, 70, 60 };
37Difficulty1D actionCmdTable0A = { 130, 120, 110, 100, 90, 80, 70, 60 };
38Difficulty1D actionCmdTableBomb = { 130, 120, 110, 100, 90, 80, 70, 60 };
39Difficulty1D actionCmdTableBodySlam = { 9, 8, 7, 6, 5, 4, 3, 2 };
40Difficulty1D actionCmdTableAirLift = { 130, 120, 110, 100, 90, 80, 70, 60 };
41Difficulty1D actionCmdTableAirRaid = { 130, 120, 110, 100, 90, 80, 70, 60 };
42Difficulty1D actionCmdTableSquirt = { 130, 120, 110, 100, 90, 80, 70, 60 };
43Difficulty1D actionCmdTablePowerShock = { 130, 120, 110, 100, 90, 80, 70, 60 };
44Difficulty1D actionCmdTableMegaShock = { 130, 120, 110, 100, 90, 80, 70, 60 };
45Difficulty1D actionCmdTableSmack = { 130, 120, 110, 100, 90, 80, 70, 60 };
46Difficulty1D actionCmdTableSpinySurge = { 130, 120, 110, 100, 90, 80, 70, 60 };
47Difficulty1D actionCmdTableHurricane = { 130, 120, 110, 100, 90, 80, 70, 60 };
48Difficulty1D actionCmdTableSpook = { 130, 120, 110, 100, 90, 80, 70, 60 };
49Difficulty2D actionCmdTableWaterBlock = { {6, 3}, {5, 3}, {4, 3}, {2, 3}, {1, 3}, {0, 3}, {0, 2}, {0, 1} };
50Difficulty1D actionCmdTableTidalWave = { 130, 120, 110, 100, 90, 80, 70, 60 };
51
52#define AC_TBL_ENTRY(name) \
53 action_cmd_ ## name ## _ROM_START, action_cmd_ ## name ## _ROM_END, action_cmd_ ## name ## _VRAM
54
56 NULL, NULL, NULL,
57 AC_TBL_ENTRY(jump),
58 AC_TBL_ENTRY(hammer),
59 AC_TBL_ENTRY(flee),
60 AC_TBL_ENTRY(break_free),
61 AC_TBL_ENTRY(whirlwind),
62 AC_TBL_ENTRY(stop_leech),
63 AC_TBL_ENTRY(unused_flee),
64 AC_TBL_ENTRY(dizzy_shell),
65 AC_TBL_ENTRY(fire_shell),
66 AC_TBL_ENTRY(unused_mash_a),
67 AC_TBL_ENTRY(bomb),
68 AC_TBL_ENTRY(body_slam),
69 AC_TBL_ENTRY(air_lift),
70 AC_TBL_ENTRY(air_raid),
71 AC_TBL_ENTRY(squirt),
72 AC_TBL_ENTRY(power_shock),
73 AC_TBL_ENTRY(mega_shock),
74 AC_TBL_ENTRY(smack),
75 AC_TBL_ENTRY(spiny_surge),
76 AC_TBL_ENTRY(hurricane),
77 AC_TBL_ENTRY(spook),
78 AC_TBL_ENTRY(three_chances),
79 AC_TBL_ENTRY(tidal_wave),
80};
81
84// TODO move to actor_api
88
89#include "action_cmd.h"
90
92
93API_CALLABLE(LoadActionCommand) {
94 Bytecode* args = script->ptrReadPos;
95 s32 cmd = evt_get_variable(script, *args++);
96
97 dma_copy(actionCommandDmaTable[cmd * 3 + 0], actionCommandDmaTable[cmd * 3 + 1], actionCommandDmaTable[cmd * 3 + 2]);
98 return ApiStatus_DONE2;
99}
100
101s32 adjust_action_command_difficulty(s32 difficultyLevel) {
103 difficultyLevel -= is_ability_active(ABILITY_DODGE_MASTER) * 3;
104 }
105
106 if (difficultyLevel < 0) {
107 difficultyLevel = 0;
108 }
109 if (difficultyLevel > 7) {
110 difficultyLevel = 7;
111 }
112
113 return difficultyLevel;
114}
115
116void draw_mash_meter(s32 posX, s32 posY, s32 fillValue, s32 colorMode) {
118 s32 maxCutOff;
119 s32 i;
120 s32 cutOff;
121 s32 width;
122 s32 offsetX;
123 s32 filledWidth;
124 s32 r, g, b;
125
126 if (!acs->showHud) {
127 return;
128 }
129
130 posX -= 28;
131 posY -= 4;
132
133 maxCutOff = acs->mashMeterCutoffs[acs->mashMeterNumIntervals];
134
135 if (fillValue < 0) {
136 fillValue = 0;
137 }
138
139 width = 0;
140 for (i = 0; i < acs->mashMeterNumIntervals; i++) {
141 cutOff = acs->mashMeterCutoffs[i + 1];
142 if (cutOff > fillValue) {
143 cutOff = fillValue;
144 }
145
146 width = (cutOff * 60 / maxCutOff) * 100;
147 if (fillValue == cutOff) {
148 break;
149 }
150 }
151
152 //difference between current and previous filled value
153 offsetX = width - acs->meterFillWidth;
154 if (abs(offsetX) >= MashMeterSmoothDivisor * 100) {
155 acs->meterFillWidth += offsetX / MashMeterSmoothDivisor;
156 } else {
157 acs->meterFillWidth = width;
158 }
159
160 offsetX = 0;
161 for (i = 0; i < acs->mashMeterNumIntervals; i++) {
162 cutOff = acs->mashMeterCutoffs[i + 1];
163 width = (cutOff * 60 / maxCutOff) - offsetX;
164 r = mashMeter_bgColors[3 * i + 0];
165 g = mashMeter_bgColors[3 * i + 1];
166 b = mashMeter_bgColors[3 * i + 2];
167 startup_draw_prim_rect_COPY(posX + offsetX, posY, posX + offsetX + width, posY + 5, r, g, b, 255);
168 if (i < acs->mashMeterNumIntervals - 1) {
169 r = mashMeter_cutOffColors[3 * i + 0];
170 g = mashMeter_cutOffColors[3 * i + 1];
171 b = mashMeter_cutOffColors[3 * i + 2];
172 startup_draw_prim_rect_COPY(posX + offsetX + width - 1, posY, posX + offsetX + width, posY + 5, r, g, b, 255);
173 offsetX += width;
174 } else {
175 break;
176 }
177 }
178
179 offsetX = 0;
180 for (i = 0; i < acs->mashMeterNumIntervals; i++) {
181 if (colorMode == 0) {
182 r = mashMeter_fillColors[3 * i + 0];
183 g = mashMeter_fillColors[3 * i + 1];
184 b = mashMeter_fillColors[3 * i + 2];
185 } else if (colorMode > 0) {
186 r = 224;
187 g = 63;
188 b = 0;
189 } else if (gGameStatusPtr->frameCounter % 2 != 0){
190 r = mashMeter_fillColors[3 * i + 0];
191 g = mashMeter_fillColors[3 * i + 1];
192 b = mashMeter_fillColors[3 * i + 2];
193 } else {
194 r = 250;
195 g = 175;
196 b = 0;
197 }
198
199 cutOff = acs->mashMeterCutoffs[i + 1];
200 if (cutOff > fillValue) {
201 cutOff = fillValue;
202 }
203
204 filledWidth = cutOff * 60 / maxCutOff - offsetX;
205 width = acs->meterFillWidth / 100 - offsetX;
206
207 if (width < 0) {
208 break;
209 }
210 if (filledWidth == 0) {
211 filledWidth = width;
212 } else if (cutOff == fillValue) {
213 filledWidth = width;
214 } else if (width > filledWidth) {
215 width = filledWidth;
216 }
217
218 startup_draw_prim_rect_COPY(posX + offsetX, posY, posX + offsetX + width, posY + 5, r, g, b, 255);
219 offsetX += filledWidth;
220 if (i >= acs->mashMeterNumIntervals - 1) {
221 break;
222 }
223 }
224}
225
226void draw_mash_meter_multicolor(s32 posX, s32 posY, s32 fillValue) {
228 draw_mash_meter(posX, posY, fillValue, MASH_METER_MODE_MULTI_COLOR);
229}
230
231void draw_mash_meter_multicolor_with_divisor(s32 posX, s32 posY, s32 fillValue, s32 divisor) {
232 MashMeterSmoothDivisor = divisor;
233 draw_mash_meter(posX, posY, fillValue, MASH_METER_MODE_MULTI_COLOR);
234}
235
236void draw_mash_meter_mode(s32 posX, s32 posY, s32 fillValue, s32 colorMode) {
238 draw_mash_meter(posX, posY, fillValue, colorMode);
239}
240
241void draw_mash_meter_mode_with_divisor(s32 posX, s32 posY, s32 fillValue, s32 divisor, s32 colorMode) {
242 MashMeterSmoothDivisor = divisor;
243 draw_mash_meter(posX, posY, fillValue, colorMode);
244}
245
246void draw_mash_meter_blink(s32 posX, s32 posY, s32 fillValue) {
248 draw_mash_meter(posX, posY, fillValue, MASH_METER_MODE_BLINK);
249}
250
251void draw_mash_meter_blink_with_divisor(s32 posX, s32 posY, s32 fillValue, s32 divisor) {
252 MashMeterSmoothDivisor = divisor;
253 draw_mash_meter(posX, posY, fillValue, MASH_METER_MODE_BLINK);
254}
255
258
259 acs->autoSucceed = FALSE;
260 acs->berserkerEnabled = FALSE;
261
264 acs->autoSucceed = TRUE;
265 }
266
268 acs->showHud = FALSE;
269 acs->berserkerEnabled = TRUE;
270
271 if (rand_int(100) < 25) {
272 acs->autoSucceed = TRUE;
273 }
274 }
275 }
276
278 acs->autoSucceed = TRUE;
279 }
280
282 acs->autoSucceed = TRUE;
283 acs->showHud = FALSE;
284 }
285}
286
289
292 }
293
294 switch (acs->actionCommandID) {
296 break;
299 break;
302 break;
305 break;
308 break;
311 break;
314 break;
317 break;
320 break;
323 break;
326 break;
329 break;
332 break;
335 break;
338 break;
341 break;
344 break;
347 break;
350 break;
353 break;
356 break;
359 break;
362 break;
365 break;
366 default:
367 break;
368 }
369}
370
374 break;
377 break;
380 break;
383 break;
386 break;
389 break;
392 break;
395 break;
398 break;
401 break;
404 break;
407 break;
410 break;
413 break;
416 break;
419 break;
422 break;
425 break;
428 break;
431 break;
434 break;
437 break;
440 break;
443 }
444}
445
448
449 switch (acs->actionCommandID) {
451 break;
454 break;
457 break;
460 break;
463 break;
466 break;
469 break;
472 break;
475 break;
478 break;
481 break;
484 break;
487 break;
490 break;
493 break;
496 break;
499 break;
502 break;
505 break;
508 break;
511 break;
514 break;
517 break;
520 break;
521 }
522
524 gBattleStatus.flags1 &= ~BS_FLAGS1_2000;
525 gBattleStatus.flags1 &= ~BS_FLAGS1_FREE_ACTION_COMMAND;
526 gBattleStatus.flags1 &= ~BS_FLAGS1_4000;
529}
530
536
537s32 check_block_input(s32 buttonMask) {
538 BattleStatus* battleStatus = &gBattleStatus;
539 PlayerData* playerData = &gPlayerData;
541 s32 mashWindow;
542 s32 blockWindow;
543 s32 block;
544 s32 mash = FALSE;
545 s32 bufferPos;
546 s32 i;
547 s32 ignoreWindow;
548
549 battleStatus->blockResult = BLOCK_RESULT_FAIL;
550
551 if (battleStatus->actionCommandMode == AC_MODE_TUTORIAL_BLOCK && (battleStatus->flags1 & BS_FLAGS1_TUTORIAL_BATTLE)) {
552 battleStatus->blockResult = BLOCK_RESULT_SUCCESS;
553 return TRUE;
554 }
555
557 return FALSE;
558 }
559
560 if (playerData->hitsTaken < 9999) {
561 playerData->hitsTaken++;
562 acs->hitsTakenIsMax = FALSE;
563 } else {
564 acs->hitsTakenIsMax = TRUE;
565 }
566
567 block = FALSE;
568 blockWindow = 3;
569 mashWindow = 10;
570
572 blockWindow = 5;
573 }
574
575 // Pre-window mashing check
576 bufferPos = battleStatus->inputBufferPos;
577 bufferPos -= mashWindow + blockWindow;
578
579 if (bufferPos < 0) {
580 bufferPos += ARRAY_COUNT(battleStatus->pushInputBuffer);
581 }
582 for (i = 0; i < mashWindow; i++) {
583 if (bufferPos >= ARRAY_COUNT(battleStatus->pushInputBuffer)) {
584 bufferPos -= ARRAY_COUNT(battleStatus->pushInputBuffer);
585 }
586
587 if (battleStatus->pushInputBuffer[bufferPos] & buttonMask) {
588 mash = TRUE;
589 break;
590 }
591 bufferPos++;
592 }
593
594 // Block check
595 bufferPos = battleStatus->inputBufferPos;
596 bufferPos -= blockWindow;
597 if (bufferPos < 0) {
598 bufferPos += ARRAY_COUNT(battleStatus->pushInputBuffer);
599 }
600 for (i = 0; i < blockWindow; i++) {
601 if (bufferPos >= ARRAY_COUNT(battleStatus->pushInputBuffer)) {
602 bufferPos -= ARRAY_COUNT(battleStatus->pushInputBuffer);
603 }
604
605 if (battleStatus->pushInputBuffer[bufferPos] & buttonMask) {
606 battleStatus->blockResult = BLOCK_RESULT_SUCCESS;
607 block = TRUE;
608 break;
609 }
610 bufferPos++;
611 }
612
613 if (mash) {
614 battleStatus->blockResult = BLOCK_RESULT_EARLY;
615 block = FALSE;
616 }
617
618 // Ignore inputs until another mash window has passed, so check_block_input() can be called in quick succession
619 if (block == TRUE) {
620 bufferPos = battleStatus->inputBufferPos;
621 bufferPos -= mashWindow + blockWindow;
622 if (bufferPos < 0) {
623 bufferPos += ARRAY_COUNT(battleStatus->pushInputBuffer);
624 }
625
626 for (i = 0; i < mashWindow + blockWindow; i++) {
627 if (bufferPos >= ARRAY_COUNT(battleStatus->pushInputBuffer)) {
628 bufferPos -= ARRAY_COUNT(battleStatus->pushInputBuffer);
629 }
630 battleStatus->pushInputBuffer[bufferPos] = 0;
631 bufferPos++;
632 }
633 }
634 if (block && !acs->hitsTakenIsMax) {
635 playerData->hitsBlocked++;
636 }
637
638 return block;
639}
640
642 PlayerData* playerData = &gPlayerData;
644
645 if (!acs->autoSucceed) {
646 if (playerData->actionCommandAttempts < 9999) {
647 playerData->actionCommandAttempts++;
648 acs->hitsTakenIsMax = FALSE;
649 } else {
650 acs->hitsTakenIsMax = TRUE;
651 }
652 }
653}
654
662
663API_CALLABLE(SetActionDifficultyTable) {
664 gBattleStatus.actionCmdDifficultyTable = (s32*) evt_get_variable(script, *script->ptrReadPos);
665 return ApiStatus_DONE2;
666}
667
668API_CALLABLE(SetupMashMeter) {
669 Bytecode* args = script->ptrReadPos;
677 return ApiStatus_DONE2;
678}
679
680API_CALLABLE(GetSmashActionQuality) {
681 evt_set_variable(script, *script->ptrReadPos, gBattleStatus.actionQuality);
682 return ApiStatus_DONE2;
683}
684
685API_CALLABLE(SetActionSuccess) {
686 gBattleStatus.actionQuality = evt_get_variable(script, *script->ptrReadPos);
687 return ApiStatus_DONE2;
688}
689
690API_CALLABLE(SetActionCommandMode) {
691 gBattleStatus.actionCommandMode = evt_get_variable(script, *script->ptrReadPos);
692 return ApiStatus_DONE2;
693}
694
695API_CALLABLE(GetActionCommandMode) {
696 evt_set_variable(script, *script->ptrReadPos, gBattleStatus.actionCommandMode);
697 return ApiStatus_DONE2;
698}
699
700API_CALLABLE(SetActionHudPrepareTime) {
701 gActionCommandStatus.hudPrepareTime = evt_get_variable(script, *script->ptrReadPos);
702 return ApiStatus_DONE2;
703}
704
705API_CALLABLE(GetCommandAutoSuccess) {
706 evt_set_variable(script, *script->ptrReadPos, gActionCommandStatus.autoSucceed);
707 return ApiStatus_DONE2;
708}
709
710API_CALLABLE(SetCommandAutoSuccess) {
712
713 if (evt_get_variable(script, *script->ptrReadPos) != 0) {
714 acs->autoSucceed = TRUE;
715 } else {
716 acs->autoSucceed = FALSE;
717 }
718 return ApiStatus_DONE2;
719}
720
721API_CALLABLE(func_802693F0) {
722 gBattleStatus.flags1 &= ~BS_FLAGS1_4000;
723 return ApiStatus_DONE2;
724}
725
726API_CALLABLE(InterruptActionCommand) {
728
729 if (isInitialCall) {
730 switch (acs->actionCommandID) {
733 return ApiStatus_DONE2;
734 default:
736 return ApiStatus_BLOCK;
737 }
738 }
739
742
743 return ApiStatus_DONE2;
744}
745
746API_CALLABLE(InterruptLeechActionCommand) {
747 if (isInitialCall) {
749 return ApiStatus_BLOCK;
750 }
751
753 return ApiStatus_DONE2;
754}
755
756API_CALLABLE(ShowActionHud) {
758
759 if (evt_get_variable(script, *script->ptrReadPos) == 0) {
760 acs->showHud = FALSE;
761 } else {
762 acs->showHud = TRUE;
763 }
764 return ApiStatus_DONE2;
765}
766
767API_CALLABLE(GetMashActionQuality) {
768 evt_set_variable(script, *script->ptrReadPos, gBattleStatus.actionQuality);
769 return ApiStatus_DONE2;
770}
771
772API_CALLABLE(GetJumpActionQuality) {
773 evt_set_variable(script, *script->ptrReadPos, gBattleStatus.actionResult);
774 return ApiStatus_DONE2;
775}
776
777API_CALLABLE(SetActionResult) {
778 gBattleStatus.actionResult = evt_get_variable(script, *script->ptrReadPos);
779 return ApiStatus_DONE2;
780}
781
782API_CALLABLE(GetBlockResult) {
783 evt_set_variable(script, *script->ptrReadPos, gBattleStatus.blockResult);
784 return ApiStatus_DONE2;
785}
786
787API_CALLABLE(GetActionProgress) {
788 evt_set_variable(script, *script->ptrReadPos, gBattleStatus.actionProgress);
789 return ApiStatus_DONE2;
790}
791
792API_CALLABLE(SetActionProgress) {
793 gBattleStatus.actionProgress = evt_get_variable(script, *script->ptrReadPos);
794 return ApiStatus_DONE2;
795}
796
797API_CALLABLE(GetActionResultTier) {
798 evt_set_variable(script, *script->ptrReadPos, gBattleStatus.resultTier);
799 return ApiStatus_DONE2;
800}
801
802API_CALLABLE(SetActionResultTier) {
803 gBattleStatus.resultTier = evt_get_variable(script, *script->ptrReadPos);
804 return ApiStatus_DONE2;
805}
#define AC_TBL_ENTRY(name)
Definition action_cmd.c:52
void create_action_command_ui_worker(void)
Definition action_cmd.c:531
u8 mashMeter_cutOffColors[15]
Definition action_cmd.c:20
Difficulty1D actionCmdTableHammer
Definition action_cmd.c:29
BSS s32 IsGroupHeal
Definition action_cmd.c:85
void draw_mash_meter_blink_with_divisor(s32 posX, s32 posY, s32 fillValue, s32 divisor)
Definition action_cmd.c:251
BSS ActionCommandStatus gActionCommandStatus
Definition action_cmd.c:91
Difficulty1D actionCmdTableDizzyShell
Definition action_cmd.c:35
void action_command_draw(void)
Definition action_cmd.c:371
Difficulty1D actionCmdTablePowerShock
Definition action_cmd.c:43
void draw_mash_meter_multicolor(s32 posX, s32 posY, s32 fillValue)
Definition action_cmd.c:226
Difficulty1D actionCmdTableBreakFree
Definition action_cmd.c:31
Difficulty1D actionCmdTableJump
Definition action_cmd.c:28
BSS s8 ApplyingBuff
Definition action_cmd.c:86
Difficulty2D actionCmdTableWaterBlock
Definition action_cmd.c:49
BSS s32 MashMeterSmoothDivisor
Definition action_cmd.c:82
void action_command_free(void)
Definition action_cmd.c:446
void draw_mash_meter_mode(s32 posX, s32 posY, s32 fillValue, s32 colorMode)
Definition action_cmd.c:236
Difficulty1D actionCmdTableAirLift
Definition action_cmd.c:40
Difficulty1D actionCmdTableStopLeech
Definition action_cmd.c:33
Difficulty1D actionCmdTableAirRaid
Definition action_cmd.c:41
u8 mashMeter_bgColors[15]
Definition action_cmd.c:4
void increment_action_command_attempt_count(void)
Definition action_cmd.c:641
Difficulty1D actionCmdTableTidalWave
Definition action_cmd.c:50
Difficulty1D actionCmdTable07
Definition action_cmd.c:34
Difficulty1D actionCmdTableBomb
Definition action_cmd.c:38
void draw_mash_meter(s32 posX, s32 posY, s32 fillValue, s32 colorMode)
Definition action_cmd.c:116
Difficulty1D actionCmdTable0A
Definition action_cmd.c:37
Difficulty1D actionCmdTableMegaShock
Definition action_cmd.c:44
void draw_mash_meter_multicolor_with_divisor(s32 posX, s32 posY, s32 fillValue, s32 divisor)
Definition action_cmd.c:231
Difficulty1D actionCmdTableBodySlam
Definition action_cmd.c:39
Difficulty1D actionCmdTableWhirlwind
Definition action_cmd.c:32
void draw_mash_meter_mode_with_divisor(s32 posX, s32 posY, s32 fillValue, s32 divisor, s32 colorMode)
Definition action_cmd.c:241
Difficulty1D actionCmdTableFlee
Definition action_cmd.c:30
BSS s32 D_8029FBC4_pad[3]
Definition action_cmd.c:83
u8 mashMeter_fillColors[15]
Definition action_cmd.c:12
s32 adjust_action_command_difficulty(s32 difficultyLevel)
Definition action_cmd.c:101
BSS s32 D_8029FBD8_pad[2]
Definition action_cmd.c:87
void action_command_update(void)
Definition action_cmd.c:287
Difficulty1D actionCmdTableHurricane
Definition action_cmd.c:47
Difficulty1D actionCmdTableSquirt
Definition action_cmd.c:42
void draw_mash_meter_blink(s32 posX, s32 posY, s32 fillValue)
Definition action_cmd.c:246
void increment_action_command_success_count(void)
Definition action_cmd.c:655
void * actionCommandDmaTable[]
Definition action_cmd.c:55
void action_command_init_status(void)
Definition action_cmd.c:256
Difficulty1D actionCmdTableSpook
Definition action_cmd.c:48
Difficulty1D actionCmdTableFireShell
Definition action_cmd.c:36
s32 check_block_input(s32 buttonMask)
Definition action_cmd.c:537
Difficulty1D actionCmdTableSmack
Definition action_cmd.c:45
Difficulty1D actionCmdTableSpinySurge
Definition action_cmd.c:46
@ MASH_METER_MODE_MULTI_COLOR
Definition action_cmd.h:54
@ MASH_METER_MODE_BLINK
Definition action_cmd.h:53
@ AC_MODE_TUTORIAL_BLOCK
Definition action_cmd.h:59
@ AC_MODE_NOT_LEARNED
Definition action_cmd.h:60
void action_command_air_lift_free(void)
void action_command_air_lift_draw(void)
void action_command_air_lift_update(void)
void action_command_air_raid_update(void)
void action_command_air_raid_draw(void)
void action_command_air_raid_free(void)
void action_command_body_slam_draw(void)
void action_command_body_slam_free(void)
void action_command_body_slam_update(void)
void action_command_bomb_update(void)
void action_command_bomb_draw(void)
void action_command_bomb_free(void)
void action_command_break_free_update(void)
void action_command_break_free_free(void)
void action_command_break_free_draw(void)
u16 actionCommandSuccesses
u16 actionCommandAttempts
void action_command_dizzy_shell_update(void)
void action_command_dizzy_shell_free(void)
void action_command_dizzy_shell_draw(void)
#define rand_int
@ ACTION_COMMAND_BOMB
Definition enums.h:3483
@ ACTION_COMMAND_SPOOK
Definition enums.h:3493
@ ACTION_COMMAND_MEGA_SHOCK
Definition enums.h:3489
@ ACTION_COMMAND_HURRICANE
Definition enums.h:3492
@ ACTION_COMMAND_FLEE
Definition enums.h:3475
@ ACTION_COMMAND_SMASH
Definition enums.h:3474
@ ACTION_COMMAND_AIR_LIFT
Definition enums.h:3485
@ ACTION_COMMAND_UNUSED_MASH_A
Definition enums.h:3482
@ ACTION_COMMAND_THREE_CHANCES
Definition enums.h:3494
@ ACTION_COMMAND_BREAK_FREE
Definition enums.h:3476
@ ACTION_COMMAND_SMACK
Definition enums.h:3490
@ ACTION_COMMAND_SQUIRT
Definition enums.h:3487
@ ACTION_COMMAND_AIR_RAID
Definition enums.h:3486
@ ACTION_COMMAND_WHIRLWIND
Definition enums.h:3477
@ ACTION_COMMAND_BODY_SLAM
Definition enums.h:3484
@ ACTION_COMMAND_FIRE_SHELL
Definition enums.h:3481
@ ACTION_COMMAND_DIZZY_SHELL
Definition enums.h:3480
@ ACTION_COMMAND_NONE
Definition enums.h:3472
@ ACTION_COMMAND_UNUSED_FLEE
Definition enums.h:3479
@ ACTION_COMMAND_SPINY_SURGE
Definition enums.h:3491
@ ACTION_COMMAND_POWER_SHOCK
Definition enums.h:3488
@ ACTION_COMMAND_JUMP
Definition enums.h:3473
@ ACTION_COMMAND_TIDAL_WAVE
Definition enums.h:3495
@ ACTION_COMMAND_STOP_LEECH
Definition enums.h:3478
@ BS_FLAGS1_TUTORIAL_BATTLE
Definition enums.h:3593
@ BS_FLAGS1_PARTNER_ACTING
Definition enums.h:3587
@ BS_FLAGS1_FREE_ACTION_COMMAND
Definition enums.h:3583
@ BS_FLAGS1_AUTO_SUCCEED_ACTION
Definition enums.h:3580
@ DEMO_BTL_FLAG_ENABLED
Definition enums.h:3542
@ ABILITY_BERSERKER
Definition enums.h:457
@ ABILITY_DODGE_MASTER
Definition enums.h:436
@ ABILITY_RIGHT_ON
Definition enums.h:458
@ SOUND_LOOP_CHARGE_METER
Definition enums.h:1646
@ BLOCK_RESULT_FAIL
Definition enums.h:1974
@ BLOCK_RESULT_SUCCESS
Definition enums.h:1975
@ BLOCK_RESULT_EARLY
Definition enums.h:1973
#define ApiStatus_DONE2
Definition evt.h:118
s32 Bytecode
Definition evt.h:7
#define ApiStatus_BLOCK
Definition evt.h:116
void action_command_fire_shell_draw(void)
void action_command_fire_shell_free(void)
void action_command_fire_shell_update(void)
void action_command_flee_update(void)
void action_command_flee_draw(void)
void action_command_flee_free(void)
void btl_set_popup_duration(s32 duration)
void startup_draw_prim_rect_COPY(s16 left, s16 top, s16 right, s16 bottom, u16 r, u16 g, u16 b, u16 a)
Definition 43F0.c:804
s32 evt_get_variable(Evt *script, Bytecode var)
Definition evt.c:1689
s32 is_ability_active(s32 arg0)
Definition inventory.c:1736
u32 dma_copy(Addr romStart, Addr romEnd, void *vramDest)
Definition 43F0.c:443
s32 evt_set_variable(Evt *script, Bytecode var, s32 value)
Definition evt.c:1846
void close_action_command_instruction_popup(void)
s32 create_worker_frontUI(void(*updateFunc)(void), void(*drawFunc)(void))
Definition worker.c:63
void action_command_hammer_draw(void)
void action_command_hammer_update(void)
void action_command_hammer_free(void)
void action_command_hurricane_update(void)
void action_command_hurricane_free(void)
void action_command_hurricane_draw(void)
void action_command_jump_free(void)
void action_command_jump_draw(void)
void action_command_jump_update(void)
void action_command_mega_shock_free(void)
void action_command_mega_shock_draw(void)
void action_command_mega_shock_update(void)
void action_command_power_shock_update(void)
void action_command_power_shock_free(void)
void action_command_power_shock_draw(void)
void sfx_stop_sound(s32 soundID)
Definition sfx.c:507
#define BSS
Definition macros.h:7
#define ARRAY_COUNT(arr)
Definition macros.h:40
s32 Difficulty2D[8][2]
Definition macros.h:107
s32 Difficulty1D[8]
Definition macros.h:106
void action_command_smack_free(void)
void action_command_smack_draw(void)
void action_command_smack_update(void)
void action_command_spiny_surge_draw(void)
void action_command_spiny_surge_free(void)
void action_command_spiny_surge_update(void)
void action_command_spook_free(void)
void action_command_spook_update(void)
void action_command_spook_draw(void)
void action_command_squirt_free(void)
void action_command_squirt_update(void)
void action_command_squirt_draw(void)
#define POPUP_MSG_OFF
Definition battle.h:270
void action_command_stop_leech_free(void)
void action_command_stop_leech_draw(void)
void action_command_stop_leech_update(void)
s32 * actionCmdDifficultyTable
s32 pushInputBuffer[64]
void action_command_three_chances_draw(void)
void action_command_three_chances_free(void)
void action_command_three_chances_update(void)
void action_command_tidal_wave_update(void)
void action_command_tidal_wave_draw(void)
void action_command_tidal_wave_free(void)
void action_command_unused_flee_free(void)
void action_command_unused_flee_update(void)
void action_command_unused_flee_draw(void)
void action_command_unused_mash_a_update(void)
void action_command_unused_mash_a_free(void)
void action_command_unused_mash_a_draw(void)
GameStatus * gGameStatusPtr
Definition main_loop.c:32
PlayerData gPlayerData
Definition 77480.c:40
BattleStatus gBattleStatus
Definition battle.c:11
void action_command_whirlwind_free(void)
void action_command_whirlwind_draw(void)
void action_command_whirlwind_update(void)