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

Go to the source code of this file.

Data Structures

struct  BonkData
 

Macros

#define TIP_X_PRL   65
 
#define TIP_X_HLT1   55
 
#define TIP_X_HLT2   73
 
#define TIP_X_PBST   64
 
#define TIP_X_MB   67
 
#define TIP_X_ML   56
 
#define TIP_X_HLA1   65
 
#define TIP_X_HLA2   146
 
#define TIP_X_PBS1   86
 
#define TIP_X_PBS2   64
 
#define TIP_X_PBS3   108
 
#define TIP_X_PWT1   105
 
#define TIP_X_PWT2   65
 
#define TIP_X_MB1   63
 
#define TIP_X_MB2   84
 
#define TIP_X_HTT   124
 
#define TIP_X_HTR1   56
 
#define TIP_X_HTR2   53
 
#define TIP_X_MTA1   107
 
#define TIP_X_MTA2   210
 
#define TIP_X_MTA3   56
 
#define TIP_X_BF_RD   64
 
#define TIP_Y_HLT2   31
 
#define TIP_Y_HLA2   32
 
#define TIP_Y_PBS1   13
 
#define TIP_Y_PBS2   13
 
#define TIP_Y_PBS3   13
 
#define TIP_Y_PWT1   13
 
#define TIP_Y_HTR1   31
 
#define TIP_Y_MTA1   13
 
#define TIP_Y_MTA2   15
 
#define TIP_Y_BF_RD   13
 
#define TIP_SCALE1   0.8f
 
#define TIP_SCALE2   0.8f
 

Functions

void btl_bonk_update (void *data)
 
void btl_bonk_render (void *data)
 
void btl_bonk_setup_gfx (void *data)
 
void btl_update_message_popup (void *popup)
 
void btl_show_message_popup (void *popup)
 
void btl_popup_messages_init (void)
 
void btl_popup_messages_delete (void)
 
void btl_popup_messages_update (void)
 
void btl_popup_messages_draw_world_geometry (void)
 
void btl_popup_messages_draw_ui (void)
 
PopupMessagebtl_create_popup (void)
 
void free_popup (PopupMessage *popup)
 
void show_immune_bonk (f32 x, f32 y, f32 z, s32 numStars, s32 startupTime, s32 animDir)
 
void btl_bonk_cleanup (void)
 
void btl_show_battle_message (s32 messageIndex, s32 duration)
 
void btl_show_variable_battle_message (s32 messageIndex, s32 duration, s32 varValue)
 
s32 btl_is_popup_displayed (void)
 
void btl_set_popup_duration (s32 duration)
 
void btl_message_lock_box_pos (void)
 
void btl_message_unlock_box_pos (void)
 
void close_action_command_instruction_popup (void)
 
void btl_message_popup_draw_content (void *data, s32 x, s32 y)
 
void apply_shock_effect (Actor *actor)
 

Variables

s16 BattleMessage_BoxSizesY [] = { 28, 40 }
 
s16 BattleMessage_TextOffsetsY [] = { 0, -2 }
 
s16 BattleMessage_BoxOffsetsY [] = { 0, -12 }
 
Vec3f BonkAnimAccel []
 
Vec3f BonkAnimScale []
 
EntityModelScript EMS_BonkIcon
 
EntityModelScriptBonkModelScripts []
 
s32 BattleMessages []
 
s32 bActorMessages []
 
PopupMessagebPopupMessage = NULL
 
BSS PopupMessage popupMessages [32]
 
BSS s16 BattlePopupMessageVar
 
BSS s16 HID_BattleMessage1
 
BSS s16 HID_BattleMessage2
 
BSS s16 HID_BattleMessage3
 
BSS s16 HID_BattleMessage4
 
BSS b16 ActionCommandTipVisible
 
BSS b16 BattleMessage_BoxPosLocked
 
BSS s16 BattleMessage_CurBoxPosY
 
BSS s16 BattleMessage_CurBoxOffsetY
 
HudScript HES_AimReticle
 
HudScript HES_AimTarget
 
HudScript HES_CDownButton
 
HudScript HES_CLeftButton
 
HudScript HES_CRightButton
 
HudScript HES_CUpButton
 
HudScript HES_Item_MenuBoots1
 
HudScript HES_Item_MenuBoots2
 
HudScript HES_Item_MenuBoots3
 
HudScript HES_Item_MenuHammer1
 
HudScript HES_Item_MenuHammer2
 
HudScript HES_Item_MenuHammer3
 
HudScript HES_Item_MenuItems
 
HudScript HES_MashBButton2
 
HudScript HES_MashCDownButton1
 
HudScript HES_MashCLeftButton
 
HudScript HES_MashCRightButton1
 
HudScript HES_MashCUpButton
 
HudScript HES_RotateStickCW
 
HudScript HES_StickBackAndForth
 
HudScript HES_StickTapLeft
 
HudScript HES_StickTapRight
 
HudScript HES_TimingBlink
 

Data Structure Documentation

◆ BonkData

struct BonkData
Data Fields
b32 alive
s32 entityModelIndex
Vec3f accel
Vec3f vel
s32 moveTime
s32 startupTime
f32 rotZ
f32 rotVelZ
f32 rotY
f32 scale
Vec3f pos
s32 holdTime
f32 alpha

Macro Definition Documentation

◆ TIP_X_PRL

#define TIP_X_PRL   65

Definition at line 1244 of file popup_messages.c.

Referenced by btl_message_popup_draw_content().

◆ TIP_X_HLT1

#define TIP_X_HLT1   55

Definition at line 1245 of file popup_messages.c.

Referenced by btl_message_popup_draw_content().

◆ TIP_X_HLT2

#define TIP_X_HLT2   73

Definition at line 1246 of file popup_messages.c.

Referenced by btl_message_popup_draw_content().

◆ TIP_X_PBST

#define TIP_X_PBST   64

Definition at line 1247 of file popup_messages.c.

Referenced by btl_message_popup_draw_content().

◆ TIP_X_MB

#define TIP_X_MB   67

Definition at line 1248 of file popup_messages.c.

Referenced by btl_message_popup_draw_content().

◆ TIP_X_ML

#define TIP_X_ML   56

Definition at line 1249 of file popup_messages.c.

Referenced by btl_message_popup_draw_content().

◆ TIP_X_HLA1

#define TIP_X_HLA1   65

Definition at line 1250 of file popup_messages.c.

Referenced by btl_message_popup_draw_content().

◆ TIP_X_HLA2

#define TIP_X_HLA2   146

Definition at line 1251 of file popup_messages.c.

Referenced by btl_message_popup_draw_content().

◆ TIP_X_PBS1

#define TIP_X_PBS1   86

Definition at line 1252 of file popup_messages.c.

Referenced by btl_message_popup_draw_content().

◆ TIP_X_PBS2

#define TIP_X_PBS2   64

Definition at line 1253 of file popup_messages.c.

Referenced by btl_message_popup_draw_content().

◆ TIP_X_PBS3

#define TIP_X_PBS3   108

Definition at line 1254 of file popup_messages.c.

Referenced by btl_message_popup_draw_content().

◆ TIP_X_PWT1

#define TIP_X_PWT1   105

Definition at line 1255 of file popup_messages.c.

Referenced by btl_message_popup_draw_content().

◆ TIP_X_PWT2

#define TIP_X_PWT2   65

Definition at line 1256 of file popup_messages.c.

Referenced by btl_message_popup_draw_content().

◆ TIP_X_MB1

#define TIP_X_MB1   63

Definition at line 1257 of file popup_messages.c.

Referenced by btl_message_popup_draw_content().

◆ TIP_X_MB2

#define TIP_X_MB2   84

Definition at line 1258 of file popup_messages.c.

Referenced by btl_message_popup_draw_content().

◆ TIP_X_HTT

#define TIP_X_HTT   124

Definition at line 1259 of file popup_messages.c.

Referenced by btl_message_popup_draw_content().

◆ TIP_X_HTR1

#define TIP_X_HTR1   56

Definition at line 1260 of file popup_messages.c.

Referenced by btl_message_popup_draw_content().

◆ TIP_X_HTR2

#define TIP_X_HTR2   53

Definition at line 1261 of file popup_messages.c.

Referenced by btl_message_popup_draw_content().

◆ TIP_X_MTA1

#define TIP_X_MTA1   107

Definition at line 1262 of file popup_messages.c.

Referenced by btl_message_popup_draw_content().

◆ TIP_X_MTA2

#define TIP_X_MTA2   210

Definition at line 1263 of file popup_messages.c.

Referenced by btl_message_popup_draw_content().

◆ TIP_X_MTA3

#define TIP_X_MTA3   56

Definition at line 1264 of file popup_messages.c.

Referenced by btl_message_popup_draw_content().

◆ TIP_X_BF_RD

#define TIP_X_BF_RD   64

Definition at line 1265 of file popup_messages.c.

Referenced by btl_message_popup_draw_content().

◆ TIP_Y_HLT2

#define TIP_Y_HLT2   31

Definition at line 1266 of file popup_messages.c.

Referenced by btl_message_popup_draw_content().

◆ TIP_Y_HLA2

#define TIP_Y_HLA2   32

Definition at line 1267 of file popup_messages.c.

Referenced by btl_message_popup_draw_content().

◆ TIP_Y_PBS1

#define TIP_Y_PBS1   13

Definition at line 1268 of file popup_messages.c.

Referenced by btl_message_popup_draw_content().

◆ TIP_Y_PBS2

#define TIP_Y_PBS2   13

Definition at line 1269 of file popup_messages.c.

Referenced by btl_message_popup_draw_content().

◆ TIP_Y_PBS3

#define TIP_Y_PBS3   13

Definition at line 1270 of file popup_messages.c.

Referenced by btl_message_popup_draw_content().

◆ TIP_Y_PWT1

#define TIP_Y_PWT1   13

Definition at line 1271 of file popup_messages.c.

Referenced by btl_message_popup_draw_content().

◆ TIP_Y_HTR1

#define TIP_Y_HTR1   31

Definition at line 1272 of file popup_messages.c.

Referenced by btl_message_popup_draw_content().

◆ TIP_Y_MTA1

#define TIP_Y_MTA1   13

Definition at line 1273 of file popup_messages.c.

Referenced by btl_message_popup_draw_content().

◆ TIP_Y_MTA2

#define TIP_Y_MTA2   15

Definition at line 1274 of file popup_messages.c.

Referenced by btl_message_popup_draw_content().

◆ TIP_Y_BF_RD

#define TIP_Y_BF_RD   13

Definition at line 1275 of file popup_messages.c.

