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 HudElemID gPauseCursorHID
 
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 513 of file pause_main.c.

513 {
516 f32 (*matrix2ptr)[4];
517 s32 msgHeight;
518 s32 msgWidth;
527 s32 i;
529 s32 state;
530
531 if (evt_get_variable(nullptr, GF_Tutorial_Badges) == false) {
532 return;
533 }
534
538 gDPSetPrimColor(gMainGfxPos++, 0, 0, 55, 55, 55, 255);
539 pause_draw_rect(baseX * 4, baseY * 4, (baseX + width) * 4, (baseY + 12) * 4, 0, 0, 0, 0, 0);
541 gDPSetPrimColor(gMainGfxPos++, 0, 0, 185, 185, 185, 255);
542 pause_draw_rect(baseX * 4, (baseY + 12) * 4, (baseX + width) * 4, (baseY + height) * 4, 0, 0, 0, 0, 0);
545 guOrthoF(matrix1, 0.0f, 320.0f, 240.0f, 0.0f, -100.0f, 100.0f, 1.0f);
548
549 for (i = 0; i < 3; i++) {
550 //needed to match
552 switch (i) {
553 case 0:
554 guTranslateF(matrix1, 40.0f, 223.0f, 0);
555 guScaleF(matrix2ptr, -0.8f, 0.8f, 1.0f);
556 break;
557 case 1:
558 guTranslateF(matrix1, 60.0f, 223.0f, 0);
559 guScaleF(matrix2ptr, -0.8f, 0.8f, 1.0f);
560 break;
561 default:
562 guTranslateF(matrix1, 280.0f, 223.0f, 0);
563 guScaleF(matrix2ptr, 0.8f, 0.8f, 1.0f);
564 break;
565 }
566
568 guRotateF(matrix2ptr, 180.0f, 0.0f, 0.0f, 1.0f);
570 guRotateF(matrix2ptr, 180.0f, 0.0f, 1.0f, 0.0f);
574 set_npc_imgfx_all(gPauseTutorialSprites[i], IMGFX_SET_COLOR, 255, 255, 255, 255, 64);
575 spr_draw_npc_sprite(gPauseTutorialSprites[i], 0, 0, 0, matrix1);
577 }
578
580 margin = (s32)(width - msgWidth) >> 1;
583 gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, baseX + 1, baseY + 1, baseX + width - 1, baseY + height - 1);
584 state = gPauseTutorialState;
586 margin2 = (s32)(width - msgWidth2) >> 1;
588 hud_element_set_render_pos(gPauseCommonHIDs[gPauseTutorialIconIDs[gPauseTutorialState]], baseX + width / 2 - 2, baseY + 52);
592
594 hud_element_set_render_pos(gPauseCommonHIDs[7], baseX + width / 2 + 1, baseY + 50);
595 hud_element_draw_without_clipping(gPauseCommonHIDs[7]);
596 }
597
599}
BSS s32 PopupMenu_SelectedIndex
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:4970
@ IMGFX_SET_COLOR
Definition enums.h:4708
@ MSG_PAL_WHITE
Definition enums.h:4990
@ MSG_PAL_STANDARD
Definition enums.h:5000
s32 evt_get_variable(Evt *script, Bytecode var)
Definition evt.c:1730
void get_msg_properties(s32 msgID, s32 *height, s32 *width, s32 *maxLineChars, s32 *numLines, s32 *maxLinesPerPage, s32 *arg6, u16 charset)
Definition msg.c:1673
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:86
s32 pause_get_menu_msg(s32 index)
Definition pause_gfx.c:583
@ PAUSE_MSG_TUT_NAME_BADGES
s32 gPauseTutorialScrollPos
Definition pause_main.c:129
s32 gPauseTutorialState
Definition pause_main.c:64
s32 gPauseTutorialDescMessages[]
Definition pause_main.c:68
s32 gPauseTutorialCmdMessages[]
Definition pause_main.c:78
s32 pause_interp_text_scroll(s32 deltaBefore)
Definition pause_main.c:433
Vp gPauseTutorialViewport
Definition pause_main.c:123
s32 gPauseTutorialIconIDs[]
Definition pause_main.c:99
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:837
@ GF_Tutorial_Badges
void set_npc_imgfx_all(s32 spriteIdx, ImgFXType imgfxType, s32 imgfxArg1, s32 imgfxArg2, s32 imgfxArg3, s32 imgfxArg4, s32 imgfxArg5)
Definition sprite.c:1238
s32 spr_draw_npc_sprite(s32 spriteInstanceID, s32 yaw, s32 alphaIn, PAL_PTR *paletteList, Matrix4f mtx)
Definition sprite.c:1094
Gfx * gMainGfxPos
Definition cam_main.c:14
u16 gMatrixListPos
Definition main_loop.c:44
DisplayContext * gDisplayContext
Definition cam_main.c:15

