aboutsummaryrefslogtreecommitdiffstats
path: root/engine/joypad.asm
diff options
context:
space:
mode:
authorRangi <35663410+Rangi42@users.noreply.github.com>2020-11-05 23:50:02 -0500
committerGitHub <noreply@github.com>2020-11-05 23:50:02 -0500
commit5db3bdd6551fad07066b669db1e44a6151aaa0b4 (patch)
treeab357b894c9457b3d1d38fd49300df34412168f8 /engine/joypad.asm
parentMerge pull request #59 from Rangi42/master (diff)
parentSync more with pokered (diff)
downloadpokeyellow-5db3bdd6551fad07066b669db1e44a6151aaa0b4.tar.gz
pokeyellow-5db3bdd6551fad07066b669db1e44a6151aaa0b4.tar.xz
pokeyellow-5db3bdd6551fad07066b669db1e44a6151aaa0b4.zip
Merge pull request #60 from Rangi42/master
Organize home and macro code
Diffstat (limited to 'engine/joypad.asm')
-rw-r--r--engine/joypad.asm8
1 files changed, 3 insertions, 5 deletions
diff --git a/engine/joypad.asm b/engine/joypad.asm
index 06a15e4e..d50eea08 100644
--- a/engine/joypad.asm
+++ b/engine/joypad.asm
@@ -7,7 +7,6 @@ ReadJoypad_::
ret nz
ld a, 1 << 5 ; select direction keys
- ;ld c, 0
ldh [rJOYP], a
ldh a, [rJOYP]
@@ -19,9 +18,9 @@ ReadJoypad_::
ld a, 1 << 4 ; select button keys
ldh [rJOYP], a
- REPT 6
+REPT 6
ldh a, [rJOYP]
- ENDR
+ENDR
cpl
and %1111
or b
@@ -32,14 +31,13 @@ ReadJoypad_::
ldh [rJOYP], a
ret
-
_Joypad::
; hJoyReleased: (hJoyLast ^ hJoyInput) & hJoyLast
; hJoyPressed: (hJoyLast ^ hJoyInput) & hJoyInput
ldh a, [hJoyInput]
ld b, a
- and $4F
+ and A_BUTTON + B_BUTTON + SELECT + START + D_UP
cp A_BUTTON + B_BUTTON + SELECT + START ; soft reset
jp z, TrySoftReset