Referenced by btl_message_popup_draw_content().

◆ TIP_SCALE1

#define TIP_SCALE1   0.8f

Definition at line 1276 of file popup_messages.c.

Referenced by btl_message_popup_draw_content().

◆ TIP_SCALE2

#define TIP_SCALE2   0.8f

Definition at line 1277 of file popup_messages.c.

Referenced by btl_message_popup_draw_content().

Function Documentation

◆ btl_bonk_update()

void btl_bonk_update ( void * data)

Definition at line 434 of file popup_messages.c.

434 {
435 PopupMessage* popup = data;
436 BonkData* bonkData = popup->data.bonk;
437 s32 allDone = TRUE;
438 s32 i;
439
440 for (i = 0; i < popup->messageIndex; i++, bonkData++) {
441 if (bonkData->alive) {
442 s32 modelIdx = bonkData->entityModelIndex;
443
444 allDone = FALSE;
445 if (bonkData->startupTime != 0) {
446 bonkData->startupTime--;
447 if (bonkData->startupTime == 0) {
449 }
451 break;
452 }
453
455 if (bonkData->moveTime >= 0) {
456 bonkData->pos.x += bonkData->vel.x;
457 bonkData->pos.y += bonkData->vel.y;
458 bonkData->pos.z += bonkData->vel.z;
459 }
460 bonkData->rotY = clamp_angle(180.0f - gCameras[CAM_BATTLE].curYaw);
461 bonkData->rotZ += bonkData->rotVelZ;
462 bonkData->rotZ = clamp_angle(bonkData->rotZ);
463 bonkData->rotVelZ *= 0.8;
464 if (bonkData->moveTime < 10) {
465 bonkData->accel.x *= 0.5;
466 bonkData->accel.y *= 0.5;
467 bonkData->accel.z *= 0.5;
468 bonkData->vel.x = bonkData->accel.x;
469 bonkData->vel.y = bonkData->accel.y;
470 bonkData->vel.z = bonkData->accel.z;
471 }
472
473 bonkData->moveTime--;
474 if (bonkData->moveTime < 0) {
475 bonkData->holdTime--;
476 if (bonkData->holdTime < 0) {
478 bonkData->alive = FALSE;
479 }
480 }
481 }
482 }
483
484 if (allDone) {
485 heap_free(popup->data.bonk);
486 popup->data.bonk = NULL;
487 free_popup(popup);
488 }
489}
union PopupMessage::@39 data
#define clamp_angle
@ ENTITY_MODEL_FLAG_HIDDEN
Definition enums.h:5015
@ CAM_BATTLE
Definition enums.h:1801
void clear_entity_model_flags(s32 idx, s32 newFlags)
void exec_entity_model_commandlist(s32 idx)
s32 heap_free(void *ptr)
Definition heap.c:42
void free_entity_model_by_index(s32 idx)
s32 entityModelIndex
void free_popup(PopupMessage *popup)
Camera gCameras[4]
Definition cam_main.c:17

Referenced by show_immune_bonk().

◆ btl_bonk_render()

void btl_bonk_render ( void * data)

Definition at line 491 of file popup_messages.c.

491 {
492 PopupMessage* popup = data;
493 BonkData* bonkData = popup->data.bonk;
494 Matrix4f sp18;
495 Matrix4f mtxRotX;
496 Matrix4f mtxRotY;
497 Matrix4f mtxRotZ;
498 Matrix4f sp118;
499 Matrix4f sp158;
500 Matrix4f sp198;
501 Matrix4f mtxScale;
502 Mtx sp218;
503 s32 i;
504
505 for (i = 0; i < popup->messageIndex; i++, bonkData++) {
506 if (bonkData->alive) {
507 if (bonkData->startupTime != 0) {
508 break;
509 } else {
510 guTranslateF(sp18, bonkData->pos.x, bonkData->pos.y, bonkData->pos.z);
511 guRotateF(mtxRotX, 0.0f, 1.0f, 0.0f, 0.0f);
512 guRotateF(mtxRotY, bonkData->rotY, 0.0f, 1.0f, 0.0f);
513 guRotateF(mtxRotZ, bonkData->rotZ, 0.0f, 0.0f, 1.0f);
514 guScaleF(mtxScale, bonkData->scale, bonkData->scale, bonkData->scale);
515 guMtxCatF(mtxRotZ, mtxRotX, sp158);
516 guMtxCatF(sp158, mtxRotY, sp118);
517 guMtxCatF(mtxScale, sp118, sp158);
518 guMtxCatF(sp158, sp18, sp198);
519 guMtxF2L(sp198, &sp218);
520 draw_entity_model_A(bonkData->entityModelIndex, &sp218);
521 }
522 }
523 }
524}
f32 Matrix4f[4][4]
#define guRotateF
#define guMtxF2L
#define guTranslateF
#define guMtxCatF
#define guScaleF
void draw_entity_model_A(s32, Mtx *)

Referenced by show_immune_bonk().

◆ btl_bonk_setup_gfx()

void btl_bonk_setup_gfx ( void * data)

Definition at line 526 of file popup_messages.c.

526 {
527 BonkData* bonkData = data;
528 s32 alphaAmt = bonkData->holdTime;
529
530 if (alphaAmt > 10) {
531 alphaAmt = 10;
532 }
533 gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, (alphaAmt * 255) / 10);
534}
Gfx * gMainGfxPos
Definition cam_main.c:15

Referenced by show_immune_bonk().

◆ btl_update_message_popup()

void btl_update_message_popup ( void * popup)

Definition at line 656 of file popup_messages.c.

