mirror of
https://github.com/digarok/flapple.git
synced 2024-06-08 20:29:44 +00:00
Debounce joystick buttons
This commit is contained in:
parent
06fb8ebb3a
commit
e3aa0c3246
|
@ -21,7 +21,7 @@ CopyPtr MAC
|
|||
<<<
|
||||
|
||||
; HANDLE GREENSCREEN DOODS... MONO flag set 0 = color mode, 1 = mono mode
|
||||
MONO equ 1
|
||||
MONO equ 0
|
||||
|
||||
DO MONO
|
||||
dsk fmono.system ; tell compiler output filename
|
||||
|
@ -348,7 +348,7 @@ HandleInput
|
|||
sta BIRD_Y
|
||||
:keyDone jmp HandleInputDone
|
||||
|
||||
ButtonsCheck
|
||||
ButtonsCheck lda ButtonHeld
|
||||
lda $c061 ;b0
|
||||
cmp #128
|
||||
bcs :hit
|
||||
|
@ -357,8 +357,19 @@ ButtonsCheck
|
|||
bcs :hit
|
||||
lda $c063 ;b2
|
||||
bcs :hit
|
||||
:nohit lda #0
|
||||
sta ButtonHeld
|
||||
clc
|
||||
:hit rts ;will be non-zero if we bcs'ed our way here
|
||||
rts
|
||||
|
||||
:hit lda ButtonHeld
|
||||
bne :noflap
|
||||
inc ButtonHeld ; set to 1
|
||||
sec
|
||||
rts
|
||||
:noflap clc
|
||||
rts
|
||||
ButtonHeld db 0
|
||||
|
||||
* A= key
|
||||
QuitKeyCheck cmp #"q"
|
||||
|
@ -846,7 +857,7 @@ WaitKeyXY
|
|||
jsr QuitKeyCheck
|
||||
sec
|
||||
rts
|
||||
_waitX db 0
|
||||
_waitX db 0
|
||||
|
||||
**************************************************
|
||||
* See if we're running on a IIgs
|
||||
|
@ -1003,3 +1014,4 @@ _compType db #$7e ; $7e - IIe ; $FE - IIgs
|
|||
put soundengine
|
||||
put bird
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user