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
28s32 actionCmdTableJump[] = { 7, 6, 5, 4, 3, 2, 1, 0 };
29s32 actionCmdTableHammer[] = { 11, 10, 9, 8, 7, 6, 5, 4 };
30s32 actionCmdTableFlee[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
31s32 actionCmdTableBreakFree[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
32s32 actionCmdTableWhirlwind[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
33s32 actionCmdTableStopLeech[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
34s32 actionCmdTable07[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
35s32 actionCmdTableDizzyShell[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
36s32 actionCmdTableFireShell[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
37s32 actionCmdTable0A[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
38s32 actionCmdTableBomb[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
39s32 actionCmdTableBodySlam[] = { 9, 8, 7, 6, 5, 4, 3, 2 };
40s32 actionCmdTableAirLift[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
41s32 actionCmdTableAirRaid[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
42s32 actionCmdTableSquirt[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
43s32 actionCmdTablePowerShock[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
44s32 actionCmdTableMegaShock[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
45s32 actionCmdTableSmack[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
46s32 actionCmdTableSpinySurge[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
47s32 actionCmdTableHurricane[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
48s32 actionCmdTableSpook[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
49s32 actionCmdTableWaterBlock[] = { 6, 3, 5, 3, 4, 3, 2, 3, 1, 3, 0, 3, 0, 2, 0, 1 };
50s32 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(07),
64 AC_TBL_ENTRY(dizzy_shell),
65 AC_TBL_ENTRY(fire_shell),
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(water_block),
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
104 }
105
106 if (arg0 < 0) {
107 arg0 = 0;
108 }
109 if (arg0 > 7) {
110 arg0 = 7;
111 }
112
113 return arg0;
114}
115
116void draw_mash_meter(s32 posX, s32 posY, s32 fillValue, s32 colorMode) {
117 ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
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 (!actionCommandStatus->showHud) {
127 return;
128 }
129
130 posX -= 28;
131 posY -= 4;
132
133 maxCutOff = actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals];
134
135 if (fillValue < 0) {
136 fillValue = 0;
137 }
138
139 width = 0;
140 for (i = 0; i < actionCommandStatus->mashMeterIntervals; i++) {
141 cutOff = actionCommandStatus->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 - actionCommandStatus->barFillWidth;
154 if (abs(offsetX) >= sMashMeterSmoothDivisor * 100) {
155 actionCommandStatus->barFillWidth += offsetX / sMashMeterSmoothDivisor;
156 } else {
157 actionCommandStatus->barFillWidth = width;
158 }
159
160 offsetX = 0;
161 for (i = 0; i < actionCommandStatus->mashMeterIntervals; i++) {
162 cutOff = actionCommandStatus->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 < actionCommandStatus->mashMeterIntervals - 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 < actionCommandStatus->mashMeterIntervals; 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 = actionCommandStatus->mashMeterCutoffs[i + 1];
200 if (cutOff > fillValue) {
201 cutOff = fillValue;
202 }
203
204 filledWidth = cutOff * 60 / maxCutOff - offsetX;
205 width = actionCommandStatus->barFillWidth / 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 >= actionCommandStatus->mashMeterIntervals - 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 sMashMeterSmoothDivisor = 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 sMashMeterSmoothDivisor = 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 sMashMeterSmoothDivisor = divisor;
253 draw_mash_meter(posX, posY, fillValue, MASH_METER_MODE_BLINK);
254}
255
257 ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
258
259 actionCommandStatus->autoSucceed = FALSE;
260 actionCommandStatus->berserkerEnabled = FALSE;
261
264 actionCommandStatus->autoSucceed = TRUE;
265 }
266
268 actionCommandStatus->showHud = FALSE;
269 actionCommandStatus->berserkerEnabled = TRUE;
270
271 if (rand_int(100) < 25) {
272 actionCommandStatus->autoSucceed = TRUE;
273 }
274 }
275 }
276
278 actionCommandStatus->autoSucceed = TRUE;
279 }
280
282 actionCommandStatus->autoSucceed = TRUE;
283 actionCommandStatus->showHud = FALSE;
284 }
285}
286
288 ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
289
292 }
293
294 switch (actionCommandStatus->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
447 ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
448
449 switch (actionCommandStatus->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
523 actionCommandStatus->actionCommandID = ACTION_COMMAND_NONE;
524 gBattleStatus.flags1 &= ~BS_FLAGS1_2000;
525 gBattleStatus.flags1 &= ~BS_FLAGS1_FREE_ACTION_COMMAND;
526 gBattleStatus.flags1 &= ~BS_FLAGS1_4000;
529}
530
531void func_80268E88(void) {
532 ActionCommandStatus* actionCmdStatus = &gActionCommandStatus;
534 actionCmdStatus->actionCommandID = 0;
535}
536
537s32 check_block_input(s32 buttonMask) {
538 BattleStatus* battleStatus = &gBattleStatus;
539 PlayerData* playerData = &gPlayerData;
540 ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
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
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 actionCommandStatus->hitsTakenIsMax = FALSE;
563 } else {
564 actionCommandStatus->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 && !actionCommandStatus->hitsTakenIsMax) {
635 playerData->hitsBlocked++;
636 }
637
638 return block;
639}
640
641void func_80269118(void) {
642 PlayerData* playerData = &gPlayerData;
643 ActionCommandStatus *actionCommandStatus = &gActionCommandStatus;
644
645 if (!actionCommandStatus->autoSucceed) {
646 if (playerData->actionCommandAttempts < 9999) {
647 playerData->actionCommandAttempts++;
648 actionCommandStatus->hitsTakenIsMax = FALSE;
649 } else {
650 actionCommandStatus->hitsTakenIsMax = TRUE;
651 }
652 }
653}
654
655void func_80269160(void) {
656 PlayerData* playerData = &gPlayerData;
657
659 playerData->actionCommandSuccesses++;
660 }
661}
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(GetActionSuccess) {
681 evt_set_variable(script, *script->ptrReadPos, gBattleStatus.actionSuccess);
682 return ApiStatus_DONE2;
683}
684
685API_CALLABLE(SetActionSuccess) {
686 gBattleStatus.actionSuccess = 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) {
711 ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
712
713 if (evt_get_variable(script, *script->ptrReadPos) != 0) {
714 actionCommandStatus->autoSucceed = TRUE;
715 } else {
716 actionCommandStatus->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(CloseActionCommandInfo) {
727 ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
728
729 if (isInitialCall) {
730 switch (actionCommandStatus->actionCommandID) {
733 return ApiStatus_DONE2;
734 default:
736 return ApiStatus_BLOCK;
737 }
738 }
739
742
743 return ApiStatus_DONE2;
744}
745
746API_CALLABLE(func_80269470) {
747 if (isInitialCall) {
749 return ApiStatus_BLOCK;
750 }
751
753 return ApiStatus_DONE2;
754}
755
756API_CALLABLE(ShowActionHud) {
757 ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
758
759 if (evt_get_variable(script, *script->ptrReadPos) == 0) {
760 actionCommandStatus->showHud = FALSE;
761 } else {
762 actionCommandStatus->showHud = TRUE;
763 }
764 return ApiStatus_DONE2;
765}
766
767API_CALLABLE(GetActionSuccessCopy) {
768 evt_set_variable(script, *script->ptrReadPos, gBattleStatus.actionSuccess);
769 return ApiStatus_DONE2;
770}
771
772API_CALLABLE(GetActionResult) {
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(GetActionQuality) {
788 evt_set_variable(script, *script->ptrReadPos, gBattleStatus.actionQuality);
789 return ApiStatus_DONE2;
790}
791
792API_CALLABLE(SetActionQuality) {
793 gBattleStatus.actionQuality = evt_get_variable(script, *script->ptrReadPos);
794 return ApiStatus_DONE2;
795}
796
797API_CALLABLE(func_80269600) {
798 evt_set_variable(script, *script->ptrReadPos, gBattleStatus.unk_85);
799 return ApiStatus_DONE2;
800}
801
802API_CALLABLE(func_8026962C) {
803 gBattleStatus.unk_85 = evt_get_variable(script, *script->ptrReadPos);
804 return ApiStatus_DONE2;
805}
void action_command_07_update(void)
void action_command_07_free(void)
void action_command_07_draw(void)
void action_command_0A_draw(void)
void action_command_0A_update(void)
void action_command_0A_free(void)
#define AC_TBL_ENTRY(name)
Definition action_cmd.c:52
u8 mashMeter_cutOffColors[15]
Definition action_cmd.c:20
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
void action_command_draw(void)
Definition action_cmd.c:371
void draw_mash_meter_multicolor(s32 posX, s32 posY, s32 fillValue)
Definition action_cmd.c:226
s32 actionCmdTableSpinySurge[]
Definition action_cmd.c:46
void func_80269160(void)
Definition action_cmd.c:655
s32 actionCmdTableSmack[]
Definition action_cmd.c:45
BSS s8 ApplyingBuff
Definition action_cmd.c:86
s32 actionCmdTableWhirlwind[]
Definition action_cmd.c:32
s32 actionCmdTableJump[]
Definition action_cmd.c:28
s32 actionCmdTableHammer[]
Definition action_cmd.c:29
s32 actionCmdTableFlee[]
Definition action_cmd.c:30
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
s32 actionCmdTable0A[]
Definition action_cmd.c:37
s32 actionCmdTableHurricane[]
Definition action_cmd.c:47
s32 actionCmdTable07[]
Definition action_cmd.c:34
s32 actionCmdTableTidalWave[]
Definition action_cmd.c:50
u8 mashMeter_bgColors[15]
Definition action_cmd.c:4
s32 actionCmdTableFireShell[]
Definition action_cmd.c:36
void draw_mash_meter(s32 posX, s32 posY, s32 fillValue, s32 colorMode)
Definition action_cmd.c:116
s32 actionCmdTableBodySlam[]
Definition action_cmd.c:39
void draw_mash_meter_multicolor_with_divisor(s32 posX, s32 posY, s32 fillValue, s32 divisor)
Definition action_cmd.c:231
s32 adjust_action_command_difficulty(s32 arg0)
Definition action_cmd.c:101
s32 actionCmdTableMegaShock[]
Definition action_cmd.c:44
s32 actionCmdTablePowerShock[]
Definition action_cmd.c:43
s32 actionCmdTableStopLeech[]
Definition action_cmd.c:33
void draw_mash_meter_mode_with_divisor(s32 posX, s32 posY, s32 fillValue, s32 divisor, s32 colorMode)
Definition action_cmd.c:241
BSS s32 D_8029FBC4_pad[3]
Definition action_cmd.c:83
void func_80268E88(void)
Definition action_cmd.c:531
BSS s32 sMashMeterSmoothDivisor
Definition action_cmd.c:82
u8 mashMeter_fillColors[15]
Definition action_cmd.c:12
s32 actionCmdTableWaterBlock[]
Definition action_cmd.c:49
BSS s32 D_8029FBD8_pad[2]
Definition action_cmd.c:87
void action_command_update(void)
Definition action_cmd.c:287
void draw_mash_meter_blink(s32 posX, s32 posY, s32 fillValue)
Definition action_cmd.c:246
s32 actionCmdTableBomb[]
Definition action_cmd.c:38
s32 actionCmdTableBreakFree[]
Definition action_cmd.c:31
void * actionCommandDmaTable[]
Definition action_cmd.c:55
void action_command_init_status(void)
Definition action_cmd.c:256
s32 actionCmdTableSquirt[]
Definition action_cmd.c:42
s32 actionCmdTableDizzyShell[]
Definition action_cmd.c:35
s32 actionCmdTableAirLift[]
Definition action_cmd.c:40
s32 actionCmdTableSpook[]
Definition action_cmd.c:48
s32 check_block_input(s32 buttonMask)
Definition action_cmd.c:537
s32 actionCmdTableAirRaid[]
Definition action_cmd.c:41
void func_80269118(void)
Definition action_cmd.c:641
@ MASH_METER_MODE_MULTI_COLOR
Definition action_cmd.h:32
@ MASH_METER_MODE_BLINK
Definition action_cmd.h:31
@ ACTION_COMMAND_MODE_TUTORIAL_BLOCK
Definition action_cmd.h:37
@ ACTION_COMMAND_MODE_NOT_LEARNED
Definition action_cmd.h:38
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_WATER_BLOCK
Definition enums.h:3494
@ 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_07
Definition enums.h:3479
@ 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_SPINY_SURGE
Definition enums.h:3491
@ ACTION_COMMAND_POWER_SHOCK
Definition enums.h:3488
@ ACTION_COMMAND_JUMP
Definition enums.h:3473
@ ACTION_COMMAND_0A
Definition enums.h:3482
@ ACTION_COMMAND_TIDAL_WAVE
Definition enums.h:3495
@ ACTION_COMMAND_STOP_LEECH
Definition enums.h:3478
@ BS_FLAGS1_TUTORIAL_BATTLE
Definition enums.h:3594
@ BS_FLAGS1_PARTNER_ACTING
Definition enums.h:3588
@ BS_FLAGS1_FREE_ACTION_COMMAND
Definition enums.h:3584
@ BS_FLAGS1_AUTO_SUCCEED_ACTION
Definition enums.h:3581
@ DEMO_BTL_FLAG_ENABLED
Definition enums.h:3543
@ ABILITY_BERSERKER
Definition enums.h:457
@ ABILITY_DODGE_MASTER
Definition enums.h:436
@ ABILITY_RIGHT_ON
Definition enums.h:458
@ SOUND_LOOP_CHARGE_BAR
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:805
s32 evt_get_variable(Evt *script, Bytecode var)
Definition evt.c:1690
s32 is_ability_active(s32 arg0)
Definition inventory.c:1725
u32 dma_copy(Addr romStart, Addr romEnd, void *vramDest)
Definition 43F0.c:444
s32 evt_set_variable(Evt *script, Bytecode var, s32 value)
Definition evt.c:1847
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
#define A(sym)
Definition macros.h:36
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)
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_tidal_wave_update(void)
void action_command_tidal_wave_draw(void)
void action_command_tidal_wave_free(void)
GameStatus * gGameStatusPtr
Definition main_loop.c:32
PlayerData gPlayerData
Definition 77480.c:40
BattleStatus gBattleStatus
Definition battle.c:11
void action_command_water_block_draw(void)
void action_command_water_block_update(void)
void action_command_water_block_free(void)
void action_command_whirlwind_free(void)
void action_command_whirlwind_draw(void)
void action_command_whirlwind_update(void)