lemm: only change lemming type if you click on one

This commit is contained in:
Vince Weaver 2022-03-13 16:18:08 -04:00
parent 93f58e95ad
commit b83e1ef280
2 changed files with 16 additions and 6 deletions

View File

@ -8,8 +8,6 @@ draw_pointer:
lda #0
sta OVER_LEMMING
; jsr save_bg_14x14 ; save old bg
; for now assume the only 14x14 sprites are the pointers
lda CURSOR_X
@ -19,8 +17,6 @@ draw_pointer:
; see if over lemming
; TODO
; see if CURSOR_X==LEMMING_X
lda CURSOR_X
cmp lemming_x
@ -47,6 +43,9 @@ check_pointer_y:
just_select:
lda #$80
sta OVER_LEMMING
lda #<select_sprite_l
sta INL
lda #>select_sprite_l

View File

@ -190,16 +190,27 @@ check_return:
return_pressed:
; TODO: actually check if over
; first check if over lemming
lda OVER_LEMMING
bpl not_over_lemming
; for now assume we've got diggingselected
lda #LEMMING_DIGGING
sta lemming_status
jmp done_keypress
not_over_lemming:
; TODO
; handle clicking on bottom row
done_keypress:
; jsr draw_pointer
no_keypress:
bit KEYRESET