◆ 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 479 of file pause_main.c.

479 {
480}

◆ 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 482 of file pause_main.c.

482 {
483 s32 msgID = gPauseShownDescMsg;
484
485 if (msgID == MSG_NONE) {
486 return;
487 }
488
489 if (gPauseDescTextPos != 0) {
490 hud_element_set_render_pos(gPauseCommonHIDs[1], baseX + width - 4, baseY + 4);
491 hud_element_draw_without_clipping(gPauseCommonHIDs[1]);
492 }
493
494 if (gPauseDescTextPos < gPauseDescTextMaxPos) {
495 hud_element_set_render_pos(gPauseCommonHIDs[2], baseX + width - 4, baseY + height - 4);
496 hud_element_draw_without_clipping(gPauseCommonHIDs[2]);
497 }
498
500 gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, baseX + 1, baseY + 1, baseX + width - 1, baseY + height - 1);
501 draw_msg(msgID, baseX + 10, baseY - gPauseDescTextOffset, 255, MSG_PAL_STANDARD, 0);
502 if (gPauseShownDescIconScript != 0) {
504 hud_element_set_render_pos(gPauseCommonHIDs[3], baseX - 4, baseY + 16);
505 hud_element_set_script(gPauseCommonHIDs[3], gPauseShownDescIconScript);
508 hud_element_set_scale(gPauseCommonHIDs[3], 1.0f);
509 hud_element_draw_without_clipping(gPauseCommonHIDs[3]);
510 }
511}
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
Definition hud_element.h:97
#define SCREEN_WIDTH
Definition macros.h:108
#define SCREEN_HEIGHT
Definition macros.h:109

◆ pause_draw_cursor()

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

Definition at line 464 of file pause_main.c.

464 {
466
469 if (currentOpacity > 0) {
470 if (currentOpacity > 255) {
471 currentOpacity = 255;
472 }
473 hud_element_set_alpha(gPauseCommonHIDs[0], currentOpacity);
475 hud_element_draw_without_clipping(gPauseCommonHIDs[0]);
476 }
477}
void hud_element_set_alpha(s32 id, s32 opacity)
s32 gPauseCursorOpacity
Definition pause_main.c:50
s32 gPauseCursorPosX
Definition pause_main.c:48
s32 gPauseCursorPosY
Definition pause_main.c:49
void pause_interp_cursor(void)
Definition pause_main.c:254

◆ pause_set_cursor_opacity()

void pause_set_cursor_opacity ( s32 val)

Definition at line 189 of file pause_main.c.

189 {
191}
s32 gPauseCursorTargetOpacity
Definition pause_main.c:53

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 193 of file pause_main.c.

193 {
194 Window* window = &gWindows[windowID];
195
197 if (D_8024EFB4 != 0) {
198 s32 i;
199
200 for (i = WIN_PAUSE_MAIN; i < WIN_PAUSE_CURSOR; i++) {
201 Window* window = &gWindows[i];
202 s8 parent = window->parent;
203
204 if ((parent == WIN_NONE || parent == WIN_PAUSE_MAIN) && (window->flags & WINDOW_FLAG_INITIAL_ANIMATION)) {
205 break;
206 }
207 }
208 if (i >= WIN_PAUSE_CURSOR) {
209 D_8024EFB4 = 0;
210 }
211 }
213 gPauseCursorPosX = posX;
215 gPauseCursorPosY = posY;
216
217 } else if ((window->flags & WINDOW_FLAG_INITIAL_ANIMATION) == 0 && (window->parent == WIN_NONE || !(gWindows[window->parent].flags & WINDOW_FLAG_INITIAL_ANIMATION))) {
219 gPauseCursorPosX = posX;
221 gPauseCursorPosY = posY;
222 }
223}
@ WINDOW_FLAG_INITIAL_ANIMATION
Definition enums.h:4581
@ WIN_PAUSE_CURSOR
Definition enums.h:4872
@ WIN_PAUSE_MAIN
Definition enums.h:4848
@ WIN_NONE
Definition enums.h:4825
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:51
s32 gPauseCursorTargetPosY
Definition pause_main.c:52
u32 D_8024EFB4
Definition pause_main.c:54
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 )

