mist: can link back from selena to mist now

This commit is contained in:
Vince Weaver
2020-03-17 01:42:26 -04:00
parent 22099d061e
commit c2264c49ce
17 changed files with 279 additions and 30 deletions

View File

@@ -50,7 +50,7 @@ mist.o: mist.s zp.inc hardware.inc \
common_sprites.inc \ common_sprites.inc \
leveldata_mist.inc \ leveldata_mist.inc \
clock_bridge_puzzle.s clock_sprites.inc \ clock_bridge_puzzle.s clock_sprites.inc \
link_book_mist.s \ link_book_mist_dock.s \
letter_cat.s \ letter_cat.s \
marker_switch.s \ marker_switch.s \
brother_books.s \ brother_books.s \
@@ -71,6 +71,7 @@ meche.o: meche.s zp.inc hardware.inc \
common_sprites.inc \ common_sprites.inc \
leveldata_meche.inc \ leveldata_meche.inc \
link_book_meche.s \ link_book_meche.s \
link_book_mist.s \
keyboard.s \ keyboard.s \
draw_pointer.s \ draw_pointer.s \
gr_copy.s audio.s text_print.s decompress_fast_v2.s gr_copy.s audio.s text_print.s decompress_fast_v2.s
@@ -85,6 +86,8 @@ selena.o: selena.s zp.inc hardware.inc \
graphics_selena/selena_graphics.inc \ graphics_selena/selena_graphics.inc \
common_sprites.inc \ common_sprites.inc \
leveldata_selena.inc \ leveldata_selena.inc \
link_book_mist.s \
end_level.s \
keyboard.s \ keyboard.s \
draw_pointer.s \ draw_pointer.s \
speaker_beeps.s \ speaker_beeps.s \

View File

@@ -22,7 +22,8 @@ mist_graphics.inc: \
step_land3_w.lzsa step_land3_e.lzsa \ step_land3_w.lzsa step_land3_e.lzsa \
step_top_e.lzsa step_top_w.lzsa step_top_n.lzsa step_top_s.lzsa \ step_top_e.lzsa step_top_w.lzsa step_top_n.lzsa step_top_s.lzsa \
temple_door_n.lzsa temple_door_s.lzsa \ temple_door_n.lzsa temple_door_s.lzsa \
temple_center_n.lzsa temple_center_s.lzsa temple_center_e.lzsa temple_center_w.lzsa \ temple_center_n.lzsa temple_center_s.lzsa temple_center_e.lzsa \
temple_center_w.lzsa temple_center_up.lzsa \
red_book_shelf.lzsa \ red_book_shelf.lzsa \
red_book_closed.lzsa \ red_book_closed.lzsa \
pool_s.lzsa \ pool_s.lzsa \
@@ -83,6 +84,7 @@ mist_graphics.inc: \
echo "temple_center_s_lzsa: .incbin \"temple_center_s.lzsa\"" >> mist_graphics.inc echo "temple_center_s_lzsa: .incbin \"temple_center_s.lzsa\"" >> mist_graphics.inc
echo "temple_center_e_lzsa: .incbin \"temple_center_e.lzsa\"" >> mist_graphics.inc echo "temple_center_e_lzsa: .incbin \"temple_center_e.lzsa\"" >> mist_graphics.inc
echo "temple_center_w_lzsa: .incbin \"temple_center_w.lzsa\"" >> mist_graphics.inc echo "temple_center_w_lzsa: .incbin \"temple_center_w.lzsa\"" >> mist_graphics.inc
echo "temple_center_up_lzsa: .incbin \"temple_center_up.lzsa\"" >> mist_graphics.inc
echo "red_book_closed_lzsa: .incbin \"red_book_closed.lzsa\"" >> mist_graphics.inc echo "red_book_closed_lzsa: .incbin \"red_book_closed.lzsa\"" >> mist_graphics.inc
echo "red_book_shelf_lzsa: .incbin \"red_book_shelf.lzsa\"" >> mist_graphics.inc echo "red_book_shelf_lzsa: .incbin \"red_book_shelf.lzsa\"" >> mist_graphics.inc
echo "pool_s_lzsa: .incbin \"pool_s.lzsa\"" >> mist_graphics.inc echo "pool_s_lzsa: .incbin \"pool_s.lzsa\"" >> mist_graphics.inc

