diff options
Diffstat (limited to 'src/battle_pyramid_bag.c')
-rw-r--r-- | src/battle_pyramid_bag.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/battle_pyramid_bag.c b/src/battle_pyramid_bag.c index e038e71e1..8fee57855 100644 --- a/src/battle_pyramid_bag.c +++ b/src/battle_pyramid_bag.c @@ -839,7 +839,7 @@ static void Task_HandlePyramidBagInput(u8 taskId) s16 *data = gTasks[taskId].data; if (MenuHelpers_CallLinkSomething() != TRUE && !gPaletteFade.active) { - if (gMain.newKeys & SELECT_BUTTON) + if (JOY_NEW(SELECT_BUTTON)) { if (gPyramidBagCursorData.unk4 != 2) { @@ -965,7 +965,7 @@ static void HandleMenuActionInput(u8 taskId) if (MenuHelpers_CallLinkSomething() != TRUE) { s8 id = Menu_GetCursorPos(); - if (gMain.newKeys & DPAD_UP) + if (JOY_NEW(DPAD_UP)) { if (id > 0 && IsValidMenuAction(id - 2)) { @@ -973,7 +973,7 @@ static void HandleMenuActionInput(u8 taskId) ChangeListMenuCursorPosition(MENU_CURSOR_DELTA_NONE, MENU_CURSOR_DELTA_UP); } } - else if (gMain.newKeys & DPAD_DOWN) + else if (JOY_NEW(DPAD_DOWN)) { if (id < gPyramidBagResources->menuActionsCount - 2 && IsValidMenuAction(id + 2)) { @@ -981,7 +981,7 @@ static void HandleMenuActionInput(u8 taskId) ChangeListMenuCursorPosition(MENU_CURSOR_DELTA_NONE, MENU_CURSOR_DELTA_DOWN); } } - else if (gMain.newKeys & DPAD_LEFT || GetLRKeysPressed() == MENU_L_PRESSED) + else if (JOY_NEW(DPAD_LEFT) || GetLRKeysPressed() == MENU_L_PRESSED) { if (id & 1 && IsValidMenuAction(id - 1)) { @@ -989,7 +989,7 @@ static void HandleMenuActionInput(u8 taskId) ChangeListMenuCursorPosition(MENU_CURSOR_DELTA_LEFT, MENU_CURSOR_DELTA_NONE); } } - else if (gMain.newKeys & DPAD_RIGHT || GetLRKeysPressed() == MENU_R_PRESSED) + else if (JOY_NEW(DPAD_RIGHT) || GetLRKeysPressed() == MENU_R_PRESSED) { if (!(id & 1) && IsValidMenuAction(id + 1)) { @@ -997,13 +997,13 @@ static void HandleMenuActionInput(u8 taskId) ChangeListMenuCursorPosition(MENU_CURSOR_DELTA_RIGHT, MENU_CURSOR_DELTA_NONE); } } - else if (gMain.newKeys & A_BUTTON) + else if (JOY_NEW(A_BUTTON)) { PlaySE(SE_SELECT); if (sMenuActions[gPyramidBagResources->menuActionIds[id]].func.void_u8 != NULL) sMenuActions[gPyramidBagResources->menuActionIds[id]].func.void_u8(taskId); } - else if (gMain.newKeys & B_BUTTON) + else if (JOY_NEW(B_BUTTON)) { PlaySE(SE_SELECT); sMenuActions[ACTION_CANCEL].func.void_u8(taskId); @@ -1143,7 +1143,7 @@ static void sub_81C64B4(u8 taskId) { sub_81C645C(data[8]); } - else if (gMain.newKeys & A_BUTTON) + else if (JOY_NEW(A_BUTTON)) { PlaySE(SE_SELECT); ClearStdWindowAndFrameToTransparent(3, 0); @@ -1151,7 +1151,7 @@ static void sub_81C64B4(u8 taskId) ScheduleBgCopyTilemapToVram(1); sub_81C6350(taskId); } - else if (gMain.newKeys & B_BUTTON) + else if (JOY_NEW(B_BUTTON)) { PlaySE(SE_SELECT); ClearStdWindowAndFrameToTransparent(3, 0); @@ -1179,7 +1179,7 @@ static void sub_81C65CC(u8 taskId) u16 *scrollOffset = &gPyramidBagCursorData.scrollPosition; u16 *selectedRow = &gPyramidBagCursorData.cursorPosition; - if (gMain.newKeys & (A_BUTTON | B_BUTTON)) + if (JOY_NEW(A_BUTTON | B_BUTTON)) { PlaySE(SE_SELECT); RemovePyramidBagItem(gSpecialVar_ItemId, data[8]); @@ -1220,7 +1220,7 @@ static void sub_81C66AC(u8 taskId) static void sub_81C66EC(u8 taskId) { - if (gMain.newKeys & A_BUTTON) + if (JOY_NEW(A_BUTTON)) { PlaySE(SE_SELECT); Task_CloseBattlePyramidBagMessage(taskId); @@ -1277,7 +1277,7 @@ static void Task_ItemSwapHandleInput(u8 taskId) s16 *data = gTasks[taskId].data; if (MenuHelpers_CallLinkSomething() != TRUE) { - if (gMain.newKeys & SELECT_BUTTON) + if (JOY_NEW(SELECT_BUTTON)) { PlaySE(SE_SELECT); ListMenuGetScrollAndRow(data[0], &gPyramidBagCursorData.scrollPosition, &gPyramidBagCursorData.cursorPosition); @@ -1295,7 +1295,7 @@ static void Task_ItemSwapHandleInput(u8 taskId) break; case LIST_CANCEL: PlaySE(SE_SELECT); - if (gMain.newKeys & A_BUTTON) + if (JOY_NEW(A_BUTTON)) PerformItemSwap(taskId); else sub_81C6A14(taskId); |