mist: hook up generator level

can now enter/leave as before

also tested the breakers still work
This commit is contained in:
Vince Weaver 2020-07-08 14:43:54 -04:00
parent 40e301a21a
commit 7b66b203c2
6 changed files with 69 additions and 18 deletions

View File

@ -69,6 +69,7 @@ game_loop:
;==================================== ;====================================
; handle generator puzzle ; handle generator puzzle
lda LOCATION
location_generator: location_generator:
cmp #GEN_GENERATOR_ROOM cmp #GEN_GENERATOR_ROOM
bne nothing_special bne nothing_special

View File

@ -1,3 +1,7 @@
;====================================
; Routines for the generator puzzles
;====================================
leave_tower1: leave_tower1:
lda #GEN_TOWER1_TOP lda #GEN_TOWER1_TOP
sta LOCATION sta LOCATION
@ -9,7 +13,20 @@ leave_tower1:
rts rts
back_to_mist:
lda #MIST_TREE_CORRIDOR_4
sta LOCATION
lda #DIRECTION_E
sta DIRECTION
lda #LOAD_MIST
sta WHICH_LOAD
lda #$ff
sta LEVEL_OVER
rts
;======================= ;=======================

View File

@ -23,7 +23,11 @@ location0:
.word green_house_e_lzsa ; east bg .word green_house_e_lzsa ; east bg
.word green_house_w_lzsa ; west bg .word green_house_w_lzsa ; west bg
.byte BG_EAST | BG_WEST .byte BG_EAST | BG_WEST
.byte $ff .byte DIRECTION_E ; special exit
.byte 9,29 ; special x
.byte 2,46 ; special y
.word back_to_mist-1 ; special function
; GEN_GREEN_STEPS1 -- green shack steps 1 ; GEN_GREEN_STEPS1 -- green shack steps 1
location1: location1:
@ -61,11 +65,11 @@ location2:
; GEN_GENERATOR_DOOR -- generator room door ; GEN_GENERATOR_DOOR -- generator room door
location3: location3:
.byte GEN_GENERATOR_DOOR ; north exit .byte $ff ; north exit
.byte GEN_GREEN_STEPS6 ; south exit .byte GEN_GREEN_STEPS6 ; south exit
.byte $ff ; east exit .byte $ff ; east exit
.byte $ff ; west exit .byte $ff ; west exit
.byte DIRECTION_S ; north exit_dir .byte $ff ; north exit_dir
.byte DIRECTION_W ; south exit_dir .byte DIRECTION_W ; south exit_dir
.byte $ff ; east exit_dir .byte $ff ; east exit_dir
.byte $ff ; west exit_dir .byte $ff ; west exit_dir
@ -115,7 +119,10 @@ location5:
.word tower1_trail_e_lzsa ; east bg .word tower1_trail_e_lzsa ; east bg
.word tower1_trail_w_lzsa ; west bg .word tower1_trail_w_lzsa ; west bg
.byte BG_WEST|BG_EAST .byte BG_WEST|BG_EAST
.byte $ff .byte DIRECTION_E ; special exit
.byte 9,29 ; special x
.byte 2,46 ; special y
.word back_to_mist-1 ; special function
; GEN_TOWER1_TRAIL2 -- tower1 trail2 ; GEN_TOWER1_TRAIL2 -- tower1 trail2
location6: location6:

View File

@ -384,9 +384,9 @@ location19:
.word tree4_w_lzsa ; west bg .word tree4_w_lzsa ; west bg
.byte BG_NORTH|BG_SOUTH|BG_WEST|BG_EAST .byte BG_NORTH|BG_SOUTH|BG_WEST|BG_EAST
.byte DIRECTION_W ; special exit .byte DIRECTION_W ; special exit
.byte 6,28 ; special x .byte 6,34 ; special x
.byte 0,46 ; special y .byte 0,46 ; special y
.word green_house-1 ; special function .word go_to_generator-1 ; special function
; MIST_TREE_CORRIDOR_1 ; MIST_TREE_CORRIDOR_1
location20: location20:

View File

@ -177,17 +177,6 @@ leave_tower2:
rts rts
green_house:
; FIXME: handle switch separately
; lda #MIST_GREEN_SHACK
; sta LOCATION
jmp change_location
goto_dentist_steps: goto_dentist_steps:
lda #MIST_STEPS_DENTIST lda #MIST_STEPS_DENTIST

View File

@ -72,10 +72,46 @@ done_ss_door:
;====================== ;======================
; go to selena ; go to selena
;======================
go_to_selena: go_to_selena:
lda #3 ; Selena lda #LOAD_SELENA ; Selena
sta WHICH_LOAD
lda #$ff
sta LEVEL_OVER
rts
;======================
; go to generator
;======================
go_to_generator:
lda CURSOR_X
cmp #27
bcs goto_tower
cmp #13
bcs goto_shack
marker_switch:
; FIXME
rts
goto_shack:
lda #GEN_GREEN_SHACK
jmp into_generator
goto_tower:
lda #GEN_TOWER1_TRAIL
into_generator:
sta LOCATION
lda #LOAD_GENERATOR ; Selena
sta WHICH_LOAD sta WHICH_LOAD
lda #$ff lda #$ff
@ -87,3 +123,4 @@ go_to_selena: