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

Go to the source code of this file.

Functions

void pause_tutorial_draw_contents (MenuPanel *menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
 
void pause_main_draw_contents (MenuPanel *menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
 
void pause_textbox_draw_contents (MenuPanel *menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
 
void pause_draw_cursor (MenuPanel *menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
 
void pause_set_cursor_opacity (s32 val)
 
void pause_set_cursor_pos_immediate (s32 windowID, s32 posX, s32 posY)
 
void pause_set_cursor_pos (s32 windowID, s32 posX, s32 posY)
 
void pause_interp_cursor (void)
 
void pause_update_tab_default (s32 windowIndex, s32 *flags, s32 *posX, s32 *posY, s32 *posZ, f32 *scaleX, f32 *scaleY, f32 *rotX, f32 *rotY, f32 *rotZ, s32 *darkening, s32 *opacity)
 
void func_80242FBC (s32 windowIndex, s32 *flags, s32 *posX, s32 *posY, s32 *posZ, f32 *scaleX, f32 *scaleY, f32 *rotX, f32 *rotY, f32 *rotZ, s32 *darkening, s32 *opacity)
 
void pause_update_tab_inactive (s32 windowIndex, s32 *flags, s32 *posX, s32 *posY, s32 *posZ, f32 *scaleX, f32 *scaleY, f32 *rotX, f32 *rotY, f32 *rotZ, s32 *darkening, s32 *opacity)
 
void pause_update_tab_active (s32 windowIndex, s32 *flags, s32 *posX, s32 *posY, s32 *posZ, f32 *scaleX, f32 *scaleY, f32 *rotX, f32 *rotY, f32 *rotZ, s32 *darkening, s32 *opacity)
 
void func_802430E4 (s32 windowIndex, s32 *flags, s32 *posX, s32 *posY, s32 *posZ, f32 *scaleX, f32 *scaleY, f32 *rotX, f32 *rotY, f32 *rotZ, s32 *darkening, s32 *opacity)
 
void func_8024313C (s32 windowIndex, s32 *flags, s32 *posX, s32 *posY, s32 *posZ, f32 *scaleX, f32 *scaleY, f32 *rotX, f32 *rotY, f32 *rotZ, s32 *darkening, s32 *opacity)
 
void pause_update_page_active_2 (s32 windowIndex, s32 *flags, s32 *posX, s32 *posY, s32 *posZ, f32 *scaleX, f32 *scaleY, f32 *rotX, f32 *rotY, f32 *rotZ, s32 *darkening, s32 *opacity)
 
void pause_update_page_active_1 (s32 windowIndex, s32 *flags, s32 *posX, s32 *posY, s32 *posZ, f32 *scaleX, f32 *scaleY, f32 *rotX, f32 *rotY, f32 *rotZ, s32 *darkening, s32 *opacity)
 
void pause_update_page_inactive_1 (s32 windowIndex, s32 *flags, s32 *posX, s32 *posY, s32 *posZ, f32 *scaleX, f32 *scaleY, f32 *rotX, f32 *rotY, f32 *rotZ, s32 *darkening, s32 *opacity)
 
void pause_update_page_inactive_2 (s32 windowIndex, s32 *flags, s32 *posX, s32 *posY, s32 *posZ, f32 *scaleX, f32 *scaleY, f32 *rotX, f32 *rotY, f32 *rotZ, s32 *darkening, s32 *opacity)
 
s32 pause_interp_text_scroll (s32 deltaBefore)
 
s32 pause_interp_vertical_scroll (s32 deltaBefore)
 
void pause_init (void)
 
void pause_tutorial_input (s32 *pressed, s32 *held)
 
void pause_handle_input (s32 pressed, s32 held)
 
void pause_cleanup (void)
 
s32 pause_get_total_equipped_bp_cost (void)
 
void pause_draw_rect (s32 ulx, s32 uly, s32 lrx, s32 lry, s32 tileIdx, s32 uls, s32 ult, s32 dsdx, s32 dtdy)
 
void pause_sort_item_list (s16 *arr, s32 len, s32(*compare)(s16 *, s16 *))
 

Variables

MenuPanel gPausePanelTabs
 
MenuPanel gPausePanelStats
 
MenuPanel gPausePanelBadges
 
MenuPanel gPausePanelItems
 
MenuPanel gPausePanelPartners
 
MenuPanel gPausePanelSpirits
 
MenuPanel gPausePanelMap
 
BSS s32 gPauseHeldButtons
 
BSS s32 gPausePressedButtons
 
BSS s32 gPauseCurrentDescMsg
 
BSS HudScriptgPauseCurrentDescIconScript
 
BSS s32 gPauseCursorIconID
 
BSS s8 gPauseMenuCurrentTab
 
BSS s8 D_802700D [7]
 
MenuPanelgPausePanels []
 
s32 gPauseCursorPosX = 160
 
s32 gPauseCursorPosY = -120
 
s32 gPauseCursorOpacity = 0
 
s32 gPauseCursorTargetPosX = 160
 
s32 gPauseCursorTargetPosY = -120
 
s32 gPauseCursorTargetOpacity = 0
 
u32 D_8024EFB4 = 1
 
s16 D_8024EFB8 [] = { -10, -25, -42, -60, -80 }
 
u8 gPauseWindowFlipUpFlags [] = { DRAW_FLAG_ROTSCALE, DRAW_FLAG_ROTSCALE, DRAW_FLAG_ROTSCALE, DRAW_FLAG_ROTSCALE, DRAW_FLAG_ROTSCALE, 0, 0}
 
s16 gPauseWindowFlipUpAngles [] = { -80, -65, -38, -30, -10, 0 }
 
s16 gPauseWindowFlipUpAngles_2 [] = { 80, 65, 38, 30, 10, 0 }
 
u8 gPauseWindowFlipDownFlags [] = { DRAW_FLAG_ROTSCALE, DRAW_FLAG_ROTSCALE, DRAW_FLAG_ROTSCALE, DRAW_FLAG_ROTSCALE, DRAW_FLAG_ROTSCALE, DRAW_FLAG_ROTSCALE, 0, 0 }
 
u8 D_8024EFEC []
 
s16 gPauseWindowFlipDownAngles [] = { -10, -25, -42, -60, -80}
 
s16 gPauseWindowFlipDownAngles_2 [] = { 10, 25, 42, 60, 80 }
 
s32 gPauseTutorialState = -1
 
s32 gPauseTutorialInputState = 3
 
s32 gPauseTutorialButtons [] = { BUTTON_A, BUTTON_STICK_RIGHT, BUTTON_A, BUTTON_A, BUTTON_A, BUTTON_A, BUTTON_START }
 
s32 gPauseTutorialDescMessages []
 
s32 gPauseTutorialCmdMessages []
 
s32 D_8024F074 []
 
s32 gPauseTutorialIconIDs [] = { 5, 4, 5, 5, 5, 5, 6 }
 
u8 gPauseMenuTextScrollInterpEasingLUT [] = { 0, 1, 2, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8}
 
u8 gPauseMenuPageScrollInterpEasingLUT [] = { 0, 1, 2, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8}
 
s32 gPauseTutorialSpriteAnims [][4]
 
Vp gPauseTutorialViewport
 
s32 gPauseTutorialScrollPos = 0
 
MenuWindowBP gPauseCommonWindowsBPs []
 

Function Documentation

◆ pause_tutorial_draw_contents()

void pause_tutorial_draw_contents ( MenuPanel * menu,
s32 baseX,
s32 baseY,
s32 width,
s32 height,
s32 opacity,
s32 darkening )

Definition at line 517 of file pause_main.c.

517 {
518 Matrix4f matrix1;
519 Matrix4f matrix2;
520 f32 (*matrix2ptr)[4];
521 s32 msgHeight;
522 s32 msgWidth;
523 s32 msgMaxLineChars;
524 s32 msgNumLines;
525 s32 msgMaxLinesPerPage;
526 s32 msgHeight2;
527 u32 msgWidth2;
528 s32 msgMaxLineChars2;
529 s32 msgNumLines2;
530 s32 msgMaxLinesPerPage2;
531 s32 i;
532 s32 margin, margin2;
533 s32 state;
534
535 if (evt_get_variable(NULL, GF_Tutorial_Badges) == FALSE) {
536 return;
537 }
538
539 gDPSetCycleType(gMainGfxPos++, G_CYC_1CYCLE);
540 gDPSetRenderMode(gMainGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2);
541 gDPSetCombineMode(gMainGfxPos++, G_CC_PRIMITIVE, G_CC_PRIMITIVE);
542 gDPSetPrimColor(gMainGfxPos++, 0, 0, 55, 55, 55, 255);
543 pause_draw_rect(baseX * 4, baseY * 4, (baseX + width) * 4, (baseY + 12) * 4, 0, 0, 0, 0, 0);
544 gDPPipeSync(gMainGfxPos++);
545 gDPSetPrimColor(gMainGfxPos++, 0, 0, 185, 185, 185, 255);
546 pause_draw_rect(baseX * 4, (baseY + 12) * 4, (baseX + width) * 4, (baseY + height) * 4, 0, 0, 0, 0, 0);
547 gDPPipeSync(gMainGfxPos++);
548 gSPViewport(gMainGfxPos++, &gPauseTutorialViewport);
549 guOrthoF(matrix1, 0.0f, 320.0f, 240.0f, 0.0f, -100.0f, 100.0f, 1.0f);
551 gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
552
553 for (i = 0; i < 3; i++) {
554 //needed to match
555 matrix2ptr = matrix2;
556 switch (i) {
557 case 0:
558 guTranslateF(matrix1, 40.0f, 223.0f, 0);
559 guScaleF(matrix2ptr, -0.8f, 0.8f, 1.0f);
560 break;
561 case 1:
562 guTranslateF(matrix1, 60.0f, 223.0f, 0);
563 guScaleF(matrix2ptr, -0.8f, 0.8f, 1.0f);
564 break;
565 default:
566 guTranslateF(matrix1, 280.0f, 223.0f, 0);
567 guScaleF(matrix2ptr, 0.8f, 0.8f, 1.0f);
568 break;
569 }
570
571 guMtxCatF(matrix2ptr, matrix1, matrix1);
572 guRotateF(matrix2ptr, 180.0f, 0.0f, 0.0f, 1.0f);
573 guMtxCatF(matrix2ptr, matrix1, matrix1);
574 guRotateF(matrix2ptr, 180.0f, 0.0f, 1.0f, 0.0f);
575 guMtxCatF(matrix2ptr, matrix1, matrix1);
577 gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
578 set_npc_imgfx_all(gPauseTutorialSprites[i], IMGFX_SET_COLOR, 255, 255, 255, 255, 64);
579 spr_draw_npc_sprite(gPauseTutorialSprites[i], 0, 0, 0, matrix1);
580 gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
581 }
582
583 get_msg_properties(pause_get_menu_msg(PAUSE_MSG_TUT_NAME_BADGES), &msgHeight, &msgWidth, &msgMaxLineChars, &msgNumLines, &msgMaxLinesPerPage, NULL, 1);
584 margin = (s32)(width - msgWidth) >> 1;
587 gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, baseX + 1, baseY + 1, baseX + width - 1, baseY + height - 1);
588 state = gPauseTutorialState;
589 get_msg_properties(pause_get_menu_msg(gPauseTutorialDescMessages[state]), &msgHeight2, &msgWidth2, &msgMaxLineChars2, &msgNumLines2, &msgMaxLinesPerPage2, NULL, 1);
590 margin2 = (s32)(width - msgWidth2) >> 1;
592 hud_element_set_render_pos(gPauseCommonIconIDs[gPauseTutorialIconIDs[gPauseTutorialState]], baseX + width / 2 - 2, baseY + 52);
596
598 hud_element_set_render_pos(gPauseCommonIconIDs[7], baseX + width / 2 + 1, baseY + 50);
599 hud_element_draw_without_clipping(gPauseCommonIconIDs[7]);
600 }
601
602 draw_msg(pause_get_menu_msg(gPauseTutorialCmdMessages[gPauseTutorialState]), baseX + width / 2 + 10, baseY + 44, 255, MSG_PAL_STANDARD, 0);
603}
Mtx matrixStack[0x200]
f32 Matrix4f[4][4]
#define guRotateF
#define guOrthoF
#define guMtxF2L
#define guTranslateF
#define guMtxCatF
#define draw_msg
#define guScaleF
@ DRAW_MSG_STYLE_MENU
Definition enums.h:5385
@ IMGFX_SET_COLOR
Definition enums.h:5123
@ MSG_PAL_WHITE
Definition enums.h:5405
@ MSG_PAL_STANDARD
Definition enums.h:5415
s32 evt_get_variable(Evt *script, Bytecode var)
Definition evt.c:1690
void get_msg_properties(s32 msgID, s32 *height, s32 *width, s32 *maxLineChars, s32 *numLines, s32 *maxLinesPerPage, s32 *arg6, u16 charset)
Definition msg.c:1671
void hud_element_set_scale(s32 index, f32 scale)
void hud_element_draw_without_clipping(s32 id)
void hud_element_set_render_pos(s32 id, s32 x, s32 y)
void hud_element_set_flags(s32 id, s32 flags)
Turns on the given flags.
@ HUD_ELEMENT_FLAG_FILTER_TEX
Definition hud_element.h:88
s32 pause_get_menu_msg(s32 index)
Definition pause_gfx.c:583
@ PAUSE_MSG_TUT_NAME_BADGES
s32 gPauseTutorialScrollPos
Definition pause_main.c:132
s32 gPauseTutorialState
Definition pause_main.c:67
s32 gPauseTutorialDescMessages[]
Definition pause_main.c:71
s32 gPauseTutorialCmdMessages[]
Definition pause_main.c:81
s32 pause_interp_text_scroll(s32 deltaBefore)
Definition pause_main.c:437
Vp gPauseTutorialViewport
Definition pause_main.c:126
s32 gPauseTutorialIconIDs[]
Definition pause_main.c:102
void pause_draw_rect(s32 ulx, s32 uly, s32 lrx, s32 lry, s32 tileIdx, s32 uls, s32 ult, s32 dsdx, s32 dtdy)
Definition pause_main.c:841
@ GF_Tutorial_Badges
s32 spr_draw_npc_sprite(s32 spriteInstanceID, s32 yaw, s32 arg2, PAL_PTR *paletteList, Matrix4f mtx)
Definition sprite.c:1106
void set_npc_imgfx_all(s32 spriteIdx, ImgFXType imgfxType, s32 imgfxArg1, s32 imgfxArg2, s32 imgfxArg3, s32 imgfxArg4, s32 imgfxArg5)
Definition sprite.c:1254
Gfx * gMainGfxPos
Definition cam_main.c:15
u16 gMatrixListPos
Definition main_loop.c:45
DisplayContext * gDisplayContext
Definition cam_main.c:16

◆ pause_main_draw_contents()

void pause_main_draw_contents ( MenuPanel * menu,
s32 baseX,
s32 baseY,
s32 width,
s32 height,
s32 opacity,
s32 darkening )

Definition at line 483 of file pause_main.c.

483 {
484}

◆ pause_textbox_draw_contents()

void pause_textbox_draw_contents ( MenuPanel * menu,
s32 baseX,
s32 baseY,
s32 width,
s32 height,
s32 opacity,
s32 darkening )

Definition at line 486 of file pause_main.c.

486 {
487 s32 msgID = gPauseShownDescMsg;
488
489 if (msgID == MSG_NONE) {
490 return;
491 }
492
493 if (gPauseDescTextPos != 0) {
494 hud_element_set_render_pos(gPauseCommonIconIDs[1], baseX + width - 4, baseY + 4);
495 hud_element_draw_without_clipping(gPauseCommonIconIDs[1]);
496 }
497
498 if (gPauseDescTextPos < gPauseDescTextMaxPos) {
499 hud_element_set_render_pos(gPauseCommonIconIDs[2], baseX + width - 4, baseY + height - 4);
500 hud_element_draw_without_clipping(gPauseCommonIconIDs[2]);
501 }
502
503 gDPPipeSync(gMainGfxPos++);
504 gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, baseX + 1, baseY + 1, baseX + width - 1, baseY + height - 1);
505 draw_msg(msgID, baseX + 10, baseY - gPauseDescTextOffset, 255, MSG_PAL_STANDARD, 0);
506 if (gPauseShownDescIconScript != 0) {
507 gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
508 hud_element_set_render_pos(gPauseCommonIconIDs[3], baseX - 4, baseY + 16);
509 hud_element_set_script(gPauseCommonIconIDs[3], gPauseShownDescIconScript);
512 hud_element_set_scale(gPauseCommonIconIDs[3], 1.0f);
513 hud_element_draw_without_clipping(gPauseCommonIconIDs[3]);
514 }
515}
void hud_element_set_script(s32 id, HudScript *anim)
void hud_element_clear_flags(s32 id, s32 flags)
Turns off the given flags.
@ HUD_ELEMENT_FLAG_DROP_SHADOW
#define SCREEN_WIDTH
Definition macros.h:105
#define SCREEN_HEIGHT
Definition macros.h:106

◆ pause_draw_cursor()

void pause_draw_cursor ( MenuPanel * menu,
s32 baseX,
s32 baseY,
s32 width,
s32 height,
s32 opacity,
s32 darkening )

Definition at line 468 of file pause_main.c.

468 {
469 s32 currentOpacity;
470
472 currentOpacity = gPauseCursorOpacity;
473 if (currentOpacity > 0) {
474 if (currentOpacity > 255) {
475 currentOpacity = 255;
476 }
477 hud_element_set_alpha(gPauseCommonIconIDs[0], currentOpacity);
478 hud_element_set_render_pos(gPauseCommonIconIDs[0], baseX + gPauseCursorPosX, baseY + gPauseCursorPosY);
479 hud_element_draw_without_clipping(gPauseCommonIconIDs[0]);
480 }
481}
void hud_element_set_alpha(s32 id, s32 opacity)
s32 gPauseCursorOpacity
Definition pause_main.c:53
s32 gPauseCursorPosX
Definition pause_main.c:51
s32 gPauseCursorPosY
Definition pause_main.c:52
void pause_interp_cursor(void)
Definition pause_main.c:257

◆ pause_set_cursor_opacity()

void pause_set_cursor_opacity ( s32 val)

Definition at line 192 of file pause_main.c.

192 {
194}
s32 gPauseCursorTargetOpacity
Definition pause_main.c:56

Referenced by pause_badges_draw_contents().

◆ pause_set_cursor_pos_immediate()

void pause_set_cursor_pos_immediate ( s32 windowID,
s32 posX,
s32 posY )

Definition at line 196 of file pause_main.c.

196 {
197 Window* window = &gWindows[windowID];
198
200 if (D_8024EFB4 != 0) {
201 s32 i;
202
203 for (i = WIN_PAUSE_MAIN; i < WIN_PAUSE_CURSOR; i++) {
204 Window* window = &gWindows[i];
205 s8 parent = window->parent;
206
207 if ((parent == WIN_NONE || parent == WIN_PAUSE_MAIN) && (window->flags & WINDOW_FLAG_INITIAL_ANIMATION)) {
208 break;
209 }
210 }
211 if (i >= WIN_PAUSE_CURSOR) {
212 D_8024EFB4 = 0;
213 }
214 }
216 gPauseCursorPosX = posX;
218 gPauseCursorPosY = posY;
219
220 } else if ((window->flags & WINDOW_FLAG_INITIAL_ANIMATION) == 0 && (window->parent == WIN_NONE || !(gWindows[window->parent].flags & WINDOW_FLAG_INITIAL_ANIMATION))) {
222 gPauseCursorPosX = posX;
224 gPauseCursorPosY = posY;
225 }
226}
@ WINDOW_FLAG_INITIAL_ANIMATION
Definition enums.h:4996
@ WIN_PAUSE_CURSOR
Definition enums.h:5287
@ WIN_PAUSE_MAIN
Definition enums.h:5263
@ WIN_NONE
Definition enums.h:5240
s32 get_game_mode(void)
Definition game_modes.c:123
@ GAME_MODE_END_FILE_SELECT
Definition game_modes.h:20
s32 gPauseCursorTargetPosX
Definition pause_main.c:54
s32 gPauseCursorTargetPosY
Definition pause_main.c:55
u32 D_8024EFB4
Definition pause_main.c:57
Window gWindows[64]
Definition windows.c:23

