Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
level_up.c File Reference

Go to the source code of this file.

Enumerations

enum  {
  BTL_SUBSTATE_LOAD_STAR_POINTS = 1 , BTL_SUBSTATE_TALLY_STAR_POINTS = 2 , BTL_SUBSTATE_POST_STAR_POINTS = 3 , BTL_SUBSTATE_LEVEL_UP_LOAD = 4 ,
  BTL_SUBSTATE_LEVEL_UP_BEGIN = 5 , BTL_SUBSTATE_LEVEL_UP_CREATE_HUD = 6 , BTL_SUBSTATE_LEVEL_UP_SHOW_HUD = 7 , BTL_SUBSTATE_LEVEL_UP_CHOOSE = 8 ,
  BTL_SUBSTATE_LEVEL_UP_UPGRADE = 9 , BTL_SUBSTATE_LEVEL_UP_FADE_OUT = 10 , BTL_SUBSTATE_LEVEL_UP_DESTROY_HUD = 11 , BTL_SUBSTATE_LEVEL_UP_INVALID = 15 ,
  BTL_SUBSTATE_LEVEL_UP_INVALID_DELAY = 16 , BTL_SUBSTATE_SKIPPABLE_END_DELAY = 20 , BTL_SUBSTATE_WALK_AWAY = 21 , BTL_SUBSTATE_DONE = 22
}
 
enum  { MENU_HP = 0 , MENU_FP = 1 , MENU_BP = 2 }
 
enum  { LVL_UP_FP = 0 , LVL_UP_HP = 1 , LVL_UP_BP = 2 }
 
enum  {
  LVL_UP_TITLE = 0 , LVL_UP_CUR_TENS = 1 , LVL_UP_CUR_ONES = 2 , LVL_UP_ARROW = 3 ,
  LVL_UP_NEXT_TENS = 4 , LVL_UP_NEXT_ONES = 5 , LVL_UP_BONUS = 6
}
 

Functions

s32virtual_entity_get_by_index (s32)
 
void draw_content_level_up_textbox (void *data, s32 posX, s32 posY)
 
void draw_content_cant_increase_popup (void *data, s32 posX, s32 posY)
 
void btl_state_update_celebration (void)
 
void btl_draw_upgrade_windows (s32 phase)
 
void btl_state_draw_celebration (void)
 

Variables

HudScript HES_ProjectorBeam
 
IconHudScriptPair gItemHudScripts []
 
BSS HudElemID LevelUpStatEmblemIDs [4]
 
BSS HudElemID LevelUpStatTextIDs [3][7]
 
BSS HudElemID LevelUpSpotlightID
 
BSS HudElemID LevelUpSelectTextID
 
BSS s32 CelebrateSubstateTime
 
BSS s32 D_8029FB50
 
BSS s32 EndBattleRewardStep
 
BSS s32 CantLevelUpStat [3]
 
BSS s32 EndBattleRewardTotal
 
BSS s32 EndBattleRewardIncrement
 
BSS s32 pendingLevelUps
 
BSS s32 EndBattleRewardsDone
 
BSS EvtLevelUpScriptPtr
 
BSS s32 LevelUpScriptID
 
BSS s32 CelebrateStateTime
 
BSS s32 LevelUpSelectTextOffsetX
 
BSS s32 LevelUpSelectTextVelX
 
EntityModelScript EMS_starpoint_starpoint
 
EntityModelScript EMS_starpoint_starpoints
 
EntityModelScript EMS_starpoint_digit_0
 
EntityModelScript EMS_starpoint_digit_1
 
EntityModelScript EMS_starpoint_digit_2
 
EntityModelScript EMS_starpoint_digit_3
 
EntityModelScript EMS_starpoint_digit_4
 
EntityModelScript EMS_starpoint_digit_5
 
EntityModelScript EMS_starpoint_digit_6
 
EntityModelScript EMS_starpoint_digit_7
 
EntityModelScript EMS_starpoint_digit_8
 
EntityModelScript EMS_starpoint_digit_9
 
EntityModelScript EMS_starpoint_dummy
 
EntityModelScript EMS_level_up
 
HudScript HES_level_up_flower
 
HudScript HES_level_up_leaves
 
HudScript HES_level_up_heart
 
HudScript HES_level_up_heart_copy
 
HudScript HES_level_up_badge
 
HudScript HES_level_up_FP
 
HudScript HES_level_up_HP
 
HudScript HES_level_up_BP
 
HudScript HES_level_up_green_digit_0
 
HudScript HES_level_up_green_digit_1
 
HudScript HES_level_up_green_digit_2
 
HudScript HES_level_up_green_digit_3
 
HudScript HES_level_up_green_digit_4
 
HudScript HES_level_up_green_digit_5
 
HudScript HES_level_up_green_digit_6
 
HudScript HES_level_up_green_digit_7
 
HudScript HES_level_up_green_digit_8
 
HudScript HES_level_up_green_digit_9
 
HudScript HES_level_up_red_digit_0
 
HudScript HES_level_up_red_digit_1
 
HudScript HES_level_up_red_digit_2
 
HudScript HES_level_up_red_digit_3
 
HudScript HES_level_up_red_digit_4
 
HudScript HES_level_up_red_digit_5
 
HudScript HES_level_up_red_digit_6
 
HudScript HES_level_up_red_digit_7
 
HudScript HES_level_up_red_digit_8
 
HudScript HES_level_up_red_digit_9
 
HudScript HES_level_up_blue_digit_0
 
HudScript HES_level_up_blue_digit_1
 
HudScript HES_level_up_blue_digit_2
 
HudScript HES_level_up_blue_digit_3
 
HudScript HES_level_up_blue_digit_4
 
HudScript HES_level_up_blue_digit_5
 
HudScript HES_level_up_blue_digit_6
 
HudScript HES_level_up_blue_digit_7
 
HudScript HES_level_up_blue_digit_8
 
HudScript HES_level_up_blue_digit_9
 
HudScript HES_level_up_small_green_digit_0
 
HudScript HES_level_up_small_green_digit_1
 
HudScript HES_level_up_small_green_digit_2
 
HudScript HES_level_up_small_green_digit_3
 
HudScript HES_level_up_small_green_digit_4
 
HudScript HES_level_up_small_green_digit_5
 
HudScript HES_level_up_small_green_digit_6
 
HudScript HES_level_up_small_green_digit_7
 
HudScript HES_level_up_small_green_digit_8
 
HudScript HES_level_up_small_green_digit_9
 
HudScript HES_level_up_small_green_arrow
 
HudScript HES_level_up_small_red_digit_0
 
HudScript HES_level_up_small_red_digit_1
 
HudScript HES_level_up_small_red_digit_2
 
HudScript HES_level_up_small_red_digit_3
 
HudScript HES_level_up_small_red_digit_4
 
HudScript HES_level_up_small_red_digit_5
 
HudScript HES_level_up_small_red_digit_6
 
HudScript HES_level_up_small_red_digit_7
 
HudScript HES_level_up_small_red_digit_8
 
HudScript HES_level_up_small_red_digit_9
 
HudScript HES_level_up_small_red_arrow
 
HudScript HES_level_up_small_blue_digit_0
 
HudScript HES_level_up_small_blue_digit_1
 
HudScript HES_level_up_small_blue_digit_2
 
HudScript HES_level_up_small_blue_digit_3
 
HudScript HES_level_up_small_blue_digit_4
 
HudScript HES_level_up_small_blue_digit_5
 
HudScript HES_level_up_small_blue_digit_6
 
HudScript HES_level_up_small_blue_digit_7
 
HudScript HES_level_up_small_blue_digit_8
 
