Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
filemenu.h
Go to the documentation of this file.
1#ifndef _FILEMENU_H_
2#define _FILEMENU_H_
3
4#include "common.h"
5
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))
10
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))
15
16enum {
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};
22
23enum {
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};
41
42enum {
50};
51
53
54extern s32 filemenu_CopyToFileIdx;
56extern s32 filemenu_cursorHudElem;
57extern s32 filemenu_heldButtons;
58extern s8 filemenu_filename_pos;
60extern s8 filemenu_currentMenu;
61extern s32 filemenu_8024C09C;
62extern s32 filemenu_cursorHudElemID[1];
63extern s32 filemenu_8024C0A4[3];
64extern s32 filemenu_hudElemIDs[20];
66extern u8 filemenu_filename[8];
67
68#if VERSION_PAL
69extern s32 D_802517D0[1];
70extern s32 D_802517D4[1];
71extern u16 D_802517E0[2][0x400];
72extern u8 D_filemenu_8025095C[4];
73#endif
74
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
89
96
99
102
104
106
107void filemenu_draw_file_name(u8*, s32, s32, s32, s32, s32, s32, s32);
108void filemenu_draw_contents_title(MenuPanel*, s32, s32, s32, s32, s32, s32);
109void filemenu_draw_contents_stereo(MenuPanel*, s32, s32, s32, s32, s32, s32);
110void filemenu_draw_contents_mono(MenuPanel*, s32, s32, s32, s32, s32, s32);
111void filemenu_draw_contents_option_left(MenuPanel*, s32, s32, s32, s32, s32, s32);
112void filemenu_draw_contents_option_center(MenuPanel*, s32, s32, s32, s32, s32, s32);
113void filemenu_draw_contents_option_right(MenuPanel*, s32, s32, s32, s32, s32, s32);
114void filemenu_draw_contents_file_0_info(MenuPanel*, s32, s32, s32, s32, s32, s32);
115void filemenu_draw_contents_file_0_title(MenuPanel*, s32, s32, s32, s32, s32, s32);
116void filemenu_draw_contents_file_1_info(MenuPanel*, s32, s32, s32, s32, s32, s32);
117void filemenu_draw_contents_file_1_title(MenuPanel*, s32, s32, s32, s32, s32, s32);
118void filemenu_draw_contents_file_2_info(MenuPanel*, s32, s32, s32, s32, s32, s32);
119void filemenu_draw_contents_file_2_title(MenuPanel*, s32, s32, s32, s32, s32, s32);
120void filemenu_draw_contents_file_3_info(MenuPanel*, s32, s32, s32, s32, s32, s32);
121void filemenu_draw_contents_file_3_title(MenuPanel*, s32, s32, s32, s32, s32, s32);
122void filemenu_yesno_draw_options_contents(MenuPanel*, s32, s32, s32, s32, s32, s32);
123void filemenu_yesno_draw_prompt_contents(MenuPanel*, s32, s32, s32, s32, s32, s32);
124void filemenu_info_draw_message_contents(MenuPanel*, s32, s32, s32, s32, s32, s32);
125void filemenu_draw_contents_file_create_header(MenuPanel*, s32, s32, s32, s32, s32, s32);
126void filemenu_draw_contents_choose_name(MenuPanel*, s32, s32, s32, s32, s32, s32);
127void filemenu_draw_cursor(MenuPanel*, s32, s32, s32, s32, s32, s32);
128void filemenu_draw_contents_copy_arrow(MenuPanel*, s32, s32, s32, s32, s32, s32);
129
146
147void filemenu_draw_message(u8*, s32, s32, s32, s32, u32);
148void filemenu_draw_rect(s32 ulx, s32 uly, s32 lrx, s32 lry, s32 tileIdx, s32 uls, s32 ult, s32 dsdx, s32 dtdy);
149
152
153#endif
void filemenu_choose_name_update(MenuPanel *)
void filemenu_choose_name_init(MenuPanel *)
WindowStyleCustom filemenu_windowStyles[]
void filemenu_info_cleanup(MenuPanel *)
void filemenu_draw_contents_file_1_info(MenuPanel *, s32, s32, s32, s32, s32, s32)
void filemenu_info_handle_input(MenuPanel *)
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 windows.c:204
void filemenu_draw_file_name(u8 *, s32, s32, s32, s32, s32, s32, s32)
void filemenu_info_update(MenuPanel *)
@ 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
void filemenu_draw_contents_option_left(MenuPanel *, s32, s32, s32, s32, s32, s32)
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_main_init(MenuPanel *)
void filemenu_draw_contents_file_0_title(MenuPanel *, s32, s32, s32, s32, s32, s32)
@ 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
void filemenu_info_draw_message_contents(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_create_header(MenuPanel *, s32, s32, s32, s32, s32, s32)
void filemenu_draw_contents_file_2_info(MenuPanel *, s32, s32, s32, s32, s32, s32)
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_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_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)
s8 filemenu_currentMenu
void filemenu_draw_contents_file_3_title(MenuPanel *, s32, s32, s32, s32, s32, s32)
void filemenu_draw_message(u8 *, s32, s32, s32, s32, u32)
s32 filemenu_8024C09C
void filemenu_yesno_handle_input(MenuPanel *)
void filemenu_choose_name_handle_input(MenuPanel *)
void filemenu_main_handle_input(MenuPanel *)
s32 filemenu_heldButtons
void filemenu_info_init(MenuPanel *)
void filemenu_main_update(MenuPanel *)
MenuPanel * filemenu_menus[]
void filemenu_yesno_cleanup(MenuPanel *)
void filemenu_draw_contents_copy_arrow(MenuPanel *, s32, s32, s32, s32, s32, s32)
s32 filemenu_CopyFromFileIdx
#define WINDOW_UPDATE_FUNC(name)
Definition filemenu.h:75
void filemenu_draw_rect(s32 ulx, s32 uly, s32 lrx, s32 lry, s32 tileIdx, s32 uls, s32 ult, s32 dsdx, s32 dtdy)
s32 filemenu_cursorHudElemID[1]
void filemenu_draw_contents_file_1_title(MenuPanel *, s32, s32, s32, s32, s32, s32)
s32 filemenu_createfile_hudElems[4]
u8 filemenu_filename[8]
void filemenu_draw_contents_title(MenuPanel *, s32, s32, s32, s32, s32, s32)
s32 filemenu_cursorHudElem
void filemenu_draw_contents_stereo(MenuPanel *, s32, s32, s32, s32, s32, s32)
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_draw_contents_option_center(MenuPanel *, s32, s32, s32, s32, s32, s32)
void filemenu_yesno_draw_options_contents(MenuPanel *, s32, s32, s32, s32, s32, s32)
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_draw_cursor(MenuPanel *, s32, s32, s32, s32, s32, s32)
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_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_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_draw_contents_choose_name(MenuPanel *, s32, s32, s32, s32, s32, s32)
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
@ FILE_MENU_MAIN
Definition filemenu.h:17
s8 filemenu_filename_pos
s32 filemenu_8024C0A4[3]
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)
u8 filemenu_createfile_gridData[]
void filemenu_yesno_update(MenuPanel *)
void filemenu_draw_contents_mono(MenuPanel *, s32, s32, s32, s32, s32, s32)
void filemenu_draw_contents_file_3_info(MenuPanel *, s32, s32, s32, s32, s32, s32)
void filemenu_yesno_init(MenuPanel *)
s32 filemenu_hudElemIDs[20]
void filemenu_draw_contents_file_0_info(MenuPanel *, s32, s32, s32, s32, s32, s32)
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_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_draw_contents_file_2_title(MenuPanel *, s32, s32, s32, s32, s32, s32)
void filemenu_choose_name_cleanup(MenuPanel *)
void filemenu_main_cleanup(MenuPanel *)
void filemenu_yesno_draw_prompt_contents(MenuPanel *, s32, s32, s32, s32, s32, s32)
s32 filemenu_pressedButtons