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

Go to the source code of this file.

Macros

#define SAVE_OFFSET_X   25
 
#define COPY_OFFSET_X   16
 
#define LOCALE_FILE_NUMBER_X   33
 
#define OFFSET_WIDTH   0
 
#define DELETE_OFFSET_X   8
 
#define CENTER_CANCEL_X   18
 
#define RIGHT_CANCEL_X   20
 
#define FILE_X   5
 
#define FILE_NUMBER_X   33
 
#define FILE_NAME_X   46
 
#define NUMBER_OFFSET_Y   0
 

Functions

void filemenu_draw_contents_title (MenuPanel *menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
 
void filemenu_draw_contents_stereo (MenuPanel *menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
 
void filemenu_draw_contents_mono (MenuPanel *menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
 
void filemenu_draw_contents_option_left (MenuPanel *menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
 
void filemenu_draw_contents_option_center (MenuPanel *menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
 
void filemenu_draw_contents_option_right (MenuPanel *menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
 
void filemenu_draw_contents_file_info (s32 fileIdx, MenuPanel *menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
 
void filemenu_draw_contents_file_title (s32 fileIdx, MenuPanel *menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
 
void filemenu_draw_contents_file_0_info (MenuPanel *menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
 
void filemenu_draw_contents_file_1_info (MenuPanel *menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
 
void filemenu_draw_contents_file_2_info (MenuPanel *menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
 
void filemenu_draw_contents_file_3_info (MenuPanel *menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
 
void filemenu_draw_contents_file_0_title (MenuPanel *menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
 
void filemenu_draw_contents_file_1_title (MenuPanel *menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
 
void filemenu_draw_contents_file_2_title (MenuPanel *menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
 
void filemenu_draw_contents_file_3_title (MenuPanel *menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
 
void filemenu_main_init (MenuPanel *menu)
 
void filemenu_main_handle_input (MenuPanel *menu)
 
void filemenu_main_update (MenuPanel *menu)
 
void filemenu_main_cleanup (MenuPanel *menu)
 

Variables

HudScript HES_Spirit1
 
HudScript HES_Spirit2
 
HudScript HES_Spirit3
 
HudScript HES_Spirit4
 
HudScript HES_Spirit5
 
HudScript HES_Spirit6
 
HudScript HES_Spirit7
 
HudScript HES_Spirit1Missing
 
HudScript HES_Spirit2Missing
 
HudScript HES_Spirit3Missing
 
HudScript HES_Spirit4Missing
 
HudScript HES_Spirit5Missing
 
HudScript HES_Spirit6Missing
 
HudScript HES_Spirit7Missing
 
HudScript HES_JpFile
 
HudScript HES_JpFileDisabled
 
HudScript HES_OptionMonoOn
 
HudScript HES_OptionMonoOff
 
HudScript HES_OptionStereoOn
 
HudScript HES_OptionStereoOff
 
BSS u8 filemenu_filename [8]
 
HudScript HES_OptionMonoOn_de
 
HudScript HES_OptionMonoOff_de
 
HudScript HES_OptionStereoOn_de
 
HudScript HES_OptionStereoOff_de
 
HudScript HES_OptionMonoOn_fr
 
HudScript HES_OptionMonoOff_fr
 
HudScript HES_OptionStereoOn_fr
 
HudScript HES_OptionStereoOff_fr
 
HudScript HES_OptionMonoOn_es
 
HudScript HES_OptionMonoOff_es
 
HudScript HES_OptionStereoOn_es
 
HudScript HES_OptionStereoOff_es
 
HudScriptfilemenu_main_hudElemScripts [][20]
 
u8 filemenu_main_gridData []
 
MenuWindowBP filemenu_main_windowBPs []
 
MenuPanel filemenu_main_menuBP
 

Macro Definition Documentation

◆ SAVE_OFFSET_X

#define SAVE_OFFSET_X   25

Definition at line 47 of file filemenu_main.c.

Referenced by filemenu_draw_contents_title().

◆ COPY_OFFSET_X

#define COPY_OFFSET_X   16

Definition at line 48 of file filemenu_main.c.

Referenced by filemenu_draw_contents_title().

◆ LOCALE_FILE_NUMBER_X

#define LOCALE_FILE_NUMBER_X   33

Definition at line 53 of file filemenu_main.c.

◆ OFFSET_WIDTH

#define OFFSET_WIDTH   0

Definition at line 66 of file filemenu_main.c.

Referenced by filemenu_draw_contents_option_left().

◆ DELETE_OFFSET_X

#define DELETE_OFFSET_X   8

Definition at line 67 of file filemenu_main.c.

Referenced by filemenu_draw_contents_title().

◆ CENTER_CANCEL_X

#define CENTER_CANCEL_X   18

Definition at line 68 of file filemenu_main.c.

Referenced by filemenu_draw_contents_option_center().

◆ RIGHT_CANCEL_X

#define RIGHT_CANCEL_X   20

Definition at line 69 of file filemenu_main.c.

Referenced by filemenu_draw_contents_option_right().

◆ FILE_X

#define FILE_X   5

Definition at line 70 of file filemenu_main.c.

Referenced by filemenu_draw_contents_file_title().

◆ FILE_NUMBER_X

#define FILE_NUMBER_X   33

Definition at line 71 of file filemenu_main.c.

Referenced by filemenu_draw_contents_file_title().

◆ FILE_NAME_X

#define FILE_NAME_X   46

Definition at line 72 of file filemenu_main.c.

Referenced by filemenu_draw_contents_file_title().

◆ NUMBER_OFFSET_Y

#define NUMBER_OFFSET_Y   0

Function Documentation

◆ filemenu_draw_contents_title()

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

Definition at line 347 of file filemenu_main.c.

352 {
353 char strBuf[64];
354 u8 msgBuf[64];
355 s32 msgWidth;
356 s32 msgIdx;
357 s32 xOffset;
358 s32 yOffset;
359
360 switch (menu->state) {
361 default:
364 xOffset = 9;
365 yOffset = 4;
366 break;
369 xOffset = DELETE_OFFSET_X;
370 yOffset = 4;
371 break;
374 xOffset = SAVE_OFFSET_X;
375 yOffset = 4;
376 break;
379 xOffset = COPY_OFFSET_X;
380 yOffset = 4;
381 break;
382 }
383
384 filemenu_draw_message(filemenu_get_menu_message(msgIdx), baseX + xOffset, baseY + yOffset, 255, 0, 0);
385
386 sprintf(strBuf, "%s (v%d.%d.%d)", DX_MOD_NAME, DX_MOD_VER_MAJOR, DX_MOD_VER_MINOR, DX_MOD_VER_PATCH);
387 dx_string_to_msg(msgBuf, strBuf);
388 msgWidth = get_msg_width(msgBuf, 0);
389 filemenu_draw_message(msgBuf, (SCREEN_WIDTH - msgWidth) / 2, 245 - baseY, 255, 0, 0);
390}
#define DX_MOD_VER_MAJOR
Definition config.h:8
#define DX_MOD_NAME
Creates the version string that appears on the file select menu.
Definition config.h:7
#define DX_MOD_VER_PATCH
Definition config.h:10
#define DX_MOD_VER_MINOR
Definition config.h:9
#define get_msg_width
@ FILE_MESSAGE_SELECT_FILE_TO_START
Definition enums.h:5337
@ FILE_MESSAGE_COPY_WHICH_FILE
Definition enums.h:5342
@ FILE_MESSAGE_COPY_TO_WHICH_FILE
Definition enums.h:5343
@ FILE_MESSAGE_SELECT_FILE_TO_DELETE
Definition enums.h:5338
@ FM_MAIN_SELECT_FILE
Definition filemenu.h:24
@ FM_MAIN_SELECT_COPY_TO
Definition filemenu.h:27
@ FM_MAIN_SELECT_DELETE
Definition filemenu.h:25
@ FM_MAIN_SELECT_COPY_FROM
Definition filemenu.h:26
void filemenu_draw_message(u8 *, s32, s32, s32, s32, u32)
#define SAVE_OFFSET_X
#define DELETE_OFFSET_X
#define COPY_OFFSET_X
u8 * filemenu_get_menu_message(s32 idx)
#define SCREEN_WIDTH
Definition macros.h:105
u8 * dx_string_to_msg(u8 *msg, const u8 *str)
Definition utils.c:16

◆ filemenu_draw_contents_stereo()

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

Definition at line 392 of file filemenu_main.c.

397 {
399 hud_element_set_render_pos(filemenu_hudElemIDs[18], baseX + 34, baseY + 10);
401 } else {
402 hud_element_set_render_pos(filemenu_hudElemIDs[19], baseX + 34, baseY + 10);
404 }
405}
@ SOUND_OUT_STEREO
Definition enums.h:278
s32 filemenu_hudElemIDs[20]
void hud_element_draw_without_clipping(s32 id)
void hud_element_set_render_pos(s32 id, s32 x, s32 y)
GameStatus * gGameStatusPtr
Definition main_loop.c:32

◆ filemenu_draw_contents_mono()

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

Definition at line 407 of file filemenu_main.c.

◆ filemenu_draw_contents_option_left()

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

Definition at line 422 of file filemenu_main.c.

427 {
428 if (menu->col == 0 && menu->row == 2) {
430 }
432}
@ FILE_MESSAGE_DELETE_FILE
Definition enums.h:5347
@ WIN_FILES_OPTION_LEFT
Definition enums.h:5297
#define OFFSET_WIDTH
void filemenu_set_cursor_goal_pos(s32 windowIndex, s32 posX, s32 posY)

◆ filemenu_draw_contents_option_center()

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

Definition at line 469 of file filemenu_main.c.

474 {
475 s32 msgIdx;
476 s32 xOffset;
477 s32 yOffset;
478
479 switch (menu->state) {
480 case 1:
481 case 2:
482 case 3:
483 case 4:
484 msgIdx = FILE_MESSAGE_CANCEL;
485 xOffset = CENTER_CANCEL_X;
486 yOffset = 0;
487 if (menu->col == 1 && menu->row == 2) {
489 }
490 break;
491 default:
492 msgIdx = FILE_MESSAGE_COPY_FILE;
493 xOffset = 14;
494 yOffset = 0;
495 if (menu->col == 1 && menu->row == 2) {
497 }
498 break;
499 }
500
501 filemenu_draw_message(filemenu_get_menu_message(msgIdx), baseX + xOffset, baseY + yOffset + 2, 255, 0, 1);
502}
@ FILE_MESSAGE_COPY_FILE
Definition enums.h:5349
@ FILE_MESSAGE_CANCEL
Definition enums.h:5348
@ WIN_FILES_OPTION_CENTER
Definition enums.h:5298
#define CENTER_CANCEL_X

◆ filemenu_draw_contents_option_right()

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

Definition at line 505 of file filemenu_main.c.

510 {
511 if (menu->col == 2 && menu->row == 2) {
513 }
515}
@ WIN_FILES_OPTION_RIGHT
Definition enums.h:5299
#define RIGHT_CANCEL_X

◆ filemenu_draw_contents_file_info()

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

Definition at line 517 of file filemenu_main.c.

522 {
523 s32 xOffset;
524 s32 temp_s0_3;
525 s32 temp_s1_2;
526 s32 temp_s3_2;
527 s32 temp_s3;
528 s32 id;
529 s32 i;
530 const int MAX_DISPLAYED_TIME = 100*60*60*60 - 1; // 100 hours minus one frame at 60 fps
531
532 if (!gSaveSlotMetadata[fileIdx].hasData) {
533#if VERSION_PAL
534 xOffset = D_filemenu_802508E0[gCurrentLanguage];
535#else
536 xOffset = 50;
537#endif
538 filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_NEW), baseX + xOffset, baseY + 20, 255, 0xA, 0);
539 return;
540 }
541
542 // do not show file summary from mods that don't match the current one
543 if (!gSaveSlotMetadata[fileIdx].validData) {
544 char buf[32];
545 if (gSaveSlotMetadata[fileIdx].modName[0] == '\0') {
546 dx_string_to_msg(&buf, "Paper Mario");
547 } else {
548 dx_string_to_msg(&buf, gSaveSlotMetadata[fileIdx].modName);
549 }
550 xOffset = 66 - get_msg_width(&buf, 0) / 2;
551 filemenu_draw_message(&buf, baseX + xOffset, baseY + 20, 255, MSG_PAL_RED, 0);
552 return;
553 }
554
555 if (gSaveSlotSummary[fileIdx].timePlayed == 0) {
556#if VERSION_PAL
557 xOffset = D_filemenu_802508E4[gCurrentLanguage];
558#else
559 xOffset = 30;
560#endif
561 filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_FIRST_PLAY), baseX + xOffset, baseY + 20, 255, 0xA, 0);
562 return;
563 }
564
565#if VERSION_PAL
566 xOffset = D_filemenu_802508D8[gCurrentLanguage];
567#else
568 xOffset = 34;
569#endif
570 filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_LEVEL), baseX + xOffset, baseY + 10, 255, 0xA, 1);
571 temp_s3_2 = gSaveSlotSummary[fileIdx].level;
572 temp_s3 = temp_s3_2;
575#if VERSION_PAL
576 xOffset = D_filemenu_802508DC[gCurrentLanguage];
577#else
578 xOffset = 11;
579#endif
580 filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_PLAY_TIME), baseX + xOffset, baseY + 24, 255, 0xA, 1);
581
582 temp_s3_2 = gSaveSlotSummary[fileIdx].timePlayed;
583 if (temp_s3_2 > MAX_DISPLAYED_TIME) {
584 temp_s3_2 = MAX_DISPLAYED_TIME;
585 }
586
587 draw_number((temp_s3_2 / 2160000) % 10, baseX + 76, baseY + 24 + NUMBER_OFFSET_Y, DRAW_NUMBER_CHARSET_THIN, MSG_PAL_STANDARD, 255, DRAW_NUMBER_STYLE_MONOSPACE);
588 temp_s1_2 = temp_s3_2 / 216000;
589 draw_number(temp_s1_2 - ((temp_s3_2 / 2160000) * 10), baseX + 85, baseY + 24 + NUMBER_OFFSET_Y, DRAW_NUMBER_CHARSET_THIN, MSG_PAL_STANDARD, 255, DRAW_NUMBER_STYLE_MONOSPACE);
590 filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_PERIOD_13), baseX + 95, baseY + 23, 255, 0xA, 1);
591 filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_PERIOD_13), baseX + 95, baseY + 18, 255, 0xA, 1);
592 temp_s0_3 = temp_s3_2 / 36000;
593 draw_number(temp_s0_3 - (temp_s1_2 * 6), baseX + 100, baseY + 24 + NUMBER_OFFSET_Y, DRAW_NUMBER_CHARSET_THIN, MSG_PAL_STANDARD, 255, DRAW_NUMBER_STYLE_MONOSPACE);
594 draw_number((temp_s3_2 / 3600) - (temp_s0_3 * 10), baseX + 109, baseY + 24 + NUMBER_OFFSET_Y, DRAW_NUMBER_CHARSET_THIN, MSG_PAL_STANDARD, 255, DRAW_NUMBER_STYLE_MONOSPACE);
595
596 for (i = 0; i < 7; i++) {
597 if (i < gSaveSlotSummary[fileIdx].spiritsRescued) {
598 id = filemenu_hudElemIDs[i];
599 } else {
600 id = filemenu_hudElemIDs[i + 7];
601 }
602 hud_element_set_render_pos(id, baseX + 17 + (i * 16), baseY + 44);
603 if (i == 0) {
605 } else {
607 }
608 }
609}
@ DRAW_NUMBER_STYLE_MONOSPACE
Definition enums.h:5394
@ MSG_PAL_STANDARD
Definition enums.h:5415
@ MSG_PAL_RED
Definition enums.h:5412
@ DRAW_NUMBER_CHARSET_THIN
Definition enums.h:5401
@ FILE_MESSAGE_NEW
Definition enums.h:5344
@ FILE_MESSAGE_PERIOD_13
Definition enums.h:5351
@ FILE_MESSAGE_LEVEL
Definition enums.h:5345
@ FILE_MESSAGE_PLAY_TIME
Definition enums.h:5346
@ FILE_MESSAGE_FIRST_PLAY
Definition enums.h:5350
#define NUMBER_OFFSET_Y
SaveFileSummary gSaveSlotSummary[4]
SaveSlotMetadata gSaveSlotMetadata[4]
void draw_number(s32 value, s32 x, s32 y, s32 variableWidthChars, s32 palette, s32 opacity, u16 style)
Definition msg.c:2223
void hud_element_draw_next(s32 id)
#define gCurrentLanguage
Definition variables.h:115

Referenced by filemenu_draw_contents_file_0_info(), filemenu_draw_contents_file_1_info(), filemenu_draw_contents_file_2_info(), and filemenu_draw_contents_file_3_info().

◆ filemenu_draw_contents_file_title()

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

Definition at line 644 of file filemenu_main.c.

650{
651 if (filemenu_currentMenu == FILE_MENU_MAIN && menu->selected == fileIdx) {
652 filemenu_set_cursor_goal_pos(fileIdx + 60, baseX - 3, baseY + 8);
653 }
654
656
657 if (!gSaveSlotMetadata[fileIdx].hasData) {
659 } else {
662 gSaveSlotSummary[fileIdx].filename,
663 ARRAY_COUNT(gSaveSlotSummary[fileIdx].filename),
664 baseX + FILE_NAME_X, baseY + 1, 255, 0, 1, 9);
665 }
666}
@ MSG_PAL_WHITE
Definition enums.h:5405
@ FILE_MESSAGE_FILE_26
Definition enums.h:5364
void filemenu_draw_file_name(u8 *, s32, s32, s32, s32, s32, s32, s32)
s8 filemenu_currentMenu
@ FILE_MENU_MAIN
Definition filemenu.h:17
#define FILE_NUMBER_X
#define FILE_NAME_X
#define FILE_X
#define ARRAY_COUNT(arr)
Definition macros.h:40

Referenced by filemenu_draw_contents_file_0_title(), filemenu_draw_contents_file_1_title(), filemenu_draw_contents_file_2_title(), and filemenu_draw_contents_file_3_title().

◆ filemenu_draw_contents_file_0_info()

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

Definition at line 669 of file filemenu_main.c.

674 {
675 filemenu_draw_contents_file_info(0, menu, baseX, baseY, width, height, opacity, darkening);
676}
void filemenu_draw_contents_file_info(s32 fileIdx, MenuPanel *menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)

◆ filemenu_draw_contents_file_1_info()

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

Definition at line 678 of file filemenu_main.c.

683 {
684 filemenu_draw_contents_file_info(1, menu, baseX, baseY, width, height, opacity, darkening);
685}

◆ filemenu_draw_contents_file_2_info()

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

Definition at line 687 of file filemenu_main.c.

692 {
693 filemenu_draw_contents_file_info(2, menu, baseX, baseY, width, height, opacity, darkening);
694}

◆ filemenu_draw_contents_file_3_info()

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

Definition at line 696 of file filemenu_main.c.

701 {
702 filemenu_draw_contents_file_info(3, menu, baseX, baseY, width, height, opacity, darkening);
703}

◆ filemenu_draw_contents_file_0_title()

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

Definition at line 705 of file filemenu_main.c.

710 {
711 filemenu_draw_contents_file_title(0, menu, baseX, baseY, width, height, opacity, darkening);
712}
void filemenu_draw_contents_file_title(s32 fileIdx, MenuPanel *menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)

◆ filemenu_draw_contents_file_1_title()

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

Definition at line 714 of file filemenu_main.c.

719 {
720 filemenu_draw_contents_file_title(1, menu, baseX, baseY, width, height, opacity, darkening);
721}

◆ filemenu_draw_contents_file_2_title()

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

Definition at line 723 of file filemenu_main.c.

728 {
729 filemenu_draw_contents_file_title(2, menu, baseX, baseY, width, height, opacity, darkening);
730}

◆ filemenu_draw_contents_file_3_title()

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

Definition at line 732 of file filemenu_main.c.

737 {
738 filemenu_draw_contents_file_title(3, menu, baseX, baseY, width, height, opacity, darkening);
739}

◆ filemenu_main_init()

void filemenu_main_init ( MenuPanel * menu)

Definition at line 741 of file filemenu_main.c.

741 {
742 s32 i;
743
744 for (i = 0; i < ARRAY_COUNT(filemenu_hudElemIDs); i++) {
747 }
748
749 for (i = 0; i < ARRAY_COUNT(filemenu_main_windowBPs); i++) {
751 }
752
755
759
762
763 if (menu->state != FM_MAIN_SELECT_FILE) {
768 }
769 menu->initialized = TRUE;
770}
@ WINDOW_UPDATE_HIDE
Definition enums.h:5312
@ WIN_FILES_TITLE
Definition enums.h:5289
@ WIN_FILES_STEREO
Definition enums.h:5295
@ WIN_FILES_MONO
Definition enums.h:5296
#define CENTER_WINDOW_X(id)
Definition filemenu.h:6
MenuWindowBP filemenu_main_windowBPs[]
HudScript * filemenu_main_hudElemScripts[][20]
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.
void hud_element_set_flags(s32 id, s32 flags)
Turns on the given flags.
@ HUD_ELEMENT_FLAG_80
Definition hud_element.h:80
#define MENU_PANEL_SELECTED_GRID_DATA(panel)
Definition macros.h:76
MenuPanel * tab
Window gWindows[64]
Definition windows.c:23

◆ filemenu_main_handle_input()

void filemenu_main_handle_input ( MenuPanel * menu)

Definition at line 772 of file filemenu_main.c.

772 {
773 s32 originalSelected = menu->selected;
774 s32 i;
775
777 while (TRUE) {
778 menu->col--;
779 if (menu->col < 0) {
780 menu->col = 0;
781 break;
782 }
783 if (menu->selected != MENU_PANEL_SELECTED_GRID_DATA(menu)) {
784 break;
785 }
786 }
787 }
788
790 while (TRUE) {
791 menu->col++;
792 if (menu->col >= menu->numCols) {
793 menu->col = menu->numCols - 1;
794 break;
795 }
796
797 if (menu->selected != MENU_PANEL_SELECTED_GRID_DATA(menu)) {
798 break;
799 }
800 }
801 }
802
804 menu->row--;
805 if (menu->row < 0) {
806 menu->row = 0;
807 }
808 }
809
811 menu->row++;
812 if (menu->row >= menu->numRows) {
813 menu->row = menu->numRows - 1;
814 }
815 }
816
817 switch (menu->state) {
819 // force selection to column 0 when navigating up from bottom row
820 if (menu->col == 1 && (u8) menu->row < 2) {
821 menu->col = 0;
822 }
823 break;
827 // force selection to column 0 when navigating up from bottom row
828 if (menu->col == 1 && (u8) menu->row < 2) {
829 menu->col = 0;
830 }
831 // force selection to column 1 when navigating down to bottom row
832 if (menu->row == 2) {
833 menu->col = 1;
834 }
835 break;
836 }
837
839 if (originalSelected != menu->selected) {
841 }
842
843 if (menu->state == FM_MAIN_SELECT_FILE) {
844 s32 originalOutputMode = gGameStatusPtr->soundOutputMode;
845
848 }
851 }
852
853 if (originalOutputMode != gGameStatusPtr->soundOutputMode) {
857 } else {
859 }
860 }
861 }
862
865 }
866
868 switch (menu->state) {
871 // selected a file with no data
872 for (i = 0; i < ARRAY_COUNT(filemenu_filename); i++) {
874 }
893 break;
894 }
895
896 if (menu->selected == FM_MAIN_OPT_CANCEL) {
897 // selected "Cancel" button
910 } else if (menu->selected == FM_MAIN_OPT_DELETE) {
911 // selected "Delete File" button
914 filemenu_set_selected(menu, 1, 2);
919 } else if (menu->selected == FM_MAIN_OPT_COPY) {
920 // selected "Copy File" button
923 filemenu_set_selected(menu, 1, 2);
928 } else if (menu->selected <= FM_MAIN_OPT_FILE_4) {
929 // selected a file
945
950
955
960 } else {
962 }
963 }
964 break;
966 if (menu->selected == FM_MAIN_OPT_CANCEL) {
967 // selected "Cancel" button
974 filemenu_set_selected(menu, 0, 2);
975 } else if (menu->selected <= FM_MAIN_OPT_FILE_4) {
976 // selected a file
980
985
990
994 } else {
996 }
997 }
998 break;
1000 if (menu->selected == FM_MAIN_OPT_CANCEL) {
1001 // selected "Cancel" button
1003 menu->state = FM_MAIN_SELECT_FILE;
1008 filemenu_set_selected(menu, 0, 1);
1009 } else if (menu->selected <= FM_MAIN_OPT_FILE_4) {
1010 // selected a file
1011 if (gSaveSlotMetadata[menu->selected].hasData) {
1015 } else {
1017 }
1018 }
1019 break;
1021 if (menu->selected == FM_MAIN_OPT_CANCEL) {
1022 // selected "Cancel" button
1025 filemenu_set_selected(menu, 0, 2);
1026 } else if (menu->selected <= FM_MAIN_OPT_FILE_4) {
1027 // selected a file
1028 if (filemenu_CopyFromFileIdx == menu->selected) {
1030 } else {
1032 if (!gSaveSlotMetadata[menu->selected].hasData) {
1040
1047 } else {
1054
1059
1063 }
1064 }
1065 }
1066 break;
1067 }
1068 }
1069
1071 switch (menu->state) {
1073 filemenu_set_selected(menu, 2, 2);
1074 break;
1076 filemenu_set_selected(menu, 1, 2);
1077 break;
1079 filemenu_set_selected(menu, 1, 2);
1080 break;
1082 filemenu_set_selected(menu, 1, 2);
1083 break;
1084 }
1085
1086 switch (menu->state) {
1100 break;
1102 menu->state = FM_MAIN_SELECT_FILE;
1103 filemenu_set_selected(menu, 0, 2);
1109 break;
1111 menu->state = FM_MAIN_SELECT_FILE;
1112 filemenu_set_selected(menu, 1, 2);
1118 break;
1123 break;
1124 }
1125 }
1126}
void audio_set_stereo(void)
Definition 30450.c:839
void audio_set_mono(void)
Definition 30450.c:844
@ BUTTON_A
Definition enums.h:2790
@ BUTTON_START
Definition enums.h:2787
@ BUTTON_R
Definition enums.h:2781
@ BUTTON_STICK_UP
Definition enums.h:2791
@ BUTTON_STICK_DOWN
Definition enums.h:2792
@ BUTTON_STICK_LEFT
Definition enums.h:2793
@ BUTTON_STICK_RIGHT
Definition enums.h:2794
@ BUTTON_B
Definition enums.h:2789
@ BUTTON_Z
Definition enums.h:2788
@ WINDOW_UPDATE_SHOW
Definition enums.h:5311
@ SOUND_MENU_BACK
Definition enums.h:701
@ SOUND_FILE_MENU_MOVE_CURSOR
Definition enums.h:1539
@ SOUND_MENU_CHANGE_TAB
Definition enums.h:699
@ SOUND_MENU_NEXT
Definition enums.h:700
@ SOUND_FILE_MENU_OUT
Definition enums.h:711
@ SOUND_MENU_ERROR
Definition enums.h:933
@ MSG_CHAR_READ_SPACE
Definition enums.h:6050
@ WIN_FILES_SLOT3_BODY
Definition enums.h:5302
@ WIN_FILES_MESSAGE
Definition enums.h:5291
@ WIN_FILES_INPUT_FIELD
Definition enums.h:5292
@ WIN_FILES_SLOT1_BODY
Definition enums.h:5300
@ WIN_FILES_SLOT2_BODY
Definition enums.h:5301
@ WIN_FILES_INPUT_KEYBOARD
Definition enums.h:5293
@ WIN_FILES_CONFIRM_PROMPT
Definition enums.h:5290
@ WIN_FILES_CONFIRM_OPTIONS
Definition enums.h:5294
@ WIN_FILES_SLOT4_BODY
Definition enums.h:5303
@ FM_MESSAGE_COPIED
Definition filemenu.h:35
@ FM_CONFIRM_START
Definition filemenu.h:32
@ FM_CONFIRM_COPY
Definition filemenu.h:31
@ FM_INPUT_CHARSET_A
Definition filemenu.h:38
@ FM_CONFIRM_DELETE
Definition filemenu.h:29
void filemenu_update_hidden_with_rotation(s32 windowIdx, s32 *flags, s32 *posX, s32 *posY, s32 *posZ, f32 *scaleX, f32 *scaleY, f32 *rotX, f32 *rotY, f32 *rotZ, s32 *darkening, s32 *opacity)
@ FM_MAIN_OPT_DELETE
Definition filemenu.h:47
@ FM_MAIN_OPT_COPY
Definition filemenu.h:48
@ FM_MAIN_OPT_FILE_4
Definition filemenu.h:46
@ FM_MAIN_OPT_CANCEL
Definition filemenu.h:49
void filemenu_update_hidden_options_left(s32 windowIdx, s32 *flags, s32 *posX, s32 *posY, s32 *posZ, f32 *scaleX, f32 *scaleY, f32 *rotX, f32 *rotY, f32 *rotZ, s32 *darkening, s32 *opacity)
s32 filemenu_heldButtons
MenuPanel * filemenu_menus[]
s32 filemenu_CopyFromFileIdx
void filemenu_update_hidden_options_bottom(s32 windowIdx, s32 *flags, s32 *posX, s32 *posY, s32 *posZ, f32 *scaleX, f32 *scaleY, f32 *rotX, f32 *rotY, f32 *rotZ, s32 *darkening, s32 *opacity)
void filemenu_update_show_options_left(s32 windowIdx, s32 *flags, s32 *posX, s32 *posY, s32 *posZ, f32 *scaleX, f32 *scaleY, f32 *rotX, f32 *rotY, f32 *rotZ, s32 *darkening, s32 *opacity)
void filemenu_update_hidden_title(s32 windowIdx, s32 *flags, s32 *posX, s32 *posY, s32 *posZ, f32 *scaleX, f32 *scaleY, f32 *rotX, f32 *rotY, f32 *rotZ, s32 *darkening, s32 *opacity)
void filemenu_update_show_options_right(s32 windowIdx, s32 *flags, s32 *posX, s32 *posY, s32 *posZ, f32 *scaleX, f32 *scaleY, f32 *rotX, f32 *rotY, f32 *rotZ, s32 *darkening, s32 *opacity)
void filemenu_update_show_name_confirm(s32 windowIdx, s32 *flags, s32 *posX, s32 *posY, s32 *posZ, f32 *scaleX, f32 *scaleY, f32 *rotX, f32 *rotY, f32 *rotZ, s32 *darkening, s32 *opacity)
void filemenu_update_select_file(s32 windowIdx, s32 *flags, s32 *posX, s32 *posY, s32 *posZ, f32 *scaleX, f32 *scaleY, f32 *rotX, f32 *rotY, f32 *rotZ, s32 *darkening, s32 *opacity)
void filemenu_update_hidden_options_right(s32 windowIdx, s32 *flags, s32 *posX, s32 *posY, s32 *posZ, f32 *scaleX, f32 *scaleY, f32 *rotX, f32 *rotY, f32 *rotZ, s32 *darkening, s32 *opacity)
s32 filemenu_CopyToFileIdx
@ FILE_MENU_INPUT_NAME
Definition filemenu.h:20
@ FILE_MENU_CONFIRM
Definition filemenu.h:18
@ FILE_MENU_MESSAGE
Definition filemenu.h:19
s8 filemenu_filename_pos
void filemenu_update_show_options_bottom(s32 windowIdx, s32 *flags, s32 *posX, s32 *posY, s32 *posZ, f32 *scaleX, f32 *scaleY, f32 *rotX, f32 *rotY, f32 *rotZ, s32 *darkening, s32 *opacity)
void filemenu_update_show_name_input(s32 windowIdx, s32 *flags, s32 *posX, s32 *posY, s32 *posZ, f32 *scaleX, f32 *scaleY, f32 *rotX, f32 *rotY, f32 *rotZ, s32 *darkening, s32 *opacity)
#define CENTER_WINDOW_Y(id)
Definition filemenu.h:11
s32 filemenu_pressedButtons
BSS u8 filemenu_filename[8]
b32 fio_load_game(s32 saveSlot)
Definition fio.c:167
void fio_save_game(s32 saveSlot)
Definition fio.c:184
void filemenu_set_selected(MenuPanel *menu, s32 col, s32 row)
void set_game_mode(s32 modeID)
Definition game_modes.c:127
@ GAME_MODE_END_FILE_SELECT
Definition game_modes.h:20
void sfx_play_sound(s32 soundID)
Definition sfx.c:517