656 {
657 PopupMessage* popup = data;
658 BattleStatus* battleStatus = &gBattleStatus;
659 s32 shouldDisposeWindow = FALSE;
660
661 s32 actionCommandMode;
662
663 switch (popup->messageIndex) {
695 case BTL_MSG_HEAL_ONE:
696 case BTL_MSG_HEAL_ALL:
715 switch (popup->showMsgState) {
716 default:
717 break;
720 break;
723 break;
725 if (battleStatus->curButtonsPressed & (BUTTON_A | BUTTON_B)) {
726 popup->duration = 0;
727 }
728
729 if (popup->duration != 0) {
730 popup->duration--;
731 } else {
733 }
734 break;
737 break;
739 shouldDisposeWindow = TRUE;
740 break;
741 }
742 break;
743 // move action command tips
765 actionCommandMode = battleStatus->actionCommandMode;
767 if (actionCommandMode == ACTION_COMMAND_MODE_NOT_LEARNED) {
769 shouldDisposeWindow = TRUE;
770 break;
771 }
772
773 switch (popup->showMsgState) {
776 gBattleStatus.flags1 &= ~BS_FLAGS1_10000;
777 switch (popup->messageIndex) {
782 break;
787
791 break;
796
801 break;
806
810
814
818 break;
823 break;
828
832
836 break;
841 break;
846
850 break;
858 break;
863
867 break;
872
876 break;
881
886
891 break;
897 // fallthrough
908 break;
909 }
911 break;
914 gBattleStatus.flags1 &= ~BS_FLAGS1_4000;
916 popup->duration = 0;
918 break;
919 }
920
922 && (actionCommandMode != ACTION_COMMAND_MODE_TUTORIAL)
923 ) {
925 switch (popup->messageIndex) {
928 break;
931 break;
935 break;
939 break;
945 break;
948 break;
953 break;
956 break;
960 break;
964 break;
968 break;
971 break;
975 break;
978 break;
981 break;
985 // fallthrough
991 break;
992 }
993 if (popup->duration != -1) {
994 popup->duration = 30;
995 }
997 break;
998 }
999 break;
1001 if ((actionCommandMode != ACTION_COMMAND_MODE_TUTORIAL)
1003 ) {
1004 if (BattleMessage_CurBoxPosY < 192) {
1007 if (BattleMessage_CurBoxPosY > 192) {
1009 }
1010 } else {
1011 break;
1012 }
1013 }
1014
1015#if VERSION_JP
1017#else
1019#endif
1020
1021 if (popup->duration == -1) {
1022 break;
1023 }
1024
1025 if (popup->duration != 0) {
1026 popup->duration--;
1027 break;
1028 }
1029
1030 switch (popup->messageIndex) {
1044 break;
1053 break;
1059 break;
1065 break;
1066 }
1068 shouldDisposeWindow = TRUE;
1069 }
1070 break;
1071 }
1072 break;
1076 case BTL_MSG_46:
1077 case BTL_MSG_47:
1079 switch (popup->showMsgState) {
1080 default:
1081 break;
1082 case BTL_MSG_STATE_INIT:
1084 break;
1087 break;
1089 if (battleStatus->curButtonsPressed & (BUTTON_A | BUTTON_B)) {
1090 popup->duration = 0;
1091 }
1092
1093 if (popup->duration != 0) {
1094 popup->duration--;
1095 } else {
1097 }
1098 break;
1101 break;
1103 shouldDisposeWindow = TRUE;
1104 break;
1105 }
1106 break;
1114 switch (popup->showMsgState) {
1115 case BTL_MSG_STATE_INIT:
1116 switch (popup->messageIndex) {
1121 break;
1126 break;
1131 break;
1136 break;
1141 break;
1146 break;
1151 break;
1152 }
1154 break;
1156 if (popup->duration != 0) {
1157 popup->duration--;
1158 break;
1159 }
1160 shouldDisposeWindow = TRUE;
1162 break;
1163 }
1164 break;
1165 }
1166 if (shouldDisposeWindow) {
1168 bPopupMessage = NULL;
1169 free_popup(popup);
1170 }
1171}
HudScript HES_MashBButton1
HudScript HES_BButton
HudScript HES_AButton
HudScript HES_TimingReady
HudScript HES_StickNeutral
HudScript HES_MashAButton
HudScript HES_PressAButton
HudScript HES_StickMashLeft
HudScript HES_AButtonDown
HudScript HES_PressBButton
@ ACTION_COMMAND_MODE_TUTORIAL
Definition action_cmd.h:40
@ ACTION_COMMAND_MODE_NOT_LEARNED
Definition action_cmd.h:38
HudScript HES_PressCDownButton
@ BTL_MSG_STATE_POPUP_DISPOSE
Definition enums.h:4155
@ BTL_MSG_STATE_POPUP_POST_DELAY
Definition enums.h:4154
@ BTL_MSG_STATE_ERROR_PRE_DELAY
Definition enums.h:4160
@ BTL_MSG_STATE_DISABLED_DELAY
Definition enums.h:4165
@ BTL_MSG_STATE_INIT
Definition enums.h:4150
@ BTL_MSG_STATE_ACTION_TIP_DELAY
Definition enums.h:4157
@ BTL_MSG_STATE_ERROR_POST_DELAY
Definition enums.h:4162
@ BTL_MSG_STATE_ERROR_DISPOSE
Definition enums.h:4163
@ BTL_MSG_STATE_POPUP_PRE_DELAY
Definition enums.h:4152
@ BTL_MSG_STATE_ERROR_DELAY
Definition enums.h:4161
@ BTL_MSG_STATE_POPUP_DELAY
Definition enums.h:4153
@ BTL_MSG_STATE_ACTION_TIP_DISPOSE
Definition enums.h:4158
@ BUTTON_A
Definition enums.h:2790
@ BUTTON_B
Definition enums.h:2789
@ BS_FLAGS1_10000
Definition enums.h:3585
@ BS_FLAGS1_4000
Definition enums.h:3583
@ BTL_MSG_JUMP_DISABLED_1
Definition enums.h:4136
@ BTL_MSG_ACTION_TIP_HOLD_THEN_TAP
Definition enums.h:4119
@ BTL_MSG_ENEMY_MISSED
Definition enums.h:4067
@ BTL_MSG_CANT_SWITCH
Definition enums.h:4140
@ BTL_MSG_MERLEE_ATK_UP
Definition enums.h:4058
@ BTL_MSG_ITEMS_DISABLED
Definition enums.h:4139
@ BTL_MSG_ACTION_TIP_UNUSED_2
Definition enums.h:4112
@ BTL_MSG_PLAYER_FROZEN
Definition enums.h:4070
@ BTL_MSG_ACTION_TIP_MOVE_TO_AIM
Definition enums.h:4121
@ BTL_MSG_STAR_POWER_MAXED
Definition enums.h:4085
@ BTL_MSG_ACTION_TIP_UNUSED_3
Definition enums.h:4118
@ BTL_MSG_CANT_MOVE
Definition enums.h:4141
@ BTL_MSG_CHARGE_HAMMER_MORE
Definition enums.h:4063
@ BTL_MSG_ACTION_TIP_PRESS_BUTTONS_SHOWN
Definition enums.h:4113
@ BTL_MSG_PLAYER_POISONED
Definition enums.h:4071
@ BTL_MSG_MERLEE_EXP_UP
Definition enums.h:4060
@ BTL_MSG_TURBO_CHARGE_BEGIN
Definition enums.h:4100
@ BTL_MSG_TURBO_CHARGE_END
Definition enums.h:4101
@ BTL_MSG_ACTION_TIP_MASH_BUTTON
Definition enums.h:4108
@ BTL_MSG_PLAYER_PARALYZED
Definition enums.h:4073
@ BTL_MSG_ACTION_TIP_NOT_USED_3
Definition enums.h:4125
@ BTL_MSG_HEAL_ONE
Definition enums.h:4089
@ BTL_MSG_ENEMY_ASLEEP
Definition enums.h:4077
@ BTL_MSG_PLAYER_CHARGED
Definition enums.h:4074
@ BTL_MSG_ACTION_TIP_HOLD_LEFT_TIMED
Definition enums.h:4106
@ BTL_MSG_HAMMER_DISABLED_3
Definition enums.h:4135
@ BTL_MSG_CANT_SWITCH_UNUSED
Definition enums.h:4142
@ BTL_MSG_ACTION_TIP_NOT_USED_1
Definition enums.h:4114
@ BTL_MSG_PLAYER_ASLEEP
Definition enums.h:4069
@ BTL_MSG_ENEMY_POISONED
Definition enums.h:4079
@ BTL_MSG_PLAYER_SHRUNK
Definition enums.h:4072
@ BTL_MSG_ENEMY_CANT_MOVE
Definition enums.h:4083
@ BTL_MSG_WATER_BLOCK_BEGIN
Definition enums.h:4096
@ BTL_MSG_47
Definition enums.h:4131
@ BTL_MSG_CANT_MOVE_UNUSED
Definition enums.h:4143
@ BTL_MSG_ACTION_TIP_UNUSED_4
Definition enums.h:4122
@ BTL_MSG_ENEMY_PARALYZED
Definition enums.h:4081
@ BTL_MSG_ACTION_TIP_HOLD_THEN_RELEASE
Definition enums.h:4120
@ BTL_MSG_UNUSED_CLOUD_NINE
Definition enums.h:4103
@ BTL_MSG_NO_JUMP_TARGET
Definition enums.h:4127
@ BTL_MSG_MERLEE_DONE
Definition enums.h:4061
@ BTL_MSG_ACTION_TIP_NOT_USED_2
Definition enums.h:4116
@ BTL_MSG_ACTION_TIP_BREAK_FREE
Definition enums.h:4123
@ BTL_MSG_ACTION_TIP_UNUSED_1
Definition enums.h:4111
@ BTL_MSG_CLOUD_NINE_END
Definition enums.h:4099
@ BTL_MSG_ACTION_TIP_HOLD_LEFT_AIM
Definition enums.h:4110
@ BTL_MSG_JUMP_DISABLED_3
Definition enums.h:4138
@ BTL_MSG_ENEMY_FROZEN
Definition enums.h:4078
@ BTL_MSG_NO_ITEM_TARGET
Definition enums.h:4129
@ BTL_MSG_ENEMY_DAZED
Definition enums.h:4076
@ BTL_MSG_HEAL_ALL
Definition enums.h:4090
@ BTL_MSG_CHILL_OUT_BEGIN
Definition enums.h:4102
@ BTL_MSG_WATER_BLOCK_END
Definition enums.h:4097
@ BTL_MSG_ACTION_TIP_PRESS_BEFORE_STRIKE
Definition enums.h:4107
@ BTL_MSG_CANT_SELECT_NOW
Definition enums.h:4132
@ BTL_MSG_ACTION_TIP_MASH_BOTH
Definition enums.h:4117
@ BTL_MSG_MERLEE_DEF_UP
Definition enums.h:4059
@ BTL_MSG_46
Definition enums.h:4130
@ BTL_MSG_CHARGE_JUMP_MORE
Definition enums.h:4065
@ BTL_MSG_JUMP_DISABLED_2
Definition enums.h:4137
@ BTL_MSG_PARTNER_INJURED
Definition enums.h:4093
@ BTL_MSG_CHARGE_GOOMBARIO_MORE
Definition enums.h:4095
@ BTL_MSG_CANT_SELECT_NOW_ALT
Definition enums.h:4144
@ BTL_MSG_STAR_POWER_RECHARGED
Definition enums.h:4084
@ BTL_MSG_NO_HAMMER_TARGET
Definition enums.h:4128
@ BTL_MSG_DEFENCE_UP
Definition enums.h:4088
@ BTL_MSG_ACTION_TIP_PRESS_BEFORE_LANDING
Definition enums.h:4105
@ BTL_MSG_ACTION_TIP_PRESS_WITH_TIMING
Definition enums.h:4115
@ BTL_MSG_CANT_CHARGE
Definition enums.h:4066
@ BTL_MSG_CHARGE_HAMMER
Definition enums.h:4062
@ BTL_MSG_CHARGE_GOOMBARIO
Definition enums.h:4094
@ BTL_MSG_CLOUD_NINE_BEGIN
Definition enums.h:4098
@ BTL_MSG_ENEMY_ELECTRIFIED
Definition enums.h:4082
@ BTL_MSG_ATTACK_UP
Definition enums.h:4087
@ BTL_MSG_ACTION_TIP_REDUCE_DAMAGE
Definition enums.h:4124
@ BTL_MSG_CHARGE_JUMP
Definition enums.h:4064
@ BTL_MSG_ENEMY_TRANSPARENT
Definition enums.h:4091
@ BTL_MSG_ACTION_TIP_MASH_LEFT
Definition enums.h:4109
@ BTL_MSG_HAMMER_DISABLED_1
Definition enums.h:4133
@ BTL_MSG_ENEMY_SHRUNK
Definition enums.h:4080
@ BTL_MSG_PLAYER_DAZED
Definition enums.h:4068
@ BTL_MSG_PLAYER_TRANSPARENT
Definition enums.h:4075
@ BTL_MSG_HAMMER_DISABLED_2
Definition enums.h:4134
@ BTL_MSG_STAR_POWER_FILLED
Definition enums.h:4086
@ BTL_MSG_ENEMY_CHARGED
Definition enums.h:4092
@ WINDOW_UPDATE_HIDE
Definition enums.h:5312
@ WINDOW_UPDATE_SHOW_TRANSPARENT
Definition enums.h:5317
@ WIN_BTL_POPUP
Definition enums.h:5250
void set_window_update(s32 panelID, s32)
Definition windows.c:434
void hud_element_set_script(s32 id, HudScript *anim)
void hud_element_create_transform_B(s32 id)
void hud_element_set_render_pos(s32 id, s32 x, s32 y)
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_free(s32 id)
@ HUD_ELEMENT_FLAG_80
Definition hud_element.h:80
@ HUD_ELEMENT_FLAG_FILTER_TEX
Definition hud_element.h:88
HudScript HES_Item_MenuItems
PopupMessage * bPopupMessage
HudScript HES_TimingBlink
BSS s16 BattleMessage_CurBoxOffsetY
BSS s16 BattleMessage_CurBoxPosY
HudScript HES_MashCDownButton1
HudScript HES_Item_MenuBoots3
HudScript HES_Item_MenuHammer2
HudScript HES_CDownButton
HudScript HES_Item_MenuBoots1
HudScript HES_Item_MenuBoots2
HudScript HES_MashCLeftButton
BSS s16 HID_BattleMessage4
HudScript HES_StickTapRight
HudScript HES_MashCRightButton1
BSS b16 BattleMessage_BoxPosLocked
HudScript HES_StickBackAndForth
HudScript HES_CRightButton
BSS s16 HID_BattleMessage1
BSS s16 HID_BattleMessage2
HudScript HES_Item_MenuHammer3
BSS b16 ActionCommandTipVisible
HudScript HES_StickTapLeft
HudScript HES_Item_MenuHammer1
HudScript HES_MashBButton2
HudScript HES_AimTarget
HudScript HES_CLeftButton
HudScript HES_MashCUpButton
BSS s16 HID_BattleMessage3
HudScript HES_CUpButton
HudScript HES_RotateStickCW
HudScript HES_AimReticle
BattleStatus gBattleStatus
Definition battle.c:11
Window gWindows[64]
Definition windows.c:23

Referenced by btl_show_battle_message(), and btl_show_variable_battle_message().

◆ btl_show_message_popup()

void btl_show_message_popup ( void * popup)

Definition at line 1629 of file popup_messages.c.

