Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
battle_menu.h File Reference

Go to the source code of this file.

Macros

#define MENU_CHANGE_DELAY   8
 
#define MENU_DIPPING_DELAY   5
 

Functions

void btl_main_menu_init (void)
 
void btl_main_menu_hide (void)
 
void btl_main_menu_resume_choose (void)
 
void btl_main_menu_restore_choose (void)
 
void btl_main_menu_restore_submenu (void)
 
void btl_main_menu_destroy (void)
 
s32 btl_main_menu_update (void)
 
void btl_main_menu_draw (void)
 
s32 btl_submenu_strats_update (void)
 
b32 btl_player_can_act (void)
 
b32 btl_partner_can_act (void)
 
void create_battle_popup_menu (PopupMenu *popup)
 
void flush_popup_menu (void)
 
void show_popup_menu (void)
 
void btl_submenu_moves_init (void)
 
void btl_submenu_moves_hide (void)
 
void btl_submenu_moves_destroy (void)
 
void btl_submenu_strats_destroy (void)
 
void btl_submenu_strats_resume_choose (void)
 
void btl_submenu_strats_restore_choose (void)
 
void btl_submenu_strats_restore_locked (void)
 
void btl_submenu_moves_restore_choose (void)
 
void btl_menu_strats_init (void)
 
void btl_submenu_moves_resume_choose (void)
 
void btl_submenu_moves_restore_locked (void)
 
void btl_submenu_strats_hide (void)
 
void btl_check_can_change_partner (void)
 
void btl_init_menu_items (void)
 
s32 btl_submenu_moves_update (void)
 

Variables

PopupMenu BattlePopupMenu
 
s32 StratsOptionHIDs []
 
s16 StratsMenuPosX
 
s16 StratsMenuPosY
 
HudScriptStratsOptionHudScripts []
 
s32 StratsOptionNames []
 
s32 StratsOptionCount
 
s32 StratsPrevSelected
 
s32 StratsOptionMenuTypes []
 
s32 StratsOptionEnabled []
 
s32 StratsOptionError []
 
s32 StratsOptionMessage []
 
s8 BattleMenu_CurPos
 
s8 BattleMenu_HomePos
 
s32 PartnerNameMessages []
 
IconHudScriptPair ItemsHudScripts
 
IconHudScriptPair StarPowersHudScripts
 
IconHudScriptPair StrategiesHudScripts
 
IconHudScriptPair DoNothingHudScripts
 
IconHudScriptPair FleeHudScripts
 
s32 LeftJustMenuMessages []
 
s32 CenteredBattleMessages []
 
IconHudScriptPair PartnerHudScripts []
 
HudScriptbattle_menu_DisabledPartnerHudScripts []
 
IconHudScriptPair StarPowerMovesHudScripts []
 
HudScript HES_HandPointDownLoop
 
HudScript HES_HandPointLeftLoop
 
s32 BattleMenu_TargetHudElems []
 
s32 BattleMenu_ChooseDelay
 
s32 BattleMenu_TargetPointerAlpha
 
s32 BattleMenu_TargetNameOffsetX
 
s32 BattleMenu_SwapDelay
 
HudScriptMovesOptionHudScripts [24]
 
s32 MovesOptionNames [24]
 
s32 MovesOptionDisplayCosts [24]
 
s32 MovesOptionDiscounts [24]
 
s32 MovesOptionDiscountColors [24]
 
s32 MovesOptionBPCosts [24]
 
s32 UsingSpiritsSubmenu
 
s32 MovesOptionCount
 
s32 MovesPrevSelected
 
s32 MovesOptionIndices [24]
 
s32 MovesOptionEnabled [24]
 
s32 MovesOptionDesc [24]
 
s8 MovesOptionSortPriority [24]
 
s8 MovesOptionError [24]
 
s32 SelectedMovesIndex
 
s32 WheelOptionSubmenu []
 
s32 WheelOptionEnabled []
 
s32 WheelOptionError []
 
HudScriptWheelOptionHudScript []
 
s32 WheelOptionName []
 
b32 BattleMenu_ShowSwapIcons
 
s32 WheelOptionCount
 
s32 BattleMenu_PrevSelected
 
s32 BattleMenu_WheelBase
 
s8 ShowingErrorMessage
 
HudScript HES_YellowArrow
 
HudScript HES_MenuFlee
 
HudScript HES_MenuFleeDisabled
 
HudScript HES_MenuDefend
 
HudScript HES_MenuDefendDisabled
 
HudScript HES_MenuStrategies
 
HudScript HES_MenuStrategiesDisabled
 
HudScript HES_MenuPouch
 
HudScript HES_MenuPouchDisabled
 
HudScript HES_MenuDoNothing
 
HudScript HES_MenuDoNothingDisabled
 
HudScript HES_Kooper
 
HudScript HES_Bombette
 
HudScript HES_Partner0
 
HudScript HES_Partner0Disabled
 
HudScript HES_Goombario
 
HudScript HES_GoombarioDisabled
 
HudScript HES_KooperDisabled
 
HudScript HES_BombetteDisabled
 
HudScript HES_Parakarry
 
HudScript HES_ParakarryDisabled
 
HudScript HES_Bow
 
HudScript HES_BowDisabled
 
HudScript HES_Watt
 
HudScript HES_WattDisabled
 
HudScript HES_Sushie
 
HudScript HES_SushieDisabled
 
HudScript HES_Lakilester
 
HudScript HES_LakilesterDisabled
 
HudScript HES_PartnerA
 
HudScript HES_PartnerADisabled
 
HudScript HES_MenuBoots1
 
HudScript HES_MenuBoots1Disabled
 
HudScript HES_MenuBoots2
 
HudScript HES_MenuBoots2Disabled
 
HudScript HES_MenuBoots3
 
HudScript HES_MenuBoots3Disabled
 
HudScript HES_MenuHammer1
 
HudScript HES_MenuHammer1Disabled
 
HudScript HES_MenuHammer2
 
HudScript HES_MenuHammer2Disabled
 
HudScript HES_MenuHammer3
 
HudScript HES_MenuHammer3Disabled
 
HudScript HES_MenuItem
 
HudScript HES_MenuItemDisabled
 
HudScript HES_MenuStarPower
 
HudScript HES_MenuStarPowerDisabled
 
HudScript HES_Eldstar
 
HudScript HES_EldstarDisabled
 
HudScript HES_Mamar
 
HudScript HES_MamarDisabled
 
HudScript HES_Skolar
 
HudScript HES_SkolarDisabled
 
HudScript HES_Muskular
 
HudScript HES_MuskularDisabled
 
HudScript HES_Misstar
 
HudScript HES_MisstarDisabled
 
HudScript HES_Klevar
 
HudScript HES_KlevarDisabled
 
HudScript HES_Kalmar
 
HudScript HES_KalmarDisabled
 
HudScript HES_StarBeam
 
HudScript HES_StarBeamDisabled
 
HudScript HES_PeachBeam
 
HudScript HES_PeachBeamDisabled
 
HudScript HES_MoveDiamond
 
HudScript HES_MoveDiamond_disabled
 
HudScript HES_MoveBlueOrb
 
HudScript HES_MoveBlueOrbDisabled
 
HudScript HES_MoveGreenOrb
 
HudScript HES_MoveGreenOrbDisabled
 
HudScript HES_MoveRedOrb
 
HudScript HES_MoveRedOrbDisabled
 
HudScript HES_GreenArrowDown
 
HudScript HES_GreenArrowUp
 
HudScript HES_HandPointer
 
HudScript HES_FPCost
 
HudScript HES_FPCostReduced
 
HudScript HES_FPCostReducedTwice
 
HudScript HES_POWCost
 
HudScript HES_POWCostReduced
 
HudScript HES_POWCostReducedTwice
 
HudScript HES_StatusFlower
 
HudScript HES_NotEnoughFP
 
HudScript HES_NotEnoughPOW
 
HudScript HES_ProjectorBeam
 
HudScript HES_ProjectorReel
 
HudScript HES_ProjectorSpot
 
HudScript HES_SwapArrowLeft
 
HudScript HES_SwapArrowRight
 
HudScript HES_SwapBackground
 
HudScript HES_SwapZ
 
IconHudScriptPair gItemHudScripts []
 
s32 MenuIndexFromPartnerID []
 

Macro Definition Documentation

◆ MENU_CHANGE_DELAY

◆ MENU_DIPPING_DELAY

#define MENU_DIPPING_DELAY   5

Definition at line 8 of file battle_menu.h.

Referenced by btl_state_update_player_menu().

Function Documentation

◆ btl_main_menu_init()

void btl_main_menu_init ( void )

Definition at line 234 of file btl_states_menus.c.

234 {
236 BattleMenuAlpha = 255;
239}
BSS s16 BattleMenu_ReelAlpha
BSS s16 BattleMenuAlpha
@ BTL_MENU_STATE_CREATE
BSS s8 BattleMenu_ErrorCode
BSS s8 BattleMenuState

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

