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

Go to the source code of this file.

Macros

#define CENTER_WINDOW_X(id)
 
#define CENTER_WINDOW_Y(id)
 
#define WINDOW_UPDATE_FUNC(name)
 

Enumerations

enum  { FILE_MENU_MAIN = 0 , FILE_MENU_CONFIRM = 1 , FILE_MENU_MESSAGE = 2 , FILE_MENU_INPUT_NAME = 3 }
 
enum  {
  FM_MAIN_SELECT_FILE = 0 , FM_MAIN_SELECT_DELETE = 1 , FM_MAIN_SELECT_COPY_FROM = 2 , FM_MAIN_SELECT_COPY_TO = 3 ,
  FM_CONFIRM_DELETE = 0 , FM_CONFIRM_CREATE = 1 , FM_CONFIRM_COPY = 2 , FM_CONFIRM_START = 3 ,
  FM_MESSAGE_DELETED = 0 , FM_MESSAGE_COPIED = 1 , FM_MESSAGE_CREATED = 2 , FM_INPUT_CHARSET_A = 0 ,
  FM_INPUT_CHARSET_B = 1
}
 
enum  {
  FM_MAIN_OPT_FILE_1 = 0 , FM_MAIN_OPT_FILE_2 = 1 , FM_MAIN_OPT_FILE_3 = 2 , FM_MAIN_OPT_FILE_4 = 3 ,
  FM_MAIN_OPT_DELETE = 4 , FM_MAIN_OPT_COPY = 5 , FM_MAIN_OPT_CANCEL = 6
}
 

Functions

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)
 
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_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_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_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)
 
void filemenu_update_hidden_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)
 
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)
 
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)
 
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_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_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)
 
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_deselect_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_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_hidden_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 unused_main_menu_window_darkening (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_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_file_name (u8 *, s32, s32, s32, s32, s32, s32, s32)
 
void filemenu_draw_contents_title (MenuPanel *, s32, s32, s32, s32, s32, s32)
 
void filemenu_draw_contents_stereo (MenuPanel *, s32, s32, s32, s32, s32, s32)
 
void filemenu_draw_contents_mono (MenuPanel *, s32, s32, s32, s32, s32, s32)
 
void filemenu_draw_contents_option_left (MenuPanel *, s32, s32, s32, s32, s32, s32)
 
void filemenu_draw_contents_option_center (MenuPanel *, s32, s32, s32, s32, s32, s32)
 
void filemenu_draw_contents_option_right (MenuPanel *, s32, s32, s32, s32, s32, s32)
 
void filemenu_draw_contents_file_0_info (MenuPanel *, s32, s32, s32, s32, s32, s32)
 
void filemenu_draw_contents_file_0_title (MenuPanel *, s32, s32, s32, s32, s32, s32)
 
void filemenu_draw_contents_file_1_info (MenuPanel *, s32, s32, s32, s32, s32, s32)
 
void filemenu_draw_contents_file_1_title (MenuPanel *, s32, s32, s32, s32, s32, s32)
 
void filemenu_draw_contents_file_2_info (MenuPanel *, s32, s32, s32, s32, s32, s32)
 
void filemenu_draw_contents_file_2_title (MenuPanel *, s32, s32, s32, s32, s32, s32)
 
void filemenu_draw_contents_file_3_info (MenuPanel *, s32, s32, s32, s32, s32, s32)
 
void filemenu_draw_contents_file_3_title (MenuPanel *, s32, s32, s32, s32, s32, s32)
 
void filemenu_yesno_draw_options_contents (MenuPanel *, s32, s32, s32, s32, s32, s32)
 
void filemenu_yesno_draw_prompt_contents (MenuPanel *, s32, s32, s32, s32, s32, s32)
 
void filemenu_info_draw_message_contents (MenuPanel *, s32, s32, s32, s32, s32, s32)
 
void filemenu_draw_contents_file_create_header (MenuPanel *, s32, s32, s32, s32, s32, s32)
 
void filemenu_draw_contents_choose_name (MenuPanel *, s32, s32, s32, s32, s32, s32)
 
void filemenu_draw_cursor (MenuPanel *, s32, s32, s32, s32, s32, s32)
 
void filemenu_draw_contents_copy_arrow (MenuPanel *, s32, s32, s32, s32, s32, s32)
 
void filemenu_main_init (MenuPanel *)
 
void filemenu_main_handle_input (MenuPanel *)
 
void filemenu_main_update (MenuPanel *)
 
void filemenu_main_cleanup (MenuPanel *)
 
void filemenu_yesno_init (MenuPanel *)
 
void filemenu_yesno_handle_input (MenuPanel *)
 
void filemenu_yesno_update (MenuPanel *)
 
void filemenu_yesno_cleanup (MenuPanel *)
 
void filemenu_info_init (MenuPanel *)
 
void filemenu_info_handle_input (MenuPanel *)
 
void filemenu_info_update (MenuPanel *)
 
void filemenu_info_cleanup (MenuPanel *)
 
void filemenu_choose_name_init (MenuPanel *)
 
void filemenu_choose_name_handle_input (MenuPanel *)
 
void filemenu_choose_name_update (MenuPanel *)
 
void filemenu_choose_name_cleanup (MenuPanel *)
 
void filemenu_draw_message (u8 *, s32, s32, s32, s32, u32)
 
void filemenu_draw_rect (s32 ulx, s32 uly, s32 lrx, s32 lry, s32 tileIdx, s32 uls, s32 ult, s32 dsdx, s32 dtdy)
 

Variables

MenuPanelfilemenu_menus []
 
s32 filemenu_CopyToFileIdx
 
s32 filemenu_pressedButtons
 
s32 filemenu_cursorHudElem
 
s32 filemenu_heldButtons
 
s8 filemenu_filename_pos
 
s32 filemenu_CopyFromFileIdx
 
s8 filemenu_currentMenu
 
s32 filemenu_8024C09C
 
s32 filemenu_cursorHudElemID [1]
 
s32 filemenu_8024C0A4 [3]
 
s32 filemenu_hudElemIDs [20]
 
s32 filemenu_createfile_hudElems [4]
 
u8 filemenu_filename [8]
 
WindowStyleCustom filemenu_windowStyles []
 
u8 filemenu_createfile_gridData []
 

Macro Definition Documentation

◆ CENTER_WINDOW_X

#define CENTER_WINDOW_X ( id)
Value:
(((gWindows[id].parent != WIN_NONE) \
? (gWindows[gWindows[id].parent].width / 2) \
: (SCREEN_WIDTH / 2)) \
- (gWindows[id].width / 2))
@ WIN_NONE
Definition enums.h:5240
#define SCREEN_WIDTH
Definition macros.h:105
Window gWindows[64]
Definition windows.c:23

Definition at line 6 of file filemenu.h.

6#define CENTER_WINDOW_X(id) (((gWindows[id].parent != WIN_NONE) \
7 ? (gWindows[gWindows[id].parent].width / 2) \
8 : (SCREEN_WIDTH / 2)) \
9 - (gWindows[id].width / 2))

Referenced by filemenu_choose_name_handle_input(), filemenu_choose_name_init(), filemenu_main_handle_input(), filemenu_main_init(), and filemenu_yesno_handle_input().

◆ CENTER_WINDOW_Y

#define CENTER_WINDOW_Y ( id)
Value:
(((gWindows[id].parent != WIN_NONE) \
? (gWindows[gWindows[id].parent].height / 2) \
: (SCREEN_HEIGHT / 2)) \
- (gWindows[id].height / 2))
#define SCREEN_HEIGHT
Definition macros.h:106

Definition at line 11 of file filemenu.h.

11#define CENTER_WINDOW_Y(id) (((gWindows[id].parent != WIN_NONE) \
12 ? (gWindows[gWindows[id].parent].height / 2) \
13 : (SCREEN_HEIGHT / 2)) \
14 - (gWindows[id].height / 2))

Referenced by filemenu_main_handle_input(), and filemenu_yesno_handle_input().

◆ WINDOW_UPDATE_FUNC

#define WINDOW_UPDATE_FUNC ( name)
Value:
void (name)( \
s32 windowIdx,\
s32* flags,\
s32* posX, s32* posY, s32* posZ,\
f32* scaleX, f32* scaleY,\
f32* rotX, f32* rotY, f32* rotZ,\
s32* darkening,\
s32* opacity);\
s8 flags
Definition demo_api.c:15

Definition at line 75 of file filemenu.h.

75#define WINDOW_UPDATE_FUNC(name) void (name)( \
76 s32 windowIdx,\
77 s32* flags,\
78 s32* posX, s32* posY, s32* posZ,\
79 f32* scaleX, f32* scaleY,\
80 f32* rotX, f32* rotY, f32* rotZ,\
81 s32* darkening,\
82 s32* opacity);\
83

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
FILE_MENU_MAIN 
FILE_MENU_CONFIRM 
FILE_MENU_MESSAGE 
FILE_MENU_INPUT_NAME 

Definition at line 16 of file filemenu.h.

16 {
17 FILE_MENU_MAIN = 0, // file selection
18 FILE_MENU_CONFIRM = 1, // confirmation prompt is open
19 FILE_MENU_MESSAGE = 2, // message is displayed, e.g. "File X has been deleted."
20 FILE_MENU_INPUT_NAME = 3, // "Enter a file name!" screen
21};
@ FILE_MENU_INPUT_NAME
Definition filemenu.h:20
@ FILE_MENU_CONFIRM
Definition filemenu.h:18
@ FILE_MENU_MESSAGE
Definition filemenu.h:19
@ FILE_MENU_MAIN
Definition filemenu.h:17

◆ anonymous enum

anonymous enum
Enumerator
FM_MAIN_SELECT_FILE 
FM_MAIN_SELECT_DELETE 
FM_MAIN_SELECT_COPY_FROM 
FM_MAIN_SELECT_COPY_TO 
FM_CONFIRM_DELETE 
FM_CONFIRM_CREATE 
FM_CONFIRM_COPY 
FM_CONFIRM_START 
FM_MESSAGE_DELETED 
FM_MESSAGE_COPIED 
FM_MESSAGE_CREATED 
FM_INPUT_CHARSET_A 
FM_INPUT_CHARSET_B 

Definition at line 23 of file filemenu.h.

23 {
24 FM_MAIN_SELECT_FILE = 0, // choose which file to load
25 FM_MAIN_SELECT_DELETE = 1, // choose which file to delete
28
31 FM_CONFIRM_COPY = 2, // unused
33
37
40};
@ FM_MESSAGE_COPIED
Definition filemenu.h:35
@ FM_MAIN_SELECT_FILE
Definition filemenu.h:24
@ FM_CONFIRM_START
Definition filemenu.h:32
@ FM_MESSAGE_CREATED
Definition filemenu.h:36
@ FM_CONFIRM_COPY
Definition filemenu.h:31
@ FM_MESSAGE_DELETED
Definition filemenu.h:34
@ FM_MAIN_SELECT_COPY_TO
Definition filemenu.h:27
@ FM_MAIN_SELECT_DELETE
Definition filemenu.h:25
@ FM_INPUT_CHARSET_A
Definition filemenu.h:38
@ FM_CONFIRM_CREATE
Definition filemenu.h:30
@ FM_MAIN_SELECT_COPY_FROM
Definition filemenu.h:26
@ FM_INPUT_CHARSET_B
Definition filemenu.h:39
@ FM_CONFIRM_DELETE
Definition filemenu.h:29

◆ anonymous enum

anonymous enum
Enumerator
FM_MAIN_OPT_FILE_1 
FM_MAIN_OPT_FILE_2 
FM_MAIN_OPT_FILE_3 
FM_MAIN_OPT_FILE_4 
FM_MAIN_OPT_DELETE 
FM_MAIN_OPT_COPY 
FM_MAIN_OPT_CANCEL 