1629 {
1630 PopupMessage* popup = data;
1631 s32 numLines;
1632 s32 posX;
1633 s32 posY = 80;
1634 s32 width;
1635 s32 msgWidth;
1636 s32 height;
1637
1638#if VERSION_JP
1639 switch (popup->messageIndex) {
1660 case BTL_MSG_46:
1661 case BTL_MSG_47:
1666 if (popup->needsInit) {
1667 popup->needsInit = FALSE;
1668 msgWidth = get_msg_width(BattleMessages[popup->messageIndex], 0) + (31 + D_8028374C_1BA13C[popup->messageIndex][0]);
1669 posX = 160 - (msgWidth / 2);
1670 width = msgWidth;
1671 height = 28 + D_8028374C_1BA13C[popup->messageIndex][1];
1672 set_window_properties(WINDOW_ID_BATTLE_POPUP, posX, posY, width, height, WINDOW_PRIORITY_0, btl_message_popup_draw_content, popup, -1);
1673 set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW);
1674 }
1675 break;
1680 if (popup->needsInit) {
1681 popup->needsInit = FALSE;
1682 msgWidth = get_msg_width(BattleMessages[popup->messageIndex], 0) + (31 + D_8028374C_1BA13C[popup->messageIndex][0]);
1683 posX = 160 - (msgWidth / 2);
1684 width = msgWidth;
1685 height = 45 + D_8028374C_1BA13C[popup->messageIndex][1];
1686 set_window_properties(WINDOW_ID_BATTLE_POPUP, posX, posY, width, height, WINDOW_PRIORITY_0, btl_message_popup_draw_content, popup, -1);
1687 set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW);
1688 }
1689 break;
1711 if (popup->needsInit) {
1712 popup->needsInit = FALSE;
1713 msgWidth = get_msg_width(BattleMessages[popup->messageIndex], 0) + (31 + D_8028374C_1BA13C[popup->messageIndex][0]);
1714 posX = 160 - (msgWidth / 2);
1715 width = msgWidth;
1716 posY = 192;
1717 height = 28 + D_8028374C_1BA13C[popup->messageIndex][1];
1719 posY = 120;
1721 }
1723
1724 set_window_properties(WINDOW_ID_BATTLE_POPUP, posX, posY, width, height, WINDOW_PRIORITY_0, btl_message_popup_draw_content, popup, -1);
1726 set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW);
1727 } else {
1728 set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW_DARKENED);
1729 }
1730 }
1731 break;
1739 if (popup->needsInit) {
1740 popup->needsInit = FALSE;
1741 msgWidth = get_msg_width(BattleMessages[popup->messageIndex], 0) + (55 + D_8028374C_1BA13C[popup->messageIndex][0]);
1742 posX = 160 - (msgWidth / 2);
1743 width = msgWidth;
1744 height = 40 + D_8028374C_1BA13C[popup->messageIndex][1];
1745 set_window_properties(WINDOW_ID_BATTLE_POPUP, posX, posY, width, height, WINDOW_PRIORITY_0, btl_message_popup_draw_content, popup, -1);
1746 set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW);
1747 }
1748 break;
1757 if (popup->needsInit) {
1758 popup->needsInit = FALSE;
1759 msgWidth = get_msg_width(BattleMessages[popup->messageIndex], 0) + (31 + D_8028374C_1BA13C[popup->messageIndex][0]);
1760 posX = 160 - (msgWidth / 2);
1761 width = msgWidth;
1762 if (D_80283B88_1BA578[popup->messageIndex - 10] != 0) {
1763 height = 45 + D_8028374C_1BA13C[popup->messageIndex][1];
1764 } else {
1765 height = 28 + D_8028374C_1BA13C[popup->messageIndex][1];
1766 }
1767
1768 set_window_properties(WINDOW_ID_BATTLE_POPUP, posX, posY, width, height, WINDOW_PRIORITY_0, btl_message_popup_draw_content, popup, -1);
1769 set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW);
1770 }
1771 break;
1780 if (popup->needsInit) {
1781 popup->needsInit = FALSE;
1782 msgWidth = get_msg_width(BattleMessages[popup->messageIndex], 0) + (31 + D_8028374C_1BA13C[popup->messageIndex][0]);
1783 posX = 160 - (msgWidth / 2);
1784 width = msgWidth;
1785 if (D_80283BA8_1BA598[popup->messageIndex - 18] != 0) {
1786 height = 45 + D_8028374C_1BA13C[popup->messageIndex][1];
1787 } else {
1788 height = 28 + D_8028374C_1BA13C[popup->messageIndex][1];
1789 }
1790
1791 set_window_properties(WINDOW_ID_BATTLE_POPUP, posX, posY, width, height, WINDOW_PRIORITY_0, btl_message_popup_draw_content, popup, -1);
1792 set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW);
1793 }
1794 break;
1799 case BTL_MSG_ATTACK_UP:
1800 case BTL_MSG_DEFENCE_UP:
1801 case BTL_MSG_HEAL_ONE:
1802 case BTL_MSG_HEAL_ALL:
1805 if (popup->needsInit) {
1806 s32 messageID;
1807
1808 popup->needsInit = FALSE;
1809 messageID = BattleMessages[popup->messageIndex];
1811 msgWidth = get_msg_width(messageID, 0) + (31 + D_8028374C_1BA13C[popup->messageIndex][0]);
1812 posX = 160 - (msgWidth / 2);
1813 width = msgWidth;
1814 height = 28 + D_8028374C_1BA13C[popup->messageIndex][1];
1815 set_window_properties(WINDOW_ID_BATTLE_POPUP, posX, posY, width, height, WINDOW_PRIORITY_0, btl_message_popup_draw_content, popup, -1);
1816 set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW);
1817 }
1818 break;
1819 case BTL_MSG_CANT_MOVE:
1820 if (popup->needsInit) {
1821 s32 messageID;
1822
1823 popup->needsInit = FALSE;
1824 messageID = BattleMessages[popup->messageIndex];
1826 msgWidth = get_msg_width(messageID, 0) + (31 + D_8028374C_1BA13C[popup->messageIndex][0]);
1827 posX = 160 - (msgWidth / 2);
1828 width = msgWidth;
1829 height = 28 + D_8028374C_1BA13C[popup->messageIndex][1];
1830 set_window_properties(WINDOW_ID_BATTLE_POPUP, posX, posY, width, height, WINDOW_PRIORITY_0, btl_message_popup_draw_content, popup, -1);
1831 set_window_update(WINDOW_ID_BATTLE_POPUP, WINDOW_UPDATE_SHOW);
1832 }
1833 break;
1834 }
1835#else
1836 switch (popup->messageIndex) {
1876 case BTL_MSG_46:
1877 case BTL_MSG_47:
1883 if (popup->needsInit) {
1884 s32 messageID;
1885
1886 popup->needsInit = FALSE;
1887 messageID = BattleMessages[popup->messageIndex];
1888 msgWidth = get_msg_width(messageID, 0) + 30;
1889 posX = 160 - (msgWidth / 2);
1890 width = msgWidth;
1891 numLines = get_msg_lines(messageID) - 1;
1892 height = BattleMessage_BoxSizesY[numLines];
1895 }
1896 break;
1904 if (popup->needsInit) {
1905 popup->needsInit = FALSE;
1906 msgWidth = get_msg_width(BattleMessages[popup->messageIndex], 0) + 55;
1907 posX = 160 - (msgWidth / 2);
1908 width = msgWidth;
1909 height = 40;
1912 }
1913 break;
1918 case BTL_MSG_ATTACK_UP:
1919 case BTL_MSG_DEFENCE_UP:
1920 case BTL_MSG_HEAL_ONE:
1921 case BTL_MSG_HEAL_ALL:
1924 if (popup->needsInit) {
1925 s32 messageID;
1926
1927 popup->needsInit = FALSE;
1928 messageID = BattleMessages[popup->messageIndex];
1930 msgWidth = get_msg_width(messageID, 0) + 31;
1931 posX = 160 - (msgWidth / 2);
1932 width = msgWidth;
1933 numLines = get_msg_lines(messageID) - 1;
1934 height = BattleMessage_BoxSizesY[numLines];
1937 }
1938 break;
1939 case BTL_MSG_CANT_MOVE:
1940 if (popup->needsInit) {
1941 s32 messageID;
1942
1943 popup->needsInit = FALSE;
1944 messageID = BattleMessages[popup->messageIndex];
1946 msgWidth = get_msg_width(messageID, 0) + 31;
1947 posX = 160 - (msgWidth / 2);
1948 width = msgWidth;
1949 numLines = get_msg_lines(messageID) - 1;
1950 height = BattleMessage_BoxSizesY[numLines];
1953 }
1954 break;
1976 if (popup->needsInit) {
1977 s32 messageID;
1978
1979 popup->needsInit = FALSE;
1980 messageID = BattleMessages[popup->messageIndex];
1981 msgWidth = get_msg_width(messageID, 0) + 31;
1982 posX = 160 - (msgWidth / 2);
1983 posY = 192;
1984 width = msgWidth;
1985 numLines = get_msg_lines(messageID) - 1;
1986 height = BattleMessage_BoxSizesY[numLines];
1988 posY = 120;
1990 }
1993
1998 } else {
2000 }
2001 }
2002 break;
2003 }
2004#endif
2005}
#define get_msg_width
BattleMessages
Definition enums.h:4057
@ WINDOW_PRIORITY_0
Definition enums.h:3182
@ WINDOW_UPDATE_SHOW
Definition enums.h:5311
@ WINDOW_UPDATE_SHOW_DARKENED
Definition enums.h:5318
void set_message_int_var(s32 value, s32 index)
Definition msg.c:1550
void set_message_text_var(s32 msgID, s32 index)
Definition msg.c:1520
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 get_msg_lines(s32 messageID)
Definition msg.c:1979
s32 bActorMessages[]
s16 BattleMessage_BoxOffsetsY[]
void btl_message_popup_draw_content(void *data, s32 x, s32 y)
BSS s16 BattlePopupMessageVar
s16 BattleMessage_BoxSizesY[]

Referenced by btl_show_battle_message(), and btl_show_variable_battle_message().

◆ btl_popup_messages_init()

void btl_popup_messages_init ( void )

Definition at line 271 of file popup_messages.c.

271 {
272 s32 i;
273
274 for (i = 0; i < ARRAY_COUNT(popupMessages); i++) {
275 PopupMessage* popup = &popupMessages[i];
276 popup->active = FALSE;
277 popup->data.bonk = NULL;
278 }
279}
BSS PopupMessage popupMessages[32]
#define ARRAY_COUNT(arr)
Definition macros.h:40

