mist: cabin: can get to safe now

This commit is contained in:
Vince Weaver 2020-07-13 23:53:08 -04:00
parent 5a4fd6ccaf
commit 7bc824067a
4 changed files with 33 additions and 7 deletions

View File

@ -275,7 +275,8 @@ cabin.o: cabin.s zp.inc hardware.inc common_defines.inc \
keyboard.s \
draw_pointer.s \
link_book_channel.s \
marker_switch.s
marker_switch.s \
cabin_boiler_puzzle.s
ca65 -o cabin.o cabin.s -l cabin.lst

View File

@ -199,7 +199,18 @@ marker_switch:
enter_cabin:
lda #DIRECTION_E
sta DIRECTION
lda LOCATION
cmp #CABIN_OPEN
bne open_the_door
lda #CABIN_ENTRANCE
bne done_enter_cabin ; bra
open_the_door:
lda #CABIN_OPEN
done_enter_cabin:
sta LOCATION
jmp change_location
@ -234,6 +245,7 @@ exit_to_mist:
; puzzles
.include "marker_switch.s"
.include "cabin_boiler_puzzle.s"
; level data
.include "leveldata_cabin.inc"

View File

@ -0,0 +1,6 @@
; this is a painful one
goto_safe:
lda #CABIN_SAFE
sta LOCATION
jmp change_location

View File

@ -53,17 +53,20 @@ location2:
.byte $ff ; north exit
.byte $ff ; south exit
.byte CABIN_INSIDE ; east exit
.byte $ff ; west exit
.byte CABIN_OUTSIDE ; west exit
.byte $ff ; north exit_dir
.byte $ff ; south exit_dir
.byte DIRECTION_E ; east exit_dir
.byte $ff ; west exit_dir
.byte DIRECTION_W ; west exit_dir
.word $0000 ; north bg
.word $0000 ; south bg
.word boiler_room_e_lzsa ; east bg
.word $0000 ; west bg
.byte BG_EAST
.byte $ff
.word boiler_w_lzsa ; west bg
.byte BG_EAST|BG_WEST
.byte DIRECTION_W ; special exit
.byte 28,36 ; special x
.byte 16,32 ; special y
.word goto_safe-1
; CABIN_INSIDE -- inside the cabin
@ -81,7 +84,11 @@ location3:
.word boiler_e_lzsa ; east bg
.word boiler_w_lzsa ; west bg
.byte BG_EAST|BG_WEST
.byte $ff
.byte DIRECTION_W ; special exit
.byte 28,36 ; special x
.byte 16,32 ; special y
.word goto_safe-1
; CABIN_SAFE -- looking at safe
location4: