From 2e773c48d205c4efd5a682624dafaafeff919807 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Thu, 11 Jun 2020 02:39:38 -0400 Subject: [PATCH] mist: channelwood: hook up some of the switches --- mist/NOTES | 5 +++-- mist/channel.s | 17 +++++++++++++++++ mist/init_state.s | 1 + mist/leveldata_channel.inc | 15 ++++++++++++--- mist/zp.inc | 10 ++++++++++ 5 files changed, 43 insertions(+), 5 deletions(-) diff --git a/mist/NOTES b/mist/NOTES index d3b08218..954554d0 100644 --- a/mist/NOTES +++ b/mist/NOTES @@ -14,11 +14,12 @@ Selenetic Channelwood: -+ Pain drawing the water, and trees, and boardwalk. ++ Pain drawing the water, and trees, and boardwalk,rocks. + At least no bricks or checkered floor in this age. Thought was done with trees on Myst Each major junction a hexagon with potentially 6 backgrounds. Some of them you could split left or right mid screen. In end just did the three ways that didn't need this. Made it confusing to navigate at times, but I always felt this level was confusing to navigate anyway. - + diff --git a/mist/channel.s b/mist/channel.s index 3a68b89e..5546da30 100644 --- a/mist/channel.s +++ b/mist/channel.s @@ -142,6 +142,23 @@ really_exit: jmp end_level +look_at_faucet: + lda #CHANNEL_TANK_CLOSE + sta LOCATION + jmp change_location + +toggle_windmill: + lda CHANNEL_SWITCHES + eor #CHANNEL_SW_WINDMILL + sta CHANNEL_SWITCHES + rts + +toggle_faucet: + lda CHANNEL_SWITCHES + eor #CHANNEL_SW_FAUCET + sta CHANNEL_SWITCHES + rts + back_to_mist: diff --git a/mist/init_state.s b/mist/init_state.s index c494da88..88388ab6 100644 --- a/mist/init_state.s +++ b/mist/init_state.s @@ -59,6 +59,7 @@ init_state: sta BATTERY_CHARGE sta COMPASS_ANGLE sta CRANK_ANGLE + sta CHANNEL_SWITCHES lda #$ff ; for debugging sta MARKER_SWITCHES diff --git a/mist/leveldata_channel.inc b/mist/leveldata_channel.inc index a6508953..87e2d769 100644 --- a/mist/leveldata_channel.inc +++ b/mist/leveldata_channel.inc @@ -606,7 +606,10 @@ location33: .word $0000 ; east bg .word $0000 ; west bg .byte BG_NORTH|BG_SOUTH - .byte $ff + .byte DIRECTION_N ; special exit + .byte 25,32 ; special x + .byte 40,46 ; special y + .word look_at_faucet-1 ; special function ; CHANNEL_TANK_CLOSE -- the faucet location34: @@ -623,7 +626,10 @@ location34: .word $0000 ; east bg .word $0000 ; west bg .byte BG_NORTH - .byte $ff + .byte DIRECTION_N ; special exit + .byte 15,25 ; special x + .byte 18,32 ; special y + .word toggle_faucet-1 ; special function ; CHANNEL_WINDMILL -- windmill machinery location35: @@ -640,7 +646,10 @@ location35: .word $0000 ; east bg .word $0000 ; west bg .byte BG_NORTH|BG_SOUTH - .byte $ff + .byte DIRECTION_N ; special exit + .byte 10,15 ; special x + .byte 30,38 ; special y + .word toggle_windmill-1 ; special function ; CHANNEL_OUT_BACK -- back door of windmill location36: diff --git a/mist/zp.inc b/mist/zp.inc index 8aa63939..b38642bf 100644 --- a/mist/zp.inc +++ b/mist/zp.inc @@ -133,6 +133,16 @@ BATTERY_CHARGE = $AE COMPASS_ANGLE = $AF CRANK_ANGLE = $B0 WHITE_PAGE_TAKEN= $B1 +CHANNEL_SWITCHES= $B2 + CHANNEL_SW1 = $01 + CHANNEL_SW2 = $02 + CHANNEL_SW3 = $04 + CHANNEL_SW4 = $08 + CHANNEL_SW5 = $10 + CHANNEL_SW6 = $20 + CHANNEL_SW_WINDMILL = $40 + CHANNEL_SW_FAUCET = $80 + ; done game puzzle state