◆ pause_interp_cursor()

void pause_interp_cursor ( void )

Definition at line 254 of file pause_main.c.

254 {
255 s32 xDelta;
256 s32 yDelta;
257
260
262 if ((xDelta == 0) && (yDelta == 0)) {
265 }
266 }
267
270
271 if (gPauseCursorTargetOpacity == 0) {
272 gPauseCursorOpacity -= 128;
273 if (gPauseCursorOpacity < 0) {
275 }
276 } else {
278 if (gPauseCursorOpacity> 255) {
280 }
281 }
283}

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 285 of file pause_main.c.

286 {
288
289 *darkening = 160;
291}
@ WINDOW_FLAG_HIDDEN
Updated but not rendered.
Definition enums.h:4580

◆ 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 293 of file pause_main.c.

294 {
296
297 *darkening = 160;
298 *opacity = 80;
300}

◆ 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 302 of file pause_main.c.

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

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 323 of file pause_main.c.

324 {
326
327 if (window->updateCounter == 0) {
328 update_window_hierarchy(windowIndex, window->originalPriority);
329 *darkening = 0;
331 }
332}

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 334 of file pause_main.c.

335 {
337 s32 updateCounter = window->updateCounter;
338
339 if (updateCounter == 0) {
340 window->flags &= ~WINDOW_FLAG_HIDDEN;
341 }
342
343 if (updateCounter < 16) {
344 *opacity = updateCounter * 16;
345 } else {
346 *opacity = 255;
348 }
349}

◆ 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 351 of file pause_main.c.

352 {
354 s32 updateCounter = window->updateCounter;
355
356 if (updateCounter < 16) {
357 *opacity = 255 - (updateCounter * 16);
358 } else {
359 *opacity = 0;
361 window->flags |= WINDOW_FLAG_HIDDEN;
362 }
363}

◆ 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 365 of file pause_main.c.

366 {
368 s32 updateCounter = window->updateCounter;
369
370 if (updateCounter == 0) {
371 window->flags &= ~WINDOW_FLAG_HIDDEN;
372 }
373 if (updateCounter < 7) {
374 *flags = gPauseWindowFlipUpFlags[updateCounter];
375 *rotX += gPauseWindowFlipUpAngles[updateCounter];
376 } else {
378 *rotX += gPauseWindowFlipUpAngles[6];
380 }
381}
s8 flags
Definition demo_api.c:15
u8 gPauseWindowFlipUpFlags[]
Definition pause_main.c:56
s16 gPauseWindowFlipUpAngles[]
Definition pause_main.c:57

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 383 of file pause_main.c.

384 {
386 s32 updateCounter = window->updateCounter;
387
388 if (updateCounter == 0) {
389 window->flags &= ~WINDOW_FLAG_HIDDEN;
390 }
391 if (updateCounter < 7) {
392 *flags = gPauseWindowFlipUpFlags[updateCounter];
393 *rotX += gPauseWindowFlipUpAngles_2[updateCounter];
394 } else {
396 *rotX += gPauseWindowFlipUpAngles_2[6];
398 }
399}
s16 gPauseWindowFlipUpAngles_2[]
Definition pause_main.c:58

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 401 of file pause_main.c.

