mirror of
https://github.com/pret/pokeplatinum.git
synced 2026-03-21 17:55:13 -05:00
This commit is contained in:
parent
f61660fddd
commit
1c10dee3ee
10
include/constants/menu.h
Normal file
10
include/constants/menu.h
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
#ifndef POKEPLATINUM_CONSTANTS_MENU_H
|
||||
#define POKEPLATINUM_CONSTANTS_MENU_H
|
||||
|
||||
#define MENU_YES 0
|
||||
#define MENU_NO 1
|
||||
#define MENU_NOTHING_CHOSEN -1
|
||||
#define MENU_CANCEL -2
|
||||
#define MENU_HEADER -3
|
||||
|
||||
#endif // POKEPLATINUM_CONSTANTS_MENU_H
|
||||
|
|
@ -2,15 +2,12 @@
|
|||
#define POKEPLATINUM_CONSTANTS_SCRCMD_H
|
||||
|
||||
#include "constants/accessories.h"
|
||||
#include "constants/menu.h"
|
||||
#include "generated/backdrops.h"
|
||||
|
||||
#define BERRY_WATERING_START 0
|
||||
#define BERRY_WATERING_END 1
|
||||
|
||||
#define MENU_YES 0
|
||||
#define MENU_NO 1
|
||||
#define MENU_CANCEL -2
|
||||
|
||||
#define LOCALID_CAMERA 0xF1
|
||||
#define LOCALID_FOLLOWER 0xF2
|
||||
#define LOCALID_PLAYER 0xFF
|
||||
|
|
|
|||
|
|
@ -1,14 +1,12 @@
|
|||
#ifndef POKEPLATINUM_LIST_MENU_H
|
||||
#define POKEPLATINUM_LIST_MENU_H
|
||||
|
||||
#include "constants/menu.h"
|
||||
|
||||
#include "bg_window.h"
|
||||
#include "colored_arrow.h"
|
||||
#include "string_list.h"
|
||||
|
||||
#define LIST_NOTHING_CHOSEN -1
|
||||
#define LIST_CANCEL -2
|
||||
#define LIST_HEADER -3
|
||||
|
||||
#define LIST_MENU_NO_SELECTION_YET 0xEEEE // Only used outside of list_menu, as a placeholder for before the player makes a choice
|
||||
|
||||
enum ListMenuPagerMode {
|
||||
|
|
|
|||
|
|
@ -1,14 +1,12 @@
|
|||
#ifndef POKEPLATINUM_MENU_H
|
||||
#define POKEPLATINUM_MENU_H
|
||||
|
||||
#include "constants/menu.h"
|
||||
|
||||
#include "bg_window.h"
|
||||
#include "colored_arrow.h"
|
||||
#include "string_list.h"
|
||||
|
||||
#define MENU_NOTHING_CHOSEN -1
|
||||
#define MENU_CANCELED -2
|
||||
#define MENU_DUMMY -3
|
||||
|
||||
enum MenuAction {
|
||||
MENU_ACTION_NONE = 0,
|
||||
MENU_ACTION_MOVE_UP,
|
||||
|
|
|
|||
|
|
@ -331,7 +331,7 @@ static const u32 sItemActionFuncs[] = {
|
|||
[ITEM_ACTION_GIVE] = (u32)ItemActionFunc_Give,
|
||||
[ITEM_ACTION_CHECK_TAG] = (u32)ItemActionFunc_CheckTag,
|
||||
[ITEM_ACTION_CONFIRM] = (u32)ItemActionFunc_Confirm,
|
||||
[ITEM_ACTION_CANCEL] = LIST_CANCEL
|
||||
[ITEM_ACTION_CANCEL] = MENU_CANCEL
|
||||
};
|
||||
|
||||
// clang-format off
|
||||
|
|
@ -972,7 +972,7 @@ static void LoadCurrentPocketItemNames(BagController *controller)
|
|||
StringList_AddFromString(controller->itemListEntries, controller->itemNames[i], i);
|
||||
}
|
||||
|
||||
StringList_AddFromMessageBank(controller->itemListEntries, controller->bagStringsLoader, Bag_Text_Empty, LIST_CANCEL);
|
||||
StringList_AddFromMessageBank(controller->itemListEntries, controller->bagStringsLoader, Bag_Text_Empty, MENU_CANCEL);
|
||||
StringList_AddFromMessageBank(controller->itemListEntries, controller->bagStringsLoader, Bag_Text_Empty, ITEM_LIST_EMPTY_ENTRY);
|
||||
|
||||
pocket->listEntryCount = i + 3;
|
||||
|
|
@ -989,9 +989,9 @@ static void LoadCurrentPocketItemNames(BagController *controller)
|
|||
|
||||
if (controller->bagCtx->mode != BAG_MODE_POFFIN_MULTIPLAYER) {
|
||||
if (pocket->pocketType == POCKET_BERRIES) {
|
||||
StringList_AddFromMessageBank(controller->itemListEntries, controller->bagStringsLoader, Bag_Text_Empty, LIST_CANCEL); // The game has some logic to print the close bag message instead of the empty string in this case
|
||||
StringList_AddFromMessageBank(controller->itemListEntries, controller->bagStringsLoader, Bag_Text_Empty, MENU_CANCEL); // The game has some logic to print the close bag message instead of the empty string in this case
|
||||
} else {
|
||||
StringList_AddFromMessageBank(controller->itemListEntries, controller->bagStringsLoader, Bag_Text_CloseBag, LIST_CANCEL);
|
||||
StringList_AddFromMessageBank(controller->itemListEntries, controller->bagStringsLoader, Bag_Text_CloseBag, MENU_CANCEL);
|
||||
}
|
||||
|
||||
StringList_AddFromMessageBank(controller->itemListEntries, controller->bagStringsLoader, Bag_Text_Empty, ITEM_LIST_EMPTY_ENTRY);
|
||||
|
|
@ -1113,7 +1113,7 @@ static void ItemListMenuCursorCB(ListMenu *menu, u32 index, u8 onInit)
|
|||
|
||||
Window_FillTilemap(&controller->windows[BAG_UI_WINDOW_ITEM_DESCRIPTION], 0);
|
||||
|
||||
if (index != LIST_CANCEL) {
|
||||
if (index != MENU_CANCEL) {
|
||||
BagApplicationPocket *pocket;
|
||||
|
||||
pocket = &controller->bagCtx->accessiblePockets[controller->bagCtx->currPocketIdx];
|
||||
|
|
@ -1141,25 +1141,25 @@ static void ItemListMenuPrintCB(ListMenu *menu, u32 index, u8 yOffset)
|
|||
}
|
||||
|
||||
if (pocket->pocketType == POCKET_KEY_ITEMS) {
|
||||
if (index != ITEM_LIST_EMPTY_ENTRY && index != LIST_CANCEL) {
|
||||
if (index != ITEM_LIST_EMPTY_ENTRY && index != MENU_CANCEL) {
|
||||
if (Bag_GetRegisteredItem(controller->bag) == pocket->items[index].item) {
|
||||
BagUI_DrawRegisteredIcon(controller, yOffset);
|
||||
}
|
||||
}
|
||||
} else if (pocket->pocketType == POCKET_TMHMS) {
|
||||
if (index == LIST_CANCEL) {
|
||||
if (index == MENU_CANCEL) {
|
||||
BagUI_PrintCloseBagEntry(controller, yOffset);
|
||||
} else if (index != ITEM_LIST_EMPTY_ENTRY) {
|
||||
BagUI_PrintTMHMNumber(controller, &pocket->items[index], yOffset);
|
||||
}
|
||||
} else if (pocket->pocketType == POCKET_BERRIES) {
|
||||
if (index == LIST_CANCEL) {
|
||||
if (index == MENU_CANCEL) {
|
||||
BagUI_PrintCloseBagEntry(controller, yOffset);
|
||||
} else if (index != ITEM_LIST_EMPTY_ENTRY) {
|
||||
BagUI_PrintBerryNumber(controller, &pocket->items[index], yOffset);
|
||||
}
|
||||
} else {
|
||||
if (index != ITEM_LIST_EMPTY_ENTRY && index != LIST_CANCEL) {
|
||||
if (index != ITEM_LIST_EMPTY_ENTRY && index != MENU_CANCEL) {
|
||||
if (controller->isMovingItem == 1 && controller->movedItemID == index) {
|
||||
BagUI_PrintItemCount(controller, pocket->items[index].quantity, yOffset, TEXT_COLOR(8, 9, 0));
|
||||
} else {
|
||||
|
|
@ -1240,7 +1240,7 @@ static u8 ProcessItemListMenuInput(BagController *interface)
|
|||
pocket->cursorScroll = newCursorScroll;
|
||||
pocket->cursorPos = newCursorPos;
|
||||
|
||||
if (selectedItem == LIST_NOTHING_CHOSEN) {
|
||||
if (selectedItem == MENU_NOTHING_CHOSEN) {
|
||||
if (CheckDialButtonPressed(interface) == TRUE) {
|
||||
selectedItem = ListMenu_GetIndexOfChoice(interface->itemList, newCursorScroll + newCursorPos);
|
||||
interface->dialButtonAnimStep = 1;
|
||||
|
|
@ -1248,7 +1248,7 @@ static u8 ProcessItemListMenuInput(BagController *interface)
|
|||
}
|
||||
|
||||
switch (selectedItem) {
|
||||
case LIST_NOTHING_CHOSEN: {
|
||||
case MENU_NOTHING_CHOSEN: {
|
||||
u8 lastAction = ListMenu_GetLastAction(interface->itemList);
|
||||
|
||||
if (lastAction == LIST_MENU_ACTION_MOVE_UP) {
|
||||
|
|
@ -1257,7 +1257,7 @@ static u8 ProcessItemListMenuInput(BagController *interface)
|
|||
RotateDial(interface, -36);
|
||||
}
|
||||
} break;
|
||||
case LIST_CANCEL:
|
||||
case MENU_CANCEL:
|
||||
if (interface->bagCtx->mode == BAG_MODE_POFFIN_MULTIPLAYER) {
|
||||
return ITEM_LIST_INPUT_NONE;
|
||||
}
|
||||
|
|
@ -1784,7 +1784,7 @@ static u8 CanMoveSelectedEntry(BagController *controller)
|
|||
{
|
||||
BagApplicationPocket *pocket = &controller->bagCtx->accessiblePockets[controller->bagCtx->currPocketIdx];
|
||||
|
||||
if (ListMenu_GetIndexOfChoice(controller->itemList, pocket->cursorScroll + pocket->cursorPos) == LIST_CANCEL) {
|
||||
if (ListMenu_GetIndexOfChoice(controller->itemList, pocket->cursorScroll + pocket->cursorPos) == MENU_CANCEL) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
@ -1848,7 +1848,7 @@ static u8 ProcessItemListInput_MovingItem(BagController *controller)
|
|||
pocket->cursorPos = cursorPos;
|
||||
|
||||
switch (selectedItem) {
|
||||
case LIST_NOTHING_CHOSEN: {
|
||||
case MENU_NOTHING_CHOSEN: {
|
||||
u8 lastAction = ListMenu_GetLastAction(controller->itemList);
|
||||
|
||||
if (lastAction == LIST_MENU_ACTION_MOVE_UP) {
|
||||
|
|
@ -1857,7 +1857,7 @@ static u8 ProcessItemListInput_MovingItem(BagController *controller)
|
|||
RotateDial(controller, -36);
|
||||
}
|
||||
} break;
|
||||
case LIST_CANCEL:
|
||||
case MENU_CANCEL:
|
||||
Sound_PlayEffect(SEQ_SE_CONFIRM);
|
||||
|
||||
if (gSystem.pressedKeys & PAD_BUTTON_A) {
|
||||
|
|
@ -2031,7 +2031,7 @@ static int ProcessMenuInput_SelectAction(BagController *controller)
|
|||
RotateDial(controller, -18);
|
||||
}
|
||||
} break;
|
||||
case MENU_CANCELED:
|
||||
case MENU_CANCEL:
|
||||
BagUI_SetHighlightSpritesPalette(controller, PLTT_1);
|
||||
BagUI_CloseItemActionsMenu(controller);
|
||||
|
||||
|
|
@ -2202,12 +2202,12 @@ static int TMHMUseTask(BagController *controller)
|
|||
}
|
||||
|
||||
switch (selected) {
|
||||
case 0:
|
||||
case MENU_YES:
|
||||
App_StartScreenFade(TRUE, HEAP_ID_BAG);
|
||||
ToggleHideItemSprite(controller, FALSE);
|
||||
controller->bagCtx->exitCode = BAG_EXIT_CODE_USE_ITEM;
|
||||
return BAG_APP_STATE_EXIT;
|
||||
case MENU_NOTHING_CHOSEN: {
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
u8 action = Menu_GetLastAction(controller->menu);
|
||||
|
||||
if (action == MENU_ACTION_MOVE_UP) {
|
||||
|
|
@ -2215,8 +2215,8 @@ static int TMHMUseTask(BagController *controller)
|
|||
} else if (action == MENU_ACTION_MOVE_DOWN) {
|
||||
RotateDial(controller, -18);
|
||||
}
|
||||
} break;
|
||||
case MENU_CANCELED:
|
||||
break;
|
||||
case MENU_CANCEL:
|
||||
Window_EraseMessageBox(&controller->windows[BAG_UI_WINDOW_MSG_BOX_WIDE], FALSE);
|
||||
Window_ScheduleCopyToVRAM(&controller->windows[BAG_UI_WINDOW_ITEM_DESCRIPTION]);
|
||||
BagUI_SetHighlightSpritesPalette(controller, PLTT_1);
|
||||
|
|
@ -2419,7 +2419,7 @@ static int ProcessMenuInput_ConfirmTrash(BagController *controller)
|
|||
}
|
||||
|
||||
switch (selectedOption) {
|
||||
case 0: {
|
||||
case MENU_YES:
|
||||
String *string = MessageLoader_GetNewString(controller->bagStringsLoader, Bag_Text_ThrewAwayItem);
|
||||
|
||||
if (controller->selectedItemCount == 1) {
|
||||
|
|
@ -2431,12 +2431,12 @@ static int ProcessMenuInput_ConfirmTrash(BagController *controller)
|
|||
StringTemplate_SetNumber(controller->strTemplate, 1, controller->selectedItemCount, 3, PADDING_MODE_NONE, CHARSET_MODE_EN);
|
||||
StringTemplate_Format(controller->strTemplate, controller->stringBuffer, string);
|
||||
String_Free(string);
|
||||
}
|
||||
|
||||
Window_FillTilemap(&controller->windows[BAG_UI_WINDOW_MSG_BOX_WIDE], 15);
|
||||
controller->msgBoxPrinterID = BagUI_PrintStrBufferToWideMsgBox(controller);
|
||||
return BAG_APP_STATE_RESOLVE_TRASH;
|
||||
|
||||
case MENU_NOTHING_CHOSEN: {
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
u8 action = Menu_GetLastAction(controller->menu);
|
||||
|
||||
if (action == MENU_ACTION_MOVE_UP) {
|
||||
|
|
@ -2444,8 +2444,8 @@ static int ProcessMenuInput_ConfirmTrash(BagController *controller)
|
|||
} else if (action == MENU_ACTION_MOVE_DOWN) {
|
||||
RotateDial(controller, -18);
|
||||
}
|
||||
} break;
|
||||
case MENU_CANCELED:
|
||||
break;
|
||||
case MENU_CANCEL:
|
||||
Window_EraseMessageBox(&controller->windows[BAG_UI_WINDOW_MSG_BOX_WIDE], FALSE);
|
||||
Window_ScheduleCopyToVRAM(&controller->windows[BAG_UI_WINDOW_ITEM_DESCRIPTION]);
|
||||
BagUI_SetHighlightSpritesPalette(controller, PLTT_1);
|
||||
|
|
@ -2757,7 +2757,7 @@ static int ProcessMenuInput_ConfirmSale(BagController *interface)
|
|||
}
|
||||
|
||||
switch (selected) {
|
||||
case 0: {
|
||||
case MENU_YES:
|
||||
String *string = MessageLoader_GetNewString(interface->bagStringsLoader, Bag_Text_TurnedOverItems);
|
||||
|
||||
if (interface->selectedItemCount > 1) {
|
||||
|
|
@ -2769,11 +2769,11 @@ static int ProcessMenuInput_ConfirmSale(BagController *interface)
|
|||
StringTemplate_SetNumber(interface->strTemplate, 1, interface->selectedItemCount * interface->soldItemPrice, 6, PADDING_MODE_NONE, CHARSET_MODE_EN);
|
||||
StringTemplate_Format(interface->strTemplate, interface->stringBuffer, string);
|
||||
String_Free(string);
|
||||
}
|
||||
|
||||
Window_FillTilemap(&interface->windows[BAG_UI_WINDOW_MSG_BOX_WIDE], 15);
|
||||
interface->msgBoxPrinterID = BagUI_PrintStrBufferToWideMsgBox(interface);
|
||||
return BAG_APP_STATE_RESOLVE_SALE;
|
||||
case MENU_NOTHING_CHOSEN: {
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
u8 action = Menu_GetLastAction(interface->menu);
|
||||
|
||||
if (action == MENU_ACTION_MOVE_UP) {
|
||||
|
|
@ -2781,8 +2781,8 @@ static int ProcessMenuInput_ConfirmSale(BagController *interface)
|
|||
} else if (action == MENU_ACTION_MOVE_DOWN) {
|
||||
RotateDial(interface, -18);
|
||||
}
|
||||
} break;
|
||||
case MENU_CANCELED:
|
||||
break;
|
||||
case MENU_CANCEL:
|
||||
interface->soldItemPrice = 0;
|
||||
Window_EraseStandardFrame(&interface->windows[BAG_UI_WINDOW_MONEY], TRUE);
|
||||
Window_EraseMessageBox(&interface->windows[BAG_UI_WINDOW_MSG_BOX_WIDE], FALSE);
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ u8 BattleCastleApp_GetRank(SaveData *saveData, u8 challengeType, u8 rankType)
|
|||
|
||||
void BattleCastleApp_PlaySound(u32 input, u16 seqID)
|
||||
{
|
||||
if (input != LIST_NOTHING_CHOSEN) {
|
||||
if (input != MENU_NOTHING_CHOSEN) {
|
||||
Sound_PlayEffect(seqID);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
#include <string.h>
|
||||
|
||||
#include "constants/graphics.h"
|
||||
#include "constants/scrcmd.h"
|
||||
|
||||
#include "struct_decls/struct_020302DC_decl.h"
|
||||
#include "struct_decls/struct_0203041C_decl.h"
|
||||
|
|
@ -560,9 +559,9 @@ static BOOL State_MainAppFlow(BattleCastleOpponentApp *app)
|
|||
ListMenu_CalcTrueCursorPos(app->listMenu, &app->menuPos);
|
||||
|
||||
switch (input) {
|
||||
case LIST_NOTHING_CHOSEN:
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
break;
|
||||
case LIST_CANCEL:
|
||||
case MENU_CANCEL:
|
||||
CloseListMenu(app);
|
||||
PrintMonSelectionStrings(app);
|
||||
app->subState = MAIN_SUBSTATE_INIT;
|
||||
|
|
@ -644,7 +643,7 @@ static BOOL State_MainAppFlow(BattleCastleOpponentApp *app)
|
|||
}
|
||||
break;
|
||||
case MENU_NO:
|
||||
case MENU_CANCELED:
|
||||
case MENU_CANCEL:
|
||||
FreeSimpleMenu(app);
|
||||
CloseMessageBox(&app->windows[OPPONENT_APP_WINDOW_MSG_BOX]);
|
||||
OpenMonOptionsMenu(app);
|
||||
|
|
@ -687,7 +686,7 @@ static BOOL State_MainAppFlow(BattleCastleOpponentApp *app)
|
|||
}
|
||||
break;
|
||||
case 2:
|
||||
case MENU_CANCELED:
|
||||
case MENU_CANCEL:
|
||||
FreeSimpleMenu(app);
|
||||
CloseMessageBox(&app->windows[OPPONENT_APP_WINDOW_MSG_BOX]);
|
||||
OpenMonOptionsMenu(app);
|
||||
|
|
@ -728,7 +727,7 @@ static BOOL State_MainAppFlow(BattleCastleOpponentApp *app)
|
|||
}
|
||||
break;
|
||||
case MENU_NO:
|
||||
case MENU_CANCELED:
|
||||
case MENU_CANCEL:
|
||||
FreeSimpleMenu(app);
|
||||
CloseMessageBox(&app->windows[OPPONENT_APP_WINDOW_MSG_BOX]);
|
||||
OpenMonOptionsMenu(app);
|
||||
|
|
@ -742,9 +741,9 @@ static BOOL State_MainAppFlow(BattleCastleOpponentApp *app)
|
|||
ListMenu_CalcTrueCursorPos(app->listMenu, &app->menuPos);
|
||||
|
||||
switch (input) {
|
||||
case LIST_NOTHING_CHOSEN:
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
break;
|
||||
case LIST_CANCEL:
|
||||
case MENU_CANCEL:
|
||||
CloseMessageBox(&app->windows[OPPONENT_APP_WINDOW_MSG_BOX]);
|
||||
FreeListMenu2(app);
|
||||
OpenMonOptionsMenu(app);
|
||||
|
|
@ -821,7 +820,7 @@ static BOOL State_MainAppFlow(BattleCastleOpponentApp *app)
|
|||
}
|
||||
break;
|
||||
case MENU_NO:
|
||||
case MENU_CANCELED:
|
||||
case MENU_CANCEL:
|
||||
FreeSimpleMenu(app);
|
||||
OpenSummaryMenu(app);
|
||||
app->subState = MAIN_SUBSTATE_SUMMARY_MENU;
|
||||
|
|
@ -840,7 +839,7 @@ static BOOL State_MainAppFlow(BattleCastleOpponentApp *app)
|
|||
}
|
||||
break;
|
||||
case MENU_NO:
|
||||
case MENU_CANCELED:
|
||||
case MENU_CANCEL:
|
||||
FreeSimpleMenu(app);
|
||||
OpenSummaryMenu(app);
|
||||
app->subState = MAIN_SUBSTATE_SUMMARY_MENU;
|
||||
|
|
@ -877,7 +876,7 @@ static BOOL State_MainAppFlow(BattleCastleOpponentApp *app)
|
|||
}
|
||||
break;
|
||||
case MENU_NO:
|
||||
case MENU_CANCELED:
|
||||
case MENU_CANCEL:
|
||||
FreeSimpleMenu(app);
|
||||
OpenSummaryMenu(app);
|
||||
app->subState = MAIN_SUBSTATE_SUMMARY_MENU;
|
||||
|
|
@ -1697,7 +1696,7 @@ static const u32 sMonMenuEntries[][2] = {
|
|||
{ BattleCastleOpponentApp_Text_Check, MENU_ENTRY_CHECK },
|
||||
{ BattleCastleOpponentApp_Text_Level, MENU_ENTRY_LEVEL },
|
||||
{ BattleCastleOpponentApp_Text_Summary, MENU_ENTRY_SUMMARY },
|
||||
{ BattleCastleOpponentApp_Text_Cancel, MENU_CANCELED }
|
||||
{ BattleCastleOpponentApp_Text_Cancel, MENU_CANCEL }
|
||||
};
|
||||
|
||||
static const u32 sMonMenuDescriptions[] = {
|
||||
|
|
@ -1752,7 +1751,7 @@ static const u32 sSummaryMenuEntries[][2] = {
|
|||
{ BattleCastleOpponentApp_Text_Summary2, MENU_ENTRY_STATS },
|
||||
{ BattleCastleOpponentApp_Text_Moves, MENU_ENTRY_MOVES },
|
||||
{ BattleCastleOpponentApp_Text_RankUp, MENU_ENTRY_RANK_UP_SUMMARY },
|
||||
{ BattleCastleOpponentApp_Text_Cancel3, MENU_CANCELED }
|
||||
{ BattleCastleOpponentApp_Text_Cancel3, MENU_CANCEL }
|
||||
};
|
||||
|
||||
static const u16 sSummaryMenuDescriptions[][2] = {
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@
|
|||
#include <nitro.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "constants/scrcmd.h"
|
||||
|
||||
#include "struct_decls/struct_020302DC_decl.h"
|
||||
#include "struct_decls/struct_0203041C_decl.h"
|
||||
#include "struct_defs/battle_frontier.h"
|
||||
|
|
@ -458,7 +456,7 @@ static const u32 sHealMenuEntries[][3] = {
|
|||
{ 2, BattleCastleSelfApp_Text_RestorePP, MENU_ENTRY_RESTORE_PP },
|
||||
{ 3, BattleCastleSelfApp_Text_RestoreAll, MENU_ENTRY_RESTORE_ALL },
|
||||
{ 1, BattleCastleSelfApp_Text_RankUp, MENU_ENTRY_RANK_UP_HEALING },
|
||||
{ 1, BattleCastleSelfApp_Text_Cancel2, MENU_CANCELED }
|
||||
{ 1, BattleCastleSelfApp_Text_Cancel2, MENU_CANCEL }
|
||||
};
|
||||
|
||||
static const u16 sRankUpCosts[3][3] = {
|
||||
|
|
@ -757,9 +755,9 @@ static BOOL State_MainAppFlow(BattleCastleSelfApp *app)
|
|||
BattleCastleApp_PlaySound(input, SEQ_SE_CONFIRM);
|
||||
|
||||
switch (input) {
|
||||
case LIST_NOTHING_CHOSEN:
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
break;
|
||||
case LIST_CANCEL:
|
||||
case MENU_CANCEL:
|
||||
CloseMonOptions(app);
|
||||
PrintMonSelectionStrings(app);
|
||||
app->subState = MAIN_SUBSTATE_SELECT_MON;
|
||||
|
|
@ -818,9 +816,9 @@ static BOOL State_MainAppFlow(BattleCastleSelfApp *app)
|
|||
ListMenu_CalcTrueCursorPos(app->listMenu, &app->menuPos);
|
||||
|
||||
switch (input) {
|
||||
case LIST_NOTHING_CHOSEN:
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
break;
|
||||
case LIST_CANCEL:
|
||||
case MENU_CANCEL:
|
||||
CloseMessageBox(&app->windows[SELF_APP_WINDOW_MSG_BOX]);
|
||||
FreeListMenu2(app);
|
||||
OpenMonOptionsMenu(app);
|
||||
|
|
@ -998,9 +996,9 @@ static BOOL State_MainAppFlow(BattleCastleSelfApp *app)
|
|||
ListMenu_CalcTrueCursorPos(app->listMenu, &app->menuPos);
|
||||
|
||||
switch (input) {
|
||||
case LIST_NOTHING_CHOSEN:
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
break;
|
||||
case LIST_CANCEL:
|
||||
case MENU_CANCEL:
|
||||
CloseMessageBox(&app->windows[SELF_APP_WINDOW_MSG_BOX]);
|
||||
FreeListMenu3(app);
|
||||
OpenMonOptionsMenu(app);
|
||||
|
|
@ -1054,9 +1052,9 @@ static BOOL State_MainAppFlow(BattleCastleSelfApp *app)
|
|||
ListMenu_CalcTrueCursorPos(app->listMenu, &app->menuPos);
|
||||
|
||||
switch (input) {
|
||||
case LIST_NOTHING_CHOSEN:
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
break;
|
||||
case LIST_CANCEL:
|
||||
case MENU_CANCEL:
|
||||
FreeItemSelect(app);
|
||||
OpenRentalMenu(app);
|
||||
app->subState = MAIN_SUBSTATE_RENTAL_MENU;
|
||||
|
|
@ -2202,7 +2200,7 @@ static void DrawItemSelectMenuAndMonInfo(BattleCastleSelfApp *app, u8 menuOption
|
|||
StringList_AddFromMessageBank(app->strList, itemMsgLoader, itemID, i);
|
||||
}
|
||||
|
||||
StringList_AddFromMessageBank(app->strList, app->msgLoader, BattleCastleSelfApp_Text_Cancel, MENU_CANCELED);
|
||||
StringList_AddFromMessageBank(app->strList, app->msgLoader, BattleCastleSelfApp_Text_Cancel, MENU_CANCEL);
|
||||
|
||||
app->listTemplate = sDefaultListTemplate;
|
||||
app->listTemplate.choices = app->strList;
|
||||
|
|
@ -2251,7 +2249,7 @@ static void UpdateItemSelectMenuDisplay(ListMenu *menu, u32 item, u8 onInit)
|
|||
|
||||
BattleCastleAppSprite_SetPosition(app->itemSelectCursorSprite, 158, 24 + cursorPos * 16);
|
||||
|
||||
if (item != MENU_CANCELED) {
|
||||
if (item != MENU_CANCEL) {
|
||||
PrintItemName(app, &app->windows[SELF_APP_WINDOW_SELECTED_ITEM_NAME], GetItemIDFromListPos(app, pos, app->selectedMenuEntry));
|
||||
|
||||
BattleCastleApp_SetItemGraphic(&app->spriteMan, GetItemIDFromListPos(app, pos, app->selectedMenuEntry));
|
||||
|
|
@ -2268,7 +2266,7 @@ static void PrintItemPrice(ListMenu *menu, u32 item, u8 yOffset)
|
|||
{
|
||||
BattleCastleSelfApp *app = (BattleCastleSelfApp *)ListMenu_GetAttribute(menu, LIST_MENU_PARENT);
|
||||
|
||||
if (item != MENU_CANCELED) {
|
||||
if (item != MENU_CANCEL) {
|
||||
SetStringTemplateNumber(app, 0, GetItemPriceFromListPos(app, item, app->selectedMenuEntry), 4, PADDING_MODE_SPACES);
|
||||
|
||||
app->printerID = PrintMessage(app, &app->windows[SELF_APP_WINDOW_ITEM_SELECT_MENU], BattleCastleSelfApp_Text_CastlePointsItemSelect, 128, yOffset, TEXT_SPEED_NO_TRANSFER, 1, 2, 0, FONT_SYSTEM, TEXT_ALIGN_RIGHT);
|
||||
|
|
@ -2322,7 +2320,7 @@ static void UpdateHealMenuEntryDescription(ListMenu *menu, u32 item, u8 onInit)
|
|||
entryID = BattleCastleSelfApp_Text_RankUpToRestoreHPAndPP;
|
||||
}
|
||||
break;
|
||||
case MENU_CANCELED:
|
||||
case MENU_CANCEL:
|
||||
entryID = BattleCastleSelfApp_Text_ReturnToPrevious;
|
||||
break;
|
||||
default:
|
||||
|
|
@ -2371,7 +2369,7 @@ static const u32 sRentalMenuEntries[][3] = {
|
|||
{ 1, BattleCastleSelfApp_Text_Berries, MENU_ENTRY_RENT_BERRIES },
|
||||
{ 2, BattleCastleSelfApp_Text_Items, MENU_ENTRY_RENT_ITEMS },
|
||||
{ 1, BattleCastleSelfApp_Text_RankUp2, MENU_ENTRY_RANK_UP_ITEMS },
|
||||
{ 1, BattleCastleSelfApp_Text_Cancel3, MENU_CANCELED }
|
||||
{ 1, BattleCastleSelfApp_Text_Cancel3, MENU_CANCEL }
|
||||
};
|
||||
|
||||
static void InitRentalMenu(BattleCastleSelfApp *app)
|
||||
|
|
@ -2473,7 +2471,7 @@ static const u32 sMonMenuEntries[][2] = {
|
|||
{ BattleCastleSelfApp_Text_Rental, MENU_ENTRY_RENTAL },
|
||||
{ BattleCastleSelfApp_Text_Summary, MENU_ENTRY_SUMMARY },
|
||||
{ BattleCastleSelfApp_Text_Moves, MENU_ENTRY_MOVES },
|
||||
{ BattleCastleSelfApp_Text_Cancel, MENU_CANCELED }
|
||||
{ BattleCastleSelfApp_Text_Cancel, MENU_CANCEL }
|
||||
};
|
||||
|
||||
static const u16 sMonMenuDescriptions[] = {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
#include <nitro.h>
|
||||
|
||||
#include "constants/battle_frontier.h"
|
||||
#include "constants/scrcmd.h"
|
||||
|
||||
#include "applications/frontier/battle_hall/sprite_manager.h"
|
||||
#include "applications/frontier/battle_hall/sprites.h"
|
||||
|
|
@ -509,7 +508,7 @@ static BOOL State_SelectNextBattle(BattleHallApp *app)
|
|||
}
|
||||
break;
|
||||
case MENU_NO:
|
||||
case MENU_CANCELED:
|
||||
case MENU_CANCEL:
|
||||
FreeYesNoMenu(app);
|
||||
DeselectCell(app);
|
||||
app->subState = SELECT_STATE_MAKE_PICK;
|
||||
|
|
@ -643,7 +642,7 @@ static BOOL State_MultiplayerConfirmSelection(BattleHallApp *app)
|
|||
app->subState = MCONFIRM_STATE_SEND_CONFIRM_COMM;
|
||||
break;
|
||||
case MENU_NO:
|
||||
case MENU_CANCELED:
|
||||
case MENU_CANCEL:
|
||||
FreeYesNoMenu(app);
|
||||
app->subState = MCONFIRM_STATE_SEND_CANCELED_COMM;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -867,10 +867,10 @@ static int MoveReminder_State_ProcessMainInput(MoveReminderController *controlle
|
|||
MoveReminder_DrawArrows(controller);
|
||||
|
||||
switch (input) {
|
||||
case LIST_NOTHING_CHOSEN:
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
break;
|
||||
|
||||
case LIST_CANCEL:
|
||||
case MENU_CANCEL:
|
||||
Sound_PlayEffect(SEQ_SE_DP_DECIDE);
|
||||
MoveReminder_DrawMoveSelector(controller, controller->data->cursorPos, 1);
|
||||
MoveReminder_HideScrollArrows(controller);
|
||||
|
|
@ -916,9 +916,9 @@ static int MoveReminder_State_DrawYesNoMenu(MoveReminderController *controller)
|
|||
static int MoveReminder_State_ProcessYesNoInput(MoveReminderController *controller)
|
||||
{
|
||||
switch (Menu_ProcessInputAndHandleExit(controller->yesNoMenu, HEAP_ID_MOVE_REMINDER)) {
|
||||
case 0:
|
||||
case MENU_YES:
|
||||
return sYesNoCallbacks[controller->yesNoCallback].yesCallback(controller);
|
||||
case LIST_CANCEL:
|
||||
case MENU_CANCEL:
|
||||
return sYesNoCallbacks[controller->yesNoCallback].noCallback(controller);
|
||||
}
|
||||
|
||||
|
|
@ -984,7 +984,7 @@ static void MoveReminder_DrawMovesInfo(MoveReminderController *controller)
|
|||
if (move != LEVEL_UP_MOVESET_TERMINATOR) {
|
||||
MoveReminder_DrawBattleMovesText(controller, move);
|
||||
} else {
|
||||
MoveReminder_DrawBattleMovesText(controller, LIST_CANCEL);
|
||||
MoveReminder_DrawBattleMovesText(controller, MENU_CANCEL);
|
||||
}
|
||||
} else {
|
||||
Bg_ScheduleScroll(controller->bgConfig, BG_LAYER_MAIN_2, 0, 256);
|
||||
|
|
@ -1002,7 +1002,7 @@ static void MoveReminder_DrawMovesInfo(MoveReminderController *controller)
|
|||
if (move != LEVEL_UP_MOVESET_TERMINATOR) {
|
||||
MoveReminder_DrawContestMovesText(controller, move);
|
||||
} else {
|
||||
MoveReminder_DrawContestMovesText(controller, LIST_CANCEL);
|
||||
MoveReminder_DrawContestMovesText(controller, MENU_CANCEL);
|
||||
}
|
||||
|
||||
ManagedSprite_SetDrawFlag(controller->managedSprites[MOVE_REMINDER_SPRITE_CATEGORY], FALSE);
|
||||
|
|
@ -1093,7 +1093,7 @@ static void MoveReminder_InitListMenu(MoveReminderController *controller)
|
|||
if (controller->data->moves[i] != LEVEL_UP_MOVESET_TERMINATOR) {
|
||||
StringList_AddFromMessageBank(controller->stringList, moveNamesLoader, controller->data->moves[i], controller->data->moves[i]);
|
||||
} else {
|
||||
StringList_AddFromMessageBank(controller->stringList, controller->messageLoader, MoveReminder_Text_Cancel, LIST_CANCEL);
|
||||
StringList_AddFromMessageBank(controller->stringList, controller->messageLoader, MoveReminder_Text_Cancel, MENU_CANCEL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -1145,7 +1145,7 @@ static void MoveReminder_DrawBattleMovesText(MoveReminderController *controller,
|
|||
Window_FillTilemap(&controller->windows[MOVE_REMINDER_WIN_MOVE_PP], 0);
|
||||
ManagedSprite_SetDrawFlag(controller->managedSprites[MOVE_REMINDER_SPRITE_CATEGORY], FALSE);
|
||||
|
||||
if (move != LIST_CANCEL) {
|
||||
if (move != MENU_CANCEL) {
|
||||
u32 power = MoveTable_LoadParam(move, MOVEATTRIBUTE_POWER);
|
||||
if (power <= 1) {
|
||||
MessageLoader_GetString(controller->messageLoader, MoveReminder_Text_Dashes, controller->string);
|
||||
|
|
@ -1194,7 +1194,7 @@ static void MoveReminder_DrawContestMovesText(MoveReminderController *controller
|
|||
{
|
||||
Window_FillTilemap(&controller->windows[MOVE_REMINDER_WIN_MOVE_CONTEST_DESCRIPTION], 0);
|
||||
|
||||
if (move != LIST_CANCEL) {
|
||||
if (move != MENU_CANCEL) {
|
||||
u32 entryID = sub_0209577C(MoveTable_LoadParam(move, MOVEATTRIBUTE_CONTEST_EFFECT));
|
||||
MessageLoader *moveDescLoader = MessageLoader_Init(MSG_LOADER_PRELOAD_ENTIRE_BANK, NARC_INDEX_MSGDATA__PL_MSG, TEXT_BANK_CONTEST_EFFECTS, HEAP_ID_MOVE_REMINDER);
|
||||
|
||||
|
|
|
|||
|
|
@ -1196,7 +1196,7 @@ int sub_02086774(PartyMenuApplication *application)
|
|||
switch (menuAction) {
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
break;
|
||||
case MENU_CANCELED:
|
||||
case MENU_CANCEL:
|
||||
Window_EraseMessageBox(&application->windows[33], 1);
|
||||
Window_EraseStandardFrame(&application->windows[36], 1);
|
||||
Menu_Free(application->contextMenu, NULL);
|
||||
|
|
|
|||
|
|
@ -240,7 +240,7 @@ static int ProcessTouchScreenAction(PoffinManager *app)
|
|||
|
||||
static BOOL State_SelectPoffin(PoffinManager *app)
|
||||
{
|
||||
u32 menuSelection = LIST_NOTHING_CHOSEN;
|
||||
u32 menuSelection = MENU_NOTHING_CHOSEN;
|
||||
|
||||
if (app->poffinMenu == NULL) {
|
||||
return FALSE;
|
||||
|
|
@ -259,7 +259,7 @@ static BOOL State_SelectPoffin(PoffinManager *app)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
if (menuSelection == LIST_NOTHING_CHOSEN) {
|
||||
if (menuSelection == MENU_NOTHING_CHOSEN) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
@ -274,8 +274,8 @@ static BOOL State_SelectPoffin(PoffinManager *app)
|
|||
Sound_PlayEffect(SEQ_SE_CONFIRM);
|
||||
|
||||
switch (menuSelection) {
|
||||
case LIST_NOTHING_CHOSEN:
|
||||
case LIST_CANCEL:
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
case MENU_CANCEL:
|
||||
case POFFIN_LIST_SENTINEL:
|
||||
app->selectedPoffin = POFFIN_LIST_SENTINEL;
|
||||
app->givePoffin = FALSE;
|
||||
|
|
@ -324,8 +324,8 @@ static BOOL State_SelectAction(PoffinManager *app)
|
|||
PoffinManager_ShowDiscardQuestion(app);
|
||||
app->state = STATE_INIT_DELETE_POFFIN_CONFIRM;
|
||||
break;
|
||||
case LIST_NOTHING_CHOSEN:
|
||||
case LIST_CANCEL:
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
case MENU_CANCEL:
|
||||
default:
|
||||
PoffinManager_FreeActionMenu(app);
|
||||
PoffinCaseApp_UpdateListSprites(app, 0);
|
||||
|
|
@ -351,12 +351,12 @@ static BOOL State_InitDeletePoffinConfirm(PoffinManager *app)
|
|||
static BOOL State_ConfirmDeletePoffin(PoffinManager *app)
|
||||
{
|
||||
switch (Menu_ProcessInputAndHandleExit(app->yesNoMenu, app->heapID)) {
|
||||
case 0:
|
||||
case MENU_YES:
|
||||
Sound_PlayEffect(SEQ_SE_CONFIRM);
|
||||
PoffinManager_ShowThrownOutMessage(app);
|
||||
app->state = STATE_DELETE_POFFIN;
|
||||
return FALSE;
|
||||
case MENU_CANCELED:
|
||||
case MENU_CANCEL:
|
||||
Sound_PlayEffect(SEQ_SE_CONFIRM);
|
||||
Window_EraseMessageBox(&app->windows[2], FALSE);
|
||||
app->state = STATE_INIT_ACTION_MENU;
|
||||
|
|
|
|||
|
|
@ -1123,11 +1123,11 @@ static BOOL RowanIntro_ChoiceBox(RowanIntro *manager, enum ChoicesCase choicesCa
|
|||
case 1:
|
||||
manager->playerChoice = ListMenu_ProcessInput(manager->listMenu);
|
||||
|
||||
if (manager->playerChoice == LIST_NOTHING_CHOSEN) {
|
||||
if (manager->playerChoice == MENU_NOTHING_CHOSEN) {
|
||||
break;
|
||||
}
|
||||
|
||||
if ((manager->playerChoice == LIST_CANCEL) && (allowCancel == TRUE)) {
|
||||
if (manager->playerChoice == MENU_CANCEL && allowCancel == TRUE) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -2675,7 +2675,7 @@ static BOOL RowanIntro_Run(RowanIntro *manager)
|
|||
manager->state = RI_STATE_NAME_DIALOGUE;
|
||||
break;
|
||||
case 2:
|
||||
case LIST_CANCEL: {
|
||||
case MENU_CANCEL: {
|
||||
Bg_ClearTilemap(manager->bgConfig, BG_LAYER_MAIN_0);
|
||||
}
|
||||
manager->state = RI_STATE_GENDR_REPEAT;
|
||||
|
|
@ -2770,7 +2770,7 @@ static BOOL RowanIntro_Run(RowanIntro *manager)
|
|||
manager->state = RI_STATE_NAME_FADE_OUT_AVATAR;
|
||||
break;
|
||||
case 2:
|
||||
case LIST_CANCEL:
|
||||
case MENU_CANCEL:
|
||||
String_Clear(manager->playerNamingScreenArgs->textInputStr);
|
||||
manager->bufferedState = RI_STATE_GENDR_FADE_IN_AVATAR_PREP;
|
||||
manager->state = RI_STATE_NAME_FADE_OUT_AVATAR;
|
||||
|
|
@ -2916,7 +2916,7 @@ static BOOL RowanIntro_Run(RowanIntro *manager)
|
|||
manager->state = RI_STATE_FADE_OUT_RIVAL;
|
||||
break;
|
||||
case 2:
|
||||
case LIST_CANCEL:
|
||||
case MENU_CANCEL:
|
||||
String_Clear(manager->rivalNamingScreenArgs->textInputStr);
|
||||
manager->state = RI_STATE_RIVAL_NAME_DIALOGUE;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -519,12 +519,12 @@ static void Evolution_Main(EvolutionData *evolutionData)
|
|||
break;
|
||||
case EVOLUTION_STATE_PROCESS_INPUT_SHOULD_A_MOVE_BE_DELETED:
|
||||
switch (Menu_ProcessInputAndHandleExit(evolutionData->menu, evolutionData->heapID)) {
|
||||
case 0:
|
||||
case MENU_YES:
|
||||
evolutionData->state = EVOLUTION_STATE_SET_SUMMARY_DATA;
|
||||
PaletteData_StartFade(evolutionData->paletteData, PLTTBUF_MAIN_BG_F | PLTTBUF_SUB_BG_F | PLTTBUF_MAIN_OBJ_F | PLTTBUF_SUB_OBJ_F, 0xFFFF, 1, 0, 16, 0);
|
||||
PokemonSpriteManager_StartFadeAll(evolutionData->monSpriteMan, 0, 16, 0, 0);
|
||||
break;
|
||||
case MENU_CANCELED:
|
||||
case MENU_CANCEL:
|
||||
evolutionData->state = EVOLUTION_STATE_PRINT_STOP_TRYING_TO_TEACH_MOVE;
|
||||
break;
|
||||
}
|
||||
|
|
@ -589,14 +589,14 @@ static void Evolution_Main(EvolutionData *evolutionData)
|
|||
break;
|
||||
case EVOLUTION_STATE_PROCESS_INPUT_STOP_TRYING_TO_TEACH_MOVE:
|
||||
switch (Menu_ProcessInputAndHandleExit(evolutionData->menu, evolutionData->heapID)) {
|
||||
case 0:
|
||||
case MENU_YES:
|
||||
StringTemplate_SetNickname(evolutionData->strTemplate, 0, Pokemon_GetBoxPokemon(evolutionData->mon));
|
||||
StringTemplate_SetMoveName(evolutionData->strTemplate, 1, evolutionData->moveID);
|
||||
evolutionData->printerID = Evolution_PrintString(evolutionData, BattleStrings_Text_PokemonDidNotLearnTheMove);
|
||||
evolutionData->delay = 30;
|
||||
evolutionData->state = EVOLUTION_STATE_WAIT_PRINT_DID_NOT_LEARN_MOVE;
|
||||
break;
|
||||
case MENU_CANCELED:
|
||||
case MENU_CANCEL:
|
||||
evolutionData->state = EVOLUTION_STATE_PRINT_WANTS_TO_LEARN_MOVE;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ u32 ListMenu_ProcessInput(ListMenu *menu)
|
|||
}
|
||||
|
||||
if (JOY_NEW(PAD_BUTTON_B)) {
|
||||
return LIST_CANCEL;
|
||||
return MENU_CANCEL;
|
||||
}
|
||||
|
||||
if (JOY_REPEAT(PAD_KEY_UP)) {
|
||||
|
|
@ -73,7 +73,7 @@ u32 ListMenu_ProcessInput(ListMenu *menu)
|
|||
menu->lastAction = LIST_MENU_ACTION_MOVE_UP;
|
||||
}
|
||||
|
||||
return LIST_NOTHING_CHOSEN;
|
||||
return MENU_NOTHING_CHOSEN;
|
||||
}
|
||||
|
||||
if (JOY_REPEAT(PAD_KEY_DOWN)) {
|
||||
|
|
@ -81,7 +81,7 @@ u32 ListMenu_ProcessInput(ListMenu *menu)
|
|||
menu->lastAction = LIST_MENU_ACTION_MOVE_DOWN;
|
||||
}
|
||||
|
||||
return LIST_NOTHING_CHOSEN;
|
||||
return MENU_NOTHING_CHOSEN;
|
||||
}
|
||||
|
||||
u16 pageUp, pageDown;
|
||||
|
|
@ -108,7 +108,7 @@ u32 ListMenu_ProcessInput(ListMenu *menu)
|
|||
menu->lastAction = LIST_MENU_ACTION_PAGE_UP;
|
||||
}
|
||||
|
||||
return LIST_NOTHING_CHOSEN;
|
||||
return MENU_NOTHING_CHOSEN;
|
||||
}
|
||||
|
||||
if (pageDown) {
|
||||
|
|
@ -116,10 +116,10 @@ u32 ListMenu_ProcessInput(ListMenu *menu)
|
|||
menu->lastAction = LIST_MENU_ACTION_PAGE_DOWN;
|
||||
}
|
||||
|
||||
return LIST_NOTHING_CHOSEN;
|
||||
return MENU_NOTHING_CHOSEN;
|
||||
}
|
||||
|
||||
return LIST_NOTHING_CHOSEN;
|
||||
return MENU_NOTHING_CHOSEN;
|
||||
}
|
||||
|
||||
void ListMenu_Free(ListMenu *menu, u16 *outListPos, u16 *outCursorPos)
|
||||
|
|
@ -176,7 +176,7 @@ u32 ListMenu_TestInput(ListMenu *menu, ListMenuTemplate *template, u16 listPos,
|
|||
*outCursorPos = menu->cursorPos;
|
||||
}
|
||||
|
||||
return LIST_NOTHING_CHOSEN;
|
||||
return MENU_NOTHING_CHOSEN;
|
||||
}
|
||||
|
||||
void ListMenu_SetAltTextColors(ListMenu *menu, u8 fg, u8 bg, u8 shadow)
|
||||
|
|
@ -295,7 +295,7 @@ u32 ListMenu_GetAttribute(ListMenu *menu, u8 attribute)
|
|||
break;
|
||||
|
||||
default:
|
||||
result = LIST_NOTHING_CHOSEN;
|
||||
result = MENU_NOTHING_CHOSEN;
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
@ -343,7 +343,7 @@ static void PrintEntries(ListMenu *menu, u16 startIndex, u16 lineOffset, u16 lin
|
|||
|
||||
for (int line = 0; line < lineCount; line++) {
|
||||
u8 xOffset;
|
||||
if (menu->template.choices[startIndex].index != LIST_HEADER) {
|
||||
if (menu->template.choices[startIndex].index != MENU_HEADER) {
|
||||
xOffset = menu->template.textXOffset;
|
||||
} else {
|
||||
xOffset = menu->template.headerXOffset;
|
||||
|
|
@ -416,7 +416,7 @@ static u8 UpdateOffsetsForScroll(ListMenu *menu, u8 movingDown)
|
|||
if (listPos == 0) {
|
||||
while (cursorPos > 0) {
|
||||
cursorPos--;
|
||||
if (menu->template.choices[listPos + cursorPos].index != LIST_HEADER) {
|
||||
if (menu->template.choices[listPos + cursorPos].index != MENU_HEADER) {
|
||||
menu->cursorPos = cursorPos;
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -427,7 +427,7 @@ static u8 UpdateOffsetsForScroll(ListMenu *menu, u8 movingDown)
|
|||
|
||||
while (cursorPos > newListPos) {
|
||||
cursorPos--;
|
||||
if (menu->template.choices[listPos + cursorPos].index != LIST_HEADER) {
|
||||
if (menu->template.choices[listPos + cursorPos].index != MENU_HEADER) {
|
||||
menu->cursorPos = cursorPos;
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -448,7 +448,7 @@ static u8 UpdateOffsetsForScroll(ListMenu *menu, u8 movingDown)
|
|||
while (cursorPos < (menu->template.maxDisplay - 1)) {
|
||||
cursorPos++;
|
||||
|
||||
if (menu->template.choices[listPos + cursorPos].index != LIST_HEADER) {
|
||||
if (menu->template.choices[listPos + cursorPos].index != MENU_HEADER) {
|
||||
menu->cursorPos = cursorPos;
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -460,7 +460,7 @@ static u8 UpdateOffsetsForScroll(ListMenu *menu, u8 movingDown)
|
|||
while (cursorPos < newListPos) {
|
||||
cursorPos++;
|
||||
|
||||
if (menu->template.choices[listPos + cursorPos].index != LIST_HEADER) {
|
||||
if (menu->template.choices[listPos + cursorPos].index != MENU_HEADER) {
|
||||
menu->cursorPos = cursorPos;
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -524,7 +524,7 @@ static u8 UpdateSelectedRow(ListMenu *menu, u8 updateCursor, u8 scrollCount, u8
|
|||
}
|
||||
|
||||
linesScrolled++;
|
||||
} while (menu->template.choices[menu->listPos + menu->cursorPos].index == LIST_HEADER);
|
||||
} while (menu->template.choices[menu->listPos + menu->cursorPos].index == MENU_HEADER);
|
||||
}
|
||||
|
||||
if (updateCursor) {
|
||||
|
|
|
|||
|
|
@ -976,9 +976,9 @@ static void ProcessStateTransitionMenuInput(ApplicationManager *appMan, enum Mys
|
|||
u32 input = ListMenu_ProcessInput(appData->listMenu);
|
||||
|
||||
switch (input) {
|
||||
case LIST_NOTHING_CHOSEN:
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
break;
|
||||
case LIST_CANCEL:
|
||||
case MENU_CANCEL:
|
||||
Sound_PlayEffect(SEQ_SE_CONFIRM);
|
||||
|
||||
if (onCancel) {
|
||||
|
|
|
|||
|
|
@ -1123,9 +1123,9 @@ static void ProcessStateTransitionMenuInput(ApplicationManager *appMan, enum Won
|
|||
u32 input = ListMenu_ProcessInput(appData->listMenu);
|
||||
|
||||
switch (input) {
|
||||
case LIST_NOTHING_CHOSEN:
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
break;
|
||||
case LIST_CANCEL:
|
||||
case MENU_CANCEL:
|
||||
Sound_PlayEffect(SEQ_SE_CONFIRM);
|
||||
|
||||
if (onCancelStateTransition) {
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ u32 Menu_ProcessInput(Menu *menu)
|
|||
|
||||
if (JOY_NEW(menu->cancelKeys)) {
|
||||
Sound_PlayEffect(SEQ_SE_CONFIRM);
|
||||
return MENU_CANCELED;
|
||||
return MENU_CANCEL;
|
||||
}
|
||||
|
||||
if (JOY_NEW(PAD_KEY_UP)) {
|
||||
|
|
@ -124,7 +124,7 @@ u32 Menu_ProcessInputWithSound(Menu *menu, u16 sdatID)
|
|||
|
||||
if (JOY_NEW(menu->cancelKeys)) {
|
||||
Sound_PlayEffect(SEQ_SE_CONFIRM);
|
||||
return MENU_CANCELED;
|
||||
return MENU_CANCEL;
|
||||
}
|
||||
|
||||
if (JOY_NEW(PAD_KEY_UP)) {
|
||||
|
|
@ -284,7 +284,7 @@ static u8 TryMovingCursor(Menu *menu, u8 direction)
|
|||
}
|
||||
}
|
||||
|
||||
if (menu->template.choices[newCursorPos].index == MENU_DUMMY) {
|
||||
if (menu->template.choices[newCursorPos].index == MENU_HEADER) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
@ -355,7 +355,7 @@ Menu *Menu_MakeYesNoChoiceWithCursorAt(BgConfig *bgConfig, const WindowTemplate
|
|||
StringList *choices = StringList_New(2, heapID);
|
||||
|
||||
StringList_AddFromMessageBank(choices, msgLoader, MenuEntries_Text_Yes, 0);
|
||||
StringList_AddFromMessageBank(choices, msgLoader, MenuEntries_Text_No, MENU_CANCELED);
|
||||
StringList_AddFromMessageBank(choices, msgLoader, MenuEntries_Text_No, MENU_CANCEL);
|
||||
MessageLoader_Free(msgLoader);
|
||||
|
||||
menuTemplate.choices = choices;
|
||||
|
|
|
|||
|
|
@ -237,9 +237,9 @@ static void MenuSysTaskCallback(SysTask *sysTask, void *param)
|
|||
switch (selectedEntry) {
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
break;
|
||||
case MENU_CANCELED:
|
||||
case MENU_CANCEL:
|
||||
if (menuManager->canExitWithB == TRUE) {
|
||||
*menuManager->selectedOptionPtr = MENU_CANCELED;
|
||||
*menuManager->selectedOptionPtr = MENU_CANCEL;
|
||||
FieldMenuManager_DeleteWithMenu(menuManager);
|
||||
}
|
||||
break;
|
||||
|
|
@ -360,7 +360,7 @@ static void _FieldMenuManager_AddListMenuEntry(FieldMenuManager *menuManager, u3
|
|||
String_Free(fmtString);
|
||||
|
||||
if (entryIndex == LIST_MENU_BUILDER_HEADER) {
|
||||
menuManager->listMenuChoicesStrings[menuManager->optionsCount].index = LIST_HEADER;
|
||||
menuManager->listMenuChoicesStrings[menuManager->optionsCount].index = MENU_HEADER;
|
||||
} else {
|
||||
menuManager->listMenuChoicesStrings[menuManager->optionsCount].index = entryIndex;
|
||||
}
|
||||
|
|
@ -414,7 +414,7 @@ static void FieldMenuManager_InitListMenuTemplate(FieldMenuManager *menuManager)
|
|||
|
||||
static void ListMenuPrintCallback(ListMenu *listMenu, u32 index, u8 yOffset)
|
||||
{
|
||||
if (index == LIST_HEADER) {
|
||||
if (index == MENU_HEADER) {
|
||||
ListMenu_SetAltTextColors(listMenu, 3, 15, 4);
|
||||
} else {
|
||||
ListMenu_SetAltTextColors(listMenu, 1, 15, 2);
|
||||
|
|
@ -462,12 +462,12 @@ static void ListMenuSysTaskCallback(SysTask *sysTask, void *param)
|
|||
}
|
||||
|
||||
switch (selectedOption) {
|
||||
case LIST_NOTHING_CHOSEN:
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
break;
|
||||
case LIST_CANCEL:
|
||||
case MENU_CANCEL:
|
||||
if (menuManager->canExitWithB == TRUE) {
|
||||
Sound_PlayEffect(SEQ_SE_CONFIRM);
|
||||
*menuManager->selectedOptionPtr = LIST_CANCEL;
|
||||
*menuManager->selectedOptionPtr = MENU_CANCEL;
|
||||
FieldMenuManager_DeleteWithListMenu(param);
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -367,7 +367,7 @@ BOOL ScrCmd_ShowMoveTutorMoveSelectionMenu(ScriptContext *scriptContext)
|
|||
miscMessageLoader = MessageLoader_Init(MSG_LOADER_LOAD_ON_DEMAND, NARC_INDEX_MSGDATA__PL_MSG, TEXT_BANK_MENU_ENTRIES, HEAP_ID_FIELD3);
|
||||
|
||||
MoveTutorManager_SetMessageLoader(moveTutorManager, miscMessageLoader);
|
||||
MoveTutorManager_AddMenuEntry(moveTutorManager, MenuEntries_Text_Exit, 0xff, (u16)LIST_CANCEL); // cast required to match
|
||||
MoveTutorManager_AddMenuEntry(moveTutorManager, MenuEntries_Text_Exit, 0xff, (u16)MENU_CANCEL); // cast required to match
|
||||
MessageLoader_Free(miscMessageLoader);
|
||||
|
||||
MoveTutorManager_SetMessageLoader(moveTutorManager, moveNamesLoader);
|
||||
|
|
@ -533,12 +533,12 @@ static void SysTaskCallback(SysTask *sysTask, void *_moveTutorManager)
|
|||
}
|
||||
|
||||
switch (selectedEntry) {
|
||||
case LIST_NOTHING_CHOSEN:
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
break;
|
||||
case LIST_CANCEL:
|
||||
case MENU_CANCEL:
|
||||
if (moveTutorManager->canExitWithB == TRUE) {
|
||||
Sound_PlayEffect(SEQ_SE_CONFIRM);
|
||||
*moveTutorManager->selectedOptionPtr = LIST_CANCEL;
|
||||
*moveTutorManager->selectedOptionPtr = MENU_CANCEL;
|
||||
|
||||
MoveTutorManager_Delete(moveTutorManager);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
#include "constants/accessories.h"
|
||||
#include "constants/field/window.h"
|
||||
#include "constants/scrcmd.h"
|
||||
|
||||
#include "overlay007/shop_menu.h"
|
||||
|
||||
|
|
@ -158,7 +157,7 @@ BOOL AccessoryShop_Main(AccessoryShop *shop)
|
|||
case ACCESSORY_SHOP_STATE_SELECT_ITEM_LIST:
|
||||
input = AccessoryShop_SelectItemListMenu(&shop->itemList);
|
||||
|
||||
if (input != LIST_NOTHING_CHOSEN && input != LIST_CANCEL) {
|
||||
if (input != MENU_NOTHING_CHOSEN && input != MENU_CANCEL) {
|
||||
Bg_FillTilemapRect(shop->bgConfig, BG_LAYER_MAIN_3, 0, 0, 0, 32, 18, 17);
|
||||
|
||||
AccessoryShop_HideScrollArrows(&shop->itemList);
|
||||
|
|
@ -168,7 +167,7 @@ BOOL AccessoryShop_Main(AccessoryShop *shop)
|
|||
shop->nextState = ACCESSORY_SHOP_STATE_INIT_YES_NO_CHOICE;
|
||||
|
||||
Sound_PlayEffect(SEQ_SE_CONFIRM);
|
||||
} else if (input == LIST_CANCEL) {
|
||||
} else if (input == MENU_CANCEL) {
|
||||
string = MessageLoader_GetNewString(shop->msgLoader, FlowerShop_Text_PleaseComeAgain);
|
||||
AccessoryShop_PrintStringToMsgBox(&shop->msgbox, string, shop->heapID);
|
||||
String_Free(string);
|
||||
|
|
@ -212,7 +211,7 @@ BOOL AccessoryShop_Main(AccessoryShop *shop)
|
|||
|
||||
shop->state = ACCESSORY_SHOP_STATE_WAIT_AB_INPUT;
|
||||
shop->nextState = ACCESSORY_SHOP_STATE_CONFIRM_PURCHASE;
|
||||
} else if (input == MENU_CANCELED) {
|
||||
} else if (input == MENU_CANCEL) {
|
||||
AccessoryShop_DeleteYesNoChoice(&shop->yesNoChoice);
|
||||
shop->state = ACCESSORY_SHOP_STATE_LOAD_BUY_MSG;
|
||||
}
|
||||
|
|
@ -583,7 +582,7 @@ static u32 AccessoryShop_SelectItemListMenu(AccessoryShopItemList *itemList)
|
|||
u16 cursorPos;
|
||||
u32 input = ListMenu_ProcessInput(itemList->listMenu);
|
||||
|
||||
if (input == LIST_NOTHING_CHOSEN) {
|
||||
if (input == MENU_NOTHING_CHOSEN) {
|
||||
ListMenu_CalcTrueCursorPos(itemList->listMenu, &cursorPos);
|
||||
|
||||
if (itemList->cursorPos != cursorPos) {
|
||||
|
|
@ -593,9 +592,9 @@ static u32 AccessoryShop_SelectItemListMenu(AccessoryShopItemList *itemList)
|
|||
Sound_PlayEffect(SEQ_SE_CONFIRM);
|
||||
AccessoryShop_UpdateScrollArrowsVisibility(itemList);
|
||||
}
|
||||
} else if (input != LIST_CANCEL) {
|
||||
} else if (input != MENU_CANCEL) {
|
||||
if (itemList->cursorPos == (itemList->maxListItems - 1)) {
|
||||
input = LIST_CANCEL;
|
||||
input = MENU_CANCEL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -381,21 +381,21 @@ static void Shop_InitContextMenu(ShopMenu *shopMenu)
|
|||
|
||||
StringList_AddFromMessageBank(shopMenu->optionsList, shopMenu->msgLoader, pl_msg_00000543_00015, SHOP_STATE_INIT_CAMERA);
|
||||
StringList_AddFromMessageBank(shopMenu->optionsList, shopMenu->msgLoader, pl_msg_00000543_00016, 14);
|
||||
StringList_AddFromMessageBank(shopMenu->optionsList, shopMenu->msgLoader, pl_msg_00000543_00017, LIST_CANCEL);
|
||||
StringList_AddFromMessageBank(shopMenu->optionsList, shopMenu->msgLoader, pl_msg_00000543_00017, MENU_CANCEL);
|
||||
Window_Add(shopMenu->bgConfig, &shopMenu->windows[0], BG_LAYER_MAIN_3, 1, 1, 13, 6, FIELD_MESSAGE_PALETTE_INDEX, (((1024 - (18 + 12) - 9 - (32 * 8)) - (18 + 12 + 24)) - (27 * 4)) - (13 * 6));
|
||||
} else if (shopMenu->martType == MART_TYPE_FRONTIER) {
|
||||
maxOptions = 2;
|
||||
shopMenu->optionsList = StringList_New(maxOptions, HEAP_ID_FIELD2);
|
||||
|
||||
StringList_AddFromMessageBank(shopMenu->optionsList, shopMenu->msgLoader, pl_msg_00000543_00029, SHOP_STATE_INIT_CAMERA);
|
||||
StringList_AddFromMessageBank(shopMenu->optionsList, shopMenu->msgLoader, pl_msg_00000543_00030, LIST_CANCEL);
|
||||
StringList_AddFromMessageBank(shopMenu->optionsList, shopMenu->msgLoader, pl_msg_00000543_00030, MENU_CANCEL);
|
||||
Window_Add(shopMenu->bgConfig, &shopMenu->windows[0], BG_LAYER_MAIN_3, 23, 13, 7, 4, FIELD_MESSAGE_PALETTE_INDEX, (((1024 - (18 + 12) - 9 - (32 * 8)) - (18 + 12 + 24)) - (27 * 4)) - (13 * 6));
|
||||
} else {
|
||||
maxOptions = 2;
|
||||
shopMenu->optionsList = StringList_New(maxOptions, HEAP_ID_FIELD2);
|
||||
|
||||
StringList_AddFromMessageBank(shopMenu->optionsList, shopMenu->msgLoader, pl_msg_00000543_00015, SHOP_STATE_INIT_CAMERA);
|
||||
StringList_AddFromMessageBank(shopMenu->optionsList, shopMenu->msgLoader, pl_msg_00000543_00017, LIST_CANCEL);
|
||||
StringList_AddFromMessageBank(shopMenu->optionsList, shopMenu->msgLoader, pl_msg_00000543_00017, MENU_CANCEL);
|
||||
Window_Add(shopMenu->bgConfig, &shopMenu->windows[0], BG_LAYER_MAIN_3, 1, 1, 13, 4, 13, (((1024 - (18 + 12) - 9 - (32 * 8)) - (18 + 12 + 24)) - (27 * 4)) - (13 * 6));
|
||||
}
|
||||
|
||||
|
|
@ -421,7 +421,7 @@ static u8 Shop_SelectContextMenu(ShopMenu *shopMenu)
|
|||
switch (input) {
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
break;
|
||||
case MENU_CANCELED:
|
||||
case MENU_CANCEL:
|
||||
Shop_CloseContextMenu(shopMenu);
|
||||
return SHOP_STATE_SHOW_EXIT_MESSAGE;
|
||||
default:
|
||||
|
|
@ -667,9 +667,9 @@ static void Shop_InitItemsList(ShopMenu *shopMenu)
|
|||
}
|
||||
|
||||
if (isTMShop) {
|
||||
StringList_AddFromMessageBank(shopMenu->itemsList, shopMenu->msgLoader, pl_msg_00000543_00026, LIST_CANCEL);
|
||||
StringList_AddFromMessageBank(shopMenu->itemsList, shopMenu->msgLoader, pl_msg_00000543_00026, MENU_CANCEL);
|
||||
} else {
|
||||
StringList_AddFromMessageBank(shopMenu->itemsList, shopMenu->msgLoader, pl_msg_00000543_00008, LIST_CANCEL);
|
||||
StringList_AddFromMessageBank(shopMenu->itemsList, shopMenu->msgLoader, pl_msg_00000543_00008, MENU_CANCEL);
|
||||
}
|
||||
|
||||
MessageLoader_Free(itemNames);
|
||||
|
|
@ -704,7 +704,7 @@ static void Shop_MenuCursorCallback(ListMenu *menu, u32 index, u8 onInit)
|
|||
|
||||
Window_FillTilemap(&shopMenu->windows[SHOP_WINDOW_ITEM_DESCRIPTION], 0);
|
||||
|
||||
if (index != MENU_CANCELED) {
|
||||
if (index != MENU_CANCEL) {
|
||||
String *string;
|
||||
|
||||
if (shopMenu->martType == MART_TYPE_NORMAL) {
|
||||
|
|
@ -762,7 +762,7 @@ static void Shop_MenuPrintCallback(ListMenu *menu, u32 index, u8 yOffset)
|
|||
{
|
||||
ShopMenu *shopMenu = (ShopMenu *)ListMenu_GetAttribute(menu, LIST_MENU_PARENT);
|
||||
|
||||
if (index != MENU_CANCELED) {
|
||||
if (index != MENU_CANCEL) {
|
||||
String *string, *fmtString;
|
||||
u32 price, strWidth;
|
||||
u16 itemId = index;
|
||||
|
|
@ -792,7 +792,7 @@ static void Shop_MenuPrintCallback(ListMenu *menu, u32 index, u8 yOffset)
|
|||
String_Free(string);
|
||||
}
|
||||
|
||||
if (index == MENU_CANCELED) {
|
||||
if (index == MENU_CANCEL) {
|
||||
String *string = MessageLoader_GetNewString(shopMenu->msgLoader, pl_msg_00000543_00008);
|
||||
|
||||
Window_FillRectWithColor(&shopMenu->windows[SHOP_WINDOW_ITEM_LIST], 15, 0, yOffset, 19 * 8, 16);
|
||||
|
|
@ -871,7 +871,7 @@ static u8 Shop_SelectBuyMenu(ShopMenu *shopMenu)
|
|||
switch (input) {
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
break;
|
||||
case MENU_CANCELED:
|
||||
case MENU_CANCEL:
|
||||
ListMenu_Free(shopMenu->listMenu, NULL, NULL);
|
||||
StringList_Free(shopMenu->itemsList);
|
||||
Shop_DestroyStaticWindows(shopMenu);
|
||||
|
|
@ -1195,7 +1195,7 @@ static u8 Shop_SelectConfirmPurchase(ShopMenu *shopMenu)
|
|||
Sound_PlayEffect(SEQ_SE_DP_REGI);
|
||||
return SHOP_STATE_CONFIRM_PURCHASE;
|
||||
}
|
||||
case MENU_CANCELED:
|
||||
case MENU_CANCEL:
|
||||
Window_EraseMessageBox(&shopMenu->windows[SHOP_WINDOW_MESSAGE], FALSE);
|
||||
Shop_SetScrollSpritesPositionXY(shopMenu, FALSE);
|
||||
Sprite_SetDrawFlag(shopMenu->sprites[SHOP_SPRITE_SCROLL_ARROW_UP], shopMenu->spriteDrawFlags[SHOP_SPRITE_SCROLL_ARROW_UP]);
|
||||
|
|
|
|||
|
|
@ -555,7 +555,7 @@ static int ov94_02241A58(GTSApplicationState *appState)
|
|||
appState->currentScreenInstruction = 5;
|
||||
Sound_PlayEffect(SEQ_SE_CONFIRM);
|
||||
break;
|
||||
case LIST_CANCEL:
|
||||
case MENU_CANCEL:
|
||||
ListMenu_Free(appState->unk_10D8, &appState->unk_10E4->unk_06, &appState->unk_10E4->unk_04);
|
||||
StringList_Free(appState->unk_10CC);
|
||||
Window_EraseStandardFrame(&appState->unk_F9C[0], 0);
|
||||
|
|
@ -601,9 +601,9 @@ static int ov94_02241BAC(GTSApplicationState *appState)
|
|||
{
|
||||
u32 input;
|
||||
switch (input = ov94_02242A6C(appState->unk_10D8, &appState->unk_108)) {
|
||||
case LIST_NOTHING_CHOSEN:
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
break;
|
||||
case LIST_CANCEL:
|
||||
case MENU_CANCEL:
|
||||
ListMenu_Free(appState->unk_10D8, &appState->unk_10E4->unk_0A, &appState->unk_10E4->unk_08);
|
||||
StringList_Free(appState->unk_10CC);
|
||||
Window_EraseStandardFrame(&appState->unk_F9C[1], 0);
|
||||
|
|
@ -667,7 +667,7 @@ static int ov94_02241DA0(GTSApplicationState *appState)
|
|||
u32 input;
|
||||
|
||||
switch (input = ov94_02242A6C(appState->unk_10D8, &appState->unk_108)) {
|
||||
case LIST_CANCEL:
|
||||
case MENU_CANCEL:
|
||||
ListMenu_Free(appState->unk_10D8, NULL, NULL);
|
||||
StringList_Free(appState->unk_10CC);
|
||||
Window_EraseStandardFrame(&appState->unk_F9C[0], 0);
|
||||
|
|
@ -719,9 +719,9 @@ static int ov94_02241F28(GTSApplicationState *appState)
|
|||
u32 input;
|
||||
|
||||
switch (input = ov94_02242A6C(appState->unk_10D8, &appState->unk_108)) {
|
||||
case LIST_NOTHING_CHOSEN:
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
break;
|
||||
case LIST_CANCEL:
|
||||
case MENU_CANCEL:
|
||||
case 12:
|
||||
ListMenu_Free(appState->unk_10D8, NULL, NULL);
|
||||
StringList_Free(appState->unk_10CC);
|
||||
|
|
@ -772,7 +772,7 @@ static int ov94_0224208C(GTSApplicationState *appState)
|
|||
int input = Menu_ProcessInputAndHandleExit(appState->yesNoMenu, HEAP_ID_62);
|
||||
|
||||
if (input != MENU_NOTHING_CHOSEN) {
|
||||
if (input == MENU_CANCELED) {
|
||||
if (input == MENU_CANCEL) {
|
||||
GTSApplication_SetNextScreenWithArgument(appState, GTS_SCREEN_SELECT_POKEMON, SCREEN_ARGUMENT_5);
|
||||
appState->currentScreenInstruction = 2;
|
||||
} else {
|
||||
|
|
@ -1109,7 +1109,7 @@ static int ov94_02242718(StringList **stringList, MessageLoader *speciesMessageL
|
|||
}
|
||||
}
|
||||
|
||||
StringList_AddFromMessageBank(*stringList, gtsMessageLoader, GTS_Text_Species_Cancel, LIST_CANCEL);
|
||||
StringList_AddFromMessageBank(*stringList, gtsMessageLoader, GTS_Text_Species_Cancel, MENU_CANCEL);
|
||||
|
||||
return seen + 1;
|
||||
}
|
||||
|
|
@ -1135,7 +1135,7 @@ static sGenderSelectionOptions[][2] = {
|
|||
{ GTS_Text_Either, 2 },
|
||||
{ GTS_Text_MaleIcon, 0 },
|
||||
{ GTS_Text_FemaleIcon, 1 },
|
||||
{ GTS_Text_Species_Cancel, LIST_CANCEL }
|
||||
{ GTS_Text_Species_Cancel, MENU_CANCEL }
|
||||
};
|
||||
|
||||
ListMenu *ov94_02242840(StringList **stringList, Window *window, MessageLoader *gtsMessageLoader)
|
||||
|
|
|
|||
|
|
@ -333,7 +333,7 @@ static int GTSApplication_WFCInit_ProcessSetupConfirmation(GTSApplicationState *
|
|||
int menuInput = Menu_ProcessInputAndHandleExit(appState->yesNoMenu, HEAP_ID_62);
|
||||
|
||||
if (menuInput != MENU_NOTHING_CHOSEN) {
|
||||
if (menuInput == MENU_CANCELED) {
|
||||
if (menuInput == MENU_CANCEL) {
|
||||
sub_0203848C(); // free the network lock?
|
||||
GTSApplication_SetNextScreenWithArgument(appState, GTS_SCREEN_WFC_INIT, SCREEN_ARGUMENT_0);
|
||||
appState->currentScreenInstruction = 11;
|
||||
|
|
@ -360,7 +360,7 @@ static int GTSApplication_WFCInit_RestartOrExit(GTSApplicationState *appState)
|
|||
int menuInput = Menu_ProcessInputAndHandleExit(appState->yesNoMenu, HEAP_ID_62);
|
||||
|
||||
if (menuInput != MENU_NOTHING_CHOSEN) {
|
||||
if (menuInput == MENU_CANCELED) {
|
||||
if (menuInput == MENU_CANCEL) {
|
||||
if (!DWC_CheckInet()) {
|
||||
appState->currentScreenInstruction = 0;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -952,7 +952,7 @@ static BOOL WaitForYesNoResult(FrontierScriptContext *ctx)
|
|||
if (result == MENU_NOTHING_CHOSEN) {
|
||||
return FALSE;
|
||||
}
|
||||
if (result == 0) {
|
||||
if (result == MENU_YES) {
|
||||
*destVar = MENU_YES;
|
||||
} else {
|
||||
*destVar = MENU_NO;
|
||||
|
|
|
|||
|
|
@ -348,9 +348,9 @@ static void MenuSysTaskCallback(SysTask *task, void *data)
|
|||
switch (selectedEntry) {
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
break;
|
||||
case MENU_CANCELED:
|
||||
case MENU_CANCEL:
|
||||
if (menuManager->canExitWithB == TRUE) {
|
||||
*menuManager->selectedOptionPtr = MENU_CANCELED;
|
||||
*menuManager->selectedOptionPtr = MENU_CANCEL;
|
||||
FreeManagerWithMenu(data);
|
||||
}
|
||||
break;
|
||||
|
|
@ -445,7 +445,7 @@ static void AddListMenuEntry(FrontierMenuManager *menuManager, u32 entryID, u32
|
|||
String_Free(fmtStr);
|
||||
|
||||
if (index == LIST_MENU_BUILDER_HEADER) {
|
||||
menuManager->listMenuChoiceStrings[menuManager->optionCount].index = LIST_HEADER;
|
||||
menuManager->listMenuChoiceStrings[menuManager->optionCount].index = MENU_HEADER;
|
||||
} else {
|
||||
menuManager->listMenuChoiceStrings[menuManager->optionCount].index = index;
|
||||
}
|
||||
|
|
@ -498,7 +498,7 @@ static void InitListMenuTemplate(FrontierMenuManager *menuManager)
|
|||
|
||||
static void SetListMenuItemAltColor(ListMenu *listMenu, u32 index, u8 yOffset)
|
||||
{
|
||||
if (index == LIST_HEADER) {
|
||||
if (index == MENU_HEADER) {
|
||||
ListMenu_SetAltTextColors(listMenu, 3, 15, 4);
|
||||
} else {
|
||||
ListMenu_SetAltTextColors(listMenu, 1, 15, 2);
|
||||
|
|
@ -540,12 +540,12 @@ static void ListMenuSysTaskCallback(SysTask *task, void *data)
|
|||
FreeManagerWithListMenu(data, FALSE);
|
||||
} else {
|
||||
switch (selectedEntry) {
|
||||
case LIST_NOTHING_CHOSEN:
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
break;
|
||||
case LIST_CANCEL:
|
||||
case MENU_CANCEL:
|
||||
if (menuManager->canExitWithB == TRUE) {
|
||||
Sound_PlayEffect(SEQ_SE_CONFIRM);
|
||||
*menuManager->selectedOptionPtr = LIST_CANCEL;
|
||||
*menuManager->selectedOptionPtr = MENU_CANCEL;
|
||||
|
||||
FreeManagerWithListMenu(data, TRUE);
|
||||
}
|
||||
|
|
@ -614,7 +614,7 @@ void FrontierMenuManager_FreeListMenu(FrontierMenuManager *menuManager)
|
|||
return;
|
||||
}
|
||||
|
||||
*menuManager->selectedOptionPtr = MENU_CANCELED;
|
||||
*menuManager->selectedOptionPtr = MENU_CANCEL;
|
||||
FreeManagerWithListMenu(menuManager, FALSE);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2619,7 +2619,7 @@ static BOOL ScriptContext_WaitForYesNoResult(ScriptContext *ctx)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
if (result == 0) {
|
||||
if (result == MENU_YES) {
|
||||
*destVar = MENU_YES;
|
||||
} else {
|
||||
*destVar = MENU_NO;
|
||||
|
|
|
|||
|
|
@ -387,7 +387,7 @@ static BOOL BaseDecoration_DecorateTask(FieldTask *task)
|
|||
Underground *underground = SaveData_GetUnderground(ctx->fieldSystem->saveData);
|
||||
u32 input = DecorationGoodsMenu_GetLastInput(ctx->decorationGoodsMenu);
|
||||
|
||||
if (input == LIST_CANCEL) {
|
||||
if (input == MENU_CANCEL) {
|
||||
BaseDecoration_UpdateState(DECORATION_STATE_MAIN_MENU, ctx);
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -185,13 +185,13 @@ static void DecorationMenu_HandleInput(DecorationMenu *menu)
|
|||
DecorationMenu_UpdateCursorPos(menu);
|
||||
|
||||
if (input == DECORATION_OPTION_CANCEL) {
|
||||
input = LIST_CANCEL;
|
||||
input = MENU_CANCEL;
|
||||
}
|
||||
|
||||
switch (input) {
|
||||
case LIST_NOTHING_CHOSEN:
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
return;
|
||||
case LIST_CANCEL:
|
||||
case MENU_CANCEL:
|
||||
Sound_PlayEffect(SEQ_SE_CONFIRM);
|
||||
menu->lastInput = input;
|
||||
menu->state = DECORATION_MENU_STATE_OPTION_SELECTED;
|
||||
|
|
@ -291,7 +291,7 @@ static void DecorationGoodsMenu_HandleInput(DecorationGoodsMenu *menu)
|
|||
u32 trueInput = input >> 1;
|
||||
|
||||
if (menu->goodsCount == trueInput) {
|
||||
trueInput = LIST_CANCEL;
|
||||
trueInput = MENU_CANCEL;
|
||||
}
|
||||
|
||||
u16 listPos, cursorPos;
|
||||
|
|
@ -299,10 +299,10 @@ static void DecorationGoodsMenu_HandleInput(DecorationGoodsMenu *menu)
|
|||
DecorationGoodsMenu_UpdateScrollPrompts(menu->scrollPrompts, listPos, ListMenu_GetAttribute(menu->itemListMenu->listMenu, LIST_MENU_COUNT), ListMenu_GetAttribute(menu->itemListMenu->listMenu, LIST_MENU_MAX_DISPLAY));
|
||||
|
||||
switch (input) {
|
||||
case LIST_NOTHING_CHOSEN:
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
return;
|
||||
case LIST_CANCEL:
|
||||
menu->lastInput = LIST_CANCEL;
|
||||
case MENU_CANCEL:
|
||||
menu->lastInput = MENU_CANCEL;
|
||||
menu->state = DECORATION_GOODS_MENU_STATE_OPTION_SELECTED;
|
||||
Sound_PlayEffect(SEQ_SE_CONFIRM);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -88,11 +88,11 @@ u32 UndergroundItemListMenu_ProcessInput(UndergroundItemListMenu *menu)
|
|||
Sound_PlayEffect(SEQ_SE_CONFIRM);
|
||||
|
||||
if (listPos + cursorPos == count - 1) {
|
||||
return LIST_NOTHING_CHOSEN;
|
||||
return MENU_NOTHING_CHOSEN;
|
||||
}
|
||||
|
||||
if (listPos + cursorPos == menu->initialListPos + menu->initialCursorPos) {
|
||||
return LIST_NOTHING_CHOSEN;
|
||||
return MENU_NOTHING_CHOSEN;
|
||||
}
|
||||
|
||||
menu->moveItemCallback(menu->underground, menu->initialListPos + menu->initialCursorPos, listPos + cursorPos);
|
||||
|
|
@ -133,14 +133,14 @@ u32 UndergroundItemListMenu_ProcessInput(UndergroundItemListMenu *menu)
|
|||
menu->movingItems = FALSE;
|
||||
|
||||
ListMenu_Draw(listMenu);
|
||||
return LIST_NOTHING_CHOSEN;
|
||||
return MENU_NOTHING_CHOSEN;
|
||||
}
|
||||
} else {
|
||||
if (JOY_NEW(PAD_BUTTON_SELECT)) {
|
||||
Sound_PlayEffect(SEQ_SE_CONFIRM);
|
||||
|
||||
if (listPos + cursorPos == count - 1) {
|
||||
return LIST_NOTHING_CHOSEN;
|
||||
return MENU_NOTHING_CHOSEN;
|
||||
}
|
||||
|
||||
menu->initialListPos = listPos;
|
||||
|
|
@ -149,7 +149,7 @@ u32 UndergroundItemListMenu_ProcessInput(UndergroundItemListMenu *menu)
|
|||
menu->cursorPos = cursorPos;
|
||||
menu->movingItems = TRUE;
|
||||
|
||||
return LIST_NOTHING_CHOSEN;
|
||||
return MENU_NOTHING_CHOSEN;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -164,9 +164,9 @@ u32 UndergroundItemListMenu_ProcessInput(UndergroundItemListMenu *menu)
|
|||
}
|
||||
|
||||
switch (input) {
|
||||
case LIST_NOTHING_CHOSEN:
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
break;
|
||||
case LIST_CANCEL:
|
||||
case MENU_CANCEL:
|
||||
Sound_PlayEffect(SEQ_SE_CONFIRM);
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -654,7 +654,7 @@ static BOOL UndergroundMenu_HandleStartMenu(SysTask *sysTask, void *data)
|
|||
UndergroundMenu_TryTransitionIconAnimationToWiggle(menu->sprites[menu->menuCursorPos + 1]->sprite);
|
||||
|
||||
if (CommSys_CheckError()) {
|
||||
menu->startMenuInput = MENU_CANCELED;
|
||||
menu->startMenuInput = MENU_CANCEL;
|
||||
}
|
||||
|
||||
switch (menu->startMenuInput) {
|
||||
|
|
@ -662,7 +662,7 @@ static BOOL UndergroundMenu_HandleStartMenu(SysTask *sysTask, void *data)
|
|||
UndergroundMenu_AnimateSprites(menu);
|
||||
SpriteList_Update(menu->spriteManager.spriteList);
|
||||
return FALSE;
|
||||
case MENU_CANCELED:
|
||||
case MENU_CANCEL:
|
||||
menu->state = UNDERGROUND_MENU_STATE_CLOSE;
|
||||
break;
|
||||
default:
|
||||
|
|
@ -715,18 +715,18 @@ void UndergroundMenu_EraseCurrentMenu(UndergroundMenu *menu)
|
|||
static ItemSelectedOption sSphereTrapOptions[] = {
|
||||
{ .bankEntry = UndergroundCommon_Text_Bury, .index = UNDERGROUND_MENU_OPTION_BURY },
|
||||
{ .bankEntry = UndergroundCommon_Text_Trash, .index = UNDERGROUND_MENU_OPTION_TRASH },
|
||||
{ .bankEntry = UndergroundCommon_Text_Cancel, .index = LIST_CANCEL }
|
||||
{ .bankEntry = UndergroundCommon_Text_Cancel, .index = MENU_CANCEL }
|
||||
};
|
||||
|
||||
static ItemSelectedOption sGoodOptions[] = {
|
||||
{ .bankEntry = UndergroundCommon_Text_Trash, .index = UNDERGROUND_MENU_OPTION_TRASH },
|
||||
{ .bankEntry = UndergroundCommon_Text_Cancel, .index = LIST_CANCEL }
|
||||
{ .bankEntry = UndergroundCommon_Text_Cancel, .index = MENU_CANCEL }
|
||||
};
|
||||
|
||||
static ItemSelectedOption sTreasureOptions[] = {
|
||||
{ .bankEntry = UndergroundCommon_Text_PutInBag, .index = UNDERGROUND_MENU_OPTION_PUT_IN_BAG },
|
||||
{ .bankEntry = UndergroundCommon_Text_Trash, .index = UNDERGROUND_MENU_OPTION_TRASH },
|
||||
{ .bankEntry = UndergroundCommon_Text_Cancel, .index = LIST_CANCEL }
|
||||
{ .bankEntry = UndergroundCommon_Text_Cancel, .index = MENU_CANCEL }
|
||||
};
|
||||
|
||||
static void UndergroundMenu_InitItemSelectedMenu(UndergroundMenu *menu, int menuType)
|
||||
|
|
@ -819,7 +819,7 @@ void UndergroundMenu_PrintTrapDescription(ListMenu *listMenu, u32 index, u8 onIn
|
|||
int bankEntry;
|
||||
enum Trap trapID = getTrap(index, menu);
|
||||
|
||||
if (index == LIST_CANCEL) {
|
||||
if (index == MENU_CANCEL) {
|
||||
bankEntry = UndergroundTraps_Text_CloseDescription;
|
||||
} else {
|
||||
bankEntry = UNDERGROUND_TRAP_DESCRIPTIONS_START + trapID - 1;
|
||||
|
|
@ -871,7 +871,7 @@ static void UndergroundMenu_InitTrapsMenu(UndergroundMenu *menu, MoveItemCallbac
|
|||
StringList_AddFromMessageBank(menu->menuOptions, loader, getTrap(i, menu), i);
|
||||
}
|
||||
|
||||
StringList_AddFromMessageBank(menu->menuOptions, loader, UndergroundTraps_Text_Close, LIST_CANCEL);
|
||||
StringList_AddFromMessageBank(menu->menuOptions, loader, UndergroundTraps_Text_Close, MENU_CANCEL);
|
||||
|
||||
ListMenuTemplate template = sListMenuTemplate;
|
||||
template.count = trapCount + 1;
|
||||
|
|
@ -899,19 +899,19 @@ static BOOL UndergroundMenu_HandleTrapsMenu(SysTask *sysTask, void *data)
|
|||
UndergroundMan_StoreCursorAndListPos(UNDERGROUND_MENU_KEY_TRAPS, cursorPos, listPos);
|
||||
|
||||
if (CommSys_CheckError()) {
|
||||
input = LIST_CANCEL;
|
||||
input = MENU_CANCEL;
|
||||
}
|
||||
|
||||
// make sure we have the right type of -2
|
||||
if (input == MENU_CANCELED) {
|
||||
input = LIST_CANCEL;
|
||||
if (input == MENU_CANCEL) {
|
||||
input = MENU_CANCEL;
|
||||
}
|
||||
|
||||
switch (input) {
|
||||
case LIST_NOTHING_CHOSEN:
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
UndergroundMenu_UpdateScrollPrompts(menu, listPos, ListMenu_GetAttribute(menu->itemListMenu->listMenu, LIST_MENU_COUNT), UNDERGROUND_MENU_MAX_DISPLAY);
|
||||
return FALSE;
|
||||
case LIST_CANCEL:
|
||||
case MENU_CANCEL:
|
||||
UndergroundMenu_ReturnToStartMenu(menu);
|
||||
break;
|
||||
default:
|
||||
|
|
@ -954,9 +954,9 @@ static BOOL UndergroundMenu_HandleTrapSelectedMenu(SysTask *sysTask, void *data)
|
|||
}
|
||||
|
||||
switch (input) {
|
||||
case LIST_NOTHING_CHOSEN:
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
return FALSE;
|
||||
case LIST_CANCEL:
|
||||
case MENU_CANCEL:
|
||||
Sound_PlayEffect(SEQ_SE_CONFIRM);
|
||||
UndergroundMenu_CloseItemSelectedMenu(menu);
|
||||
UndergroundMenu_OpenTrapsMenu(menu);
|
||||
|
|
@ -999,7 +999,7 @@ static void UndergroundMenu_PrintSphereDescription(ListMenu *listMenu, u32 index
|
|||
int bankEntry;
|
||||
enum SphereType sphereType = getSphereType(index, menu);
|
||||
|
||||
if (index == LIST_CANCEL) {
|
||||
if (index == MENU_CANCEL) {
|
||||
bankEntry = UndergroundItems_Text_CloseDescription;
|
||||
} else {
|
||||
bankEntry = UNDERGROUND_ITEM_DESCRIPTIONS_START - 1 + sphereType;
|
||||
|
|
@ -1057,7 +1057,7 @@ static void UndergroundMenu_InitSpheresMenu(UndergroundMenu *menu, MoveItemCallb
|
|||
StringList_AddFromString(menu->menuOptions, menu->string, i);
|
||||
}
|
||||
|
||||
StringList_AddFromMessageBank(menu->menuOptions, loader, UndergroundItems_Text_Close, LIST_CANCEL);
|
||||
StringList_AddFromMessageBank(menu->menuOptions, loader, UndergroundItems_Text_Close, MENU_CANCEL);
|
||||
|
||||
ListMenuTemplate template = sListMenuTemplate;
|
||||
template.count = sphereCount + 1;
|
||||
|
|
@ -1084,19 +1084,19 @@ static BOOL UndergroundMenu_HandleSpheresMenu(SysTask *sysTask, void *data)
|
|||
UndergroundMan_StoreCursorAndListPos(UNDERGROUND_MENU_KEY_SPHERES, cursorPos, listPos);
|
||||
|
||||
if (CommSys_CheckError()) {
|
||||
input = LIST_CANCEL;
|
||||
input = MENU_CANCEL;
|
||||
}
|
||||
|
||||
// make sure we have the right type of -2
|
||||
if (input == MENU_CANCELED) {
|
||||
input = LIST_CANCEL;
|
||||
if (input == MENU_CANCEL) {
|
||||
input = MENU_CANCEL;
|
||||
}
|
||||
|
||||
switch (input) {
|
||||
case LIST_NOTHING_CHOSEN:
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
UndergroundMenu_UpdateScrollPrompts(menu, listPos, ListMenu_GetAttribute(menu->itemListMenu->listMenu, LIST_MENU_COUNT), UNDERGROUND_MENU_MAX_DISPLAY);
|
||||
return FALSE;
|
||||
case LIST_CANCEL:
|
||||
case MENU_CANCEL:
|
||||
UndergroundMenu_ReturnToStartMenu(menu);
|
||||
break;
|
||||
default:
|
||||
|
|
@ -1129,9 +1129,9 @@ static BOOL UndergroundMenu_HandleSphereSelectedMenu(SysTask *sysTask, void *dat
|
|||
}
|
||||
|
||||
switch (input) {
|
||||
case LIST_NOTHING_CHOSEN:
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
return FALSE;
|
||||
case LIST_CANCEL:
|
||||
case MENU_CANCEL:
|
||||
Sound_PlayEffect(SEQ_SE_CONFIRM);
|
||||
UndergroundMenu_CloseItemSelectedMenu(menu);
|
||||
UndergroundMenu_OpenSpheresMenu(menu);
|
||||
|
|
@ -1171,7 +1171,7 @@ void UndergroundMenu_PrintTreasureDescription(ListMenu *listMenu, u32 index, u8
|
|||
int bankEntry = index;
|
||||
int treasureID = getTreasure(index, menu);
|
||||
|
||||
if (index == LIST_CANCEL) {
|
||||
if (index == MENU_CANCEL) {
|
||||
bankEntry = UndergroundItems_Text_CloseDescription;
|
||||
} else {
|
||||
bankEntry = UNDERGROUND_ITEM_DESCRIPTIONS_START - 1 + treasureID;
|
||||
|
|
@ -1221,7 +1221,7 @@ static void UndergroundMenu_InitTreasuresMenu(UndergroundMenu *menu, MoveItemCal
|
|||
StringList_AddFromMessageBank(menu->menuOptions, loader, getTreasure(i, menu), i);
|
||||
}
|
||||
|
||||
StringList_AddFromMessageBank(menu->menuOptions, loader, UndergroundItems_Text_Close, LIST_CANCEL);
|
||||
StringList_AddFromMessageBank(menu->menuOptions, loader, UndergroundItems_Text_Close, MENU_CANCEL);
|
||||
|
||||
ListMenuTemplate template = sListMenuTemplate;
|
||||
template.count = treasureCount + 1;
|
||||
|
|
@ -1248,19 +1248,19 @@ static BOOL UndergroundMenu_HandleTreasuresMenu(SysTask *sysTask, void *data)
|
|||
UndergroundMan_StoreCursorAndListPos(UNDERGROUND_MENU_KEY_TREASURES, cursorPos, listPos);
|
||||
|
||||
if (CommSys_CheckError()) {
|
||||
input = LIST_CANCEL;
|
||||
input = MENU_CANCEL;
|
||||
}
|
||||
|
||||
// make sure we have the right type of -2
|
||||
if (input == MENU_CANCELED) {
|
||||
input = LIST_CANCEL;
|
||||
if (input == MENU_CANCEL) {
|
||||
input = MENU_CANCEL;
|
||||
}
|
||||
|
||||
switch (input) {
|
||||
case LIST_NOTHING_CHOSEN:
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
UndergroundMenu_UpdateScrollPrompts(menu, listPos, ListMenu_GetAttribute(menu->itemListMenu->listMenu, LIST_MENU_COUNT), UNDERGROUND_MENU_MAX_DISPLAY);
|
||||
return FALSE;
|
||||
case LIST_CANCEL:
|
||||
case MENU_CANCEL:
|
||||
UndergroundMenu_ReturnToStartMenu(menu);
|
||||
break;
|
||||
default:
|
||||
|
|
@ -1297,9 +1297,9 @@ static BOOL UndergroundMenu_HandleTreasureSelectedMenu(SysTask *sysTask, void *d
|
|||
}
|
||||
|
||||
switch (input) {
|
||||
case LIST_NOTHING_CHOSEN:
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
return FALSE;
|
||||
case LIST_CANCEL:
|
||||
case MENU_CANCEL:
|
||||
Sound_PlayEffect(SEQ_SE_CONFIRM);
|
||||
UndergroundMenu_CloseItemSelectedMenu(menu);
|
||||
UndergroundMenu_OpenTreasuresMenu(menu);
|
||||
|
|
@ -1380,7 +1380,7 @@ static void UndergroundMenu_CheckForReturnYesNo(SysTask *sysTask, void *data)
|
|||
|
||||
if (result == MENU_NOTHING_CHOSEN) {
|
||||
return;
|
||||
} else if (result == 0) {
|
||||
} else if (result == MENU_YES) {
|
||||
menu->state = UNDERGROUND_MENU_STATE_RETURN_TO_SURFACE;
|
||||
} else {
|
||||
UndergroundTextPrinter_EraseMessageBoxWindow(UndergroundMan_GetCommonTextPrinter());
|
||||
|
|
@ -1438,7 +1438,7 @@ static void UndergroundMenu_CheckForThrowAwayYesNo(UndergroundMenu *menu)
|
|||
|
||||
if (input == MENU_NOTHING_CHOSEN) {
|
||||
return;
|
||||
} else if (input == 0) {
|
||||
} else if (input == MENU_YES) {
|
||||
menu->state = UNDERGROUND_MENU_STATE_CLOSE_LEAVE_PAUSED;
|
||||
} else {
|
||||
menu->state = UNDERGROUND_MENU_STATE_CLOSE;
|
||||
|
|
@ -1523,7 +1523,7 @@ void UndergroundMenu_PrintGoodDescription(ListMenu *listMenu, u32 index, u8 onIn
|
|||
int bankEntry;
|
||||
enum Good goodID = getGood(index, menu);
|
||||
|
||||
if (index == LIST_CANCEL) {
|
||||
if (index == MENU_CANCEL) {
|
||||
bankEntry = UndergroundGoods_Text_CloseDescription;
|
||||
} else {
|
||||
bankEntry = UNDERGROUND_GOOD_DESCRIPTIONS_START + goodID - 1;
|
||||
|
|
@ -1607,7 +1607,7 @@ static void UndergroundMenu_InitGoodsMenu(UndergroundMenu *menu, MoveItemCallbac
|
|||
StringList_AddFromMessageBank(menu->menuOptions, loader, getGood(i, menu), i);
|
||||
}
|
||||
|
||||
StringList_AddFromMessageBank(menu->menuOptions, loader, UndergroundGoods_Text_Close, LIST_CANCEL);
|
||||
StringList_AddFromMessageBank(menu->menuOptions, loader, UndergroundGoods_Text_Close, MENU_CANCEL);
|
||||
|
||||
ListMenuTemplate template = sListMenuTemplate;
|
||||
template.count = goodsCount + 1;
|
||||
|
|
@ -1635,19 +1635,19 @@ static BOOL UndergroundMenu_HandleGoodsMenu(SysTask *sysTask, void *data)
|
|||
UndergroundMan_StoreCursorAndListPos(UNDERGROUND_MENU_KEY_GOODS, cursorPos, listPos);
|
||||
|
||||
if (CommSys_CheckError()) {
|
||||
input = LIST_CANCEL;
|
||||
input = MENU_CANCEL;
|
||||
}
|
||||
|
||||
// make sure we have the right type of -2
|
||||
if (input == MENU_CANCELED) {
|
||||
input = LIST_CANCEL;
|
||||
if (input == MENU_CANCEL) {
|
||||
input = MENU_CANCEL;
|
||||
}
|
||||
|
||||
switch (input) {
|
||||
case LIST_NOTHING_CHOSEN:
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
UndergroundMenu_UpdateScrollPrompts(menu, listPos, ListMenu_GetAttribute(menu->itemListMenu->listMenu, LIST_MENU_COUNT), UNDERGROUND_MENU_MAX_DISPLAY);
|
||||
return FALSE;
|
||||
case LIST_CANCEL:
|
||||
case MENU_CANCEL:
|
||||
Sound_PlayEffect(SEQ_SE_CONFIRM);
|
||||
UndergroundMenu_ReturnToStartMenu(menu);
|
||||
break;
|
||||
|
|
@ -1685,9 +1685,9 @@ static BOOL UndergroundMenu_HandleGoodSelectedMenu(SysTask *sysTask, void *data)
|
|||
}
|
||||
|
||||
switch (input) {
|
||||
case LIST_NOTHING_CHOSEN:
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
return FALSE;
|
||||
case LIST_CANCEL:
|
||||
case MENU_CANCEL:
|
||||
Sound_PlayEffect(SEQ_SE_CONFIRM);
|
||||
UndergroundMenu_CloseItemSelectedMenu(menu);
|
||||
UndergroundMenu_OpenGoodsMenu(menu);
|
||||
|
|
@ -1770,18 +1770,18 @@ static BOOL UndergroundMenu_HandleGiftMenu(SysTask *sysTask, void *data)
|
|||
u32 input = UndergroundItemListMenu_ProcessInput(menu->itemListMenu);
|
||||
|
||||
if (CommSys_CheckError()) {
|
||||
input = LIST_CANCEL;
|
||||
input = MENU_CANCEL;
|
||||
}
|
||||
|
||||
// make sure we have the right type of -2
|
||||
if (input == MENU_CANCELED) {
|
||||
input = LIST_CANCEL;
|
||||
if (input == MENU_CANCEL) {
|
||||
input = MENU_CANCEL;
|
||||
}
|
||||
|
||||
switch (input) {
|
||||
case LIST_NOTHING_CHOSEN:
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
return FALSE;
|
||||
case LIST_CANCEL:
|
||||
case MENU_CANCEL:
|
||||
if (menu->exitCallback != NULL) {
|
||||
ctx->selectedSlot = input;
|
||||
ctx->selectedID = 0;
|
||||
|
|
@ -1858,7 +1858,7 @@ void UndergroundMenu_MoveListCursorPosInBounds(UndergroundMenu *menu, int maxDis
|
|||
void UndergroundMenu_ResetBrightnessAndExit(SysTask *sysTask, void *data)
|
||||
{
|
||||
BrightnessController_SetScreenBrightness(0, GX_BLEND_PLANEMASK_BG0, BRIGHTNESS_MAIN_SCREEN);
|
||||
UndergroundMenu_Exit(data, LIST_CANCEL);
|
||||
UndergroundMenu_Exit(data, MENU_CANCEL);
|
||||
}
|
||||
|
||||
void UndergroundMenu_UpdateScrollPrompts(UndergroundMenu *menu, int listPos, int count, int maxDisplay)
|
||||
|
|
|
|||
|
|
@ -1129,7 +1129,7 @@ static void Mining_ConfirmStartMiningTask(SysTask *sysTask, void *unused)
|
|||
u8 confirmResult;
|
||||
if (input == MENU_NOTHING_CHOSEN) {
|
||||
return;
|
||||
} else if (input == 0) {
|
||||
} else if (input == MENU_YES) {
|
||||
confirmResult = TRUE;
|
||||
} else {
|
||||
confirmResult = FALSE;
|
||||
|
|
|
|||
|
|
@ -283,7 +283,7 @@ static void UndergroundPC_PrintMenuItemDescription(ListMenu *listMenu, u32 menuI
|
|||
ListMenu_GetAttribute(listMenu, LIST_MENU_PARENT);
|
||||
int index = menuItemIdx;
|
||||
|
||||
if (menuItemIdx == LIST_CANCEL) {
|
||||
if (menuItemIdx == MENU_CANCEL) {
|
||||
index = UndergroundPC_Text_ExitDescription - UndergroundPC_Text_DecorateDescription;
|
||||
}
|
||||
|
||||
|
|
@ -295,7 +295,7 @@ static void UndergroundPC_PrintRadarMenuItemDescription(ListMenu *listMenu, u32
|
|||
ListMenu_GetAttribute(listMenu, LIST_MENU_PARENT);
|
||||
int index = menuItemIdx;
|
||||
|
||||
if (menuItemIdx == LIST_CANCEL) {
|
||||
if (menuItemIdx == MENU_CANCEL) {
|
||||
index = UndergroundPC_Text_CancelDescription - UndergroundPC_Text_TreasureSearchDescription;
|
||||
}
|
||||
|
||||
|
|
@ -314,9 +314,9 @@ static BOOL UndergroundPC_HandleMenu(SysTask *sysTask, void *data)
|
|||
UndergroundPC_UpdateCursorPos(menu);
|
||||
|
||||
switch (input) {
|
||||
case LIST_NOTHING_CHOSEN:
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
return FALSE;
|
||||
case LIST_CANCEL:
|
||||
case MENU_CANCEL:
|
||||
Sound_PlayEffect(SEQ_SE_DP_PC_LOGOFF);
|
||||
menu->state = UG_PC_MENU_STATE_EXIT;
|
||||
break;
|
||||
|
|
@ -378,7 +378,7 @@ static void UndergroundPC_InitMenu(UndergroundMenu *menu, int startBankEntry, in
|
|||
|
||||
for (int i = 0; i < trueOptionCount; i++) {
|
||||
if (i == trueOptionCount - 1) {
|
||||
StringList_AddFromMessageBank(menu->menuOptions, loader, startBankEntry + (UndergroundPC_Text_Exit - UndergroundPC_Text_Decorate), LIST_CANCEL);
|
||||
StringList_AddFromMessageBank(menu->menuOptions, loader, startBankEntry + (UndergroundPC_Text_Exit - UndergroundPC_Text_Decorate), MENU_CANCEL);
|
||||
} else {
|
||||
StringList_AddFromMessageBank(menu->menuOptions, loader, startBankEntry + i, i);
|
||||
}
|
||||
|
|
@ -418,7 +418,7 @@ static void UndergroundPC_InitRadarMenu(UndergroundMenu *menu, int startBankEntr
|
|||
|
||||
for (int i = 0; i < trueOptionCount; i++) {
|
||||
if (i == optionCount) {
|
||||
StringList_AddFromMessageBank(menu->menuOptions, loader, startBankEntry + i, LIST_CANCEL);
|
||||
StringList_AddFromMessageBank(menu->menuOptions, loader, startBankEntry + i, MENU_CANCEL);
|
||||
} else {
|
||||
StringList_AddFromMessageBank(menu->menuOptions, loader, startBankEntry + i, i);
|
||||
}
|
||||
|
|
@ -456,9 +456,9 @@ static BOOL UndergroundPC_HandleRadarMenu(SysTask *sysTask, void *data)
|
|||
UndergroundPC_UpdateCursorPos(menu);
|
||||
|
||||
switch (input) {
|
||||
case LIST_NOTHING_CHOSEN:
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
return FALSE;
|
||||
case LIST_CANCEL:
|
||||
case MENU_CANCEL:
|
||||
Sound_PlayEffect(SEQ_SE_CONFIRM);
|
||||
menu->state = UG_PC_MENU_STATE_INIT;
|
||||
break;
|
||||
|
|
@ -502,15 +502,15 @@ static BOOL UndergroundPC_HandleStoreGoodsMenu(SysTask *sysTask, void *data)
|
|||
UndergroundMan_StoreCursorAndListPos(UNDERGROUND_MENU_KEY_STORE_GOODS, cursorPos, listPos);
|
||||
|
||||
// make sure we have the right type of -2
|
||||
if (input == MENU_CANCELED) {
|
||||
input = LIST_CANCEL;
|
||||
if (input == MENU_CANCEL) {
|
||||
input = MENU_CANCEL;
|
||||
}
|
||||
|
||||
switch (input) {
|
||||
case LIST_NOTHING_CHOSEN:
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
UndergroundMenu_UpdateScrollPrompts(menu, listPos, ListMenu_GetAttribute(menu->itemListMenu->listMenu, LIST_MENU_COUNT), 6);
|
||||
return FALSE;
|
||||
case LIST_CANCEL:
|
||||
case MENU_CANCEL:
|
||||
UndergroundTextPrinter_EraseMessageBoxWindow(UndergroundMan_GetItemNameTextPrinter());
|
||||
menu->state = UG_PC_MENU_STATE_INIT;
|
||||
break;
|
||||
|
|
@ -544,15 +544,15 @@ static BOOL UndergroundPC_HandleWithdrawGoodsMenu(SysTask *sysTask, void *data)
|
|||
UndergroundMan_StoreCursorAndListPos(UNDERGROUND_MENU_KEY_WITHDRAW_GOODS, cursorPos, listPos);
|
||||
|
||||
// make sure we have the right type of -2
|
||||
if (input == MENU_CANCELED) {
|
||||
input = LIST_CANCEL;
|
||||
if (input == MENU_CANCEL) {
|
||||
input = MENU_CANCEL;
|
||||
}
|
||||
|
||||
switch (input) {
|
||||
case LIST_NOTHING_CHOSEN:
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
UndergroundMenu_UpdateScrollPrompts(menu, listPos, ListMenu_GetAttribute(menu->itemListMenu->listMenu, LIST_MENU_COUNT), 6);
|
||||
return FALSE;
|
||||
case LIST_CANCEL:
|
||||
case MENU_CANCEL:
|
||||
UndergroundTextPrinter_EraseMessageBoxWindow(UndergroundMan_GetItemNameTextPrinter());
|
||||
menu->state = UG_PC_MENU_STATE_INIT;
|
||||
break;
|
||||
|
|
@ -874,7 +874,7 @@ static void UndergroundPC_TakeFlagPromptTask(SysTask *sysTask, void *data)
|
|||
|
||||
if (input == MENU_NOTHING_CHOSEN) {
|
||||
return;
|
||||
} else if (input == 0) {
|
||||
} else if (input == MENU_YES) {
|
||||
CommSys_SendDataFixedSize(89, &ctx->pcInteraction);
|
||||
} else {
|
||||
CommPlayerMan_ResumeFieldSystemWithContextBit(PAUSE_BIT_LINK_PC);
|
||||
|
|
|
|||
|
|
@ -360,7 +360,7 @@ static void UndergroundTalk_Exit(SysTask *sysTask, TalkMenu *menu)
|
|||
}
|
||||
|
||||
if (menu->giftMenu) {
|
||||
UndergroundMenu_Exit(menu->giftMenu, LIST_CANCEL);
|
||||
UndergroundMenu_Exit(menu->giftMenu, MENU_CANCEL);
|
||||
UndergroundMan_ClearCurrentSysTaskInfo();
|
||||
}
|
||||
|
||||
|
|
@ -431,8 +431,8 @@ static BOOL UndergroundTalk_HandleQuestionsMenu(SysTask *sysTask, void *data)
|
|||
}
|
||||
|
||||
switch (input) {
|
||||
case LIST_CANCEL:
|
||||
case LIST_NOTHING_CHOSEN:
|
||||
case MENU_CANCEL:
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
return FALSE;
|
||||
break;
|
||||
default:
|
||||
|
|
@ -496,8 +496,8 @@ static BOOL UndergroundTalk_HandleAnswersMenu(SysTask *sysTask, void *data)
|
|||
}
|
||||
|
||||
switch (input) {
|
||||
case LIST_NOTHING_CHOSEN:
|
||||
case LIST_CANCEL:
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
case MENU_CANCEL:
|
||||
return FALSE;
|
||||
default:
|
||||
Sound_PlayEffect(SEQ_SE_CONFIRM);
|
||||
|
|
@ -549,7 +549,7 @@ static void UndergroundTalk_HandleGiftConfirmMenu(SysTask *unused, TalkMenu *men
|
|||
return;
|
||||
}
|
||||
|
||||
if (input == 0) {
|
||||
if (input == MENU_YES) {
|
||||
menu->sentGift.recipientNetID = menu->linkNetID;
|
||||
CommSys_SendDataFixedSize(77, &menu->sentGift);
|
||||
menu->state = TALK_MENU_STATE_GIFT_OFFERED;
|
||||
|
|
@ -568,13 +568,13 @@ static BOOL UndergroundTalk_HandleTalkMenu(SysTask *sysTask, void *data)
|
|||
UndergroundTalk_UpdateCursorPos(menu);
|
||||
|
||||
if (CommSys_CheckError()) {
|
||||
input = LIST_CANCEL;
|
||||
input = MENU_CANCEL;
|
||||
}
|
||||
|
||||
switch (input) {
|
||||
case LIST_NOTHING_CHOSEN:
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
return FALSE;
|
||||
case LIST_CANCEL:
|
||||
case MENU_CANCEL:
|
||||
Sound_PlayEffect(SEQ_SE_CONFIRM);
|
||||
UndergroundTalk_CancelTalk(menu);
|
||||
UndergroundTalk_CloseTalkMenu(sysTask, menu);
|
||||
|
|
@ -908,7 +908,7 @@ static void UndergroundTalk_Main(SysTask *sysTask, void *data)
|
|||
}
|
||||
|
||||
if (menu->giftMenu) {
|
||||
UndergroundMenu_Exit(menu->giftMenu, LIST_CANCEL);
|
||||
UndergroundMenu_Exit(menu->giftMenu, MENU_CANCEL);
|
||||
UndergroundMan_ClearCurrentSysTaskInfo();
|
||||
UndergroundTextPrinter_EraseMessageBoxWindow(UndergroundMan_GetItemNameTextPrinter());
|
||||
menu->giftMenu = NULL;
|
||||
|
|
@ -937,7 +937,7 @@ static void UndergroundTalkResponse_HandleConfirmTrainerCaseMenu(SysTask *unused
|
|||
return;
|
||||
}
|
||||
|
||||
if (input == 0) {
|
||||
if (input == MENU_YES) {
|
||||
UndergroundTalkResponse_RequestLinkTalkStateUpdate(menu, TALK_MENU_STATE_START_CASE_EXCHANGE);
|
||||
UndergroundRecords_SendRecord(menu->linkNetID);
|
||||
menu->state = RESPONSE_MENU_STATE_START_CASE_EXCHANGE;
|
||||
|
|
@ -957,7 +957,7 @@ static void UndergroundTalkResponse_HandleAcceptGiftMenu(SysTask *unused, Respon
|
|||
return;
|
||||
}
|
||||
|
||||
if (input == 0) {
|
||||
if (input == MENU_YES) {
|
||||
if (UndergroundInventory_TryAddGoodBag(menu->receivedGift.goodID)) {
|
||||
UndergroundRecord_IncrementGiftsReceived(SaveData_GetUndergroundRecord(FieldSystem_GetSaveData(menu->fieldSystem)));
|
||||
Sound_PlayEffect(SEQ_SE_DP_PIRORIRO2);
|
||||
|
|
@ -1071,13 +1071,13 @@ static BOOL UndergroundTalkResponse_HandleAnswersMenu(SysTask *sysTask, void *da
|
|||
}
|
||||
|
||||
if (CommSys_CheckError()) {
|
||||
input = LIST_CANCEL;
|
||||
input = MENU_CANCEL;
|
||||
}
|
||||
|
||||
switch (input) {
|
||||
case LIST_NOTHING_CHOSEN:
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
return FALSE;
|
||||
case LIST_CANCEL:
|
||||
case MENU_CANCEL:
|
||||
input = ANSWER_INDEX_CANCEL;
|
||||
default:
|
||||
Sound_PlayEffect(SEQ_SE_CONFIRM);
|
||||
|
|
|
|||
|
|
@ -935,7 +935,7 @@ static void SecretBases_ExitBasePromptTask(SysTask *sysTask, void *data)
|
|||
case EXIT_PROMPT_STATE_CONFIRM:
|
||||
input = Menu_ProcessInputAndHandleExit(ctx->menu, HEAP_ID_FIELD1);
|
||||
|
||||
if (input == 0) {
|
||||
if (input == MENU_YES) {
|
||||
ctx->menu = NULL;
|
||||
ctx->state = EXIT_PROMPT_STATE_EXIT_AND_END;
|
||||
} else if (input != MENU_NOTHING_CHOSEN) {
|
||||
|
|
@ -952,7 +952,7 @@ static void SecretBases_ExitBasePromptTask(SysTask *sysTask, void *data)
|
|||
case EXIT_PROMPT_STATE_CONFIRM_DOOR_CLOSED:
|
||||
input = Menu_ProcessInputAndHandleExit(ctx->menu, HEAP_ID_FIELD1);
|
||||
|
||||
if (input == 0) {
|
||||
if (input == MENU_YES) {
|
||||
ctx->menu = NULL;
|
||||
UndergroundTextPrinter_PrintText(UndergroundMan_GetCommonTextPrinter(), UndergroundCommon_Text_CommsWillBeLaunched, FALSE, NULL);
|
||||
ctx->state = EXIT_PROMPT_STATE_OPEN_COMMS_CONFIRM_MENU;
|
||||
|
|
@ -970,7 +970,7 @@ static void SecretBases_ExitBasePromptTask(SysTask *sysTask, void *data)
|
|||
case EXIT_PROMPT_STATE_CONFIRM_COMMS:
|
||||
input = Menu_ProcessInputAndHandleExit(ctx->menu, HEAP_ID_FIELD1);
|
||||
|
||||
if (input == 0) {
|
||||
if (input == MENU_YES) {
|
||||
ctx->menu = NULL;
|
||||
ctx->state = EXIT_PROMPT_STATE_EXIT_AND_END;
|
||||
} else if (input != MENU_NOTHING_CHOSEN) {
|
||||
|
|
@ -1134,7 +1134,7 @@ static void SecretBases_EnterBasePromptTask(SysTask *sysTask, void *data)
|
|||
case ENTER_PROMPT_STATE_CONFIRM_OTHER_BASE:
|
||||
input = Menu_ProcessInputAndHandleExit(ctx->menu, HEAP_ID_FIELD1);
|
||||
|
||||
if (input == 0) {
|
||||
if (input == MENU_YES) {
|
||||
ctx->menu = NULL;
|
||||
ctx->state = ENTER_PROMPT_STATE_ENTER_AFTER_TEXT;
|
||||
} else if (input != MENU_NOTHING_CHOSEN) {
|
||||
|
|
@ -1156,7 +1156,7 @@ static void SecretBases_EnterBasePromptTask(SysTask *sysTask, void *data)
|
|||
case ENTER_PROMPT_STATE_CONFIRM_OWN_BASE:
|
||||
input = Menu_ProcessInputAndHandleExit(ctx->menu, HEAP_ID_FIELD1);
|
||||
|
||||
if (input == 0) {
|
||||
if (input == MENU_YES) {
|
||||
ctx->menu = NULL;
|
||||
|
||||
if (UndergroundPlayer_IsHoldingFlag(ctx->baseOwnerNetID) || (SecretBases_CountPlayersInBase(ctx->baseOwnerNetID, 0) > 0)) {
|
||||
|
|
@ -1861,7 +1861,7 @@ static void SecretBases_DiggerDrillTask(SysTask *sysTask, void *data)
|
|||
case DRILL_STATE_CONFIRM:
|
||||
u32 input = Menu_ProcessInputAndHandleExit(ctx->menu, HEAP_ID_FIELD1);
|
||||
|
||||
if (input == 0) {
|
||||
if (input == MENU_YES) {
|
||||
ctx->state = DRILL_STATE_REMOVE_DRILL;
|
||||
ctx->menu = NULL;
|
||||
} else if (input != MENU_NOTHING_CHOSEN) {
|
||||
|
|
|
|||
|
|
@ -265,16 +265,16 @@ static void *UndergroundVendors_InitVendorOptionsMenu(UndergroundMenu *menu)
|
|||
UndergroundVendors_InitTrapsVendorInventory(menu, menu->vendorIndex);
|
||||
StringList_AddFromMessageBank(menu->menuOptions, UndergroundTextPrinter_GetMessageLoader(UndergroundMan_GetMiscTextPrinter()), baseBankEntry, 0);
|
||||
StringList_AddFromMessageBank(menu->menuOptions, UndergroundTextPrinter_GetMessageLoader(UndergroundMan_GetMiscTextPrinter()), baseBankEntry + 1, 1);
|
||||
StringList_AddFromMessageBank(menu->menuOptions, UndergroundTextPrinter_GetMessageLoader(UndergroundMan_GetMiscTextPrinter()), baseBankEntry + 2, LIST_CANCEL);
|
||||
StringList_AddFromMessageBank(menu->menuOptions, UndergroundTextPrinter_GetMessageLoader(UndergroundMan_GetMiscTextPrinter()), baseBankEntry + 2, MENU_CANCEL);
|
||||
} else if (menu->vendorType == VENDOR_TYPE_GOODS) {
|
||||
int baseBankEntry = GOOD_VENDOR_OPTIONS_START;
|
||||
UndergroundVendors_InitGoodsVendorInventory(menu, menu->vendorIndex);
|
||||
StringList_AddFromMessageBank(menu->menuOptions, UndergroundTextPrinter_GetMessageLoader(UndergroundMan_GetMiscTextPrinter()), baseBankEntry, 0);
|
||||
StringList_AddFromMessageBank(menu->menuOptions, UndergroundTextPrinter_GetMessageLoader(UndergroundMan_GetMiscTextPrinter()), baseBankEntry + 1, 1);
|
||||
StringList_AddFromMessageBank(menu->menuOptions, UndergroundTextPrinter_GetMessageLoader(UndergroundMan_GetMiscTextPrinter()), baseBankEntry + 2, LIST_CANCEL);
|
||||
StringList_AddFromMessageBank(menu->menuOptions, UndergroundTextPrinter_GetMessageLoader(UndergroundMan_GetMiscTextPrinter()), baseBankEntry + 2, MENU_CANCEL);
|
||||
} else {
|
||||
StringList_AddFromMessageBank(menu->menuOptions, UndergroundTextPrinter_GetMessageLoader(UndergroundMan_GetMiscTextPrinter()), UndergroundNPCs_Text_GiveTreasures, 0);
|
||||
StringList_AddFromMessageBank(menu->menuOptions, UndergroundTextPrinter_GetMessageLoader(UndergroundMan_GetMiscTextPrinter()), UndergroundNPCs_Text_Cancel, LIST_CANCEL);
|
||||
StringList_AddFromMessageBank(menu->menuOptions, UndergroundTextPrinter_GetMessageLoader(UndergroundMan_GetMiscTextPrinter()), UndergroundNPCs_Text_Cancel, MENU_CANCEL);
|
||||
}
|
||||
|
||||
ListMenuTemplate template;
|
||||
|
|
@ -306,7 +306,7 @@ static void UndergroundVendors_PrintItemDescriptionAndBuyPrice(ListMenu *listMen
|
|||
MessageLoader_GetString(UndergroundTextPrinter_GetMessageLoader(UndergroundMan_GetMiscTextPrinter()), UndergroundNPCs_Text_RequiredSphere + menu->isSelling, menu->string);
|
||||
Text_AddPrinterWithParams(&menu->secondaryWindow, FONT_SYSTEM, menu->string, 1, 1, TEXT_SPEED_NO_TRANSFER, NULL);
|
||||
|
||||
if (index != LIST_CANCEL) {
|
||||
if (index != MENU_CANCEL) {
|
||||
StringTemplate_SetUndergroundItemName(menu->template, 2, menu->shopPriceTypes[index]);
|
||||
StringTemplate_SetNumber(menu->template, 6, menu->shopPriceSizes[index], 2, PADDING_MODE_SPACES, CHARSET_MODE_EN);
|
||||
MessageLoader_GetString(UndergroundTextPrinter_GetMessageLoader(UndergroundMan_GetMiscTextPrinter()), UndergroundNPCs_Text_SphereTemplate, menu->string);
|
||||
|
|
@ -317,8 +317,8 @@ static void UndergroundVendors_PrintItemDescriptionAndBuyPrice(ListMenu *listMen
|
|||
Window_ScheduleCopyToVRAM(&menu->secondaryWindow);
|
||||
|
||||
// make sure we have the right type of -2
|
||||
if (index == MENU_CANCELED) {
|
||||
index = LIST_CANCEL;
|
||||
if (index == MENU_CANCEL) {
|
||||
index = MENU_CANCEL;
|
||||
}
|
||||
|
||||
if (menu->vendorType == VENDOR_TYPE_TRAPS) {
|
||||
|
|
@ -340,7 +340,7 @@ static void UndergroundVendors_PrintItemDescriptionAndSellPrice(ListMenu *listMe
|
|||
|
||||
Window_FillTilemap(&menu->secondaryWindow, 15);
|
||||
|
||||
if (index != LIST_CANCEL) {
|
||||
if (index != MENU_CANCEL) {
|
||||
if (menu->vendorType == VENDOR_TYPE_TRAPS) {
|
||||
const enum Trap trapID = UndergroundMenu_GetTrapAtSlot(index, menu);
|
||||
MATH_InitRand16(&rand, Underground_GetRandomSeed(underground) + menu->vendorIndex + trapID);
|
||||
|
|
@ -385,7 +385,7 @@ static void UndergroundVendors_PrintItemDescriptionAndSellPrice(ListMenu *listMe
|
|||
MessageLoader_GetString(UndergroundTextPrinter_GetMessageLoader(UndergroundMan_GetMiscTextPrinter()), UndergroundNPCs_Text_RequiredSphere + menu->isSelling, menu->string);
|
||||
Text_AddPrinterWithParams(&menu->secondaryWindow, FONT_SYSTEM, menu->string, 1, 1, TEXT_SPEED_NO_TRANSFER, NULL);
|
||||
|
||||
if (index != LIST_CANCEL) {
|
||||
if (index != MENU_CANCEL) {
|
||||
if (sphereType != SPHERE_NONE) {
|
||||
StringTemplate_SetUndergroundItemName(menu->template, 2, sphereType);
|
||||
StringTemplate_SetNumber(menu->template, 6, sphereSize, 2, PADDING_MODE_SPACES, CHARSET_MODE_EN);
|
||||
|
|
@ -452,7 +452,7 @@ static void UndergroundVendors_InitBuyMenu(UndergroundMenu *menu)
|
|||
StringList_AddFromMessageBank(menu->menuOptions, loader, menu->shopInventory[i], i);
|
||||
}
|
||||
|
||||
StringList_AddFromMessageBank(menu->menuOptions, loader, 0, LIST_CANCEL);
|
||||
StringList_AddFromMessageBank(menu->menuOptions, loader, 0, MENU_CANCEL);
|
||||
MessageLoader_Free(loader);
|
||||
|
||||
ListMenuTemplate template;
|
||||
|
|
@ -660,12 +660,12 @@ static void UndergroundVendors_ShopMenuTask(SysTask *sysTask, void *data)
|
|||
}
|
||||
|
||||
switch (input) {
|
||||
case LIST_CANCEL:
|
||||
case MENU_CANCEL:
|
||||
Sound_PlayEffect(SEQ_SE_CONFIRM);
|
||||
UndergroundVendors_EraseCurrentMenu(menu, FALSE);
|
||||
menu->state = SHOP_MENU_STATE_EXIT_MESSAGE;
|
||||
break;
|
||||
case LIST_NOTHING_CHOSEN:
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
break;
|
||||
default:
|
||||
if (menu->vendorType == VENDOR_TYPE_TREASURES) {
|
||||
|
|
@ -703,21 +703,21 @@ static void UndergroundVendors_ShopMenuTask(SysTask *sysTask, void *data)
|
|||
}
|
||||
|
||||
// make sure we have the right type of -2
|
||||
if (input == MENU_CANCELED) {
|
||||
input = LIST_CANCEL;
|
||||
if (input == MENU_CANCEL) {
|
||||
input = MENU_CANCEL;
|
||||
}
|
||||
|
||||
if (input != LIST_NOTHING_CHOSEN) {
|
||||
if (input != MENU_NOTHING_CHOSEN) {
|
||||
UndergroundTextPrinter_EraseMessageBoxWindow(UndergroundMan_GetItemNameTextPrinter());
|
||||
}
|
||||
|
||||
switch (input) {
|
||||
case LIST_CANCEL:
|
||||
case MENU_CANCEL:
|
||||
Sound_PlayEffect(SEQ_SE_CONFIRM);
|
||||
UndergroundVendors_EraseCurrentMenu(menu, TRUE);
|
||||
menu->state = SHOP_MENU_STATE_INIT_OPTIONS_MENU;
|
||||
break;
|
||||
case LIST_NOTHING_CHOSEN:
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
break;
|
||||
default:
|
||||
Sound_PlayEffect(SEQ_SE_CONFIRM);
|
||||
|
|
@ -764,14 +764,14 @@ static void UndergroundVendors_ShopMenuTask(SysTask *sysTask, void *data)
|
|||
ListMenu_GetListAndCursorPos(menu->itemListMenu->listMenu, &listPos, &cursorPos);
|
||||
UndergroundMan_StoreCursorAndListPos(UNDERGROUND_MENU_KEY_PAY_WITH_SPHERES, cursorPos, listPos);
|
||||
|
||||
if (input != LIST_NOTHING_CHOSEN) {
|
||||
if (input != MENU_NOTHING_CHOSEN) {
|
||||
UndergroundTextPrinter_EraseMessageBoxWindow(UndergroundMan_GetItemNameTextPrinter());
|
||||
}
|
||||
|
||||
switch (input) {
|
||||
case LIST_NOTHING_CHOSEN:
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
break;
|
||||
case LIST_CANCEL:
|
||||
case MENU_CANCEL:
|
||||
UndergroundMenu_RemoveDescriptionWindow(menu);
|
||||
menu->state = SHOP_MENU_STATE_INIT_BUY_MENU;
|
||||
break;
|
||||
|
|
@ -852,13 +852,13 @@ static void UndergroundVendors_ShopMenuTask(SysTask *sysTask, void *data)
|
|||
UndergroundMan_StoreCursorAndListPos(UNDERGROUND_MENU_KEY_SELL_GOODS + menu->vendorType, cursorPos, listPos);
|
||||
|
||||
switch (input) {
|
||||
case LIST_CANCEL:
|
||||
case MENU_CANCEL:
|
||||
UndergroundTextPrinter_EraseMessageBoxWindow(UndergroundMan_GetItemNameTextPrinter());
|
||||
UndergroundVendors_EraseCurrentMenu(menu, TRUE);
|
||||
UndergroundMenu_RemoveDescriptionWindow(menu);
|
||||
menu->state = SHOP_MENU_STATE_INIT_OPTIONS_MENU;
|
||||
break;
|
||||
case LIST_NOTHING_CHOSEN:
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
break;
|
||||
default:
|
||||
if (menu->shopPriceTypes[0] != SPHERE_NONE) {
|
||||
|
|
@ -881,9 +881,9 @@ static void UndergroundVendors_ShopMenuTask(SysTask *sysTask, void *data)
|
|||
case SHOP_MENU_STATE_CONFIRM_SELL:
|
||||
input = Menu_ProcessInputAndHandleExit(menu->yesNoMenu, HEAP_ID_FIELD1);
|
||||
|
||||
if (input == LIST_NOTHING_CHOSEN) {
|
||||
if (input == MENU_NOTHING_CHOSEN) {
|
||||
return;
|
||||
} else if (input == 0) {
|
||||
} else if (input == MENU_YES) {
|
||||
int result = UndergroundVendors_TrySellItem(menu);
|
||||
|
||||
if (result == RESULT_BAG_FULL) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user