lemm: can explode all now

This commit is contained in:
Vince Weaver 2022-03-22 21:48:02 -04:00
parent 3e18390ec6
commit 357dfe7c57
2 changed files with 35 additions and 16 deletions

View File

@ -56,7 +56,7 @@ do_draw_countdown:
lda lemming_exploding,Y
beq do_draw_lemming
ldx lemming_exploding
ldx lemming_exploding,Y
dex
lda countdown_sprites_l,X
@ -292,19 +292,25 @@ countdown_sprites_h:
.byte >countdown2_sprite,>countdown1_sprite
;==========================
; Handle particles
;==========================
handle_particles:
jsr hgr_draw_particles
lda lemming_frame
ldy CURRENT_LEMMING
lda lemming_frame,Y
cmp #16
bne still_going
; partway through make lemming not out
; TODO: partway through make lemming not out?
lda #0
sta lemming_out
jsr update_lemmings_out
lda #LEVEL_FAIL
sta LEVEL_OVER
sta lemming_out,Y
jsr remove_lemming
still_going:
@ -314,6 +320,9 @@ still_going:
not_done_particle:
rts
;==========================
; Handle explosion
;==========================
; moved to make room
handle_explosion:
@ -326,13 +335,13 @@ handle_explosion:
start_particles:
lda #0
sta lemming_frame
sta lemming_frame,Y
jsr init_particles
; erase explosion
ldy #0
ldy CURRENT_LEMMING
lda lemming_y,Y
sec

View File

@ -4,23 +4,33 @@ update_time:
; update explosion timer
; not ideal (first second might be short)
lda lemming_exploding
ldy #0
update_exploding_loop:
lda lemming_exploding,Y
beq not_done_exploding
inc lemming_exploding
lda lemming_exploding
tya
tax
inc lemming_exploding,X
lda lemming_exploding,Y
cmp #6
bne not_done_exploding
lda #LEMMING_EXPLODING
sta lemming_status
sta lemming_status,Y
lda #0
sta lemming_frame
sta lemming_exploding
sta lemming_frame,Y
sta lemming_exploding,Y
not_done_exploding:
iny
cpy #MAX_LEMMINGS
bne update_exploding_loop
sed