HudScript HES_level_up_small_blue_digit_9
 
HudScript HES_level_up_small_blue_arrow
 
HudScript HES_level_up_select_one_to_upgrade
 
s32 bFadeToBlackAmt = 255
 
s32 D_80284154 []
 
EntityModelScriptstarpoint_digit_scripts []
 
EntityModelScriptstarpoint_space_script = &EMS_starpoint_dummy
 
HudScriptlevelup_stat_scripts [3]
 
HudScriptHES_LevelUpDigits [3][10]
 
HudScriptlevel_up_small_digit_scripts [3][10]
 
EvtScript EVS_ShowStarpoints
 
EvtScript EVS_ShowLevelUp
 

Enumeration Type Documentation

◆ anonymous enum

Enumerator
BTL_SUBSTATE_LOAD_STAR_POINTS 
BTL_SUBSTATE_TALLY_STAR_POINTS 
BTL_SUBSTATE_POST_STAR_POINTS 
BTL_SUBSTATE_LEVEL_UP_LOAD 
BTL_SUBSTATE_LEVEL_UP_BEGIN 
BTL_SUBSTATE_LEVEL_UP_CREATE_HUD 
BTL_SUBSTATE_LEVEL_UP_SHOW_HUD 
BTL_SUBSTATE_LEVEL_UP_CHOOSE 
BTL_SUBSTATE_LEVEL_UP_UPGRADE 
BTL_SUBSTATE_LEVEL_UP_FADE_OUT 
BTL_SUBSTATE_LEVEL_UP_DESTROY_HUD 
BTL_SUBSTATE_LEVEL_UP_INVALID 
BTL_SUBSTATE_LEVEL_UP_INVALID_DELAY 
BTL_SUBSTATE_SKIPPABLE_END_DELAY 
BTL_SUBSTATE_WALK_AWAY 
BTL_SUBSTATE_DONE 

Definition at line 24 of file level_up.c.

24 {
25 // BTL_SUBSTATE_INIT = 0,
42};
@ 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

◆ anonymous enum

Enumerator
MENU_HP 
MENU_FP 
MENU_BP 

Definition at line 45 of file level_up.c.

45 {
46 MENU_HP = 0,
47 MENU_FP = 1,
48 MENU_BP = 2,
49};
@ MENU_HP
Definition level_up.c:46
@ MENU_FP
Definition level_up.c:47
@ MENU_BP
Definition level_up.c:48

◆ anonymous enum

Enumerator
LVL_UP_FP 
LVL_UP_HP 
LVL_UP_BP 

Definition at line 52 of file level_up.c.

52 {
53 LVL_UP_FP = 0,
54 LVL_UP_HP = 1,
55 LVL_UP_BP = 2,
56};
@ LVL_UP_FP
Definition level_up.c:53
@ LVL_UP_HP
Definition level_up.c:54
@ LVL_UP_BP
Definition level_up.c:55

◆ anonymous enum

Enumerator
LVL_UP_TITLE 
LVL_UP_CUR_TENS 
LVL_UP_CUR_ONES 
LVL_UP_ARROW 
LVL_UP_NEXT_TENS 
LVL_UP_NEXT_ONES 
LVL_UP_BONUS 

Definition at line 59 of file level_up.c.

59 {
60 LVL_UP_TITLE = 0,
63 LVL_UP_ARROW = 3,
66 LVL_UP_BONUS = 6,
67};
@ 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

Function Documentation

◆ virtual_entity_get_by_index()

s32 * virtual_entity_get_by_index ( s32 index)

Definition at line 526 of file virtual_entity.c.

526 {
527 return (*gCurrentVirtualEntityListPtr)[index];
528}
VirtualEntityList * gCurrentVirtualEntityListPtr
Definition script_list.c:49

◆ draw_content_level_up_textbox()

void draw_content_level_up_textbox ( void * data,
s32 posX,
s32 posY )

Definition at line 1493 of file level_up.c.

1493 {
1495 s32 xOffset;
1496 s32 msgID;
1497
1498 switch (gBattleSubState) {
1502 switch (battleStatus->curSubmenu) {
1503 case MENU_HP:
1504 if (!CantLevelUpStat[MENU_HP]) {
1505 msgID = MSG_Menus_LevelUp_HP;
1506 } else {
1508 }
1509 xOffset = 9;
1510 break;
1511 case MENU_FP:
1512 if (!CantLevelUpStat[MENU_FP]) {
1513 msgID = MSG_Menus_LevelUp_FP;
1514 } else {
1516 }
1517 xOffset = 9;
1518 break;
1519 default:
1520 if (!CantLevelUpStat[MENU_BP]) {
1521 msgID = MSG_Menus_LevelUp_BP;
1522 } else {
1524 }
1525 xOffset = 9;
1526 break;
1527 }
1528 draw_msg(msgID, posX + xOffset + 17, posY, 255, MSG_PAL_STANDARD, 0);
1529 break;
1530 }
1531}
BSS s32 PopupMenu_SelectedIndex
BSS s32 CantLevelUpStat[3]
Definition level_up.c:77
#define draw_msg
@ MSG_PAL_STANDARD
Definition enums.h:5000
BattleStatus gBattleStatus
Definition battle.cpp:14
s32 gBattleSubState
Definition battle.cpp:17

Referenced by btl_state_update_celebration().

◆ draw_content_cant_increase_popup()

void draw_content_cant_increase_popup ( void * data,
s32 posX,
s32 posY )

Definition at line 1533 of file level_up.c.

1533 {
1534 draw_msg(MSG_Menus_CantIncrease, posX + 11, posY + 6, 255, MSG_PAL_0F, 0);
1535}
@ MSG_PAL_0F
Definition enums.h:5005

Referenced by btl_state_update_celebration().

◆ btl_state_update_celebration()

void btl_state_update_celebration ( void )

Definition at line 508 of file level_up.c.