402 {
404 s32 updateCounter = window->updateCounter;
405
406 if (updateCounter < 5) {
407 *flags = gPauseWindowFlipDownFlags[updateCounter];
408 *rotX += gPauseWindowFlipDownAngles[updateCounter];
409 } else {
411 *rotX += gPauseWindowFlipDownAngles[4];
413 window->flags |= WINDOW_FLAG_HIDDEN;
414 }
415}
s16 gPauseWindowFlipDownAngles[]
Definition pause_main.c:62
u8 gPauseWindowFlipDownFlags[]
Definition pause_main.c:59

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 417 of file pause_main.c.

418 {
420 s32 updateCounter = window->updateCounter;
421
422 if (updateCounter < 5) {
423 *flags = gPauseWindowFlipDownFlags[updateCounter];
424 *rotX = gPauseWindowFlipDownAngles_2[updateCounter];
425 } else {
429 window->flags |= WINDOW_FLAG_HIDDEN;
430 }
431}
s16 gPauseWindowFlipDownAngles_2[]
Definition pause_main.c:63

Referenced by pause_tabs_update().

◆ pause_interp_text_scroll()

s32 pause_interp_text_scroll ( s32 deltaBefore)

Definition at line 433 of file pause_main.c.

433 {
434 s32 val;
436 s32 s = sign(deltaBefore);
437
438 if (db >= 16) {
439 val = 8;
440 } else {
442 }
443
444 return val * s;
445}
s32 sign(s32 value)
Definition 43F0.c:374
u8 gPauseMenuTextScrollInterpEasingLUT[]
Definition pause_main.c:100

Referenced by pause_handle_input(), and pause_tutorial_draw_contents().

◆ pause_interp_vertical_scroll()

s32 pause_interp_vertical_scroll ( s32 deltaBefore)

Definition at line 447 of file pause_main.c.

447 {
448 s32 val;
450 s32 s = sign(deltaBefore);
451
452 if (db >= 16) {
453 val = db / 2;
454 if (val > 20) {
455 val = 20;
456 }
457 } else {
459 }
460
461 return val * s;
462}
u8 gPauseMenuPageScrollInterpEasingLUT[]
Definition pause_main.c:101

Referenced by pause_badges_update(), and pause_items_update().

◆ pause_init()

void pause_init ( void )

Definition at line 601 of file pause_main.c.

601 {
602 s32 posX;
603 s32 x;
606 s32 i;
607
609
610 for (i = 0; i < ARRAY_COUNT(gPauseHudScripts); i++) {
611 gPauseCommonHIDs[i] = hud_element_create(gPauseHudScripts[i]);
612 if (gPauseHudScripts[i] == &HES_AnimatedCursorHand) {
614 } else {
616 }
617 }
618
619 gPauseCursorHID = gPauseCommonHIDs[0];
621 gPauseShownDescMsg = 0;
622 gPauseDescTextPos = 0;
623 gPauseDescTextOffset = 0;
624 gPauseDescTextMaxPos = 0;
625 gPauseShownDescIconScript = 0;
629
631 for (i = 0; i < ARRAY_COUNT(gPausePanels); menuPanels++, i++) {
632 if ((*menuPanels)->fpInit) {
633 (*menuPanels)->fpInit(*menuPanels);
634 }
635 }
636
637 posX = 225;
638 for (i = 6; i > 0; i--) {
639 if (!gPausePanels[i]->initialized) {
641 } else {
642 gWindows[WIN_PAUSE_TUTORIAL + i].pos.x = posX + 14;
643 posX -= 45;
644 }
645 }
649
650 if (evt_get_variable(nullptr, GF_Tutorial_Badges)) {
651 for (i = 0; i < ARRAY_COUNT(gPauseTutorialSpriteAnims); i++) {
652 gPauseTutorialSprites[i] = spr_load_npc_sprite(gPauseTutorialSpriteAnims[i][0], gPauseTutorialSpriteAnims[i]);
653 }
654
657 }
658
660}
@ WINDOW_UPDATE_SHOW
Definition enums.h:4896
@ WINDOW_UPDATE_HIDE
Definition enums.h:4897
@ SOUND_MENU_SHOW_CHOICE
Definition enums.h:557
@ WIN_PAUSE_TAB_INVIS
Definition enums.h:4871
@ WIN_PAUSE_TAB_STATS
Definition enums.h:4853
@ WIN_PAUSE_TUTORIAL
Definition enums.h:4851
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
HudElemID hud_element_create(HudScript *anim)
Creates a new HUD element and returns its ID.
@ HUD_ELEMENT_FLAG_MANUAL_RENDER
Definition hud_element.h:78
BSS s8 gPauseMenuCurrentTab
Definition pause_main.c:28
s32 gPauseTutorialSpriteAnims[][4]
Definition pause_main.c:103
BSS HudElemID gPauseCursorHID
Definition pause_main.c:27
BSS HudScript * gPauseCurrentDescIconScript
Definition pause_main.c:26
MenuPanel * gPausePanels[]
Definition pause_main.c:44
BSS s32 gPauseCurrentDescMsg
Definition pause_main.c:25
MenuWindowBP gPauseCommonWindowsBPs[]
Definition pause_main.c:130
void sfx_play_sound(s32 soundID)
#define DMA_COPY_SEGMENT(segment)
Definition macros.h:537
#define ARRAY_COUNT(arr)
Definition macros.h:39
s32 spr_load_npc_sprite(s32 animID, u32 *extraAnimList)
Definition sprite.c:1015
void(* fpInit)(struct MenuPanel *)