Definition at line 42 of file filemenu.h.

42 {
50};
@ FM_MAIN_OPT_DELETE
Definition filemenu.h:47
@ FM_MAIN_OPT_COPY
Definition filemenu.h:48
@ FM_MAIN_OPT_FILE_1
Definition filemenu.h:43
@ FM_MAIN_OPT_FILE_3
Definition filemenu.h:45
@ FM_MAIN_OPT_FILE_4
Definition filemenu.h:46
@ FM_MAIN_OPT_CANCEL
Definition filemenu.h:49
@ FM_MAIN_OPT_FILE_2
Definition filemenu.h:44

Function Documentation

◆ filemenu_update_show_name_input()

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 )

Definition at line 329 of file filemenu_common.c.

337 {
338 Window* window = &gWindows[windowIdx];
339 s32 updateCounter = window->updateCounter;
340
341 if (updateCounter == 0) {
342 window->flags &= ~WINDOW_FLAG_HIDDEN;
343 }
344
345 if (updateCounter < ARRAY_COUNT(D_80249BDC)) {
346 *posX += D_80249BDC[updateCounter];
347 } else {
348 *posX += D_80249BDC[ARRAY_COUNT(D_80249BDC) - 1];
349 window->flags &= ~WINDOW_FLAG_INITIAL_ANIMATION;
350 }
351}
s16 D_80249BDC[16]
#define ARRAY_COUNT(arr)
Definition macros.h:40

Referenced by filemenu_main_handle_input().

◆ filemenu_update_show_options_left()

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 )

Definition at line 353 of file filemenu_common.c.

361 {
362 Window* window = &gWindows[windowIdx];
363 s32 updateCounter = window->updateCounter;
364
365 if (updateCounter == 0) {
366 window->flags &= ~WINDOW_FLAG_HIDDEN;
367 }
368
369 if (updateCounter < ARRAY_COUNT(D_80249BFC)) {
370 *posX -= D_80249BFC[updateCounter];
371 } else {
372 *posX -= D_80249BFC[ARRAY_COUNT(D_80249BFC) - 1];
373 window->flags &= ~WINDOW_FLAG_INITIAL_ANIMATION;
374 }
375}
s16 D_80249BFC[16]

Referenced by filemenu_info_handle_input(), and filemenu_main_handle_input().

◆ filemenu_update_show_options_right()

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 )

Definition at line 377 of file filemenu_common.c.

385 {
386 Window* window = &gWindows[windowIdx];
387 s32 updateCounter = window->updateCounter;
388
389 if (updateCounter == 0) {
390 window->flags &= ~WINDOW_FLAG_HIDDEN;
391 }
392
393 if (updateCounter < ARRAY_COUNT(D_80249C1C)) {
394 *posX += D_80249C1C[updateCounter];
395 } else {
396 *posX += D_80249C1C[ARRAY_COUNT(D_80249C1C) - 1];
397 window->flags &= ~WINDOW_FLAG_INITIAL_ANIMATION;
398 }
399}
s16 D_80249C1C[16]

Referenced by filemenu_info_handle_input(), and filemenu_main_handle_input().

◆ filemenu_update_show_options_bottom()

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 )

Definition at line 401 of file filemenu_common.c.

409 {
410 Window* window = &gWindows[windowIdx];
411 s32 updateCounter = window->updateCounter;
412
413 if (updateCounter == 0) {
414 window->flags &= ~WINDOW_FLAG_HIDDEN;
415 }
416
417 if (updateCounter < ARRAY_COUNT(D_80249C3C)) {
418 *posY += D_80249C3C[updateCounter];
419 } else {
420 *posY += D_80249C3C[ARRAY_COUNT(D_80249C3C) - 1];
421 window->flags &= ~WINDOW_FLAG_INITIAL_ANIMATION;
422 }
423}
s16 D_80249C3C[16]

Referenced by filemenu_info_handle_input(), and filemenu_main_handle_input().

◆ filemenu_update_show_with_rotation()

void filemenu_update_show_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 )

Definition at line 575 of file filemenu_common.c.

583 {
584 Window* window = &gWindows[windowIdx];
585 s32 updateCounter = window->updateCounter;
586
587 if (updateCounter == 0) {
588 window->flags &= ~WINDOW_FLAG_HIDDEN;
589 }
590
591 if (updateCounter < ARRAY_COUNT(D_80249CF4)) {
592 *rotY += D_80249CF4[updateCounter];
594 } else {
595 *flags = 0;
596 window->flags &= ~WINDOW_FLAG_INITIAL_ANIMATION;
597 }
598}
@ DRAW_FLAG_ROTSCALE
Definition enums.h:5003
@ DRAW_FLAG_CULL_BACK
Definition enums.h:5006
s16 D_80249CF4[16]

Referenced by filemenu_choose_name_handle_input(), and filemenu_yesno_handle_input().

◆ filemenu_update_hidden_name_input()

void filemenu_update_hidden_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 )

Definition at line 470 of file filemenu_common.c.

478 {
479 Window* window = &gWindows[windowIdx];
480 s32 updateCounter = window->updateCounter;
481
482 if (updateCounter < ARRAY_COUNT(D_80249C90)) {
483 *posX -= D_80249C90[updateCounter];
484 } else {
485 *posX -= D_80249C90[ARRAY_COUNT(D_80249C90) - 1];
486 window->flags &= ~WINDOW_FLAG_INITIAL_ANIMATION;
487 window->flags |= WINDOW_FLAG_HIDDEN;
488 }
489}
@ WINDOW_FLAG_HIDDEN
Updated but not rendered.
Definition enums.h:4995
s16 D_80249C90[10]

Referenced by filemenu_choose_name_handle_input(), and filemenu_yesno_handle_input().

◆ filemenu_update_hidden_options_left()

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 )

Definition at line 491 of file filemenu_common.c.

499 {
500 Window* window = &gWindows[windowIdx];
501 s32 updateCounter = window->updateCounter;
502
503 if (updateCounter < ARRAY_COUNT(D_80249CA4)) {
504 *posX += D_80249CA4[updateCounter];
505 } else {
506 *posX += D_80249CA4[ARRAY_COUNT(D_80249CA4) - 1];
507 window->flags &= ~WINDOW_FLAG_INITIAL_ANIMATION;
508 window->flags |= WINDOW_FLAG_HIDDEN;
509 }
510}
s16 D_80249CA4[10]

Referenced by filemenu_main_handle_input().

◆ filemenu_update_hidden_options_right()

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 )

Definition at line 512 of file filemenu_common.c.

520 {
521 Window* window = &gWindows[windowIdx];
522 s32 updateCounter = window->updateCounter;
523
524 if (updateCounter < ARRAY_COUNT(D_80249CB8)) {
525 *posX -= D_80249CB8[updateCounter];
526 } else {
527 *posX -= D_80249CB8[ARRAY_COUNT(D_80249CB8) - 1];
528 window->flags &= ~WINDOW_FLAG_INITIAL_ANIMATION;
529 window->flags |= WINDOW_FLAG_HIDDEN;
530 }
531}
s16 D_80249CB8[10]

Referenced by filemenu_main_handle_input().

◆ filemenu_update_hidden_title()

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 )

Definition at line 533 of file filemenu_common.c.

541 {
542 Window* window = &gWindows[windowIdx];
543 s32 updateCounter = window->updateCounter;
544
545 if (updateCounter < ARRAY_COUNT(D_80249CCC)) {
546 *posY += D_80249CCC[updateCounter];
547 } else {
548 *posY += D_80249CCC[ARRAY_COUNT(D_80249CCC) - 1];
549 window->flags &= ~WINDOW_FLAG_INITIAL_ANIMATION;
550 window->flags |= WINDOW_FLAG_HIDDEN;
551 }
552}
s16 D_80249CCC[10]

Referenced by filemenu_main_handle_input().

◆ filemenu_update_hidden_options_bottom()

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 )

Definition at line 554 of file filemenu_common.c.

562 {
563 Window* window = &gWindows[windowIdx];
564 s32 updateCounter = window->updateCounter;
565
566 if (updateCounter < ARRAY_COUNT(D_80249CE0)) {
567 *posY -= D_80249CE0[updateCounter];
568 } else {
569 *posY -= D_80249CE0[ARRAY_COUNT(D_80249CE0) - 1];
570 window->flags &= ~WINDOW_FLAG_INITIAL_ANIMATION;
571 window->flags |= WINDOW_FLAG_HIDDEN;
572 }
573}
s16 D_80249CE0[10]

Referenced by filemenu_main_handle_input().

◆ filemenu_update_hidden_with_rotation()

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 )

Definition at line 600 of file filemenu_common.c.

608 {
609 Window* window = &gWindows[windowIdx];
610 s32 updateCounter = window->updateCounter;
611
612 if (updateCounter < 10) { // TODO: array count?
613 *rotY += -D_80249D14[updateCounter];
615 } else {
616 *flags = 0;
617 window->flags &= ~WINDOW_FLAG_INITIAL_ANIMATION;
618 window->flags |= WINDOW_FLAG_HIDDEN;
619 }
620}
s16 D_80249D14[16]

Referenced by filemenu_main_handle_input().

◆ filemenu_update_select_file()

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 )

Definition at line 622 of file filemenu_common.c.

630 {
631 Window* window = &gWindows[windowIdx];
632 Window* parent = &gWindows[window->parent];
633 s32 updateCounter = window->updateCounter;
634 f32 temp_f4 = updateCounter / 16.0f;
635 s32 widthDelta = (parent->width / 2) - (window->width / 2);
636 s32 heightDelta = (parent->height / 2) - (window->height / 2) - 34;
637
638 if (updateCounter < 16) {
639 *posX += -window->pos.x + (((f32) (widthDelta - window->pos.x) * temp_f4) + window->pos.x);
640 *posY += -window->pos.y + (((f32) (heightDelta - window->pos.y) * temp_f4) + window->pos.y);
641 } else {
642 *posX += -window->pos.x + ((f32) (widthDelta - window->pos.x) + window->pos.x);
643 *posY += -window->pos.y + ((f32) (heightDelta - window->pos.y) + window->pos.y);
644 window->flags &= ~WINDOW_FLAG_INITIAL_ANIMATION;
645 }
646}

Referenced by filemenu_main_handle_input().

◆ filemenu_update_deselect_file()

void filemenu_update_deselect_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 )

Definition at line 648 of file filemenu_common.c.

656 {
657 Window* window = &gWindows[windowIdx];
658 s32 updateCounter = window->updateCounter;
659 f32 temp_f4 = 1.0f - (updateCounter / 16.0f);
660
661 if (updateCounter < 16) {
662 *posX += -window->pos.x + (((80 - window->pos.x) * temp_f4) + window->pos.x);
663 *posY += -window->pos.y + (((36 - window->pos.y) * temp_f4) + window->pos.y);
664 } else {
665 *posX += -window->pos.x + ((80 - window->pos.x) * 0.0f + window->pos.x);
666 *posY += -window->pos.y + ((36 - window->pos.y) * 0.0f + window->pos.y);
667 window->flags &= ~WINDOW_FLAG_INITIAL_ANIMATION;
668 }
669}

Referenced by filemenu_yesno_handle_input().

◆ filemenu_update_show_name_confirm()

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 )

Definition at line 671 of file filemenu_common.c.