508 {
511 Actor* player = battleStatus->playerActor;
512 Actor* partner = battleStatus->partnerActor;
516 s32 x, y, z;
517 s32 width;
519
520 Evt* script;
521
524
525 s32 deltaSP;
526 s32 prevSP;
527
528 s32 i;
529 s32 j;
530
531
532 switch (gBattleSubState) {
534 if (battleStatus->pendingStarPoints <= 0) {
536 EndBattleRewardTotal = battleStatus->totalStarPoints * 100;
537 pendingLevelUps = 0;
538 D_8029FB50 = 0;
539 bFadeToBlackAmt = 0;
543
544 prevSP = playerData->starPoints + battleStatus->totalStarPoints;
545 if (prevSP > 99) {
546 bgm_set_song(0, SONG_LEVEL_UP, 0, 250, 8);
547 } else {
548 bgm_set_song(0, SONG_BATTLE_END, 0, 250, 8);
549 }
550
557 }
558 break;
560 if (CelebrateSubstateTime != 0) {
562 } else if (btl_cam_is_moving_done()) {
565 EndBattleRewardsDone = false;
566 // divide reward into 20 increments
569 player->takeTurnScript = script;
571 player->takeTurnScriptID = script->id;
572 script->owner1.actorID = ACTOR_PLAYER;
574 }
575 break;
577 if (CelebrateSubstateTime == 0) {
578 if (battleStatus->totalStarPoints != 0) {
579 // determine the remaining star point reward after this step and give the difference to the player
581 prevSP = battleStatus->totalStarPoints;
582 battleStatus->totalStarPoints = EndBattleRewardTotal / 100;
583 deltaSP = prevSP - battleStatus->totalStarPoints;
584 if (deltaSP > 0) {
586 }
587
588 playerData->starPoints += deltaSP;
589 bFadeToBlackAmt++; // ??
590 if (EndBattleRewardStep == 0 && battleStatus->totalStarPoints != 0) {
591 playerData->starPoints++;
592 }
593 }
594 if (playerData->level >= 27) {
595 playerData->starPoints = 0;
596 }
597 if (playerData->starPoints >= 100) {
598 pendingLevelUps = 1;
599 playerData->starPoints -= 100;
600 }
601 if (playerData->level + pendingLevelUps == 27) {
602 playerData->starPoints = 0;
603 }
604 if (battleStatus->totalStarPoints == 0) {
605 if (EndBattleRewardStep == 0) {
608 if (partner != nullptr) {
610 }
611 battleStatus->battlePhase = PHASE_CELEBRATE;
613 player->takeTurnScript = script;
614 player->takeTurnScriptID = script->id;
615 script->owner1.actorID = ACTOR_PLAYER;
616 if (partner != nullptr) {
617 script = start_script(partner->takeTurnSource, EVT_PRIORITY_A, 0);
618 partner->takeTurnScript = script;
619 partner->takeTurnScriptID = script->id;
620 script->owner1.actorID = ACTOR_PARTNER;
621 }
624 } else {
626 }
627 }
628 } else {
630 }
631 break;
633 if (CelebrateSubstateTime == 0) {
634 if (pendingLevelUps == 0) {
636 } else {
638 }
639 break;
640 }
642 break;
644 if (CelebrateStateTime >= 99) {
645 playerData->level++;
647 btl_cam_move(5);
652 }
653 break;
661 mdl_set_shroud_tint_params(0, 0, 0, 0);
662 break;
664 if (CelebrateSubstateTime == 18) {
665 playerData->curHP = playerData->curMaxHP;
666 playerData->curFP = playerData->curMaxFP;
667 x = player->curPos.x + 0.0f;
668 y = player->curPos.y + 35.0f;
669 z = player->curPos.z;
670 fx_recover(0, x, y, z, playerData->curHP);
671 x = player->curPos.x + 20.0f;
672 y = player->curPos.y + 25.0f;
673 z = player->curPos.z;
674 fx_recover(1, x, y, z, playerData->curFP);
675 playerData->starPower = playerData->maxStarPower * SP_PER_BAR;
676 }
677
678 if (CelebrateSubstateTime != 0) {
680 if (CelebrateSubstateTime < 10) {
681 mdl_set_shroud_tint_params(0, 0, 0, ((10 - CelebrateSubstateTime) * 16) & 0xF0);
682 }
683 } else {
688
693
698
703
708
709 for (i = 1; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_FP]); i++) {
714 }
715
720
721 for (i = 1; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_HP]); i++) {
726 }
727
732
733 for (i = 1; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_BP]); i++) {
738 }
739
740 CantLevelUpStat[MENU_HP] = false;
741 CantLevelUpStat[MENU_FP] = false;
742 CantLevelUpStat[MENU_BP] = false;
743
744 if (playerData->hardMaxFP != 50) {
745 // current FP
746 tensDigit = playerData->curMaxFP / 10;
747 onesDigit = playerData->curMaxFP % 10;
750 if (tensDigit != 0) {
752 }
754 hud_element_set_render_pos(hid, x - 14, y + 46);
755
760 hud_element_set_render_pos(hid, x - 8, y + 46);
761
766 hud_element_set_render_pos(hid, x - 3, y + 46);
767
768 // upgraded FP
769 tensDigit = (playerData->curMaxFP + 5) / 10;
770 onesDigit = (playerData->curMaxFP + 5) % 10;
773 if (tensDigit != 0) {
775 }
777 hud_element_set_render_pos(hid, x + 3, y + 46);
778
783 hud_element_set_render_pos(hid, x + 10, y + 46);
784 } else {
785 // upgraded FP only
787 tensDigit = playerData->curMaxFP / 10;
788 onesDigit = playerData->curMaxFP % 10;
790 if (tensDigit != 0) {
792 }
794 hud_element_set_render_pos(hid, x - 6, y + 46);
795
800 hud_element_set_render_pos(hid, x + 2, y + 46);
801 CantLevelUpStat[MENU_FP] = true;
802 }
803
811 hud_element_set_render_pos(hid, x + 17, y + 46);
812 }
813
814 if (playerData->hardMaxHP != 50) {
815 // current HP
816 tensDigit = playerData->curMaxHP / 10;
817 onesDigit = playerData->curMaxHP % 10;
818
821 if (tensDigit != 0) {
823 }
825 hud_element_set_render_pos(hid, x - 14, y + 46);
826
831 hud_element_set_render_pos(hid, x - 8, y + 46);
832
837 hud_element_set_render_pos(hid, x - 3, y + 46);
838
839 tensDigit = (playerData->curMaxHP + 5) / 10;
840 onesDigit = (playerData->curMaxHP + 5) % 10;
841
844 if (tensDigit != 0) {
846 }
848 hud_element_set_render_pos(hid, x + 3, y + 46);
849
854 hud_element_set_render_pos(hid, x + 10, y + 46);
855 } else {
856 tensDigit = playerData->curMaxHP / 10;
857 onesDigit = playerData->curMaxHP % 10;
858
861 if (tensDigit != 0) {
863 }
865 hud_element_set_render_pos(hid, x - 6, y + 46);
866
871 hud_element_set_render_pos(hid, x + 2, y + 46);
872 CantLevelUpStat[MENU_HP] = true;
873 }
874
882 hud_element_set_render_pos(hid, x + 17, y + 46);
883 }
884
885 if (playerData->maxBP != 30) {
886 tensDigit = playerData->maxBP / 10;
887 onesDigit = playerData->maxBP % 10;
888
891 if (tensDigit != 0) {
893 }
895 hud_element_set_render_pos(hid, x - 14, y + 46);
896
901 hud_element_set_render_pos(hid, x - 8, y + 46);
902
907 hud_element_set_render_pos(hid, x - 3, y + 46);
908
909 tensDigit = (playerData->maxBP + 3) / 10;
910 onesDigit = (playerData->maxBP + 3) % 10;
911
914 if (tensDigit != 0) {
916 }
918 hud_element_set_render_pos(hid, x + 3, y + 46);
919
924 hud_element_set_render_pos(hid, x + 10, y + 46);
925 } else {
930 hud_element_set_render_pos(hid, x - 6, y + 46);
931
936 hud_element_set_render_pos(hid, x + 2, y + 46);
937 CantLevelUpStat[MENU_BP] = true;
938 }
939
943 hud_element_set_tint(hid, 255, 255, 255);
945 hud_element_set_transform_rotation(hid, 0.0f, 0.0f, 180.0f);
946 hud_element_set_transform_scale(hid, 1.0f, 1.5f, 1.0f);
949
953 battleStatus->curSubmenu = MENU_FP;
954
957 }
958 break;
962 x -= 20;
964
965 for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_HP]); i++) {
968 x -= 20;
970 }
971
974 y -= 20;
976
979 y -= 20;
981
982 for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_FP]); i++) {
985 y -= 20;
987 }
988
991 x += 20;
993
994 for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_BP]); i++) {
997 x += 20;
999 }
1000
1002 if (CelebrateSubstateTime == 0) {
1003 hud_element_set_tint(hid, 128, 128, 128);
1004#if VERSION_JP
1005 x = 32;
1006 y = 186;
1008#else
1009 x = 20;
1010 y = 186;
1012#endif
1015 }
1016 break;
1018 if (battleStatus->curButtonsPressed & BUTTON_A) {
1019 if (!CantLevelUpStat[battleStatus->curSubmenu]) {
1023 } else {
1026 }
1027 break;
1028 }
1029
1030 newSubmenu = currentSubmenu = battleStatus->curSubmenu;
1031 if (battleStatus->curButtonsHeld & BUTTON_STICK_LEFT) {
1032 newSubmenu--;
1033 }
1034 if (battleStatus->curButtonsHeld & BUTTON_STICK_RIGHT) {
1035 newSubmenu++;
1036 }
1037 if (newSubmenu < 0) {
1038 newSubmenu = 0;
1039 }
1040 if (newSubmenu > 2) {
1041 newSubmenu = 2;
1042 }
1043 if (newSubmenu != currentSubmenu) {
1045 battleStatus->curSubmenu = newSubmenu;
1046 }
1047
1049 if (CelebrateStateTime > 100) {
1050 fx_confetti(3, 0.0f, 100.0f, 0.0f, 1.0f, 120);
1052 }
1053 break;
1057
1058 switch (battleStatus->curSubmenu) {
1059 case 0:
1060 playerData->hardMaxHP += 5;
1061 playerData->curMaxHP += 5;
1062 playerData->curHP += 5;
1063 if (playerData->curMaxHP > 75) {
1064 playerData->curMaxHP = 75;
1065 }
1066 if (playerData->curHP > playerData->curMaxHP) {
1067 playerData->curHP = playerData->curMaxHP;
1068 }
1069 player->maxHP = playerData->curMaxHP;
1070 player->curHP = playerData->curHP;
1071 break;
1072 case 1:
1073 playerData->hardMaxFP += 5;
1074 playerData->curMaxFP += 5;
1075 playerData->curFP += 5;
1076 if (playerData->curMaxFP > 75) {
1077 playerData->curMaxFP = 75;
1078 }
1079 if (playerData->curFP > playerData->curMaxFP) {
1080 playerData->curFP = playerData->curMaxFP;
1081 }
1082 break;
1083 case 2:
1084 playerData->maxBP += 3;
1085 if (playerData->maxBP > 30) {
1086 playerData->maxBP = 30;
1087 }
1088 break;
1089 }
1090
1092
1093 if (partner != nullptr) {
1094 script = start_script(partner->takeTurnSource, EVT_PRIORITY_A, 0);
1095 partner->takeTurnScript = script;
1096 partner->takeTurnScriptID = script->id;
1097 script->owner1.actorID = ACTOR_PARTNER;
1098 }
1100 bgm_set_song(0, -1, 0, 2000, 8);
1101 }
1102 bFadeToBlackAmt = 0;
1104 break;
1106 if ((gGameStatusPtr->frameCounter % 2) != 0) {
1107 switch (battleStatus->curSubmenu) {
1108 case MENU_HP:
1110 break;
1111 case MENU_FP:
1114 break;
1115 case MENU_BP:
1117 break;
1118 }
1119 } else {
1120 switch (battleStatus->curSubmenu) {
1121 case MENU_HP:
1123 break;
1124 case MENU_FP:
1127 break;
1128 case MENU_BP:
1130 break;
1131 }
1132 }
1133 if (bFadeToBlackAmt == 255) {
1135 break;
1136 }
1137 bFadeToBlackAmt += 10;
1138 if (bFadeToBlackAmt > 255) {
1139 bFadeToBlackAmt = 255;
1140 }
1141 break;
1147
1148 for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs); i++) {
1149 for (j = 0; j < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_FP]); j++) {
1151 }
1152 }
1153
1155 mdl_set_shroud_tint_params(0, 0, 0, 0);
1158 break;
1160 width = get_msg_width(MSG_Menus_CantIncrease, 0) + 31;
1161 x = 160 - (width / 2);
1162 y = 80;
1167 break;
1171 }
1172 if (CelebrateSubstateTime != 0) {
1174 break;
1175 }
1178 break;
1180 if (battleStatus->curButtonsPressed & (BUTTON_A | BUTTON_B)) {
1181 CelebrateStateTime = 99;
1182#if VERSION_JP
1184#endif
1185 }
1186 if (CelebrateStateTime >= 99) {
1188 bgm_set_song(0, -1, 0, 1500, 8);
1189 }
1190 bFadeToBlackAmt = 0;
1191 btl_cam_set_params(true, 270, 100, 8, 0, 0x2400, 100);
1193 if (partner != nullptr) {
1195 }
1198 break;
1199 }
1200 break;
1202 if (CelebrateSubstateTime != 0) {
1204 if (CelebrateSubstateTime == 0) {
1206 }
1207 } else {
1208 player->yaw = 0.0f;
1209 if (partner != nullptr) {
1210 partner->yaw = 0.0f;
1211 }
1212
1213 player->curPos.x += 4.0f;
1214 if (partner != nullptr) {
1215 partner->curPos.x += 4.0f;
1216 }
1217 }
1218 if (bFadeToBlackAmt == 255) {
1220 break;
1221 }
1222 bFadeToBlackAmt += 20;
1223 if (bFadeToBlackAmt > 255) {
1224 bFadeToBlackAmt = 255;
1225 }
1226 break;
1227 case BTL_SUBSTATE_DONE:
1228 if (does_script_exist(player->takeTurnScriptID)) {
1230 }
1231 if (partner != nullptr && does_script_exist(partner->takeTurnScriptID)) {
1232 kill_script_by_ID(partner->takeTurnScriptID);
1233 }
1236 break;
1237 }
1239}
s32 D_80284154[]
Definition level_up.c:183
IconHudScriptPair gItemHudScripts[]
HudScript HES_level_up_small_blue_arrow
Definition level_up.c:485
BSS s32 EndBattleRewardTotal
Definition level_up.c:78
BSS HudElemID LevelUpSelectTextID
Definition level_up.c:72
BSS s32 EndBattleRewardIncrement
Definition level_up.c:79
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_leaves
Definition level_up.c:415
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
EvtScript EVS_ShowLevelUp
Definition level_up.c:479
HudScript HES_level_up_small_red_arrow
Definition level_up.c:462
s32 bFadeToBlackAmt
Definition level_up.c:181
BSS HudElemID LevelUpSpotlightID
Definition level_up.c:71
HudScript HES_level_up_heart
Definition level_up.c:412
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:1533
HudScript HES_level_up_flower
Definition level_up.c:414
BSS s32 D_8029FB50
Definition level_up.c:75
EvtScript EVS_ShowStarpoints
Definition level_up.c:371
BSS s32 pendingLevelUps
Definition level_up.c:80
BSS s32 EndBattleRewardsDone
Definition level_up.c:81
BSS s32 LevelUpSelectTextVelX
Definition level_up.c:86
void draw_content_level_up_textbox(void *data, s32 posX, s32 posY)
Definition level_up.c:1493
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
BSS s32 LevelUpSelectTextOffsetX
Definition level_up.c:85
HudScript * HES_LevelUpDigits[3][10]
Definition level_up.c:219
BSS s32 LevelUpScriptID
Definition level_up.c:83
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
#define get_msg_width
@ 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
@ 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
@ 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
@ WIN_BTL_POPUP
Definition enums.h:4835
@ WIN_BTL_DESC_BOX
Definition enums.h:4834
@ EVT_PRIORITY_A
Definition evt.h:154
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 mdl_set_all_tint_type(s32)
Definition model.c:4515
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_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)
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)
HudElemID hud_element_create(HudScript *anim)
Creates a new HUD element and returns its ID.
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)
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_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
EvtScript EVS_Mario_HandlePhase
void mdl_set_shroud_tint_params(u8 r, u8 g, u8 b, u8 a)
Definition model.c:3902
void sfx_play_sound(s32 soundID)
#define DMA_COPY_SEGMENT(segment)
Definition macros.h:537
#define ARRAY_COUNT(arr)
Definition macros.h:39
#define SP_PER_BAR
Definition macros.h:101
@ 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

