summaryrefslogtreecommitdiff
path: root/home/joypad.asm
diff options
context:
space:
mode:
authoryenatch <yenatch@gmail.com>2015-07-21 02:04:38 -0400
committeryenatch <yenatch@gmail.com>2015-07-21 02:04:38 -0400
commit0b5471f385d3cc66bb4ae7aa4191ce3af9f50cac (patch)
tree61cb1021673d8a9b7b1cdddc64d90053a8476e8b /home/joypad.asm
parent006fc875971c92f2249f47b5fd120c5df76c6883 (diff)
parentd5ddd9e54ec2422d6f1cd7c561c1750512d0a81d (diff)
Merge pull request #302 from PikalaxALT/more_enum
More enum
Diffstat (limited to 'home/joypad.asm')
-rw-r--r--home/joypad.asm17
1 files changed, 8 insertions, 9 deletions
diff --git a/home/joypad.asm b/home/joypad.asm
index 5a161fb14..78a1ac143 100644
--- a/home/joypad.asm
+++ b/home/joypad.asm
@@ -42,8 +42,9 @@ Joypad:: ; 935
ld a, D_PAD
ld [rJOYP], a
; Read twice to give the request time to take.
+rept 2
ld a, [rJOYP]
- ld a, [rJOYP]
+endr
; The Joypad register output is in the lo nybble (inversed).
; We make the hi nybble of our new container d-pad input.
@@ -59,12 +60,9 @@ Joypad:: ; 935
ld a, BUTTONS
ld [rJOYP], a
; Wait for input to stabilize.
+rept 6
ld a, [rJOYP]
- ld a, [rJOYP]
- ld a, [rJOYP]
- ld a, [rJOYP]
- ld a, [rJOYP]
- ld a, [rJOYP]
+endr
; Buttons take the lo nybble.
cpl
and $f
@@ -211,8 +209,9 @@ GetJoypad:: ; 984
jr nz, .next
; The current input is overwritten.
+rept 2
dec hl
- dec hl
+endr
ld b, NO_INPUT
jr .finishauto
@@ -312,7 +311,7 @@ Functiona36:: ; a36
jr Functiona36
; a46
-Functiona46:: ; a46
+CloseText:: ; a46
ld a, [hOAMUpdate]
push af
ld a, 1
@@ -387,7 +386,7 @@ Functionaa5:: ; aa5
ret
; aaf
-Functionaaf:: ; aaf
+KeepTextOpen:: ; aaf
ld a, [InLinkBattle]
and a
jr nz, .asm_ac1