679 {
680 Window* window = &gWindows[windowIdx];
681 s32 updateCounter = window->updateCounter;
682 u32 counter;
683
684 gDPPipeSync(gMainGfxPos++);
685 gDPSetCycleType(gMainGfxPos++, G_CYC_1CYCLE);
686 gDPSetCombineMode(gMainGfxPos++, G_CC_PRIMITIVE, G_CC_PRIMITIVE);
687 gDPSetRenderMode(gMainGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2);
688 gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, 140);
689
690 if (updateCounter < 10) {
691 s32 x = updateCounter * 16;
692 s32 y = updateCounter * 12;
693 filemenu_draw_rect(0, 0, SCREEN_WIDTH * 4, y * 4, 0, 0, 0, 0, 0);
694 filemenu_draw_rect(0, (SCREEN_HEIGHT - y) * 4, SCREEN_WIDTH * 4, SCREEN_HEIGHT * 4, 0, 0, 0, 0, 0);
695 filemenu_draw_rect(0, y * 4, x * 4, (SCREEN_HEIGHT - y) * 4, 0, 0, 0, 0, 0);
696 filemenu_draw_rect((SCREEN_WIDTH - x) * 4, y * 4, SCREEN_WIDTH * 4, (SCREEN_HEIGHT - y) * 4, 0, 0, 0, 0, 0);
697 } else {
698 filemenu_draw_rect(0, 0, SCREEN_WIDTH * 4, SCREEN_HEIGHT * 4, 0, 0, 0, 0, 0);
699 }
700
701 counter = updateCounter - 10;
702 if (counter < 10) {
703 window->flags &= ~WINDOW_FLAG_HIDDEN;
704 *posY -= D_80249D34[counter];
705 }
706 if (updateCounter >= 20) {
707 window->flags &= ~WINDOW_FLAG_INITIAL_ANIMATION;
708 }
709}
void filemenu_draw_rect(s32 ulx, s32 uly, s32 lrx, s32 lry, s32 tileIdx, s32 uls, s32 ult, s32 dsdx, s32 dtdy)
s16 D_80249D34[10]
Gfx * gMainGfxPos
Definition cam_main.c:15

Referenced by filemenu_choose_name_handle_input(), and filemenu_main_handle_input().

◆ filemenu_update_hidden_name_confirm()

void filemenu_update_hidden_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 )

Definition at line 711 of file filemenu_common.c.

719 {
720 Window* window = &gWindows[windowIdx];
721 s32 updateCounter = window->updateCounter;
722
723 if (updateCounter < ARRAY_COUNT(D_80249D48)) {
724 gDPPipeSync(gMainGfxPos++);
725 gDPSetCycleType(gMainGfxPos++, G_CYC_1CYCLE);
726 gDPSetCombineMode(gMainGfxPos++, G_CC_PRIMITIVE, G_CC_PRIMITIVE);
727 gDPSetRenderMode(gMainGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2);
728 gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, 140 - updateCounter * 14);
729 filemenu_draw_rect(0, 0, 1280, 960, 0, 0, 0, 0, 0);
730 *posY -= D_80249D48[updateCounter];
731 } else {
732 window->flags &= ~WINDOW_FLAG_INITIAL_ANIMATION;
733 window->flags |= WINDOW_FLAG_HIDDEN;
734 }
735}
s16 D_80249D48[10]

Referenced by filemenu_yesno_handle_input().

◆ unused_main_menu_window_darkening()

void unused_main_menu_window_darkening ( s32 windowIdx,
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 204 of file windows.c.

205 {
206 Window* window = &gWindows[windowID];
207 s32 counter = window->updateCounter;
208
209 if (counter < 10) {
210 *darkening = (counter + 1) * 16;
211 } else {
212 *darkening = 160;
214 }
215}
@ WINDOW_FLAG_INITIAL_ANIMATION
Definition enums.h:4996
Window gWindows[64]
Definition windows.c:23

◆ filemenu_update_show_title()

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 )

Definition at line 425 of file filemenu_common.c.

433 {
434 Window* window = &gWindows[windowIdx];
435 s32 updateCounter = window->updateCounter;
436
437 if (updateCounter == 0) {
438 window->flags &= ~WINDOW_FLAG_HIDDEN;
439 }
440
441 if (updateCounter < ARRAY_COUNT(D_80249C5C)) {
442 *posY -= D_80249C5C[updateCounter];
443 } else {
444 *posY -= D_80249C5C[ARRAY_COUNT(D_80249C5C) - 1];
445 window->flags &= ~WINDOW_FLAG_INITIAL_ANIMATION;
446 }
447}
s16 D_80249C5C[16]

◆ filemenu_draw_file_name()

void filemenu_draw_file_name ( u8 * filename,
s32 length,
s32 x,
s32 y,
s32 alpha,
s32 arg5,
s32 arg6,
s32 charWidth )

Definition at line 672 of file filemenu_msg.c.

672 {
673 s32 i;
674
675 for (i = 0; i < length; i++) {
676 u32 c = filename[i];
677
678 if (c != 0xF7) {
679#if VERSION_IQUE
680 // Numerals get drawn one pixel lower than other characters
681 if (c >= MSG_CHAR_DIGIT_0 && c <= MSG_CHAR_DIGIT_9) {
682 filemenu_draw_message((u8*)c, x + (i * charWidth), y + 1, alpha, arg5, arg6);
683 } else {
684 filemenu_draw_message((u8*)c, x + (i * charWidth), y, alpha, arg5, arg6);
685 }
686#elif VERSION_PAL
687 s32 offset = (8 - msg_get_print_char_width(c, 0, 0, 1.0f, 0, 1)) / 2;
688
689 filemenu_draw_message((u8*)c, x + (i * charWidth) + offset, y, alpha, arg5, arg6);
690#else
691 filemenu_draw_message((u8*)c, x + (i * charWidth), y, alpha, arg5, arg6);
692#endif
693 }
694 }
695}
@ MSG_CHAR_DIGIT_0
Definition enums.h:5872
@ MSG_CHAR_DIGIT_9
Definition enums.h:5881
s32 msg_get_print_char_width(s32 character, s32 charset, s32 variation, f32 msgScale, s32 overrideCharWidth, u8 flags)
Definition msg.c:1578
void filemenu_draw_message(u8 *message, s32 x, s32 y, s32 alpha, s32 color, u32 flags)

Referenced by filemenu_draw_contents_file_create_header(), filemenu_draw_contents_file_title(), and filemenu_yesno_draw_prompt_contents().

◆ 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
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)
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_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_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_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_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_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_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_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_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_yesno_draw_options_contents()

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

Definition at line 86 of file filemenu_yesno.c.

91 {
92 s32 xOffset1;
93 s32 yOffset1;
94 s32 xOffset2;
95 s32 yOffset2;
96 s32 cursorGoalXOffset;
97 s32 cursorGoalYOffset;
98
99 switch (menu->state) {
101 xOffset1 = 28;
102 yOffset1 = 4;
103 xOffset2 = 28;
104 yOffset2 = 21;
105 break;
107 xOffset1 = 28;
108 yOffset1 = 4;
109 xOffset2 = 28;
110 yOffset2 = 21;
111 break;
112 case FM_CONFIRM_COPY:
113 xOffset1 = 28;
114 yOffset1 = 4;
115 xOffset2 = 28;
116 yOffset2 = 21;
117 break;
118 case FM_CONFIRM_START:
119 xOffset1 = 28;
120 yOffset1 = 4;
121 xOffset2 = 28;
122 yOffset2 = 21;
123 break;
124 }
125
126 filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_YES), baseX + xOffset1, baseY + yOffset1, 255, MSG_PAL_WHITE, 0);
127 filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_NO), baseX + xOffset2, baseY + yOffset2, 255, MSG_PAL_WHITE, 0);
128
130 if (menu->selected == 0) {
131 cursorGoalXOffset = xOffset1 - 10;
132 cursorGoalYOffset = yOffset1 + 8;
133 } else {
134 cursorGoalXOffset = xOffset2 - 10;
135 cursorGoalYOffset = yOffset2 + 8;
136 }
137 filemenu_set_cursor_goal_pos(WIN_FILES_CONFIRM_OPTIONS, baseX + cursorGoalXOffset, baseY + cursorGoalYOffset);
138 }
139}
@ MSG_PAL_WHITE
Definition enums.h:5405
@ FILE_MESSAGE_NO
Definition enums.h:5353
@ FILE_MESSAGE_YES
Definition enums.h:5352
@ WIN_FILES_CONFIRM_OPTIONS
Definition enums.h:5294
s8 filemenu_currentMenu

◆ filemenu_yesno_draw_prompt_contents()

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

Definition at line 141 of file filemenu_yesno.c.

146 {
147 s32 selectedFile;
148 s32 msgColor;
149 s32 xOffset;
150 s32 i;
151
152 switch (menu->state) {
158 case FM_CONFIRM_COPY:
159 filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_FILE_22), baseX + 10, baseY + 4, 0xFF, 0, 0);
163 break;
166
167 for (i = ARRAY_COUNT(filemenu_filename) - 1; i >= 0; i--) {
169 break;
170 }
171 }
172
173 xOffset = (147 - (i * 11)) / 2;
174 filemenu_draw_file_name(filemenu_filename, i + 1, baseX + xOffset, baseY + 22, 0xFF, 0, 8, 0xB);
175 xOffset += (i + 1) * 11;
176 filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_PERIOD_20), baseX + xOffset, baseY + 22, 0xFF, 0, 0);
177 filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_OK), baseX + 70, baseY + 38, 0xFF, 0, 0);
178 break;
179 case FM_CONFIRM_START:
180 selectedFile = filemenu_menus[FILE_MENU_MAIN]->selected;
181 if (gSaveSlotMetadata[selectedFile].validData) {
182 msgColor = MSG_PAL_WHITE;
183 } else {
184 msgColor = MSG_PAL_RED;
185 }
190 break;
191 }
192}
@ DRAW_NUMBER_STYLE_ALIGN_RIGHT
drawn to the left of posX
Definition enums.h:5393
@ DRAW_NUMBER_STYLE_MONOSPACE
Definition enums.h:5394
@ MSG_PAL_RED
Definition enums.h:5412
@ DRAW_NUMBER_CHARSET_NORMAL
Definition enums.h:5400
@ FILE_MESSAGE_WILL_BE_DELETED
Definition enums.h:5361
@ FILE_MESSAGE_FILE_22
Definition enums.h:5360
@ FILE_MESSAGE_PERIOD_20
Definition enums.h:5358
@ FILE_MESSAGE_START_GAME_WITH
Definition enums.h:5363
@ FILE_MESSAGE_OK_TO_COPY_TO_THIS_FILE
Definition enums.h:5362
@ FILE_MESSAGE_DELETE
Definition enums.h:5354
@ FILE_MESSAGE_QUESTION
Definition enums.h:5376
@ FILE_MESSAGE_OK
Definition enums.h:5359
@ FILE_MESSAGE_FILE_NAME_IS
Definition enums.h:5357
@ MSG_CHAR_READ_SPACE
Definition enums.h:6050
void filemenu_draw_file_name(u8 *, s32, s32, s32, s32, s32, s32, s32)
MenuPanel * filemenu_menus[]
u8 filemenu_filename[8]
#define DELETE_FILE_NUMBER_X
#define START_GAME_QMARK_X
#define NUMBER_OFFSET_Y
#define START_GAME_FILE_X
#define START_GAME_NUMBER_X
#define START_GAME_START_WITH_X
#define DELETE_FILE_QMARK_X
#define DELETE_FILE_DELETE_X
#define DELETE_FILE_FILE_X
#define COPY_FILE_NUMBER_X
SaveSlotMetadata gSaveSlotMetadata[4]
void draw_number(s32 value, s32 x, s32 y, s32 variableWidthChars, s32 palette, s32 opacity, u16 style)
Definition msg.c:2223

◆ filemenu_info_draw_message_contents()

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

Definition at line 59 of file filemenu_info.c.

