ootw: c15: update foreground action

This commit is contained in:
Vince Weaver 2020-02-14 16:22:16 -05:00
parent c42461834e
commit 445b86662b

View File

@ -570,23 +570,41 @@ c15_room1_foreground:
; run soldier/laser in the front ; run soldier/laser in the front
; 10 steps of soldier ; every 256 frames start a laser
; 4 steps of laser ; if 1024 start a soldier
lda FRAMEL lda FRAMEL
bne not_new_walk bne not_new_walk
lda FRAMEH
and #$3
beq start_soldier
start_blast:
ldy #26
sty FOREGROUND_COUNT
bne not_new_walk
start_soldier:
ldy #2 ldy #2
sty FOREGROUND_COUNT sty FOREGROUND_COUNT
not_new_walk: not_new_walk:
ldy FOREGROUND_COUNT ldy FOREGROUND_COUNT
beq skip_enemy_walk beq skip_enemy_walk
cpy #24 cpy #24
beq reset_walk
cpy #34
beq reset_walk
bne do_enemy_walk bne do_enemy_walk
reset_walk:
ldy #0 ldy #0
sty FOREGROUND_COUNT sty FOREGROUND_COUNT
beq skip_enemy_walk beq skip_enemy_walk
@ -611,8 +629,12 @@ do_enemy_walk:
no_update_enemy_walk: no_update_enemy_walk:
; can we only overlay bottom half of screen?
; current overlay code starts at CV and counts to zero :(
jsr gr_overlay_noload jsr gr_overlay_noload
skip_enemy_walk: skip_enemy_walk:
; test shots ; test shots
@ -983,6 +1005,7 @@ enemy_walking_sequence:
.word walk08_rle .word walk08_rle
.word walk09_rle .word walk09_rle
.word walk10_rle .word walk10_rle
.word 0
bigshot_sequence: bigshot_sequence:
.word bigshot01_rle .word bigshot01_rle
.word bigshot02_rle .word bigshot02_rle