◆ filemenu_main_update()

void filemenu_main_update ( MenuPanel * menu)

Definition at line 1128 of file filemenu_main.c.

1128 {
1129 // set default styles for all file slot panels
1138
1139 // modify style for selected file slot panel to add highlight
1140 switch (menu->selected) {
1141 case FM_MAIN_OPT_FILE_1:
1144 break;
1145 case FM_MAIN_OPT_FILE_2:
1148 break;
1149 case FM_MAIN_OPT_FILE_3:
1152 break;
1153 case FM_MAIN_OPT_FILE_4:
1156 break;
1157 }
1158
1159 // alsoadd highlight to "copy to" target
1161 switch (filemenu_CopyFromFileIdx) {
1162 case FM_MAIN_OPT_FILE_1:
1165 return;
1166 case FM_MAIN_OPT_FILE_2:
1169 return;
1170 case FM_MAIN_OPT_FILE_3:
1173 return;
1174 case FM_MAIN_OPT_FILE_4:
1177 return;
1178 }
1179 }
1180}
WindowStyleCustom * customStyle
@ WIN_FILES_SLOT2_TITLE
Definition enums.h:5305
@ WIN_FILES_SLOT3_TITLE
Definition enums.h:5306
@ WIN_FILES_SLOT4_TITLE
Definition enums.h:5307
@ WIN_FILES_SLOT1_TITLE
Definition enums.h:5304
WindowStyleCustom filemenu_windowStyles[]
@ FM_MAIN_OPT_FILE_1
Definition filemenu.h:43
@ FM_MAIN_OPT_FILE_3
Definition filemenu.h:45
@ FM_MAIN_OPT_FILE_2
Definition filemenu.h:44
WindowStyle gWindowStyles[]
Definition windows.c:25