64 {
65#if VERSION_PAL
66 s32 xOffset;
67
68 switch (menu->page) {
70 filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_28), baseX + 10, baseY + 4, 255, 0, 0);
71 xOffset = D_filemenu_80250934[gCurrentLanguage] + 10;
72 filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_FILE_26), baseX + xOffset, baseY + 4, 255, 0, 0);
73 xOffset += D_filemenu_802508FC[gCurrentLanguage];
74 draw_number(filemenu_menus[FILE_MENU_MAIN]->selected + 1, baseX + xOffset, baseY + 6, 0, 0, 255, 3);
75 xOffset++;
77 break;
80 xOffset = D_filemenu_80250948[gCurrentLanguage] + 10;
81 filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_FILE_26), baseX + xOffset, baseY + 4, 255, 0, 0);
82 xOffset += D_filemenu_802508FC[gCurrentLanguage];
83 draw_number(filemenu_CopyFromFileIdx + 1, baseX + xOffset, baseY + 6, 0, 0, 255, 3);
84 filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_TO), baseX + 10, baseY + 18, 255, 0, 0);
85 xOffset = D_filemenu_8025094C[gCurrentLanguage] + 10;
86 filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_FILE_26), baseX + xOffset, baseY + 18, 255, 0, 0);
87 xOffset += D_filemenu_802508FC[gCurrentLanguage];
88 draw_number(filemenu_CopyToFileIdx + 1, baseX + xOffset, baseY + 0x14, 0, 0, 255, 3);
89 xOffset += D_filemenu_80250950[gCurrentLanguage];
91 break;
93 filemenu_draw_message(filemenu_get_menu_message(0x20), baseX + 10, baseY + 4, 255, 0, 0);
94 xOffset = D_filemenu_80250968[gCurrentLanguage] + 10;
95 filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_FILE_26), baseX + xOffset, baseY + 4, 255, 0, 0);
96 xOffset += D_filemenu_802508FC[gCurrentLanguage];
97 draw_number(filemenu_menus[FILE_MENU_MAIN]->selected + 1, baseX + xOffset, baseY + 6, 0, 0, 255, 3);
98 xOffset++;
99 filemenu_draw_message(filemenu_get_menu_message(0x1F), baseX + xOffset, baseY + 4, 255, 0, 0);
100 break;
101 }
102#else
103 switch (menu->state) {
105 filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_FILE_26), baseX + 10, baseY + 4, 255, 0, 0);
108 break;
110#if VERSION_IQUE
112 filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_FILE_26), baseX + 42, baseY + 7, 255, 0, 0);
114 filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_TO), baseX + 84, baseY + 7, 255, 0, 0);
115 filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_FILE_26), baseX + 100, baseY + 7, 255, 0, 0);
118#else
120 filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_FILE_26), baseX + 84, baseY + 4, 255, 0, 0);
122 filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_TO), baseX + 10, baseY + 18, 255, 0, 0);
123 filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_FILE_26), baseX + 30, baseY + 18, 255, 0, 0);
126#endif
127 break;
129 filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_FILE_26), baseX + 10, baseY + 4, 255, 0, 0);
132 break;
133 }
134#endif
136}
@ FILE_MESSAGE_28
Definition enums.h:5366
@ FILE_MESSAGE_FILE_26
Definition enums.h:5364
@ FILE_MESSAGE_PERIOD_34
Definition enums.h:5377
@ FILE_MESSAGE_COPY_FROM
Definition enums.h:5367
@ FILE_MESSAGE_HAS_BEEN_DELETED
Definition enums.h:5365
@ FILE_MESSAGE_TO
Definition enums.h:5368
@ FILE_MESSAGE_HAS_BEEN_CREATED
Definition enums.h:5369
s32 filemenu_CopyFromFileIdx
s32 filemenu_CopyToFileIdx
#define NUMBER_OFFSET_Y
#define CREATE_SUCCESS_NUMBER_X
void filemenu_set_cursor_alpha(s32 arg0)
#define gCurrentLanguage
Definition variables.h:115

◆ filemenu_draw_contents_file_create_header()

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

Definition at line 93 of file filemenu_createfile.c.

98 {
99#if VERSION_PAL
100 s32 temp_s2 = D_filemenu_8025095C[gCurrentLanguage]; // 36
101 s32 yOffset;
102 s32 xOffset;
103 s32 i;
104
106 filemenu_draw_file_name(filemenu_filename, 8, baseX + temp_s2 + 2, baseY + 22, 255, 0, 0, 11);
107 yOffset = 41;
108
109 for (i = 0; i < ARRAY_COUNT(filemenu_filename); i++) {
110 xOffset = temp_s2 + 6 + i * 11;
111 hud_element_set_render_pos(filemenu_createfile_hudElems[1], baseX + xOffset, baseY + yOffset);
112 if (i == 0) {
114 } else {
116 }
117 }
118
120 if (filemenu_filename_pos == 8) {
121 xOffset = temp_s2 + 86;
122 } else {
123 xOffset = temp_s2 + 9 + filemenu_filename_pos * 11;
124 }
125 yOffset = 45;
126 hud_element_set_render_pos(filemenu_createfile_hudElems[0], baseX + xOffset, baseY + yOffset);
128 }
129#else
130 s32 xOffset;
131 s32 yOffset;
132 s32 i;
133
135 filemenu_draw_file_name(filemenu_filename, 8, baseX + 36, baseY + 22, 255, 0, 0, 11);
136 xOffset = 41;
137
138 for (i = 0; i < ARRAY_COUNT(filemenu_filename); i++) {
139 hud_element_set_render_pos(filemenu_createfile_hudElems[1], baseX + 42 + (i * 11), baseY + xOffset);
140 if (i == 0) {
142 } else {
144 }
145 }
146
148 s32 phi_v0 = 122;
149
150 if (filemenu_filename_pos != 8) {
151 phi_v0 = (filemenu_filename_pos * 11) + 45;
152 }
153 hud_element_set_render_pos(filemenu_createfile_hudElems[0], baseX + phi_v0, baseY + 45);
155 }
156#endif
157}
@ FILE_MESSAGE_ENTER_A_FILE_NAME
Definition enums.h:5375
s32 filemenu_createfile_hudElems[4]
s8 filemenu_filename_pos
void hud_element_draw_next(s32 id)

◆ filemenu_draw_contents_choose_name()

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

Definition at line 173 of file filemenu_createfile.c.

