From 3a562f9896959ff9dd257cac18ed9090bf2be990 Mon Sep 17 00:00:00 2001 From: Rangi Date: Wed, 9 Mar 2022 19:42:26 -0500 Subject: [PATCH] Identify some wMenuJoypad-related button constants --- engine/events/buena.asm | 2 +- engine/items/tmhm.asm | 2 +- engine/overworld/decorations.asm | 2 +- mobile/mobile_22.asm | 10 +++++----- mobile/mobile_22_2.asm | 6 +++--- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/engine/events/buena.asm b/engine/events/buena.asm index bc175d34f..91f73ca72 100644 --- a/engine/events/buena.asm +++ b/engine/events/buena.asm @@ -234,7 +234,7 @@ Buena_PrizeMenu: ld a, [wMenuCursorY] ld [wMenuSelection], a ld a, [wMenuJoypad] - cp $2 + cp B_BUTTON jr z, .cancel ld a, c and a diff --git a/engine/items/tmhm.asm b/engine/items/tmhm.asm index 1db310486..d4d7d7bb3 100644 --- a/engine/items/tmhm.asm +++ b/engine/items/tmhm.asm @@ -290,7 +290,7 @@ TMHM_CheckHoveringOverCancel: TMHM_ExitPack: call TMHM_PlaySFX_ReadText2 _TMHM_ExitPack: - ld a, $2 + ld a, B_BUTTON ld [wMenuJoypad], a and a ret diff --git a/engine/overworld/decorations.asm b/engine/overworld/decorations.asm index 4acebba19..23978d049 100644 --- a/engine/overworld/decorations.asm +++ b/engine/overworld/decorations.asm @@ -376,7 +376,7 @@ PopulateDecoCategoryMenu: ld [wMenuScrollPosition], a call ScrollingMenu ld a, [wMenuJoypad] - cp 2 + cp B_BUTTON jr z, .no_action_2 call DoDecorationAction2 diff --git a/mobile/mobile_22.asm b/mobile/mobile_22.asm index d8e922a88..930220ac9 100644 --- a/mobile/mobile_22.asm +++ b/mobile/mobile_22.asm @@ -2136,9 +2136,9 @@ Function89dab: ld hl, wMenuJoypadFilter and [hl] ret z - bit 0, a + bit A_BUTTON_F, a jr nz, .asm_89dc7 - bit 1, a + bit B_BUTTON_F, a jr nz, .asm_89dd9 xor a ret @@ -2943,9 +2943,9 @@ Function8a383: ld hl, wMenuJoypadFilter and [hl] ret z - bit 0, a + bit A_BUTTON_F, a jr nz, .asm_8a399 - bit 1, a + bit B_BUTTON_F, a jr nz, .asm_8a39e xor a ret @@ -3664,7 +3664,7 @@ Function8a930: .asm_8a943 call Function8b7bd ld a, [wMenuJoypad] - and $1 + and A_BUTTON jr nz, .asm_8a953 ld a, c and a diff --git a/mobile/mobile_22_2.asm b/mobile/mobile_22_2.asm index a729469f0..2eb183cb5 100644 --- a/mobile/mobile_22_2.asm +++ b/mobile/mobile_22_2.asm @@ -800,15 +800,15 @@ Function8b7bd: call ScrollingMenu call Mobile_DisableSpriteUpdates ld a, [wMenuJoypad] - cp $2 + cp B_BUTTON jr z, .asm_8b823 - cp $20 + cp D_LEFT jr nz, .asm_8b813 call Function8b832 jr .asm_8b7ea .asm_8b813 - cp $10 + cp D_RIGHT jr nz, .asm_8b81c call Function8b83e jr .asm_8b7ea