◆ btl_main_menu_hide()

◆ btl_main_menu_resume_choose()

◆ btl_main_menu_restore_choose()

void btl_main_menu_restore_choose ( void )

Definition at line 252 of file btl_states_menus.c.

252 {
253 BattleMenuAlpha = 255;
255}
@ BTL_MENU_STATE_RESTORE

Referenced by btl_state_update_partner_menu(), and btl_state_update_player_menu().

◆ btl_main_menu_restore_submenu()

void btl_main_menu_restore_submenu ( void )

Definition at line 257 of file btl_states_menus.c.

257 {
258 BattleMenuAlpha = 100;
260}
@ BTL_MENU_STATE_RESUME_SUBMENU

Referenced by btl_state_update_partner_menu(), and btl_state_update_player_menu().

◆ btl_main_menu_destroy()

void btl_main_menu_destroy ( void )

Definition at line 262 of file btl_states_menus.c.

262 {
263 s32 i;
264
265 for (i = 0; i < WheelOptionCount; i++) {
268 }
269
278}
BSS s32 PopupMenu_SelectedIndex
BSS HudElemID HID_ProjectorReelB
BSS HudElemID HID_ProjectorReelA
BSS HudElemID HID_HighlightSpot
BSS HudElemID HID_SwapArrowRight
BSS HudElemID HID_Spotlights[6]
BSS HudElemID HID_SwapZ
BSS s32 WheelOptionCount
BSS HudElemID HID_ProjectorBeam
BSS HudElemID HID_SwapBackground
BSS HudElemID HID_SwapArrowLeft
BSS HudElemID HID_OptionIcons[6]
void hud_element_free(s32 id)

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

◆ btl_main_menu_update()

s32 btl_main_menu_update ( void )

Definition at line 280 of file btl_states_menus.c.

280 {
283 s32 i;
284 f32 x, y;
285 s32 l, t;
286
287 switch (BattleMenuState) {
298
299 for (i = 0; i < WheelOptionCount; i++) {
306
313 }
314
321
326 hud_element_set_tint(hid, 0, 91, 127);
331
336 hud_element_set_tint(hid, 0, 91, 127);
341
346 hud_element_set_tint(hid, 255, 255, 255);
348 hud_element_set_transform_rotation(hid, 0.0f, 0.0f, -45.0f);
353
357 hud_element_set_tint(hid, 255, 255, 255);
361
367
373
383 break;
386
388 default:
390 break;
391 case 1:
392 // show the projector beam
395 // last tick
397 break;
398 case 0:
402 for (i = 0; i < WheelOptionCount; i++) {
403 x = 0.0f;
404 y = 0.0f;
406
409 hid = HID_OptionIcons[i];
412
413 hid = HID_Spotlights[i];
417 }
418
419 x = 0.0f;
420 y = 0.0f;
422
431 break;
432 }
433 break;
435 if (battleStatus->curButtonsPressed & BUTTON_A) {
439 } else {
443 }
444 } else {
447 if ((battleStatus->curButtonsHeld & (BUTTON_STICK_LEFT | BUTTON_STICK_UP)) &&
449 {
451 }
452 if ((battleStatus->curButtonsHeld & (BUTTON_STICK_RIGHT | BUTTON_STICK_DOWN)) &&
454 {
456 }
457 }
458
462 }
463 }
464 break;
466 BattleMenuAlpha = 100;
484 break;
488 break;
491 break;
492 }
495 break;
496 }
497 return 0;
498}
BSS s8 BattleMenu_MaxIdx
BSS s32 WheelOptionEnabled[6]
@ BTL_MENU_STATE_SHOW_REEL
@ BTL_MENU_STATE_ERROR_DONE
@ BTL_MENU_STATE_HIDE_HOLD
@ BTL_MENU_STATE_ERROR_SHOW
@ BTL_MENU_STATE_SUBMENU_OPEN
HudScript HES_SwapArrowRight
BSS s8 BattleMenu_CurPos
HudScript HES_ProjectorBeam
HudScript HES_SwapArrowLeft
BSS s32 BattleMenu_BasePosY
HudScript HES_ProjectorReel
#define WHEEL_SPACING
BSS s32 BattleMenu_BasePosX
BSS f32 BattleMenu_WheelAngle
BSS s32 BattleMenu_WheelBase
BSS s8 BattleMenu_PrevPos
HudScript HES_SwapBackground
BSS s16 BattleMenu_ReelHidePercent
HudScript HES_ProjectorSpot
HudScript HES_SwapZ
#define WHEEL_RADIUS
BSS f32 BattleMenu_WheelSpeed
BSS s32 BattleMenu_PrevSelected
BSS HudScript * WheelOptionHudScript[6]
BSS s32 WheelOptionError[6]
BSS s8 BattleMenu_MinIdx
BSS b8 BattleMenu_WheelMoving
BSS s8 BattleMenu_HomePos
s32 HudElemID
@ BUTTON_A
Definition enums.h:2776
@ BUTTON_STICK_UP
Definition enums.h:2777
@ BUTTON_STICK_DOWN
Definition enums.h:2778
@ BUTTON_STICK_LEFT
Definition enums.h:2779
@ BUTTON_STICK_RIGHT
Definition enums.h:2780
@ SOUND_MENU_CHANGE_TAB
Definition enums.h:702
@ SOUND_MENU_NEXT
Definition enums.h:703
@ SOUND_MENU_ERROR
Definition enums.h:936
void btl_show_battle_message(s32 messageIndex, s32 duration)
s32 btl_is_popup_displayed(void)
void add_vec2D_polar(f32 *x, f32 *y, f32 r, f32 theta)
Definition 43F0.c:683
void hud_element_set_scale(s32 index, f32 scale)
void hud_element_set_alpha(s32 id, s32 opacity)
void hud_element_set_render_depth(s32 id, s32 z)
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)
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.
@ 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
void sfx_play_sound(s32 soundID)
BattleStatus gBattleStatus
Definition battle.cpp:14

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

◆ btl_main_menu_draw()

void btl_main_menu_draw ( void )

Definition at line 500 of file btl_states_menus.c.

500 {
501 s32 hid;
502 s32 opacity;
503 f32 theta;
505 f32 x, y;
506 f32 scale;
507 s32 i;
508
509 switch (BattleMenuState) {
513 hud_element_set_transform_rotation(hid, 0.0f, 0.0f, 0.0f);
521 break;
527 opacity = (BattleMenu_ReelAlpha * BattleMenuAlpha) / 255;
530
537 }
538 } else if (BattleMenu_WheelAngle < theta) {
543 }
544 } else { // BattleMenu_WheelAngle == theta
546 }
547
548 if (wheelDoneMoving) {
551 } else {
553 }
554
555 // draw the spotlights
556 for (i = 0; i < WheelOptionCount; i++) {
557 // draw the series of base spotlights under each option
559 x = 0.0f;
560 y = 0.0f;
564
565 hid = HID_Spotlights[i];
568 hud_element_set_alpha(hid, (opacity * 150) / 255);
569
570 if (wheelDoneMoving && theta == (2 * WHEEL_SPACING)) {
572 } else {
574 }
576
577 // draw the current selection highlight (if aligned)
579 x = 0.0f;
580 y = 0.0f;
584
588 hud_element_set_alpha(hid, (opacity * 180) / 255);
590
591 if (!wheelDoneMoving) {
593 } else {
595 }
597 }
598 }
600
601 // calculate beam narrowing
602 scale = (fabsf(fabsf((BattleMenu_WheelAngle - theta) * (45.0 / WHEEL_SPACING)) - 22.5) / 22.5) + 0.01;
603 if (wheelDoneMoving) {
604 scale = 1.0f;
605 }
606
609 hud_element_set_transform_rotation(hid, 0.0f, 0.0f, -43.0f);
611 hud_element_set_transform_scale(hid, 1.0f, 1.8f, 1.0f);
612 hud_element_set_alpha(hid, (opacity * 200) / 255);
615
618 scale = (BattleMenu_WheelAngle - theta) * (45.0 / WHEEL_SPACING);
619 hud_element_set_transform_rotation(hid, 0.0f, 0.0f, -scale);
622 hud_element_set_alpha(hid, (opacity * 254) / 255);
625
627 hud_element_set_alpha(hid, (opacity * 254) / 255);
631
632 // draw the icons for each option
633 for (i = 0; i < WheelOptionCount; i++) {
635 x = 0.0f;
636 y = 0.0f;
640
641 btl_draw_prim_quad(0, 0, 0, 0, x - 12, y - 12, 24, 24);
642 hid = HID_OptionIcons[i];
644 hud_element_set_alpha(hid, (opacity * 180) / 255);
646 hud_element_set_alpha(hid, opacity);
647 }
649 }
650
651 // draw the names for each option
652 if (wheelDoneMoving) {
653 x = BattleMenu_BasePosX + 20;
654 y = BattleMenu_BasePosY - 34;
655 btl_draw_prim_quad(0, 0, 0, 0, x + 26, y, 48, 16);
657 }
658
661 }
662
665 hud_element_set_alpha(hid, (opacity * 200) / 255);
667 hid = HID_SwapZ;
668 hud_element_set_alpha(hid, opacity);
671 hud_element_set_alpha(hid, opacity);
674 hud_element_set_alpha(hid, opacity);
676 }
677 break;
678 }
679}
BSS MsgID WheelOptionName[6]
BSS b32 BattleMenu_ShowSwapIcons
s32 b32
#define draw_msg
@ BS_FLAGS1_TUTORIAL_BATTLE
Definition enums.h:3627
@ MSG_PAL_35
Definition enums.h:5043
@ BS_FLAGS2_PEACH_BATTLE
Definition enums.h:3643
f32 fabsf(f32 f)
void btl_draw_prim_quad(u8 r, u8 g, u8 b, u8 a, u16 left, u16 top, u16 arg6, u16 arg7)
Definition 190B20.c:2663
void hud_element_draw_complex_hud_next(s32 hid)
void hud_element_set_transform_pos(s32 id, f32 x, f32 y, f32 z)
void hud_element_draw_complex_hud_first(s32 hid)
void hud_element_draw_clipped(s32 id)
void hud_element_set_transform_scale(s32 id, f32 x, f32 y, f32 z)
#define SQ(x)
Definition macros.h:178