Referenced by btl_update().

◆ btl_draw_upgrade_windows()

void btl_draw_upgrade_windows ( s32 phase)

Definition at line 1241 of file level_up.c.

1241 {
1243 s32 x;
1244 s32 y;
1245 s32 d1;
1246 s32 d2;
1247 s32 d3;
1248
1249 switch (phase) {
1250 case 0: // before choice
1251 d1 = 100;
1252 d2 = 100;
1253 d3 = 100;
1254 break;
1255 case 1: // choosing
1256 switch (battleStatus->curSubmenu) {
1257 case MENU_HP:
1258 d1 = 0;
1259 d2 = 100;
1260 d3 = 100;
1261 break;
1262 case MENU_FP:
1263 d1 = 100;
1264 d2 = 0;
1265 d3 = 100;
1266 break;
1267 default:
1268 d1 = 100;
1269 d2 = 100;
1270 d3 = 0;
1271 break;
1272 }
1273 break;
1274 default: // after choice
1275 d1 = 100;
1276 d2 = 100;
1277 d3 = 100;
1278 break;
1279 }
1280
1282 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, nullptr, nullptr, nullptr,
1283 SCREEN_WIDTH, SCREEN_HEIGHT, nullptr);
1285 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, nullptr, nullptr, nullptr,
1286 SCREEN_WIDTH, SCREEN_HEIGHT, nullptr);
1288 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, nullptr, nullptr, nullptr,
1289 SCREEN_WIDTH, SCREEN_HEIGHT, nullptr);
1290}
#define draw_box
@ WINDOW_STYLE_15
Definition enums.h:5970
#define SCREEN_WIDTH
Definition macros.h:108
#define SCREEN_HEIGHT
Definition macros.h:109

