4#include "message_ids.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"
282API_CALLABLE(GetRemainingStarPointsReward) {
287API_CALLABLE(GetStarPointDigitScripts) {
294 if (script->varTable[10] > 0) {
301 if ((script->varTable[11] > 0) || levelUp) {
311API_CALLABLE(AwaitBattleRewardsDone) {
319API_CALLABLE(InitStarPointModelFlags) {
323 model->
flags &= ~MODEL_FLAGS_MASK_FFF0 ;
326 model->
flags &= ~MODEL_FLAGS_MASK_FFF0 ;
329 model->
flags &= ~MODEL_FLAGS_MASK_FFF0 ;
332 model->
flags &= ~MODEL_FLAGS_MASK_FFF0 ;
338API_CALLABLE(InitLevelUpModelFlags) {
340 model->
flags &= ~MODEL_FLAGS_MASK_FFF0;
346API_CALLABLE(MakeLevelUpConfetti) {
347 fx_confetti(3, 0.0f, 100.0f, 0.0f, 1.0f, 120);
353 Call(GetRemainingStarPointsReward)
379 Call(GetStarPointDigitScripts)
389 Call(InitStarPointModelFlags)
426 Call(AwaitBattleRewardsDone)
462 Call(InitLevelUpModelFlags)
465 Call(MakeLevelUpConfetti)
517 player->
flags &= ~ACTOR_FLAG_SHOW_STATUS_ICONS;
576 if (playerData->
level >= 27) {
590 if (partner != NULL) {
598 if (partner != NULL) {
652 fx_recover(0, x, y, z, playerData->
curHP);
656 fx_recover(1, x, y, z, playerData->
curFP);
728 tensDigit = playerData->
curMaxFP / 10;
729 onesDigit = playerData->
curMaxFP % 10;
732 if (tensDigit != 0) {
751 tensDigit = (playerData->
curMaxFP + 5) / 10;
752 onesDigit = (playerData->
curMaxFP + 5) % 10;
755 if (tensDigit != 0) {
769 tensDigit = playerData->
curMaxFP / 10;
770 onesDigit = playerData->
curMaxFP % 10;
772 if (tensDigit != 0) {
798 tensDigit = playerData->
curMaxHP / 10;
799 onesDigit = playerData->
curMaxHP % 10;
803 if (tensDigit != 0) {
821 tensDigit = (playerData->
curMaxHP + 5) / 10;
822 onesDigit = (playerData->
curMaxHP + 5) % 10;
826 if (tensDigit != 0) {
838 tensDigit = playerData->
curMaxHP / 10;
839 onesDigit = playerData->
curMaxHP % 10;
843 if (tensDigit != 0) {
867 if (playerData->
maxBP != 30) {
868 tensDigit = playerData->
maxBP / 10;
869 onesDigit = playerData->
maxBP % 10;
873 if (tensDigit != 0) {
891 tensDigit = (playerData->
maxBP + 3) / 10;
892 onesDigit = (playerData->
maxBP + 3) % 10;
896 if (tensDigit != 0) {
1012 newSubmenu = currentSubmenu = battleStatus->
curSubmenu;
1019 if (newSubmenu < 0) {
1022 if (newSubmenu > 2) {
1025 if (newSubmenu != currentSubmenu) {
1032 fx_confetti(3, 0.0f, 100.0f, 0.0f, 1.0f, 120);
1044 playerData->
curHP += 5;
1057 playerData->
curFP += 5;
1066 playerData->
maxBP += 3;
1067 if (playerData->
maxBP > 30) {
1068 playerData->
maxBP = 30;
1075 if (partner != NULL) {
1143 x = 160 - (width / 2);
1175 if (partner != NULL) {
1191 if (partner != NULL) {
1192 partner->
yaw = 0.0f;
1196 if (partner != NULL) {
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,
1487 msgID = MSG_Menus_LevelUp_HP;
1489 msgID = MSG_Menus_LevelUp_MaxedHP;
1495 msgID = MSG_Menus_LevelUp_FP;
1497 msgID = MSG_Menus_LevelUp_MaxedFP;
1503 msgID = MSG_Menus_LevelUp_BP;
1505 msgID = MSG_Menus_LevelUp_MaxedBP;
EntityModelScript EMS_starpoint_dummy
HudScript HES_level_up_small_green_digit_9
HudScript HES_level_up_red_digit_2
HudScript HES_level_up_blue_digit_9
HudScript HES_level_up_small_red_digit_5
HudScript HES_level_up_blue_digit_0
HudScript HES_level_up_blue_digit_4
HudScript HES_level_up_green_digit_8
HudScript HES_level_up_small_blue_digit_1
HudScript HES_level_up_green_digit_0
HudScript HES_level_up_small_red_digit_2
IconHudScriptPair gItemHudScripts[]
HudScript HES_level_up_small_blue_arrow
EntityModelScript EMS_starpoint_starpoints
HudScript HES_level_up_green_digit_3
HudScript HES_level_up_small_red_digit_6
s32 * virtual_entity_get_by_index(s32)
HudScript HES_level_up_small_red_digit_7
BSS s32 EndBattleRewardTotal
EntityModelScript EMS_level_up
HudScript HES_level_up_small_green_digit_1
HudScript HES_level_up_small_blue_digit_7
HudScript HES_level_up_blue_digit_8
HudScript HES_level_up_small_red_digit_0
BSS HudElemID LevelUpSelectTextID
BSS s32 EndBattleRewardIncrement
HudScript HES_level_up_small_blue_digit_0
HudScript HES_level_up_FP
void btl_state_update_celebration(void)
BSS HudElemID LevelUpStatEmblemIDs[4]
HudScript HES_ProjectorBeam
HudScript HES_level_up_select_one_to_upgrade
HudScript HES_level_up_small_red_digit_9
HudScript HES_level_up_small_blue_digit_8
HudScript HES_level_up_small_green_digit_8
HudScript HES_level_up_red_digit_5
HudScript HES_level_up_small_red_digit_3
HudScript HES_level_up_leaves
HudScript HES_level_up_BP
HudScript HES_level_up_small_green_digit_2
EntityModelScript EMS_starpoint_starpoint
HudScript HES_level_up_badge
HudScript * level_up_small_digit_scripts[3][10]
BSS Evt * LevelUpScriptPtr
HudScript HES_level_up_small_red_digit_4
EvtScript EVS_ShowLevelUp
void btl_draw_upgrade_windows(s32 phase)
HudScript HES_level_up_small_red_arrow
HudScript HES_level_up_green_digit_1
EntityModelScript * starpoint_digit_scripts[]
void btl_state_draw_celebration(void)
HudScript HES_level_up_blue_digit_2
BSS HudElemID LevelUpSpotlightID
EntityModelScript EMS_starpoint_digit_9
EntityModelScript * starpoint_space_script
HudScript HES_level_up_small_green_digit_3
HudScript HES_level_up_heart
EntityModelScript EMS_starpoint_digit_2
HudScript HES_level_up_small_blue_digit_2
EntityModelScript EMS_starpoint_digit_0
HudScript HES_level_up_green_digit_5
HudScript HES_level_up_small_blue_digit_6
HudScript HES_level_up_red_digit_8
BSS s32 CelebrateSubstateTime
BSS HudElemID LevelUpStatTextIDs[3][7]
void draw_content_cant_increase_popup(void *data, s32 posX, s32 posY)
HudScript HES_level_up_small_red_digit_1
HudScript HES_level_up_small_green_digit_0
HudScript HES_level_up_flower
HudScript HES_level_up_red_digit_9
EntityModelScript EMS_starpoint_digit_7
EntityModelScript EMS_starpoint_digit_4
EntityModelScript EMS_starpoint_digit_5
EvtScript EVS_ShowStarpoints
HudScript HES_level_up_HP
EntityModelScript EMS_starpoint_digit_1
HudScript HES_level_up_small_blue_digit_3
HudScript HES_level_up_red_digit_7
EntityModelScript EMS_starpoint_digit_3
HudScript HES_level_up_small_green_digit_4
HudScript HES_level_up_small_red_digit_8
HudScript HES_level_up_small_blue_digit_5
HudScript HES_level_up_small_blue_digit_9
HudScript HES_level_up_blue_digit_7
BSS s32 EndBattleRewardsDone
HudScript HES_level_up_small_blue_digit_4
HudScript HES_level_up_green_digit_9
HudScript HES_level_up_blue_digit_6
HudScript HES_level_up_red_digit_0
HudScript HES_level_up_red_digit_3
BSS s32 LevelUpSelectTextVelX
BSS s32 CantLevelUpStat[3]
void draw_content_level_up_textbox(void *data, s32 posX, s32 posY)
HudScript HES_level_up_green_digit_6
HudScript HES_level_up_green_digit_7
HudScript HES_level_up_blue_digit_5
HudScript HES_level_up_small_green_arrow
BSS s32 EndBattleRewardStep
BSS s32 CelebrateStateTime
HudScript HES_level_up_red_digit_6
BSS s32 LevelUpSelectTextOffsetX
HudScript HES_level_up_heart_copy
HudScript HES_level_up_small_green_digit_5
EntityModelScript EMS_starpoint_digit_6
HudScript HES_level_up_blue_digit_1
HudScript HES_level_up_red_digit_4
EntityModelScript EMS_starpoint_digit_8
HudScript HES_level_up_small_green_digit_7
HudScript * HES_LevelUpDigits[3][10]
HudScript HES_level_up_green_digit_4
HudScript HES_level_up_small_green_digit_6
HudScript HES_level_up_red_digit_1
HudScript HES_level_up_blue_digit_3
HudScript HES_level_up_green_digit_2
HudScript * levelup_stat_scripts[3]
struct Evt * takeTurnScript
union Evt::@8 owner1
Initially -1.
EvtScript * takeTurnSource
EntityModel * get_entity_model(s32 idx)
@ BS_FLAGS2_AWARDING_STAR_POINTS
@ BS_FLAGS2_DONT_STOP_MUSIC
@ MODEL_FLAG_TRANSFORM_GROUP_MEMBER
@ SOUND_ID_TRIGGER_CHANGE_SOUND
@ BTL_SUBSTATE_CELEBRATE_LEVEL_UP_CREATE_HUD
@ BTL_SUBSTATE_CELEBRATE_LEVEL_UP_UPGRADE
@ BTL_SUBSTATE_CELEBRATE_INIT
@ BTL_SUBSTATE_CELEBRATE_DONE
@ BTL_SUBSTATE_CELEBRATE_LEVEL_UP_BEGIN
@ BTL_SUBSTATE_END_BATTLE_EXEC_STAGE_SCRIPT
@ BTL_SUBSTATE_CELEBRATE_LEVEL_UP_DESTROY_HUD
@ BTL_SUBSTATE_CELEBRATE_LEVEL_UP_SHOW_HUD
@ BTL_SUBSTATE_CELEBRATE_LEVEL_UP_INVALID_DELAY
@ BTL_SUBSTATE_CELEBRATE_LOAD_STAR_POINTS
@ BTL_SUBSTATE_CELEBRATE_LEVEL_UP_CHOOSE
@ BTL_SUBSTATE_CELEBRATE_LEVEL_UP_INVALID
@ BTL_SUBSTATE_CELEBRATE_WALK_AWAY
@ BTL_SUBSTATE_CELEBRATE_TALLY_STAR_POINTS
@ BTL_SUBSTATE_CELEBRATE_POST_STAR_POINTS
@ BTL_SUBSTATE_CELEBRATE_SKIPPABLE_END_DELAY
@ BTL_SUBSTATE_CELEBRATE_LEVEL_UP_LOAD
@ BTL_SUBSTATE_CELEBRATE_LEVEL_UP_FADE_OUT
@ BATTLE_STATE_END_BATTLE
@ SOUND_JINGLE_WON_BATTLE
@ SOUND_STAR_POINT_PICKUP
@ SOUND_MENU_CHANGE_SELECTION
@ ACTOR_FLAG_SHOW_STATUS_ICONS
@ ACTOR_FLAG_USING_IDLE_ANIM
s32 is_ability_active(s32 arg0)
s32 bgm_set_song(s32 playerIndex, s32 songID, s32 variation, s32 fadeOutTime, s16 volume)
void set_window_update(s32 panelID, s32)
void btl_cam_set_params(b16, s16, s16, s16, s32, s32, s32)
void set_screen_overlay_params_front(u8, f32)
void mdl_set_all_tint_type(s32)
void btl_cam_use_preset(s32)
Evt * start_script(EvtScript *source, s32 priority, s32 initialState)
void set_actor_anim(s32 actorID, s32 partID, AnimID animID)
void kill_script_by_ID(s32 id)
s32 btl_cam_is_moving_done(void)
void set_window_properties(s32 panelID, s32 posX, s32 posY, s32 width, s32 height, u8, void *drawContents, void *drawContentsArg, s8 parent)
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
@ HUD_ELEMENT_FLAG_FILTER_TEX
EvtScript EVS_Mario_HandlePhase
void mdl_set_shroud_tint_params(u8 r, u8 g, u8 b, u8 a)
void sfx_play_sound(s32 soundID)
ApiStatus CreateVirtualEntity(Evt *script, b32 isInitialCall)
ApiStatus SetVirtualEntityPosition(Evt *script, b32 isInitialCall)
ApiStatus SetVirtualEntityScale(Evt *script, b32 isInitialCall)
ApiStatus ShakeCam(Evt *script, b32 isInitialCall)
ApiStatus DeleteVirtualEntity(Evt *script, b32 isInitialCall)
#define DMA_COPY_SEGMENT(segment)
#define Else
Marks the end of an if statement and the start of the else block.
#define Switch(LVAR)
Marks the start of a switch statement.
#define Ref(sym)
Address/pointer constant.
#define Set(VAR, INT_VALUE)
Sets the given variable to a given value casted to an integer.
#define CaseEq(RVAR)
Marks the start of a switch case that executes only if LVAR == RVAR. It also marks the end of any pre...
#define EndChildThread
Marks the end of a child thread block.
#define Sub(VAR, INT_VALUE)
#define End
Signals the end of EVT script data. A script missing this will likely crash on load.
#define Add(VAR, INT_VALUE)
#define EndLoop
Marks the end of a loop.
#define IfLt(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR < RVAR.
#define EndIf
Marks the end of an if statement or an else block.
#define CaseDefault
Marks the start of a switch case that executes unconditionally. It also marks the end of any previous...
#define Thread
Marks the start of a thread block.
#define EndThread
Marks the end of a thread block.
#define Wait(NUM_FRAMES)
Blocks for the given number of frames.
#define EndSwitch
Marks the end of a switch statement and any case.
#define IfEq(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR == RVAR.
#define Call(FUNC, ARGS...)
Calls a given C EVT API function with any number of arguments.
#define ChildThread
Marks the start of a child thread block.
#define CaseGt(RVAR)
Marks the start of a switch case that executes only if LVAR <= RVAR. It also marks the end of any pre...
#define Loop(TIMES)
Marks the beginning of a loop.
#define Return
Kills the current EVT thread.
struct Actor * partnerActor
struct Actor * playerActor
GameStatus * gGameStatusPtr
u8 * gBackgroundTintModePtr
BattleStatus gBattleStatus