Referenced by btl_state_draw_partner_menu(), btl_state_draw_peach_menu(), btl_state_draw_player_menu(), and btl_state_draw_twink_menu().

◆ btl_submenu_strats_update()

s32 btl_submenu_strats_update ( void )

Definition at line 176 of file menu_strats.c.

176 {
179 s32 x, y;
180 s32 width;
181 s32 msgID;
182 s32 i;
183
184 switch (StratsMenuState) {
188 StratsMenuPosX = 20;
189 StratsMenuPosY = 68;
190
191 for (i = 0; i < StratsOptionCount; i++) {
195 }
196
200
204
208
210 x = StratsMenuPosX;
211 y = StratsMenuPosY;
214 x = 20;
215 y = 186;
223 if (!ShowingErrorMessage) {
225
226 // only wrap selection on stick press, not when held
227 if (battleStatus->curButtonsHeld & BUTTON_STICK_UP) {
228 if (StratsCursorPos > 0) {
230 } else if (battleStatus->curButtonsPressed & BUTTON_STICK_UP) {
232 }
233 }
234
235 if (battleStatus->curButtonsHeld & BUTTON_STICK_DOWN) {
238 } else if (battleStatus->curButtonsPressed & BUTTON_STICK_DOWN) {
240 }
241 }
242
243 // wrap the selected index
244 if (StratsCursorPos < 0) {
246 }
248 StratsCursorPos = 0;
249 }
250
254 }
255
258 }
261 }
265 }
266
267 if (battleStatus->curButtonsPressed & BUTTON_A) {
271 } else {
275 }
276 } else if (battleStatus->curButtonsPressed & BUTTON_B) {
280 }
281 }
284 for (i = 0; i < StratsOptionCount; i++) {
285 hud_element_set_tint(StratsOptionHIDs[i], 160, 160, 160);
286 }
295 return StratsCursorPos + 1;
297 return POPUP_RESULT_CANCEL;
303 return StratsCursorPos + 1;
305 return StratsCursorPos + 1;
311 return StratsCursorPos + 1;
325 switch (StratsErrorCode) {
326 case 0:
328 break;
329 case 1:
331 break;
332 default:
334 break;
335 }
336 width = get_msg_width(msgID, 0) + 23;
337 set_window_properties(WIN_BTL_POPUP, (SCREEN_WIDTH / 2) - (width / 2), 80, width, 28, 20, btl_menu_strats_show_error, NULL, -1);
339 StratsErrorTimer = 60;
345 }
346 if (StratsErrorTimer != 0) {
349 }
356 }
358}
u32 pressedButtons[4]
#define get_msg_width
@ BUTTON_B
Definition enums.h:2775
@ WINDOW_PRIORITY_20
Definition enums.h:3220
@ MSG_PAL_0D
Definition enums.h:5003
@ MSG_PAL_STANDARD
Definition enums.h:5000
@ WINDOW_UPDATE_SHOW
Definition enums.h:4896
@ WINDOW_UPDATE_HIDE
Definition enums.h:4897
@ WINDOW_UPDATE_DARKENED
Definition enums.h:4899
@ POPUP_RESULT_CANCEL
Definition enums.h:3212
@ POPUP_RESULT_CHOOSING
Definition enums.h:3211
@ POPUP_RESULT_INVALID
Definition enums.h:3209
@ SOUND_MENU_BACK
Definition enums.h:704
@ SOUND_MENU_CHANGE_SELECTION
Definition enums.h:701
@ WIN_BTL_STRATS_MENU
Definition enums.h:4832
@ WIN_BTL_POPUP
Definition enums.h:4835
@ WIN_BTL_STRATS_TITLE
Definition enums.h:4833
@ WIN_BTL_DESC_BOX
Definition enums.h:4834
void set_window_update(s32 panelID, s32)
Definition windows.c:434
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
HudScript HES_AnimatedHandPointer
void hud_element_set_script(s32 id, HudScript *anim)
@ HUD_ELEMENT_FLAG_DROP_SHADOW
Definition hud_element.h:97
BSS s16 StratsMenuPosY
Definition menu_strats.c:31
BSS s16 StratsErrorCode
Definition menu_strats.c:55
BSS HudElemID HID_StratsArrowDown
Definition menu_strats.c:27
HudScript HES_HandPointer
BSS HudScript * StratsOptionHudScripts[6]
Definition menu_strats.c:36
BSS s8 StratsMenuLines
Definition menu_strats.c:49
void btl_menu_strats_show_title(void *data, s32 x, s32 y)
BSS s8 ShowingErrorMessage
Definition menu_strats.c:54
BSS s32 StratsOptionHIDs[6]
Definition menu_strats.c:37
void btl_menu_strats_show_desc(void *data, s32 x, s32 y)
HudScript HES_GreenArrowDown
BSS s32 StratsOptionCount
Definition menu_strats.c:43
BSS s8 StratsVisibleStart
Definition menu_strats.c:47
@ BTL_SUBMENU_STATE_RESTORE
Definition menu_strats.c:15
@ BTL_SUBMENU_STATE_LOCK
Definition menu_strats.c:16
@ BTL_SUBMENU_STATE_HIDE_HOLD
Definition menu_strats.c:14
@ BTL_SUBMENU_STATE_CANCEL
Definition menu_strats.c:9
@ BTL_SUBMENU_STATE_SELECT
Definition menu_strats.c:10
@ BTL_SUBMENU_STATE_ERROR_DONE
Definition menu_strats.c:19
@ BTL_SUBMENU_STATE_HIDE_INIT
Definition menu_strats.c:13
@ BTL_SUBMENU_STATE_ERROR_SHOW
Definition menu_strats.c:18
@ BTL_SUBMENU_STATE_CHOOSING
Definition menu_strats.c:12
@ BTL_SUBMENU_STATE_INIT
Definition menu_strats.c:11
@ BTL_SUBMENU_STATE_ERROR_INIT
Definition menu_strats.c:17
#define MENU_LINE_HEIGHT
Definition menu_strats.c:5
BSS s8 StratsCursorPos
Definition menu_strats.c:45
BSS s8 StratsVisibleEnd
Definition menu_strats.c:48
BSS HudElemID HID_StratsArrowUp
Definition menu_strats.c:26
BSS HudElemID HID_StratsCursor
Definition menu_strats.c:28
HudScript HES_GreenArrowUp
BSS s16 StratsMenuPosX
Definition menu_strats.c:30
BSS s16 StratsScrollOffset
Definition menu_strats.c:51
BSS b32 StratsOptionEnabled[6]
Definition menu_strats.c:40
void btl_menu_strats_draw_content(void *data, s32 x, s32 y)
BSS s8 StratsTextColor
Definition menu_strats.c:58
void btl_submenu_strats_destroy(void)
BSS s16 StratsErrorTimer
Definition menu_strats.c:56
BSS s8 StratsPrevCursorPos
Definition menu_strats.c:46
BSS s16 StratsCursorOffset
Definition menu_strats.c:52
void btl_menu_strats_show_error(void *data, s32 x, s32 y)
BSS s8 StratsMenuState
Definition menu_strats.c:33
#define MENU_MAX_VISIBLE
Definition menu_strats.c:6
BSS s32 StratsOptionError[6]
Definition menu_strats.c:42
#define SCREEN_WIDTH
Definition macros.h:109
GameStatus * gGameStatusPtr
Definition main_loop.c:31

Referenced by btl_state_update_partner_menu(), and btl_state_update_player_menu().

◆ btl_player_can_act()

b32 btl_player_can_act ( void )

Definition at line 681 of file btl_states_menus.c.

