mist: can link through linking book

This commit is contained in:
Vince Weaver 2020-03-01 13:28:04 -05:00
parent d971ed7b5f
commit c42e3a7bf4
2 changed files with 28 additions and 1 deletions

View File

@ -42,6 +42,10 @@ mist_start:
jsr change_location
lda #1
sta CURSOR_VISIBLE ; visible at first
game_loop:
;=================
@ -60,7 +64,14 @@ game_loop:
;====================================
; draw pointer
;====================================
lda CURSOR_VISIBLE
bne draw_pointer
jmp no_draw_pointer
draw_pointer:
lda CURSOR_X
sta XPOS
lda CURSOR_Y
@ -129,6 +140,8 @@ finger_draw:
sta INH
jsr put_sprite_crop
no_draw_pointer:
;====================================
; page flip
;====================================
@ -221,9 +234,14 @@ return_pressed:
not_special_return:
jmp done_keypress
; special case, don't make cursor visible
jmp no_keypress
done_keypress:
lda #1 ; make cursor visible
sta CURSOR_VISIBLE
no_keypress:
bit KEYRESET
rts
@ -236,6 +254,7 @@ no_keypress:
handle_special:
ldy #LOCATION_SPECIAL_FUNC+1
lda (LOCATION_STRUCT_L),Y
pha
dey
lda (LOCATION_STRUCT_L),Y
pha
@ -282,6 +301,13 @@ change_direction:
;=============================
change_location:
; reset pointer to not visible, centered
lda #0
sta CURSOR_VISIBLE
lda #20
sta CURSOR_X
sta CURSOR_Y
lda LOCATION
asl
tay

View File

@ -50,6 +50,7 @@ LOCATION = $67
LOCATION_STRUCT_L = $68
LOCATION_STRUCT_H = $69
IN_SPECIAL = $6A
CURSOR_VISIBLE = $6B
DISP_PAGE = $ED ; ALL
DRAW_PAGE = $EE ; ALL