◆ filemenu_main_cleanup()

void filemenu_main_cleanup ( MenuPanel * menu)

Definition at line 1182 of file filemenu_main.c.

1182 {
1183 s32 i;
1184
1185 for (i = 0; i < ARRAY_COUNT(filemenu_hudElemIDs); i++) {
1187 }
1188}
void hud_element_free(s32 id)

Variable Documentation

◆ HES_Spirit1

HudScript HES_Spirit1
extern

Definition at line 151 of file menu_hud_scripts.c.

◆ HES_Spirit2

HudScript HES_Spirit2
extern

Definition at line 155 of file menu_hud_scripts.c.

◆ HES_Spirit3

HudScript HES_Spirit3
extern

Definition at line 159 of file menu_hud_scripts.c.

◆ HES_Spirit4

HudScript HES_Spirit4
extern

Definition at line 163 of file menu_hud_scripts.c.

◆ HES_Spirit5

HudScript HES_Spirit5
extern

Definition at line 167 of file menu_hud_scripts.c.

◆ HES_Spirit6

HudScript HES_Spirit6
extern

Definition at line 171 of file menu_hud_scripts.c.

◆ HES_Spirit7

HudScript HES_Spirit7
extern

Definition at line 175 of file menu_hud_scripts.c.

◆ HES_Spirit1Missing