681 {
683 Actor* player = battleStatus->playerActor;
684
686 return FALSE;
687 } else {
688 s8 debuff = player->debuff;
690
691 if (player->koStatus == STATUS_KEY_KO) {
693 }
694 if (debuff == STATUS_KEY_POISON) {
696 }
697 if (debuff == STATUS_KEY_SHRINK) {
699 }
700 if (debuff == STATUS_KEY_SLEEP) {
702 }
703 if (debuff == STATUS_KEY_UNUSED) {
705 }
706 if (debuff == STATUS_KEY_DIZZY) {
708 }
709 if (debuff == STATUS_KEY_PARALYZE) {
711 }
712 if (debuff == STATUS_KEY_FROZEN) {
714 }
715 if (debuff == STATUS_KEY_STOP) {
717 }
718 if (player->stoneStatus == STATUS_KEY_STONE) {
720 }
721 if (battleStatus->outtaSightActive) {
723 }
724 return !playerCantMove;
725 }
726}
@ BS_FLAGS2_PLAYER_TURN_USED
Definition enums.h:3638
@ STATUS_KEY_PARALYZE
Definition enums.h:2806
@ STATUS_KEY_FROZEN
Definition enums.h:2808
@ STATUS_KEY_KO
Definition enums.h:2814
@ STATUS_KEY_SLEEP
Definition enums.h:2807
@ STATUS_KEY_UNUSED
Definition enums.h:2804
@ STATUS_KEY_STONE
Definition enums.h:2813
@ STATUS_KEY_STOP
Definition enums.h:2809
@ STATUS_KEY_SHRINK
Definition enums.h:2811
@ STATUS_KEY_DIZZY
Definition enums.h:2805
@ STATUS_KEY_POISON
Definition enums.h:2810

Referenced by btl_state_update_partner_menu(), and btl_state_update_player_menu().

◆ btl_partner_can_act()

b32 btl_partner_can_act ( void )

Definition at line 728 of file btl_states_menus.c.

728 {
730 Actor* partner = battleStatus->partnerActor;
733
735 return FALSE;
736 }
737
740
741 if (partner->koStatus == STATUS_KEY_KO) {
743 }
746 }
749 }
752 }
755 }
758 }
761 }
764 }
765 if (partner->stoneStatus == STATUS_KEY_STONE) {
767 }
768 return !partnerCantMove;
769}
@ BS_FLAGS2_PARTNER_TURN_USED
Definition enums.h:3639
@ ACTOR_FLAG_NO_ATTACK
Skip attack turn.
Definition enums.h:3373
@ PARTNER_NONE
Definition enums.h:2919

Referenced by btl_state_update_partner_menu(), and btl_state_update_player_menu().

◆ create_battle_popup_menu()

void create_battle_popup_menu ( PopupMenu * popup)

Definition at line 2322 of file 8a860_len_3f30.c.

2322 {
2323 gPopupMenu = popup;
2324
2326 D_8010D693 = popup->titleNumber;
2328 PopupDipMode = 0;
2332 PopupDipMode = 1;
2335 PopupDipMode = 2;
2336 }
2338 }
2339
2346 }
2350
2353 }
2354
2358 }
2359
2360 PopupMenu_Alpha = 255;
2361 D_8010D691 = 9;
2362 PopupDelayLength = 2;
2364}
BSS s32 PopupMenu_PrevSelectedIndex
BSS s8 PopupNotBattle
BSS s32 PopupMenu_Alpha
BSS s8 PopupMenu_FirstDisplayIndex
BSS s8 PopupMenu_DisplayedEntryCount
s32 popup_menu_update(void)
BSS s8 PopupDipMode
BSS s8 PopupDelayLength
BSS s8 PopupNotDipping
BSS s32 gPopupWorker
BSS s8 PopupMenu_LastDisplayIndex
s8 status_bar_is_ignoring_changes(void)
Definition inventory.c:1522
BSS s8 D_8010D691
BSS s32 gPopupState
BSS s8 PopupMenu_WasStatusBarIgnoringChanges
BSS PopupMenu * gPopupMenu
BSS s8 PopupMenu_MaxDisplayableEntryCount
BSS s8 D_8010D693
@ POPUP_MENU_DOUBLE_DIP
Definition enums.h:3179
@ POPUP_STATE_INIT
Definition enums.h:3184
s32 create_worker_frontUI(void(*updateFunc)(void), void(*drawFunc)(void))
Definition worker.c:63

Referenced by btl_state_update_partner_menu(), and btl_state_update_player_menu().

◆ flush_popup_menu()

void flush_popup_menu ( void )

Definition at line 2367 of file 8a860_len_3f30.c.

2367 {
2369}

Referenced by btl_state_update_partner_menu(), and btl_state_update_player_menu().

◆ show_popup_menu()

void show_popup_menu ( void )

Definition at line 254 of file 8a860_len_3f30.c.

254 {
255 if (PopupNotBattle) {
256 switch (gPopupMenu->popupType) {
269 break;
275 break;
281 break;
282 }
284 } else {
285 switch (gPopupMenu->popupType) {
297 break;
302 break;
307 break;
308 }
309 }
310
314 }
317 }
320 }
326
330 }
334 }
337 }
340 }
344}
BSS s8 D_8010D690
BSS HudElemID PopupMenu_TitleIconHID
BSS HudElemID PopupMenu_CursorHID
BSS HudElemID PopupMenu_EmptybarHID
BSS HudElemID PopupMenu_DownArrowHID
BSS HudElemID PopupMenu_EntryIconHID
BSS HudElemID PopupMenu_PartnerLevelHID
BSS HudElemID PopupMenu_TimesHID
BSS HudElemID PopupMenu_UpArrowHID
@ POPUP_MENU_TRADE_FOR_BADGE
Definition enums.h:3168
@ POPUP_MENU_READ_DIARY_PAGE
Definition enums.h:3175
@ POPUP_MENU_SELL_ITEM
Definition enums.h:3170
@ POPUP_MENU_CHECK_ITEM
Definition enums.h:3171
@ POPUP_MENU_POST_OFFICE
Definition enums.h:3178
@ POPUP_MENU_USE_ITEM
Definition enums.h:3165
@ POPUP_MENU_TAKE_FROM_CHEST
Definition enums.h:3174
@ POPUP_MENU_USEKEY
Definition enums.h:3177
@ POPUP_MENU_CLAIM_ITEM
Definition enums.h:3172
@ POPUP_MENU_READ_LETTER
Definition enums.h:3173
@ POPUP_MENU_UPGRADE_PARTNER
Definition enums.h:3169
@ POPUP_MENU_THROW_AWAY_ITEM
Definition enums.h:3167
@ POPUP_MENU_SWITCH_PARTNER
Definition enums.h:3166
@ POPUP_MENU_READ_POSTCARD
Definition enums.h:3176
@ SOUND_OPEN_POPUP_1
Definition enums.h:551
@ SOUND_OPEN_POPUP_2
Definition enums.h:552
@ POPUP_STATE_20
Definition enums.h:3188
@ WIN_CURRENCY_COUNTER
Definition enums.h:4846
@ WIN_POPUP_DESC
Definition enums.h:4845
@ WIN_POPUP_CONTENT
Definition enums.h:4840
@ WIN_POPUP_COST
Definition enums.h:4842
@ WIN_POPUP_PROMPT
Definition enums.h:4847
@ WIN_PARTNER_COST
Definition enums.h:4844
void basic_window_update(s32 windowIndex, s32 *flags, s32 *posX, s32 *posY, s32 *posZ, f32 *scaleX, f32 *scaleY, f32 *rotX, f32 *rotY, f32 *rotZ, s32 *darkening, s32 *opacity)
Definition windows.c:161

Referenced by btl_state_update_partner_menu(), and btl_state_update_player_menu().

◆ btl_submenu_moves_init()

void btl_submenu_moves_init ( void )

Definition at line 94 of file menu_moves.c.

94 {
97 }
98
104
107 }
108
112 }
113
114 MovesTextAlpha = 255;
116
117 if (MovesPrevCursorPos < 0) {
119 }
122 }
123
127 }
128
132}
@ BTL_SUBMENU_STATE_INIT
Definition menu_moves.c:11
BSS s32 MovesOptionCount
Definition menu_moves.c:65
BSS s16 MovesTextAlpha
Definition menu_moves.c:80
#define MENU_LINE_HEIGHT
Definition menu_moves.c:5
BSS s16 MovesScrollOffset
Definition menu_moves.c:73
BSS s8 MovesPrevCursorPos
Definition menu_moves.c:68
BSS s16 MovesCursorOffset
Definition menu_moves.c:74
BSS s8 MovesCursorPos
Definition menu_moves.c:67
BSS b8 MovesDescVisible
Definition menu_moves.c:72
BSS s8 MovesMenuState
Definition menu_moves.c:45
BSS s8 MovesMenuLines
Definition menu_moves.c:71
BSS s8 MovesVisibleEnd
Definition menu_moves.c:70
BSS s32 SelectedMovesIndex
Definition menu_moves.c:83
BSS s8 MovesVisibleStart
Definition menu_moves.c:69
#define MENU_MAX_VISIBLE
Definition menu_moves.c:6
BSS s32 MovesPrevSelected
Definition menu_moves.c:46

