mist: stoney: can now link back to mist

This commit is contained in:
Vince Weaver 2020-04-21 16:56:52 -04:00
parent 9470736d9f
commit 03b25de904
6 changed files with 108 additions and 7 deletions

View File

@ -254,6 +254,13 @@ STONEY_RED_DRESSER_OPEN = 39
STONEY_CRAWLWAY_LEFT = 40
STONEY_COMPASS_ROOM = 41
STONEY_COMPASS_ROSE = 42
STONEY_RIGHT_TUNNEL1 = 43
STONEY_RIGHT_TUNNEL2 = 44
STONEY_RIGHT_AIRLOCK = 45
STONEY_RIGH_AIRLOCK_OPEN= 46
STONEY_BLUE_ROOM = 47
STONEY_BLUE_ROOM_BED = 48
STONEY_CRAWLWAY_RIGHT = 49
; Channely Wood
CHANNEL_OUTSIDE_CABIN = 0

View File

@ -32,6 +32,7 @@ stoney_graphics.inc: \
book_stairs2_n.lzsa book_stairs2_w.lzsa \
book_room_n.lzsa book_room_s.lzsa \
book_table_n.lzsa \
book_table_open_n.lzsa book_table_closed_n.lzsa \
doorway2_n.lzsa doorway2_s.lzsa doorway2_e.lzsa doorway2_w.lzsa \
telescope_path1_e.lzsa telescope_path1_w.lzsa \
telescope_path2_e.lzsa telescope_path2_w.lzsa \
@ -93,6 +94,8 @@ stoney_graphics.inc: \
echo "book_room_n_lzsa: .incbin \"book_room_n.lzsa\"" >> stoney_graphics.inc
echo "book_room_s_lzsa: .incbin \"book_room_s.lzsa\"" >> stoney_graphics.inc
echo "book_table_n_lzsa: .incbin \"book_table_n.lzsa\"" >> stoney_graphics.inc
echo "book_table_open_n_lzsa: .incbin \"book_table_open_n.lzsa\"" >> stoney_graphics.inc
echo "book_table_closed_n_lzsa: .incbin \"book_table_closed_n.lzsa\"" >> stoney_graphics.inc
echo "doorway2_n_lzsa: .incbin \"doorway2_n.lzsa\"" >> stoney_graphics.inc
echo "doorway2_s_lzsa: .incbin \"doorway2_s.lzsa\"" >> stoney_graphics.inc
echo "doorway2_e_lzsa: .incbin \"doorway2_e.lzsa\"" >> stoney_graphics.inc

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -462,11 +462,11 @@ location25:
.byte DIRECTION_N ; north exit_dir
.byte $ff ; south exit_dir
.byte $ff ; east exit_dir
.byte $ff ; west exit_dir
.word book_table_n_lzsa ; north bg
.word $0000 ; south bg
.word $0000 ; east bg
.word $0000 ; west bg
.byte $ff ; west exit_dir
.word book_table_closed_n_lzsa ; north bg
.word $0000 ; south bg
.word $0000 ; east bg
.word $0000 ; west bg
.byte BG_NORTH
.byte $ff
@ -480,12 +480,15 @@ location26:
.byte $ff ; south exit_dir
.byte $ff ; east exit_dir
.byte $ff ; west exit_dir
.word book_table_n_lzsa ; north bg
.word book_table_open_n_lzsa ; north bg
.word $0000 ; south bg
.word $0000 ; east bg
.word $0000 ; west bg
.byte BG_NORTH
.byte $ff
.byte DIRECTION_N
.byte 24,32 ; special x
.byte 12,22 ; special y
.word mist_link_book-1 ; special function
; STONEY_DOORWAY2 -- doorway on other half of ship
location27:

View File

@ -65,6 +65,13 @@ game_loop:
lda LOCATION
cmp #STONEY_SHIP_BOOK_OPEN
beq animate_stoney_book
cmp #STONEY_BOOK_TABLE_OPEN
beq animate_mist_book
cmp #STONEY_RED_DRESSER_OPEN
beq fg_draw_red_page
cmp #STONEY_BLUE_ROOM_BED
beq fg_draw_blue_page
jmp nothing_special
animate_stoney_book:
@ -98,6 +105,46 @@ animate_stoney_book:
done_animate_book:
jmp nothing_special
animate_mist_book:
lda ANIMATE_FRAME
cmp #6
bcc mist_book_good ; blt
lda #0
sta ANIMATE_FRAME
mist_book_good:
asl
tay
lda mist_movie,Y
sta INL
lda mist_movie+1,Y
sta INH
lda #24
sta XPOS
lda #12
sta YPOS
jsr put_sprite_crop
lda FRAMEL
and #$f
bne done_animate_mist_book
inc ANIMATE_FRAME
done_animate_mist_book:
jmp nothing_special
fg_draw_red_page:
jsr draw_red_page
jmp nothing_special
fg_draw_blue_page:
jsr draw_blue_page
jmp nothing_special
nothing_special:
@ -157,6 +204,47 @@ back_to_mist:
rts
;=============================
draw_red_page:
lda RED_PAGES_TAKEN
and #STONEY_PAGE
bne no_draw_page
lda #14
sta XPOS
lda #36
sta YPOS
lda #<red_page_sprite
sta INL
lda #>red_page_sprite
sta INH
jmp put_sprite_crop ; tail call
draw_blue_page:
lda BLUE_PAGES_TAKEN
and #STONEY_PAGE
bne no_draw_page
lda #15
sta XPOS
lda #34
sta YPOS
lda #<blue_page_sprite
sta INL
lda #>blue_page_sprite
sta INH
jmp put_sprite_crop ; tail call
no_draw_page:
rts
;==========================