Referenced by state_step_pause().

◆ pause_tutorial_input()

void pause_tutorial_input ( s32 * pressed,
s32 * held )

Definition at line 662 of file pause_main.c.

662 {
665 s32 heldNew = *held;
666
667 switch (gPauseTutorialInputState) {
668 case 0:
670 if (pressedNew) {
672 }
673 if (pressedOld && pressedNew == 0) {
675 }
676 if (gPauseTutorialState == 0) {
677 pressedNew = 0;
678 heldNew = 0;
679 }
680 break;
681 case 1:
682 gPauseTutorialFrameCounter = 0;
684 pressedNew = 0;
685 heldNew = 0;
686 break;
687 case 2:
688 if (--gPauseTutorialFrameCounter <= 0) {
690 }
691 pressedNew = 0;
692 heldNew = 0;
693 break;
694 case 3:
695 gPauseTutorialFrameCounter = 16;
698 pressedNew = 0;
699 heldNew = 0;
700 break;
701 case 4:
702 if (--gPauseTutorialFrameCounter <= 0) {
704 }
705 pressedNew = 0;
706 heldNew = 0;
707 break;
708 }
709
711 *held = heldNew;
712}
@ SOUND_MENU_ERROR
Definition enums.h:936
s32 gPauseTutorialInputState
Definition pause_main.c:65
s32 gPauseTutorialButtons[]
Definition pause_main.c:66

Referenced by pause_handle_input().

◆ pause_handle_input()

void pause_handle_input ( s32 pressed,
s32 held )

Definition at line 714 of file pause_main.c.