Referenced by btl_state_update_partner_menu(), and btl_state_update_player_menu().

◆ btl_submenu_moves_hide()

void btl_submenu_moves_hide ( void )

Definition at line 134 of file menu_moves.c.

134 {
136}
@ BTL_SUBMENU_STATE_HIDE_INIT
Definition menu_moves.c:13

Referenced by btl_state_update_partner_menu(), and btl_state_update_player_menu().

◆ btl_submenu_moves_destroy()

void btl_submenu_moves_destroy ( void )

Definition at line 138 of file menu_moves.c.

138 {
139 s32 i;
140
142
143 if (!UsingSpiritsSubmenu) {
146 } else {
149 }
150
152
153 for (i = 0; i < MovesOptionCount; i++) {
155 }
156
161
162 for (i = 0; i < MovesOptionCount; i++) {
164 }
165}
@ WIN_BTL_MOVES_ICON
Definition enums.h:4829
@ WIN_BTL_SPIRITS_TITLE
Definition enums.h:4830
@ WIN_BTL_MOVES_MENU
Definition enums.h:4827
@ WIN_BTL_MOVES_TITLE
Definition enums.h:4828
@ WIN_BTL_SPIRITS_ICON
Definition enums.h:4831
BSS HudElemID HID_MovesTitle
Definition menu_moves.c:29
BSS HudElemID MovesOptionCostHIDs[24]
Definition menu_moves.c:54
BSS HudElemID HID_MovesCursor
Definition menu_moves.c:28
BSS HudElemID HID_MovesArrowUp
Definition menu_moves.c:26
BSS HudElemID MovesOptionHIDs[24]
Definition menu_moves.c:53
BSS HudElemID HID_MovesArrowDown
Definition menu_moves.c:27
BSS b32 UsingSpiritsSubmenu
Definition menu_moves.c:82

Referenced by btl_state_update_partner_menu(), btl_state_update_player_menu(), and btl_submenu_moves_update().

◆ btl_submenu_strats_destroy()

◆ btl_submenu_strats_resume_choose()

◆ btl_submenu_strats_restore_choose()

◆ btl_submenu_strats_restore_locked()

◆ btl_submenu_moves_restore_choose()

void btl_submenu_moves_restore_choose ( void )

Definition at line 207 of file menu_moves.c.

Referenced by btl_state_update_partner_menu(), and btl_state_update_player_menu().

◆ btl_menu_strats_init()

◆ btl_submenu_moves_resume_choose()

void btl_submenu_moves_resume_choose ( void )

Definition at line 167 of file menu_moves.c.

Referenced by btl_state_update_player_menu().

◆ btl_submenu_moves_restore_locked()

void btl_submenu_moves_restore_locked ( void )

Definition at line 249 of file menu_moves.c.

Referenced by btl_state_update_player_menu().

◆ btl_submenu_strats_hide()

void btl_submenu_strats_hide ( void )

◆ btl_check_can_change_partner()

void btl_check_can_change_partner ( void )

Definition at line 566 of file 190B20.c.

566 {
569 Actor* partner = battleStatus->partnerActor;
570
571 battleStatus->changePartnerAllowed = 0;
572 if (partner != NULL) {
574 s32 i;
575
576 battleStatus->changePartnerAllowed = 1;
577 partnersEnabled = 0;
578
579 for (i = 0; i < ARRAY_COUNT(playerData->partners); i++) {
580 if (playerData->partners[i].enabled) {
582 }
583 }
584
585 if (partnersEnabled >= 2) {
586 if (partner->koStatus == STATUS_KEY_KO) {
587 battleStatus->changePartnerAllowed = 0;
588 } else if (partner->debuff == STATUS_KEY_FROZEN) {
589 battleStatus->changePartnerAllowed = 0;
590 } else if (playerData->curPartner == PARTNER_GOOMPA) {
591 battleStatus->changePartnerAllowed = -1;
592 }
593 } else {
594 battleStatus->changePartnerAllowed = -1;
595 }
596 } else {
597 battleStatus->changePartnerAllowed = -1;
598 }
599}
@ PARTNER_GOOMPA
Definition enums.h:2924
#define ARRAY_COUNT(arr)
Definition macros.h:40
PlayerData gPlayerData
Definition 77480.c:39

Referenced by btl_state_update_partner_menu(), and btl_state_update_player_menu().

◆ btl_init_menu_items()

void btl_init_menu_items ( void )

Definition at line 601 of file 190B20.c.

601 {
603 Actor* player = battleStatus->playerActor;
606 s32 i;
607
608 battleStatus->menuStatus[0] = 0;
610
611 for (i = 0; i < ARRAY_COUNT(playerData->invItems); i++) {
612 s16 itemID = playerData->invItems[i];
613
614 if (itemID != ITEM_NONE) {
615 ItemData* itemData = &gItemTable[itemID];
616
617 if (itemData->typeFlags & ITEM_TYPE_FLAG_BATTLE_USABLE) {
618 battleStatus->moveCategory = BTL_MENU_TYPE_ITEMS;
619 battleStatus->moveArgument = playerData->invItems[i];
620 battleStatus->curTargetListFlags = itemData->targetFlags;
622
623 if (player->targetListLength != 0) {
624 battleStatus->menuStatus[0]++;
626 }
627 }
628 }
629 }
630
631 if (!hasValidItem) {
632 battleStatus->menuStatus[0] = 0;
633 }
634}
void create_current_pos_target_list(Actor *actor)
Definition 190B20.c:472
s8 targetListLength
s16 invItems[10]
@ BTL_MENU_TYPE_ITEMS
Definition enums.h:3828
@ ITEM_TYPE_FLAG_BATTLE_USABLE
Definition enums.h:1861
ItemData gItemTable[]

Referenced by btl_state_update_partner_menu(), and btl_state_update_player_menu().

◆ btl_submenu_moves_update()

s32 btl_submenu_moves_update ( void )

Definition at line 254 of file menu_moves.c.