Referenced by initialize_battle().

◆ btl_popup_messages_delete()

void btl_popup_messages_delete ( void )

Definition at line 281 of file popup_messages.c.

281 {
282 s32 i;
283
284 for (i = 0; i < ARRAY_COUNT(popupMessages); i++) {
285 PopupMessage* popup = &popupMessages[i];
286 if (popup->data.bonk != NULL) {
287 heap_free(popup->data.bonk);
288 popup->data.bonk = NULL;
289 }
290 popup->active = FALSE;
291 }
292}

◆ btl_popup_messages_update()

void btl_popup_messages_update ( void )

Definition at line 294 of file popup_messages.c.

294 {
295 s32 i;
296
297 for (i = 0; i < ARRAY_COUNT(popupMessages); i++) {
298 PopupMessage* popup = &popupMessages[i];
299 if (popup->active && popup->updateFunc != NULL) {
300 popup->updateFunc(popup);
301 }
302 }
303}
PopupMessageCallback updateFunc

Referenced by btl_update().

◆ btl_popup_messages_draw_world_geometry()

void btl_popup_messages_draw_world_geometry ( void )

Definition at line 305 of file popup_messages.c.

305 {
306 s32 i;
307
308 for (i = 0; i < ARRAY_COUNT(popupMessages); i++) {
309 PopupMessage* popup = &popupMessages[i];
310 if (popup->active && popup->renderWorldFunc != NULL) {
311 popup->renderWorldFunc(popup);
312 }
313 }
314}
PopupMessageCallback renderWorldFunc

Referenced by btl_render_actors().

◆ btl_popup_messages_draw_ui()

void btl_popup_messages_draw_ui ( void )

Definition at line 316 of file popup_messages.c.

316 {
317 s32 i;
318
319 for (i = 0; i < ARRAY_COUNT(popupMessages); i++) {
320 PopupMessage* popup = &popupMessages[i];
321 if (popup->active && popup->renderUIFunc != NULL) {
322 popup->renderUIFunc(popup);
323 }
324 }
325}
PopupMessageCallback renderUIFunc

Referenced by btl_draw_ui().

◆ btl_create_popup()

PopupMessage * btl_create_popup ( void )

Definition at line 327 of file popup_messages.c.

327 {
328 s32 i;
329
330 for (i = 0; i < ARRAY_COUNT(popupMessages); i++) {
331 PopupMessage* popup = &popupMessages[i];
332 if (!popup->active) {
333 popup->active = TRUE;
334 return popup;
335 }
336 }
337
338 return NULL;
339}

Referenced by btl_show_battle_message(), btl_show_variable_battle_message(), and show_immune_bonk().

◆ free_popup()

void free_popup ( PopupMessage * popup)

Definition at line 341 of file popup_messages.c.

341 {
342 if (popup->data.bonk != NULL) {
343 heap_free(popup->data.bonk);
344 popup->data.bonk = NULL;
345 }
346 popup->active = FALSE;
347}

Referenced by btl_bonk_update(), and btl_update_message_popup().

◆ show_immune_bonk()

void show_immune_bonk ( f32 x,
f32 y,
f32 z,
s32 numStars,
s32 startupTime,
s32 animDir )

Definition at line 349 of file popup_messages.c.

349 {
350 BattleStatus* battleStatus = &gBattleStatus;
351 PopupMessage* popup;
352 BonkData* bonkData;
353 f32 timescale;
354 f32 baseScale;
355 s32 bonkPosIdx;
356 b32 hasShortLifetime;
357 s32 sign;
358 s32 i;
359
360 popup = btl_create_popup();
361 if (popup == NULL) {
362 // unable to create popup
363 return;
364 }
365
366 if (numStars < 1) {
367 numStars = 1;
368 baseScale = 0.4f;
369 timescale = 0.7f;
370 hasShortLifetime = TRUE;
371 } else {
372 baseScale = 1.0f;
373 timescale = 1.0f;
374 hasShortLifetime = FALSE;
375 }
376
377 if (battleStatus->flags1 & (BS_FLAGS1_NICE_HIT | BS_FLAGS1_SUPER_HIT)) {
378 baseScale *= 2.0;
379 }
380
381 if (animDir < 0) {
382 sign = -1;
383 } else {
384 sign = 1;
385 }
386
387 animDir = abs(animDir) % 5;
388
389 battleStatus->unk_90 = 0;
392 popup->unk_00 = FALSE;
393 popup->renderUIFunc = NULL;
394 popup->messageIndex = 1;
395 popup->active |= 0x10;
396 bonkData = popup->data.bonk = heap_malloc(numStars * sizeof(*popup->data.bonk));
397 ASSERT (popup->data.bonk != NULL);
398
399 for (i = 0; i < numStars; i++) {
400 bonkData->alive = TRUE;
404 bonkData->pos.x = x;
405 bonkData->pos.y = y;
406 bonkData->pos.z = z;
407 bonkPosIdx = animDir % 8;
408 animDir++;
409
410 bonkData->accel.x = BonkAnimAccel[bonkPosIdx].x * timescale * sign ;
411 bonkData->accel.y = BonkAnimAccel[bonkPosIdx].y * timescale;
412 bonkData->accel.z = BonkAnimAccel[bonkPosIdx].z * timescale;
413 bonkData->vel.x = 2.0 * bonkData->accel.x;
414 bonkData->vel.y = 2.0 * bonkData->accel.y;
415 bonkData->vel.z = 2.0 * bonkData->accel.z;
416
417 bonkData->scale = BonkAnimScale[i % 8].x * baseScale;
418 bonkData->rotY = clamp_angle(180.0f - gCameras[CAM_BATTLE].curYaw);
419 bonkData->rotZ = 0;
420 bonkData->rotVelZ = sign * 107;
421
422 bonkData->startupTime = startupTime;
423 bonkData->moveTime = 14;
424 bonkData->holdTime = 240;
425 if (hasShortLifetime) {
426 bonkData->holdTime = 10;
427 }
428
429 bonkData->alpha = 255.0f;
430 bonkData++;
431 }
432}
s32 b32
#define ASSERT(condition)
s32 load_entity_model(EntityModelScript *cmdList)
@ BS_FLAGS1_SUPER_HIT
Definition enums.h:3579
@ BS_FLAGS1_NICE_HIT
Definition enums.h:3576
s32 sign(s32 value)
Definition 43F0.c:376
void set_entity_model_flags(s32 idx, s32 newFlags)
void bind_entity_model_setupGfx(s32 idx, void *setupGfxCallbackArg0, void(*fpSetupGfxCallback)(void *))
void * heap_malloc(s32 size)
Definition heap.c:34
Vec3f BonkAnimScale[]
void btl_bonk_setup_gfx(void *data)
PopupMessage * btl_create_popup(void)
void btl_bonk_update(void *data)
Vec3f BonkAnimAccel[]
EntityModelScript * BonkModelScripts[]
void btl_bonk_render(void *data)

Referenced by calc_enemy_damage_target(), calc_item_damage_enemy(), calc_partner_damage_enemy(), and calc_player_damage_enemy().

◆ btl_bonk_cleanup()

void btl_bonk_cleanup ( void )

Definition at line 536 of file popup_messages.c.

536 {
537 s32 i;
538
539 for (i = 0; i < ARRAY_COUNT(popupMessages); i++) {
540 PopupMessage* popup = &popupMessages[i];
541
542 if (popup->active != 0 && (popup->active & 0x10)) {
543 BonkData* bonkData = popup->data.bonk;
544 s32 j;
545
546 for (j = 0; j < popup->messageIndex; j++, bonkData++) {
547 if (bonkData->alive) {
548 bonkData->startupTime = 0;
549 bonkData->moveTime = 1;
550 bonkData->holdTime = 20;
551 }
552 }
553 }
554 }
555}

Referenced by btl_update().

◆ btl_show_battle_message()

void btl_show_battle_message ( s32 messageIndex,
s32 duration )

Definition at line 576 of file popup_messages.c.

576 {
578
579 if (popup != NULL) {
582 popup->unk_00 = FALSE;
583 popup->renderWorldFunc = NULL;
584 popup->messageIndex = messageIndex;
585 popup->duration = duration;
587 popup->needsInit = TRUE;
588 popup->data.bonk = NULL;
590 bPopupMessage = popup;
594#if !VERSION_JP
596#endif
597 }
598}
void btl_update_message_popup(void *popup)
void btl_show_message_popup(void *popup)

Referenced by btl_main_menu_update(), btl_state_update_begin_player_turn(), btl_state_update_enemy_move(), btl_state_update_partner_move(), btl_state_update_player_move(), and btl_state_update_select_target().

◆ btl_show_variable_battle_message()

void btl_show_variable_battle_message ( s32 messageIndex,
s32 duration,
s32 varValue )

Definition at line 601 of file popup_messages.c.

601 {
603
604 if (popup != NULL) {
607 popup->unk_00 = FALSE;
608 popup->renderWorldFunc = NULL;
609 popup->messageIndex = messageIndex;
610 popup->duration = duration;
612 popup->needsInit = TRUE;
613 popup->data.bonk = NULL;
614 BattlePopupMessageVar = varValue;
615 bPopupMessage = popup;
619#if !VERSION_JP
621#endif
622 }
623}

Referenced by btl_state_update_partner_menu(), btl_state_update_peach_menu(), btl_state_update_player_menu(), and btl_state_update_twink_menu().

◆ btl_is_popup_displayed()

◆ btl_set_popup_duration()

void btl_set_popup_duration ( s32 duration)

Definition at line 629 of file popup_messages.c.

629 {
631
632 if (ActionCommandTipVisible && popup != NULL) {
633 popup->duration = duration;
634 }
635}

Referenced by action_command_free(), and update().

◆ btl_message_lock_box_pos()

void btl_message_lock_box_pos ( void )

Definition at line 637 of file popup_messages.c.

637 {
639}

◆ btl_message_unlock_box_pos()

void btl_message_unlock_box_pos ( void )

Definition at line 641 of file popup_messages.c.

641 {
643}

◆ close_action_command_instruction_popup()

void close_action_command_instruction_popup ( void )

Definition at line 645 of file popup_messages.c.

645 {
647
648 if (popup != NULL
651 ) {
652 popup->duration = 0;
653 }
654}
@ BTL_MSG_LAST_ACTION_TIP
Definition enums.h:4126
@ BTL_MSG_FIRST_ACTION_TIP
Definition enums.h:4104

Referenced by action_command_free(), and btl_state_update_player_move().

◆ btl_message_popup_draw_content()

