mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-02-07 05:30:55 +00:00
mist: can link through linking book
This commit is contained in:
parent
d971ed7b5f
commit
c42e3a7bf4
28
mist/mist.s
28
mist/mist.s
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user