mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-10-03 03:54:50 +00:00
sprites: firing!
This commit is contained in:
parent
cb33e23442
commit
fb6801bc84
@ -221,15 +221,16 @@ display_loop:
|
|||||||
;======================================================
|
;======================================================
|
||||||
|
|
||||||
; 4550 -- VBLANK
|
; 4550 -- VBLANK
|
||||||
; 1821 -- draw ship (130*14)+1
|
;-1821 -- draw ship (130*14)+1
|
||||||
; 829 -- erase ship (100*8)+(14*2)+1
|
; -829 -- erase ship (100*8)+(14*2)+1
|
||||||
; -31 -- move ship
|
; -31 -- move ship
|
||||||
; -17 -- move fire
|
; -17 -- move fire
|
||||||
; -306 -- draw fire (61*5)+1
|
; -306 -- draw fire (61*5)+1
|
||||||
; -61 -- keypress
|
; -61 -- keypress
|
||||||
|
; -24 -- handle fire press
|
||||||
; -8 -- loop
|
; -8 -- loop
|
||||||
;=======
|
;=======
|
||||||
; 1477
|
; 1453
|
||||||
|
|
||||||
;================
|
;================
|
||||||
; erase old ship
|
; erase old ship
|
||||||
@ -507,12 +508,11 @@ pad_time:
|
|||||||
|
|
||||||
|
|
||||||
wait_loop:
|
wait_loop:
|
||||||
; Try X=6 Y=41 cycles=1477
|
|
||||||
|
|
||||||
; Try X=175 Y=2 cycles=1763 R20
|
; Try X=1 Y=132 cycles=1453
|
||||||
|
|
||||||
ldy #41 ; 2
|
ldy #132 ; 2
|
||||||
loop1: ldx #6 ; 2
|
loop1: ldx #1 ; 2
|
||||||
loop2: dex ; 2
|
loop2: dex ; 2
|
||||||
bne loop2 ; 2nt/3
|
bne loop2 ; 2nt/3
|
||||||
dey ; 2
|
dey ; 2
|
||||||
@ -524,6 +524,33 @@ wait_loop_end:
|
|||||||
|
|
||||||
jsr handle_keypress ; 6+55
|
jsr handle_keypress ; 6+55
|
||||||
|
|
||||||
|
;===============
|
||||||
|
; handle fire
|
||||||
|
; FIRE: 24
|
||||||
|
; no FIRE: 6 [18]
|
||||||
|
|
||||||
|
lda FIRE ; 3
|
||||||
|
beq no_firing ; 3
|
||||||
|
; -1
|
||||||
|
lda #0 ; 2
|
||||||
|
sta FIRE ; 3
|
||||||
|
|
||||||
|
lda YPOS ; 3
|
||||||
|
sta FIRE_Y ; 3
|
||||||
|
|
||||||
|
lda #7 ; 2
|
||||||
|
sta FIRE_X ; 3
|
||||||
|
|
||||||
|
jmp really_no_firing ; 3
|
||||||
|
|
||||||
|
no_firing:
|
||||||
|
inc TEMP ; 5
|
||||||
|
inc TEMP ; 5
|
||||||
|
inc TEMP ; 5
|
||||||
|
lda TEMP ; 3
|
||||||
|
|
||||||
|
really_no_firing:
|
||||||
|
|
||||||
;===============
|
;===============
|
||||||
; check for end
|
; check for end
|
||||||
|
|
||||||
@ -534,6 +561,11 @@ wait_loop_end:
|
|||||||
done_level:
|
done_level:
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.align $100
|
.align $100
|
||||||
;=======================
|
;=======================
|
||||||
; handle keypress
|
; handle keypress
|
||||||
|
Loading…
Reference in New Issue
Block a user