void btl_message_popup_draw_content ( void * data,
s32 x,
s32 y )

Definition at line 1280 of file popup_messages.c.

1280 {
1281 PopupMessage* popup = data;
1282 s32 messageID;
1283 s32 msgLinesIdx;
1284 s32 opacity;
1285
1286#if VERSION_JP
1287 x += 11 + D_8028374C_1BA13C[popup->messageIndex][2];
1288 y += 6 + D_8028374C_1BA13C[popup->messageIndex][3];
1289#else
1290 x += 15;
1291 y += 6;
1292#endif
1293
1294 switch (popup->messageIndex) {
1334 case BTL_MSG_46:
1335 case BTL_MSG_47:
1338#if VERSION_JP
1339 case BTL_MSG_CANT_MOVE:
1340#endif
1344 messageID = BattleMessages[popup->messageIndex];
1345#if !VERSION_JP
1346 msgLinesIdx = get_msg_lines(messageID) - 1;
1347 y += BattleMessage_TextOffsetsY[msgLinesIdx];
1348#endif
1349 draw_msg(messageID, x, y, 255, MSG_PAL_0F, 0);
1350 break;
1355 case BTL_MSG_ATTACK_UP:
1356 case BTL_MSG_DEFENCE_UP:
1357 case BTL_MSG_HEAL_ONE:
1358 case BTL_MSG_HEAL_ALL:
1361 messageID = BattleMessages[popup->messageIndex];
1362#if !VERSION_JP
1363 msgLinesIdx = get_msg_lines(messageID) - 1;
1364 y += BattleMessage_TextOffsetsY[msgLinesIdx];
1365#endif
1367 draw_msg(messageID, x, y, 255, MSG_PAL_0F, 0);
1368 break;
1369#if !VERSION_JP
1370 case BTL_MSG_CANT_MOVE:
1371 messageID = BattleMessages[popup->messageIndex];
1372 msgLinesIdx = get_msg_lines(messageID) - 1;
1373 y += BattleMessage_TextOffsetsY[msgLinesIdx];
1375 draw_msg(messageID, x, y, 255, MSG_PAL_0F, 0);
1376 break;
1377#endif
1385 messageID = BattleMessages[popup->messageIndex];
1386 draw_msg(messageID, x + 29, y + 6, 255, MSG_PAL_0F, 0);
1389 break;
1411 opacity = 255;
1413 opacity = 160;
1414 }
1416 opacity = 255;
1417 }
1418
1419 x -= 11;
1420 y -= 6;
1421 messageID = BattleMessages[popup->messageIndex];
1422#if !VERSION_JP
1423 msgLinesIdx = get_msg_lines(messageID) - 1;
1424 y += BattleMessage_TextOffsetsY[msgLinesIdx];
1425#endif
1426 draw_msg(messageID, x + 11, y + 6, opacity, MSG_PAL_0F, 0);
1427
1428 switch (popup->messageIndex) {
1434 break;
1440
1444 break;
1450 break;
1456 break;
1462 break;
1468
1473 break;
1474#if VERSION_JP
1480
1485
1490
1495 break;
1501 break;
1502#endif
1508
1513
1518 break;
1519#if VERSION_JP
1525 break;
1526#endif
1531
1536 break;
1537#if VERSION_JP
1543
1548 break;
1549#endif
1555
1560 break;
1561#if VERSION_JP
1567 break;
1568#endif
1574 break;
1579
1584 break;
1590
1595
1600 break;
1601#if VERSION_JP
1607 break;
1608#endif
1615 break;
1616#if VERSION_JP
1622 break;
1623#endif
1624 }
1625 break;
1626 }
1627}
#define draw_msg
@ MSG_PAL_0F
Definition enums.h:5420
void hud_element_set_scale(s32 index, f32 scale)
void hud_element_set_alpha(s32 id, s32 opacity)
void hud_element_draw_clipped(s32 id)
void func_80144218(s32 id)
#define TIP_Y_PWT1
#define TIP_X_BF_RD
#define TIP_X_PWT1
#define TIP_SCALE1
s16 BattleMessage_TextOffsetsY[]
#define TIP_X_PBS2
#define TIP_Y_MTA2
#define TIP_X_HTT
#define TIP_Y_PBS2
#define TIP_X_MTA3
#define TIP_X_MTA1
#define TIP_X_HLT2
#define TIP_Y_HTR1
#define TIP_X_HLA2
#define TIP_X_PWT2
#define TIP_Y_PBS3
#define TIP_SCALE2
#define TIP_X_HLT1
#define TIP_X_PBST
#define TIP_X_HLA1
#define TIP_X_PBS3
#define TIP_Y_MTA1
#define TIP_X_PBS1
#define TIP_Y_PBS1
#define TIP_X_MTA2
#define TIP_X_MB1
#define TIP_X_PRL
#define TIP_Y_HLA2
#define TIP_Y_HLT2
#define TIP_X_ML
#define TIP_Y_BF_RD
#define TIP_X_HTR1
#define TIP_X_HTR2
#define TIP_X_MB
#define TIP_X_MB2

Referenced by btl_show_message_popup().

◆ apply_shock_effect()

void apply_shock_effect ( Actor * actor)

Definition at line 2060 of file popup_messages.c.

2060 {
2061 ActorPart* part = actor->partsTable;
2062
2063 while (part != NULL) {
2064 if (!(part->flags & ACTOR_PART_FLAG_INVISIBLE)
2065 && part->idleAnimations != NULL
2067 ) {
2068 f32 x = part->curPos.x;
2069 f32 y = part->curPos.y + (actor->size.y / 10);
2070 f32 z = part->curPos.z;
2071 s32 f1 = (part->size.x + (part->size.x / 4)) * actor->scalingFactor;
2072 s32 f2 = (part->size.y - 2) * actor->scalingFactor;
2073
2074 if (actor->flags & ACTOR_FLAG_HALF_HEIGHT) {
2075 y -= actor->size.y / 2;
2076 }
2077
2078 fx_flashing_box_shockwave(0, x, y, z, f1, f2);
2079 }
2080 part = part->nextPart;
2081 }
2082}
u32 * idleAnimations
f32 scalingFactor
struct ActorPart * partsTable
Vec2bu size
struct ActorPart * nextPart
@ ACTOR_FLAG_HALF_HEIGHT
Definition enums.h:3335
@ ACTOR_PART_FLAG_SKIP_SHOCK_EFFECT
Definition enums.h:3365
@ ACTOR_PART_FLAG_INVISIBLE
Definition enums.h:3350

Referenced by calc_enemy_damage_target(), calc_item_damage_enemy(), calc_partner_damage_enemy(), calc_partner_test_enemy(), calc_player_damage_enemy(), and show_damage_fx().

Variable Documentation

◆ BattleMessage_BoxSizesY

s16 BattleMessage_BoxSizesY[] = { 28, 40 }

Definition at line 51 of file popup_messages.c.

51{ 28, 40 };

Referenced by btl_show_message_popup().

◆ BattleMessage_TextOffsetsY

s16 BattleMessage_TextOffsetsY[] = { 0, -2 }

Definition at line 52 of file popup_messages.c.

52{ 0, -2 };

Referenced by btl_message_popup_draw_content().

◆ BattleMessage_BoxOffsetsY

s16 BattleMessage_BoxOffsetsY[] = { 0, -12 }

Definition at line 53 of file popup_messages.c.

53{ 0, -12 };

Referenced by btl_show_message_popup().

◆ BonkAnimAccel

Vec3f BonkAnimAccel[]
Initial value:
= {
{ 0.0f, 4.5f, 0.0f },
{ 1.0f, 4.0f, 0.0f },
{ 2.0f, 3.0f, 0.0f },
{ 3.0f, 2.0f, 0.0f },
{ 3.5f, 1.0f, 0.0f },
{ 4.0f, 0.0f, 0.0f },
{ 4.5f, 0.0f, 0.0f },
{ 5.0f, 0.0f, 0.0f },
{ 4.5f, 0.0f, 0.0f },
{ 4.0f, 0.0f, 0.0f },
{ 3.5f, -1.0f, 0.0f },
{ 3.0f, -2.0f, 0.0f },
{ 2.0f, -3.0f, 0.0f },
{ 1.0f, -4.0f, 0.0f },
{ 0.0f, -4.5f, 0.0f },
}

Definition at line 56 of file popup_messages.c.

56 {
57 { 0.0f, 4.5f, 0.0f },
58 { 1.0f, 4.0f, 0.0f },
59 { 2.0f, 3.0f, 0.0f },
60 { 3.0f, 2.0f, 0.0f },
61 { 3.5f, 1.0f, 0.0f },
62 { 4.0f, 0.0f, 0.0f },
63 { 4.5f, 0.0f, 0.0f },
64 { 5.0f, 0.0f, 0.0f },
65 { 4.5f, 0.0f, 0.0f },
66 { 4.0f, 0.0f, 0.0f },
67 { 3.5f, -1.0f, 0.0f },
68 { 3.0f, -2.0f, 0.0f },
69 { 2.0f, -3.0f, 0.0f },
70 { 1.0f, -4.0f, 0.0f },
71 { 0.0f, -4.5f, 0.0f },
72};

Referenced by show_immune_bonk().

◆ BonkAnimScale

Vec3f BonkAnimScale[]
Initial value:
= {
{ 1.0f, 1.0f, 1.0f },
{ 0.8f, 0.8f, 0.8f },
{ 0.9f, 0.9f, 0.9f },
{ 1.1f, 1.1f, 1.1f },
{ 1.0f, 1.0f, 1.0f },
{ 0.8f, 0.8f, 0.8f },
{ 0.9f, 0.9f, 0.9f },
{ 1.1f, 1.1f, 1.1f },
{ 1.0f, 1.0f, 1.0f },
{ 0.8f, 0.8f, 0.8f },
{ 0.9f, 0.9f, 0.9f },
{ 1.1f, 1.1f, 1.1f },
{ 1.0f, 1.0f, 1.0f },
{ 0.8f, 0.8f, 0.8f },
{ 0.9f, 0.9f, 0.9f },
}

Definition at line 74 of file popup_messages.c.

74 {
75 { 1.0f, 1.0f, 1.0f },
76 { 0.8f, 0.8f, 0.8f },
77 { 0.9f, 0.9f, 0.9f },
78 { 1.1f, 1.1f, 1.1f },
79 { 1.0f, 1.0f, 1.0f },
80 { 0.8f, 0.8f, 0.8f },
81 { 0.9f, 0.9f, 0.9f },
82 { 1.1f, 1.1f, 1.1f },
83 { 1.0f, 1.0f, 1.0f },
84 { 0.8f, 0.8f, 0.8f },
85 { 0.9f, 0.9f, 0.9f },
86 { 1.1f, 1.1f, 1.1f },
87 { 1.0f, 1.0f, 1.0f },
88 { 0.8f, 0.8f, 0.8f },
89 { 0.9f, 0.9f, 0.9f },
90};

