mist: can freely move back and forth between mist and selena

This commit is contained in:
Vince Weaver 2020-03-17 14:31:57 -04:00
parent c2264c49ce
commit 2bd69a71f0
7 changed files with 87 additions and 19 deletions

View File

@ -1,7 +1,7 @@
Selena:
+ turn around?
+ re-try scenery
+ whole way to tower thing
+ save/restore rocket switch positions to zero page on entry/exit?
main:
+ leave at angle
@ -90,7 +90,6 @@ MECHE age:
SELENA age:
+ optional mockingboard sound for keyboard?
+ Linking book
+ Complicated age with sounds
+ That whole rediculous underground cart sequence

View File

@ -52,8 +52,10 @@ location0:
.word spaceship_inside_e_lzsa ; east bg
.word spaceship_inside_w_lzsa ; west bg
.byte BG_WEST | BG_EAST | BG_NORTH
.byte $ff ; special exit
.byte DIRECTION_N ; special exit
.byte 9,29 ; special x
.byte 2,46 ; special y
.word back_to_mist-1 ; special function
; controls
location1:

View File

@ -10,6 +10,9 @@ mist_link_book:
jsr clear_all
jsr page_flip
jsr clear_all
jsr page_flip
; play sound effect?
lda #<audio_link_noise

View File

@ -56,6 +56,12 @@ mist_start:
sta SWITCH_BOTTOM_ROW
sta ROCKET_HANDLE_STEP
sta ROCKET_NOTE1
sta ROCKET_NOTE2
sta ROCKET_NOTE3
sta ROCKET_NOTE4
; debug
; lda #1
; sta GEAR_OPEN

View File

@ -27,8 +27,9 @@ dome_press_second:
; disable the organ and controls
ldy #LOCATION_SPECIAL_EXIT
lda #$ff
sta location1,Y
sta location2,Y
sta location1,Y ; disable controls
sta location2,Y ; disable organ
sta location0,Y ; disable mist exit
; re-route door to selena
ldy #LOCATION_NORTH_EXIT
@ -44,7 +45,6 @@ dome_press_second:
lda #>spaceship_inside_selena_n_lzsa
sta location0+1,Y
; clear screen
lda #0
sta clear_all_color+1

View File

@ -30,8 +30,27 @@ selena_start:
;=================
; init vars
; FIXME: we could be re-called from other books
; so don't set location here
; copy in rocket note puzzle state
lda ROCKET_NOTE1
sta rocket_notes
lda ROCKET_NOTE2
sta rocket_notes+2
lda ROCKET_NOTE3
sta rocket_notes+4
lda ROCKET_NOTE4
sta rocket_notes+6
; hook up the special functions
; these might be disabled if we've been here before
ldy #LOCATION_SPECIAL_EXIT
lda #DIRECTION_E
sta location1,Y ; enable controls
lda #DIRECTION_W
sta location2,Y ; enable organ
lda #DIRECTION_N
sta location0,Y ; enable mist exit
lda #0
sta LOCATION
@ -217,6 +236,33 @@ really_exit:
jmp end_level
back_to_mist:
lda #$ff
sta LEVEL_OVER
lda #16 ; pathway outside rocket
sta LOCATION
lda #DIRECTION_E
sta DIRECTION
lda #LOAD_MIST
sta WHICH_LOAD
; save rocket state
lda rocket_notes
sta ROCKET_NOTE1
lda rocket_notes+2
sta ROCKET_NOTE2
lda rocket_notes+4
sta ROCKET_NOTE3
lda rocket_notes+6
sta ROCKET_NOTE4
rts
;==========================
; includes
;==========================

View File

@ -57,6 +57,9 @@ IN_RIGHT = $6D
BTC_L = $6E
BTC_H = $6F
; If we ever support save to disk, we'd have to save/restore
; the following values
HOLDING_PAGE = $80
CLOCK_BRIDGE = $81
GEAR_OPEN = $82
@ -76,17 +79,26 @@ CLOCK_TOP = $8F
CLOCK_MIDDLE = $90
CLOCK_BOTTOM = $91
CLOCK_LAST = $92
ANIMATE_FRAME = $93
LEVEL_OVER = $94
BREAKER_TRIPPED = $95
GENERATOR_VOLTS = $96
ROCKET_VOLTS = $97
SWITCH_TOP_ROW = $98
SWITCH_BOTTOM_ROW = $99
GENERATOR_VOLTS_DISP = $9A
ROCKET_VOLTS_DISP = $9B
ROCKET_HANDLE_STEP = $9C
BREAKER_TRIPPED = $93
GENERATOR_VOLTS = $94
ROCKET_VOLTS = $95
SWITCH_TOP_ROW = $96
SWITCH_BOTTOM_ROW = $97
GENERATOR_VOLTS_DISP = $98
ROCKET_VOLTS_DISP = $99
ROCKET_HANDLE_STEP = $9A
ROCKET_NOTE1 = $9B
ROCKET_NOTE2 = $9C
ROCKET_NOTE3 = $9D
ROCKET_NOTE4 = $9E
; done game puzzle state
ANIMATE_FRAME = $E0
LEVEL_OVER = $E1
DISP_PAGE = $ED ; ALL
DRAW_PAGE = $EE ; ALL