View File

@@ -30,6 +30,7 @@ temple_center_n_lzsa: .incbin "temple_center_n.lzsa"
temple_center_s_lzsa: .incbin "temple_center_s.lzsa" temple_center_s_lzsa: .incbin "temple_center_s.lzsa"
temple_center_e_lzsa: .incbin "temple_center_e.lzsa" temple_center_e_lzsa: .incbin "temple_center_e.lzsa"
temple_center_w_lzsa: .incbin "temple_center_w.lzsa" temple_center_w_lzsa: .incbin "temple_center_w.lzsa"
temple_center_up_lzsa: .incbin "temple_center_up.lzsa"
red_book_closed_lzsa: .incbin "red_book_closed.lzsa" red_book_closed_lzsa: .incbin "red_book_closed.lzsa"
red_book_shelf_lzsa: .incbin "red_book_shelf.lzsa" red_book_shelf_lzsa: .incbin "red_book_shelf.lzsa"
pool_s_lzsa: .incbin "pool_s.lzsa" pool_s_lzsa: .incbin "pool_s.lzsa"

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -17,7 +17,10 @@ selena_graphics.inc: \
walkway1_n.lzsa walkway1_s.lzsa \ walkway1_n.lzsa walkway1_s.lzsa \
spaceship_door_s.lzsa \ spaceship_door_s.lzsa \
walkway4_n.lzsa walkway4_s.lzsa \ walkway4_n.lzsa walkway4_s.lzsa \
bunker_n.lzsa bunker_s.lzsa bunker_e.lzsa bunker_n.lzsa bunker_s.lzsa bunker_e.lzsa \
subroom_s.lzsa \
book_table_s.lzsa \
book_mist_open_s.lzsa book_mist_closed_s.lzsa
echo "controls_e_lzsa: .incbin \"controls_e.lzsa\"" > selena_graphics.inc echo "controls_e_lzsa: .incbin \"controls_e.lzsa\"" > selena_graphics.inc
echo "organ_w_lzsa: .incbin \"organ_w.lzsa\"" >> selena_graphics.inc echo "organ_w_lzsa: .incbin \"organ_w.lzsa\"" >> selena_graphics.inc
echo "spaceship_inside_w_lzsa: .incbin \"spaceship_inside_w.lzsa\"" >> selena_graphics.inc echo "spaceship_inside_w_lzsa: .incbin \"spaceship_inside_w.lzsa\"" >> selena_graphics.inc
@@ -32,6 +35,10 @@ selena_graphics.inc: \
echo "bunker_n_lzsa: .incbin \"bunker_n.lzsa\"" >> selena_graphics.inc echo "bunker_n_lzsa: .incbin \"bunker_n.lzsa\"" >> selena_graphics.inc
echo "bunker_s_lzsa: .incbin \"bunker_s.lzsa\"" >> selena_graphics.inc echo "bunker_s_lzsa: .incbin \"bunker_s.lzsa\"" >> selena_graphics.inc
echo "bunker_e_lzsa: .incbin \"bunker_e.lzsa\"" >> selena_graphics.inc echo "bunker_e_lzsa: .incbin \"bunker_e.lzsa\"" >> selena_graphics.inc
echo "subroom_s_lzsa: .incbin \"subroom_s.lzsa\"" >> selena_graphics.inc
echo "book_table_s_lzsa: .incbin \"book_table_s.lzsa\"" >> selena_graphics.inc
echo "book_mist_open_s_lzsa: .incbin \"book_mist_open_s.lzsa\"" >> selena_graphics.inc
echo "book_mist_closed_s_lzsa: .incbin \"book_mist_closed_s.lzsa\"" >> selena_graphics.inc
%.gr: %.png %.gr: %.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1009 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -42,7 +42,7 @@ locations:
.word location24,location25,location26,location27 .word location24,location25,location26,location27
.word location28,location29,location30,location31 .word location28,location29,location30,location31
.word location32,location33,location34,location35 .word location32,location33,location34,location35
.word location36,location37,location38 .word location36,location37,location38,location39
; myst linking book ; myst linking book
location0: location0:
@@ -752,3 +752,20 @@ location38:
.byte 8,46 ; special y .byte 8,46 ; special y
.word open_ss_door-1 ; special function .word open_ss_door-1 ; special function
; ceiling of temple
location39:
.byte 12 ; north exit
.byte $ff ; south exit
.byte $ff ; east exit
.byte $ff ; west exit
.byte DIRECTION_N ; north exit_dir
.byte $ff ; south exit_dir
.byte $ff ; east exit_dir
.byte $ff ; west exit_dir
.word temple_center_up_lzsa ; north bg
.word $0000 ; south bg
.word $0000 ; east bg
.word $0000 ; west bg
.byte BG_NORTH
.byte $ff