Referenced by show_immune_bonk().

◆ EMS_BonkIcon

EntityModelScript EMS_BonkIcon
extern

Definition at line 72 of file entity_model_icons.c.

◆ BonkModelScripts

EntityModelScript* BonkModelScripts[]

◆ BattleMessages

Definition at line 100 of file popup_messages.c.

100 {
101 [BTL_MSG_MERLEE_ATK_UP] MSG_Menus_Merlee_IncreaseAttack,
102 [BTL_MSG_MERLEE_DEF_UP] MSG_Menus_Merlee_DecreaseDamage,
103 [BTL_MSG_MERLEE_EXP_UP] MSG_Menus_Merlee_IncreaseStarPoints,
104 [BTL_MSG_MERLEE_DONE] MSG_Menus_Merlee_Exhausted,
105 [BTL_MSG_CHARGE_HAMMER] MSG_Menus_ChargeHammer,
106 [BTL_MSG_CHARGE_HAMMER_MORE] MSG_Menus_ChargeHammerMore,
107 [BTL_MSG_CHARGE_JUMP] MSG_Menus_ChargeJump,
108 [BTL_MSG_CHARGE_JUMP_MORE] MSG_Menus_ChargeJumpMore,
109 [BTL_MSG_CANT_CHARGE] MSG_Menus_ChargeMaxedOut,
110 [BTL_MSG_ENEMY_MISSED] MSG_Menus_EnemyMissed,
111
112 // player status effects
113 [BTL_MSG_PLAYER_DAZED] MSG_Menus_PlayerDazed,
114 [BTL_MSG_PLAYER_ASLEEP] MSG_Menus_PlayerAsleep,
115 [BTL_MSG_PLAYER_FROZEN] MSG_Menus_PlayerFrozen,
116 [BTL_MSG_PLAYER_POISONED] MSG_Menus_PlayerPoisoned,
117 [BTL_MSG_PLAYER_SHRUNK] MSG_Menus_PlayerShrunk,
118 [BTL_MSG_PLAYER_PARALYZED] MSG_Menus_PlayerParalyzed,
119 [BTL_MSG_PLAYER_CHARGED] MSG_Menus_PlayerElectricCharge,
120 [BTL_MSG_PLAYER_TRANSPARENT] MSG_Menus_PlayerTransparent,
121
122 // enemy status effects
123 [BTL_MSG_ENEMY_DAZED] MSG_Menus_EnemyDazed,
124 [BTL_MSG_ENEMY_ASLEEP] MSG_Menus_EnemyAsleep,
125 [BTL_MSG_ENEMY_FROZEN] MSG_Menus_EnemyFrozen,
126 [BTL_MSG_ENEMY_POISONED] MSG_Menus_EnemyPoisoned,
127 [BTL_MSG_ENEMY_SHRUNK] MSG_Menus_EnemyShrunk,
128 [BTL_MSG_ENEMY_PARALYZED] MSG_Menus_EnemyParalyzed,
129 [BTL_MSG_ENEMY_ELECTRIFIED] MSG_Menus_EnemyElectrified,
130 [BTL_MSG_ENEMY_CANT_MOVE] MSG_Menus_EnemyCantMove,
131
132 [BTL_MSG_STAR_POWER_RECHARGED] MSG_Menus_StarEnergyRecharged,
133 [BTL_MSG_STAR_POWER_MAXED] MSG_Menus_StarEnergyMaxedOut,
134 [BTL_MSG_STAR_POWER_FILLED] MSG_Menus_StarEnergyFilled,
135 [BTL_MSG_ATTACK_UP] MSG_Menus_AttackUp,
136 [BTL_MSG_DEFENCE_UP] MSG_Menus_DefenseUp,
137 [BTL_MSG_HEAL_ONE] MSG_Menus_HealOne,
138 [BTL_MSG_HEAL_ALL] MSG_Menus_HealAll,
139
140 [BTL_MSG_ENEMY_TRANSPARENT] MSG_Menus_EnemyTransparent,
141 [BTL_MSG_ENEMY_CHARGED] MSG_Menus_EnemyElectricCharge,
142 [BTL_MSG_PARTNER_INJURED] MSG_Menus_PartnerInjured,
143 [BTL_MSG_CHARGE_GOOMBARIO] MSG_Menus_ChargeGoombario,
144 [BTL_MSG_CHARGE_GOOMBARIO_MORE] MSG_Menus_ChargeGoombarioMore,
145 [BTL_MSG_WATER_BLOCK_BEGIN] MSG_Menus_WaterBlockBegin,
146 [BTL_MSG_WATER_BLOCK_END] MSG_Menus_WaterBlockEnd,
147 [BTL_MSG_CLOUD_NINE_BEGIN] MSG_Menus_CloudNineBegin,
148 [BTL_MSG_CLOUD_NINE_END] MSG_Menus_CloudNineEnd,
149 [BTL_MSG_TURBO_CHARGE_BEGIN] MSG_Menus_TurboChargeBegin,
150 [BTL_MSG_TURBO_CHARGE_END] MSG_Menus_TurboChargeEnd,
151 [BTL_MSG_CHILL_OUT_BEGIN] MSG_Menus_ChillOutBegin,
152 [BTL_MSG_UNUSED_CLOUD_NINE] MSG_Menus_CloudNineBegin,
153
154 // move action command tips
155 [BTL_MSG_ACTION_TIP_PRESS_BEFORE_LANDING] MSG_Menus_MoveTip_PressBeforeLanding,
156 [BTL_MSG_ACTION_TIP_HOLD_LEFT_TIMED] MSG_Menus_MoveTip_PushLeftWithTiming,
157 [BTL_MSG_ACTION_TIP_PRESS_BEFORE_STRIKE] MSG_Menus_MoveTip_PressBeforeStriking,
158 [BTL_MSG_ACTION_TIP_MASH_BUTTON] MSG_Menus_MoveTip_PressRepeatedly,
159 [BTL_MSG_ACTION_TIP_MASH_LEFT] MSG_Menus_MoveTip_PushLeftRepeatedly,
160 [BTL_MSG_ACTION_TIP_HOLD_LEFT_AIM] MSG_Menus_MoveTip_PushLeftToAim,
161 [BTL_MSG_ACTION_TIP_UNUSED_1] MSG_Menus_MoveTip_PressBeforeLanding,
162 [BTL_MSG_ACTION_TIP_UNUSED_2] MSG_Menus_MoveTip_PressBeforeLanding,
163 [BTL_MSG_ACTION_TIP_PRESS_BUTTONS_SHOWN] MSG_Menus_MoveTip_PressAsShown,
164 [BTL_MSG_ACTION_TIP_NOT_USED_1] MSG_Menus_MoveTip_NOT_USED_1,
165 [BTL_MSG_ACTION_TIP_PRESS_WITH_TIMING] MSG_Menus_MoveTip_PressAsLightsUp,
166 [BTL_MSG_ACTION_TIP_NOT_USED_2] MSG_Menus_MoveTip_NOT_USED_2,
167 [BTL_MSG_ACTION_TIP_MASH_BOTH] MSG_Menus_MoveTip_PressBothRepeatedly,
168 [BTL_MSG_ACTION_TIP_UNUSED_3] MSG_Menus_MoveTip_PressBeforeLanding,
169 [BTL_MSG_ACTION_TIP_HOLD_THEN_TAP] MSG_Menus_MoveTip_HoldThenTap,
170 [BTL_MSG_ACTION_TIP_HOLD_THEN_RELEASE] MSG_Menus_MoveTip_HoldThenRelease,
171 [BTL_MSG_ACTION_TIP_MOVE_TO_AIM] MSG_Menus_MoveTip_MoveToAim,
172 [BTL_MSG_ACTION_TIP_UNUSED_4] MSG_Menus_MoveTip_PressBeforeLanding,
173 [BTL_MSG_ACTION_TIP_BREAK_FREE] MSG_Menus_MoveTip_PressToRunAway,
174 [BTL_MSG_ACTION_TIP_REDUCE_DAMAGE] MSG_Menus_MoveTip_PressToReduceDamage,
175 [BTL_MSG_ACTION_TIP_NOT_USED_3] MSG_Menus_MoveTip_NOT_USED_3,
176
177 // no targets available
178 [BTL_MSG_NO_JUMP_TARGET] MSG_Menus_Battle_NoTarget_Jump,
179 [BTL_MSG_NO_HAMMER_TARGET] MSG_Menus_Battle_NoTarget_Hammer,
180 [BTL_MSG_NO_ITEM_TARGET] MSG_Menus_Battle_NoTarget_Item,
181#if VERSION_JP
182 [BTL_MSG_46] MSG_Menus_JP_00DB,
183 [BTL_MSG_47] MSG_Menus_JP_00DC,
184#else
185 [BTL_MSG_46] MSG_NONE,
186 [BTL_MSG_47] MSG_NONE,
187#endif
188
189 // errors and warnings
190 [BTL_MSG_CANT_SELECT_NOW] MSG_Menus_Battle_CantSelectNow,
191 [BTL_MSG_HAMMER_DISABLED_1] MSG_Menus_Battle_CantUseHammer,
192 [BTL_MSG_HAMMER_DISABLED_2] MSG_Menus_Battle_CantUseHammer,
193 [BTL_MSG_HAMMER_DISABLED_3] MSG_Menus_Battle_CantUseHammer,
194 [BTL_MSG_JUMP_DISABLED_1] MSG_Menus_Battle_CantUseJump,
195 [BTL_MSG_JUMP_DISABLED_2] MSG_Menus_Battle_CantUseJump,
196 [BTL_MSG_JUMP_DISABLED_3] MSG_Menus_Battle_CantUseJump,
197 [BTL_MSG_ITEMS_DISABLED] MSG_Menus_Battle_CantUseItems,
198 [BTL_MSG_CANT_SWITCH] MSG_Menus_Battle_CantSwitch,
199 [BTL_MSG_CANT_MOVE] MSG_Menus_Battle_CantMove,
200 [BTL_MSG_CANT_SWITCH_UNUSED] MSG_Menus_Battle_CantSwitch,
201 [BTL_MSG_CANT_MOVE_UNUSED] MSG_Menus_Battle_CantMove,
202 [BTL_MSG_CANT_SELECT_NOW_ALT] MSG_Menus_Battle_CantSelectNow,
203};