Referenced by pause_badges_draw_contents(), and pause_items_draw_contents().

◆ pause_set_cursor_pos()

void pause_set_cursor_pos ( s32 windowID,
s32 posX,
s32 posY )

Definition at line 228 of file pause_main.c.

228 {
229 Window* window = &gWindows[windowID];
230
232 if (D_8024EFB4 != 0) {
233 s32 i;
234
235 for (i = WIN_PAUSE_MAIN; i < WIN_PAUSE_CURSOR; i++) {
236 Window* window = &gWindows[i];
237 s8 parent = window->parent;
238
239 if ((parent == WIN_NONE || parent == WIN_PAUSE_MAIN) && (window->flags & WINDOW_FLAG_INITIAL_ANIMATION)) {
240 break;
241 }
242 }
243 if (i >= 44) {
244 D_8024EFB4 = 0;
245 }
246 }
248 gPauseCursorPosX = posX;
250 gPauseCursorPosY = posY;
251 } else if ((window->flags & WINDOW_FLAG_INITIAL_ANIMATION) == 0 && (window->parent == WIN_NONE || !(gWindows[window->parent].flags & WINDOW_FLAG_INITIAL_ANIMATION))) {
254 }
255}

Referenced by pause_badges_draw_contents(), pause_items_draw_contents(), pause_map_draw_contents(), pause_partners_draw_contents(), pause_partners_draw_movelist(), pause_spirits_draw_contents(), pause_stats_draw_contents(), pause_tabs_draw_badges(), pause_tabs_draw_items(), pause_tabs_draw_map(), pause_tabs_draw_party(), pause_tabs_draw_spirits(), and pause_tabs_draw_stats().