View File

@@ -34,7 +34,8 @@ LOCATION_SPECIAL_FUNC=22 ; pointer-1 of function to call on click
locations: locations:
.word location0, location1, location2, location3 .word location0, location1, location2, location3
.word location4, location5, location6 .word location4, location5, location6, location7
.word location8, location9, location10
; Inside Ship ; Inside Ship
location0: location0:
@@ -151,11 +152,11 @@ location5:
location6: location6:
.byte $ff ; north exit .byte $ff ; north exit
.byte 5 ; south exit .byte 5 ; south exit
.byte $ff ; east exit .byte 7 ; east exit
.byte $ff ; west exit .byte $ff ; west exit
.byte $ff ; north exit_dir .byte $ff ; north exit_dir
.byte DIRECTION_S ; south exit_dir .byte DIRECTION_S ; south exit_dir
.byte $ff ; east exit_dir .byte DIRECTION_S ; east exit_dir
.byte $ff ; west exit_dir .byte $ff ; west exit_dir
.word bunker_n_lzsa ; north bg .word bunker_n_lzsa ; north bg
.word bunker_s_lzsa ; south bg .word bunker_s_lzsa ; south bg
@@ -164,4 +165,74 @@ location6:
.byte BG_NORTH|BG_SOUTH|BG_EAST .byte BG_NORTH|BG_SOUTH|BG_EAST
.byte $ff .byte $ff
; sub room
location7:
.byte $ff ; north exit
.byte 8 ; 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 subroom_s_lzsa ; south bg
.word $0000 ; east bg
.word $0000 ; west bg
.byte BG_SOUTH
.byte $ff
; book room
location8:
.byte $ff ; north exit
.byte 9 ; 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_table_s_lzsa ; south bg
.word $0000 ; east bg
.word $0000 ; west bg
.byte BG_SOUTH
.byte $ff
; book
location9:
.byte $ff ; north exit
.byte 10 ; 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_mist_closed_s_lzsa ; south bg
.word $0000 ; east bg
.word $0000 ; west bg
.byte BG_SOUTH
.byte $ff
; mist book open
location10:
.byte $ff ; north exit
.byte 8 ; 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_mist_open_s_lzsa ; south bg
.word $0000 ; east bg
.word $0000 ; west bg
.byte BG_SOUTH
.byte DIRECTION_S
.byte 24,32 ; special x
.byte 12,22 ; special y
.word mist_link_book-1 ; special function

View File

