mist: can now link to stoneship and poke around

This commit is contained in:
Vince Weaver 2020-04-16 15:35:49 -04:00
parent fe665bab28
commit 802be973b9
16 changed files with 311 additions and 7 deletions

View File

@ -165,6 +165,7 @@ stoney.o: stoney.s zp.inc hardware.inc common_defines.inc \
leveldata_stoney.inc \
keyboard.s \
draw_pointer.s \
link_book_stoney.s \
gr_copy.s audio.s text_print.s decompress_fast_v2.s
ca65 -o stoney.o stoney.s -l stoney.lst

View File

@ -218,6 +218,9 @@ STONEY_SHIP_DOOR_OPEN = 3
STONEY_SHIP_CHAIR = 4
STONEY_SHIP_BOOK_CLOSED = 5
STONEY_SHIP_BOOK_OPEN = 6
STONEY_ARRIVAL = 7
STONEY_UMBRELLA_PATH = 8
STONEY_UMBRELLA = 9
; Channely Wood
CHANNEL_OUTSIDE_CABIN = 0

View File

@ -12,15 +12,31 @@ stoney_graphics.inc: \
ship_entry_n.lzsa ship_entry_s.lzsa \
ship_bow_s.lzsa ship_bow_go_n.lzsa \
ship_door_open_s.lzsa ship_door_closed_s.lzsa \
book_chair_s.lzsa book_chair_n.lzsa
book_chair_s.lzsa book_chair_n.lzsa \
book_chair_open_s.lzsa book_chair_closed_s.lzsa \
arrival_n.lzsa arrival_s.lzsa arrival_e.lzsa arrival_w.lzsa \
umbrella_e.lzsa umbrella_w.lzsa \
umbrella_path_e.lzsa umbrella_path_w.lzsa
echo "ship_entry_n_lzsa: .incbin \"ship_entry_n.lzsa\"" > stoney_graphics.inc
echo "ship_entry_s_lzsa: .incbin \"ship_entry_s.lzsa\"" >> stoney_graphics.inc
echo "ship_bow_s_lzsa: .incbin \"ship_bow_s.lzsa\"" >> stoney_graphics.inc
echo "ship_bow_go_n_lzsa: .incbin \"ship_bow_go_n.lzsa\"" >> stoney_graphics.inc
echo "book_chair_s_lzsa: .incbin \"book_chair_s.lzsa\"" >> stoney_graphics.inc
echo "book_chair_n_lzsa: .incbin \"book_chair_n.lzsa\"" >> stoney_graphics.inc
echo "ship_door_open_s_lzsa: .incbin \"ship_door_open_s.lzsa\"" >> stoney_graphics.inc
echo "ship_door_closed_s_lzsa: .incbin \"ship_door_closed_s.lzsa\"" >> stoney_graphics.inc
echo "book_chair_s_lzsa: .incbin \"book_chair_s.lzsa\"" >> stoney_graphics.inc
echo "book_chair_n_lzsa: .incbin \"book_chair_n.lzsa\"" >> stoney_graphics.inc
echo "book_chair_open_s_lzsa: .incbin \"book_chair_open_s.lzsa\"" >> stoney_graphics.inc
echo "book_chair_closed_s_lzsa: .incbin \"book_chair_closed_s.lzsa\"" >> stoney_graphics.inc
echo "arrival_n_lzsa: .incbin \"arrival_n.lzsa\"" >> stoney_graphics.inc
echo "arrival_s_lzsa: .incbin \"arrival_s.lzsa\"" >> stoney_graphics.inc
echo "arrival_e_lzsa: .incbin \"arrival_e.lzsa\"" >> stoney_graphics.inc
echo "arrival_w_lzsa: .incbin \"arrival_w.lzsa\"" >> stoney_graphics.inc
echo "umbrella_e_lzsa: .incbin \"umbrella_e.lzsa\"" >> stoney_graphics.inc
echo "umbrella_w_lzsa: .incbin \"umbrella_w.lzsa\"" >> stoney_graphics.inc
echo "umbrella_path_e_lzsa: .incbin \"umbrella_path_e.lzsa\"" >> stoney_graphics.inc
echo "umbrella_path_w_lzsa: .incbin \"umbrella_path_w.lzsa\"" >> stoney_graphics.inc
%.gr: %.png
$(PNG2GR) $< $@

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1015 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 897 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 952 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 832 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 962 B

