lemm: hook up explosions

This commit is contained in:
Vince Weaver 2022-03-23 22:57:02 -04:00
parent 0f8e9963ed
commit 1ad56f6eba
4 changed files with 75 additions and 10 deletions

View File

@ -310,7 +310,8 @@ handle_particles:
lda #0
sta lemming_out,Y
jsr remove_lemming
clc ; mark as not exiting via door
jsr remove_lemming ; remove the lemming
still_going:

View File

@ -299,7 +299,7 @@ level_message0_text:
; NEEDED+20% < T < 100%
level_message1_text:
.byte 2, 6,"YOU TOTALLY STORMED THAT LEVEL!",0
.byte 3, 7,"LET'S SEE IF YOU CAN STORM THE NEXT...",0
.byte 1, 7,"LET'S SEE IF YOU CAN STORM THE NEXT...",0
.byte $FF
; NEEDED < T < NEEDED+20%

View File

@ -221,18 +221,47 @@ return_check_lemming:
; check if digging selected
lda BUTTON_LOCATION
cmp #8
bne done_keypress
; for now assume we've got digging selected
jsr click_speaker
lda #LEMMING_DIGGING
sta lemming_status,Y
lda BUTTON_LOCATION
cmp #1
beq make_climber
cmp #2
beq make_floater
cmp #3
beq make_exploding
cmp #4
beq make_stopper
cmp #5
beq make_builder
cmp #6
beq make_basher
cmp #7
beq make_miner
cmp #8
beq make_digger
bne done_keypress
make_climber:
jmp done_keypress
make_floater:
jmp done_keypress
make_exploding:
jsr make_exploding_routine
jmp done_keypress
make_stopper:
jmp done_keypress
make_builder:
jmp done_keypress
make_basher:
jmp done_keypress
make_miner:
jmp done_keypress
make_digger:
jsr make_digger_routine
jmp done_keypress
not_over_lemming:
@ -246,6 +275,38 @@ no_keypress:
;========================
; make digger
;========================
make_digger_routine:
; only do it if walking
lda lemming_status,Y
cmp #LEMMING_WALKING
bne done_make_digger
lda #LEMMING_DIGGING
sta lemming_status,Y
; FIXME: decrement digger_count
done_make_digger:
rts
;========================
; make exploding
;========================
make_exploding_routine:
lda #1
sta lemming_exploding,Y
rts
;=============================
;=============================
; handle menu
;=============================
;=============================
handle_menu:
; see where we clicked
@ -274,6 +335,7 @@ handle_menu_which_in_a:
beq nuke_button
bcs map_grid_button
;==========================
; otherwise was job button
job_button:

View File

@ -5,9 +5,11 @@
; FIXME: make it last longer?
click_speaker:
pha
lda SOUND_STATUS
bmi done_click
bit $c030
pla
done_click:
rts