254 {
256 s32 x, y;
257 s32 msgWidth;
258 s32 msgHeight;
259 s32 msgX;
260 s32 msgID;
261 s32 cond;
263 s32 i;
264 s32 j;
265
266 switch (MovesMenuState) {
270 MovesMenuPosX = 20;
271 MovesMenuPosY = 68;
272
273 for (i = 0; i < MovesOptionCount; i++) {
274 MovesOptionIndexMap[i] = i;
275 }
276
277 if (!UsingSpiritsSubmenu) {
278 for (i = 0; i < (MovesOptionCount - 1); i++) {
279 for (j = i + 1; j < MovesOptionCount; j++) {
282
284 continue;
285 }
286
287 if (
292 )
293 {
297 }
298 }
299 }
300 }
301
302 for (i = 0; i < MovesOptionCount; i++) {
304 MovesOptionHIDs[i] = hid;
307 }
308
313
318
323
324 if (!UsingSpiritsSubmenu) {
328 } else {
333 }
335
336 for (i = 0; i < MovesOptionCount; i++) {
337 if (!UsingSpiritsSubmenu) {
338 switch (MovesOptionDiscountColors[i]) {
339 case 0:
342 break;
343 case 1:
346 break;
347 default:
350 break;
351 }
352 } else {
353 switch (MovesOptionDiscountColors[i]) {
354 case 0:
357 break;
358 case 1:
361 break;
362 default:
365 break;
366 }
367 }
370 }
371
373 x = MovesMenuPosX;
374 y = MovesMenuPosY;
375 if (!UsingSpiritsSubmenu) {
379 } else {
382 set_window_properties(WIN_BTL_SPIRITS_ICON, x + 110, y - 12, 32, 35, 1, btl_menu_moves_show_icon, 0, -1);
383 }
384
387 if (!UsingSpiritsSubmenu) {
390 } else {
393 }
395
396 do {
397 cond = FALSE;
402 if (MovesVisibleStart < 0) {
404 }
405 } else {
406 cond = TRUE;
407 }
408 }
409 } while (cond);
410
415 break;
418
419 // only wrap selection on stick press, not when held
420 if (battleStatus->curButtonsHeld & (BUTTON_STICK_UP | BUTTON_Z)) {
421 if (MovesCursorPos > 0) {
423 } else if (battleStatus->curButtonsPressed & (BUTTON_STICK_UP | BUTTON_Z)) {
425 }
426 }
427
428 if (battleStatus->curButtonsHeld & (BUTTON_STICK_DOWN | BUTTON_R)) {
431 } else if (battleStatus->curButtonsPressed & (BUTTON_STICK_DOWN | BUTTON_R)) {
433 }
434 }
435
436 // wrap the selected index
437 if (MovesCursorPos < 0) {
439 }
441 MovesCursorPos = 0;
442 }
443
447 }
448
451 if (MovesVisibleStart < 0) {
453 }
454 }
455
456 if (MovesCursorPos >= (MovesVisibleEnd - 1)) {
460 if (MovesVisibleStart < 0) {
462 }
463 }
464 }
465
467 if (battleStatus->curButtonsPressed & BUTTON_A) {
471 } else {
475 }
476 break;
477 }
478
479 if (battleStatus->curButtonsPressed & BUTTON_B) {
483 }
484 break;
486 for (i = 0; i < MovesOptionCount; i++) {
487 hid = MovesOptionHIDs[i];
488 hud_element_set_tint(hid, 160, 160, 160);
489 }
493 hud_element_set_tint(HID_MovesTitle, 160, 160, 160);
494
495 for (i = 0; i < MovesOptionCount; i++) {
497 hud_element_set_tint(hid, 160, 160, 160);
498 }
499
503 if (!UsingSpiritsSubmenu) {
506 } else {
509 }
511 if (!UsingSpiritsSubmenu) {
513 } else {
515 }
519 if (!UsingSpiritsSubmenu) {
521 } else {
523 }
524 return POPUP_RESULT_CANCEL;
527 if (!UsingSpiritsSubmenu) {
530 } else {
533 }
535 if (!UsingSpiritsSubmenu) {
537 } else {
539 }
548 if (!UsingSpiritsSubmenu) {
551 } else {
554 }
561 if (!UsingSpiritsSubmenu) {
564 } else {
567 }
570 break;
577 if (!UsingSpiritsSubmenu) {
580 } else {
583 }
585
586 if (MovesErrorCode != 0) {
588 } else if (UsingSpiritsSubmenu) {
590 } else {
591 msgID = MSG_Menus_NotEnoughFP;
592 }
593
594 msgWidth = get_msg_width(msgID, 0) + 23;
595 msgHeight = ErrorMessageHeight[get_msg_lines(msgID) - 1];
596 x = (SCREEN_WIDTH / 2) - (msgWidth / 2);
597 set_window_properties(WIN_BTL_POPUP, x, 80, msgWidth, msgHeight, 20, btl_menu_moves_show_error, NULL, -1);
599 MovesErrorTimer = 60;
604 MovesErrorTimer = 0;
605 }
606 if (MovesErrorTimer != 0) {
609 }
612 if (!UsingSpiritsSubmenu) {
615 } else {
618 }
621 break;
622 }
624}
@ BUTTON_R
Definition enums.h:2767
@ BUTTON_Z
Definition enums.h:2774
@ WINDOW_UPDATE_9
Definition enums.h:4904
void status_bar_stop_blinking_sp(void)
Definition inventory.c:1619
void status_bar_stop_blinking_fp(void)
Definition inventory.c:1576
s32 get_msg_lines(s32 messageID)
Definition msg.c:1985
BSS s32 MovesOptionDiscountColors[24]
Definition menu_moves.c:59
HudScript HES_POWCostReducedTwice
@ BTL_SUBMENU_STATE_HIDE_HOLD
Definition menu_moves.c:14
@ BTL_SUBMENU_STATE_CANCEL
Definition menu_moves.c:9
@ BTL_SUBMENU_STATE_SELECT
Definition menu_moves.c:10
@ BTL_SUBMENU_STATE_ERROR_DONE
Definition menu_moves.c:19
@ BTL_SUBMENU_STATE_ERROR_SHOW
Definition menu_moves.c:18
@ BTL_SUBMENU_STATE_ERROR_INIT
Definition menu_moves.c:17
void btl_menu_moves_show_error(void *data, s32 x, s32 y)
Definition menu_moves.c:860
HudScript HES_FPCostReducedTwice
HudScript HES_HandPointer
BSS s16 MovesMenuPosY
Definition menu_moves.c:43
void btl_menu_moves_show_desc(void *data, s32 x, s32 y)
Definition menu_moves.c:845
BSS s8 MovesOptionSortPriority[24]
Definition menu_moves.c:63
void btl_menu_moves_show_title(void *data, s32 x, s32 y)
Definition menu_moves.c:814
BSS s32 MovesOptionEnabled[24]
Definition menu_moves.c:62
void btl_submenu_moves_destroy(void)
Definition menu_moves.c:138
BSS s32 MovesOptionBPCosts[24]
Definition menu_moves.c:60
HudScript HES_GreenArrowDown
BSS s16 MovesMenuPosX
Definition menu_moves.c:42
HudScript HES_GreenArrowUp
BSS s32 MovesOptionIndexMap[24]
Definition menu_moves.c:50
s16 ErrorMessageHeight[]
Definition menu_moves.c:85
HudScript HES_FPCost
BSS HudScript * MovesOptionHudScripts[24]
Definition menu_moves.c:52
void btl_menu_moves_draw_content(void *data, s32 x, s32 y)
Definition menu_moves.c:636
BSS s8 MovesErrorTimer
Definition menu_moves.c:77
HudScript HES_POWCostReduced
BSS s32 MovesOptionDisplayCosts[24]
Definition menu_moves.c:57
BSS s8 MovesOptionError[24]
Definition menu_moves.c:64
HudScript HES_POWCost
void btl_menu_moves_show_icon(void *data, s32 x, s32 y)
Definition menu_moves.c:837
HudScript HES_FPCostReduced
BSS s32 MovesErrorCode
Definition menu_moves.c:76
HudScript HES_StatusFlower
HudScript HES_MenuStarPower

Referenced by btl_state_update_partner_menu(), and btl_state_update_player_menu().

Variable Documentation

◆ BattlePopupMenu

PopupMenu BattlePopupMenu
extern

◆ StratsOptionHIDs

◆ StratsMenuPosX

s16 StratsMenuPosX
extern

Definition at line 30 of file menu_strats.c.

Referenced by btl_submenu_strats_update().

◆ StratsMenuPosY

s16 StratsMenuPosY
extern

Definition at line 31 of file menu_strats.c.

Referenced by btl_submenu_strats_update().

◆ StratsOptionHudScripts

HudScript* StratsOptionHudScripts[]
extern

◆ StratsOptionNames

s32 StratsOptionNames[]
extern

◆ StratsOptionCount

◆ StratsPrevSelected

s32 StratsPrevSelected
extern

◆ StratsOptionMenuTypes

s32 StratsOptionMenuTypes[]
extern

◆ StratsOptionEnabled

◆ StratsOptionError

s32 StratsOptionError[]
extern

◆ StratsOptionMessage

s32 StratsOptionMessage[]
extern

◆ BattleMenu_CurPos

◆ BattleMenu_HomePos

s8 BattleMenu_HomePos
extern

◆ PartnerNameMessages

◆ ItemsHudScripts

IconHudScriptPair ItemsHudScripts
extern

Definition at line 117 of file btl_states_menus.c.

HudScript HES_MenuItemDisabled
HudScript HES_MenuItem

Referenced by btl_state_update_player_menu().

◆ StarPowersHudScripts

IconHudScriptPair StarPowersHudScripts
extern

Definition at line 119 of file btl_states_menus.c.

HudScript HES_MenuStarPowerDisabled
HudScript HES_MenuStarPower

Referenced by btl_state_update_partner_menu(), and btl_state_update_player_menu().

◆ StrategiesHudScripts

IconHudScriptPair StrategiesHudScripts
extern

Definition at line 155 of file btl_states_menus.c.

HudScript HES_MenuStrategiesDisabled
HudScript HES_MenuStrategies

Referenced by btl_state_update_partner_menu(), and btl_state_update_player_menu().

◆ DoNothingHudScripts

IconHudScriptPair DoNothingHudScripts
extern

Definition at line 157 of file btl_states_menus.c.

HudScript HES_MenuDoNothing
HudScript HES_MenuDoNothingDisabled

Referenced by btl_state_update_partner_menu(), and btl_state_update_player_menu().

◆ FleeHudScripts

IconHudScriptPair FleeHudScripts
extern

Definition at line 159 of file btl_states_menus.c.

HudScript HES_MenuFlee
HudScript HES_MenuFleeDisabled

Referenced by btl_state_update_player_menu().

◆ LeftJustMenuMessages

◆ CenteredBattleMessages

◆ PartnerHudScripts

IconHudScriptPair PartnerHudScripts[]
extern

Definition at line 136 of file btl_states_menus.c.

136 {
153};
HudScript HES_BombetteDisabled
HudScript HES_Parakarry
HudScript HES_PartnerADisabled
HudScript HES_BowDisabled
HudScript HES_LakilesterDisabled
HudScript HES_SushieDisabled
HudScript HES_KooperDisabled
HudScript HES_GoombarioDisabled
HudScript HES_ParakarryDisabled
HudScript HES_Partner0Disabled
HudScript HES_WattDisabled
HudScript HES_Sushie
HudScript HES_Partner0
HudScript HES_PartnerA
HudScript HES_Kooper
HudScript HES_Watt
HudScript HES_Lakilester
HudScript HES_Bow
HudScript HES_Bombette
HudScript HES_Goombario