@@ -1,19 +1,93 @@
;============================= ;======================================
; mist_link_book ; mist link book to the octogon temple
;============================= ;======================================
mist_link_book: mist_link_book:
; clear screen
lda #0
sta clear_all_color+1
jsr clear_all
jsr page_flip
; play sound effect? ; play sound effect?
.if 0
lda #<audio_link_noise lda #<audio_link_noise
sta BTC_L sta BTC_L
lda #>audio_link_noise lda #>audio_link_noise
sta BTC_H sta BTC_H
ldx #43 ; 45 pages long??? ldx #43 ; 45 pages long???
jsr play_audio jsr play_audio
.endif
lda #1 lda #39
sta LOCATION sta LOCATION
jsr change_location lda #DIRECTION_N
sta DIRECTION
lda #LOAD_MIST ; return to MIST
sta WHICH_LOAD
lda #$ff
sta LEVEL_OVER
rts rts
mist_movie:
.word ceiling_sprite0,ceiling_sprite1,ceiling_sprite2
.word ceiling_sprite3,ceiling_sprite4,ceiling_sprite5
; probably should have 6 more
ceiling_sprite0:
.byte 9,6
.byte $88,$88,$22,$75,$75,$75,$22,$88,$88
.byte $88,$22,$27,$02,$f2,$02,$27,$22,$88
.byte $28,$22,$0f,$02,$00,$0f,$02,$55,$22
.byte $22,$ff,$22,$02,$20,$02,$22,$55,$22
.byte $88,$22,$2f,$f2,$f2,$f2,$52,$22,$88
.byte $88,$88,$22,$2f,$2f,$22,$25,$88,$88
ceiling_sprite1:
.byte 9,6
.byte $88,$88,$52,$22,$75,$75,$25,$88,$88
.byte $88,$25,$22,$f2,$00,$f2,$27,$72,$88
.byte $28,$ff,$20,$02,$00,$0f,$f0,$27,$22
.byte $22,$ff,$20,$22,$00,$ff,$20,$52,$22
.byte $88,$22,$2f,$ff,$f0,$22,$52,$55,$88
.byte $88,$88,$22,$52,$52,$52,$25,$88,$88
ceiling_sprite2:
.byte 9,6
.byte $88,$88,$22,$25,$25,$22,$22,$88,$88
.byte $88,$22,$ff,$02,$2f,$02,$27,$72,$88
.byte $28,$22,$0f,$02,$00,$0f,$0f,$77,$22
.byte $22,$22,$ff,$02,$20,$0f,$2f,$77,$22
.byte $88,$52,$22,$2f,$22,$22,$27,$22,$88
.byte $88,$88,$25,$22,$55,$55,$25,$88,$88
ceiling_sprite3:
.byte 9,6
.byte $88,$88,$22,$ff,$22,$22,$25,$88,$88
.byte $88,$22,$ff,$2f,$00,$ff,$22,$22,$88
.byte $28,$22,$f0,$02,$00,$02,$f0,$77,$22
.byte $55,$22,$f0,$0f,$00,$ff,$20,$77,$22
.byte $88,$55,$22,$22,$20,$22,$75,$57,$88
.byte $88,$88,$25,$52,$52,$52,$22,$88,$88
ceiling_sprite4:
.byte 9,6
.byte $88,$88,$22,$f2,$2f,$22,$22,$88,$88
.byte $88,$22,$ff,$02,$22,$02,$22,$22,$88
.byte $58,$f5,$0f,$02,$00,$02,$0f,$72,$22
.byte $55,$22,$22,$02,$f0,$02,$2f,$77,$22
.byte $88,$52,$22,$22,$2f,$22,$77,$22,$88
.byte $88,$88,$55,$52,$52,$27,$22,$88,$88
ceiling_sprite5:
.byte 9,6
.byte $88,$88,$72,$27,$f2,$d2,$22,$88,$88
.byte $88,$55,$f2,$2f,$00,$22,$2f,$22,$88
.byte $28,$f2,$20,$02,$00,$02,$f0,$55,$22
.byte $55,$22,$20,$f2,$00,$f2,$20,$25,$22
.byte $88,$55,$22,$2f,$20,$72,$27,$22,$88
.byte $88,$88,$55,$27,$27,$52,$52,$88,$88