HudScript HES_Spirit1Missing
extern

Definition at line 153 of file menu_hud_scripts.c.

◆ HES_Spirit2Missing

HudScript HES_Spirit2Missing
extern

Definition at line 157 of file menu_hud_scripts.c.

◆ HES_Spirit3Missing

HudScript HES_Spirit3Missing
extern

Definition at line 161 of file menu_hud_scripts.c.

◆ HES_Spirit4Missing

HudScript HES_Spirit4Missing
extern

Definition at line 165 of file menu_hud_scripts.c.

◆ HES_Spirit5Missing

HudScript HES_Spirit5Missing
extern

Definition at line 169 of file menu_hud_scripts.c.

◆ HES_Spirit6Missing

HudScript HES_Spirit6Missing
extern

Definition at line 173 of file menu_hud_scripts.c.

◆ HES_Spirit7Missing

HudScript HES_Spirit7Missing
extern

Definition at line 177 of file menu_hud_scripts.c.

◆ HES_JpFile

HudScript HES_JpFile
extern

Definition at line 122 of file menu_hud_scripts.c.

◆ HES_JpFileDisabled

HudScript HES_JpFileDisabled
extern

Definition at line 124 of file menu_hud_scripts.c.

◆ HES_OptionMonoOn

HudScript HES_OptionMonoOn
extern

