Skip to content

Commit 58b9a05

Browse files
committed
Use combined joypad masks
1 parent b03ba1a commit 58b9a05

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

engine/items/tmhm.asm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ TMHM_PocketLoop:
204204
ld [w2DMenuFlags2], a
205205
ld a, $20
206206
ld [w2DMenuCursorOffsets], a
207-
ld a, PAD_A | PAD_B | PAD_UP | PAD_DOWN | PAD_LEFT | PAD_RIGHT
207+
ld a, PAD_A | PAD_B | PAD_CTRL_PAD
208208
ld [wMenuJoypadFilter], a
209209
ld a, [wTMHMPocketCursor]
210210
inc a

engine/pokegear/pokegear.asm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ PokegearClock_Joypad:
455455
call .UpdateClock
456456
ld hl, hJoyLast
457457
ld a, [hl]
458-
and PAD_A | PAD_B | PAD_START | PAD_SELECT
458+
and PAD_BUTTONS
459459
jr nz, .quit
460460
ld a, [hl]
461461
and PAD_RIGHT

engine/pokemon/mon_menu.asm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1083,7 +1083,7 @@ MoveScreen2DMenuData:
10831083
db _2DMENU_ENABLE_SPRITE_ANIMS ; flags 1
10841084
db 0 ; flags 2
10851085
dn 2, 0 ; cursor offsets
1086-
db PAD_UP | PAD_DOWN | PAD_LEFT | PAD_RIGHT | PAD_A | PAD_B ; accepted buttons
1086+
db PAD_CTRL_PAD | PAD_A | PAD_B ; accepted buttons
10871087

10881088
String_MoveWhere:
10891089
db "Where?@"

engine/pokemon/stats_screen.asm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ StatsScreen_LoadPage:
8888
ldh a, [hJoyPressed]
8989

9090
.joypad_action
91-
and PAD_DOWN | PAD_UP | PAD_LEFT | PAD_RIGHT | PAD_A | PAD_B
91+
and PAD_CTRL_PAD | PAD_A | PAD_B
9292
jr z, .joypad_loop
9393
bit B_BUTTON_F, a
9494
jp nz, StatsScreen_Exit

home/joypad.asm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ endr
9797
; Now that we have the input, we can do stuff with it.
9898

9999
; For example, soft reset:
100-
and PAD_A | PAD_B | PAD_SELECT | PAD_START
101-
cp PAD_A | PAD_B | PAD_SELECT | PAD_START
100+
and PAD_BUTTONS
101+
cp PAD_BUTTONS
102102
jp z, Reset
103103

104104
ret

home/scrolling_menu.asm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ JoyTextDelay_ForcehJoyDown::
5252
ldh [hInMenu], a
5353

5454
ldh a, [hJoyLast]
55-
and PAD_RIGHT + PAD_LEFT + PAD_UP + PAD_DOWN
55+
and PAD_CTRL_PAD
5656
ld c, a
5757
ldh a, [hJoyPressed]
58-
and PAD_A + PAD_B + PAD_SELECT + PAD_START
58+
and PAD_BUTTONS
5959
or c
6060
ld c, a
6161
ret

0 commit comments

Comments
 (0)