178 {
179 s32 changeLayoutOffset;
180 s32 currentPage;
181 s32 previousPage;
182 s32 page;
183 s32 row, col;
184 s32 xOffset, yOffset;
185 s32 c, specialChar;
186 s32 layer;
187 s32 flags;
188 s32 color;
189 s32 xNudge;
191
193 changeLayoutOffset = window->updateCounter * 2;
194 currentPage = menu->state;
195 previousPage = menu->state != 1;
196 if (changeLayoutOffset > 16) {
197 changeLayoutOffset = 16;
198 }
199
200 for (row = 0; row < menu->numRows; row++) {
201 for (layer = 0; layer < 2; layer++) {
202 yOffset = 15 * row + 4;
203 if (layer == 0) {
204 page = currentPage;
205 gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE,
206 baseX,
207 baseY + yOffset,
208 baseX + width,
209 baseY + yOffset + changeLayoutOffset);
210 } else {
211 page = previousPage;
212 gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE,
213 baseX,
214 baseY + yOffset + changeLayoutOffset,
215 baseX + width,
216 baseY + yOffset + 16);
217 }
218
219 for (col = 0; col < menu->numCols; col++) {
220 c = menu->gridData[page * menu->numCols * menu->numRows + menu->numCols * row + col];
221 if (c != MSG_CHAR_MENU_SPACE) {
222 if (col == menu->col && row == menu->row) {
223 flags = 8;
224 color = 0;
225 } else {
226 flags = 0;
227 color = 10;
228 }
229 xOffset = KEYBOARD_COL_WIDTH * col + 12;
230 yOffset = KEYBOARD_ROW_HEIGHT * row + 5;
231#if VERSION_PAL
232 xNudge = msg_get_print_char_width(c, 0, 0, 1.0f, 0, 1);
233#endif
234 specialChar = c;
235 if (c >= 0xA2 && c < 0xF0) {
236 if (c >= MSG_CHAR_MENU_SPACE) {
237 hud_element_set_render_pos(filemenu_createfile_hudElems[2], baseX + xOffset + 22, baseY + yOffset + 8);
239 flags = 0;
240 }
241 }
242 if (specialChar == MSG_CHAR_MENU_SPACE) {
243 xOffset -= 1;
244 }
245 if (specialChar == MSG_CHAR_MENU_BACK) {
246#if VERSION_PAL
247 xOffset += 16;
248#else
249 xOffset += 5;
250#endif
251 }
252 if (specialChar == MSG_CHAR_MENU_END) {
253#if VERSION_PAL
255 xOffset += 4;
256 } else {
257 xOffset += 8;
258 }
259#else
260 xOffset += 8;
261#endif
262 }
263 if (specialChar == MSG_CHAR_MENU_SPACE || specialChar == MSG_CHAR_MENU_BACK || specialChar == MSG_CHAR_MENU_END) {
264 yOffset -= 1;
265 xNudge = 9;
266 }
267#if VERSION_PAL
268 filemenu_draw_message((u8*)c, baseX + xOffset + ((8 - xNudge) / 2), baseY + yOffset, 255, color, flags);
269#else
270 filemenu_draw_message((u8*)c, baseX + xOffset, baseY + yOffset, 255, color, flags);
271#endif
272 }
273 }
274 }
275 }
276 gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, baseX, baseY, baseX + width, baseY + height);
277 } else {
278 for (col = 0; col < menu->numCols; col++) {
279 for (row = 0; row < menu->numRows; row++) {
280 c = menu->gridData[menu->state * menu->numCols * menu->numRows + menu->numCols * row + col];
281 if (c != MSG_CHAR_MENU_SPACE) {
282 if (col == menu->col && row == menu->row) {
283 flags = 8;
284 color = 0;
285 } else {
286 flags = 0;
287 color = 10;
288 }
289 xOffset = col * KEYBOARD_COL_WIDTH + 12;
290 yOffset = row * KEYBOARD_ROW_HEIGHT + 5;
291#if VERSION_PAL
292 xNudge = msg_get_print_char_width(c, 0, 0, 1.0f, 0, 1);
293#endif
294 specialChar = c;
295 if (c >= 0xA2 && c < 0xF0) {
296 if (c >= MSG_CHAR_MENU_SPACE) {
297 hud_element_set_render_pos(filemenu_createfile_hudElems[2], baseX + xOffset + 22, baseY + yOffset + 8);
299 flags = 0;
300 }
301 }
302 if (specialChar == MSG_CHAR_MENU_SPACE) {
303 xOffset -= 1;
304 }
305 if (specialChar == MSG_CHAR_MENU_BACK) {
306 xOffset += FILEMENU_C9_OFFSET;
307 }
308 if (specialChar == MSG_CHAR_MENU_END) {
309#if VERSION_PAL
311 xOffset += 4;
312 } else {
313 xOffset += 8;
314 }
315#else
316 xOffset += 8;
317#endif
318 }
319 if (specialChar == MSG_CHAR_MENU_SPACE || specialChar == MSG_CHAR_MENU_BACK || specialChar == MSG_CHAR_MENU_END) {
320 yOffset -= 1;
321 xNudge = 9;
322 }
323#if VERSION_PAL
324 filemenu_draw_message((u8*)c, baseX + xOffset + ((8 - xNudge) / 2), baseY + yOffset, 255, color, flags);
325#else
326 filemenu_draw_message((u8*)c, baseX + xOffset, baseY + yOffset, 255, color, flags);
327#endif
328 }
329 }
330 }
331 }
332
335 D_8024A18C = -4;
336 }
337 D_8024A18C++;
339 baseX + 2 + menu->col * KEYBOARD_COL_WIDTH,
340 baseY + 13 + menu->row * KEYBOARD_ROW_HEIGHT);
341 }
342}
@ 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
@ LANGUAGE_DE
Definition enums.h:6401
@ MSG_CHAR_MENU_SPACE
Definition enums.h:6036
@ MSG_CHAR_MENU_BACK
Definition enums.h:6039
@ MSG_CHAR_MENU_END
Definition enums.h:6040
@ WIN_FILES_INPUT_KEYBOARD
Definition enums.h:5293
s32 filemenu_heldButtons
#define KEYBOARD_ROW_HEIGHT
s32 msg_get_print_char_width(s32 character, s32 charset, s32 variation, f32 msgScale, s32 overrideCharWidth, u8 flags)
Definition msg.c:1578
#define FILEMENU_C9_OFFSET
void filemenu_update_change_layout(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 KEYBOARD_COL_WIDTH
s32 D_8024A18C
WindowUpdateFunc fpUpdate
void(* func)(s32 windowIndex, s32 *flags, s32 *posX, s32 *posY, s32 *posZ, f32 *scaleX, f32 *scaleY, f32 *rotX, f32 *rotY, f32 *rotZ, s32 *darkening, s32 *opacity)

◆ filemenu_draw_cursor()

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

Definition at line 737 of file filemenu_common.c.

737 {
738 s32 temp_a1;
739
741 temp_a1 = filemenu_cursor_alpha;
742 if (temp_a1 > 0) {
743 if (temp_a1 > 255) {
744 temp_a1 = 255;
745 }
749 }
750}
s32 filemenu_cursor_alpha
BSS s32 filemenu_cursorHudElemID[1]
s32 filemenu_cursor_posX
void filemenu_update_cursor(void)
s32 filemenu_cursor_posY
void hud_element_set_alpha(s32 id, s32 opacity)

◆ filemenu_draw_contents_copy_arrow()

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

Definition at line 752 of file filemenu_common.c.

754{
755 Matrix4f transformMtx, tempMtx;
756 f32 startX, startZ;
757 f32 endX, endZ;
758 f32 rotAngle;
759
761 return;
762 }
763
764 // check for invalid selection
765 if (filemenu_menus[FILE_MENU_MAIN]->selected >= 4) {
766 return;
767 }
768
769 // check if different files are selected
771 return;
772 }
773
774 // do not show while message menu is showing
776 return;
777 }
778
779 switch (filemenu_CopyFromFileIdx) {
780 case 0:
781 startX = 130.0f;
782 startZ = 90.0f;
783 break;
784 case 1:
785 startX = 190.0f;
786 startZ = 90.0f;
787 break;
788 case 2:
789 startX = 130.0f;
790 startZ = 150.0f;
791 break;
792 default:
793 startX = 190.0f;
794 startZ = 150.0f;
795 break;
796 }
797
798 switch (filemenu_menus[FILE_MENU_MAIN]->selected) {
799 case 0:
800 endX = 130.0f;
801 endZ = 90.0f;
802 break;
803 case 1:
804 endX = 190.0f;
805 endZ = 90.0f;
806 break;
807 case 2:
808 endX = 130.0f;
809 endZ = 150.0f;
810 break;
811 default:
812 endX = 190.0f;
813 endZ = 150.0f;
814 break;
815 }
816
817 rotAngle = -atan2(startX, startZ, endX, endZ) - 90.0f;
818
819 gSPViewport(gMainGfxPos++, &D_80249D60);
820
821 guOrthoF(transformMtx, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, -100.0f, 100.0f, 1.0f);
823
825 G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
826 gSPDisplayList(gMainGfxPos++, filemenu_dl_copyarrow);
827 gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, 128);
828 gDPSetEnvColor(gMainGfxPos++, 0, 0, 0, 0);
829
830 guTranslateF(transformMtx, startX + 4.0f, startZ + 4.0f, 0.0f);
831 guScaleF(tempMtx, -1.0f, 1.0f, 1.0f);
832 guMtxCatF(tempMtx, transformMtx, transformMtx);
833 guRotateF(tempMtx, rotAngle, 0.0f, 0.0f, 1.0f);
834 guMtxCatF(tempMtx, transformMtx, transformMtx);
836
838 G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
839 gSPDisplayList(gMainGfxPos++, D_8024B6F0);
840 gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
841
843 guMtxCatF(tempMtx, transformMtx, transformMtx);
845
847 G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
848 gDPSetTileSize(gMainGfxPos++, 1, (gGameStatusPtr->frameCounter * 8) % 512, 0,
849 ((gGameStatusPtr->frameCounter * 8) % 512) + 60, 0);
850 gSPDisplayList(gMainGfxPos++, D_8024B708);
851 gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
852 gDPSetPrimColor(gMainGfxPos++, 0, 0, 230, 230, 230, 255);
853 gDPSetEnvColor(gMainGfxPos++, 232, 40, 160, 0);
854
855 guTranslateF(transformMtx, startX, startZ, 0.0f);
856 guScaleF(tempMtx, -1.0f, 1.0f, 1.0f);
857 guMtxCatF(tempMtx, transformMtx, transformMtx);
858 guRotateF(tempMtx, rotAngle, 0.0f, 0.0f, 1.0f);
859 guMtxCatF(tempMtx, transformMtx, transformMtx);
861
863 G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
864 gSPDisplayList(gMainGfxPos++, D_8024B6F0);
865 gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
866
868 guMtxCatF(tempMtx, transformMtx, transformMtx);
870
872 G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
873 gDPSetTileSize(gMainGfxPos++, 1, (gGameStatusPtr->frameCounter * 8) % 512, 0,
874 ((gGameStatusPtr->frameCounter * 8) % 512) + 60, 0);
875 gSPDisplayList(gMainGfxPos++, D_8024B708);
876 gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
877}
Mtx matrixStack[0x200]
f32 Matrix4f[4][4]
#define guRotateF
#define guOrthoF
#define guMtxF2L
#define guTranslateF
#define guMtxCatF
#define atan2
#define guScaleF
Gfx D_8024B708[]
MenuPanel * filemenu_menus[]
f32 CopyArrowAnimOffsets[]
BSS s8 filemenu_currentMenu
BSS s32 filemenu_CopyFromFileIdx
Vp D_80249D60
Gfx D_8024B6F0[]
Gfx filemenu_dl_copyarrow[]
Definition filemenu_gfx.c:8
u16 gMatrixListPos
Definition main_loop.c:45
DisplayContext * gDisplayContext
Definition cam_main.c:16

◆ 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

◆ 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_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
@ 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_CONFIRM_PROMPT
Definition enums.h:5290
@ WIN_FILES_SLOT4_BODY
Definition enums.h:5303
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)
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)
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)
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
SaveFileSummary gSaveSlotSummary[4]
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[]
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)

◆ filemenu_yesno_init()

void filemenu_yesno_init ( MenuPanel * tab)

Definition at line 194 of file filemenu_yesno.c.

194 {
195 s32 i;
196
197 for (i = 0; i < ARRAY_COUNT(filemenu_yesno_windowBPs); i++) {
199 }
200
202 tab->initialized = TRUE;
203}
MenuWindowBP filemenu_yesno_windowBPs[]

◆ filemenu_yesno_handle_input()

void filemenu_yesno_handle_input ( MenuPanel * menu)

Definition at line 205 of file filemenu_yesno.c.

205 {
206 s32 oldSelected = menu->selected;
207 s32 selected;
208
210 menu->row--;
211 if (menu->row < 0) {
212 menu->row = 0;
213 }
214 }
215
217 menu->row++;
218 if (menu->row >= menu->numRows) {
219 menu->row = menu->numRows - 1;
220 }
221 }
222
224
225 if (oldSelected != menu->selected) {
227 }
228
230 filemenu_set_selected(menu, 0, 0);
232 }
233
235 s32 i;
236
238
239 switch (menu->selected) {
240 case 0: // YES
241 switch (menu->state) {
251
253 for (i = 0; i < ARRAY_COUNT(gSaveSlotSummary->filename); i++) {
255 }
256 gSaveSlotSummary[selected].level = 0;
257 gSaveSlotSummary[selected].timePlayed = 0;
258 gSaveSlotSummary[selected].spiritsRescued = 0;
259 fio_erase_game(selected);
260 gSaveSlotMetadata[selected].hasData = FALSE;
261 gSaveSlotMetadata[selected].validData = FALSE;
262 break;
263 case FM_CONFIRM_COPY:
276 break;
283
285 for (i = 0; i < ARRAY_COUNT(gSaveSlotSummary->filename); i++) {
287 }
288 fio_save_game(selected);
289 gSaveSlotMetadata[selected].hasData = TRUE;
290 gSaveSlotMetadata[selected].validData = TRUE;
291 strcpy(gSaveSlotMetadata[selected].modName, DX_MOD_NAME);
292
314 break;
315 case FM_CONFIRM_START:
318 selected != (u8)gSaveGlobals.lastFileSelected)
319 {
323 }
324 fio_load_game(selected);
326 break;
327 }
328 break;
329 case 1: // NO
330 switch (menu->state) {
332 case FM_CONFIRM_COPY:
335 break;
339 break;
340 case FM_CONFIRM_START:
356 break;
357 }
358 break;
359 }
360 }
361
364 filemenu_set_selected(menu, 0, 1);
365
366 switch (menu->state) {
368 case FM_CONFIRM_COPY:
371 break;
375 break;
376 case FM_CONFIRM_START:
392 break;
393 }
394 }
395}
#define NEW_GAME_STORY_PROGRESS
Story progress when starting a new game.
Definition config.h:38
#define NEW_GAME_MAP_ID
Map to load when starting a new game.
Definition config.h:32
#define NEW_GAME_ENTRY_ID
Entry to use when starting a new game.
Definition config.h:35
@ SOUND_MENU_CHANGE_SELECTION
Definition enums.h:698
void filemenu_update_deselect_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_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_show_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)
void filemenu_update_hidden_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)
b32 fio_save_globals(void)
Definition fio.c:90
void fio_erase_game(s32 saveSlot)
Definition fio.c:220
SaveGlobals gSaveGlobals
Definition fio.c:20
void clear_saved_variables(void)
Definition vars_access.c:5
void get_map_IDs_by_name_checked(const char *mapName, s16 *areaID, s16 *mapID)
Same as get_map_IDs_by_name, but will panic if the map doesn't exist.
Definition world.c:247
s32 evt_set_variable(Evt *script, Bytecode var, s32 value)
Definition evt.c:1847
void clear_player_data(void)
Definition inventory.c:49
@ GB_StoryProgress
s32 useMonoSound
Definition versioning.h:14
u32 lastFileSelected
Definition versioning.h:15

◆ filemenu_yesno_update()

void filemenu_yesno_update ( MenuPanel * menu)

Definition at line 397 of file filemenu_yesno.c.

397 {
398}

◆ filemenu_yesno_cleanup()

void filemenu_yesno_cleanup ( MenuPanel * menu)

Definition at line 400 of file filemenu_yesno.c.

400 {
401}

◆ filemenu_info_init()

void filemenu_info_init ( MenuPanel * tab)

Definition at line 138 of file filemenu_info.c.

138 {
139 s32 i;
140
141 for (i = 0; i < ARRAY_COUNT(filemenu_info_windowBPs); i++) {
143 }
144
146 tab->initialized = TRUE;
147}
MenuWindowBP filemenu_info_windowBPs[]

◆ filemenu_info_handle_input()

◆ filemenu_info_update()

void filemenu_info_update ( MenuPanel * menu)

Definition at line 173 of file filemenu_info.c.

173 {
174}