Definition at line 126 of file menu_hud_scripts.c.

◆ HES_OptionMonoOff

HudScript HES_OptionMonoOff
extern

Definition at line 128 of file menu_hud_scripts.c.

◆ HES_OptionStereoOn

HudScript HES_OptionStereoOn
extern

Definition at line 130 of file menu_hud_scripts.c.

◆ HES_OptionStereoOff

HudScript HES_OptionStereoOff
extern

Definition at line 132 of file menu_hud_scripts.c.

◆ filemenu_filename

◆ HES_OptionMonoOn_de

HudScript HES_OptionMonoOn_de
extern

◆ HES_OptionMonoOff_de

HudScript HES_OptionMonoOff_de
extern

◆ HES_OptionStereoOn_de

HudScript HES_OptionStereoOn_de
extern

◆ HES_OptionStereoOff_de

HudScript HES_OptionStereoOff_de
extern

◆ HES_OptionMonoOn_fr

HudScript HES_OptionMonoOn_fr
extern

◆ HES_OptionMonoOff_fr

HudScript HES_OptionMonoOff_fr
extern

◆ HES_OptionStereoOn_fr

HudScript HES_OptionStereoOn_fr
extern

◆ HES_OptionStereoOff_fr

HudScript HES_OptionStereoOff_fr
extern