View File

@@ -0,0 +1,19 @@
;=============================
; mist_link_book
;=============================
mist_link_book:
; play sound effect?
.if 0
lda #<audio_link_noise
sta BTC_L
lda #>audio_link_noise
sta BTC_H
ldx #43 ; 45 pages long???
jsr play_audio
.endif
lda #1
sta LOCATION
jsr change_location
rts

View File

@@ -32,27 +32,19 @@ mist_start:
sta CURSOR_X sta CURSOR_X
sta CURSOR_Y sta CURSOR_Y
;=================
; init vars
; FIXME: we could be re-called from other books
; so don't set location here
lda #0
sta LOCATION
lda #0
sta DIRECTION
lda LOCATION lda LOCATION
bne not_first_time bne not_first_time
; first time init ; first time init
lda #0 lda #0
sta CLOCK_MINUTE sta CLOCK_MINUTE
sta CLOCK_HOUR sta CLOCK_HOUR
jsr clock_inside_reset jsr clock_inside_reset
lda #0 lda #0
sta DIRECTION
sta GEAR_OPEN sta GEAR_OPEN
sta BREAKER_TRIPPED sta BREAKER_TRIPPED
@@ -182,7 +174,7 @@ really_exit:
go_to_meche: go_to_meche:
lda #2 lda #LOAD_MECHE
sta WHICH_LOAD sta WHICH_LOAD
lda #$ff lda #$ff
@@ -220,7 +212,7 @@ go_to_meche:
; linking books ; linking books
.include "link_book_mist.s" .include "link_book_mist_dock.s"
; letters ; letters

View File

@@ -44,8 +44,10 @@ keyloop:
bit KEYRESET bit KEYRESET
lda #1 ; load mist lda #0
sta 5 sta LOCATION ; start at first room
lda #LOAD_MIST ; load mist
sta WHICH_LOAD
rts rts

View File

@@ -35,6 +35,8 @@ selena_start:
lda #0 lda #0
sta LOCATION sta LOCATION
sta LEVEL_OVER
lda #DIRECTION_E lda #DIRECTION_E
sta DIRECTION sta DIRECTION
@@ -78,7 +80,49 @@ game_loop:
lda LOCATION lda LOCATION
cmp #1 cmp #1
bne nothing_special beq controls_animation
cmp #10
beq mist_book_animation
jmp nothing_special
mist_book_animation:
; handle animated linking 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
controls_animation:
ldy #LOCATION_SPECIAL_EXIT ldy #LOCATION_SPECIAL_EXIT
lda location1,Y lda location1,Y
@@ -161,8 +205,17 @@ nothing_special:
inc FRAMEH inc FRAMEH
room_frame_no_oflo: room_frame_no_oflo:
;====================================
; check level over
;====================================
lda LEVEL_OVER
bne really_exit
jmp game_loop jmp game_loop
really_exit:
jmp end_level
;========================== ;==========================
; includes ; includes
@@ -177,6 +230,7 @@ room_frame_no_oflo:
.include "decompress_fast_v2.s" .include "decompress_fast_v2.s"
.include "keyboard.s" .include "keyboard.s"
.include "draw_pointer.s" .include "draw_pointer.s"
.include "end_level.s"
.include "audio.s" .include "audio.s"
@@ -189,6 +243,8 @@ room_frame_no_oflo:
; linking books ; linking books
.include "link_book_mist.s"
.include "common_sprites.inc" .include "common_sprites.inc"
.include "leveldata_selena.inc" .include "leveldata_selena.inc"

View File

@@ -4,6 +4,11 @@
NIBCOUNT = $00 NIBCOUNT = $00
WHICH_LOAD = $05 WHICH_LOAD = $05
LOAD_TITLE = $0
LOAD_MIST = $1
LOAD_MECHE = $2
LOAD_SELENA = $3
;; Zero page monitor routines addresses ;; Zero page monitor routines addresses
WNDLFT = $20 WNDLFT = $20