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"
7#include "script_api/battle.h"
8#include "entity.h"
9#include "sprite/npc/BattleGoombario.h"
10#include "sprite/npc/BattleKooper.h"
11#include "sprite/npc/BattleBombette.h"
12#include "sprite/npc/BattleParakarry.h"
13#include "sprite/npc/Goompa.h"
14#include "sprite/npc/BattleWatt.h"
15#include "sprite/npc/BattleSushie.h"
16#include "sprite/npc/BattleLakilester.h"
17#include "sprite/npc/BattleBow.h"
18#include "sprite/player.h"
19
22
23// menu position index for level up screen
24enum {
28};
29
30// first index for LevelUpStatTextIDs
31enum {
35};
36
37// second index for LevelUpStatTextIDs
38enum {
46};
47
52
66
80
82
88
92
123
157
159
161
162s32 D_80284154[] = {
163 [PARTNER_NONE] = 0,
164 [PARTNER_GOOMBARIO] = ANIM_BattleGoombario_Walk,
165 [PARTNER_KOOPER] = ANIM_BattleKooper_Walk,
166 [PARTNER_BOMBETTE] = ANIM_BattleBombette_Walk,
167 [PARTNER_PARAKARRY] = ANIM_BattleParakarry_Walk,
168 [PARTNER_GOOMPA] = ANIM_Goompa_Walk,
169 [PARTNER_WATT] = ANIM_BattleWatt_Walk,
170 [PARTNER_SUSHIE] = ANIM_BattleSushie_Walk,
171 [PARTNER_LAKILESTER] = ANIM_BattleLakilester_Walk,
172 [PARTNER_BOW] = ANIM_BattleBow_Walk,
173 [PARTNER_GOOMBARIA] = 0,
174 [PARTNER_TWINK] = 0,
175 0
176};
177
190
192
198
237
276
278
279void draw_content_level_up_textbox(void* data, s32 posX, s32 posY);
280void draw_content_cant_increase_popup(void* data, s32 posX, s32 posY);
281
282API_CALLABLE(GetRemainingStarPointsReward) {
283 script->varTable[0] = (s8)gBattleStatus.totalStarPoints;
284 return ApiStatus_DONE2;
285}
286
287API_CALLABLE(GetStarPointDigitScripts) {
288 s32 levelUp = FALSE;
289
290 script->varTable[10] = gBattleStatus.totalStarPoints / 100; // star points in hundreds (levels to gain)
291 script->varTable[11] = (gBattleStatus.totalStarPoints % 100) / 10; // star points in tens
292 script->varTable[12] = gBattleStatus.totalStarPoints % 10; // star points in ones
293
294 if (script->varTable[10] > 0) {
295 script->varTablePtr[10] = starpoint_digit_scripts[script->varTable[10]];
296 levelUp = TRUE;
297 } else {
298 script->varTablePtr[10] = starpoint_space_script;
299 }
300
301 if ((script->varTable[11] > 0) || levelUp) {
302 script->varTablePtr[11] = starpoint_digit_scripts[script->varTable[11]];
303 } else {
304 script->varTablePtr[11] = starpoint_space_script;
305 }
306
307 script->varTablePtr[12] = starpoint_digit_scripts[script->varTable[12]];
308 return ApiStatus_DONE2;
309}
310
311API_CALLABLE(AwaitBattleRewardsDone) {
313 return ApiStatus_DONE2;
314 } else {
315 return ApiStatus_BLOCK;
316 }
317}
318
319API_CALLABLE(InitStarPointModelFlags) {
320 EntityModel* model;
321
322 model = get_entity_model(*virtual_entity_get_by_index(script->varTable[6]));
323 model->flags &= ~MODEL_FLAGS_MASK_FFF0 ;
325 model = get_entity_model(*virtual_entity_get_by_index(script->varTable[7]));
326 model->flags &= ~MODEL_FLAGS_MASK_FFF0 ;
328 model = get_entity_model(*virtual_entity_get_by_index(script->varTable[8]));
329 model->flags &= ~MODEL_FLAGS_MASK_FFF0 ;
331 model = get_entity_model(*virtual_entity_get_by_index(script->varTable[9]));
332 model->flags &= ~MODEL_FLAGS_MASK_FFF0 ;
334
335 return ApiStatus_DONE2;
336}
337
338API_CALLABLE(InitLevelUpModelFlags) {
339 EntityModel* model = get_entity_model(*virtual_entity_get_by_index(script->varTable[9]));
340 model->flags &= ~MODEL_FLAGS_MASK_FFF0;
342
343 return ApiStatus_DONE2;
344}
345
346API_CALLABLE(MakeLevelUpConfetti) {
347 fx_confetti(3, 0.0f, 100.0f, 0.0f, 1.0f, 120);
348 return ApiStatus_DONE2;
349}
350
352 Set(LVarF, 0)
353 Call(GetRemainingStarPointsReward)
354 IfEq(LVar0, 0)
355 Return
356 EndIf
357 IfLt(LVar0, 2)
359 Call(SetVirtualEntityPosition, LVar6, -278, 68, 70)
360 Call(SetVirtualEntityScale, LVar6, Float(0.5), Float(0.5), Float(0.5))
361 Else
362#if VERSION_JP
364#else
366#endif
367 Call(SetVirtualEntityPosition, LVar6, -278, 68, 70)
368 Call(SetVirtualEntityScale, LVar6, Float(0.5), Float(0.5), Float(0.5))
369 Set(LFlag0, TRUE)
370 EndIf
372 CaseGt(99)
373 Set(LVarF, 3)
374 CaseGt(9)
375 Set(LVarF, 2)
377 Set(LVarF, 1)
379 Call(GetStarPointDigitScripts)
381 Call(SetVirtualEntityPosition, LVar7, -353, 68, 70)
382 Call(SetVirtualEntityScale, LVar7, Float(0.5), Float(0.5), Float(0.5))
384 Call(SetVirtualEntityPosition, LVar8, -338, 68, 70)
385 Call(SetVirtualEntityScale, LVar8, Float(0.5), Float(0.5), Float(0.5))
387 Call(SetVirtualEntityPosition, LVar9, -323, 68, 70)
388 Call(SetVirtualEntityScale, LVar9, Float(0.5), Float(0.5), Float(0.5))
389 Call(InitStarPointModelFlags)
391 CaseEq(3)
392 Set(LVar0, -197)
393 CaseEq(2)
394 Set(LVar0, -204)
395 CaseEq(1)
396 Set(LVar0, -211)
398 Loop(10)
399 Add(LVar0, 20)
400 Set(LVar1, LVar0)
401 Add(LVar1, -78)
403 Set(LVar1, LVar0)
404#if VERSION_JP
405 Add(LVar1, -154)
406#else
407 Add(LVar1, -146)
408#endif
410 Set(LVar1, LVar0)
411#if VERSION_JP
412 Add(LVar1, -139)
413#else
414 Add(LVar1, -131)
415#endif
417 Set(LVar1, LVar0)
418#if VERSION_JP
419 Add(LVar1, -124)
420#else
421 Add(LVar1, -116)
422#endif
424 Wait(1)
425 EndLoop
426 Call(AwaitBattleRewardsDone)
428 CaseEq(3)
429 Set(LVar0, 3)
430 CaseEq(2)
431 Set(LVar0, -4)
432 CaseEq(1)
433 Set(LVar0, -11)
435 Loop(10)
436 Add(LVar0, 20)
437 Set(LVar1, LVar0)
438 Add(LVar1, -78)
440 Set(LVar1, LVar0)
441 Add(LVar1, -154)
443 Set(LVar1, LVar0)
444 Add(LVar1, -139)
446 Set(LVar1, LVar0)
447 Add(LVar1, -124)
449 Wait(1)
450 EndLoop
455 Return
456 End
457};
458
462 Call(InitLevelUpModelFlags)
464 Wait(4)
465 Call(MakeLevelUpConfetti)
467 Thread
468 Wait(8)
469 Call(ShakeCam, 1, 0, 5, Float(3.0))
470 Call(ShakeCam, 1, 0, 3, Float(2.25))
471 Call(ShakeCam, 1, 0, 4, Float(1.2))
472 Call(ShakeCam, 1, 0, 6, Float(0.45))
473 Call(ShakeCam, 1, 0, 8, Float(0.15))
475 Thread
476 Set(LVar0, 210)
477 Loop(10)
478 Sub(LVar0, 10)
480 Wait(1)
481 EndLoop
483 Wait(8)
484 Return
485 End
486};
487
489 BattleStatus* battleStatus = &gBattleStatus;
490 PlayerData* playerData = &gPlayerData;
491 Actor* player = battleStatus->playerActor;
492 Actor* partner = battleStatus->partnerActor;
493 s8 currentSubmenu;
494 s32 newSubmenu;
495 s32 id;
496 s32 x, y, z;
497 s32 width;
498 s32 itemHudElemID;
499
500 Evt* takeTurnScript;
501 Evt* script;
502
503 s32 tensDigit;
504 s32 onesDigit;
505
506 s32 deltaSP;
507 s32 prevSP;
508
509 s32 i;
510 s32 j;
511
512 HudScript* new_var;
513
514 switch (gBattleSubState) {
516 if (battleStatus->pendingStarPoints <= 0) {
517 player->flags &= ~ACTOR_FLAG_SHOW_STATUS_ICONS;
518 EndBattleRewardTotal = battleStatus->totalStarPoints * 100;
519 pendingLevelUps = 0;
520 D_8029FB50 = 0;
521 bFadeToBlackAmt = 0;
525
526 prevSP = playerData->starPoints + battleStatus->totalStarPoints;
527 if (prevSP > 99) {
528 bgm_set_song(0, SONG_LEVEL_UP, 0, 250, 8);
529 } else {
530 bgm_set_song(0, SONG_BATTLE_END, 0, 250, 8);
531 }
532
539 }
540 break;
542 if (CelebrateSubstateTime != 0) {
544 } else if (btl_cam_is_moving_done()) {
545 DMA_COPY_SEGMENT(starpoint);
547 EndBattleRewardsDone = FALSE;
548 // divide reward into 20 increments
551 player->takeTurnScript = script;
553 player->takeTurnScriptID = script->id;
554 script->owner1.actorID = ACTOR_PLAYER;
556 }
557 break;
559 if (CelebrateSubstateTime == 0) {
560 if (battleStatus->totalStarPoints != 0) {
561 // determine the remaining star point reward after this step and give the difference to the player
563 prevSP = battleStatus->totalStarPoints;
564 battleStatus->totalStarPoints = EndBattleRewardTotal / 100;
565 deltaSP = prevSP - battleStatus->totalStarPoints;
566 if (deltaSP > 0) {
568 }
569
570 playerData->starPoints += deltaSP;
571 bFadeToBlackAmt++; // ??
572 if (EndBattleRewardStep == 0 && battleStatus->totalStarPoints != 0) {
573 playerData->starPoints++;
574 }
575 }
576 if (playerData->level >= 27) {
577 playerData->starPoints = 0;
578 }
579 if (playerData->starPoints >= 100) {
580 pendingLevelUps = 1;
581 playerData->starPoints -= 100;
582 }
583 if (playerData->level + pendingLevelUps == 27) {
584 playerData->starPoints = 0;
585 }
586 if (battleStatus->totalStarPoints == 0) {
587 if (EndBattleRewardStep == 0) {
590 if (partner != NULL) {
592 }
593 battleStatus->battlePhase = PHASE_CELEBRATE;
595 player->takeTurnScript = script;
596 player->takeTurnScriptID = script->id;
597 script->owner1.actorID = ACTOR_PLAYER;
598 if (partner != NULL) {
599 script = start_script(partner->takeTurnSource, EVT_PRIORITY_A, 0);
600 partner->takeTurnScript = script;
601 partner->takeTurnScriptID = script->id;
602 script->owner1.actorID = ACTOR_PARTNER;
603 }
606 } else {
608 }
609 }
610 } else {
612 }
613 break;
615 if (CelebrateSubstateTime == 0) {
616 if (pendingLevelUps == 0) {
618 } else {
620 }
621 break;
622 }
624 break;
626 if (CelebrateStateTime >= 99) {
627 playerData->level++;
629 btl_cam_move(5);
630 DMA_COPY_SEGMENT(level_up);
634 }
635 break;
643 mdl_set_shroud_tint_params(0, 0, 0, 0);
644 break;
646 if (CelebrateSubstateTime == 18) {
647 playerData->curHP = playerData->curMaxHP;
648 playerData->curFP = playerData->curMaxFP;
649 x = player->curPos.x + 0.0f;
650 y = player->curPos.y + 35.0f;
651 z = player->curPos.z;
652 fx_recover(0, x, y, z, playerData->curHP);
653 x = player->curPos.x + 20.0f;
654 y = player->curPos.y + 25.0f;
655 z = player->curPos.z;
656 fx_recover(1, x, y, z, playerData->curFP);
657 playerData->starPower = playerData->maxStarPower * SP_PER_BAR;
658 }
659
660 if (CelebrateSubstateTime != 0) {
662 if (CelebrateSubstateTime < 10) {
663 mdl_set_shroud_tint_params(0, 0, 0, ((10 - CelebrateSubstateTime) * 16) & 0xF0);
664 }
665 } else {
667 LevelUpStatEmblemIDs[0] = id;
668 hud_element_set_render_pos(id, 310, 140);
670
672 LevelUpStatEmblemIDs[1] = id;
673 hud_element_set_render_pos(id, 158, 340);
675
677 LevelUpStatEmblemIDs[3] = id;
678 hud_element_set_render_pos(id, 158, 340);
680
682 LevelUpStatEmblemIDs[2] = id;
683 hud_element_set_render_pos(id, 6, 140);
685
688 hud_element_set_render_pos(id, 160, 317);
690
691 for (i = 1; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_FP]); i++) {
694 hud_element_set_render_pos(id, 160, 317);
696 }
697
700 hud_element_set_render_pos(id, 312, 117);
702
703 for (i = 1; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_HP]); i++) {
706 hud_element_set_render_pos(id, 312, 117);
708 }
709
712 hud_element_set_render_pos(id, 8, 117);
714
715 for (i = 1; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_BP]); i++) {
718 hud_element_set_render_pos(id, 8, 117);
720 }
721
722 CantLevelUpStat[MENU_HP] = FALSE;
723 CantLevelUpStat[MENU_FP] = FALSE;
724 CantLevelUpStat[MENU_BP] = FALSE;
725
726 if (playerData->hardMaxFP != 50) {
727 // current FP
728 tensDigit = playerData->curMaxFP / 10;
729 onesDigit = playerData->curMaxFP % 10;
732 if (tensDigit != 0) {
734 }
735 hud_element_get_render_pos(id, &x, &y);
736 hud_element_set_render_pos(id, x - 14, y + 46);
737
741 hud_element_get_render_pos(id, &x, &y);
742 hud_element_set_render_pos(id, x - 8, y + 46);
743
747 hud_element_get_render_pos(id, &x, &y);
748 hud_element_set_render_pos(id, x - 3, y + 46);
749
750 // upgraded FP
751 tensDigit = (playerData->curMaxFP + 5) / 10;
752 onesDigit = (playerData->curMaxFP + 5) % 10;
755 if (tensDigit != 0) {
757 }
758 hud_element_get_render_pos(id, &x, &y);
759 hud_element_set_render_pos(id, x + 3, y + 46);
760
764 hud_element_get_render_pos(id, &x, &y);
765 hud_element_set_render_pos(id, x + 10, y + 46);
766 } else {
767 // upgraded FP only
769 tensDigit = playerData->curMaxFP / 10;
770 onesDigit = playerData->curMaxFP % 10;
772 if (tensDigit != 0) {
774 }
775 hud_element_get_render_pos(id, &x, &y);
776 hud_element_set_render_pos(id, x - 6, y + 46);
777
781 hud_element_get_render_pos(id, &x, &y);
782 hud_element_set_render_pos(id, x + 2, y + 46);
783 CantLevelUpStat[MENU_FP] = TRUE;
784 }
785
788 itemHudElemID = gItemTable[ITEM_FP_PLUS_A].hudElemID;
789 hud_element_set_script(id, gItemHudScripts[itemHudElemID].enabled);
791 hud_element_set_scale(id, 0.5f);
792 hud_element_get_render_pos(id, &x, &y);
793 hud_element_set_render_pos(id, x + 17, y + 46);
794 }
795
796 if (playerData->hardMaxHP != 50) {
797 // current HP
798 tensDigit = playerData->curMaxHP / 10;
799 onesDigit = playerData->curMaxHP % 10;
800
803 if (tensDigit != 0) {
805 }
806 hud_element_get_render_pos(id, &x, &y);
807 hud_element_set_render_pos(id, x - 14, y + 46);
808
812 hud_element_get_render_pos(id, &x, &y);
813 hud_element_set_render_pos(id, x - 8, y + 46);
814
818 hud_element_get_render_pos(id, &x, &y);
819 hud_element_set_render_pos(id, x - 3, y + 46);
820
821 tensDigit = (playerData->curMaxHP + 5) / 10;
822 onesDigit = (playerData->curMaxHP + 5) % 10;
823
826 if (tensDigit != 0) {
828 }
829 hud_element_get_render_pos(id, &x, &y);
830 hud_element_set_render_pos(id, x + 3, y + 46);
831
835 hud_element_get_render_pos(id, &x, &y);
836 hud_element_set_render_pos(id, x + 10, y + 46);
837 } else {
838 tensDigit = playerData->curMaxHP / 10;
839 onesDigit = playerData->curMaxHP % 10;
840
843 if (tensDigit != 0) {
845 }
846 hud_element_get_render_pos(id, &x, &y);
847 hud_element_set_render_pos(id, x - 6, y + 46);
848
852 hud_element_get_render_pos(id, &x, &y);
853 hud_element_set_render_pos(id, x + 2, y + 46);
854 CantLevelUpStat[MENU_HP] = TRUE;
855 }
856
859 itemHudElemID = gItemTable[ITEM_HP_PLUS_A].hudElemID;
860 hud_element_set_script(id, gItemHudScripts[itemHudElemID].enabled);
862 hud_element_set_scale(id, 0.5f);
863 hud_element_get_render_pos(id, &x, &y);
864 hud_element_set_render_pos(id, x + 17, y + 46);
865 }
866
867 if (playerData->maxBP != 30) {
868 tensDigit = playerData->maxBP / 10;
869 onesDigit = playerData->maxBP % 10;
870
873 if (tensDigit != 0) {
875 }
876 hud_element_get_render_pos(id, &x, &y);
877 hud_element_set_render_pos(id, x - 14, y + 46);
878
882 hud_element_get_render_pos(id, &x, &y);
883 hud_element_set_render_pos(id, x - 8, y + 46);
884
888 hud_element_get_render_pos(id, &x, &y);
889 hud_element_set_render_pos(id, x - 3, y + 46);
890
891 tensDigit = (playerData->maxBP + 3) / 10;
892 onesDigit = (playerData->maxBP + 3) % 10;
893
896 if (tensDigit != 0) {
898 }
899 hud_element_get_render_pos(id, &x, &y);
900 hud_element_set_render_pos(id, x + 3, y + 46);
901
905 hud_element_get_render_pos(id, &x, &y);
906 hud_element_set_render_pos(id, x + 10, y + 46);
907 } else {
911 hud_element_get_render_pos(id, &x, &y);
912 hud_element_set_render_pos(id, x - 6, y + 46);
913
917 hud_element_get_render_pos(id, &x, &y);
918 hud_element_set_render_pos(id, x + 2, y + 46);
919 CantLevelUpStat[MENU_BP] = TRUE;
920 }
921
924 hud_element_set_render_pos(id, 156, 13);
925 hud_element_set_tint(id, 255, 255, 255);
927 hud_element_set_transform_rotation(id, 0.0f, 0.0f, 180.0f);
928 hud_element_set_transform_scale(id, 1.0f, 1.5f, 1.0f);
929 hud_element_set_alpha(id, 200);
931
935 battleStatus->curSubmenu = 1;
936
939 }
940 break;
942 id = LevelUpStatEmblemIDs[0];
943 hud_element_get_render_pos(id, &x, &y);
944 x -= 20;
946
947 for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_HP]); i++) {
949 hud_element_get_render_pos(id, &x, &y);
950 x -= 20;
952 }
953
954 id = LevelUpStatEmblemIDs[1];
955 hud_element_get_render_pos(id, &x, &y);
956 y -= 20;
958
959 id = LevelUpStatEmblemIDs[3];
960 hud_element_get_render_pos(id, &x, &y);
961 y -= 20;
963
964 for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_FP]); i++) {
966 hud_element_get_render_pos(id, &x, &y);
967 y -= 20;
969 }
970
971 id = LevelUpStatEmblemIDs[2];
972 hud_element_get_render_pos(id, &x, &y);
973 x += 20;
975
976 for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_BP]); i++) {
978 hud_element_get_render_pos(id, &x, &y);
979 x += 20;
981 }
982
984 if (CelebrateSubstateTime == 0) {
985 hud_element_set_tint(id, 128, 128, 128);
986#if VERSION_JP
987 x = 32;
988 y = 186;
990#else
991 x = 20;
992 y = 186;
994#endif
997 }
998 break;
1000 if (battleStatus->curButtonsPressed & BUTTON_A) {
1001 if (!CantLevelUpStat[battleStatus->curSubmenu]) {
1005 } else {
1008 }
1009 break;
1010 }
1011
1012 newSubmenu = currentSubmenu = battleStatus->curSubmenu;
1013 if (battleStatus->curButtonsHeld & BUTTON_STICK_LEFT) {
1014 newSubmenu--;
1015 }
1016 if (battleStatus->curButtonsHeld & BUTTON_STICK_RIGHT) {
1017 newSubmenu++;
1018 }
1019 if (newSubmenu < 0) {
1020 newSubmenu = 0;
1021 }
1022 if (newSubmenu > 2) {
1023 newSubmenu = 2;
1024 }
1025 if (newSubmenu != currentSubmenu) {
1027 battleStatus->curSubmenu = newSubmenu;
1028 }
1029
1031 if (CelebrateStateTime > 100) {
1032 fx_confetti(3, 0.0f, 100.0f, 0.0f, 1.0f, 120);
1034 }
1035 break;
1039
1040 switch (battleStatus->curSubmenu) {
1041 case 0:
1042 playerData->hardMaxHP += 5;
1043 playerData->curMaxHP += 5;
1044 playerData->curHP += 5;
1045 if (playerData->curMaxHP > 75) {
1046 playerData->curMaxHP = 75;
1047 }
1048 if (playerData->curHP > playerData->curMaxHP) {
1049 playerData->curHP = playerData->curMaxHP;
1050 }
1051 player->maxHP = playerData->curMaxHP;
1052 player->curHP = playerData->curHP;
1053 break;
1054 case 1:
1055 playerData->hardMaxFP += 5;
1056 playerData->curMaxFP += 5;
1057 playerData->curFP += 5;
1058 if (playerData->curMaxFP > 75) {
1059 playerData->curMaxFP = 75;
1060 }
1061 if (playerData->curFP > playerData->curMaxFP) {
1062 playerData->curFP = playerData->curMaxFP;
1063 }
1064 break;
1065 case 2:
1066 playerData->maxBP += 3;
1067 if (playerData->maxBP > 30) {
1068 playerData->maxBP = 30;
1069 }
1070 break;
1071 }
1072
1073 set_actor_anim(0, 0, ANIM_MarioB1_AdjustCap);
1074
1075 if (partner != NULL) {
1076 script = start_script(partner->takeTurnSource, EVT_PRIORITY_A, 0);
1077 partner->takeTurnScript = script;
1078 partner->takeTurnScriptID = script->id;
1079 script->owner1.actorID = ACTOR_PARTNER;
1080 }
1082 bgm_set_song(0, -1, 0, 2000, 8);
1083 }
1084 bFadeToBlackAmt = 0;
1086 break;
1088 if ((gGameStatusPtr->frameCounter % 2) != 0) {
1089 switch (battleStatus->curSubmenu) {
1090 case 0:
1092 break;
1093 case 1:
1096 break;
1097 case 2:
1099 break;
1100 }
1101 } else {
1102 switch (battleStatus->curSubmenu) {
1103 case 0:
1105 break;
1106 case 1:
1109 break;
1110 case 2:
1112 break;
1113 }
1114 }
1115 if (bFadeToBlackAmt == 255) {
1117 break;
1118 }
1119 bFadeToBlackAmt += 10;
1120 if (bFadeToBlackAmt > 255) {
1121 bFadeToBlackAmt = 255;
1122 }
1123 break;
1129
1130 for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs); i++) {
1131 for (j = 0; j < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_FP]); j++) {
1133 }
1134 }
1135
1137 mdl_set_shroud_tint_params(0, 0, 0, 0);
1140 break;
1142 width = get_msg_width(MSG_Menus_CantIncrease, 0) + 31;
1143 x = 160 - (width / 2);
1144 y = 80;
1149 break;
1153 }
1154 if (CelebrateSubstateTime != 0) {
1156 break;
1157 }
1160 break;
1162 if (battleStatus->curButtonsPressed & (BUTTON_A | BUTTON_B)) {
1163 CelebrateStateTime = 99;
1164#if VERSION_JP
1166#endif
1167 }
1168 if (CelebrateStateTime >= 99) {
1170 bgm_set_song(0, -1, 0, 1500, 8);
1171 }
1172 bFadeToBlackAmt = 0;
1173 btl_cam_set_params(TRUE, 270, 100, 8, 0, 0x2400, 100);
1174 set_actor_anim(0, 0, ANIM_MarioB1_AdjustCap);
1175 if (partner != NULL) {
1177 }
1180 break;
1181 }
1182 break;
1184 if (CelebrateSubstateTime != 0) {
1186 if (CelebrateSubstateTime == 0) {
1187 set_actor_anim(0, 0, ANIM_Mario1_Walk);
1188 }
1189 } else {
1190 player->yaw = 0.0f;
1191 if (partner != NULL) {
1192 partner->yaw = 0.0f;
1193 }
1194
1195 player->curPos.x += 4.0f;
1196 if (partner != NULL) {
1197 partner->curPos.x += 4.0f;
1198 }
1199 }
1200 if (bFadeToBlackAmt == 255) {
1202 break;
1203 }
1204 bFadeToBlackAmt += 20;
1205 if (bFadeToBlackAmt > 255) {
1206 bFadeToBlackAmt = 255;
1207 }
1208 break;
1210 if (does_script_exist(player->takeTurnScriptID)) {
1212 }
1213 if (partner != NULL && does_script_exist(partner->takeTurnScriptID)) {
1215 }
1218 break;
1219 }
1221}
1222
1224 BattleStatus* battleStatus = &gBattleStatus;
1225 s32 x;
1226 s32 y;
1227 s32 d1;
1228 s32 d2;
1229 s32 d3;
1230
1231 switch (phase) {
1232 case 0: // before choice
1233 d1 = 100;
1234 d2 = 100;
1235 d3 = 100;
1236 break;
1237 case 1: // choosing
1238 switch (battleStatus->curSubmenu) {
1239 case MENU_HP:
1240 d1 = 0;
1241 d2 = 100;
1242 d3 = 100;
1243 break;
1244 case MENU_FP:
1245 d1 = 100;
1246 d2 = 0;
1247 d3 = 100;
1248 break;
1249 default:
1250 d1 = 100;
1251 d2 = 100;
1252 d3 = 0;
1253 break;
1254 }
1255 break;
1256 default: // after choice
1257 d1 = 100;
1258 d2 = 100;
1259 d3 = 100;
1260 break;
1261 }
1262
1264 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,
1267 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,
1270 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,
1272}
1273
1275 BattleStatus* battleStatus = &gBattleStatus;
1276 s32 rotZ;
1277 s32 id;
1278 s32 i;
1279 s32 j;
1280
1281 switch (gBattleSubState) {
1284 id = LevelUpStatEmblemIDs[0];
1285 hud_element_set_tint(id, 128, 128, 128);
1287 id = LevelUpStatEmblemIDs[3];
1288 hud_element_set_tint(id, 128, 128, 128);
1290 id = LevelUpStatEmblemIDs[1];
1291 hud_element_set_tint(id, 128, 128, 128);
1293 id = LevelUpStatEmblemIDs[2];
1294 hud_element_set_tint(id, 128, 128, 128);
1296
1297 for (j = 0; j < ARRAY_COUNT(LevelUpStatTextIDs); j++) {
1298 for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_FP]); i++) {
1299 id = LevelUpStatTextIDs[j][i];
1300
1301 hud_element_set_tint(id, 128, 128, 128);
1303 }
1304 }
1305 break;
1309 switch (battleStatus->curSubmenu) {
1310 case 0:
1311 rotZ = 152;
1312 hud_element_set_tint(LevelUpStatEmblemIDs[0], 255, 255, 255);
1313 hud_element_set_tint(LevelUpStatEmblemIDs[3], 128, 128, 128);
1314 hud_element_set_tint(LevelUpStatEmblemIDs[1], 128, 128, 128);
1315 hud_element_set_tint(LevelUpStatEmblemIDs[2], 128, 128, 128);
1316
1317 for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_FP]); i++) {
1319
1320 hud_element_set_tint(id, 128, 128, 128);
1321 }
1322
1323 for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_HP]); i++) {
1325
1326 hud_element_set_tint(id, 255, 255, 255);
1327 }
1328
1329 for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_BP]); i++) {
1331
1332 hud_element_set_tint(id, 128, 128, 128);
1333 }
1334
1335 id = LevelUpStatEmblemIDs[0];
1338 }
1339 id = LevelUpStatEmblemIDs[3];
1342 }
1343 id = LevelUpStatEmblemIDs[1];
1346 }
1347 id = LevelUpStatEmblemIDs[2];
1350 }
1351 break;
1352 case 1:
1353 rotZ = 180;
1354 hud_element_set_tint(LevelUpStatEmblemIDs[0], 128, 128, 128);
1355 hud_element_set_tint(LevelUpStatEmblemIDs[3], 255, 255, 255);
1356 hud_element_set_tint(LevelUpStatEmblemIDs[1], 255, 255, 255);
1357 hud_element_set_tint(LevelUpStatEmblemIDs[2], 128, 128, 128);
1358
1359 for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_FP]); i++) {
1361
1362 hud_element_set_tint(id, 255, 255, 255);
1363 }
1364
1365 for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_HP]); i++) {
1367
1368 hud_element_set_tint(id, 128, 128, 128);
1369 }
1370
1371 for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_BP]); i++) {
1373
1374 hud_element_set_tint(id, 128, 128, 128);
1375 }
1376 break;
1377 case 2:
1378 default:
1379 rotZ = 208;
1380 hud_element_set_tint(LevelUpStatEmblemIDs[0], 128, 128, 128);
1381 hud_element_set_tint(LevelUpStatEmblemIDs[3], 128, 128, 128);
1382 hud_element_set_tint(LevelUpStatEmblemIDs[1], 128, 128, 128);
1383 hud_element_set_tint(LevelUpStatEmblemIDs[2], 255, 255, 255);
1384
1385 for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_FP]); i++) {
1387
1388 hud_element_set_tint(id, 128, 128, 128);
1389 }
1390
1391 for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_HP]); i++) {
1393
1394 hud_element_set_tint(id, 128, 128, 128);
1395 }
1396
1397 for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_BP]); i++) {
1399
1400 hud_element_set_tint(id, 255, 255, 255);
1401 }
1402 break;
1403 }
1404
1410
1411 for (j = 0; j < ARRAY_COUNT(LevelUpStatTextIDs); j++) {
1412 for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_FP]); i++) {
1414 }
1415 }
1416
1417 func_80144218(-1);
1418 id = LevelUpSpotlightID;
1419 hud_element_set_transform_rotation(id, 0.0f, 0.0f, rotZ);
1420 func_80144238(id);
1421 break;
1429
1430 for (j = 0; j < ARRAY_COUNT(LevelUpStatTextIDs); j++) {
1431 for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_FP]); i++) {
1433 }
1434 }
1435
1437 break;
1440 break;
1442 if (bFadeToBlackAmt != 0) {
1444 }
1445 break;
1446 }
1447
1448 switch (gBattleSubState) {
1454 if (LevelUpSelectTextOffsetX > 200) {
1456 LevelUpSelectTextVelX = -LevelUpSelectTextVelX / 3; // rebounding
1457 }
1461 break;
1465 if (LevelUpSelectTextOffsetX > 500) {
1467 }
1471 break;
1472 }
1473}
1474
1475void draw_content_level_up_textbox(void* data, s32 posX, s32 posY) {
1476 BattleStatus* battleStatus = &gBattleStatus;
1477 s32 xOffset;
1478 s32 msgID;
1479
1480 switch (gBattleSubState) {
1484 switch (battleStatus->curSubmenu) {
1485 case MENU_HP:
1486 if (!CantLevelUpStat[MENU_HP]) {
1487 msgID = MSG_Menus_LevelUp_HP;
1488 } else {
1489 msgID = MSG_Menus_LevelUp_MaxedHP;
1490 }
1491 xOffset = 9;
1492 break;
1493 case MENU_FP:
1494 if (!CantLevelUpStat[MENU_FP]) {
1495 msgID = MSG_Menus_LevelUp_FP;
1496 } else {
1497 msgID = MSG_Menus_LevelUp_MaxedFP;
1498 }
1499 xOffset = 9;
1500 break;
1501 default:
1502 if (!CantLevelUpStat[MENU_BP]) {
1503 msgID = MSG_Menus_LevelUp_BP;
1504 } else {
1505 msgID = MSG_Menus_LevelUp_MaxedBP;
1506 }
1507 xOffset = 9;
1508 break;
1509 }
1510 draw_msg(msgID, posX + xOffset + 17, posY, 255, MSG_PAL_STANDARD, 0);
1511 break;
1512 }
1513}
1514
1515void draw_content_cant_increase_popup(void* data, s32 posX, s32 posY) {
1516 draw_msg(MSG_Menus_CantIncrease, posX + 11, posY + 6, 255, MSG_PAL_0F, 0);
1517}
EntityModelScript EMS_starpoint_dummy
Definition starpoint.c:213
@ MENU_HP
Definition level_up.c:25
@ MENU_FP
Definition level_up.c:26
@ MENU_BP
Definition level_up.c:27
HudScript HES_level_up_small_green_digit_9
Definition level_up.c:438
s32 D_80284154[]
Definition level_up.c:162
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
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)
@ LVL_UP_BONUS
Definition level_up.c:45
@ LVL_UP_TITLE
Definition level_up.c:39
@ LVL_UP_NEXT_ONES
Definition level_up.c:44
@ LVL_UP_ARROW
Definition level_up.c:42
@ LVL_UP_CUR_TENS
Definition level_up.c:40
@ LVL_UP_CUR_ONES
Definition level_up.c:41
@ LVL_UP_NEXT_TENS
Definition level_up.c:43
HudScript HES_level_up_small_red_digit_7
Definition level_up.c:459
BSS s32 EndBattleRewardTotal
Definition level_up.c:57
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:51
BSS s32 EndBattleRewardIncrement
Definition level_up.c:58
HudScript HES_level_up_small_blue_digit_0
Definition level_up.c:475
HudScript HES_level_up_FP
Definition level_up.c:418
void btl_state_update_celebration(void)
Definition level_up.c:488
BSS HudElemID LevelUpStatEmblemIDs[4]
Definition level_up.c:48
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
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:238
BSS Evt * LevelUpScriptPtr
Definition level_up.c:61
HudScript HES_level_up_small_red_digit_4
Definition level_up.c:456
EvtScript EVS_ShowLevelUp
Definition level_up.c:459
void btl_draw_upgrade_windows(s32 phase)
Definition level_up.c:1223
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:160
EntityModelScript * starpoint_digit_scripts[]
Definition level_up.c:178
@ LVL_UP_FP
Definition level_up.c:32
@ LVL_UP_HP
Definition level_up.c:33
@ LVL_UP_BP
Definition level_up.c:34
void btl_state_draw_celebration(void)
Definition level_up.c:1274
HudScript HES_level_up_blue_digit_2
Definition level_up.c:467
BSS HudElemID LevelUpSpotlightID
Definition level_up.c:50
EntityModelScript EMS_starpoint_digit_9
Definition starpoint.c:208
EntityModelScript * starpoint_space_script
Definition level_up.c:191
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:53
BSS HudElemID LevelUpStatTextIDs[3][7]
Definition level_up.c:49
void draw_content_cant_increase_popup(void *data, s32 posX, s32 posY)
Definition level_up.c:1515
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:54
EvtScript EVS_ShowStarpoints
Definition level_up.c:351
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:59
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:60
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:65
BSS s32 CantLevelUpStat[3]
Definition level_up.c:56
void draw_content_level_up_textbox(void *data, s32 posX, s32 posY)
Definition level_up.c:1475
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:55
BSS s32 CelebrateStateTime
Definition level_up.c:63
HudScript HES_level_up_red_digit_6
Definition level_up.c:448
BSS s32 LevelUpSelectTextOffsetX
Definition level_up.c:64
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:199
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:62
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:193
struct Evt * takeTurnScript
u32 pressedButtons[4]
s32 takeTurnScriptID
union Evt::@8 owner1
Initially -1.
EvtScript * takeTurnSource
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:6385
@ OVERLAY_SCREEN_COLOR
Definition enums.h:2388
@ ENV_TINT_SHROUD
Definition enums.h:4387
@ BUTTON_A
Definition enums.h:2790
@ BUTTON_STICK_LEFT
Definition enums.h:2793
@ BUTTON_STICK_RIGHT
Definition enums.h:2794
@ BUTTON_B
Definition enums.h:2789
@ WINDOW_PRIORITY_10
Definition enums.h:3184
@ WINDOW_PRIORITY_20
Definition enums.h:3186
@ MSG_PAL_0F
Definition enums.h:5420
@ MSG_PAL_STANDARD
Definition enums.h:5415
@ PHASE_CELEBRATE
Definition enums.h:2062
@ SONG_LEVEL_UP
Definition enums.h:424
@ SONG_BATTLE_END
Definition enums.h:421
@ WINDOW_UPDATE_SHOW
Definition enums.h:5311
@ WINDOW_UPDATE_HIDE
Definition enums.h:5312
@ BS_FLAGS2_AWARDING_STAR_POINTS
Definition enums.h:3604
@ BS_FLAGS2_DONT_STOP_MUSIC
Definition enums.h:3619
@ BTL_CAM_DEFAULT
Definition enums.h:4824
@ BTL_CAM_VICTORY
Definition enums.h:4845
@ MODEL_FLAG_TRANSFORM_GROUP_MEMBER
Definition enums.h:4360
@ SOUND_ID_TRIGGER_CHANGE_SOUND
Definition enums.h:532
@ BTL_SUBSTATE_CELEBRATE_LEVEL_UP_CREATE_HUD
Definition enums.h:3898
@ BTL_SUBSTATE_CELEBRATE_LEVEL_UP_UPGRADE
Definition enums.h:3901
@ BTL_SUBSTATE_CELEBRATE_INIT
Definition enums.h:3892
@ BTL_SUBSTATE_CELEBRATE_DONE
Definition enums.h:3908
@ BTL_SUBSTATE_CELEBRATE_LEVEL_UP_BEGIN
Definition enums.h:3897
@ BTL_SUBSTATE_END_BATTLE_EXEC_STAGE_SCRIPT
Definition enums.h:3887
@ BTL_SUBSTATE_CELEBRATE_LEVEL_UP_DESTROY_HUD
Definition enums.h:3903
@ BTL_SUBSTATE_CELEBRATE_LEVEL_UP_SHOW_HUD
Definition enums.h:3899
@ BTL_SUBSTATE_CELEBRATE_LEVEL_UP_INVALID_DELAY
Definition enums.h:3905
@ BTL_SUBSTATE_CELEBRATE_LOAD_STAR_POINTS
Definition enums.h:3893
@ BTL_SUBSTATE_CELEBRATE_LEVEL_UP_CHOOSE
Definition enums.h:3900
@ BTL_SUBSTATE_CELEBRATE_LEVEL_UP_INVALID
Definition enums.h:3904
@ BTL_SUBSTATE_CELEBRATE_WALK_AWAY
Definition enums.h:3907
@ BTL_SUBSTATE_CELEBRATE_TALLY_STAR_POINTS
Definition enums.h:3894
@ BTL_SUBSTATE_CELEBRATE_POST_STAR_POINTS
Definition enums.h:3895
@ BTL_SUBSTATE_CELEBRATE_SKIPPABLE_END_DELAY
Definition enums.h:3906
@ BTL_SUBSTATE_CELEBRATE_LEVEL_UP_LOAD
Definition enums.h:3896
@ BTL_SUBSTATE_CELEBRATE_LEVEL_UP_FADE_OUT
Definition enums.h:3902
@ BATTLE_STATE_END_BATTLE
Definition enums.h:3663
@ ABILITY_FP_PLUS
Definition enums.h:448
@ ABILITY_HP_PLUS
Definition enums.h:440
@ SOUND_LRAW_CHEERING
Definition enums.h:1151
@ SOUND_JINGLE_WON_BATTLE
Definition enums.h:709
@ SOUND_STAR_POINT_PICKUP
Definition enums.h:926
@ SOUND_MENU_CHANGE_SELECTION
Definition enums.h:698
@ SOUND_MENU_NEXT
Definition enums.h:700
@ SOUND_LOOP_CHEERING
Definition enums.h:1589
@ SOUND_MENU_ERROR
Definition enums.h:933
@ ACTOR_PLAYER
Definition enums.h:2085
@ ACTOR_PARTNER
Definition enums.h:2086
@ ACTOR_FLAG_SHOW_STATUS_ICONS
Definition enums.h:3343
@ ACTOR_FLAG_USING_IDLE_ANIM
Definition enums.h:3342
@ PARTNER_NONE
Definition enums.h:2885
@ PARTNER_BOMBETTE
Definition enums.h:2888
@ PARTNER_LAKILESTER
Definition enums.h:2893
@ PARTNER_WATT
Definition enums.h:2891
@ PARTNER_BOW
Definition enums.h:2894
@ PARTNER_SUSHIE
Definition enums.h:2892
@ PARTNER_TWINK
Definition enums.h:2896
@ PARTNER_PARAKARRY
Definition enums.h:2889
@ PARTNER_GOOMBARIA
Definition enums.h:2895
@ PARTNER_GOOMPA
Definition enums.h:2890
@ PARTNER_KOOPER
Definition enums.h:2887
@ PARTNER_GOOMBARIO
Definition enums.h:2886
@ WIN_BTL_POPUP
Definition enums.h:5250
@ WIN_BTL_DESC_BOX
Definition enums.h:5249
@ EVT_PRIORITY_A
Definition evt.h:153
#define ApiStatus_DONE2
Definition evt.h:118
#define ApiStatus_BLOCK
Definition evt.h:116
s32 is_ability_active(s32 arg0)
Definition inventory.c:1725
s32 bgm_set_song(s32 playerIndex, s32 songID, s32 variation, s32 fadeOutTime, s16 volume)
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:4521
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:1005
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_get_render_pos(s32 id, s32 *x, s32 *y)
void func_80144238(s32 id)
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_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)
void func_80144218(s32 id)
@ HUD_ELEMENT_FLAG_DISABLED
Definition hud_element.h:74
@ HUD_ELEMENT_FLAG_80
Definition hud_element.h:80
@ HUD_ELEMENT_FLAG_FILTER_TEX
Definition hud_element.h:88
s32 HudElemID
Definition hud_element.h:11
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:3906
void sfx_play_sound(s32 soundID)
Definition sfx.c:517
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:525
#define Else
Marks the end of an if statement and the start of the else block.
Definition macros.h:295
#define Switch(LVAR)
Marks the start of a switch statement.
Definition macros.h:311
#define LVar6
Definition macros.h:154
#define Ref(sym)
Address/pointer constant.
Definition macros.h:60
#define Set(VAR, INT_VALUE)
Sets the given variable to a given value casted to an integer.
Definition macros.h:365
#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:319
#define EndChildThread
Marks the end of a child thread block.
Definition macros.h:563
#define SCREEN_WIDTH
Definition macros.h:105
#define Sub(VAR, INT_VALUE)
Definition macros.h:377
#define LVarF
Definition macros.h:163
#define End
Signals the end of EVT script data. A script missing this will likely crash on load.
Definition macros.h:213
#define Add(VAR, INT_VALUE)
Definition macros.h:376
#define EndLoop
Marks the end of a loop.
Definition macros.h:248
#define BSS
Definition macros.h:7
#define LVarC
Definition macros.h:160
#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:275
#define Float(DOUBLE)
Definition macros.h:51
#define EndIf
Marks the end of an if statement or an else block.
Definition macros.h:298
#define SCREEN_HEIGHT
Definition macros.h:106
#define CaseDefault
Marks the start of a switch case that executes unconditionally. It also marks the end of any previous...
Definition macros.h:337
#define LVarB
Definition macros.h:159
#define LVar7
Definition macros.h:155
#define Thread
Marks the start of a thread block.
Definition macros.h:544
#define EndThread
Marks the end of a thread block.
Definition macros.h:547
#define LVar8
Definition macros.h:156
#define LVar1
Definition macros.h:149
#define LFlag0
Definition macros.h:167
#define LVarA
Definition macros.h:158
#define Wait(NUM_FRAMES)
Blocks for the given number of frames.
Definition macros.h:254
#define LVar9
Definition macros.h:157
#define SP_PER_BAR
Definition macros.h:102
#define EndSwitch
Marks the end of a switch statement and any case.
Definition macros.h:362
#define IfEq(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR == RVAR.
Definition macros.h:269
#define Call(FUNC, ARGS...)
Calls a given C EVT API function with any number of arguments.
Definition macros.h:576
#define ChildThread
Marks the start of a child thread block.
Definition macros.h:560
#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:328
#define Loop(TIMES)
Marks the beginning of a loop.
Definition macros.h:245
#define LVar0
Definition macros.h:148
#define Return
Kills the current EVT thread.
Definition macros.h:217
struct Actor * partnerActor
struct Actor * playerActor
s32 flags
Definition entity.h:448
ItemData gItemTable[]
GameStatus * gGameStatusPtr
Definition main_loop.c:32
PlayerData gPlayerData
Definition 77480.c:40
u8 * gBackgroundTintModePtr
Definition model.c:105
BattleStatus gBattleStatus
Definition battle.c:11
s32 gBattleSubState
Definition battle.c:14