Referenced by btl_state_draw_celebration().

◆ btl_state_draw_celebration()

void btl_state_draw_celebration ( void )

Definition at line 1292 of file level_up.c.

1292 {
1294 s32 rotZ;
1295 s32 id;
1296 s32 i;
1297 s32 j;
1298
1299 switch (gBattleSubState) {
1302 id = LevelUpStatEmblemIDs[0];
1303 hud_element_set_tint(id, 128, 128, 128);
1305 id = LevelUpStatEmblemIDs[3];
1306 hud_element_set_tint(id, 128, 128, 128);
1308 id = LevelUpStatEmblemIDs[1];
1309 hud_element_set_tint(id, 128, 128, 128);
1311 id = LevelUpStatEmblemIDs[2];
1312 hud_element_set_tint(id, 128, 128, 128);
1314
1315 for (j = 0; j < ARRAY_COUNT(LevelUpStatTextIDs); j++) {
1316 for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_FP]); i++) {
1317 id = LevelUpStatTextIDs[j][i];
1318
1319 hud_element_set_tint(id, 128, 128, 128);
1321 }
1322 }
1323 break;
1327 switch (battleStatus->curSubmenu) {
1328 case MENU_HP:
1329 rotZ = 152;
1330 hud_element_set_tint(LevelUpStatEmblemIDs[0], 255, 255, 255);
1331 hud_element_set_tint(LevelUpStatEmblemIDs[3], 128, 128, 128);
1332 hud_element_set_tint(LevelUpStatEmblemIDs[1], 128, 128, 128);
1333 hud_element_set_tint(LevelUpStatEmblemIDs[2], 128, 128, 128);
1334
1335 for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_FP]); i++) {
1337
1338 hud_element_set_tint(id, 128, 128, 128);
1339 }
1340
1341 for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_HP]); i++) {
1343
1344 hud_element_set_tint(id, 255, 255, 255);
1345 }
1346
1347 for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_BP]); i++) {
1349
1350 hud_element_set_tint(id, 128, 128, 128);
1351 }
1352
1353 id = LevelUpStatEmblemIDs[0];
1356 }
1357 id = LevelUpStatEmblemIDs[3];
1360 }
1361 id = LevelUpStatEmblemIDs[1];
1364 }
1365 id = LevelUpStatEmblemIDs[2];
1368 }
1369 break;
1370 case MENU_FP:
1371 rotZ = 180;
1372 hud_element_set_tint(LevelUpStatEmblemIDs[0], 128, 128, 128);
1373 hud_element_set_tint(LevelUpStatEmblemIDs[3], 255, 255, 255);
1374 hud_element_set_tint(LevelUpStatEmblemIDs[1], 255, 255, 255);
1375 hud_element_set_tint(LevelUpStatEmblemIDs[2], 128, 128, 128);
1376
1377 for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_FP]); i++) {
1379
1380 hud_element_set_tint(id, 255, 255, 255);
1381 }
1382
1383 for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_HP]); i++) {
1385
1386 hud_element_set_tint(id, 128, 128, 128);
1387 }
1388
1389 for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_BP]); i++) {
1391
1392 hud_element_set_tint(id, 128, 128, 128);
1393 }
1394 break;
1395 case MENU_BP:
1396 default:
1397 rotZ = 208;
1398 hud_element_set_tint(LevelUpStatEmblemIDs[0], 128, 128, 128);
1399 hud_element_set_tint(LevelUpStatEmblemIDs[3], 128, 128, 128);
1400 hud_element_set_tint(LevelUpStatEmblemIDs[1], 128, 128, 128);
1401 hud_element_set_tint(LevelUpStatEmblemIDs[2], 255, 255, 255);
1402
1403 for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_FP]); i++) {
1405
1406 hud_element_set_tint(id, 128, 128, 128);
1407 }
1408
1409 for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_HP]); i++) {
1411
1412 hud_element_set_tint(id, 128, 128, 128);
1413 }
1414
1415 for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_BP]); i++) {
1417
1418 hud_element_set_tint(id, 255, 255, 255);
1419 }
1420 break;
1421 }
1422
1428
1429 for (j = 0; j < ARRAY_COUNT(LevelUpStatTextIDs); j++) {
1430 for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_FP]); i++) {
1432 }
1433 }
1434
1436 id = LevelUpSpotlightID;
1437 hud_element_set_transform_rotation(id, 0.0f, 0.0f, rotZ);
1439 break;
1447
1448 for (j = 0; j < ARRAY_COUNT(LevelUpStatTextIDs); j++) {
1449 for (i = 0; i < ARRAY_COUNT(LevelUpStatTextIDs[LVL_UP_FP]); i++) {
1451 }
1452 }
1453
1455 break;
1458 break;
1460 if (bFadeToBlackAmt != 0) {
1462 }
1463 break;
1464 }
1465
1466 switch (gBattleSubState) {
1472 if (LevelUpSelectTextOffsetX > 200) {
1474 LevelUpSelectTextVelX = -LevelUpSelectTextVelX / 3; // rebounding
1475 }
1479 break;
1483 if (LevelUpSelectTextOffsetX > 500) {
1485 }
1489 break;
1490 }
1491}
void btl_draw_upgrade_windows(s32 phase)
Definition level_up.c:1241
HudScript HES_level_up_heart_copy
Definition level_up.c:413
@ OVERLAY_SCREEN_COLOR
Definition enums.h:2374
void set_screen_overlay_params_front(u8, f32)
void hud_element_draw_complex_hud_next(s32 hid)
HudScript * hud_element_get_script(s32 id)
void hud_element_draw_complex_hud_first(s32 hid)
void hud_element_draw_clipped(s32 id)

Referenced by btl_draw_ui().

Variable Documentation

◆ HES_ProjectorBeam

HudScript HES_ProjectorBeam
extern