◆ HES_OptionMonoOn_es

HudScript HES_OptionMonoOn_es
extern

◆ HES_OptionMonoOff_es

HudScript HES_OptionMonoOff_es
extern

◆ HES_OptionStereoOn_es

HudScript HES_OptionStereoOn_es
extern

◆ HES_OptionStereoOff_es

HudScript HES_OptionStereoOff_es
extern

◆ filemenu_main_hudElemScripts

HudScript* filemenu_main_hudElemScripts[][20]

Definition at line 89 of file filemenu_main.c.

89 {
96 },
97#if VERSION_PAL
98 [LANGUAGE_DE] = {
104 },
105 [LANGUAGE_FR] = {
111 },
112 [LANGUAGE_ES] = {
118 }
119#endif
120};
@ LANGUAGE_DE
Definition enums.h:6401
@ LANGUAGE_ES
Definition enums.h:6403
@ LANGUAGE_FR
Definition enums.h:6402
#define LANGUAGE_DEFAULT
Definition enums.h:6398
HudScript HES_OptionMonoOn_es
HudScript HES_Spirit6Missing
HudScript HES_OptionStereoOn_fr
HudScript HES_Spirit1Missing
HudScript HES_Spirit5Missing
HudScript HES_Spirit4Missing
HudScript HES_OptionMonoOff
HudScript HES_OptionStereoOn_es
HudScript HES_Spirit5
HudScript HES_Spirit3Missing
HudScript HES_JpFile
HudScript HES_Spirit2
HudScript HES_Spirit7
HudScript HES_Spirit3
HudScript HES_Spirit2Missing
HudScript HES_Spirit6
HudScript HES_OptionStereoOn_de
HudScript HES_Spirit1
HudScript HES_OptionStereoOff_fr
HudScript HES_Spirit4
HudScript HES_OptionStereoOff_es
HudScript HES_OptionMonoOn
HudScript HES_OptionMonoOff_de
HudScript HES_OptionStereoOn
HudScript HES_JpFileDisabled
HudScript HES_OptionMonoOff_es
HudScript HES_OptionStereoOff_de
HudScript HES_OptionMonoOn_fr
HudScript HES_OptionMonoOn_de
HudScript HES_Spirit7Missing
HudScript HES_OptionMonoOff_fr
HudScript HES_OptionStereoOff

