Address review comments
This commit is contained in:
+25
-25
@@ -91,22 +91,22 @@ static void BerryPouch_DestroyResources(void);
|
||||
static void Task_BerryPouchFadeToExitCallback(u8 taskId);
|
||||
static void SortAndCountBerries(void);
|
||||
static void Task_BerryPouchMain(u8 taskId);
|
||||
static void Task_NormalContextMenu_0(u8 taskId);
|
||||
static void Task_NormalContextMenu_1(u8 taskId);
|
||||
static void Task_BerryPouch_Use_0(u8 taskId);
|
||||
static void Task_BerryPouch_Toss_0(u8 taskId);
|
||||
static void Task_NormalContextMenu(u8 taskId);
|
||||
static void Task_NormalContextMenu_HandleInput(u8 taskId);
|
||||
static void Task_BerryPouch_Use(u8 taskId);
|
||||
static void Task_BerryPouch_Toss(u8 taskId);
|
||||
static void Task_AskTossMultiple(u8 taskId);
|
||||
static void Task_TossNo(u8 taskId);
|
||||
static void Task_Toss_SelectMultiple(u8 taskId);
|
||||
static void Task_TossYes(u8 taskId);
|
||||
static void Task_WaitButtonThenTossBerries(u8 taskId);
|
||||
static void Task_BerryPouch_Give_0(u8 taskId);
|
||||
static void Task_BerryPouch_Give(u8 taskId);
|
||||
static void Task_Give_PrintThereIsNoPokemon(u8 taskId);
|
||||
static void Task_WaitButtonBeforeDialogueWindowDestruction(u8 taskId);
|
||||
static void Task_BerryPouch_Exit_0(u8 taskId);
|
||||
static void Task_ContextMenu_FromPartyGiveMenu_0(u8 taskId);
|
||||
static void Task_BerryPouch_Exit(u8 taskId);
|
||||
static void Task_ContextMenu_FromPartyGiveMenu(u8 taskId);
|
||||
static void Task_ContextMenu_FromPokemonPC(u8 taskId);
|
||||
static void Task_ContextMenu_Sell_0(u8 taskId);
|
||||
static void Task_ContextMenu_Sell(u8 taskId);
|
||||
static void Task_AskSellMultiple(u8 taskId);
|
||||
static void Task_SellMultiple_CreateYesNoMenu(u8 taskId);
|
||||
static void Task_SellNo(u8 taskId);
|
||||
@@ -158,11 +158,11 @@ static const struct BgTemplate sBgTemplates[] = {
|
||||
};
|
||||
|
||||
static const TaskFunc sBerryPouchContextMenuTasks[] = {
|
||||
Task_NormalContextMenu_0,
|
||||
Task_ContextMenu_FromPartyGiveMenu_0,
|
||||
Task_ContextMenu_Sell_0,
|
||||
Task_NormalContextMenu,
|
||||
Task_ContextMenu_FromPartyGiveMenu,
|
||||
Task_ContextMenu_Sell,
|
||||
Task_ContextMenu_FromPokemonPC,
|
||||
Task_NormalContextMenu_0
|
||||
Task_NormalContextMenu
|
||||
};
|
||||
|
||||
static const struct YesNoFuncTable sYesNoFuncs_Toss = {
|
||||
@@ -176,10 +176,10 @@ static const struct YesNoFuncTable sYesNoFuncs_Sell = {
|
||||
};
|
||||
|
||||
static const struct MenuAction sContextMenuActions[] = {
|
||||
{gOtherText_Use, Task_BerryPouch_Use_0},
|
||||
{gOtherText_Toss, Task_BerryPouch_Toss_0},
|
||||
{gOtherText_Give, Task_BerryPouch_Give_0},
|
||||
{gOtherText_Exit, Task_BerryPouch_Exit_0},
|
||||
{gOtherText_Use, Task_BerryPouch_Use},
|
||||
{gOtherText_Toss, Task_BerryPouch_Toss},
|
||||
{gOtherText_Give, Task_BerryPouch_Give},
|
||||
{gOtherText_Exit, Task_BerryPouch_Exit},
|
||||
{gString_Dummy, NULL}
|
||||
};
|
||||
|
||||
@@ -1031,13 +1031,13 @@ static void CreateNormalContextMenu(u8 taskId)
|
||||
BerryPouchPrint(windowId2, 2, gStringVar4, 0, 2, 1, 2, 0, 1);
|
||||
}
|
||||
|
||||
static void Task_NormalContextMenu_0(u8 taskId)
|
||||
static void Task_NormalContextMenu(u8 taskId)
|
||||
{
|
||||
CreateNormalContextMenu(taskId);
|
||||
gTasks[taskId].func = Task_NormalContextMenu_1;
|
||||
gTasks[taskId].func = Task_NormalContextMenu_HandleInput;
|
||||
}
|
||||
|
||||
static void Task_NormalContextMenu_1(u8 taskId)
|
||||
static void Task_NormalContextMenu_HandleInput(u8 taskId)
|
||||
{
|
||||
s8 input;
|
||||
if (sub_80BF72C() != TRUE)
|
||||
@@ -1059,7 +1059,7 @@ static void Task_NormalContextMenu_1(u8 taskId)
|
||||
}
|
||||
}
|
||||
|
||||
static void Task_BerryPouch_Use_0(u8 taskId)
|
||||
static void Task_BerryPouch_Use(u8 taskId)
|
||||
{
|
||||
DestroyVariableWindow(sContextMenuNumOptions + 9);
|
||||
DestroyVariableWindow(6);
|
||||
@@ -1080,7 +1080,7 @@ static void Task_BerryPouch_Use_0(u8 taskId)
|
||||
ItemId_GetFieldFunc(gSpecialVar_ItemId)(taskId);
|
||||
}
|
||||
|
||||
static void Task_BerryPouch_Toss_0(u8 taskId)
|
||||
static void Task_BerryPouch_Toss(u8 taskId)
|
||||
{
|
||||
s16 * data = gTasks[taskId].data;
|
||||
ClearWindowTilemap(GetVariableWindowId(sContextMenuNumOptions + 9));
|
||||
@@ -1182,7 +1182,7 @@ static void Task_WaitButtonThenTossBerries(u8 taskId)
|
||||
}
|
||||
}
|
||||
|
||||
static void Task_BerryPouch_Give_0(u8 taskId)
|
||||
static void Task_BerryPouch_Give(u8 taskId)
|
||||
{
|
||||
DestroyVariableWindow(sContextMenuNumOptions + 9);
|
||||
DestroyVariableWindow(6);
|
||||
@@ -1227,7 +1227,7 @@ void Task_BerryPouch_DestroyDialogueWindowAndRefreshListMenu(u8 taskId)
|
||||
Task_CleanUpAndReturnToMain(taskId);
|
||||
}
|
||||
|
||||
static void Task_BerryPouch_Exit_0(u8 taskId)
|
||||
static void Task_BerryPouch_Exit(u8 taskId)
|
||||
{
|
||||
DestroyVariableWindow(sContextMenuNumOptions + 9);
|
||||
DestroyVariableWindow(6);
|
||||
@@ -1239,7 +1239,7 @@ static void Task_BerryPouch_Exit_0(u8 taskId)
|
||||
Task_CleanUpAndReturnToMain(taskId);
|
||||
}
|
||||
|
||||
static void Task_ContextMenu_FromPartyGiveMenu_0(u8 taskId)
|
||||
static void Task_ContextMenu_FromPartyGiveMenu(u8 taskId)
|
||||
{
|
||||
s16 * data = gTasks[taskId].data;
|
||||
u16 itemId = BagGetItemIdByPocketPosition(POCKET_BERRY_POUCH, data[1]);
|
||||
@@ -1262,7 +1262,7 @@ static void Task_ContextMenu_FromPokemonPC(u8 taskId)
|
||||
gTasks[taskId].func = BerryPouch_StartFadeToExitCallback;
|
||||
}
|
||||
|
||||
static void Task_ContextMenu_Sell_0(u8 taskId)
|
||||
static void Task_ContextMenu_Sell(u8 taskId)
|
||||
{
|
||||
s16 * data = gTasks[taskId].data;
|
||||
if (itemid_get_market_price(gSpecialVar_ItemId) == 0)
|
||||
|
||||
Reference in New Issue
Block a user