Definition at line 514 of file battle_ui_gfx.c.

514 {
516 hs_SetCustomSize(64, 64)
517 hs_Loop
520 hs_End
521};
#define hs_SetRGBA(time, image)
#define hs_SetCustomSize(arg0, arg1)
#define hs_End
#define hs_Restart
#define hs_Loop
#define hs_UseIA8

Referenced by btl_state_update_celebration().

◆ gItemHudScripts

IconHudScriptPair gItemHudScripts[]
extern

◆ LevelUpStatEmblemIDs

BSS HudElemID LevelUpStatEmblemIDs[4]

◆ LevelUpStatTextIDs

BSS HudElemID LevelUpStatTextIDs[3][7]

Definition at line 70 of file level_up.c.

Referenced by btl_state_draw_celebration(), and btl_state_update_celebration().

◆ LevelUpSpotlightID

BSS HudElemID LevelUpSpotlightID

Definition at line 71 of file level_up.c.

Referenced by btl_state_draw_celebration(), and btl_state_update_celebration().

◆ LevelUpSelectTextID

BSS HudElemID LevelUpSelectTextID

Definition at line 72 of file level_up.c.

Referenced by btl_state_draw_celebration(), and btl_state_update_celebration().

◆ CelebrateSubstateTime

BSS s32 CelebrateSubstateTime

Definition at line 74 of file level_up.c.

Referenced by btl_state_update_celebration().

◆ D_8029FB50

BSS s32 D_8029FB50

Definition at line 75 of file level_up.c.

Referenced by btl_state_update_celebration().

◆ EndBattleRewardStep

BSS s32 EndBattleRewardStep

Definition at line 76 of file level_up.c.

Referenced by btl_state_update_celebration().

◆ CantLevelUpStat

BSS s32 CantLevelUpStat[3]

Definition at line 77 of file level_up.c.

Referenced by btl_state_update_celebration(), and draw_content_level_up_textbox().

◆ EndBattleRewardTotal

BSS s32 EndBattleRewardTotal

Definition at line 78 of file level_up.c.

Referenced by btl_state_update_celebration().

◆ EndBattleRewardIncrement

BSS s32 EndBattleRewardIncrement

Definition at line 79 of file level_up.c.

Referenced by btl_state_update_celebration().

◆ pendingLevelUps

BSS s32 pendingLevelUps

Definition at line 80 of file level_up.c.

Referenced by btl_state_update_celebration().

◆ EndBattleRewardsDone

BSS s32 EndBattleRewardsDone

Definition at line 81 of file level_up.c.

Referenced by btl_state_update_celebration().

◆ LevelUpScriptPtr

BSS Evt* LevelUpScriptPtr

Definition at line 82 of file level_up.c.

Referenced by btl_state_update_celebration().

◆ LevelUpScriptID

BSS s32 LevelUpScriptID

Definition at line 83 of file level_up.c.

Referenced by btl_state_update_celebration().

◆ CelebrateStateTime

BSS s32 CelebrateStateTime

Definition at line 84 of file level_up.c.

Referenced by btl_state_update_celebration().

◆ LevelUpSelectTextOffsetX

BSS s32 LevelUpSelectTextOffsetX

Definition at line 85 of file level_up.c.

Referenced by btl_state_draw_celebration(), and btl_state_update_celebration().

◆ LevelUpSelectTextVelX

BSS s32 LevelUpSelectTextVelX

Definition at line 86 of file level_up.c.

Referenced by btl_state_draw_celebration(), and btl_state_update_celebration().

◆ EMS_starpoint_starpoint

EntityModelScript EMS_starpoint_starpoint
extern

Definition at line 196 of file starpoint.c.

◆ EMS_starpoint_starpoints

EntityModelScript EMS_starpoint_starpoints
extern

Definition at line 197 of file starpoint.c.

◆ EMS_starpoint_digit_0

EntityModelScript EMS_starpoint_digit_0
extern

Definition at line 199 of file starpoint.c.

◆ EMS_starpoint_digit_1

EntityModelScript EMS_starpoint_digit_1
extern

Definition at line 200 of file starpoint.c.

◆ EMS_starpoint_digit_2

EntityModelScript EMS_starpoint_digit_2
extern

Definition at line 201 of file starpoint.c.

◆ EMS_starpoint_digit_3

EntityModelScript EMS_starpoint_digit_3
extern

Definition at line 202 of file starpoint.c.

◆ EMS_starpoint_digit_4

EntityModelScript EMS_starpoint_digit_4
extern

Definition at line 203 of file starpoint.c.

◆ EMS_starpoint_digit_5

EntityModelScript EMS_starpoint_digit_5
extern

Definition at line 204 of file starpoint.c.

◆ EMS_starpoint_digit_6

EntityModelScript EMS_starpoint_digit_6
extern

Definition at line 205 of file starpoint.c.

◆ EMS_starpoint_digit_7

EntityModelScript EMS_starpoint_digit_7
extern

Definition at line 206 of file starpoint.c.

◆ EMS_starpoint_digit_8

EntityModelScript EMS_starpoint_digit_8
extern

Definition at line 207 of file starpoint.c.

◆ EMS_starpoint_digit_9

EntityModelScript EMS_starpoint_digit_9
extern

Definition at line 208 of file starpoint.c.

◆ EMS_starpoint_dummy

EntityModelScript EMS_starpoint_dummy
extern

Definition at line 213 of file starpoint.c.

◆ EMS_level_up

EntityModelScript EMS_level_up
extern

Definition at line 410 of file level_up.c.

◆ HES_level_up_flower

HudScript HES_level_up_flower
extern

Definition at line 414 of file level_up.c.

Referenced by btl_state_draw_celebration(), and btl_state_update_celebration().

◆ HES_level_up_leaves

HudScript HES_level_up_leaves
extern

Definition at line 415 of file level_up.c.

Referenced by btl_state_draw_celebration(), and btl_state_update_celebration().

◆ HES_level_up_heart

HudScript HES_level_up_heart
extern

Definition at line 412 of file level_up.c.

Referenced by btl_state_update_celebration().

◆ HES_level_up_heart_copy

HudScript HES_level_up_heart_copy
extern

Definition at line 413 of file level_up.c.

Referenced by btl_state_draw_celebration().

◆ HES_level_up_badge

HudScript HES_level_up_badge
extern

Definition at line 416 of file level_up.c.

Referenced by btl_state_draw_celebration(), and btl_state_update_celebration().

◆ HES_level_up_FP

HudScript HES_level_up_FP
extern

Definition at line 418 of file level_up.c.

◆ HES_level_up_HP

HudScript HES_level_up_HP
extern

Definition at line 441 of file level_up.c.

◆ HES_level_up_BP

HudScript HES_level_up_BP
extern

Definition at line 464 of file level_up.c.

◆ HES_level_up_green_digit_0

HudScript HES_level_up_green_digit_0
extern

Definition at line 419 of file level_up.c.

◆ HES_level_up_green_digit_1

HudScript HES_level_up_green_digit_1
extern

Definition at line 420 of file level_up.c.

◆ HES_level_up_green_digit_2

HudScript HES_level_up_green_digit_2
extern

Definition at line 421 of file level_up.c.

◆ HES_level_up_green_digit_3

HudScript HES_level_up_green_digit_3
extern

Definition at line 422 of file level_up.c.

◆ HES_level_up_green_digit_4

HudScript HES_level_up_green_digit_4
extern

Definition at line 423 of file level_up.c.

◆ HES_level_up_green_digit_5

HudScript HES_level_up_green_digit_5
extern

Definition at line 424 of file level_up.c.

◆ HES_level_up_green_digit_6