◆ bActorMessages

s32 bActorMessages[]
Initial value:
= {
MSG_Menus_Party_Mario,
MSG_Menus_Party_Goombario,
MSG_Menus_Party_Kooper,
MSG_Menus_Party_Bombette,
MSG_Menus_Party_Parakarry,
MSG_Menus_Party_Goompa,
MSG_Menus_Party_Watt,
MSG_Menus_Party_Sushie,
MSG_Menus_Party_Lakilester,
MSG_Menus_Party_Bow,
MSG_Menus_Party_Goombaria,
MSG_Menus_Party_Twink,
MSG_Menus_Party_Peach
}

Definition at line 210 of file popup_messages.c.

210 {
211 MSG_Menus_Party_Mario,
212 MSG_Menus_Party_Goombario,
213 MSG_Menus_Party_Kooper,
214 MSG_Menus_Party_Bombette,
215 MSG_Menus_Party_Parakarry,
216 MSG_Menus_Party_Goompa,
217 MSG_Menus_Party_Watt,
218 MSG_Menus_Party_Sushie,
219 MSG_Menus_Party_Lakilester,
220 MSG_Menus_Party_Bow,
221 MSG_Menus_Party_Goombaria,
222 MSG_Menus_Party_Twink,
223 MSG_Menus_Party_Peach
224};

Referenced by btl_message_popup_draw_content(), and btl_show_message_popup().

◆ bPopupMessage

◆ popupMessages

◆ BattlePopupMessageVar

◆ HID_BattleMessage1

BSS s16 HID_BattleMessage1

Definition at line 230 of file popup_messages.c.

Referenced by btl_message_popup_draw_content(), and btl_update_message_popup().

◆ HID_BattleMessage2

BSS s16 HID_BattleMessage2

Definition at line 231 of file popup_messages.c.

Referenced by btl_message_popup_draw_content(), and btl_update_message_popup().

◆ HID_BattleMessage3

BSS s16 HID_BattleMessage3

Definition at line 232 of file popup_messages.c.

Referenced by btl_message_popup_draw_content(), and btl_update_message_popup().

◆ HID_BattleMessage4

BSS s16 HID_BattleMessage4

Definition at line 233 of file popup_messages.c.

Referenced by btl_message_popup_draw_content(), and btl_update_message_popup().

◆ ActionCommandTipVisible

◆ BattleMessage_BoxPosLocked

◆ BattleMessage_CurBoxPosY

◆ BattleMessage_CurBoxOffsetY

BSS s16 BattleMessage_CurBoxOffsetY

◆ HES_AimReticle

HudScript HES_AimReticle
extern

Definition at line 828 of file battle_ui_gfx.c.

828 {
831 hs_Loop
832 hs_SetCI(8, ui_battle_cmd_aim_reticle_0)
833 hs_SetCI(5, ui_battle_cmd_aim_reticle_1)
835 hs_End
836};
#define hs_SetTileSize(size)
#define hs_SetVisible
#define hs_End
#define hs_Restart
#define hs_Loop
#define hs_SetCI(time, name)
@ HUD_ELEMENT_SIZE_32x32
Definition hud_element.h:48

Referenced by btl_update_message_popup().

◆ HES_AimTarget

HudScript HES_AimTarget
extern

Definition at line 838 of file battle_ui_gfx.c.

838 {
841 hs_Loop
842 hs_SetCI(2, ui_battle_cmd_aim_target_0)
843 hs_SetCI(2, ui_battle_cmd_aim_target_1)
845 hs_End
846};
@ HUD_ELEMENT_SIZE_24x24
Definition hud_element.h:47

Referenced by btl_update_message_popup().

◆ HES_CDownButton

HudScript HES_CDownButton
extern

Definition at line 384 of file battle_ui_gfx.c.

Referenced by btl_update_message_popup().

◆ HES_CLeftButton

HudScript HES_CLeftButton
extern

Definition at line 332 of file battle_ui_gfx.c.

Referenced by btl_update_message_popup().

◆ HES_CRightButton

HudScript HES_CRightButton
extern

Definition at line 346 of file battle_ui_gfx.c.

Referenced by btl_update_message_popup().

◆ HES_CUpButton

HudScript HES_CUpButton
extern

Definition at line 370 of file battle_ui_gfx.c.

Referenced by btl_update_message_popup().

◆ HES_Item_MenuBoots1

HudScript HES_Item_MenuBoots1
extern

◆ HES_Item_MenuBoots2

HudScript HES_Item_MenuBoots2
extern

◆ HES_Item_MenuBoots3

HudScript HES_Item_MenuBoots3
extern

◆ HES_Item_MenuHammer1

HudScript HES_Item_MenuHammer1
extern

◆ HES_Item_MenuHammer2

HudScript HES_Item_MenuHammer2
extern

◆ HES_Item_MenuHammer3

HudScript HES_Item_MenuHammer3
extern

◆ HES_Item_MenuItems

HudScript HES_Item_MenuItems
extern

◆ HES_MashBButton2

HudScript HES_MashBButton2
extern

Definition at line 322 of file battle_ui_gfx.c.

322 {
324 hs_SetCustomSize(48, 40)
325 hs_Loop
326 hs_SetCI(2, ui_battle_cont_b_down)
327 hs_SetCI(2, ui_battle_cont_b_up)
329 hs_End
330};
#define hs_SetCustomSize(arg0, arg1)

Referenced by btl_update_message_popup().

◆ HES_MashCDownButton1

HudScript HES_MashCDownButton1
extern

Definition at line 388 of file battle_ui_gfx.c.

388 {
390 hs_SetCustomSize(40, 34)
391 hs_Loop
392 hs_SetCI(2, ui_battle_cont_c_down_up)
393 hs_SetCI(2, ui_battle_cont_c_down_down)
395 hs_End
396};

Referenced by btl_update_message_popup().

◆ HES_MashCLeftButton

HudScript HES_MashCLeftButton
extern

Definition at line 336 of file battle_ui_gfx.c.

336 {
338 hs_SetCustomSize(40, 34)
339 hs_Loop
340 hs_SetCI(2, ui_battle_cont_c_left_up)
341 hs_SetCI(2, ui_battle_cont_c_left_down)
343 hs_End
344};

Referenced by btl_update_message_popup().

◆ HES_MashCRightButton1

HudScript HES_MashCRightButton1
extern

Definition at line 350 of file battle_ui_gfx.c.

350 {
352 hs_SetCustomSize(40, 34)
353 hs_Loop
354 hs_SetCI(2, ui_battle_cont_c_right_up)
355 hs_SetCI(2, ui_battle_cont_c_right_down)
357 hs_End
358};

Referenced by btl_update_message_popup().

◆ HES_MashCUpButton

HudScript HES_MashCUpButton
extern

Definition at line 374 of file battle_ui_gfx.c.

374 {
376 hs_SetCustomSize(40, 34)
377 hs_Loop
378 hs_SetCI(2, ui_battle_cont_c_up_up)
379 hs_SetCI(2, ui_battle_cont_c_up_down)
381 hs_End
382};

Referenced by btl_update_message_popup().

◆ HES_RotateStickCW

HudScript HES_RotateStickCW
extern

Definition at line 2417 of file global_hud_scripts.c.

2417 {
2419 hs_Loop
2420 hs_SetCustomSize(32, 32)
2421 hs_SetTexelOffset(0, 0)
2422 hs_SetCI(2, ui_input_analog_stick_up)
2423 hs_SetCustomSize(40, 32)
2424 hs_SetTexelOffset(5, 0)
2425 hs_SetCI(2, ui_input_analog_stick_right)
2426 hs_SetCustomSize(32, 32)
2427 hs_SetTexelOffset(0, 0)
2428 hs_SetCI(2, ui_input_analog_stick_down)
2429 hs_SetCustomSize(40, 32)
2430 hs_SetTexelOffset(-4, 0)
2431 hs_SetCI(2, ui_input_analog_stick_left)
2433 hs_End
2434};
#define hs_SetTexelOffset(x, y)

Referenced by btl_update_message_popup().

◆ HES_StickBackAndForth

HudScript HES_StickBackAndForth
extern

Definition at line 2448 of file global_hud_scripts.c.

2448 {
2450 hs_Loop
2451 hs_SetCustomSize(40, 32)
2452 hs_SetTexelOffset(-4, 0)
2453 hs_SetCI(2, ui_input_analog_stick_left)
2454 hs_SetCustomSize(32, 32)
2455 hs_SetTexelOffset(0, 0)
2456 hs_SetCI(1, ui_input_analog_stick3)
2457 hs_SetCustomSize(40, 32)
2458 hs_SetTexelOffset(5, 0)
2459 hs_SetCI(2, ui_input_analog_stick_right)
2460 hs_SetCustomSize(32, 32)
2461 hs_SetTexelOffset(0, 0)
2462 hs_SetCI(1, ui_input_analog_stick2)
2464 hs_End
2465};

Referenced by btl_update_message_popup().

◆ HES_StickTapLeft

HudScript HES_StickTapLeft
extern

Definition at line 2480 of file global_hud_scripts.c.

2480 {
2482 hs_Loop
2483 hs_SetCustomSize(40, 32)
2484 hs_SetTexelOffset(-4, 0)
2485 hs_SetCI(22, ui_input_analog_stick_left)
2486 hs_SetCustomSize(32, 32)
2487 hs_SetTexelOffset(0, 0)
2488 hs_SetCI(8, ui_input_analog_stick)
2490 hs_End
2491};

Referenced by btl_update_message_popup().

◆ HES_StickTapRight

HudScript HES_StickTapRight
extern

Definition at line 2559 of file global_hud_scripts.c.

2559 {
2561 hs_Loop
2562 hs_SetCustomSize(32, 32)
2563 hs_SetTexelOffset(0, 0)
2564 hs_SetCI(6, ui_input_analog_stick)
2565 hs_SetCustomSize(40, 32)
2566 hs_SetTexelOffset(5, 0)
2567 hs_SetCI(2, ui_input_analog_stick_right)
2569 hs_End
2570};

Referenced by btl_update_message_popup().

◆ HES_TimingBlink

HudScript HES_TimingBlink
extern

Definition at line 424 of file battle_ui_gfx.c.

424 {
426 hs_SetCustomSize(16, 16)
427 hs_Loop
428 hs_SetCI(10, ui_battle_cmd_timing_ready)
429 hs_SetCI(6, ui_battle_cmd_timing_wait)
431 hs_End
432};

Referenced by btl_update_message_popup().