reformat some joypad functions

This commit is contained in:
yenatch 2013-08-29 18:58:38 -04:00
parent 906496e107
commit 0a829301ae

View File

@ -839,19 +839,24 @@ INCLUDE "engine/joypad.asm"
Functiona1b: ; a1b Functiona1b: ; a1b
.asm_a1b
call DelayFrame call DelayFrame
push bc push bc
call Functiona57 call Functiona57
pop bc pop bc
ld a, [hJoyDown] ld a, [hJoyDown]
cp $46 cp D_UP | SELECT | BUTTON_B
jr z, .asm_a34 jr z, .asm_a34
ld a, [$ffa9] ld a, [$ffa9]
and $9 and $9
jr nz, .asm_a34 jr nz, .asm_a34
dec c dec c
jr nz, .asm_a1b jr nz, Functiona1b
and a and a
ret ret
@ -861,22 +866,20 @@ Functiona1b: ; a1b
; a36 ; a36
Functiona36: ; a36 Functiona36: ; a36
.asm_a36
call DelayFrame call DelayFrame
call GetJoypadPublic call GetJoypadPublic
ld a, [hJoyPressed] ld a, [hJoyPressed]
and $3 and BUTTON_A | BUTTON_B
ret nz ret nz
call RTC call RTC
jr .asm_a36 jr Functiona36
; a46 ; a46
Functiona46: ; a46 Functiona46: ; a46
ld a, [hOAMUpdate] ld a, [hOAMUpdate]
push af push af
ld a, $1 ld a, 1
ld [hOAMUpdate], a ld [hOAMUpdate], a
call WaitBGMap call WaitBGMap
call Functiona36 call Functiona36
@ -885,8 +888,6 @@ Functiona46: ; a46
ret ret
; a57 ; a57
Functiona57: ; a57 Functiona57: ; a57
call GetJoypadPublic call GetJoypadPublic
ld a, [$ffaa] ld a, [$ffaa]
@ -894,13 +895,12 @@ Functiona57: ; a57
ld a, [hJoyPressed] ld a, [hJoyPressed]
jr z, .asm_a63 jr z, .asm_a63
ld a, [hJoyDown] ld a, [hJoyDown]
.asm_a63 .asm_a63
ld [$ffa9], a ld [$ffa9], a
ld a, [hJoyPressed] ld a, [hJoyPressed]
and a and a
jr z, .asm_a70 jr z, .asm_a70
ld a, $f ld a, 15
ld [TextDelayFrames], a ld [TextDelayFrames], a
ret ret
@ -913,7 +913,7 @@ Functiona57: ; a57
ret ret
.asm_a7a .asm_a7a
ld a, $5 ld a, 5
ld [TextDelayFrames], a ld [TextDelayFrames], a
ret ret
; a80 ; a80