Referenced by btl_state_update_partner_menu(), and btl_state_update_player_menu().

◆ battle_menu_DisabledPartnerHudScripts

HudScript* battle_menu_DisabledPartnerHudScripts[]
extern

◆ StarPowerMovesHudScripts

IconHudScriptPair StarPowerMovesHudScripts[]
extern

Definition at line 121 of file btl_states_menus.c.

121 {
134};
HudScript HES_Muskular
HudScript HES_MuskularDisabled
HudScript HES_Mamar
HudScript HES_MisstarDisabled
HudScript HES_Misstar
HudScript HES_MamarDisabled
HudScript HES_EldstarDisabled
HudScript HES_Kalmar
HudScript HES_Eldstar
HudScript HES_KalmarDisabled
HudScript HES_StarBeam
HudScript HES_PeachBeamDisabled
HudScript HES_PeachBeam
HudScript HES_Klevar
HudScript HES_StarBeamDisabled
HudScript HES_Skolar
HudScript HES_SkolarDisabled
HudScript HES_KlevarDisabled

Referenced by btl_state_update_partner_menu(), and btl_state_update_player_menu().

◆ HES_HandPointDownLoop

HudScript HES_HandPointDownLoop
extern

Definition at line 217 of file battle_menu.h.

◆ HES_HandPointLeftLoop

HudScript HES_HandPointLeftLoop
extern

Definition at line 218 of file battle_menu.h.

◆ BattleMenu_TargetHudElems

s32 BattleMenu_TargetHudElems[]
extern

◆ BattleMenu_ChooseDelay

◆ BattleMenu_TargetPointerAlpha

s32 BattleMenu_TargetPointerAlpha
extern

◆ BattleMenu_TargetNameOffsetX

s32 BattleMenu_TargetNameOffsetX
extern

◆ BattleMenu_SwapDelay

◆ MovesOptionHudScripts

HudScript* MovesOptionHudScripts[24]
extern

◆ MovesOptionNames

s32 MovesOptionNames[24]
extern

◆ MovesOptionDisplayCosts

s32 MovesOptionDisplayCosts[24]
extern

◆ MovesOptionDiscounts

s32 MovesOptionDiscounts[24]
extern

◆ MovesOptionDiscountColors

s32 MovesOptionDiscountColors[24]
extern

◆ MovesOptionBPCosts

s32 MovesOptionBPCosts[24]
extern

◆ UsingSpiritsSubmenu

◆ MovesOptionCount

◆ MovesPrevSelected

s32 MovesPrevSelected
extern

◆ MovesOptionIndices

s32 MovesOptionIndices[24]
extern

Definition at line 61 of file menu_moves.c.

Referenced by btl_state_update_partner_menu(), and btl_state_update_player_menu().

◆ MovesOptionEnabled

◆ MovesOptionDesc

s32 MovesOptionDesc[24]
extern

◆ MovesOptionSortPriority

s8 MovesOptionSortPriority[24]
extern

◆ MovesOptionError

s8 MovesOptionError[24]
extern

◆ SelectedMovesIndex

◆ WheelOptionSubmenu

◆ WheelOptionEnabled

◆ WheelOptionError

◆ WheelOptionHudScript

◆ WheelOptionName

◆ BattleMenu_ShowSwapIcons

◆ WheelOptionCount

◆ BattleMenu_PrevSelected

◆ BattleMenu_WheelBase

◆ ShowingErrorMessage

◆ HES_YellowArrow

HudScript HES_YellowArrow
extern

Definition at line 255 of file battle_ui_gfx.c.

◆ HES_MenuFlee

HudScript HES_MenuFlee
extern

Definition at line 257 of file battle_ui_gfx.c.

◆ HES_MenuFleeDisabled

HudScript HES_MenuFleeDisabled
extern

Definition at line 259 of file battle_ui_gfx.c.

◆ HES_MenuDefend

HudScript HES_MenuDefend
extern

Definition at line 261 of file battle_ui_gfx.c.

◆ HES_MenuDefendDisabled

HudScript HES_MenuDefendDisabled
extern

Definition at line 263 of file battle_ui_gfx.c.

◆ HES_MenuStrategies

HudScript HES_MenuStrategies
extern

Definition at line 265 of file battle_ui_gfx.c.

◆ HES_MenuStrategiesDisabled

HudScript HES_MenuStrategiesDisabled
extern

Definition at line 267 of file battle_ui_gfx.c.

◆ HES_MenuPouch

HudScript HES_MenuPouch
extern

Definition at line 269 of file battle_ui_gfx.c.

◆ HES_MenuPouchDisabled

HudScript HES_MenuPouchDisabled
extern

Definition at line 271 of file battle_ui_gfx.c.

◆ HES_MenuDoNothing

HudScript HES_MenuDoNothing
extern

Definition at line 273 of file battle_ui_gfx.c.

◆ HES_MenuDoNothingDisabled

HudScript HES_MenuDoNothingDisabled
extern

Definition at line 275 of file battle_ui_gfx.c.

◆ HES_Kooper

HudScript HES_Kooper
extern

Definition at line 1950 of file global_hud_scripts.c.

◆ HES_Bombette

HudScript HES_Bombette
extern

Definition at line 1954 of file global_hud_scripts.c.

◆ HES_Partner0

HudScript HES_Partner0
extern

Definition at line 1942 of file global_hud_scripts.c.

◆ HES_Partner0Disabled

HudScript HES_Partner0Disabled
extern

Definition at line 1944 of file global_hud_scripts.c.

◆ HES_Goombario

HudScript HES_Goombario
extern

Definition at line 1946 of file global_hud_scripts.c.

◆ HES_GoombarioDisabled

HudScript HES_GoombarioDisabled
extern

Definition at line 1948 of file global_hud_scripts.c.

◆ HES_KooperDisabled

HudScript HES_KooperDisabled
extern

Definition at line 1952 of file global_hud_scripts.c.

◆ HES_BombetteDisabled

HudScript HES_BombetteDisabled
extern

Definition at line 1956 of file global_hud_scripts.c.

◆ HES_Parakarry

HudScript HES_Parakarry
extern

Definition at line 1958 of file global_hud_scripts.c.

◆ HES_ParakarryDisabled

HudScript HES_ParakarryDisabled
extern

Definition at line 1960 of file global_hud_scripts.c.

◆ HES_Bow

HudScript HES_Bow
extern

Definition at line 1962 of file global_hud_scripts.c.

◆ HES_BowDisabled

HudScript HES_BowDisabled
extern

Definition at line 1964 of file global_hud_scripts.c.

◆ HES_Watt

HudScript HES_Watt
extern

Definition at line 1966 of file global_hud_scripts.c.

◆ HES_WattDisabled

HudScript HES_WattDisabled
extern

Definition at line 1968 of file global_hud_scripts.c.

◆ HES_Sushie

HudScript HES_Sushie
extern

Definition at line 1970 of file global_hud_scripts.c.

◆ HES_SushieDisabled

HudScript HES_SushieDisabled
extern

Definition at line 1972 of file global_hud_scripts.c.

◆ HES_Lakilester

HudScript HES_Lakilester
extern

Definition at line 1974 of file global_hud_scripts.c.

◆ HES_LakilesterDisabled

HudScript HES_LakilesterDisabled
extern

Definition at line 1976 of file global_hud_scripts.c.

◆ HES_PartnerA

HudScript HES_PartnerA
extern

Definition at line 1982 of file global_hud_scripts.c.

◆ HES_PartnerADisabled

HudScript HES_PartnerADisabled
extern

Definition at line 1984 of file global_hud_scripts.c.

◆ HES_MenuBoots1

HudScript HES_MenuBoots1
extern

Definition at line 2140 of file global_hud_scripts.c.

◆ HES_MenuBoots1Disabled

HudScript HES_MenuBoots1Disabled
extern

Definition at line 2142 of file global_hud_scripts.c.

◆ HES_MenuBoots2

HudScript HES_MenuBoots2
extern

Definition at line 2144 of file global_hud_scripts.c.

◆ HES_MenuBoots2Disabled

HudScript HES_MenuBoots2Disabled
extern

Definition at line 2146 of file global_hud_scripts.c.

◆ HES_MenuBoots3

HudScript HES_MenuBoots3
extern

Definition at line 2148 of file global_hud_scripts.c.

◆ HES_MenuBoots3Disabled

HudScript HES_MenuBoots3Disabled
extern

Definition at line 2150 of file global_hud_scripts.c.

◆ HES_MenuHammer1

HudScript HES_MenuHammer1
extern

Definition at line 2152 of file global_hud_scripts.c.

◆ HES_MenuHammer1Disabled

HudScript HES_MenuHammer1Disabled
extern

Definition at line 2154 of file global_hud_scripts.c.

◆ HES_MenuHammer2

HudScript HES_MenuHammer2
extern

Definition at line 2156 of file global_hud_scripts.c.

