mist: channel: reset some state at begin of level

do it in linking book so going to trees doesn't do it
This commit is contained in:
Vince Weaver
2020-07-27 14:16:55 -04:00
parent 82a30d20fd
commit 787ddcd905
4 changed files with 21 additions and 6 deletions

View File

@@ -52,11 +52,13 @@ channel_start:
; reset elevators and bridges at start
; actual game does this too?
; do this in the linking book otherwise this happens
; when we take the elevator back down
lda CHANNEL_SWITCHES
; hack to avoid "RANGE ERROR" on some versions of ca65
and #<(~(CHANNEL_BRIDGE_UP|CHANNEL_PIPE_EXTENDED|CHANNEL_BOOK_ELEVATOR_UP))
sta CHANNEL_SWITCHES
; lda CHANNEL_SWITCHES
; ; hack to avoid "RANGE ERROR" on some versions of ca65
; and #<(~(CHANNEL_BRIDGE_UP|CHANNEL_PIPE_EXTENDED|CHANNEL_BOOK_ELEVATOR_UP))
; sta CHANNEL_SWITCHES
; set up bridges

View File

@@ -5,7 +5,7 @@
draw_windmill_handle:
lda DIRECTION
and #$f
cmp DIRECTION_N
cmp #DIRECTION_N
bne no_draw_windmill_handle
lda CHANNEL_SWITCHES

View File

@@ -149,7 +149,7 @@ location7:
.byte $ff ; west exit
.byte DIRECTION_N ; north exit_dir
.byte $ff ; south exit_dir
.byte DIRECTION_E|DIRECTION_SPLIT ; east exit_dir
.byte DIRECTION_E ; east exit_dir
.byte $ff ; west exit_dir
.word blue_house_n_lzsa ; north bg
.word blue_house_s_lzsa ; south bg

View File

@@ -13,6 +13,19 @@ channel_link_book:
jsr clear_all
jsr page_flip
;====================================
; reset parts of level
;
; actual game does this? turns off water
; make sure elevator1 is at ground level
; book elevator at ground level
lda CHANNEL_SWITCHES
and #$6b ; reset water faucet, elev1 down
; book elevator down
sta CHANNEL_SWITCHES
;====================================
; play link noise