Switch to button macros

This commit is contained in:
PokeCodec
2020-09-04 21:11:55 -04:00
parent da582d5258
commit 28ef2fb774
75 changed files with 689 additions and 688 deletions

View File

@@ -1134,7 +1134,7 @@ static void ItemStorage_ProcessInput(u8 taskId)
s32 id;
data = gTasks[taskId].data;
if (gMain.newKeys & SELECT_BUTTON)
if (JOY_NEW(SELECT_BUTTON))
{
ListMenuGetScrollAndRow(data[5], &(playerPCItemPageInfo.itemsAbove), &(playerPCItemPageInfo.cursorPos));
if ((playerPCItemPageInfo.itemsAbove + playerPCItemPageInfo.cursorPos) != (playerPCItemPageInfo.count - 1))
@@ -1212,7 +1212,7 @@ static void sub_816C4FC(u8 taskId)
s32 id;
data = gTasks[taskId].data;
if (gMain.newKeys & SELECT_BUTTON)
if (JOY_NEW(SELECT_BUTTON))
{
ListMenuGetScrollAndRow(data[5], &(playerPCItemPageInfo.itemsAbove), &(playerPCItemPageInfo.cursorPos));
ItemStorage_DoItemSwap(taskId, FALSE);
@@ -1227,7 +1227,7 @@ static void sub_816C4FC(u8 taskId)
case LIST_NOTHING_CHOSEN:
break;
case LIST_CANCEL:
if (gMain.newKeys & A_BUTTON)
if (JOY_NEW(A_BUTTON))
{
ItemStorage_DoItemSwap(taskId, FALSE);
}
@@ -1332,7 +1332,7 @@ static void ItemStorage_HandleQuantityRolling(u8 taskId)
sub_816C6BC(sub_816BC7C(4), data[2], STR_CONV_MODE_LEADING_ZEROS, 8, 1, 3);
else
{
if (gMain.newKeys & A_BUTTON)
if (JOY_NEW(A_BUTTON))
{
PlaySE(SE_SELECT);
sub_816BCC4(4);
@@ -1341,7 +1341,7 @@ static void ItemStorage_HandleQuantityRolling(u8 taskId)
else
ItemStorage_DoItemToss(taskId);
}
else if (gMain.newKeys & B_BUTTON)
else if (JOY_NEW(B_BUTTON))
{
PlaySE(SE_SELECT);
sub_816BCC4(4);
@@ -1412,7 +1412,7 @@ static void ItemStorage_HandleRemoveItem(u8 taskId)
s16 *data;
data = gTasks[taskId].data;
if (gMain.newKeys & (A_BUTTON | B_BUTTON))
if (JOY_NEW(A_BUTTON | B_BUTTON))
{
RemovePCItem((playerPCItemPageInfo.cursorPos + playerPCItemPageInfo.itemsAbove), data[2]);
DestroyListMenuTask(data[5], &(playerPCItemPageInfo.itemsAbove), &(playerPCItemPageInfo.cursorPos));
@@ -1429,7 +1429,7 @@ static void ItemStorage_WaitPressHandleResumeProcessInput(u8 taskId)
s16 *data;
data = gTasks[taskId].data;
if (gMain.newKeys & (A_BUTTON | B_BUTTON))
if (JOY_NEW(A_BUTTON | B_BUTTON))
{
ItemStorage_PrintItemPcResponse(ItemStorage_GetItemPcResponse(gSaveBlock1Ptr->pcItems[(playerPCItemPageInfo.itemsAbove + playerPCItemPageInfo.cursorPos)].itemId));
ItemStorage_StartScrollIndicatorAndProcessInput(taskId);