◆ pause_interp_cursor()

void pause_interp_cursor ( void )

Definition at line 257 of file pause_main.c.

257 {
258 s32 xDelta;
259 s32 yDelta;
260 s32* opacity;
261
262 xDelta = (gPauseCursorTargetPosX - gPauseCursorPosX) * 0.5;
263 yDelta = (gPauseCursorTargetPosY - gPauseCursorPosY) * 0.5;
264
266 if ((xDelta == 0) && (yDelta == 0)) {
269 }
270 }
271
272 gPauseCursorPosX += xDelta;
273 gPauseCursorPosY += yDelta;
274
275 if (gPauseCursorTargetOpacity == 0) {
276 gPauseCursorOpacity -= 128;
277 if (gPauseCursorOpacity < 0) {
279 }
280 } else {
282 if (gPauseCursorOpacity> 255) {
284 }
285 }
287}

Referenced by pause_draw_cursor().

◆ pause_update_tab_default()

void pause_update_tab_default ( 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 at line 289 of file pause_main.c.

290 {
291 Window* window = &gWindows[windowIndex];
292
293 *darkening = 160;
295}
@ WINDOW_FLAG_HIDDEN
Updated but not rendered.
Definition enums.h:4995

◆ func_80242FBC()

void func_80242FBC ( 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 at line 297 of file pause_main.c.

298 {
299 Window* window = &gWindows[windowIndex];
300
301 *darkening = 160;
302 *opacity = 80;
304}

◆ pause_update_tab_inactive()

void pause_update_tab_inactive ( 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 at line 306 of file pause_main.c.

307 {
308 Window* window = &gWindows[windowIndex];
309 s32 updateCounter = window->updateCounter;
310
311 if (updateCounter == 0) {
312 window->flags &= ~WINDOW_FLAG_HIDDEN;
313 }
314
315 if (updateCounter == 5) {
316 update_window_hierarchy(windowIndex, window->originalPriority);
317 }
318
319 if (updateCounter < 10) {
320 *darkening = (updateCounter + 1) * 16;
321 } else {
322 *darkening = 160;
323 window->flags &= ~WINDOW_FLAG_INITIAL_ANIMATION;
324 }
325}
void update_window_hierarchy(s32 windowIndex, u8 arg1)
Definition windows.c:393
u8 originalPriority

Referenced by pause_tabs_handle_input().

◆ pause_update_tab_active()

void pause_update_tab_active ( 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 at line 327 of file pause_main.c.

328 {
329 Window* window = &gWindows[windowIndex];
330
331 if (window->updateCounter == 0) {
332 update_window_hierarchy(windowIndex, window->originalPriority);
333 *darkening = 0;
334 window->flags &= ~WINDOW_FLAG_INITIAL_ANIMATION;
335 }
336}

Referenced by pause_tabs_handle_input().

◆ func_802430E4()

void func_802430E4 ( 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 at line 338 of file pause_main.c.

339 {
340 Window* window = &gWindows[windowIndex];
341 s32 updateCounter = window->updateCounter;
342
343 if (updateCounter == 0) {
344 window->flags &= ~WINDOW_FLAG_HIDDEN;
345 }
346
347 if (updateCounter < 16) {
348 *opacity = updateCounter * 16;
349 } else {
350 *opacity = 255;
351 window->flags &= ~WINDOW_FLAG_INITIAL_ANIMATION;
352 }
353}

◆ func_8024313C()

void func_8024313C ( 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 at line 355 of file pause_main.c.

356 {
357 Window* window = &gWindows[windowIndex];
358 s32 updateCounter = window->updateCounter;
359
360 if (updateCounter < 16) {
361 *opacity = 255 - (updateCounter * 16);
362 } else {
363 *opacity = 0;
364 window->flags &= ~WINDOW_FLAG_INITIAL_ANIMATION;
365 window->flags |= WINDOW_FLAG_HIDDEN;
366 }
367}

◆ pause_update_page_active_2()

void pause_update_page_active_2 ( 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 at line 369 of file pause_main.c.

370 {
371 Window* window = &gWindows[windowIndex];
372 s32 updateCounter = window->updateCounter;
373
374 if (updateCounter == 0) {
375 window->flags &= ~WINDOW_FLAG_HIDDEN;
376 }
377 if (updateCounter < 7) {
378 *flags = gPauseWindowFlipUpFlags[updateCounter];
379 *rotX += gPauseWindowFlipUpAngles[updateCounter];
380 } else {
382 *rotX += gPauseWindowFlipUpAngles[6];
383 window->flags &= ~WINDOW_FLAG_INITIAL_ANIMATION;
384 }
385}
s8 flags
Definition demo_api.c:15
u8 gPauseWindowFlipUpFlags[]
Definition pause_main.c:59
s16 gPauseWindowFlipUpAngles[]
Definition pause_main.c:60

Referenced by pause_tabs_update().

◆ pause_update_page_active_1()

void pause_update_page_active_1 ( 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 at line 387 of file pause_main.c.

388 {
389 Window* window = &gWindows[windowIndex];
390 s32 updateCounter = window->updateCounter;
391
392 if (updateCounter == 0) {
393 window->flags &= ~WINDOW_FLAG_HIDDEN;
394 }
395 if (updateCounter < 7) {
396 *flags = gPauseWindowFlipUpFlags[updateCounter];
397 *rotX += gPauseWindowFlipUpAngles_2[updateCounter];
398 } else {
400 *rotX += gPauseWindowFlipUpAngles_2[6];
401 window->flags &= ~WINDOW_FLAG_INITIAL_ANIMATION;
402 }
403}
s16 gPauseWindowFlipUpAngles_2[]
Definition pause_main.c:61

Referenced by pause_tabs_update().

◆ pause_update_page_inactive_1()

void pause_update_page_inactive_1 ( 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 at line 405 of file pause_main.c.

406 {
407 Window* window = &gWindows[windowIndex];
408 s32 updateCounter = window->updateCounter;
409
410 if (updateCounter < 5) {
411 *flags = gPauseWindowFlipDownFlags[updateCounter];
412 *rotX += gPauseWindowFlipDownAngles[updateCounter];
413 } else {
415 *rotX += gPauseWindowFlipDownAngles[4];
416 window->flags &= ~WINDOW_FLAG_INITIAL_ANIMATION;
417 window->flags |= WINDOW_FLAG_HIDDEN;
418 }
419}
s16 gPauseWindowFlipDownAngles[]
Definition pause_main.c:65
u8 gPauseWindowFlipDownFlags[]
Definition pause_main.c:62

Referenced by pause_tabs_update().

◆ pause_update_page_inactive_2()

void pause_update_page_inactive_2 ( 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 at line 421 of file pause_main.c.

422 {
423 Window* window = &gWindows[windowIndex];
424 s32 updateCounter = window->updateCounter;
425
426 if (updateCounter < 5) {
427 *flags = gPauseWindowFlipDownFlags[updateCounter];
428 *rotX = gPauseWindowFlipDownAngles_2[updateCounter];
429 } else {
432 window->flags &= ~WINDOW_FLAG_INITIAL_ANIMATION;
433 window->flags |= WINDOW_FLAG_HIDDEN;
434 }
435}
s16 gPauseWindowFlipDownAngles_2[]
Definition pause_main.c:66

Referenced by pause_tabs_update().

◆ pause_interp_text_scroll()

s32 pause_interp_text_scroll ( s32 deltaBefore)

Definition at line 437 of file pause_main.c.

437 {
438 s32 val;
439 s32 db = abs(deltaBefore);
440 s32 s = sign(deltaBefore);
441
442 if (db >= 16) {
443 val = 8;
444 } else {
446 }
447
448 return val * s;
449}
s32 sign(s32 value)
Definition 43F0.c:376
u8 gPauseMenuTextScrollInterpEasingLUT[]
Definition pause_main.c:103

Referenced by pause_handle_input(), and pause_tutorial_draw_contents().

◆ pause_interp_vertical_scroll()

s32 pause_interp_vertical_scroll ( s32 deltaBefore)

Definition at line 451 of file pause_main.c.

451 {
452 s32 val;
453 s32 db = abs(deltaBefore);
454 s32 s = sign(deltaBefore);
455
456 if (db >= 16) {
457 val = db / 2;
458 if (val > 20) {
459 val = 20;
460 }
461 } else {
463 }
464
465 return val * s;
466}
u8 gPauseMenuPageScrollInterpEasingLUT[]
Definition pause_main.c:104

Referenced by pause_badges_update(), and pause_items_update().

◆ pause_init()

void pause_init ( void )

Definition at line 605 of file pause_main.c.

605 {
606 s32 posX;
607 s32 x;
608 Window* pauseWindows;
609 MenuPanel** menuPanels;
610 s32 i;
611
612 DMA_COPY_SEGMENT(ui_images_filemenu_pause);
613
614 for (i = 0; i < ARRAY_COUNT(gPauseIconScripts); i++) {
615 gPauseCommonIconIDs[i] = hud_element_create(gPauseIconScripts[i]);
616 if (gPauseIconScripts[i] == &HES_AnimatedCursorHand) {
618 } else {
619 hud_element_set_flags(gPauseCommonIconIDs[i], HUD_ELEMENT_FLAG_80);
620 }
621 }
622
623 gPauseCursorIconID = gPauseCommonIconIDs[0];
625 gPauseShownDescMsg = 0;
626 gPauseDescTextPos = 0;
627 gPauseDescTextOffset = 0;
628 gPauseDescTextMaxPos = 0;
629 gPauseShownDescIconScript = 0;
630 gPauseCurrentDescMsg = MSG_NONE;
633
634 menuPanels = gPausePanels;
635 for (i = 0; i < ARRAY_COUNT(gPausePanels); menuPanels++, i++) {
636 if ((*menuPanels)->fpInit) {
637 (*menuPanels)->fpInit(*menuPanels);
638 }
639 }
640
641 posX = 225;
642 for (i = 6; i > 0; i--) {
643 if (!gPausePanels[i]->initialized) {
645 } else {
646 gWindows[WIN_PAUSE_TUTORIAL + i].pos.x = posX + 14;
647 posX -= 45;
648 }
649 }
650 pauseWindows = &gWindows[WIN_PAUSE_TAB_STATS];
651 x = pauseWindows[gPausePanels[0]->col].pos.x;
653
655 for (i = 0; i < ARRAY_COUNT(gPauseTutorialSpriteAnims); i++) {
656 gPauseTutorialSprites[i] = spr_load_npc_sprite(gPauseTutorialSpriteAnims[i][0], gPauseTutorialSpriteAnims[i]);
657 }
658
661 }
662
664}
@ WINDOW_UPDATE_SHOW
Definition enums.h:5311
@ WINDOW_UPDATE_HIDE
Definition enums.h:5312
@ SOUND_MENU_SHOW_CHOICE
Definition enums.h:554
@ WIN_PAUSE_TAB_INVIS
Definition enums.h:5286
@ WIN_PAUSE_TAB_STATS
Definition enums.h:5268
@ WIN_PAUSE_TUTORIAL
Definition enums.h:5266
HudScript HES_AnimatedCursorHand
void set_window_update(s32 panelID, s32)
Definition windows.c:434
void setup_pause_menu_tab(MenuWindowBP *bpArray, s32 arraySize)
Definition windows.c:461
s32 hud_element_create(HudScript *anim)
Creates a new HUD element and returns its ID.
@ HUD_ELEMENT_FLAG_80
Definition hud_element.h:80
BSS s8 gPauseMenuCurrentTab
Definition pause_main.c:28
s32 gPauseTutorialSpriteAnims[][4]
Definition pause_main.c:106
BSS HudScript * gPauseCurrentDescIconScript
Definition pause_main.c:26
BSS s32 gPauseCursorIconID
Definition pause_main.c:27
MenuPanel * gPausePanels[]
Definition pause_main.c:47
BSS s32 gPauseCurrentDescMsg
Definition pause_main.c:25
MenuWindowBP gPauseCommonWindowsBPs[]
Definition pause_main.c:133
void sfx_play_sound(s32 soundID)
Definition sfx.c:517
#define DMA_COPY_SEGMENT(segment)
Definition macros.h:525
#define ARRAY_COUNT(arr)
Definition macros.h:40
s32 spr_load_npc_sprite(s32 animID, u32 *extraAnimList)
Definition sprite.c:1026
void(* fpInit)(struct MenuPanel *)

Referenced by state_step_pause().

◆ pause_tutorial_input()

void pause_tutorial_input ( s32 * pressed,
s32 * held )

Definition at line 666 of file pause_main.c.

666 {
667 s32 pressedOld = *pressed;
668 s32 pressedNew = *pressed;
669 s32 heldNew = *held;
670
671 switch (gPauseTutorialInputState) {
672 case 0:
673 heldNew = pressedNew = pressedNew & gPauseTutorialButtons[gPauseTutorialState];
674 if (pressedNew) {
676 }
677 if (pressedOld && pressedNew == 0) {
679 }
680 if (gPauseTutorialState == 0) {
681 pressedNew = 0;
682 heldNew = 0;
683 }
684 break;
685 case 1:
686 gPauseTutorialFrameCounter = 0;
688 pressedNew = 0;
689 heldNew = 0;
690 break;
691 case 2:
692 if (--gPauseTutorialFrameCounter <= 0) {
694 }
695 pressedNew = 0;
696 heldNew = 0;
697 break;
698 case 3:
699 gPauseTutorialFrameCounter = 16;
702 pressedNew = 0;
703 heldNew = 0;
704 break;
705 case 4:
706 if (--gPauseTutorialFrameCounter <= 0) {
708 }
709 pressedNew = 0;
710 heldNew = 0;
711 break;
712 }
713
714 *pressed = pressedNew;
715 *held = heldNew;
716}
@ SOUND_MENU_ERROR
Definition enums.h:933
s32 gPauseTutorialInputState
Definition pause_main.c:68
s32 gPauseTutorialButtons[]
Definition pause_main.c:69

Referenced by pause_handle_input().

◆ pause_handle_input()

void pause_handle_input ( s32 pressed,
s32 held )

Definition at line 718 of file pause_main.c.

718 {
719 s32 height;
720 s32 width;
721 s32 maxLineChars;
722 s32 numLines;
723 s32 i,j;
724 MenuPanel** menuPanels;
725 s32 currentDescMsg = gPauseCurrentDescMsg;
727
729 for (i = 0; i < ARRAY_COUNT(gPauseTutorialSprites); i++) {
730 spr_update_sprite(gPauseTutorialSprites[i], gPauseTutorialSpriteAnims[i][1], 1.0f);
731 }
732 }
733
734 gPausePressedButtons = pressed;
735 gPauseHeldButtons = held;
738 }
739
744 return;
745 }
746
747 if (gPauseCurrentDescIconScript != gPauseShownDescIconScript) {
748 gPauseShownDescIconScript = gPauseCurrentDescIconScript;
749 }
750
751 if (currentDescMsg != gPauseShownDescMsg) {
752 gPauseShownDescMsg = currentDescMsg;
753 gPauseDescTextPos = 0;
754 gPauseDescTextOffset = 0;
755 if (currentDescMsg != 0) {
756 get_msg_properties(currentDescMsg, &height, &width, &maxLineChars, &numLines, NULL, NULL, 0);
757 if (numLines % 2) {
758 numLines++;
759 }
760 gPauseDescTextMaxPos = numLines - 2;
761 if (gPauseDescTextMaxPos < 0) {
762 gPauseDescTextMaxPos = 0;
763 }
764 } else {
765 gPauseDescTextMaxPos = 0;
766 }
767 }
769 gPauseDescTextPos -= 2;
770 if (gPauseDescTextPos < 0) {
771 gPauseDescTextPos = 0;
772 }
773 }
775 gPauseDescTextPos += 2;
776 if (gPauseDescTextPos > gPauseDescTextMaxPos) {
777 gPauseDescTextPos = gPauseDescTextMaxPos;
778 }
779 }
780 gPauseDescTextOffset += pause_interp_text_scroll(gPauseDescTextPos * 16 - gPauseDescTextOffset);
781 if (currentPanel->initialized) {
782 if (currentPanel->fpHandleInput) {
783 currentPanel->fpHandleInput(currentPanel);
784 }
785 }
786 menuPanels = gPausePanels;
787 for (i = 0; i < ARRAY_COUNT(gPausePanels); menuPanels++, i++) {
788 if ((*menuPanels)->initialized) {
789 if ((*menuPanels)->fpUpdate) {
790 (*menuPanels)->fpUpdate(*menuPanels);
791 }
792 }
793 }
794}
@ BUTTON_C_UP
Definition enums.h:2780
@ BUTTON_START
Definition enums.h:2787
@ BUTTON_C_DOWN
Definition enums.h:2779
@ BUTTON_B
Definition enums.h:2789
@ SOUND_MENU_CLOSE
Definition enums.h:697
void enforce_hpfp_limits(void)
Definition inventory.c:457
void set_game_mode(s32 modeID)
Definition game_modes.c:127
@ GAME_MODE_UNPAUSE
Definition game_modes.h:18
BSS s32 gPausePressedButtons
Definition pause_main.c:24
BSS s32 gPauseHeldButtons
Definition pause_main.c:23
void pause_tutorial_input(s32 *pressed, s32 *held)
Definition pause_main.c:666
s32 spr_update_sprite(s32 spriteInstanceID, s32 animID, f32 timeScale)
Definition sprite.c:1072
void(* fpHandleInput)(struct MenuPanel *)
void(* fpUpdate)(struct MenuPanel *)

Referenced by state_step_pause().

◆ pause_cleanup()

void pause_cleanup ( void )

Definition at line 796 of file pause_main.c.

796 {
797 s32 i;
798 MenuPanel** menuPanels;
799
800 for (i = 0; i < ARRAY_COUNT(gPauseCommonIconIDs); i++) {
801 hud_element_free(gPauseCommonIconIDs[i]);
802 }
803
805 for (i = 0; i < ARRAY_COUNT(gPauseTutorialSprites); i++) {
806 spr_free_sprite(gPauseTutorialSprites[i]);
807 }
808 }
809
810 menuPanels = gPausePanels;
811 for (i = 0; i < ARRAY_COUNT(gPausePanels); menuPanels++, i++) {
812 if ((*menuPanels)->initialized) {
813 if ((*menuPanels)->fpCleanup) {
814 (*menuPanels)->fpCleanup(*menuPanels);
815 }
816 }
817 }
818
819 for (i = WIN_PAUSE_MAIN; i < WIN_PAUSE_CURSOR; i++)
821
823}
void hud_element_free(s32 id)
s32 spr_free_sprite(s32 spriteInstanceID)
Definition sprite.c:1178
void(* fpCleanup)(struct MenuPanel *)

Referenced by state_step_unpause().

◆ pause_get_total_equipped_bp_cost()

s32 pause_get_total_equipped_bp_cost ( void )

Definition at line 825 of file pause_main.c.

825 {
826 s32 totalCost = 0;
827 s32 i;
828
829 for (i = 0; i < ARRAY_COUNT(gPlayerData.equippedBadges); i++) {
830 s16 itemID = gPlayerData.equippedBadges[i];
831
832 if (itemID != ITEM_NONE) {
833 s32 moveID = gItemTable[itemID].moveID;
834
835 totalCost += gMoveTable[moveID].costBP;
836 }
837 }
838 return totalCost;
839}
s16 equippedBadges[64]
ItemData gItemTable[]
PlayerData gPlayerData
Definition 77480.c:40
MoveData gMoveTable[]

Referenced by pause_badges_draw_contents(), pause_badges_try_equip(), and pause_badges_try_remove().

◆ pause_draw_rect()

void pause_draw_rect ( s32 ulx,
s32 uly,
s32 lrx,
s32 lry,
s32 tileIdx,
s32 uls,
s32 ult,
s32 dsdx,
s32 dtdy )

Definition at line 841 of file pause_main.c.

841 {
842 if (ulx <= -2688 || uly <= -2688 || lrx <= 0 || lry <= 0) {
843 return;
844 }
845 if (ulx >= 1280 || uly >= 960 || lrx >= 2688 || lry >= 2688) {
846 return;
847 }
848 gSPScisTextureRectangle(gMainGfxPos++, ulx, uly, lrx, lry, tileIdx, uls, ult, dsdx, dtdy);
849}

Referenced by pause_badges_draw_bp_orbs(), pause_draw_menu_label(), pause_map_draw_border_arrows(), pause_map_draw_contents(), pause_partners_draw_contents(), pause_spirits_draw_contents(), and pause_tutorial_draw_contents().

◆ pause_sort_item_list()

void pause_sort_item_list ( s16 * arr,
s32 len,
s32(*)(s16 *, s16 *) compare )

Definition at line 851 of file pause_main.c.

851 {
852 if (len < 2) {
853 // Trivially sorted
854 return;
855 } else if (len == 2) {
856 // Trivial 2-element sort
857 if (compare(&arr[0], &arr[1]) > 0) {
858 s16 temp = arr[0];
859 arr[0] = arr[1];
860 arr[1] = temp;
861 }
862 } else {
863 // Nontrivial sort required, use shell sort
864 u32 gap = 1;
865 s16* end;
866
867 while (gap < len) {
868 gap = gap * 2 + 1;
869 }
870
871 end = &arr[len];
872 while ((gap /= 2) != 0) {
873 s16* window_end;
874
875 for (window_end = &arr[gap]; window_end < end; window_end++) {
876 s16* cur_elem = window_end - gap;
877
878 // This could be written simpler as a while loop, but the compiler figures out that it only needs to do
879 // the "cur_elem < end" check on the first iteration in that case
880 if (cur_elem >= arr && cur_elem < end) {
881 do {
882 s16* elem_a = cur_elem;
883 s16* elem_b = cur_elem + gap;
884
885 if (compare(elem_a, elem_b) > 0) {
886 s16 temp = *elem_a;
887 *elem_a = *elem_b;
888 *elem_b = temp;
889 cur_elem -= gap;
890 } else {
891 break;
892 }
893 } while (cur_elem >= arr && cur_elem < end);
894 }
895 }
896 }
897 }
898}

Referenced by pause_badges_count_all(), pause_badges_count_equipped(), and pause_items_load_items().

Variable Documentation

◆ gPausePanelTabs

MenuPanel gPausePanelTabs
extern

Definition at line 185 of file pause_tabs.c.

185 {
186 .initialized = FALSE,
187 .col = 0,
188 .row = 0,
189 .selected = 0,
190 .state = 0,
191 .numCols = 6,
192 .numRows = 1,
193 .numPages = 0,
194 .gridData = gPauseTabsGridData,
195 .fpInit = pause_tabs_init,
196 .fpHandleInput = pause_tabs_handle_input,
197 .fpUpdate = pause_tabs_update,
198 .fpCleanup = pause_tabs_cleanup
199};
s8 gPauseTabsGridData[]
Definition pause_tabs.c:70
void pause_tabs_cleanup(MenuPanel *tab)
Definition pause_tabs.c:459
void pause_tabs_handle_input(MenuPanel *tab)
Definition pause_tabs.c:336
void pause_tabs_update(MenuPanel *tab)
Definition pause_tabs.c:384
void pause_tabs_init(MenuPanel *tab)
Definition pause_tabs.c:312

◆ gPausePanelStats

MenuPanel gPausePanelStats
extern

Definition at line 149 of file pause_stats.c.

149 {
150 .initialized = FALSE,
151 .col = 0,
152 .row = 0,
153 .selected = 0,
154 .state = 0,
155 .numCols = 2,
156 .numRows = 7,
157 .numPages = 0,
158 .gridData = gPauseStatsGridData,
159 .fpInit = &pause_stats_init,
160 .fpHandleInput = &pause_stats_handle_input,
161 .fpUpdate = NULL,
162 .fpCleanup = &pause_stats_cleanup
163};
void pause_stats_cleanup(MenuPanel *panel)
void pause_stats_init(MenuPanel *panel)
void pause_stats_handle_input(MenuPanel *panel)
s8 gPauseStatsGridData[]
Definition pause_stats.c:80

◆ gPausePanelBadges

MenuPanel gPausePanelBadges
extern

Definition at line 113 of file pause_badges.c.

113 {
114 .initialized = FALSE,
115 .col = 0,
116 .row = 0,
117 .selected = 0,
118 .state = 0,
119 .numCols = 0,
120 .numRows = 0,
121 .numPages = 0,
122 .gridData = NULL,
123 .fpInit = &pause_badges_init,
124 .fpHandleInput = &pause_badges_handle_input,
125 .fpUpdate = &pause_badges_update,
126 .fpCleanup = &pause_badges_cleanup
127};
void pause_badges_init(MenuPanel *panel)
void pause_badges_handle_input(MenuPanel *panel)
void pause_badges_cleanup(MenuPanel *panel)
void pause_badges_update(MenuPanel *panel)

◆ gPausePanelItems

MenuPanel gPausePanelItems
extern

Definition at line 52 of file pause_items.c.

52 {
53 .initialized = FALSE,
54 .col = 0,
55 .row = 0,
56 .selected = 0,
57 .state = 0,
58 .numCols = 0,
59 .numRows = 0,
60 .numPages = 0,
61 .gridData = NULL,
62 .fpInit = &pause_items_init,
63 .fpHandleInput = &pause_items_handle_input,
64 .fpUpdate = &pause_items_update,
65 .fpCleanup = &pause_items_cleanup
66};
void pause_items_handle_input(MenuPanel *panel)
void pause_items_init(MenuPanel *panel)
void pause_items_cleanup(MenuPanel *panel)
void pause_items_update(MenuPanel *panel)

◆ gPausePanelPartners

MenuPanel gPausePanelPartners
extern

Definition at line 271 of file pause_partners.c.

271 {
272 .initialized = FALSE,
273 .col = 0,
274 .row = 1,
275 .selected = 0,
276 .state = 0,
277 .numCols = 4,
278 .numRows = 2,
279 .numPages = 0,
280 .gridData = gPausePartnersGridData,
281 .fpInit = &pause_partners_init,
282 .fpHandleInput = &pause_partners_handle_input,
283 .fpUpdate = &pause_partners_update,
284 .fpCleanup = &pause_partners_cleanup
285};
void pause_partners_init(MenuPanel *panel)
void pause_partners_cleanup(MenuPanel *panel)
s8 gPausePartnersGridData[]
void pause_partners_handle_input(MenuPanel *panel)
void pause_partners_update(MenuPanel *panel)

◆ gPausePanelSpirits

MenuPanel gPausePanelSpirits
extern

Definition at line 130 of file pause_spirits.c.

130 {
131 .initialized = FALSE,
132 .col = 2,
133 .row = 0,
134 .selected = 0,
135 .state = 0,
136 .numCols = 5,
137 .numRows = 2,
138 .numPages = 0,
139 .gridData = gPauseSpiritsGridData,
140 .fpInit = &pause_spirits_init,
141 .fpHandleInput = &pause_spirits_handle_input,
142 .fpUpdate = &pause_spirits_update,
143 .fpCleanup = &pause_spirits_cleanup
144};
void pause_spirits_init(MenuPanel *panel)
void pause_spirits_handle_input(MenuPanel *panel)
s8 gPauseSpiritsGridData[]
void pause_spirits_cleanup(MenuPanel *panel)
void pause_spirits_update(MenuPanel *panel)

◆ gPausePanelMap

MenuPanel gPausePanelMap
extern

Definition at line 76 of file pause_map.c.

76 {
77 .initialized = FALSE,
78 .col = 0,
79 .row = 0,
80 .selected = 0,
81 .state = 0,
82 .numCols = 0,
83 .numRows = 0,
84 .numPages = 0,
85 .gridData = NULL,
86 .fpInit = &pause_map_init,
87 .fpHandleInput = &pause_map_handle_input,
88 .fpUpdate = &pause_map_update,
89 .fpCleanup = &pause_map_cleanup
90};
void pause_map_update(MenuPanel *tab)
Definition pause_map.c:471
void pause_map_handle_input(MenuPanel *tab)
Definition pause_map.c:379
void pause_map_init(MenuPanel *tab)
Definition pause_map.c:322
void pause_map_cleanup(MenuPanel *tab)
Definition pause_map.c:501

◆ gPauseHeldButtons

◆ gPausePressedButtons

◆ gPauseCurrentDescMsg

◆ gPauseCurrentDescIconScript

◆ gPauseCursorIconID

BSS s32 gPauseCursorIconID

Definition at line 27 of file pause_main.c.

Referenced by pause_init().

◆ gPauseMenuCurrentTab

◆ D_802700D

BSS s8 D_802700D[7]

Definition at line 29 of file pause_main.c.

◆ gPausePanels

MenuPanel* gPausePanels[]
Initial value:
= {
}
MenuPanel gPausePanelSpirits
MenuPanel gPausePanelMap
Definition pause_map.c:76
MenuPanel gPausePanelTabs
Definition pause_tabs.c:185
MenuPanel gPausePanelStats
MenuPanel gPausePanelItems
Definition pause_items.c:52
MenuPanel gPausePanelPartners
MenuPanel gPausePanelBadges

Definition at line 47 of file pause_main.c.

Referenced by pause_cleanup(), pause_handle_input(), pause_init(), pause_tabs_handle_input(), and pause_tabs_update().

◆ gPauseCursorPosX

s32 gPauseCursorPosX = 160

◆ gPauseCursorPosY

s32 gPauseCursorPosY = -120

◆ gPauseCursorOpacity

s32 gPauseCursorOpacity = 0

Definition at line 53 of file pause_main.c.

Referenced by pause_draw_cursor(), and pause_interp_cursor().

◆ gPauseCursorTargetPosX

s32 gPauseCursorTargetPosX = 160

◆ gPauseCursorTargetPosY

s32 gPauseCursorTargetPosY = -120

◆ gPauseCursorTargetOpacity

s32 gPauseCursorTargetOpacity = 0

Definition at line 56 of file pause_main.c.

Referenced by pause_interp_cursor(), and pause_set_cursor_opacity().

◆ D_8024EFB4

u32 D_8024EFB4 = 1

Definition at line 57 of file pause_main.c.

Referenced by pause_set_cursor_pos(), and pause_set_cursor_pos_immediate().

◆ D_8024EFB8

s16 D_8024EFB8[] = { -10, -25, -42, -60, -80 }

Definition at line 58 of file pause_main.c.

58{ -10, -25, -42, -60, -80 }; //unused

◆ gPauseWindowFlipUpFlags

◆ gPauseWindowFlipUpAngles

s16 gPauseWindowFlipUpAngles[] = { -80, -65, -38, -30, -10, 0 }

Definition at line 60 of file pause_main.c.

60{ -80, -65, -38, -30, -10, 0 };

Referenced by pause_update_page_active_2().

◆ gPauseWindowFlipUpAngles_2

s16 gPauseWindowFlipUpAngles_2[] = { 80, 65, 38, 30, 10, 0 }

Definition at line 61 of file pause_main.c.

61{ 80, 65, 38, 30, 10, 0 };

Referenced by pause_update_page_active_1().

◆ gPauseWindowFlipDownFlags

◆ D_8024EFEC

u8 D_8024EFEC[]
Initial value:
= { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x11, 0x00, 0x25, 0x00, 0x3C,
0x00, 0x55, 0x00, 0x6E }

Definition at line 63 of file pause_main.c.

63 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x11, 0x00, 0x25, 0x00, 0x3C,
64 0x00, 0x55, 0x00, 0x6E }; //unused

◆ gPauseWindowFlipDownAngles

s16 gPauseWindowFlipDownAngles[] = { -10, -25, -42, -60, -80}

Definition at line 65 of file pause_main.c.

65{ -10, -25, -42, -60, -80};

Referenced by pause_update_page_inactive_1().

◆ gPauseWindowFlipDownAngles_2

s16 gPauseWindowFlipDownAngles_2[] = { 10, 25, 42, 60, 80 }

Definition at line 66 of file pause_main.c.

66{ 10, 25, 42, 60, 80 };

Referenced by pause_update_page_inactive_2().

◆ gPauseTutorialState

s32 gPauseTutorialState = -1

Definition at line 67 of file pause_main.c.

Referenced by pause_tutorial_draw_contents(), and pause_tutorial_input().

◆ gPauseTutorialInputState

s32 gPauseTutorialInputState = 3

Definition at line 68 of file pause_main.c.

Referenced by pause_tutorial_input().

◆ gPauseTutorialButtons

s32 gPauseTutorialButtons[] = { BUTTON_A, BUTTON_STICK_RIGHT, BUTTON_A, BUTTON_A, BUTTON_A, BUTTON_A, BUTTON_START }

Definition at line 69 of file pause_main.c.

Referenced by pause_tutorial_input().

◆ gPauseTutorialDescMessages

s32 gPauseTutorialDescMessages[]

◆ gPauseTutorialCmdMessages

s32 gPauseTutorialCmdMessages[]

◆ D_8024F074

◆ gPauseTutorialIconIDs

s32 gPauseTutorialIconIDs[] = { 5, 4, 5, 5, 5, 5, 6 }

Definition at line 102 of file pause_main.c.

102{ 5, 4, 5, 5, 5, 5, 6 };

Referenced by pause_tutorial_draw_contents().

◆ gPauseMenuTextScrollInterpEasingLUT

u8 gPauseMenuTextScrollInterpEasingLUT[] = { 0, 1, 2, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8}

Definition at line 103 of file pause_main.c.

103{ 0, 1, 2, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8};

Referenced by pause_interp_text_scroll().

◆ gPauseMenuPageScrollInterpEasingLUT

u8 gPauseMenuPageScrollInterpEasingLUT[] = { 0, 1, 2, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8}

Definition at line 104 of file pause_main.c.

104{ 0, 1, 2, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8};

Referenced by pause_interp_vertical_scroll().

◆ gPauseTutorialSpriteAnims

s32 gPauseTutorialSpriteAnims[][4]
Initial value:
= {
{
ANIM_Goombaria_Still,
ANIM_Goombaria_Idle,
ANIM_Goombaria_Talk,
},
{
ANIM_WorldGoombario_Still,
ANIM_WorldGoombario_Idle,
ANIM_WorldGoombario_Talk,
},
{
ANIM_Goompa_Still,
ANIM_Goompa_Idle,
ANIM_Goompa_Talk,
}
}
#define ANIM_LIST_END
Terminates an extraAnimationList.
Definition types.h:22

Definition at line 106 of file pause_main.c.

106 {
107 {
108 ANIM_Goombaria_Still,
109 ANIM_Goombaria_Idle,
110 ANIM_Goombaria_Talk,
112 },
113 {
114 ANIM_WorldGoombario_Still,
115 ANIM_WorldGoombario_Idle,
116 ANIM_WorldGoombario_Talk,
118 },
119 {
120 ANIM_Goompa_Still,
121 ANIM_Goompa_Idle,
122 ANIM_Goompa_Talk,
124 }
125};

Referenced by pause_handle_input(), and pause_init().

◆ gPauseTutorialViewport

Vp gPauseTutorialViewport
Initial value:
= {
.vp = {
.vscale = { 640, 480, 511, 0 },
.vtrans = { 640, 480, 511, 0 },
}
}

Definition at line 126 of file pause_main.c.

126 {
127 .vp = {
128 .vscale = { 640, 480, 511, 0 },
129 .vtrans = { 640, 480, 511, 0 },
130 }
131};

Referenced by pause_tutorial_draw_contents().

◆ gPauseTutorialScrollPos

s32 gPauseTutorialScrollPos = 0

Definition at line 132 of file pause_main.c.

Referenced by pause_tutorial_draw_contents().

◆ gPauseCommonWindowsBPs

MenuWindowBP gPauseCommonWindowsBPs[]

Definition at line 133 of file pause_main.c.

133 {
134 {
135 .windowID = WIN_PAUSE_MAIN,
136 .unk_01 = 0,
137 .pos = { .x = 12, .y = 20 },
138 .width = 296,
139 .height = 200,
140 .priority = 0,
141 .fpDrawContents = &pause_main_draw_contents,
142 .tab = NULL,
143 .parentID = WIN_NONE,
144 .fpUpdate = { WINDOW_UPDATE_SHOW },
145 .extraFlags = WINDOW_FLAG_40,
146 .style = { .customStyle = &gPauseWS_0 }
147 },
148 {
149 .windowID = WIN_PAUSE_TUTORIAL,
150 .unk_01 = 0,
151 .pos = { .x = 0, .y = 138 },
152 .width = 296,
153 .height = 63,
154 .priority = 0,
155 .fpDrawContents = &pause_tutorial_draw_contents,
156 .tab = NULL,
157 .parentID = WIN_PAUSE_MAIN,
158 .fpUpdate = { WINDOW_UPDATE_HIDE },
159 .extraFlags = 0,
160 .style = { .customStyle = &gPauseWS_2 }
161 },
162 {
163 .windowID = WIN_PAUSE_DECRIPTION,
164 .unk_01 = 0,
165 .pos = { .x = 20, .y = 164 },
166 .width = 256,
167 .height = 32,
168 .priority = 0,
169 .fpDrawContents = &pause_textbox_draw_contents,
170 .tab = NULL,
171 .parentID = WIN_PAUSE_MAIN,
172 .fpUpdate = { .func = &basic_window_update },
173 .extraFlags = 0,
174 .style = { .customStyle = &gPauseWS_1 }
175 },
176 {
177 .windowID = WIN_PAUSE_CURSOR,
178 .unk_01 = 0,
179 .pos = { .x = 0, .y = 0 },
180 .width = SCREEN_WIDTH,
181 .height = SCREEN_HEIGHT,
182 .priority = 0,
183 .fpDrawContents = &pause_draw_cursor,
184 .tab = NULL,
185 .parentID = WIN_NONE,
186 .fpUpdate = { WINDOW_UPDATE_SHOW },
187 .extraFlags = 0,
188 .style = { .customStyle = &gPauseWS_0 }
189 }
190};
@ WINDOW_FLAG_40
Definition enums.h:4999
@ WIN_PAUSE_DECRIPTION
Definition enums.h:5264
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
WindowStyleCustom gPauseWS_2
WindowStyleCustom gPauseWS_0
WindowStyleCustom gPauseWS_1
void pause_tutorial_draw_contents(MenuPanel *menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
Definition pause_main.c:517
void pause_main_draw_contents(MenuPanel *menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
Definition pause_main.c:483
void pause_draw_cursor(MenuPanel *menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
Definition pause_main.c:468
void pause_textbox_draw_contents(MenuPanel *menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
Definition pause_main.c:486

Referenced by pause_init().