mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-06-16 22:29:29 +00:00
keen: level over if touch enemy
This commit is contained in:
parent
10f9706d05
commit
f865bdcd1a
|
@ -4,11 +4,22 @@
|
||||||
; do head, than foot
|
; do head, than foot
|
||||||
; FIXME: should we check both head/feet?
|
; FIXME: should we check both head/feet?
|
||||||
check_items:
|
check_items:
|
||||||
|
|
||||||
|
; check if going out door
|
||||||
|
|
||||||
jsr check_door
|
jsr check_door
|
||||||
|
|
||||||
|
; check if touching enemy
|
||||||
|
|
||||||
|
jsr check_enemy
|
||||||
|
|
||||||
|
; check head items
|
||||||
|
|
||||||
ldx KEEN_HEAD_POINTER
|
ldx KEEN_HEAD_POINTER
|
||||||
jsr check_item
|
jsr check_item
|
||||||
|
|
||||||
|
; check feet items
|
||||||
|
|
||||||
ldx KEEN_FOOT_POINTER
|
ldx KEEN_FOOT_POINTER
|
||||||
; fallthrough
|
; fallthrough
|
||||||
|
|
||||||
|
@ -117,6 +128,35 @@ at_door:
|
||||||
done_check_door:
|
done_check_door:
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
;=============================
|
||||||
|
; check if feet touching enemy
|
||||||
|
;=============================
|
||||||
|
; level1 at least you can't touch with head?
|
||||||
|
check_enemy:
|
||||||
|
lda KEEN_FOOT_TILE1
|
||||||
|
cmp #21 ; green tentacles
|
||||||
|
beq touched_enemy
|
||||||
|
cmp #22 ; clam thing
|
||||||
|
beq touched_enemy
|
||||||
|
|
||||||
|
lda KEEN_FOOT_TILE2
|
||||||
|
cmp #21 ; green tentacles
|
||||||
|
beq touched_enemy
|
||||||
|
cmp #22 ; clam thing
|
||||||
|
bne done_check_enemy
|
||||||
|
|
||||||
|
touched_enemy:
|
||||||
|
dec KEENS
|
||||||
|
inc LEVEL_OVER
|
||||||
|
; TODO: ANIMATION
|
||||||
|
; TODO: enemy music
|
||||||
|
;jsr exit_music
|
||||||
|
done_check_enemy:
|
||||||
|
rts
|
||||||
|
|
||||||
|
|
||||||
score_lookup:
|
score_lookup:
|
||||||
.byte $00,$01,$10,$05,$02,$50 ; BCD
|
.byte $00,$01,$10,$05,$02,$50 ; BCD
|
||||||
; 0 = laser gun
|
; 0 = laser gun
|
||||||
|
|
Loading…
Reference in New Issue
Block a user