View File

@ -5,7 +5,8 @@
locations:
.word location0, location1, location2, location3
.word location4
.word location4, location5, location6, location7
.word location8, location9
; STONEY_SHIP_STERN -- back of the ship
location0:
@ -85,8 +86,7 @@ location3:
; STONEY_SHIP_CHAIR -- chair in the cabin
location4:
.byte STONEY_SHIP_STERN ; north exit
; .byte STONEY_SHIP_BOOK_CLOSED ; south exit
.byte $ff
.byte STONEY_SHIP_BOOK_CLOSED ; south exit
.byte $ff ; east exit
.byte $ff ; west exit
.byte DIRECTION_N ; north exit_dir
@ -99,3 +99,93 @@ location4:
.word $0000 ; west bg
.byte BG_SOUTH|BG_NORTH
.byte $ff ; special exit
; STONEY_SHIP_BOOK_CLOSED -- stoney linking book, closed
location5:
.byte $ff ; north exit
.byte STONEY_SHIP_BOOK_OPEN ; south exit
.byte $ff ; east exit
.byte $ff ; west exit
.byte $ff ; north exit_dir
.byte DIRECTION_S ; south exit_dir
.byte $ff ; east exit_dir
.byte $ff ; west exit_dir
.word $0000 ; north bg
.word book_chair_closed_s_lzsa ; south bg
.word $0000 ; east bg
.word $0000 ; west bg
.byte BG_SOUTH
.byte $ff ; special exit
; STONEY_SHIP_BOOK_OPEN -- stoney linking book, open
location6:
.byte $ff ; north exit
.byte STONEY_SHIP_CHAIR ; south exit
.byte $ff ; east exit
.byte $ff ; west exit
.byte $ff ; north exit_dir
.byte DIRECTION_S ; south exit_dir
.byte $ff ; east exit_dir
.byte $ff ; west exit_dir
.word $0000 ; north bg
.word book_chair_open_s_lzsa ; south bg
.word $0000 ; east bg
.word $0000 ; west bg
.byte BG_SOUTH
.byte DIRECTION_S ; special exit
.byte 21,31 ; special x
.byte 10,24 ; special y
.word stoney_link_book-1
; STONEY_ARRIVAL -- arrival at stoneship
location7:
.byte $ff ; north exit
.byte $ff ; south exit
.byte $ff ; east exit
.byte $ff ; west exit
.byte $ff ; north exit_dir
.byte $ff ; south exit_dir
.byte $ff ; east exit_dir
.byte $ff ; west exit_dir
.word arrival_n_lzsa ; north bg
.word arrival_s_lzsa ; south bg
.word arrival_e_lzsa ; east bg
.word arrival_w_lzsa ; west bg
.byte BG_NORTH|BG_SOUTH|BG_EAST|BG_WEST
.byte $ff
; STONEY_UMBRELLA_PATH -- umbrella path
location8:
.byte $ff ; north exit
.byte $ff ; south exit
.byte STONEY_ARRIVAL ; east exit
.byte STONEY_UMBRELLA ; west exit
.byte $ff ; north exit_dir
.byte $ff ; south exit_dir
.byte DIRECTION_E ; east exit_dir
.byte DIRECTION_W ; west exit_dir
.word $0000 ; north bg
.word $0000 ; south bg
.word umbrella_path_e_lzsa ; east bg
.word umbrella_path_w_lzsa ; west bg
.byte BG_EAST|BG_WEST
.byte $ff
; STONEY_UMBRELLA -- umbrella switch
location9:
.byte $ff ; north exit
.byte $ff ; south exit
.byte STONEY_UMBRELLA_PATH ; east exit
.byte $ff ; west exit
.byte $ff ; north exit_dir
.byte $ff ; south exit_dir
.byte DIRECTION_E ; east exit_dir
.byte $ff ; west exit_dir
.word $0000 ; north bg
.word $0000 ; south bg
.word umbrella_e_lzsa ; east bg
.word umbrella_w_lzsa ; west bg
.byte BG_EAST|BG_WEST
.byte $ff

