Skip to content

Commit

Permalink
fix name inconsistency
Browse files Browse the repository at this point in the history
  • Loading branch information
z64a committed Oct 25, 2024
1 parent 2495a1f commit d6f0e24
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions include/filemenu.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ enum {
FM_MAIN_SELECT_FILE = 0, // choose which file to load
FM_MAIN_SELECT_DELETE, // choose which file to delete
#if !VERSION_PAL
FM_MAIN_DUMMY_LANG_SELECT, // non-PAL versions have an unimplemented dummy language select
FM_MAIN_SELECT_LANG_DUMMY, // non-PAL versions have an unimplemented dummy language select
#endif
FM_MAIN_SELECT_COPY_FROM,
FM_MAIN_SELECT_COPY_TO,
FM_MAIN_PAL_LANG_SELECT,
FM_MAIN_SELECT_LANG_PAL,

// states for confirm submenu
FM_CONFIRM_DELETE = 0,
Expand Down
8 changes: 4 additions & 4 deletions src/filemenu/filemenu_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1068,12 +1068,12 @@ void filemenu_init(s32 mode) {
}
update_window_hierarchy(WIN_PAUSE_DECRIPTION, 64);
} else {
filemenu_currentMenu = FM_MAIN_PAL_LANG_SELECT;
filemenu_set_selected(filemenu_menus[FM_MAIN_PAL_LANG_SELECT], 0, gCurrentLanguage);
filemenu_currentMenu = FM_MAIN_SELECT_LANG_PAL;
filemenu_set_selected(filemenu_menus[FM_MAIN_SELECT_LANG_PAL], 0, gCurrentLanguage);

panelIt = filemenu_menus;
for (i = 0; i < ARRAY_COUNT(filemenu_menus); i++, panelIt++) {
if (i == FM_MAIN_PAL_LANG_SELECT) {
if (i == FM_MAIN_SELECT_LANG_PAL) {
if ((*panelIt)->fpInit != NULL) {
(*panelIt)->fpInit((*panelIt));
}
Expand All @@ -1088,7 +1088,7 @@ void filemenu_init(s32 mode) {
if (mode == 0) {
menu->state = FM_MAIN_SELECT_FILE;
} else {
menu->state = FM_MAIN_DUMMY_LANG_SELECT;
menu->state = FM_MAIN_SELECT_LANG_DUMMY;
}

if (menu->state == FM_MAIN_SELECT_FILE) {
Expand Down
4 changes: 2 additions & 2 deletions src/filemenu/filemenu_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ void filemenu_info_handle_input(MenuPanel* menu) {
filemenu_set_selected(menu, 1, 2);
break;
#if !VERSION_PAL
case FM_MAIN_DUMMY_LANG_SELECT:
menu->state = FM_MAIN_DUMMY_LANG_SELECT;
case FM_MAIN_SELECT_LANG_DUMMY:
menu->state = FM_MAIN_SELECT_LANG_DUMMY;
filemenu_set_selected(menu, 1, 2);
break;
#endif
Expand Down
16 changes: 8 additions & 8 deletions src/filemenu/filemenu_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ void filemenu_draw_contents_title(
yOffset = 4;
break;
#if !VERSION_PAL
case FM_MAIN_DUMMY_LANG_SELECT:
case FM_MAIN_SELECT_LANG_DUMMY:
default:
msgIdx = FILE_MESSAGE_SELECT_FILE_TO_SAVE;
xOffset = 10;
Expand Down Expand Up @@ -427,7 +427,7 @@ void filemenu_draw_contents_option_left(
}
filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_DELETE_FILE), baseX + offset + OFFSET_WIDTH, baseY + 2, 255, 0, 1);
#else
if (menu->state != FM_MAIN_DUMMY_LANG_SELECT) {
if (menu->state != FM_MAIN_SELECT_LANG_DUMMY) {
if (menu->col == 0 && menu->row == 2) {
filemenu_set_cursor_goal_pos(WIN_FILES_OPTION_LEFT, baseX, baseY + 8);
}
Expand Down Expand Up @@ -483,7 +483,7 @@ void filemenu_draw_contents_option_center(

switch (menu->state) {
case FM_MAIN_SELECT_DELETE:
case FM_MAIN_DUMMY_LANG_SELECT:
case FM_MAIN_SELECT_LANG_DUMMY:
case FM_MAIN_SELECT_COPY_FROM:
case FM_MAIN_SELECT_COPY_TO:
msgIdx = FILE_MESSAGE_CANCEL;
Expand Down Expand Up @@ -761,7 +761,7 @@ void filemenu_main_init(MenuPanel* menu) {
gWindows[WIN_FILES_TITLE].width = 162;
gWindows[WIN_FILES_TITLE].height = 25;
#else
if (menu->state == FM_MAIN_DUMMY_LANG_SELECT) {
if (menu->state == FM_MAIN_SELECT_LANG_DUMMY) {
gWindows[WIN_FILES_TITLE].pos.y = 1;
gWindows[WIN_FILES_TITLE].width = 211;
gWindows[WIN_FILES_TITLE].height = 25;
Expand Down Expand Up @@ -848,7 +848,7 @@ void filemenu_main_handle_input(MenuPanel* menu) {
menu->col = 1;
}
break;
case FM_MAIN_DUMMY_LANG_SELECT:
case FM_MAIN_SELECT_LANG_DUMMY:
// force selection to column 0 when navigating up from bottom row
if (menu->col == 1 && (u8) menu->row < 2) {
menu->col = 0;
Expand Down Expand Up @@ -1120,7 +1120,7 @@ void filemenu_main_handle_input(MenuPanel* menu) {
}
}
break;
case FM_MAIN_DUMMY_LANG_SELECT:
case FM_MAIN_SELECT_LANG_DUMMY:
if (menu->selected == FM_MAIN_OPT_CANCEL) {
// selected "Cancel" button
sfx_play_sound(SOUND_MENU_NEXT);
Expand Down Expand Up @@ -1169,7 +1169,7 @@ void filemenu_main_handle_input(MenuPanel* menu) {
case FM_MAIN_SELECT_DELETE:
filemenu_set_selected(menu, 1, 2);
break;
case FM_MAIN_DUMMY_LANG_SELECT:
case FM_MAIN_SELECT_LANG_DUMMY:
filemenu_set_selected(menu, 1, 2);
break;
case FM_MAIN_SELECT_COPY_FROM:
Expand Down Expand Up @@ -1218,7 +1218,7 @@ void filemenu_main_handle_input(MenuPanel* menu) {
filemenu_set_selected(menu, (filemenu_loadedFileIdx % 2) * 2, filemenu_loadedFileIdx / 2);
sfx_play_sound(SOUND_MENU_BACK);
break;
case FM_MAIN_DUMMY_LANG_SELECT:
case FM_MAIN_SELECT_LANG_DUMMY:
sfx_play_sound(SOUND_MENU_BACK);
set_game_mode(GAME_MODE_END_LANGUAGE_SELECT);
break;
Expand Down

0 comments on commit d6f0e24

Please sign in to comment.