714 {
715 s32 height;
716 s32 width;
717 s32 maxLineChars;
718 s32 numLines;
719 s32 i;
723
724 if (evt_get_variable(nullptr, GF_Tutorial_Badges)) {
725 for (i = 0; i < ARRAY_COUNT(gPauseTutorialSprites); i++) {
726 spr_update_sprite(gPauseTutorialSprites[i], gPauseTutorialSpriteAnims[i][1], 1.0f);
727 }
728 }
729
732 if (evt_get_variable(nullptr, GF_Tutorial_Badges)) {
734 }
735
740 return;
741 }
742
743 if (gPauseCurrentDescIconScript != gPauseShownDescIconScript) {
744 gPauseShownDescIconScript = gPauseCurrentDescIconScript;
745 }
746
747 if (currentDescMsg != gPauseShownDescMsg) {
748 gPauseShownDescMsg = currentDescMsg;
749 gPauseDescTextPos = 0;
750 gPauseDescTextOffset = 0;
751 if (currentDescMsg != 0) {
752 get_msg_properties(currentDescMsg, &height, &width, &maxLineChars, &numLines, nullptr, nullptr, 0);
753 if (numLines % 2) {
754 numLines++;
755 }
756 gPauseDescTextMaxPos = numLines - 2;
757 if (gPauseDescTextMaxPos < 0) {
758 gPauseDescTextMaxPos = 0;
759 }
760 } else {
761 gPauseDescTextMaxPos = 0;
762 }
763 }
765 gPauseDescTextPos -= 2;
766 if (gPauseDescTextPos < 0) {
767 gPauseDescTextPos = 0;
768 }
769 }
771 gPauseDescTextPos += 2;
772 if (gPauseDescTextPos > gPauseDescTextMaxPos) {
773 gPauseDescTextPos = gPauseDescTextMaxPos;
774 }
775 }
776 gPauseDescTextOffset += pause_interp_text_scroll(gPauseDescTextPos * 16 - gPauseDescTextOffset);
777 if (currentPanel->initialized) {
778 if (currentPanel->fpHandleInput) {
779 currentPanel->fpHandleInput(currentPanel);
780 }
781 }
783 for (i = 0; i < ARRAY_COUNT(gPausePanels); menuPanels++, i++) {
784 if ((*menuPanels)->initialized) {
785 if ((*menuPanels)->fpUpdate) {
786 (*menuPanels)->fpUpdate(*menuPanels);
787 }
788 }
789 }
790}
@ BUTTON_C_UP
Definition enums.h:2766
@ BUTTON_START
Definition enums.h:2773
@ BUTTON_C_DOWN
Definition enums.h:2765
@ BUTTON_B
Definition enums.h:2775
@ SOUND_MENU_CLOSE
Definition enums.h:700
void enforce_hpfp_limits(void)
Definition inventory.c:462
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:662
s32 spr_update_sprite(s32 spriteInstanceID, s32 animID, f32 timeScale)
Definition sprite.c:1061
void(* fpUpdate)(struct MenuPanel *)

Referenced by state_step_pause().

◆ pause_cleanup()

void pause_cleanup ( void )

Definition at line 792 of file pause_main.c.

792 {
793 s32 i;
795
796 for (i = 0; i < ARRAY_COUNT(gPauseCommonHIDs); i++) {
797 hud_element_free(gPauseCommonHIDs[i]);
798 }
799
800 if (evt_get_variable(nullptr, GF_Tutorial_Badges)) {
801 for (i = 0; i < ARRAY_COUNT(gPauseTutorialSprites); i++) {
802 spr_free_sprite(gPauseTutorialSprites[i]);
803 }
804 }
805
807 for (i = 0; i < ARRAY_COUNT(gPausePanels); menuPanels++, i++) {
808 if ((*menuPanels)->initialized) {
809 if ((*menuPanels)->fpCleanup) {
810 (*menuPanels)->fpCleanup(*menuPanels);
811 }
812 }
813 }
814
815 for (i = WIN_PAUSE_MAIN; i < WIN_PAUSE_CURSOR; i++)
817
819}
void hud_element_free(s32 id)
s32 spr_free_sprite(s32 spriteInstanceID)
Definition sprite.c:1162
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 821 of file pause_main.c.

821 {
822 s32 totalCost = 0;
823 s32 i;
824
825 for (i = 0; i < ARRAY_COUNT(gPlayerData.equippedBadges); i++) {
826 s16 itemID = gPlayerData.equippedBadges[i];
827
828 if (itemID != ITEM_NONE) {
829 s32 moveID = gItemTable[itemID].moveID;
830
831 totalCost += gMoveTable[moveID].costBP;
832 }
833 }
834 return totalCost;
835}
s16 equippedBadges[64]
ItemData gItemTable[]
PlayerData gPlayerData
Definition 77480.c:39
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 837 of file pause_main.c.

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

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 847 of file pause_main.c.

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

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:453
void pause_tabs_handle_input(MenuPanel *tab)
Definition pause_tabs.c:331
void pause_tabs_update(MenuPanel *tab)
Definition pause_tabs.c:379
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 = nullptr,
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 111 of file pause_badges.c.

111 {
112 .initialized = false,
113 .col = 0,
114 .row = 0,
115 .selected = 0,
116 .state = 0,
117 .numCols = 0,
118 .numRows = 0,
119 .numPages = 0,
120 .gridData = nullptr,
121 .fpInit = &pause_badges_init,
122 .fpHandleInput = &pause_badges_handle_input,
123 .fpUpdate = &pause_badges_update,
124 .fpCleanup = &pause_badges_cleanup
125};
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 51 of file pause_items.c.