◆ filemenu_info_cleanup()

void filemenu_info_cleanup ( MenuPanel * menu)

Definition at line 176 of file filemenu_info.c.

176 {
177}

◆ filemenu_choose_name_init()

◆ filemenu_choose_name_handle_input()

void filemenu_choose_name_handle_input ( MenuPanel * menu)

Definition at line 366 of file filemenu_createfile.c.

366 {
367 s32 prevSelected = menu->selected;
368 s32 i;
369
370#if VERSION_PAL
373#endif
374
376 menu->col--;
377 if (menu->col < 0) {
378 menu->col = menu->numCols - 1;
379 }
381 menu->col++;
382 if (menu->col >= menu->numCols) {
383 menu->col = 0;
384 }
385 if (menu->row == menu->numRows - 1) {
386 if (menu->col > 10) {
387 menu->col = 0;
388 } else if (menu->col == 8 || menu->col == 9) {
389 menu->col = 10;
390 }
391#if !VERSION_PAL
392 else if (menu->col == 5 || menu->col == 6) {
393 menu->col = 7;
394 }
395#endif
396 }
397 }
398
400 menu->row--;
401 if (menu->row < 0) {
402 menu->row = menu->numRows - 1;
403 }
405 menu->row++;
406 if (menu->row >= menu->numRows) {
407 menu->row = 0;
408 }
409 }
410
411 if (menu->row == menu->numRows - 1) {
412 if (menu->col > 10) {
413 menu->col = 10;
414 } else if (menu->col == 8 || menu->col == 9) {
415 menu->col = 7;
416 }
417#if !VERSION_PAL
418 else if (menu->col == 5 || menu->col == 6) {
419 menu->col = 4;
420 }
421#endif
422 }
423
425 if (prevSelected != menu->selected) {
427 }
428
430 switch (menu->selected) {
435 }
440 }
441 break;
443 if (menu->state != FM_INPUT_CHARSET_B) {
446 filemenu_set_selected(menu, menu->col, menu->row);
448 }
449 break;
451 if (menu->state != FM_INPUT_CHARSET_A) {
454 filemenu_set_selected(menu, menu->col, menu->row);
456 }
457 break;
459 // handled later to combine with B-input detection
460 break;
462 for (i = 0; i < ARRAY_COUNT(filemenu_filename); i++) {
464 break;
465 }
466 }
467 if (i == ARRAY_COUNT(filemenu_filename)) {
469 break;
470 }
471
478
479#if VERSION_PAL
481#else
483#endif
487
491 return;
492 default:
495 filemenu_filename[7] = menu->selected;
496 } else {
501 }
502 }
503 break;
504 }
505
508 && menu->selected != MSG_CHAR_MENU_BACK
510 ) {
511 filemenu_set_selected(menu, menu->numCols - 3, menu->numRows - 1);
512 }
513 }
514
518 if (filemenu_filename_pos < 0) {
534 return;
535 }
536
539 }
540 }
541
543 for (i = 0; i < ARRAY_COUNT(filemenu_filename); i++) {
545 break;
546 }
547 }
548 if (i == ARRAY_COUNT(filemenu_filename)) {
550 return;
551
552 }
553
556
561
562#if VERSION_PAL
564#else
566#endif
570
574 }
575}
@ SOUND_CREATE_FILE_MOVE_CURSOR
Definition enums.h:1540
@ SOUND_CREATE_FILE_BACKSPACE
Definition enums.h:1542
@ SOUND_CREATE_FILE_CHANGE_CHARSET
Definition enums.h:1543
@ SOUND_CREATE_FILE_SET_CHARACTER
Definition enums.h:1541
@ MSG_CHAR_MENU_USE_CHARSET_B
Definition enums.h:6037
@ MSG_CHAR_MENU_USE_CHARSET_A
Definition enums.h:6038

◆ filemenu_choose_name_update()

void filemenu_choose_name_update ( MenuPanel * menu)

Definition at line 577 of file filemenu_createfile.c.

577 {
578}

◆ filemenu_choose_name_cleanup()

void filemenu_choose_name_cleanup ( MenuPanel * menu)

Definition at line 580 of file filemenu_createfile.c.

580 {
581 s32 i;
582
583 for (i = 0; i < 3; i++) {
585 }
586}

◆ filemenu_draw_message()

void filemenu_draw_message ( u8 * message,
s32 x,
s32 y,
s32 alpha,
s32 color,
u32 flags )

Definition at line 617 of file filemenu_msg.c.

617 {
618 s32 flag1 = flags & 1;
619 s32 flag2 = flags >> 3;
620
621 flag2 &= 1;
622 if (flag1 == 1) {
623 y -= 2;
624 }
625
626 if ((u32)message < 0x100) {
627 if ((u32)message - 0xA2 >= 0x4E) {
628 filemenu_draw_char((s32)message, x, y, flag1, color, flag2);
629 return;
630 }
631 if ((s32) message >= 0xC6) {
632#if VERSION_PAL
633 message = (u8*) filemenu_specialSymbols[gCurrentLanguage][(s32) message - 0xC6];
634#else
635 message = (u8*)filemenu_specialSymbols[(s32) message - 0xC6];
636#endif
637 }
638 }
639
640 if ((s32) message < 0) {
641 u8* tmp;
642 filemenu_draw_char(0xF3, x, y, flag1, color, flag2);
643 tmp = message;
644 while (*tmp != 0xFD) {
645#if VERSION_IQUE
646 int ord = *tmp;
647 if (ord >= MSG_CHAR_MULTIBYTE_FIRST && ord <= MSG_CHAR_MULTIBYTE_LAST) {
648 tmp++;
649 ord = (*tmp << 8) + ord;
650 x += filemenu_draw_char(ord, x, y + 1, flag1, color, flag2);
651 } else {
652 ord = *tmp;
653 x += filemenu_draw_char(ord, x, y, flag1, color, flag2);
654 }
655 tmp++;
656#else
657 x += filemenu_draw_char(*tmp, x, y, flag1, color, flag2);
658 tmp++;
659#endif
660 }
661 }
662}
s32 filemenu_specialSymbols[]
s32 filemenu_draw_char(s32 c, s32 x, s32 y, s32 flag1, s32 color, s32 flag2)

Referenced by filemenu_draw_contents_choose_name(), filemenu_draw_contents_file_create_header(), filemenu_draw_contents_file_info(), filemenu_draw_contents_file_title(), filemenu_draw_contents_option_center(), filemenu_draw_contents_option_left(), filemenu_draw_contents_option_right(), filemenu_draw_contents_title(), filemenu_draw_file_name(), filemenu_info_draw_message_contents(), filemenu_yesno_draw_options_contents(), and filemenu_yesno_draw_prompt_contents().

◆ filemenu_draw_rect()

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

Definition at line 141 of file filemenu_common.c.

141 {
142 if (ulx <= -2688 || uly <= -2688 || lrx <= 0 || lry <= 0) {
143 return;
144 }
145 if (ulx >= 1280 || uly >= 960 || lrx >= 2688 || lry >= 2688) {
146 return;
147 }
148 gSPScisTextureRectangle(gMainGfxPos++, ulx, uly, lrx, lry, tileIdx, uls, ult, dsdx, dtdy);
149}

Referenced by filemenu_draw_char(), filemenu_update_hidden_name_confirm(), and filemenu_update_show_name_confirm().

Variable Documentation

◆ filemenu_menus

◆ filemenu_CopyToFileIdx

s32 filemenu_CopyToFileIdx
extern

◆ filemenu_pressedButtons

◆ filemenu_cursorHudElem

s32 filemenu_cursorHudElem
extern

Definition at line 120 of file filemenu_common.c.

Referenced by filemenu_init().

◆ filemenu_heldButtons

◆ filemenu_filename_pos

s8 filemenu_filename_pos
extern

◆ filemenu_CopyFromFileIdx

◆ filemenu_currentMenu

◆ filemenu_8024C09C

s32 filemenu_8024C09C
extern

Definition at line 125 of file filemenu_common.c.

◆ filemenu_cursorHudElemID

s32 filemenu_cursorHudElemID[1]
extern

Definition at line 126 of file filemenu_common.c.

Referenced by filemenu_cleanup(), filemenu_draw_cursor(), and filemenu_init().

◆ filemenu_8024C0A4

s32 filemenu_8024C0A4[3]
extern

Definition at line 127 of file filemenu_common.c.

◆ filemenu_hudElemIDs

◆ filemenu_createfile_hudElems

◆ filemenu_filename

◆ filemenu_windowStyles

WindowStyleCustom filemenu_windowStyles[]
extern

Definition at line 6 of file filemenu_styles.c.

