diff options
author | PokeCodec <67983839+PokeCodec@users.noreply.github.com> | 2020-09-04 21:11:55 -0400 |
---|---|---|
committer | PokeCodec <67983839+PokeCodec@users.noreply.github.com> | 2020-09-04 21:11:55 -0400 |
commit | 28ef2fb774bf596a3e7f81055453304e0d2ce066 (patch) | |
tree | 4a67ad17888cac15c7cb33fa8aced60a2e3bf6dc /src/player_pc.c | |
parent | da582d5258703eb52d8cadb4cbaef4ee7031b833 (diff) |
Switch to button macros
Diffstat (limited to 'src/player_pc.c')
-rw-r--r-- | src/player_pc.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/player_pc.c b/src/player_pc.c index 2010d84f8..238424ee3 100644 --- a/src/player_pc.c +++ b/src/player_pc.c @@ -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); |