HudScript HES_level_up_green_digit_6
extern

Definition at line 425 of file level_up.c.

◆ HES_level_up_green_digit_7

HudScript HES_level_up_green_digit_7
extern

Definition at line 426 of file level_up.c.

◆ HES_level_up_green_digit_8

HudScript HES_level_up_green_digit_8
extern

Definition at line 427 of file level_up.c.

◆ HES_level_up_green_digit_9

HudScript HES_level_up_green_digit_9
extern

Definition at line 428 of file level_up.c.

◆ HES_level_up_red_digit_0

HudScript HES_level_up_red_digit_0
extern

Definition at line 442 of file level_up.c.

◆ HES_level_up_red_digit_1

HudScript HES_level_up_red_digit_1
extern

Definition at line 443 of file level_up.c.

◆ HES_level_up_red_digit_2

HudScript HES_level_up_red_digit_2
extern

Definition at line 444 of file level_up.c.

◆ HES_level_up_red_digit_3

HudScript HES_level_up_red_digit_3
extern

Definition at line 445 of file level_up.c.

◆ HES_level_up_red_digit_4

HudScript HES_level_up_red_digit_4
extern

Definition at line 446 of file level_up.c.

◆ HES_level_up_red_digit_5

HudScript HES_level_up_red_digit_5
extern

Definition at line 447 of file level_up.c.

◆ HES_level_up_red_digit_6

HudScript HES_level_up_red_digit_6
extern

Definition at line 448 of file level_up.c.

◆ HES_level_up_red_digit_7

HudScript HES_level_up_red_digit_7
extern

Definition at line 449 of file level_up.c.

◆ HES_level_up_red_digit_8

HudScript HES_level_up_red_digit_8
extern

Definition at line 450 of file level_up.c.

◆ HES_level_up_red_digit_9

HudScript HES_level_up_red_digit_9
extern

Definition at line 451 of file level_up.c.

◆ HES_level_up_blue_digit_0

HudScript HES_level_up_blue_digit_0
extern

Definition at line 465 of file level_up.c.

◆ HES_level_up_blue_digit_1

HudScript HES_level_up_blue_digit_1
extern

Definition at line 466 of file level_up.c.

◆ HES_level_up_blue_digit_2

HudScript HES_level_up_blue_digit_2
extern

Definition at line 467 of file level_up.c.

◆ HES_level_up_blue_digit_3

HudScript HES_level_up_blue_digit_3
extern

Definition at line 468 of file level_up.c.

◆ HES_level_up_blue_digit_4

HudScript HES_level_up_blue_digit_4
extern

Definition at line 469 of file level_up.c.

◆ HES_level_up_blue_digit_5

HudScript HES_level_up_blue_digit_5
extern

Definition at line 470 of file level_up.c.

◆ HES_level_up_blue_digit_6

HudScript HES_level_up_blue_digit_6
extern

Definition at line 471 of file level_up.c.

◆ HES_level_up_blue_digit_7

HudScript HES_level_up_blue_digit_7
extern

Definition at line 472 of file level_up.c.

◆ HES_level_up_blue_digit_8

HudScript HES_level_up_blue_digit_8
extern

Definition at line 473 of file level_up.c.

◆ HES_level_up_blue_digit_9

HudScript HES_level_up_blue_digit_9
extern

Definition at line 474 of file level_up.c.

◆ HES_level_up_small_green_digit_0

HudScript HES_level_up_small_green_digit_0
extern

Definition at line 429 of file level_up.c.

◆ HES_level_up_small_green_digit_1

HudScript HES_level_up_small_green_digit_1
extern

Definition at line 430 of file level_up.c.

◆ HES_level_up_small_green_digit_2

HudScript HES_level_up_small_green_digit_2
extern

Definition at line 431 of file level_up.c.

◆ HES_level_up_small_green_digit_3

HudScript HES_level_up_small_green_digit_3
extern

Definition at line 432 of file level_up.c.

◆ HES_level_up_small_green_digit_4

HudScript HES_level_up_small_green_digit_4
extern

Definition at line 433 of file level_up.c.

◆ HES_level_up_small_green_digit_5

HudScript HES_level_up_small_green_digit_5
extern

Definition at line 434 of file level_up.c.

◆ HES_level_up_small_green_digit_6

HudScript HES_level_up_small_green_digit_6
extern

Definition at line 435 of file level_up.c.

◆ HES_level_up_small_green_digit_7

HudScript HES_level_up_small_green_digit_7
extern

Definition at line 436 of file level_up.c.

◆ HES_level_up_small_green_digit_8

HudScript HES_level_up_small_green_digit_8
extern

Definition at line 437 of file level_up.c.

◆ HES_level_up_small_green_digit_9

HudScript HES_level_up_small_green_digit_9
extern

Definition at line 438 of file level_up.c.

◆ HES_level_up_small_green_arrow

HudScript HES_level_up_small_green_arrow
extern

Definition at line 439 of file level_up.c.

Referenced by btl_state_update_celebration().

◆ HES_level_up_small_red_digit_0

HudScript HES_level_up_small_red_digit_0
extern

Definition at line 452 of file level_up.c.

◆ HES_level_up_small_red_digit_1

HudScript HES_level_up_small_red_digit_1
extern

Definition at line 453 of file level_up.c.

◆ HES_level_up_small_red_digit_2

HudScript HES_level_up_small_red_digit_2
extern

Definition at line 454 of file level_up.c.

◆ HES_level_up_small_red_digit_3

HudScript HES_level_up_small_red_digit_3
extern

Definition at line 455 of file level_up.c.

◆ HES_level_up_small_red_digit_4

HudScript HES_level_up_small_red_digit_4
extern

Definition at line 456 of file level_up.c.

◆ HES_level_up_small_red_digit_5

HudScript HES_level_up_small_red_digit_5
extern

Definition at line 457 of file level_up.c.

◆ HES_level_up_small_red_digit_6

HudScript HES_level_up_small_red_digit_6
extern

Definition at line 458 of file level_up.c.

◆ HES_level_up_small_red_digit_7

HudScript HES_level_up_small_red_digit_7
extern

Definition at line 459 of file level_up.c.

◆ HES_level_up_small_red_digit_8

HudScript HES_level_up_small_red_digit_8
extern

Definition at line 460 of file level_up.c.

◆ HES_level_up_small_red_digit_9

HudScript HES_level_up_small_red_digit_9
extern

Definition at line 461 of file level_up.c.

◆ HES_level_up_small_red_arrow

HudScript HES_level_up_small_red_arrow
extern

Definition at line 462 of file level_up.c.

Referenced by btl_state_update_celebration().

◆ HES_level_up_small_blue_digit_0

HudScript HES_level_up_small_blue_digit_0
extern

Definition at line 475 of file level_up.c.

◆ HES_level_up_small_blue_digit_1

HudScript HES_level_up_small_blue_digit_1
extern

Definition at line 476 of file level_up.c.

◆ HES_level_up_small_blue_digit_2

HudScript HES_level_up_small_blue_digit_2
extern

Definition at line 477 of file level_up.c.

◆ HES_level_up_small_blue_digit_3

HudScript HES_level_up_small_blue_digit_3
extern

Definition at line 478 of file level_up.c.

◆ HES_level_up_small_blue_digit_4

HudScript HES_level_up_small_blue_digit_4
extern

Definition at line 479 of file level_up.c.

◆ HES_level_up_small_blue_digit_5

HudScript HES_level_up_small_blue_digit_5
extern

Definition at line 480 of file level_up.c.

◆ HES_level_up_small_blue_digit_6

HudScript HES_level_up_small_blue_digit_6
extern

Definition at line 481 of file level_up.c.

