Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
level_up.c
Go to the documentation of this file.
1#include "common.h"
2#include "effects.h"
3#include "hud_element.h"
4#include "message_ids.h"
5#include "ld_addrs.h"
6#include "model.h"
8#include "script_api/battle.h"
9#include "entity.h"
10#include "sprite/npc/BattleGoombario.h"
11#include "sprite/npc/BattleKooper.h"
12#include "sprite/npc/BattleBombette.h"
13#include "sprite/npc/BattleParakarry.h"
14#include "sprite/npc/Goompa.h"
15#include "sprite/npc/BattleWatt.h"
16#include "sprite/npc/BattleSushie.h"
17#include "sprite/npc/BattleLakilester.h"
18#include "sprite/npc/BattleBow.h"
19#include "sprite/player.h"
20
23
24enum {
25 // BTL_SUBSTATE_INIT = 0,
42};
43
44// menu position index for level up screen
45enum {
49};
50
51// first index for LevelUpStatTextIDs
52enum {
56};
57
58// second index for LevelUpStatTextIDs
59enum {
67};
68
73
87
101
103
109
113
144
178
180
182
197
210
212
218
257
296
298
299void draw_content_level_up_textbox(void* data, s32 posX, s32 posY);
300void draw_content_cant_increase_popup(void* data, s32 posX, s32 posY);
301
302API_CALLABLE(GetRemainingStarPointsReward) {
303 script->varTable[0] = (s8)gBattleStatus.totalStarPoints;
304 return ApiStatus_DONE2;
305}
306
307API_CALLABLE(GetStarPointDigitScripts) {
308 s32 levelUp = FALSE;
309
310 script->varTable[10] = gBattleStatus.totalStarPoints / 100; // star points in hundreds (levels to gain)
311 script->varTable[11] = (gBattleStatus.totalStarPoints % 100) / 10; // star points in tens
312 script->varTable[12] = gBattleStatus.totalStarPoints % 10; // star points in ones
313
314 if (script->varTable[10] > 0) {
315 script->varTablePtr[10] = starpoint_digit_scripts[script->varTable[10]];
316 levelUp = TRUE;
317 } else {
318 script->varTablePtr[10] = starpoint_space_script;
319 }
320
321 if ((script->varTable[11] > 0) || levelUp) {
322 script->varTablePtr[11] = starpoint_digit_scripts[script->varTable[11]];
323 } else {
324 script->varTablePtr[11] = starpoint_space_script;
325 }
326
327 script->varTablePtr[12] = starpoint_digit_scripts[script->varTable[12]];
328 return ApiStatus_DONE2;
329}
330
331API_CALLABLE(AwaitBattleRewardsDone) {
333 return ApiStatus_DONE2;
334 } else {
335 return ApiStatus_BLOCK;
336 }
337}
338
339API_CALLABLE(InitStarPointModelFlags) {
341
343 model->flags &= ~MODEL_FLAGS_MASK_FFF0 ;
346 model->flags &= ~MODEL_FLAGS_MASK_FFF0 ;
349 model->flags &= ~MODEL_FLAGS_MASK_FFF0 ;
352 model->flags &= ~MODEL_FLAGS_MASK_FFF0 ;
354
355 return ApiStatus_DONE2;
356}
357
358API_CALLABLE(InitLevelUpModelFlags) {
362
363 return ApiStatus_DONE2;
364}
365
366API_CALLABLE(MakeLevelUpConfetti) {
367 fx_confetti(3, 0.0f, 100.0f, 0.0f, 1.0f, 120);
368 return ApiStatus_DONE2;
369}
370
372 Set(LVarF, 0)
374 IfEq(LVar0, 0)
375 Return
376 EndIf
377 IfLt(LVar0, 2)
379 Call(SetVirtualEntityPosition, LVar6, -278, 68, 70)
380 Call(SetVirtualEntityScale, LVar6, Float(0.5), Float(0.5), Float(0.5))
381 Else
382#if VERSION_JP
384#else
386#endif
387 Call(SetVirtualEntityPosition, LVar6, -278, 68, 70)
388 Call(SetVirtualEntityScale, LVar6, Float(0.5), Float(0.5), Float(0.5))
389 Set(LFlag0, TRUE)
390 EndIf
392 CaseGt(99)
393 Set(LVarF, 3)
394 CaseGt(9)
395 Set(LVarF, 2)
397 Set(LVarF, 1)
401 Call(SetVirtualEntityPosition, LVar7, -353, 68, 70)
402 Call(SetVirtualEntityScale, LVar7, Float(0.5), Float(0.5), Float(0.5))
404 Call(SetVirtualEntityPosition, LVar8, -338, 68, 70)
405 Call(SetVirtualEntityScale, LVar8, Float(0.5), Float(0.5), Float(0.5))
407 Call(SetVirtualEntityPosition, LVar9, -323, 68, 70)
408 Call(SetVirtualEntityScale, LVar9, Float(0.5), Float(0.5), Float(0.5))
411 CaseEq(3)
412 Set(LVar0, -197)
413 CaseEq(2)
414 Set(LVar0, -204)
415 CaseEq(1)
416 Set(LVar0, -211)
418 Loop(10)
419 Add(LVar0, 20)
420 Set(LVar1, LVar0)
421 Add(LVar1, -78)
423 Set(LVar1, LVar0)
424#if VERSION_JP
425 Add(LVar1, -154)
426#else
427 Add(LVar1, -146)
428#endif
430 Set(LVar1, LVar0)
431#if VERSION_JP
432 Add(LVar1, -139)
433#else
434 Add(LVar1, -131)
435#endif
437 Set(LVar1, LVar0)
438#if VERSION_JP
439 Add(LVar1, -124)
440#else
441 Add(LVar1, -116)
442#endif
444 Wait(1)
445 EndLoop
448 CaseEq(3)
449 Set(LVar0, 3)
450 CaseEq(2)
451 Set(LVar0, -4)
452 CaseEq(1)
453 Set(LVar0, -11)
455 Loop(10)
456 Add(LVar0, 20)
457 Set(LVar1, LVar0)
458 Add(LVar1, -78)
460 Set(LVar1, LVar0)
461 Add(LVar1, -154)
463 Set(LVar1, LVar0)
464 Add(LVar1, -139)
466 Set(LVar1, LVar0)
467 Add(LVar1, -124)
469 Wait(1)
470 EndLoop
475 Return
476 End
477};
478
484 Wait(4)
487 Thread
488 Wait(8)
489 Call(ShakeCam, 1, 0, 5, Float(3.0))
490 Call(ShakeCam, 1, 0, 3, Float(2.25))
491 Call(ShakeCam, 1, 0, 4, Float(1.2))
492 Call(ShakeCam, 1, 0, 6, Float(0.45))
493 Call(ShakeCam, 1, 0, 8, Float(0.15))
495 Thread
496 Set(LVar0, 210)
497 Loop(10)
498 Sub(LVar0, 10)
500 Wait(1)
501 EndLoop
503 Wait(8)
504 Return
505 End
506};
507
511 Actor* player = battleStatus->playerActor;
512 Actor* partner = battleStatus->partnerActor;
516 s32 x, y, z;
517 s32 width;
519
520 Evt* takeTurnScript;
521 Evt* script;
522
525
526 s32 deltaSP;
527 s32 prevSP;
528
529 s32 i;
530 s32 j;
531
533
534 switch (gBattleSubState) {
536 if (battleStatus->pendingStarPoints <= 0) {
538 EndBattleRewardTotal = battleStatus->totalStarPoints * 100;
539 pendingLevelUps = 0;
540 D_8029FB50 = 0;
541 bFadeToBlackAmt = 0;
545
546 prevSP = playerData->starPoints + battleStatus->totalStarPoints;
547 if (prevSP > 99) {
548 bgm_set_song(0, SONG_LEVEL_UP, 0, 250, 8);
549 } else {
550 bgm_set_song(0, SONG_BATTLE_END, 0, 250, 8);
551 }
552
559 }
560 break;
562 if (CelebrateSubstateTime != 0) {
564 } else if (btl_cam_is_moving_done()) {
568 // divide reward into 20 increments
571 player->takeTurnScript = script;
573 player->takeTurnScriptID = script->id;
574 script->owner1.actorID = ACTOR_PLAYER;
576 }
577 break;
579 if (CelebrateSubstateTime == 0) {
580 if (battleStatus->totalStarPoints != 0) {
581 // determine the remaining star point reward after this step and give the difference to the player
583 prevSP = battleStatus->totalStarPoints;
584 battleStatus->totalStarPoints = EndBattleRewardTotal / 100;
585 deltaSP = prevSP - battleStatus->totalStarPoints;
586 if (deltaSP > 0) {
588 }
589
590 playerData->starPoints += deltaSP;
591 bFadeToBlackAmt++; // ??
592 if (EndBattleRewardStep == 0 && battleStatus->totalStarPoints != 0) {
593 playerData->starPoints++;
594 }
595 }
596 if (playerData->level >= 27) {
597 playerData->starPoints = 0;
598 }
599 if (playerData->starPoints >= 100) {
600 pendingLevelUps = 1;
601 playerData->starPoints -= 100;
602 }
603 if (playerData->level + pendingLevelUps == 27) {
604 playerData->starPoints = 0;
605 }
606 if (battleStatus->totalStarPoints == 0) {
607 if (EndBattleRewardStep == 0) {
610 if (partner != NULL) {
612 }
613 battleStatus->battlePhase = PHASE_CELEBRATE;
615 player->takeTurnScript = script;
616 player->takeTurnScriptID = script->id;
617 script->owner1.actorID = ACTOR_PLAYER;
618 if (partner != NULL) {
619 script = start_script(partner->takeTurnSource, EVT_PRIORITY_A, 0);
620 partner->takeTurnScript = script;
621 partner->takeTurnScriptID = script->id;
622 script->owner1.actorID = ACTOR_PARTNER;
623 }
626 } else {
628 }
629 }
630 } else {
632 }
633 break;
635 if (CelebrateSubstateTime == 0) {
636 if (pendingLevelUps == 0) {
638 } else {
640 }
641 break;
642 }
644 break;
646 if (CelebrateStateTime >= 99) {
647 playerData->level++;
649 btl_cam_move(5);
654 }
655 break;
663 mdl_set_shroud_tint_params(0, 0, 0, 0);
664 break;
666 if (CelebrateSubstateTime == 18) {
667 playerData->curHP = playerData->curMaxHP;
668 playerData->curFP = playerData->curMaxFP;
669 x = player->curPos.x + 0.0f;
670 y = player->curPos.y + 35.0f;
671 z = player->curPos.z;
672 fx_recover(0, x, y, z, playerData->curHP);
673 x = player->curPos.x + 20.0f;
674 y = player->curPos.y + 25.0f;
675 z = player->curPos.z;
676 fx_recover(1, x, y, z, playerData->curFP);
677 playerData->starPower = playerData->maxStarPower * SP_PER_BAR;
678 }
679
680 if (CelebrateSubstateTime != 0) {
682 if (CelebrateSubstateTime < 10) {
683 mdl_set_shroud_tint_params(0, 0, 0, ((10 - CelebrateSubstateTime) * 16) & 0xF0);
684 }
685 } else {
690
695
700
705
710
711 for (i = 1; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_FP]); i++) {
716 }
717
722
723 for (i = 1; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_HP]); i++) {
728 }
729
734
735 for (i = 1; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_BP]); i++) {
740 }
741
745
746 if (playerData->hardMaxFP != 50) {
747 // current FP
748 tensDigit = playerData->curMaxFP / 10;
749 onesDigit = playerData->curMaxFP % 10;
752 if (tensDigit != 0) {
754 }
756 hud_element_set_render_pos(hid, x - 14, y + 46);
757
762 hud_element_set_render_pos(hid, x - 8, y + 46);
763
768 hud_element_set_render_pos(hid, x - 3, y + 46);
769
770 // upgraded FP
771 tensDigit = (playerData->curMaxFP + 5) / 10;
772 onesDigit = (playerData->curMaxFP + 5) % 10;
775 if (tensDigit != 0) {
777 }
779 hud_element_set_render_pos(hid, x + 3, y + 46);
780
785 hud_element_set_render_pos(hid, x + 10, y + 46);
786 } else {
787 // upgraded FP only
789 tensDigit = playerData->curMaxFP / 10;
790 onesDigit = playerData->curMaxFP % 10;
792 if (tensDigit != 0) {
794 }
796 hud_element_set_render_pos(hid, x - 6, y + 46);
797
802 hud_element_set_render_pos(hid, x + 2, y + 46);
804 }
805
813 hud_element_set_render_pos(hid, x + 17, y + 46);
814 }
815
816 if (playerData->hardMaxHP != 50) {
817 // current HP
818 tensDigit = playerData->curMaxHP / 10;
819 onesDigit = playerData->curMaxHP % 10;
820
823 if (tensDigit != 0) {
825 }
827 hud_element_set_render_pos(hid, x - 14, y + 46);
828
833 hud_element_set_render_pos(hid, x - 8, y + 46);
834
839 hud_element_set_render_pos(hid, x - 3, y + 46);
840
841 tensDigit = (playerData->curMaxHP + 5) / 10;
842 onesDigit = (playerData->curMaxHP + 5) % 10;
843
846 if (tensDigit != 0) {
848 }
850 hud_element_set_render_pos(hid, x + 3, y + 46);
851
856 hud_element_set_render_pos(hid, x + 10, y + 46);
857 } else {
858 tensDigit = playerData->curMaxHP / 10;
859 onesDigit = playerData->curMaxHP % 10;
860
863 if (tensDigit != 0) {
865 }
867 hud_element_set_render_pos(hid, x - 6, y + 46);
868
873 hud_element_set_render_pos(hid, x + 2, y + 46);
875 }
876
884 hud_element_set_render_pos(hid, x + 17, y + 46);
885 }
886
887 if (playerData->maxBP != 30) {
888 tensDigit = playerData->maxBP / 10;
889 onesDigit = playerData->maxBP % 10;
890
893 if (tensDigit != 0) {
895 }
897 hud_element_set_render_pos(hid, x - 14, y + 46);
898
903 hud_element_set_render_pos(hid, x - 8, y + 46);
904
909 hud_element_set_render_pos(hid, x - 3, y + 46);
910
911 tensDigit = (playerData->maxBP + 3) / 10;
912 onesDigit = (playerData->maxBP + 3) % 10;
913
916 if (tensDigit != 0) {
918 }
920 hud_element_set_render_pos(hid, x + 3, y + 46);
921
926 hud_element_set_render_pos(hid, x + 10, y + 46);
927 } else {
932 hud_element_set_render_pos(hid, x - 6, y + 46);
933
938 hud_element_set_render_pos(hid, x + 2, y + 46);
940 }
941
945 hud_element_set_tint(hid, 255, 255, 255);
947 hud_element_set_transform_rotation(hid, 0.0f, 0.0f, 180.0f);
948 hud_element_set_transform_scale(hid, 1.0f, 1.5f, 1.0f);
951
955 battleStatus->curSubmenu = MENU_FP;
956
959 }
960 break;
964 x -= 20;
966
967 for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_HP]); i++) {
970 x -= 20;
972 }
973
976 y -= 20;
978
981 y -= 20;
983
984 for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_FP]); i++) {
987 y -= 20;
989 }
990
993 x += 20;
995
996 for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_BP]); i++) {
999 x += 20;
1001 }
1002
1004 if (CelebrateSubstateTime == 0) {
1005 hud_element_set_tint(hid, 128, 128, 128);
1006#if VERSION_JP
1007 x = 32;
1008 y = 186;
1010#else
1011 x = 20;
1012 y = 186;
1014#endif
1017 }
1018 break;
1020 if (battleStatus->curButtonsPressed & BUTTON_A) {
1021 if (!CantLevelUpStat[battleStatus->curSubmenu]) {
1025 } else {
1028 }
1029 break;
1030 }
1031
1032 newSubmenu = currentSubmenu = battleStatus->curSubmenu;
1033 if (battleStatus->curButtonsHeld & BUTTON_STICK_LEFT) {
1034 newSubmenu--;
1035 }
1036 if (battleStatus->curButtonsHeld & BUTTON_STICK_RIGHT) {
1037 newSubmenu++;
1038 }
1039 if (newSubmenu < 0) {
1040 newSubmenu = 0;
1041 }
1042 if (newSubmenu > 2) {
1043 newSubmenu = 2;
1044 }
1045 if (newSubmenu != currentSubmenu) {
1047 battleStatus->curSubmenu = newSubmenu;
1048 }
1049
1051 if (CelebrateStateTime > 100) {
1052 fx_confetti(3, 0.0f, 100.0f, 0.0f, 1.0f, 120);
1054 }
1055 break;
1059
1060 switch (battleStatus->curSubmenu) {
1061 case 0:
1062 playerData->hardMaxHP += 5;
1063 playerData->curMaxHP += 5;
1064 playerData->curHP += 5;
1065 if (playerData->curMaxHP > 75) {
1066 playerData->curMaxHP = 75;
1067 }
1068 if (playerData->curHP > playerData->curMaxHP) {
1069 playerData->curHP = playerData->curMaxHP;
1070 }
1071 player->maxHP = playerData->curMaxHP;
1072 player->curHP = playerData->curHP;
1073 break;
1074 case 1:
1075 playerData->hardMaxFP += 5;
1076 playerData->curMaxFP += 5;
1077 playerData->curFP += 5;
1078 if (playerData->curMaxFP > 75) {
1079 playerData->curMaxFP = 75;
1080 }
1081 if (playerData->curFP > playerData->curMaxFP) {
1082 playerData->curFP = playerData->curMaxFP;
1083 }
1084 break;
1085 case 2:
1086 playerData->maxBP += 3;
1087 if (playerData->maxBP > 30) {
1088 playerData->maxBP = 30;
1089 }
1090 break;
1091 }
1092
1094
1095 if (partner != NULL) {
1096 script = start_script(partner->takeTurnSource, EVT_PRIORITY_A, 0);
1097 partner->takeTurnScript = script;
1098 partner->takeTurnScriptID = script->id;
1099 script->owner1.actorID = ACTOR_PARTNER;
1100 }
1102 bgm_set_song(0, -1, 0, 2000, 8);
1103 }
1104 bFadeToBlackAmt = 0;
1106 break;
1108 if ((gGameStatusPtr->frameCounter % 2) != 0) {
1109 switch (battleStatus->curSubmenu) {
1110 case MENU_HP:
1112 break;
1113 case MENU_FP:
1116 break;
1117 case MENU_BP:
1119 break;
1120 }
1121 } else {
1122 switch (battleStatus->curSubmenu) {
1123 case MENU_HP:
1125 break;
1126 case MENU_FP:
1129 break;
1130 case MENU_BP:
1132 break;
1133 }
1134 }
1135 if (bFadeToBlackAmt == 255) {
1137 break;
1138 }
1139 bFadeToBlackAmt += 10;
1140 if (bFadeToBlackAmt > 255) {
1141 bFadeToBlackAmt = 255;
1142 }
1143 break;
1149
1150 for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs); i++) {
1151 for (j = 0; j < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_FP]); j++) {
1153 }
1154 }
1155
1157 mdl_set_shroud_tint_params(0, 0, 0, 0);
1160 break;
1162 width = get_msg_width(MSG_Menus_CantIncrease, 0) + 31;
1163 x = 160 - (width / 2);
1164 y = 80;
1169 break;
1173 }
1174 if (CelebrateSubstateTime != 0) {
1176 break;
1177 }
1180 break;
1182 if (battleStatus->curButtonsPressed & (BUTTON_A | BUTTON_B)) {
1183 CelebrateStateTime = 99;
1184#if VERSION_JP
1186#endif
1187 }
1188 if (CelebrateStateTime >= 99) {
1190 bgm_set_song(0, -1, 0, 1500, 8);
1191 }
1192 bFadeToBlackAmt = 0;
1193 btl_cam_set_params(TRUE, 270, 100, 8, 0, 0x2400, 100);
1195 if (partner != NULL) {
1197 }
1200 break;
1201 }
1202 break;
1204 if (CelebrateSubstateTime != 0) {
1206 if (CelebrateSubstateTime == 0) {
1208 }
1209 } else {
1210 player->yaw = 0.0f;
1211 if (partner != NULL) {
1212 partner->yaw = 0.0f;
1213 }
1214
1215 player->curPos.x += 4.0f;
1216 if (partner != NULL) {
1217 partner->curPos.x += 4.0f;
1218 }
1219 }
1220 if (bFadeToBlackAmt == 255) {
1222 break;
1223 }
1224 bFadeToBlackAmt += 20;
1225 if (bFadeToBlackAmt > 255) {
1226 bFadeToBlackAmt = 255;
1227 }
1228 break;
1229 case BTL_SUBSTATE_DONE:
1230 if (does_script_exist(player->takeTurnScriptID)) {
1232 }
1233 if (partner != NULL && does_script_exist(partner->takeTurnScriptID)) {
1234 kill_script_by_ID(partner->takeTurnScriptID);
1235 }
1238 break;
1239 }
1241}
1242
1245 s32 x;
1246 s32 y;
1247 s32 d1;
1248 s32 d2;
1249 s32 d3;
1250
1251 switch (phase) {
1252 case 0: // before choice
1253 d1 = 100;
1254 d2 = 100;
1255 d3 = 100;
1256 break;
1257 case 1: // choosing
1258 switch (battleStatus->curSubmenu) {
1259 case MENU_HP:
1260 d1 = 0;
1261 d2 = 100;
1262 d3 = 100;
1263 break;
1264 case MENU_FP:
1265 d1 = 100;
1266 d2 = 0;
1267 d3 = 100;
1268 break;
1269 default:
1270 d1 = 100;
1271 d2 = 100;
1272 d3 = 0;
1273 break;
1274 }
1275 break;
1276 default: // after choice
1277 d1 = 100;
1278 d2 = 100;
1279 d3 = 100;
1280 break;
1281 }
1282
1284 draw_box(0, WINDOW_STYLE_15, x - 22, y - 22, 0, 44, 44, 255, d1, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL,
1287 draw_box(0, WINDOW_STYLE_15, x - 22, y - 22, 0, 44, 44, 255, d2, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL,
1290 draw_box(0, WINDOW_STYLE_15, x - 22, y - 22, 0, 44, 44, 255, d3, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL,
1292}
1293
1296 s32 rotZ;
1297 s32 id;
1298 s32 i;
1299 s32 j;
1300
1301 switch (gBattleSubState) {
1304 id = LevelUpStatEmblemIDs[0];
1305 hud_element_set_tint(id, 128, 128, 128);
1307 id = LevelUpStatEmblemIDs[3];
1308 hud_element_set_tint(id, 128, 128, 128);
1310 id = LevelUpStatEmblemIDs[1];
1311 hud_element_set_tint(id, 128, 128, 128);
1313 id = LevelUpStatEmblemIDs[2];
1314 hud_element_set_tint(id, 128, 128, 128);
1316
1317 for (j = 0; j < ARRAY_COUNT(LevelUpStatTextIDs); j++) {
1318 for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_FP]); i++) {
1319 id = LevelUpStatTextIDs[j][i];
1320
1321 hud_element_set_tint(id, 128, 128, 128);
1323 }
1324 }
1325 break;
1329 switch (battleStatus->curSubmenu) {
1330 case MENU_HP:
1331 rotZ = 152;
1332 hud_element_set_tint(LevelUpStatEmblemIDs[0], 255, 255, 255);
1333 hud_element_set_tint(LevelUpStatEmblemIDs[3], 128, 128, 128);
1334 hud_element_set_tint(LevelUpStatEmblemIDs[1], 128, 128, 128);
1335 hud_element_set_tint(LevelUpStatEmblemIDs[2], 128, 128, 128);
1336
1337 for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_FP]); i++) {
1339
1340 hud_element_set_tint(id, 128, 128, 128);
1341 }
1342
1343 for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_HP]); i++) {
1345
1346 hud_element_set_tint(id, 255, 255, 255);
1347 }
1348
1349 for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_BP]); i++) {
1351
1352 hud_element_set_tint(id, 128, 128, 128);
1353 }
1354
1355 id = LevelUpStatEmblemIDs[0];
1358 }
1359 id = LevelUpStatEmblemIDs[3];
1362 }
1363 id = LevelUpStatEmblemIDs[1];
1366 }
1367 id = LevelUpStatEmblemIDs[2];
1370 }
1371 break;
1372 case MENU_FP:
1373 rotZ = 180;
1374 hud_element_set_tint(LevelUpStatEmblemIDs[0], 128, 128, 128);
1375 hud_element_set_tint(LevelUpStatEmblemIDs[3], 255, 255, 255);
1376 hud_element_set_tint(LevelUpStatEmblemIDs[1], 255, 255, 255);
1377 hud_element_set_tint(LevelUpStatEmblemIDs[2], 128, 128, 128);
1378
1379 for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_FP]); i++) {
1381
1382 hud_element_set_tint(id, 255, 255, 255);
1383 }
1384
1385 for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_HP]); i++) {
1387
1388 hud_element_set_tint(id, 128, 128, 128);
1389 }
1390
1391 for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_BP]); i++) {
1393
1394 hud_element_set_tint(id, 128, 128, 128);
1395 }
1396 break;
1397 case MENU_BP:
1398 default:
1399 rotZ = 208;
1400 hud_element_set_tint(LevelUpStatEmblemIDs[0], 128, 128, 128);
1401 hud_element_set_tint(LevelUpStatEmblemIDs[3], 128, 128, 128);
1402 hud_element_set_tint(LevelUpStatEmblemIDs[1], 128, 128, 128);
1403 hud_element_set_tint(LevelUpStatEmblemIDs[2], 255, 255, 255);
1404
1405 for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_FP]); i++) {
1407
1408 hud_element_set_tint(id, 128, 128, 128);
1409 }
1410
1411 for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_HP]); i++) {
1413
1414 hud_element_set_tint(id, 128, 128, 128);
1415 }
1416
1417 for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_BP]); i++) {
1419
1420 hud_element_set_tint(id, 255, 255, 255);
1421 }
1422 break;
1423 }
1424
1430
1431 for (j = 0; j < ARRAY_COUNT(LevelUpStatTextIDs); j++) {
1432 for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_FP]); i++) {
1434 }
1435 }
1436
1438 id = LevelUpSpotlightID;
1439 hud_element_set_transform_rotation(id, 0.0f, 0.0f, rotZ);
1441 break;
1449
1450 for (j = 0; j < ARRAY_COUNT(LevelUpStatTextIDs); j++) {
1451 for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_FP]); i++) {
1453 }
1454 }
1455
1457 break;
1460 break;
1462 if (bFadeToBlackAmt != 0) {
1464 }
1465 break;
1466 }
1467
1468 switch (gBattleSubState) {
1474 if (LevelUpSelectTextOffsetX > 200) {
1476 LevelUpSelectTextVelX = -LevelUpSelectTextVelX / 3; // rebounding
1477 }
1481 break;
1485 if (LevelUpSelectTextOffsetX > 500) {
1487 }
1491 break;
1492 }
1493}
1494
1495void draw_content_level_up_textbox(void* data, s32 posX, s32 posY) {
1497 s32 xOffset;
1498 s32 msgID;
1499
1500 switch (gBattleSubState) {
1504 switch (battleStatus->curSubmenu) {
1505 case MENU_HP:
1506 if (!CantLevelUpStat[MENU_HP]) {
1507 msgID = MSG_Menus_LevelUp_HP;
1508 } else {
1510 }
1511 xOffset = 9;
1512 break;
1513 case MENU_FP:
1514 if (!CantLevelUpStat[MENU_FP]) {
1515 msgID = MSG_Menus_LevelUp_FP;
1516 } else {
1518 }
1519 xOffset = 9;
1520 break;
1521 default:
1522 if (!CantLevelUpStat[MENU_BP]) {
1523 msgID = MSG_Menus_LevelUp_BP;
1524 } else {
1526 }
1527 xOffset = 9;
1528 break;
1529 }
1530 draw_msg(msgID, posX + xOffset + 17, posY, 255, MSG_PAL_STANDARD, 0);
1531 break;
1532 }
1533}
1534
1535void draw_content_cant_increase_popup(void* data, s32 posX, s32 posY) {
1536 draw_msg(MSG_Menus_CantIncrease, posX + 11, posY + 6, 255, MSG_PAL_0F, 0);
1537}
BSS s32 PopupMenu_SelectedIndex
EntityModelScript EMS_starpoint_dummy
Definition starpoint.c:213
HudScript HES_level_up_small_green_digit_9
Definition level_up.c:438
s32 D_80284154[]
Definition level_up.c:183
HudScript HES_level_up_red_digit_2
Definition level_up.c:444
HudScript HES_level_up_blue_digit_9
Definition level_up.c:474
HudScript HES_level_up_small_red_digit_5
Definition level_up.c:457
HudScript HES_level_up_blue_digit_0
Definition level_up.c:465
HudScript HES_level_up_blue_digit_4
Definition level_up.c:469
HudScript HES_level_up_green_digit_8
Definition level_up.c:427
HudScript HES_level_up_small_blue_digit_1
Definition level_up.c:476
@ LVL_UP_FP
Definition level_up.c:53
@ LVL_UP_HP
Definition level_up.c:54
@ LVL_UP_BP
Definition level_up.c:55
HudScript HES_level_up_green_digit_0
Definition level_up.c:419
HudScript HES_level_up_small_red_digit_2
Definition level_up.c:454
IconHudScriptPair gItemHudScripts[]
HudScript HES_level_up_small_blue_arrow
Definition level_up.c:485
EntityModelScript EMS_starpoint_starpoints
Definition starpoint.c:197
HudScript HES_level_up_green_digit_3
Definition level_up.c:422
HudScript HES_level_up_small_red_digit_6
Definition level_up.c:458
s32 * virtual_entity_get_by_index(s32)
HudScript HES_level_up_small_red_digit_7
Definition level_up.c:459
BSS s32 EndBattleRewardTotal
Definition level_up.c:78
EntityModelScript EMS_level_up
Definition level_up.c:410
HudScript HES_level_up_small_green_digit_1
Definition level_up.c:430
HudScript HES_level_up_small_blue_digit_7
Definition level_up.c:482
HudScript HES_level_up_blue_digit_8
Definition level_up.c:473
HudScript HES_level_up_small_red_digit_0
Definition level_up.c:452
BSS HudElemID LevelUpSelectTextID
Definition level_up.c:72
BSS s32 EndBattleRewardIncrement
Definition level_up.c:79
HudScript HES_level_up_small_blue_digit_0
Definition level_up.c:475
@ BTL_SUBSTATE_TALLY_STAR_POINTS
Definition level_up.c:27
@ BTL_SUBSTATE_SKIPPABLE_END_DELAY
Definition level_up.c:39
@ BTL_SUBSTATE_LEVEL_UP_DESTROY_HUD
Definition level_up.c:36
@ BTL_SUBSTATE_WALK_AWAY
Definition level_up.c:40
@ BTL_SUBSTATE_LOAD_STAR_POINTS
Definition level_up.c:26
@ BTL_SUBSTATE_LEVEL_UP_SHOW_HUD
Definition level_up.c:32
@ BTL_SUBSTATE_LEVEL_UP_INVALID
Definition level_up.c:37
@ BTL_SUBSTATE_LEVEL_UP_UPGRADE
Definition level_up.c:34
@ BTL_SUBSTATE_LEVEL_UP_CREATE_HUD
Definition level_up.c:31
@ BTL_SUBSTATE_LEVEL_UP_BEGIN
Definition level_up.c:30
@ BTL_SUBSTATE_POST_STAR_POINTS
Definition level_up.c:28
@ BTL_SUBSTATE_LEVEL_UP_INVALID_DELAY
Definition level_up.c:38
@ BTL_SUBSTATE_LEVEL_UP_CHOOSE
Definition level_up.c:33
@ BTL_SUBSTATE_LEVEL_UP_LOAD
Definition level_up.c:29
@ BTL_SUBSTATE_LEVEL_UP_FADE_OUT
Definition level_up.c:35
@ BTL_SUBSTATE_DONE
Definition level_up.c:41
HudScript HES_level_up_FP
Definition level_up.c:418
void btl_state_update_celebration(void)
Definition level_up.c:508
BSS HudElemID LevelUpStatEmblemIDs[4]
Definition level_up.c:69
HudScript HES_ProjectorBeam
HudScript HES_level_up_select_one_to_upgrade
Definition level_up.c:487
HudScript HES_level_up_small_red_digit_9
Definition level_up.c:461
HudScript HES_level_up_small_blue_digit_8
Definition level_up.c:483
@ MENU_HP
Definition level_up.c:46
@ MENU_FP
Definition level_up.c:47
@ MENU_BP
Definition level_up.c:48
HudScript HES_level_up_small_green_digit_8
Definition level_up.c:437
HudScript HES_level_up_red_digit_5
Definition level_up.c:447
HudScript HES_level_up_small_red_digit_3
Definition level_up.c:455
HudScript HES_level_up_leaves
Definition level_up.c:415
HudScript HES_level_up_BP
Definition level_up.c:464
HudScript HES_level_up_small_green_digit_2
Definition level_up.c:431
EntityModelScript EMS_starpoint_starpoint
Definition starpoint.c:196
HudScript HES_level_up_badge
Definition level_up.c:416
HudScript * level_up_small_digit_scripts[3][10]
Definition level_up.c:258
BSS Evt * LevelUpScriptPtr
Definition level_up.c:82
HudScript HES_level_up_small_red_digit_4
Definition level_up.c:456
EvtScript EVS_ShowLevelUp
Definition level_up.c:479
void btl_draw_upgrade_windows(s32 phase)
Definition level_up.c:1243
HudScript HES_level_up_small_red_arrow
Definition level_up.c:462
HudScript HES_level_up_green_digit_1
Definition level_up.c:420
s32 bFadeToBlackAmt
Definition level_up.c:181
EntityModelScript * starpoint_digit_scripts[]
Definition level_up.c:198
void btl_state_draw_celebration(void)
Definition level_up.c:1294
HudScript HES_level_up_blue_digit_2
Definition level_up.c:467
BSS HudElemID LevelUpSpotlightID
Definition level_up.c:71
EntityModelScript EMS_starpoint_digit_9
Definition starpoint.c:208
EntityModelScript * starpoint_space_script
Definition level_up.c:211
HudScript HES_level_up_small_green_digit_3
Definition level_up.c:432
HudScript HES_level_up_heart
Definition level_up.c:412
EntityModelScript EMS_starpoint_digit_2
Definition starpoint.c:201
HudScript HES_level_up_small_blue_digit_2
Definition level_up.c:477
EntityModelScript EMS_starpoint_digit_0
Definition starpoint.c:199
HudScript HES_level_up_green_digit_5
Definition level_up.c:424
HudScript HES_level_up_small_blue_digit_6
Definition level_up.c:481
HudScript HES_level_up_red_digit_8
Definition level_up.c:450
BSS s32 CelebrateSubstateTime
Definition level_up.c:74
BSS HudElemID LevelUpStatTextIDs[3][7]
Definition level_up.c:70
void draw_content_cant_increase_popup(void *data, s32 posX, s32 posY)
Definition level_up.c:1535
HudScript HES_level_up_small_red_digit_1
Definition level_up.c:453
HudScript HES_level_up_small_green_digit_0
Definition level_up.c:429
HudScript HES_level_up_flower
Definition level_up.c:414
HudScript HES_level_up_red_digit_9
Definition level_up.c:451
EntityModelScript EMS_starpoint_digit_7
Definition starpoint.c:206
EntityModelScript EMS_starpoint_digit_4
Definition starpoint.c:203
EntityModelScript EMS_starpoint_digit_5
Definition starpoint.c:204
BSS s32 D_8029FB50
Definition level_up.c:75
EvtScript EVS_ShowStarpoints
Definition level_up.c:371
HudScript HES_level_up_HP
Definition level_up.c:441
EntityModelScript EMS_starpoint_digit_1
Definition starpoint.c:200
HudScript HES_level_up_small_blue_digit_3
Definition level_up.c:478
HudScript HES_level_up_red_digit_7
Definition level_up.c:449
EntityModelScript EMS_starpoint_digit_3
Definition starpoint.c:202
HudScript HES_level_up_small_green_digit_4
Definition level_up.c:433
HudScript HES_level_up_small_red_digit_8
Definition level_up.c:460
HudScript HES_level_up_small_blue_digit_5
Definition level_up.c:480
BSS s32 pendingLevelUps
Definition level_up.c:80
HudScript HES_level_up_small_blue_digit_9
Definition level_up.c:484
HudScript HES_level_up_blue_digit_7
Definition level_up.c:472
BSS s32 EndBattleRewardsDone
Definition level_up.c:81
HudScript HES_level_up_small_blue_digit_4
Definition level_up.c:479
HudScript HES_level_up_green_digit_9
Definition level_up.c:428
HudScript HES_level_up_blue_digit_6
Definition level_up.c:471
HudScript HES_level_up_red_digit_0
Definition level_up.c:442
HudScript HES_level_up_red_digit_3
Definition level_up.c:445
BSS s32 LevelUpSelectTextVelX
Definition level_up.c:86
BSS s32 CantLevelUpStat[3]
Definition level_up.c:77
void draw_content_level_up_textbox(void *data, s32 posX, s32 posY)
Definition level_up.c:1495
HudScript HES_level_up_green_digit_6
Definition level_up.c:425
HudScript HES_level_up_green_digit_7
Definition level_up.c:426
HudScript HES_level_up_blue_digit_5
Definition level_up.c:470
HudScript HES_level_up_small_green_arrow
Definition level_up.c:439
BSS s32 EndBattleRewardStep
Definition level_up.c:76
BSS s32 CelebrateStateTime
Definition level_up.c:84
HudScript HES_level_up_red_digit_6
Definition level_up.c:448
@ LVL_UP_BONUS
Definition level_up.c:66
@ LVL_UP_TITLE
Definition level_up.c:60
@ LVL_UP_NEXT_ONES
Definition level_up.c:65
@ LVL_UP_ARROW
Definition level_up.c:63
@ LVL_UP_CUR_TENS
Definition level_up.c:61
@ LVL_UP_CUR_ONES
Definition level_up.c:62
@ LVL_UP_NEXT_TENS
Definition level_up.c:64
BSS s32 LevelUpSelectTextOffsetX
Definition level_up.c:85
HudScript HES_level_up_heart_copy
Definition level_up.c:413
HudScript HES_level_up_small_green_digit_5
Definition level_up.c:434
EntityModelScript EMS_starpoint_digit_6
Definition starpoint.c:205
HudScript HES_level_up_blue_digit_1
Definition level_up.c:466
HudScript HES_level_up_red_digit_4
Definition level_up.c:446
EntityModelScript EMS_starpoint_digit_8
Definition starpoint.c:207
HudScript HES_level_up_small_green_digit_7
Definition level_up.c:436
HudScript * HES_LevelUpDigits[3][10]
Definition level_up.c:219
HudScript HES_level_up_green_digit_4
Definition level_up.c:423
HudScript HES_level_up_small_green_digit_6
Definition level_up.c:435
HudScript HES_level_up_red_digit_1
Definition level_up.c:443
BSS s32 LevelUpScriptID
Definition level_up.c:83
HudScript HES_level_up_blue_digit_3
Definition level_up.c:468
HudScript HES_level_up_green_digit_2
Definition level_up.c:421
HudScript * levelup_stat_scripts[3]
Definition level_up.c:213
s32 bgm_set_song(s32 playerIndex, s32 songID, s32 variation, s32 fadeOutTime, s16 volume)
struct Evt * takeTurnScript
u32 pressedButtons[4]
s32 takeTurnScriptID
s32 HudElemID
Vec3f curPos
Bytecode EvtScript[]
#define get_msg_width
#define draw_msg
#define draw_box
s32 EntityModelScript[]
Definition entity.h:7
EntityModel * get_entity_model(s32 idx)
@ WINDOW_STYLE_15
Definition enums.h:5970
@ OVERLAY_SCREEN_COLOR
Definition enums.h:2374
@ ENV_TINT_SHROUD
Definition enums.h:3972
@ BUTTON_A
Definition enums.h:2776
@ BUTTON_STICK_LEFT
Definition enums.h:2779
@ BUTTON_STICK_RIGHT
Definition enums.h:2780
@ BUTTON_B
Definition enums.h:2775
@ WINDOW_PRIORITY_10
Definition enums.h:3218
@ WINDOW_PRIORITY_20
Definition enums.h:3220
@ MSG_PAL_0F
Definition enums.h:5005
@ MSG_PAL_STANDARD
Definition enums.h:5000
@ PHASE_CELEBRATE
Definition enums.h:2095
@ SONG_LEVEL_UP
Definition enums.h:424
@ SONG_BATTLE_END
Definition enums.h:421
@ WINDOW_UPDATE_SHOW
Definition enums.h:4896
@ WINDOW_UPDATE_HIDE
Definition enums.h:4897
@ BS_FLAGS2_AWARDING_STAR_POINTS
Definition enums.h:3637
@ BS_FLAGS2_DONT_STOP_MUSIC
Definition enums.h:3652
@ BTL_CAM_DEFAULT
Definition enums.h:4409
@ BTL_CAM_VICTORY
Definition enums.h:4430
@ MODEL_FLAG_TRANSFORM_GROUP_MEMBER
Definition enums.h:3945
@ SOUND_ID_TRIGGER_CHANGE_SOUND
Definition enums.h:532
@ BATTLE_STATE_END_BATTLE
Definition enums.h:3694
@ ABILITY_FP_PLUS
Definition enums.h:448
@ ABILITY_HP_PLUS
Definition enums.h:440
@ SOUND_LRAW_CHEERING
Definition enums.h:1154
@ SOUND_JINGLE_WON_BATTLE
Definition enums.h:712
@ SOUND_STAR_POINT_PICKUP
Definition enums.h:929
@ SOUND_MENU_CHANGE_SELECTION
Definition enums.h:701
@ SOUND_MENU_NEXT
Definition enums.h:703
@ SOUND_LOOP_CHEERING
Definition enums.h:1592
@ SOUND_MENU_ERROR
Definition enums.h:936
@ ACTOR_PLAYER
Definition enums.h:2118
@ ACTOR_PARTNER
Definition enums.h:2119
@ ACTOR_FLAG_SHOW_STATUS_ICONS
Definition enums.h:3377
@ ACTOR_FLAG_USING_IDLE_ANIM
Definition enums.h:3376
@ PARTNER_NONE
Definition enums.h:2919
@ PARTNER_BOMBETTE
Definition enums.h:2922
@ PARTNER_LAKILESTER
Definition enums.h:2927
@ PARTNER_WATT
Definition enums.h:2925
@ PARTNER_BOW
Definition enums.h:2928
@ PARTNER_SUSHIE
Definition enums.h:2926
@ PARTNER_TWINK
Definition enums.h:2930
@ PARTNER_PARAKARRY
Definition enums.h:2923
@ PARTNER_GOOMBARIA
Definition enums.h:2929
@ PARTNER_GOOMPA
Definition enums.h:2924
@ PARTNER_KOOPER
Definition enums.h:2921
@ PARTNER_GOOMBARIO
Definition enums.h:2920
@ WIN_BTL_POPUP
Definition enums.h:4835
@ WIN_BTL_DESC_BOX
Definition enums.h:4834
@ EVT_PRIORITY_A
Definition evt.h:154
#define ApiStatus_DONE2
Definition evt.h:119
#define ApiStatus_BLOCK
Definition evt.h:117
s32 is_ability_active(s32 arg0)
Definition inventory.c:1735
void set_window_update(s32 panelID, s32)
Definition windows.c:434
void btl_cam_set_params(b16, s16, s16, s16, s32, s32, s32)
Definition camera.c:1939
void set_screen_overlay_params_front(u8, f32)
void mdl_set_all_tint_type(s32)
Definition model.c:4519
void btl_cam_use_preset(s32)
Definition camera.c:1919
Evt * start_script(EvtScript *source, s32 priority, s32 initialState)
void set_actor_anim(s32 actorID, s32 partID, AnimID animID)
Definition 190B20.c:737
void kill_script_by_ID(s32 id)
void btl_cam_move(s16)
Definition camera.c:1953
s32 btl_cam_is_moving_done(void)
Definition camera.c:1980
void set_window_properties(s32 panelID, s32 posX, s32 posY, s32 width, s32 height, u8, void *drawContents, void *drawContentsArg, s8 parent)
Definition windows.c:373
s32 does_script_exist(s32 id)
void btl_set_state(s32 battleState)
void hud_element_draw_complex_hud_next(s32 hid)
void hud_element_get_render_pos(s32 id, s32 *x, s32 *y)
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_create_transform_B(s32 id)
HudScript * hud_element_get_script(s32 id)
void hud_element_set_tint(s32 id, s32 r, s32 g, s32 b)
void hud_element_set_transform_rotation(s32 id, f32 x, f32 y, f32 z)
void hud_element_draw_complex_hud_first(s32 hid)
void hud_element_set_render_pos(s32 id, s32 x, s32 y)
void hud_element_set_transform_rotation_pivot(s32 id, s32 dx, s32 dy)
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_set_transform_scale(s32 id, f32 x, f32 y, f32 z)
void hud_element_free(s32 id)
@ HUD_ELEMENT_FLAG_DISABLED
Definition hud_element.h:72
@ HUD_ELEMENT_FLAG_MANUAL_RENDER
Definition hud_element.h:78
@ HUD_ELEMENT_FLAG_FILTER_TEX
Definition hud_element.h:86
s32 HudScript[]
Definition hud_element.h:9
EvtScript EVS_Mario_HandlePhase
void mdl_set_shroud_tint_params(u8 r, u8 g, u8 b, u8 a)
Definition model.c:3905
void sfx_play_sound(s32 soundID)
ApiStatus CreateVirtualEntity(Evt *script, b32 isInitialCall)
ApiStatus SetVirtualEntityPosition(Evt *script, b32 isInitialCall)
ApiStatus SetVirtualEntityScale(Evt *script, b32 isInitialCall)
ApiStatus ShakeCam(Evt *script, b32 isInitialCall)
ApiStatus DeleteVirtualEntity(Evt *script, b32 isInitialCall)
#define DMA_COPY_SEGMENT(segment)
Definition macros.h:538
#define Else
Marks the end of an if statement and the start of the else block.
Definition macros.h:296
#define Switch(LVAR)
Marks the start of a switch statement.
Definition macros.h:312
#define LVar6
Definition macros.h:155
#define Ref(sym)
Address/pointer constant.
Definition macros.h:61
#define Set(VAR, INT_VALUE)
Sets the given variable to a given value casted to an integer.
Definition macros.h:366
#define CaseEq(RVAR)
Marks the start of a switch case that executes only if LVAR == RVAR. It also marks the end of any pre...
Definition macros.h:320
#define EndChildThread
Marks the end of a child thread block.
Definition macros.h:564
#define SCREEN_WIDTH
Definition macros.h:109
#define Sub(VAR, INT_VALUE)
Definition macros.h:378
#define LVarF
Definition macros.h:164
#define End
Signals the end of EVT script data. A script missing this will likely crash on load.
Definition macros.h:214
#define Add(VAR, INT_VALUE)
Definition macros.h:377
#define EndLoop
Marks the end of a loop.
Definition macros.h:249
#define BSS
Definition macros.h:7
#define LVarC
Definition macros.h:161
#define ARRAY_COUNT(arr)
Definition macros.h:40
#define IfLt(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR < RVAR.
Definition macros.h:276
#define Float(DOUBLE)
Definition macros.h:52
#define EndIf
Marks the end of an if statement or an else block.
Definition macros.h:299
#define SCREEN_HEIGHT
Definition macros.h:110
#define CaseDefault
Marks the start of a switch case that executes unconditionally. It also marks the end of any previous...
Definition macros.h:338
#define LVarB
Definition macros.h:160
#define LVar7
Definition macros.h:156
#define Thread
Marks the start of a thread block.
Definition macros.h:545
#define EndThread
Marks the end of a thread block.
Definition macros.h:548
#define LVar8
Definition macros.h:157
#define LVar1
Definition macros.h:150
#define LFlag0
Definition macros.h:168
#define LVarA
Definition macros.h:159
#define Wait(NUM_FRAMES)
Blocks for the given number of frames.
Definition macros.h:255
#define LVar9
Definition macros.h:158
#define SP_PER_BAR
Definition macros.h:102
#define EndSwitch
Marks the end of a switch statement and any case.
Definition macros.h:363
#define IfEq(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR == RVAR.
Definition macros.h:270
#define Call(FUNC, ARGS...)
Calls a given C EVT API function with any number of arguments.
Definition macros.h:577
#define ChildThread
Marks the start of a child thread block.
Definition macros.h:561
#define CaseGt(RVAR)
Marks the start of a switch case that executes only if LVAR <= RVAR. It also marks the end of any pre...
Definition macros.h:329
#define Loop(TIMES)
Marks the beginning of a loop.
Definition macros.h:246
#define LVar0
Definition macros.h:149
#define Return
Kills the current EVT thread.
Definition macros.h:218
@ BTL_SUBSTATE_INIT
Definition states.h:8
@ BTL_SUBSTATE_END_BATTLE_EXEC_STAGE_SCRIPT
Definition states.h:11
ItemData gItemTable[]
GameStatus * gGameStatusPtr
Definition main_loop.c:31
PlayerData gPlayerData
Definition 77480.c:39
u8 * gBackgroundTintModePtr
Definition model.c:105
BattleStatus gBattleStatus
Definition battle.cpp:14
s32 gBattleSubState
Definition battle.cpp:17