short fire - inventory, long fire - fire #75

This commit is contained in:
2022-06-19 14:22:54 -04:00
parent cc3e2d1845
commit ab140ed5ca
2 changed files with 12 additions and 2 deletions
BIN
View File
Binary file not shown.
+11 -1
View File
@@ -1045,12 +1045,15 @@ notpressed
@ @
cmp #$0d ; I cmp #$0d ; I
bne @+ bne @+
callInventory
mva #$ff isInventory mva #$ff isInventory
jsr Purchase jsr Purchase
mva #0 escFlag mva #0 escFlag
jsr DisplayStatus jsr DisplayStatus
jsr SetMainScreen jsr SetMainScreen
jsr DrawTanks jsr DrawTanks
jsr WaitForKeyRelease
jmp BeforeFire
@ @
cmp #$8e cmp #$8e
jeq CTRLPressedUp jeq CTRLPressedUp
@@ -1138,7 +1141,7 @@ CTRLPressedUp
pressedDown pressedDown
lda pressTimer lda pressTimer
spl:mva #0 pressTimer ; if >128 then reset to 0 spl:mva #0 pressTimer ; if >128 then reset to 0
cmp #50 ; 1s cmp #25 ; 1/2s
bcs CTRLPressedDown bcs CTRLPressedDown
mva #sfx_set_power_1 sfx_effect mva #sfx_set_power_1 sfx_effect
@@ -1234,6 +1237,13 @@ CTRLpressedTAB
pressedSpace pressedSpace
;================================= ;=================================
;we shoot here!!! ;we shoot here!!!
mva #0 pressTimer ; reset
jsr WaitForKeyRelease
lda pressTimer
cmp #25 ; 1/2s
bcs fire
jmp callInventory
fire
RTS RTS
.endp .endp