154
mist/link_book_stoney.s Normal file
View File

@ -0,0 +1,154 @@
;=============================
; stoney_link_book
;=============================
stoney_link_book:
; clear screen
lda #0
sta clear_all_color+1
jsr clear_all
jsr page_flip
jsr clear_all
jsr page_flip
;====================================
; load linking audio (12k) to $9000
lda #<linking_filename
sta OUTL
lda #>linking_filename
sta OUTH
jsr opendir_filename
; play sound effect?
lda #<linking_noise
sta BTC_L
lda #>linking_noise
sta BTC_H
ldx #LINKING_NOISE_LENGTH ; 45 pages long???
jsr play_audio
lda #STONEY_ARRIVAL
sta LOCATION
lda #DIRECTION_N
sta DIRECTION
jsr change_location
rts
stoney_movie:
.word stoney_sprite0,stoney_sprite1,stoney_sprite2
.word stoney_sprite3,stoney_sprite4,stoney_sprite5
.word stoney_sprite6,stoney_sprite7,stoney_sprite8
.word stoney_sprite9,stoney_sprite10
stoney_sprite0:
.byte 9,6
.byte $77,$77,$77,$7f,$77,$55,$77,$7f,$77
.byte $77,$77,$77,$77,$57,$55,$57,$75,$77
.byte $77,$ff,$55,$f7,$5f,$55,$ff,$ff,$57
.byte $57,$ff,$55,$ff,$ff,$55,$55,$ff,$55
.byte $55,$7f,$75,$77,$77,$55,$77,$77,$55
.byte $55,$77,$77,$57,$57,$55,$77,$77,$75
stoney_sprite1:
.byte 9,6
.byte $77,$78,$88,$87,$88,$87,$78,$77,$77
.byte $77,$77,$77,$78,$88,$87,$88,$78,$77
.byte $55,$87,$88,$f8,$88,$88,$8f,$55,$ff
.byte $55,$f8,$58,$ff,$88,$88,$f8,$58,$ff
.byte $55,$7f,$55,$88,$55,$88,$7f,$55,$7f
.byte $55,$77,$77,$88,$55,$78,$77,$77,$77
stoney_sprite2:
.byte 9,6
.byte $87,$88,$87,$87,$87,$87,$87,$87,$87
.byte $88,$88,$77,$78,$78,$88,$88,$78,$77
.byte $8f,$88,$88,$8f,$ff,$55,$ff,$55,$ff
.byte $58,$88,$ff,$58,$88,$85,$ff,$55,$ff
.byte $55,$88,$8f,$55,$78,$88,$8f,$55,$7f
.byte $55,$88,$88,$55,$77,$78,$78,$55,$77
stoney_sprite3:
.byte 9,6
.byte $87,$77,$77,$77,$77,$77,$77,$55,$55
.byte $88,$88,$88,$87,$87,$77,$77,$55,$55
.byte $ff,$58,$88,$88,$88,$88,$8f,$85,$ff
.byte $ff,$55,$ff,$58,$88,$88,$88,$88,$f8
.byte $88,$55,$77,$55,$77,$78,$78,$55,$77
.byte $88,$85,$77,$55,$77,$77,$77,$55,$77
stoney_sprite4:
.byte 9,6
.byte $78,$78,$78,$78,$78,$88,$88,$88,$88
.byte $78,$58,$78,$58,$78,$58,$78,$58,$58
.byte $ff,$55,$ff,$55,$ff,$55,$ff,$ff,$55
.byte $ff,$55,$f5,$55,$ff,$55,$ff,$ff,$55
.byte $7f,$55,$7f,$55,$7f,$55,$7f,$7f,$55
.byte $77,$55,$77,$55,$77,$55,$77,$77,$55
stoney_sprite5:
.byte 9,6
.byte $55,$55,$00,$00,$05,$50,$55,$00,$00
.byte $05,$05,$05,$00,$50,$05,$55,$00,$70
.byte $50,$00,$55,$00,$55,$ff,$55,$00,$ff
.byte $55,$00,$55,$00,$55,$ff,$55,$00,$ff
.byte $55,$00,$55,$00,$55,$77,$55,$00,$77
.byte $55,$00,$55,$00,$55,$77,$55,$00,$77
stoney_sprite6:
.byte 9,6
.byte $00,$00,$00,$50,$00,$00,$00,$00,$00
.byte $00,$00,$00,$05,$00,$55,$00,$00,$00
.byte $50,$00,$00,$00,$00,$f5,$55,$00,$00
.byte $55,$ff,$55,$f0,$00,$ff,$55,$ff,$00
.byte $55,$7f,$55,$7f,$00,$7f,$55,$ff,$00
.byte $55,$77,$55,$77,$00,$77,$55,$77,$00
stoney_sprite7:
.byte 9,6
.byte $55,$75,$00,$50,$00,$00,$55,$00,$00
.byte $88,$87,$00,$55,$77,$57,$55,$00,$87
.byte $88,$88,$00,$75,$77,$57,$55,$00,$88
.byte $08,$58,$00,$78,$57,$87,$85,$80,$58
.byte $77,$50,$00,$70,$55,$77,$55,$00,$88
.byte $77,$55,$00,$77,$55,$77,$55,$00,$88
stoney_sprite8:
.byte 9,6
.byte $88,$8f,$8f,$8f,$ff,$00,$00,$ff,$ff
.byte $88,$88,$ff,$55,$0f,$00,$00,$00,$ff
.byte $88,$88,$5f,$55,$5f,$00,$ff,$f0,$f0
.byte $88,$88,$ff,$55,$ff,$00,$ff,$55,$ff
.byte $88,$88,$7f,$55,$7f,$00,$7f,$55,$ff
.byte $88,$88,$87,$85,$77,$00,$77,$55,$77
stoney_sprite9:
.byte 9,6
.byte $00,$05,$55,$00,$05,$00,$55,$00,$00
.byte $00,$55,$55,$ff,$55,$00,$55,$55,$00
.byte $00,$f0,$00,$ff,$55,$00,$55,$55,$00
.byte $00,$05,$00,$05,$55,$00,$f5,$f5,$00
.byte $00,$7f,$00,$ff,$55,$00,$ff,$ff,$00
.byte $00,$77,$00,$77,$55,$00,$77,$77,$00
stoney_sprite10:
.byte 9,6
.byte $88,$55,$88,$55,$00,$88,$77,$77,$77
.byte $88,$55,$88,$55,$00,$88,$77,$77,$77
.byte $88,$55,$88,$55,$00,$88,$77,$77,$77
.byte $68,$66,$88,$26,$00,$88,$66,$66,$66
.byte $26,$62,$68,$66,$00,$68,$66,$66,$66
.byte $66,$62,$26,$26,$00,$66,$66,$66,$66
linking_filename:
.byte "LINK_NOISE.BTC",0

View File

@ -63,7 +63,41 @@ game_loop:
;====================================
lda LOCATION
; cmp #MECHE_OPEN_BOOK
cmp #STONEY_SHIP_BOOK_OPEN
beq animate_stoney_book
jmp nothing_special
animate_stoney_book:
; handle animated linking book
lda ANIMATE_FRAME
asl
tay
lda stoney_movie,Y
sta INL
lda stoney_movie+1,Y
sta INH
lda #22
sta XPOS
lda #12
sta YPOS
jsr put_sprite_crop
lda FRAMEL
and #$f
bne done_animate_book
inc ANIMATE_FRAME
lda ANIMATE_FRAME
cmp #11
bne done_animate_book
lda #0
sta ANIMATE_FRAME
done_animate_book:
jmp nothing_special
nothing_special:
@ -140,9 +174,15 @@ back_to_mist:
.include "draw_pointer.s"
.include "end_level.s"
.include "audio.s"
.include "graphics_stoney/stoney_graphics.inc"
; linking books
.include "link_book_stoney.s"
; puzzles
.include "common_sprites.inc"