From 8349bfd8e646002105dfd6a7f997c26cf0e0624b Mon Sep 17 00:00:00 2001 From: Yoann Fievez Date: Fri, 5 Nov 2021 20:40:15 +0100 Subject: Refactorize check button pressed (#340) --- engine/pokemon/bills_pc.asm | 6 +++--- engine/pokemon/learn_move.asm | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'engine/pokemon') diff --git a/engine/pokemon/bills_pc.asm b/engine/pokemon/bills_pc.asm index 7aba8001..8684b761 100644 --- a/engine/pokemon/bills_pc.asm +++ b/engine/pokemon/bills_pc.asm @@ -171,8 +171,8 @@ BillsPCMenu: ldh [hAutoBGTransferEnabled], a call Delay3 call HandleMenuInput - bit 1, a - jp nz, ExitBillsPC ; b button + bit BIT_B_BUTTON, a + jp nz, ExitBillsPC call PlaceUnfilledArrowMenuCursor ld a, [wCurrentMenuItem] ld [wParentMenuItem], a @@ -416,7 +416,7 @@ DisplayDepositWithdrawMenu: ld [wPartyAndBillsPCSavedMenuItem], a .loop call HandleMenuInput - bit 1, a ; pressed B? + bit BIT_B_BUTTON, a jr nz, .exit ld a, [wCurrentMenuItem] and a diff --git a/engine/pokemon/learn_move.asm b/engine/pokemon/learn_move.asm index fd92ec57..0377caa4 100644 --- a/engine/pokemon/learn_move.asm +++ b/engine/pokemon/learn_move.asm @@ -155,7 +155,7 @@ TryingToLearn: call LoadScreenTilesFromBuffer1 pop af pop hl - bit 1, a ; pressed b + bit BIT_B_BUTTON, a jr nz, .cancel push hl ld a, [wCurrentMenuItem] -- cgit v1.3.1-sl0p