◆ HES_level_up_small_blue_digit_7

HudScript HES_level_up_small_blue_digit_7
extern

Definition at line 482 of file level_up.c.

◆ HES_level_up_small_blue_digit_8

HudScript HES_level_up_small_blue_digit_8
extern

Definition at line 483 of file level_up.c.

◆ HES_level_up_small_blue_digit_9

HudScript HES_level_up_small_blue_digit_9
extern

Definition at line 484 of file level_up.c.

◆ HES_level_up_small_blue_arrow

HudScript HES_level_up_small_blue_arrow
extern

Definition at line 485 of file level_up.c.

Referenced by btl_state_update_celebration().

◆ HES_level_up_select_one_to_upgrade

HudScript HES_level_up_select_one_to_upgrade
extern

Definition at line 487 of file level_up.c.

Referenced by btl_state_update_celebration().

◆ bFadeToBlackAmt

s32 bFadeToBlackAmt = 255

Definition at line 181 of file level_up.c.

Referenced by btl_state_draw_celebration(), and btl_state_update_celebration().

◆ D_80284154

s32 D_80284154[]
Initial value:

Definition at line 183 of file level_up.c.

Referenced by btl_state_update_celebration().

◆ starpoint_digit_scripts

EntityModelScript* starpoint_digit_scripts[]
Initial value:
= {
}
EntityModelScript EMS_starpoint_digit_9
Definition starpoint.c:208
EntityModelScript EMS_starpoint_digit_2
Definition starpoint.c:201
EntityModelScript EMS_starpoint_digit_0
Definition starpoint.c:199
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
EntityModelScript EMS_starpoint_digit_1
Definition starpoint.c:200
EntityModelScript EMS_starpoint_digit_3
Definition starpoint.c:202
EntityModelScript EMS_starpoint_digit_6
Definition starpoint.c:205
EntityModelScript EMS_starpoint_digit_8
Definition starpoint.c:207

Definition at line 198 of file level_up.c.

◆ starpoint_space_script

EntityModelScript* starpoint_space_script = &EMS_starpoint_dummy

Definition at line 211 of file level_up.c.

◆ levelup_stat_scripts

HudScript* levelup_stat_scripts[3]
Initial value:
= {
}
HudScript HES_level_up_FP
Definition level_up.c:418
HudScript HES_level_up_BP
Definition level_up.c:464
HudScript HES_level_up_HP
Definition level_up.c:441

Definition at line 213 of file level_up.c.

213 {
217};

Referenced by btl_state_update_celebration().

◆ HES_LevelUpDigits

HudScript* HES_LevelUpDigits[3][10]

Definition at line 219 of file level_up.c.

219 {
220 {
231 },
232 {
243 },
244 {
255 },
256};
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_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_green_digit_0
Definition level_up.c:419
HudScript HES_level_up_green_digit_3
Definition level_up.c:422
HudScript HES_level_up_blue_digit_8
Definition level_up.c:473
HudScript HES_level_up_red_digit_5
Definition level_up.c:447
HudScript HES_level_up_green_digit_1
Definition level_up.c:420
HudScript HES_level_up_blue_digit_2
Definition level_up.c:467
HudScript HES_level_up_green_digit_5
Definition level_up.c:424
HudScript HES_level_up_red_digit_8
Definition level_up.c:450
HudScript HES_level_up_red_digit_9
Definition level_up.c:451
HudScript HES_level_up_red_digit_7
Definition level_up.c:449
HudScript HES_level_up_blue_digit_7
Definition level_up.c:472
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
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_red_digit_6
Definition level_up.c:448
HudScript HES_level_up_blue_digit_1
Definition level_up.c:466
HudScript HES_level_up_red_digit_4
Definition level_up.c:446
HudScript HES_level_up_green_digit_4
Definition level_up.c:423
HudScript HES_level_up_red_digit_1
Definition level_up.c:443
HudScript HES_level_up_blue_digit_3
Definition level_up.c:468
HudScript HES_level_up_green_digit_2
Definition level_up.c:421

Referenced by btl_state_update_celebration().

◆ level_up_small_digit_scripts

HudScript* level_up_small_digit_scripts[3][10]

Definition at line 258 of file level_up.c.

258 {
259 {
270 },
271 {
282 },
283 {
294 },
295};
HudScript HES_level_up_small_green_digit_9
Definition level_up.c:438
HudScript HES_level_up_small_red_digit_5
Definition level_up.c:457
HudScript HES_level_up_small_blue_digit_1
Definition level_up.c:476
HudScript HES_level_up_small_red_digit_2
Definition level_up.c:454
HudScript HES_level_up_small_red_digit_6
Definition level_up.c:458
HudScript HES_level_up_small_red_digit_7
Definition level_up.c:459
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_small_red_digit_0
Definition level_up.c:452
HudScript HES_level_up_small_blue_digit_0
Definition level_up.c:475
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_small_red_digit_3
Definition level_up.c:455
HudScript HES_level_up_small_green_digit_2
Definition level_up.c:431
HudScript HES_level_up_small_red_digit_4
Definition level_up.c:456
HudScript HES_level_up_small_green_digit_3
Definition level_up.c:432
HudScript HES_level_up_small_blue_digit_2
Definition level_up.c:477
HudScript HES_level_up_small_blue_digit_6
Definition level_up.c:481
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_small_blue_digit_3
Definition level_up.c:478
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
HudScript HES_level_up_small_blue_digit_9
Definition level_up.c:484
HudScript HES_level_up_small_blue_digit_4
Definition level_up.c:479
HudScript HES_level_up_small_green_digit_5
Definition level_up.c:434
HudScript HES_level_up_small_green_digit_7
Definition level_up.c:436
HudScript HES_level_up_small_green_digit_6
Definition level_up.c:435

Referenced by btl_state_update_celebration().

◆ EVS_ShowStarpoints

EvtScript EVS_ShowStarpoints

Definition at line 371 of file level_up.c.

371 {
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};
EntityModelScript EMS_starpoint_starpoints
Definition starpoint.c:197
EntityModelScript EMS_starpoint_starpoint
Definition starpoint.c:196
ApiStatus CreateVirtualEntity(Evt *script, b32 isInitialCall)
ApiStatus SetVirtualEntityPosition(Evt *script, b32 isInitialCall)
ApiStatus SetVirtualEntityScale(Evt *script, b32 isInitialCall)
ApiStatus DeleteVirtualEntity(Evt *script, b32 isInitialCall)
#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 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 LVarC
Definition macros.h:161
#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 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 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 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 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

Referenced by btl_state_update_celebration().

◆ EVS_ShowLevelUp

EvtScript EVS_ShowLevelUp
Initial value:
= {
Wait(4)
Wait(8)
Call(ShakeCam, 1, 0, 5, Float(3.0))
Call(ShakeCam, 1, 0, 3, Float(2.25))
Call(ShakeCam, 1, 0, 4, Float(1.2))
Call(ShakeCam, 1, 0, 6, Float(0.45))
Call(ShakeCam, 1, 0, 8, Float(0.15))
Set(LVar0, 210)
Loop(10)
Sub(LVar0, 10)
Wait(1)
Wait(8)
}
EntityModelScript EMS_level_up
Definition level_up.c:410
ApiStatus ShakeCam(Evt *script, b32 isInitialCall)
#define EndChildThread
Marks the end of a child thread block.
Definition macros.h:564
#define Sub(VAR, INT_VALUE)
Definition macros.h:378
#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 ChildThread
Marks the start of a child thread block.
Definition macros.h:561

Definition at line 479 of file level_up.c.

479 {
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};

Referenced by btl_state_update_celebration().