51 {
52 .initialized = false,
53 .col = 0,
54 .row = 0,
55 .selected = 0,
56 .state = 0,
57 .numCols = 0,
58 .numRows = 0,
59 .numPages = 0,
60 .gridData = nullptr,
61 .fpInit = &pause_items_init,
62 .fpHandleInput = &pause_items_handle_input,
63 .fpUpdate = &pause_items_update,
64 .fpCleanup = &pause_items_cleanup
65};
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 129 of file pause_spirits.c.

129 {
130 .initialized = false,
131 .col = 2,
132 .row = 0,
133 .selected = 0,
134 .state = 0,
135 .numCols = 5,
136 .numRows = 2,
137 .numPages = 0,
138 .gridData = gPauseSpiritsGridData,
139 .fpInit = &pause_spirits_init,
140 .fpHandleInput = &pause_spirits_handle_input,
141 .fpUpdate = &pause_spirits_update,
142 .fpCleanup = &pause_spirits_cleanup
143};
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 = nullptr,
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:469
void pause_map_handle_input(MenuPanel *tab)
Definition pause_map.c:377
void pause_map_init(MenuPanel *tab)
Definition pause_map.c:320
void pause_map_cleanup(MenuPanel *tab)
Definition pause_map.c:499

◆ gPauseHeldButtons

◆ gPausePressedButtons

◆ gPauseCurrentDescMsg

◆ gPauseCurrentDescIconScript

◆ gPauseCursorHID

BSS HudElemID gPauseCursorHID

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:51
MenuPanel gPausePanelPartners
MenuPanel gPausePanelBadges

Definition at line 44 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 50 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 53 of file pause_main.c.

Referenced by pause_interp_cursor(), and pause_set_cursor_opacity().

◆ D_8024EFB4

u32 D_8024EFB4 = 1

Definition at line 54 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 55 of file pause_main.c.

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

◆ gPauseWindowFlipUpFlags

◆ gPauseWindowFlipUpAngles

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

Definition at line 57 of file pause_main.c.

57{ -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 58 of file pause_main.c.

58{ 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 60 of file pause_main.c.

60 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x11, 0x00, 0x25, 0x00, 0x3C,
61 0x00, 0x55, 0x00, 0x6E }; //unused

◆ gPauseWindowFlipDownAngles

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

Definition at line 62 of file pause_main.c.

62{ -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 63 of file pause_main.c.

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

Referenced by pause_update_page_inactive_2().

◆ gPauseTutorialState

s32 gPauseTutorialState = -1

Definition at line 64 of file pause_main.c.

Referenced by pause_tutorial_draw_contents(), and pause_tutorial_input().

◆ gPauseTutorialInputState

s32 gPauseTutorialInputState = 3

Definition at line 65 of file pause_main.c.

Referenced by pause_tutorial_input().

◆ gPauseTutorialButtons

Definition at line 66 of file pause_main.c.

Referenced by pause_tutorial_input().

◆ gPauseTutorialDescMessages

◆ gPauseTutorialCmdMessages

s32 gPauseTutorialCmdMessages[]

◆ D_8024F074

◆ gPauseTutorialIconIDs

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

Definition at line 99 of file pause_main.c.

99{ 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 100 of file pause_main.c.

100{ 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 101 of file pause_main.c.

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

Referenced by pause_interp_vertical_scroll().

◆ gPauseTutorialSpriteAnims

◆ gPauseTutorialViewport

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

Definition at line 123 of file pause_main.c.

123 {
124 .vp = {
125 .vscale = { 640, 480, 511, 0 },
126 .vtrans = { 640, 480, 511, 0 },
127 }
128};

Referenced by pause_tutorial_draw_contents().

◆ gPauseTutorialScrollPos

s32 gPauseTutorialScrollPos = 0

Definition at line 129 of file pause_main.c.

Referenced by pause_tutorial_draw_contents().

◆ gPauseCommonWindowsBPs

MenuWindowBP gPauseCommonWindowsBPs[]

Definition at line 130 of file pause_main.c.

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

Referenced by pause_init().