Referenced by filemenu_main_init().

◆ filemenu_main_gridData

u8 filemenu_main_gridData[]
Initial value:
= {
0, 0, 1, 2, 2, 3, 4, 5, 6,
0, 0, 1, 2, 2, 3, 6, 6, 6,
0, 0, 1, 2, 2, 3, 6, 6, 6,
0, 0, 1, 2, 2, 3, 6, 6, 6,
0, 0, 1, 2, 2, 3, 6, 6, 6,
}

Definition at line 122 of file filemenu_main.c.

122 {
123 0, 0, 1, 2, 2, 3, 4, 5, 6,
124 0, 0, 1, 2, 2, 3, 6, 6, 6,
125 0, 0, 1, 2, 2, 3, 6, 6, 6,
126 0, 0, 1, 2, 2, 3, 6, 6, 6,
127#if !VERSION_PAL
128 0, 0, 1, 2, 2, 3, 6, 6, 6,
129#endif
130};

◆ filemenu_main_windowBPs

MenuWindowBP filemenu_main_windowBPs[]

Definition at line 132 of file filemenu_main.c.

132 {
133 {
134 .windowID = WIN_FILES_TITLE,
135 .unk_01 = 0,
136 .pos = { .x = 0, .y = 0 },
137 .width = 0,
138 .height = 0,
139 .priority = WINDOW_PRIORITY_0,
140 .fpDrawContents = &filemenu_draw_contents_title,
141 .tab = NULL,
142 .parentID = WIN_FILES_MAIN,
143 .fpUpdate = { .func = &filemenu_update_show_title },
144 .extraFlags = 0,
145 .style = { .customStyle = &filemenu_windowStyles[3] }
146 },
147 {
148 .windowID = WIN_FILES_STEREO,
149 .unk_01 = 0,
150 .pos = { .x = -2, .y = 6 },
151 .width = 68,
152 .height = 20,
153 .priority = WINDOW_PRIORITY_0,
154 .fpDrawContents = &filemenu_draw_contents_stereo,
155 .tab = NULL,
156 .parentID = WIN_FILES_MAIN,
157 .fpUpdate = { .func = &filemenu_update_show_options_left },
158 .extraFlags = 0,
159 .style = { .customStyle = &filemenu_windowStyles[2] }
160 },
161 {
162 .windowID = WIN_FILES_MONO,
163 .unk_01 = 0,
164 .pos = { .x = 221, .y = 6 },
165 .width = 68,
166 .height = 20,
167 .priority = WINDOW_PRIORITY_0,
168 .fpDrawContents = &filemenu_draw_contents_mono,
169 .tab = NULL,
170 .parentID = WIN_FILES_MAIN,
171 .fpUpdate = { .func = &filemenu_update_show_options_right },
172 .extraFlags = 0,
173 .style = { .customStyle = &filemenu_windowStyles[2] }
174 },
175 {
176 .windowID = WIN_FILES_OPTION_LEFT,
177 .unk_01 = 0,
178 .pos = { .x = 5, .y = 171 },
179 .width = 88,
180 .height = 16,
181 .priority = WINDOW_PRIORITY_0,
182 .fpDrawContents = &filemenu_draw_contents_option_left,
183 .tab = NULL,
184 .parentID = WIN_FILES_MAIN,
185 .fpUpdate = { .func = &filemenu_update_show_options_bottom },
186 .extraFlags = 0,
187 .style = { .customStyle = &filemenu_windowStyles[4] }
188 },
189 {
190 .windowID = WIN_FILES_OPTION_CENTER,
191 .unk_01 = 0,
192 .pos = { .x = 0, .y = 171 },
193 .width = 88,
194 .height = 16,
195 .priority = WINDOW_PRIORITY_0,
196 .fpDrawContents = &filemenu_draw_contents_option_center,
197 .tab = NULL,
198 .parentID = WIN_FILES_MAIN,
199 .fpUpdate = { .func = &filemenu_update_show_options_bottom },
200 .extraFlags = 0,
201 .style = { .customStyle = &filemenu_windowStyles[5] }
202 },
203 {
204 .windowID = WIN_FILES_OPTION_RIGHT,
205 .unk_01 = 0,
206 .pos = { .x = 195, .y = 171 },
207 .width = 88,
208 .height = 16,
209 .priority = WINDOW_PRIORITY_0,
210 .fpDrawContents = &filemenu_draw_contents_option_right,
211 .tab = NULL,
212 .parentID = WIN_FILES_MAIN,
213 .fpUpdate = { .func = &filemenu_update_show_options_bottom },
214 .extraFlags = 0,
215 .style = { .customStyle = &filemenu_windowStyles[6] }
216 },
217 {
218 .windowID = WIN_FILES_SLOT3_BODY,
219 .unk_01 = 0,
220 .pos = { .x = 9, .y = 110 },
221 .width = 130,
222 .height = 54,
223 .priority = WINDOW_PRIORITY_0,
224 .fpDrawContents = &filemenu_draw_contents_file_2_info,
225 .tab = NULL,
226 .parentID = WIN_FILES_MAIN,
227 .fpUpdate = { .func = &filemenu_update_show_options_left },
228 .extraFlags = 0,
229 .style = { .customStyle = &filemenu_windowStyles[9] }
230 },
231 {
232 .windowID = WIN_FILES_SLOT3_TITLE,
233 .unk_01 = 0,
234 .pos = { .x = 3, .y = -8 },
235 .width = 124 + OFFSET_WIDTH,
236 .height = 15,
237 .priority = WINDOW_PRIORITY_0,
238 .fpDrawContents = &filemenu_draw_contents_file_2_title,
239 .tab = NULL,
240 .parentID = WIN_FILES_SLOT3_BODY,
241 .fpUpdate = { WINDOW_UPDATE_SHOW },
242 .extraFlags = 0,
243 .style = { .customStyle = &filemenu_windowStyles[13] }
244 },
245 {
246 .windowID = WIN_FILES_SLOT4_BODY,
247 .unk_01 = 0,
248 .pos = { .x = 149, .y = 110 },
249 .width = 130,
250 .height = 54,
251 .priority = WINDOW_PRIORITY_0,
252 .fpDrawContents = &filemenu_draw_contents_file_3_info,
253 .tab = NULL,
254 .parentID = WIN_FILES_MAIN,
255 .fpUpdate = { .func = &filemenu_update_show_options_right },
256 .extraFlags = 0,
257 .style = { .customStyle = &filemenu_windowStyles[10] }
258 },
259 {
260 .windowID = WIN_FILES_SLOT4_TITLE,
261 .unk_01 = 0,
262 .pos = { .x = 3, .y = -8 },
263 .width = 124 + OFFSET_WIDTH,
264 .height = 15,
265 .priority = WINDOW_PRIORITY_0,
266 .fpDrawContents = &filemenu_draw_contents_file_3_title,
267 .tab = NULL,
268 .parentID = WIN_FILES_SLOT4_BODY,
269 .fpUpdate = { WINDOW_UPDATE_SHOW },
270 .extraFlags = 0,
271 .style = { .customStyle = &filemenu_windowStyles[14] }
272 },
273 {
274 .windowID = WIN_FILES_SLOT1_BODY,
275 .unk_01 = 0,
276 .pos = { .x = 9, .y = 41 },
277 .width = 130 + OFFSET_WIDTH,
278 .height = 54,
279 .priority = WINDOW_PRIORITY_0,
280 .fpDrawContents = &filemenu_draw_contents_file_0_info,
281 .tab = NULL,
282 .parentID = WIN_FILES_MAIN,
283 .fpUpdate = { .func = &filemenu_update_show_options_left },
284 .extraFlags = 0,
285 .style = { .customStyle = &filemenu_windowStyles[7] }
286 },
287 {
288 .windowID = WIN_FILES_SLOT1_TITLE,
289 .unk_01 = 0,
290 .pos = { .x = 3, .y = -8 },
291 .width = 124 + OFFSET_WIDTH,
292 .height = 15,
293 .priority = WINDOW_PRIORITY_0,
294 .fpDrawContents = &filemenu_draw_contents_file_0_title,
295 .tab = NULL,
296 .parentID = WIN_FILES_SLOT1_BODY,
297 .fpUpdate = { WINDOW_UPDATE_SHOW },
298 .extraFlags = 0,
299 .style = { .customStyle = &filemenu_windowStyles[11] }
300 },
301 {
302 .windowID = WIN_FILES_SLOT2_BODY,
303 .unk_01 = 0,
304 .pos = { .x = 149, .y = 41 },
305 .width = 130,
306 .height = 54,
307 .priority = WINDOW_PRIORITY_0,
308 .fpDrawContents = &filemenu_draw_contents_file_1_info,
309 .tab = NULL,
310 .parentID = WIN_FILES_MAIN,
311 .fpUpdate = { .func = &filemenu_update_show_options_right },
312 .extraFlags = 0,
313 .style = { .customStyle = &filemenu_windowStyles[8] }
314 },
315 {
316 .windowID = WIN_FILES_SLOT2_TITLE,
317 .unk_01 = 0,
318 .pos = { .x = 3, .y = -8 },
319 .width = 124 + OFFSET_WIDTH,
320 .height = 15,
321 .priority = WINDOW_PRIORITY_0,
322 .fpDrawContents = &filemenu_draw_contents_file_1_title,
323 .tab = NULL,
324 .parentID = WIN_FILES_SLOT2_BODY,
325 .fpUpdate = { WINDOW_UPDATE_SHOW },
326 .extraFlags = 0,
327 .style = { .customStyle = &filemenu_windowStyles[12] }
328 },
329};
@ WINDOW_PRIORITY_0
Definition enums.h:3182
@ WIN_FILES_MAIN
Definition enums.h:5288
void filemenu_update_show_title(s32 windowIdx, s32 *flags, s32 *posX, s32 *posY, s32 *posZ, f32 *scaleX, f32 *scaleY, f32 *rotX, f32 *rotY, f32 *rotZ, s32 *darkening, s32 *opacity)
void filemenu_draw_contents_file_2_info(MenuPanel *menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
void filemenu_draw_contents_file_3_title(MenuPanel *menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
void filemenu_draw_contents_option_left(MenuPanel *menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
void filemenu_draw_contents_file_1_info(MenuPanel *menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
void filemenu_draw_contents_option_right(MenuPanel *menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
void filemenu_draw_contents_file_0_title(MenuPanel *menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
void filemenu_draw_contents_stereo(MenuPanel *menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
void filemenu_draw_contents_file_2_title(MenuPanel *menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
void filemenu_draw_contents_option_center(MenuPanel *menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
void filemenu_draw_contents_title(MenuPanel *menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
void filemenu_draw_contents_file_0_info(MenuPanel *menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
void filemenu_draw_contents_file_1_title(MenuPanel *menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
void filemenu_draw_contents_mono(MenuPanel *menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
void filemenu_draw_contents_file_3_info(MenuPanel *menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)

Referenced by filemenu_main_init().

◆ filemenu_main_menuBP

MenuPanel filemenu_main_menuBP
Initial value:
= {
.initialized = FALSE,
.col = 0,
.row = 0,
.selected = 0,
.state = 0,
.numCols = 3,
.numRows = 3,
.numPages = 0,
.fpInit = &filemenu_main_init,
.fpHandleInput = &filemenu_main_handle_input,
.fpUpdate = &filemenu_main_update,
.fpCleanup = &filemenu_main_cleanup
}
void filemenu_main_cleanup(MenuPanel *menu)
void filemenu_main_handle_input(MenuPanel *menu)
void filemenu_main_init(MenuPanel *menu)
void filemenu_main_update(MenuPanel *menu)
u8 filemenu_main_gridData[]

Definition at line 331 of file filemenu_main.c.

331 {
332 .initialized = FALSE,
333 .col = 0,
334 .row = 0,
335 .selected = 0,
336 .state = 0,
337 .numCols = 3,
338 .numRows = 3,
339 .numPages = 0,
340 .gridData = filemenu_main_gridData,
341 .fpInit = &filemenu_main_init,
342 .fpHandleInput = &filemenu_main_handle_input,
343 .fpUpdate = &filemenu_main_update,
344 .fpCleanup = &filemenu_main_cleanup
345};