Use combined joypad masks
This commit is contained in:
@@ -206,7 +206,7 @@ TMHM_PocketLoop:
|
||||
ld [w2DMenuFlags2], a
|
||||
ld a, $20
|
||||
ld [w2DMenuCursorOffsets], a
|
||||
ld a, PAD_A | PAD_B | PAD_UP | PAD_DOWN | PAD_LEFT | PAD_RIGHT
|
||||
ld a, PAD_A | PAD_B | PAD_CTRL_PAD
|
||||
ld [wMenuJoypadFilter], a
|
||||
ld a, [wTMHMPocketCursor]
|
||||
inc a
|
||||
|
@@ -463,7 +463,7 @@ PokegearClock_Joypad:
|
||||
call .UpdateClock
|
||||
ld hl, hJoyLast
|
||||
ld a, [hl]
|
||||
and PAD_A | PAD_B | PAD_START | PAD_SELECT
|
||||
and PAD_BUTTONS
|
||||
jr nz, .quit
|
||||
ld a, [hl]
|
||||
and PAD_RIGHT
|
||||
|
@@ -1084,7 +1084,7 @@ MoveScreen2DMenuData:
|
||||
db _2DMENU_ENABLE_SPRITE_ANIMS ; flags 1
|
||||
db 0 ; flags 2
|
||||
dn 2, 0 ; cursor offsets
|
||||
db PAD_UP | PAD_DOWN | PAD_LEFT | PAD_RIGHT | PAD_A | PAD_B ; accepted buttons
|
||||
db PAD_CTRL_PAD | PAD_A | PAD_B ; accepted buttons
|
||||
|
||||
String_MoveWhere:
|
||||
db "Where?@"
|
||||
|
@@ -253,7 +253,7 @@ MonStatsJoypad:
|
||||
ret
|
||||
|
||||
.next
|
||||
and PAD_DOWN | PAD_UP | PAD_LEFT | PAD_RIGHT | PAD_A | PAD_B
|
||||
and PAD_CTRL_PAD | PAD_A | PAD_B
|
||||
jp StatsScreen_JoypadAction
|
||||
|
||||
StatsScreenWaitCry:
|
||||
|
@@ -97,8 +97,8 @@ endr
|
||||
; Now that we have the input, we can do stuff with it.
|
||||
|
||||
; For example, soft reset:
|
||||
and PAD_A | PAD_B | PAD_SELECT | PAD_START
|
||||
cp PAD_A | PAD_B | PAD_SELECT | PAD_START
|
||||
and PAD_BUTTONS
|
||||
cp PAD_BUTTONS
|
||||
jp z, Reset
|
||||
|
||||
ret
|
||||
|
@@ -52,10 +52,10 @@ JoyTextDelay_ForcehJoyDown::
|
||||
ldh [hInMenu], a
|
||||
|
||||
ldh a, [hJoyLast]
|
||||
and PAD_RIGHT + PAD_LEFT + PAD_UP + PAD_DOWN
|
||||
and PAD_CTRL_PAD
|
||||
ld c, a
|
||||
ldh a, [hJoyPressed]
|
||||
and PAD_A + PAD_B + PAD_SELECT + PAD_START
|
||||
and PAD_BUTTONS
|
||||
or c
|
||||
ld c, a
|
||||
ret
|
||||
|
Reference in New Issue
Block a user