6 {
7 {
8 .background = {
9 .imgData = NULL,
10 .fmt = G_IM_FMT_RGBA,
11 .bitDepth = G_IM_SIZ_4b,
12 .width = 0,
13 .height = 0,
14 .unk_07 = { 0, 0, 0, 0},
15 .size = 0
16 },
17 .corners = {
18 .imgData = NULL,
19 .fmt = G_IM_FMT_RGBA,
20 .bitDepth = G_IM_SIZ_4b,
21 .size1 = { .x = 0, .y = 0},
22 .size2 = { .x = 0, .y = 0},
23 .size3 = { .x = 0, .y = 0},
24 .size4 = { .x = 0, .y = 0},
25 .unk_0D = { 0, 0, 0}
26 },
27 .unk_1C = { 0, 0, 0, 0},
28 .opaqueCombineMode = gsDPSetCombineMode(PM_CC_WINDOW_7, G_CC_PASS2),
29 .transparentCombineMode = gsDPSetCombineMode(PM_CC_WINDOW_4, G_CC_PASS2),
30 .color1 = { 64, 92, 246, 255 },
31 .color2 = { 0, 0, 0, 0 },
32 },
33 {
34 .background = {
35 .imgData = NULL,
36 .fmt = G_IM_FMT_I,
37 .bitDepth = G_IM_SIZ_4b,
38 .width = 16,
39 .height = 16,
40 .unk_07 = { 0, 0, 0, 0},
41 .size = 128
42 },
43 .corners = {
44 .imgData = NULL,
45 .fmt = G_IM_FMT_IA,
46 .bitDepth = G_IM_SIZ_8b,
47 .size1 = { .x = 8, .y = 8},
48 .size2 = { .x = 8, .y = 8},
49 .size3 = { .x = 8, .y = 8},
50 .size4 = { .x = 8, .y = 8},
51 .unk_0D = { 0, 0, 0}
52 },
53 .unk_1C = { 0, 0, 0, 0},
54 .opaqueCombineMode = gsDPNoOp(),
55 .transparentCombineMode = gsDPNoOp(),
56 .color1 = { 0, 255, 0, 0 },
57 .color2 = { 0, 0, 0, 0 },
58 },
59 {
60 .background = {
61 .imgData = NULL,
62 .fmt = G_IM_FMT_RGBA,
63 .bitDepth = G_IM_SIZ_4b,
64 .width = 0,
65 .height = 0,
66 .unk_07 = { 0, 0, 0, 0},
67 .size = 0
68 },
69 .corners = {
70 .imgData = NULL,
71 .fmt = G_IM_FMT_RGBA,
72 .bitDepth = G_IM_SIZ_4b,
73 .size1 = { .x = 0, .y = 0},
74 .size2 = { .x = 0, .y = 0},
75 .size3 = { .x = 0, .y = 0},
76 .size4 = { .x = 0, .y = 0},
77 .unk_0D = { 0, 0, 0}
78 },
79 .unk_1C = { 0, 0, 0, 0},
80 .opaqueCombineMode = gsDPNoOp(),
81 .transparentCombineMode = gsDPNoOp(),
82 .color1 = { 0, 0, 0, 0 },
83 .color2 = { 0, 0, 0, 0 },
84 },
85 {
86 .background = {
87 .imgData = NULL,
88 .fmt = G_IM_FMT_RGBA,
89 .bitDepth = G_IM_SIZ_4b,
90 .width = 0,
91 .height = 0,
92 .unk_07 = { 0, 0, 0, 0},
93 .size = 0
94 },
95 .corners = {
96 .imgData = D_8024A400,
97 .fmt = G_IM_FMT_RGBA,
98 .bitDepth = G_IM_SIZ_32b,
99 .size1 = { .x = 16, .y = 16},
100 .size2 = { .x = 16, .y = 16},
101 .size3 = { .x = 16, .y = 16},
102 .size4 = { .x = 16, .y = 16},
103 .unk_0D = { 0, 0, 0}
104 },
105 .unk_1C = { 0, 0, 0, 0},
106 .opaqueCombineMode = gsDPSetCombineMode(PM_CC_WINDOW_5, G_CC_PASS2),
107 .transparentCombineMode = gsDPSetCombineMode(PM_CC_WINDOW_6, G_CC_PASS2),
108 .color1 = { 0, 0, 0, 255 },
109 .color2 = { 0, 0, 0, 0 },
110 },
111 {
112 .background = {
113 .imgData = NULL,
114 .fmt = G_IM_FMT_RGBA,
115 .bitDepth = G_IM_SIZ_4b,
116 .width = 0,
117 .height = 0,
118 .unk_07 = { 0, 0, 0, 0},
119 .size = 0
120 },
121 .corners = {
122 .imgData = D_8024B400,
123 .fmt = G_IM_FMT_IA,
124 .bitDepth = G_IM_SIZ_8b,
125 .size1 = { .x = 16, .y = 8},
126 .size2 = { .x = 16, .y = 8},
127 .size3 = { .x = 16, .y = 8},
128 .size4 = { .x = 16, .y = 8},
129 .unk_0D = { 0, 0, 0}
130 },
131 .unk_1C = { 0, 0, 0, 0},
132 .opaqueCombineMode = gsDPSetCombineMode(PM_CC_15, G_CC_PASS2),
133 .transparentCombineMode = gsDPSetCombineMode(PM_CC_14, G_CC_PASS2),
134 .color1 = { 215, 140, 150, 255 },
135 .color2 = { 125, 45, 35, 255 },
136 },
137 {
138 .background = {
139 .imgData = NULL,
140 .fmt = G_IM_FMT_RGBA,
141 .bitDepth = G_IM_SIZ_4b,
142 .width = 0,
143 .height = 0,
144 .unk_07 = { 0, 0, 0, 0},
145 .size = 0
146 },
147 .corners = {
148 .imgData = D_8024B400,
149 .fmt = G_IM_FMT_IA,
150 .bitDepth = G_IM_SIZ_8b,
151 .size1 = { .x = 16, .y = 8},
152 .size2 = { .x = 16, .y = 8},
153 .size3 = { .x = 16, .y = 8},
154 .size4 = { .x = 16, .y = 8},
155 .unk_0D = { 0, 0, 0}
156 },
157 .unk_1C = { 0, 0, 0, 0},
158 .opaqueCombineMode = gsDPSetCombineMode(PM_CC_15, G_CC_PASS2),
159 .transparentCombineMode = gsDPSetCombineMode(PM_CC_14, G_CC_PASS2),
160 .color1 = { 215, 140, 150, 255 },
161 .color2 = { 125, 45, 35, 255 },
162 },
163 {
164 .background = {
165 .imgData = NULL,
166 .fmt = G_IM_FMT_RGBA,
167 .bitDepth = G_IM_SIZ_4b,
168 .width = 0,
169 .height = 0,
170 .unk_07 = { 0, 0, 0, 0},
171 .size = 0
172 },
173 .corners = {
174 .imgData = D_8024B400,
175 .fmt = G_IM_FMT_IA,
176 .bitDepth = G_IM_SIZ_8b,
177 .size1 = { .x = 16, .y = 8},
178 .size2 = { .x = 16, .y = 8},
179 .size3 = { .x = 16, .y = 8},
180 .size4 = { .x = 16, .y = 8},
181 .unk_0D = { 0, 0, 0}
182 },
183 .unk_1C = { 0, 0, 0, 0},
184 .opaqueCombineMode = gsDPSetCombineMode(PM_CC_15, G_CC_PASS2),
185 .transparentCombineMode = gsDPSetCombineMode(PM_CC_14, G_CC_PASS2),
186 .color1 = { 215, 140, 150, 255 },
187 .color2 = { 125, 45, 35, 255 },
188 },
189 {
190 .background = {
191 .imgData = NULL,
192 .fmt = G_IM_FMT_RGBA,
193 .bitDepth = G_IM_SIZ_4b,
194 .width = 0,
195 .height = 0,
196 .unk_07 = { 0, 0, 0, 0},
197 .size = 0
198 },
199 .corners = {
200 .imgData = D_8024B400,
201 .fmt = G_IM_FMT_IA,
202 .bitDepth = G_IM_SIZ_8b,
203 .size1 = { .x = 16, .y = 8},
204 .size2 = { .x = 16, .y = 8},
205 .size3 = { .x = 16, .y = 8},
206 .size4 = { .x = 16, .y = 8},
207 .unk_0D = { 0, 0, 0}
208 },
209 .unk_1C = { 0, 0, 0, 0},
210 .opaqueCombineMode = gsDPSetCombineMode(PM_CC_15, G_CC_PASS2),
211 .transparentCombineMode = gsDPSetCombineMode(PM_CC_14, G_CC_PASS2),
212 .color1 = { 200, 200, 200, 255 },
213 .color2 = { 130, 130, 101, 255 },
214 },
215 {
216 .background = {
217 .imgData = NULL,
218 .fmt = G_IM_FMT_RGBA,
219 .bitDepth = G_IM_SIZ_4b,
220 .width = 0,
221 .height = 0,
222 .unk_07 = { 0, 0, 0, 0},
223 .size = 0
224 },
225 .corners = {
226 .imgData = D_8024B400,
227 .fmt = G_IM_FMT_IA,
228 .bitDepth = G_IM_SIZ_8b,
229 .size1 = { .x = 16, .y = 8},
230 .size2 = { .x = 16, .y = 8},
231 .size3 = { .x = 16, .y = 8},
232 .size4 = { .x = 16, .y = 8},
233 .unk_0D = { 0, 0, 0}
234 },
235 .unk_1C = { 0, 0, 0, 0},
236 .opaqueCombineMode = gsDPSetCombineMode(PM_CC_15, G_CC_PASS2),
237 .transparentCombineMode = gsDPSetCombineMode(PM_CC_14, G_CC_PASS2),
238 .color1 = { 200, 200, 200, 255 },
239 .color2 = { 130, 130, 101, 255 },
240 },
241 {
242 .background = {
243 .imgData = NULL,
244 .fmt = G_IM_FMT_RGBA,
245 .bitDepth = G_IM_SIZ_4b,
246 .width = 0,
247 .height = 0,
248 .unk_07 = { 0, 0, 0, 0},
249 .size = 0
250 },
251 .corners = {
252 .imgData = D_8024B400,
253 .fmt = G_IM_FMT_IA,
254 .bitDepth = G_IM_SIZ_8b,
255 .size1 = { .x = 16, .y = 8},
256 .size2 = { .x = 16, .y = 8},
257 .size3 = { .x = 16, .y = 8},
258 .size4 = { .x = 16, .y = 8},
259 .unk_0D = { 0, 0, 0}
260 },
261 .unk_1C = { 0, 0, 0, 0},
262 .opaqueCombineMode = gsDPSetCombineMode(PM_CC_15, G_CC_PASS2),
263 .transparentCombineMode = gsDPSetCombineMode(PM_CC_14, G_CC_PASS2),
264 .color1 = { 200, 200, 200, 255 },
265 .color2 = { 130, 130, 101, 255 },
266 },
267 {
268 .background = {
269 .imgData = NULL,
270 .fmt = G_IM_FMT_RGBA,
271 .bitDepth = G_IM_SIZ_4b,
272 .width = 0,
273 .height = 0,
274 .unk_07 = { 0, 0, 0, 0},
275 .size = 0
276 },
277 .corners = {
278 .imgData = D_8024B400,
279 .fmt = G_IM_FMT_IA,
280 .bitDepth = G_IM_SIZ_8b,
281 .size1 = { .x = 16, .y = 8},
282 .size2 = { .x = 16, .y = 8},
283 .size3 = { .x = 16, .y = 8},
284 .size4 = { .x = 16, .y = 8},
285 .unk_0D = { 0, 0, 0}
286 },
287 .unk_1C = { 0, 0, 0, 0},
288 .opaqueCombineMode = gsDPSetCombineMode(PM_CC_15, G_CC_PASS2),
289 .transparentCombineMode = gsDPSetCombineMode(PM_CC_14, G_CC_PASS2),
290 .color1 = { 200, 200, 200, 255 },
291 .color2 = { 130, 130, 101, 255 },
292 },
293 {
294 .background = {
295 .imgData = NULL,
296 .fmt = G_IM_FMT_RGBA,
297 .bitDepth = G_IM_SIZ_4b,
298 .width = 0,
299 .height = 0,
300 .unk_07 = { 0, 0, 0, 0},
301 .size = 0
302 },
303 .corners = {
304 .imgData = D_8024B400,
305 .fmt = G_IM_FMT_IA,
306 .bitDepth = G_IM_SIZ_8b,
307 .size1 = { .x = 16, .y = 8},
308 .size2 = { .x = 16, .y = 8},
309 .size3 = { .x = 16, .y = 8},
310 .size4 = { .x = 16, .y = 8},
311 .unk_0D = { 0, 0, 0}
312 },
313 .unk_1C = { 0, 0, 0, 0},
314 .opaqueCombineMode = gsDPSetCombineMode(PM_CC_15, G_CC_PASS2),
315 .transparentCombineMode = gsDPSetCombineMode(PM_CC_14, G_CC_PASS2),
316 .color1 = { 88, 92, 68, 255 },
317 .color2 = { 152, 143, 130, 255 },
318 },
319 {
320 .background = {
321 .imgData = NULL,
322 .fmt = G_IM_FMT_RGBA,
323 .bitDepth = G_IM_SIZ_4b,
324 .width = 0,
325 .height = 0,
326 .unk_07 = { 0, 0, 0, 0},
327 .size = 0
328 },
329 .corners = {
330 .imgData = D_8024B400,
331 .fmt = G_IM_FMT_IA,
332 .bitDepth = G_IM_SIZ_8b,
333 .size1 = { .x = 16, .y = 8},
334 .size2 = { .x = 16, .y = 8},
335 .size3 = { .x = 16, .y = 8},
336 .size4 = { .x = 16, .y = 8},
337 .unk_0D = { 0, 0, 0}
338 },
339 .unk_1C = { 0, 0, 0, 0},
340 .opaqueCombineMode = gsDPSetCombineMode(PM_CC_15, G_CC_PASS2),
341 .transparentCombineMode = gsDPSetCombineMode(PM_CC_14, G_CC_PASS2),
342 .color1 = { 88, 92, 68, 255 },
343 .color2 = { 152, 143, 130, 255 },
344 },
345 {
346 .background = {
347 .imgData = NULL,
348 .fmt = G_IM_FMT_RGBA,
349 .bitDepth = G_IM_SIZ_4b,
350 .width = 0,
351 .height = 0,
352 .unk_07 = { 0, 0, 0, 0},
353 .size = 0
354 },
355 .corners = {
356 .imgData = D_8024B400,
357 .fmt = G_IM_FMT_IA,
358 .bitDepth = G_IM_SIZ_8b,
359 .size1 = { .x = 16, .y = 8},
360 .size2 = { .x = 16, .y = 8},
361 .size3 = { .x = 16, .y = 8},
362 .size4 = { .x = 16, .y = 8},
363 .unk_0D = { 0, 0, 0}
364 },
365 .unk_1C = { 0, 0, 0, 0},
366 .opaqueCombineMode = gsDPSetCombineMode(PM_CC_15, G_CC_PASS2),
367 .transparentCombineMode = gsDPSetCombineMode(PM_CC_14, G_CC_PASS2),
368 .color1 = { 88, 92, 68, 255 },
369 .color2 = { 152, 143, 130, 255 },
370 },
371 {
372 .background = {
373 .imgData = NULL,
374 .fmt = G_IM_FMT_RGBA,
375 .bitDepth = G_IM_SIZ_4b,
376 .width = 0,
377 .height = 0,
378 .unk_07 = { 0, 0, 0, 0},
379 .size = 0
380 },
381 .corners = {
382 .imgData = D_8024B400,
383 .fmt = G_IM_FMT_IA,
384 .bitDepth = G_IM_SIZ_8b,
385 .size1 = { .x = 16, .y = 8},
386 .size2 = { .x = 16, .y = 8},
387 .size3 = { .x = 16, .y = 8},
388 .size4 = { .x = 16, .y = 8},
389 .unk_0D = { 0, 0, 0}
390 },
391 .unk_1C = { 0, 0, 0, 0},
392 .opaqueCombineMode = gsDPSetCombineMode(PM_CC_15, G_CC_PASS2),
393 .transparentCombineMode = gsDPSetCombineMode(PM_CC_14, G_CC_PASS2),
394 .color1 = { 88, 92, 68, 255 },
395 .color2 = { 152, 143, 130, 255 },
396 },
397 {
398 .background = {
399 .imgData = NULL,
400 .fmt = G_IM_FMT_RGBA,
401 .bitDepth = G_IM_SIZ_4b,
402 .width = 0,
403 .height = 0,
404 .unk_07 = { 0, 0, 0, 0},
405 .size = 0
406 },
407 .corners = {
408 .imgData = D_8024B400,
409 .fmt = G_IM_FMT_IA,
410 .bitDepth = G_IM_SIZ_8b,
411 .size1 = { .x = 16, .y = 8},
412 .size2 = { .x = 16, .y = 8},
413 .size3 = { .x = 16, .y = 8},
414 .size4 = { .x = 16, .y = 8},
415 .unk_0D = { 0, 0, 0}
416 },
417 .unk_1C = { 0, 0, 0, 0},
418 .opaqueCombineMode = gsDPSetCombineMode(PM_CC_15, G_CC_PASS2),
419 .transparentCombineMode = gsDPSetCombineMode(PM_CC_14, G_CC_PASS2),
420 .color1 = { 200, 200, 200, 255 },
421 .color2 = { 130, 130, 101, 255 },
422 },
423 {
424 .background = {
425 .imgData = NULL,
426 .fmt = G_IM_FMT_RGBA,
427 .bitDepth = G_IM_SIZ_4b,
428 .width = 0,
429 .height = 0,
430 .unk_07 = { 0, 0, 0, 0},
431 .size = 0
432 },
433 .corners = {
434 .imgData = D_8024B400,
435 .fmt = G_IM_FMT_IA,
436 .bitDepth = G_IM_SIZ_8b,
437 .size1 = { .x = 16, .y = 8},
438 .size2 = { .x = 16, .y = 8},
439 .size3 = { .x = 16, .y = 8},
440 .size4 = { .x = 16, .y = 8},
441 .unk_0D = { 0, 0, 0}
442 },
443 .unk_1C = { 0, 0, 0, 0},
444 .opaqueCombineMode = gsDPSetCombineMode(PM_CC_15, G_CC_PASS2),
445 .transparentCombineMode = gsDPSetCombineMode(PM_CC_14, G_CC_PASS2),
446 .color1 = { 255, 255, 255, 255 },
447 .color2 = { 200, 200, 170, 255 },
448 },
449 {
450 .background = {
451 .imgData = NULL,
452 .fmt = G_IM_FMT_RGBA,
453 .bitDepth = G_IM_SIZ_4b,
454 .width = 0,
455 .height = 0,
456 .unk_07 = { 0, 0, 0, 0},
457 .size = 0
458 },
459 .corners = {
460 .imgData = D_8024B400,
461 .fmt = G_IM_FMT_IA,
462 .bitDepth = G_IM_SIZ_8b,
463 .size1 = { .x = 16, .y = 8},
464 .size2 = { .x = 16, .y = 8},
465 .size3 = { .x = 16, .y = 8},
466 .size4 = { .x = 16, .y = 8},
467 .unk_0D = { 0, 0, 0}
468 },
469 .unk_1C = { 0, 0, 0, 0},
470 .opaqueCombineMode = gsDPSetCombineMode(PM_CC_15, G_CC_PASS2),
471 .transparentCombineMode = gsDPSetCombineMode(PM_CC_14, G_CC_PASS2),
472 .color1 = { 88, 92, 68, 255 },
473 .color2 = { 152, 143, 130, 255 },
474 },
475 {
476 .background = {
477 .imgData = NULL,
478 .fmt = G_IM_FMT_RGBA,
479 .bitDepth = G_IM_SIZ_4b,
480 .width = 0,
481 .height = 0,
482 .unk_07 = { 0, 0, 0, 0},
483 .size = 0
484 },
485 .corners = {
486 .imgData = D_8024B400,
487 .fmt = G_IM_FMT_IA,
488 .bitDepth = G_IM_SIZ_8b,
489 .size1 = { .x = 16, .y = 8},
490 .size2 = { .x = 16, .y = 8},
491 .size3 = { .x = 16, .y = 8},
492 .size4 = { .x = 16, .y = 8},
493 .unk_0D = { 0, 0, 0}
494 },
495 .unk_1C = { 0, 0, 0, 0},
496 .opaqueCombineMode = gsDPSetCombineMode(PM_CC_15, G_CC_PASS2),
497 .transparentCombineMode = gsDPSetCombineMode(PM_CC_14, G_CC_PASS2),
498 .color1 = { 255, 238, 106, 255 },
499 .color2 = { 146, 100, 26, 255 },
500 },
501 {
502 .background = {
503 .imgData = NULL,
504 .fmt = G_IM_FMT_RGBA,
505 .bitDepth = G_IM_SIZ_4b,
506 .width = 0,
507 .height = 0,
508 .unk_07 = { 0, 0, 0, 0},
509 .size = 0
510 },
511 .corners = {
512 .imgData = D_8024A400,
513 .fmt = G_IM_FMT_RGBA,
514 .bitDepth = G_IM_SIZ_32b,
515 .size1 = { .x = 16, .y = 16},
516 .size2 = { .x = 16, .y = 16},
517 .size3 = { .x = 16, .y = 16},
518 .size4 = { .x = 16, .y = 16},
519 .unk_0D = { 0, 0, 0}
520 },
521 .unk_1C = { 0, 0, 0, 0},
522 .opaqueCombineMode = gsDPSetCombineMode(PM_CC_WINDOW_5, G_CC_PASS2),
523 .transparentCombineMode = gsDPSetCombineMode(PM_CC_WINDOW_6, G_CC_PASS2),
524 .color1 = { 0, 0, 0, 255 },
525 .color2 = { 0, 0, 0, 0 },
526 },
527 {
528 .background = {
529 .imgData = NULL,
530 .fmt = G_IM_FMT_RGBA,
531 .bitDepth = G_IM_SIZ_4b,
532 .width = 0,
533 .height = 0,
534 .unk_07 = { 0, 0, 0, 0},
535 .size = 0
536 },
537 .corners = {
538 .imgData = D_8024A400,
539 .fmt = G_IM_FMT_RGBA,
540 .bitDepth = G_IM_SIZ_32b,
541 .size1 = { .x = 16, .y = 16},
542 .size2 = { .x = 16, .y = 16},
543 .size3 = { .x = 16, .y = 16},
544 .size4 = { .x = 16, .y = 16},
545 .unk_0D = { 0, 0, 0}
546 },
547 .unk_1C = { 0, 0, 0, 0},
548 .opaqueCombineMode = gsDPSetCombineMode(PM_CC_WINDOW_5, G_CC_PASS2),
549 .transparentCombineMode = gsDPSetCombineMode(PM_CC_WINDOW_6, G_CC_PASS2),
550 .color1 = { 0, 0, 0, 255 },
551 .color2 = { 0, 0, 0, 0 },
552 },
553 {
554 .background = {
555 .imgData = NULL,
556 .fmt = G_IM_FMT_RGBA,
557 .bitDepth = G_IM_SIZ_4b,
558 .width = 0,
559 .height = 0,
560 .unk_07 = { 0, 0, 0, 0},
561 .size = 0
562 },
563 .corners = {
564 .imgData = D_8024A400,
565 .fmt = G_IM_FMT_RGBA,
566 .bitDepth = G_IM_SIZ_32b,
567 .size1 = { .x = 16, .y = 16},
568 .size2 = { .x = 16, .y = 16},
569 .size3 = { .x = 16, .y = 16},
570 .size4 = { .x = 16, .y = 16},
571 .unk_0D = { 0, 0, 0}
572 },
573 .unk_1C = { 0, 0, 0, 0},
574 .opaqueCombineMode = gsDPSetCombineMode(PM_CC_WINDOW_5, G_CC_PASS2),
575 .transparentCombineMode = gsDPSetCombineMode(PM_CC_WINDOW_6, G_CC_PASS2),
576 .color1 = { 0, 0, 0, 255 },
577 .color2 = { 0, 0, 0, 0 },
578 },
579 {
580 .background = {
581 .imgData = NULL,
582 .fmt = G_IM_FMT_RGBA,
583 .bitDepth = G_IM_SIZ_4b,
584 .width = 0,
585 .height = 0,
586 .unk_07 = { 0, 0, 0, 0},
587 .size = 0
588 },
589 .corners = {
590 .imgData = D_8024B400,
591 .fmt = G_IM_FMT_IA,
592 .bitDepth = G_IM_SIZ_8b,
593 .size1 = { .x = 16, .y = 8},
594 .size2 = { .x = 16, .y = 8},
595 .size3 = { .x = 16, .y = 8},
596 .size4 = { .x = 16, .y = 8},
597 .unk_0D = { 0, 0, 0}
598 },
599 .unk_1C = { 0, 0, 0, 0},
600 .opaqueCombineMode = gsDPSetCombineMode(PM_CC_15, G_CC_PASS2),
601 .transparentCombineMode = gsDPSetCombineMode(PM_CC_14, G_CC_PASS2),
602 .color1 = { 255, 255, 255, 255 },
603 .color2 = { 200, 200, 170, 255 },
604 },
605};
u8 D_8024A400[]
u8 D_8024B400[]
#define PM_CC_WINDOW_5
Definition macros.h:441
#define PM_CC_WINDOW_4
Definition macros.h:440
#define PM_CC_14
Definition macros.h:301
#define PM_CC_WINDOW_6
Definition macros.h:442
#define PM_CC_15
Definition macros.h:302
#define PM_CC_WINDOW_7
Definition macros.h:443

Referenced by filemenu_main_update().

◆ filemenu_createfile_gridData

u8 filemenu_createfile_gridData[]
extern

Definition at line 324 of file filemenu_msg.c.

324 { 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D,
325 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A,
326 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D,
327 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A,
328 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x10, 0x0E, 0x0D, 0xF7,
329 0x00, 0x90, 0x91, 0x20, 0xC6, 0xF7, 0xF7, 0xC9, 0xF7, 0xF7, 0xCA, 0xF7, 0xF7
330};