◆ HES_MenuHammer2Disabled

HudScript HES_MenuHammer2Disabled
extern

Definition at line 2158 of file global_hud_scripts.c.

◆ HES_MenuHammer3

HudScript HES_MenuHammer3
extern

Definition at line 2160 of file global_hud_scripts.c.

◆ HES_MenuHammer3Disabled

HudScript HES_MenuHammer3Disabled
extern

Definition at line 2162 of file global_hud_scripts.c.

◆ HES_MenuItem

HudScript HES_MenuItem
extern

Definition at line 2164 of file global_hud_scripts.c.

◆ HES_MenuItemDisabled

HudScript HES_MenuItemDisabled
extern

Definition at line 2166 of file global_hud_scripts.c.

◆ HES_MenuStarPower

HudScript HES_MenuStarPower
extern

Definition at line 2168 of file global_hud_scripts.c.

◆ HES_MenuStarPowerDisabled

HudScript HES_MenuStarPowerDisabled
extern

Definition at line 2170 of file global_hud_scripts.c.

◆ HES_Eldstar

HudScript HES_Eldstar
extern

Definition at line 1906 of file global_hud_scripts.c.

◆ HES_EldstarDisabled

HudScript HES_EldstarDisabled
extern

Definition at line 1908 of file global_hud_scripts.c.

◆ HES_Mamar

HudScript HES_Mamar
extern

Definition at line 1910 of file global_hud_scripts.c.

◆ HES_MamarDisabled

HudScript HES_MamarDisabled
extern

Definition at line 1912 of file global_hud_scripts.c.

◆ HES_Skolar

HudScript HES_Skolar
extern

Definition at line 1914 of file global_hud_scripts.c.

◆ HES_SkolarDisabled

HudScript HES_SkolarDisabled
extern

Definition at line 1916 of file global_hud_scripts.c.

◆ HES_Muskular

HudScript HES_Muskular
extern

Definition at line 1918 of file global_hud_scripts.c.

◆ HES_MuskularDisabled

HudScript HES_MuskularDisabled
extern

Definition at line 1920 of file global_hud_scripts.c.

◆ HES_Misstar

HudScript HES_Misstar
extern

Definition at line 1922 of file global_hud_scripts.c.

◆ HES_MisstarDisabled

HudScript HES_MisstarDisabled
extern

Definition at line 1924 of file global_hud_scripts.c.

◆ HES_Klevar

HudScript HES_Klevar
extern

Definition at line 1926 of file global_hud_scripts.c.

◆ HES_KlevarDisabled

HudScript HES_KlevarDisabled
extern

Definition at line 1928 of file global_hud_scripts.c.

◆ HES_Kalmar

HudScript HES_Kalmar
extern

Definition at line 1930 of file global_hud_scripts.c.

◆ HES_KalmarDisabled

HudScript HES_KalmarDisabled
extern

Definition at line 1932 of file global_hud_scripts.c.

◆ HES_StarBeam

HudScript HES_StarBeam
extern

Definition at line 1934 of file global_hud_scripts.c.

◆ HES_StarBeamDisabled

HudScript HES_StarBeamDisabled
extern

Definition at line 1936 of file global_hud_scripts.c.

◆ HES_PeachBeam

HudScript HES_PeachBeam
extern

Definition at line 1938 of file global_hud_scripts.c.

◆ HES_PeachBeamDisabled

HudScript HES_PeachBeamDisabled
extern

Definition at line 1940 of file global_hud_scripts.c.

◆ HES_MoveDiamond

HudScript HES_MoveDiamond
extern

Definition at line 2591 of file global_hud_scripts.c.

◆ HES_MoveDiamond_disabled

HudScript HES_MoveDiamond_disabled
extern

Definition at line 2599 of file global_hud_scripts.c.

◆ HES_MoveBlueOrb

HudScript HES_MoveBlueOrb
extern

Definition at line 2593 of file global_hud_scripts.c.

◆ HES_MoveBlueOrbDisabled

HudScript HES_MoveBlueOrbDisabled
extern

Definition at line 2601 of file global_hud_scripts.c.

◆ HES_MoveGreenOrb

HudScript HES_MoveGreenOrb
extern

Definition at line 2595 of file global_hud_scripts.c.

◆ HES_MoveGreenOrbDisabled

HudScript HES_MoveGreenOrbDisabled
extern

Definition at line 2603 of file global_hud_scripts.c.

◆ HES_MoveRedOrb

HudScript HES_MoveRedOrb
extern

Definition at line 2597 of file global_hud_scripts.c.

◆ HES_MoveRedOrbDisabled

HudScript HES_MoveRedOrbDisabled
extern

Definition at line 2605 of file global_hud_scripts.c.

◆ HES_GreenArrowDown

HudScript HES_GreenArrowDown
extern

Definition at line 1866 of file global_hud_scripts.c.

1866 {
1868 hs_SetCustomSize(16, 8)
1869 hs_Loop
1875 hs_End
1876};
#define hs_SetCustomSize(arg0, arg1)
#define hs_SetVisible
#define hs_End
@ HUD_ELEMENT_FLAG_INVISIBLE
Definition hud_element.h:92
#define hs_Restart
#define hs_Loop
#define hs_SetCI(time, name)
#define hs_ClearFlags(arg0)
#define hs_SetFlags(arg0)

◆ HES_GreenArrowUp

HudScript HES_GreenArrowUp
extern

◆ HES_HandPointer

HudScript HES_HandPointer
extern

Definition at line 727 of file global_hud_scripts.c.

◆ HES_FPCost

HudScript HES_FPCost
extern

Definition at line 1821 of file global_hud_scripts.c.

◆ HES_FPCostReduced

HudScript HES_FPCostReduced
extern

Definition at line 1823 of file global_hud_scripts.c.

◆ HES_FPCostReducedTwice

HudScript HES_FPCostReducedTwice
extern

Definition at line 1825 of file global_hud_scripts.c.

◆ HES_POWCost

HudScript HES_POWCost
extern

Definition at line 1829 of file global_hud_scripts.c.

◆ HES_POWCostReduced

HudScript HES_POWCostReduced
extern

Definition at line 1831 of file global_hud_scripts.c.

◆ HES_POWCostReducedTwice

HudScript HES_POWCostReducedTwice
extern

Definition at line 1833 of file global_hud_scripts.c.

◆ HES_StatusFlower

HudScript HES_StatusFlower
extern

Definition at line 2069 of file global_hud_scripts.c.

2069 {
2071 hs_Loop
2074 hs_End
2075};
#define hs_SetTileSize(size)
#define hs_SetRGBA(time, image)
@ HUD_ELEMENT_SIZE_16x16
Definition hud_element.h:44

◆ HES_NotEnoughFP

HudScript HES_NotEnoughFP
extern

Definition at line 1827 of file global_hud_scripts.c.

◆ HES_NotEnoughPOW

HudScript HES_NotEnoughPOW
extern

Definition at line 1835 of file global_hud_scripts.c.

◆ 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_UseIA8

◆ HES_ProjectorReel

HudScript HES_ProjectorReel
extern

Definition at line 496 of file battle_ui_gfx.c.

◆ HES_ProjectorSpot

HudScript HES_ProjectorSpot
extern

Definition at line 505 of file battle_ui_gfx.c.

◆ HES_SwapArrowLeft

HudScript HES_SwapArrowLeft
extern

Definition at line 525 of file battle_ui_gfx.c.

◆ HES_SwapArrowRight

HudScript HES_SwapArrowRight
extern

Definition at line 535 of file battle_ui_gfx.c.

◆ HES_SwapBackground

HudScript HES_SwapBackground
extern

Definition at line 545 of file battle_ui_gfx.c.

◆ HES_SwapZ

HudScript HES_SwapZ
extern

Definition at line 523 of file battle_ui_gfx.c.

◆ gItemHudScripts

◆ MenuIndexFromPartnerID

s32 MenuIndexFromPartnerID[]
extern

Definition at line 316 of file 5B320.c.

316 {
317 [PARTNER_NONE] 0,
319 [PARTNER_KOOPER] 2,
322 [PARTNER_GOOMPA] 0,
323 [PARTNER_WATT] 6,
324 [PARTNER_SUSHIE] 7,
326 [PARTNER_BOW] 5,
328 [PARTNER_TWINK] 0,
329};
@ PARTNER_BOMBETTE
Definition enums.h:2922
@ PARTNER_LAKILESTER
Definition enums.h:2927
@ PARTNER_WATT
Definition enums.h:2925
@ PARTNER_BOW
Definition enums.h:2928
@ PARTNER_SUSHIE
Definition enums.h:2926
@ PARTNER_TWINK
Definition enums.h:2930
@ PARTNER_PARAKARRY
Definition enums.h:2923
@ PARTNER_GOOMBARIA
Definition enums.h:2929
@ PARTNER_KOOPER
Definition enums.h:2921
@ PARTNER_GOOMBARIO
Definition enums.h:2920