mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-01-31 03:32:59 +00:00
mist: channelwood: hook up first valve
This commit is contained in:
parent
e61d63c167
commit
48384448e1
@ -1,3 +1,83 @@
|
||||
;===========================
|
||||
;===========================
|
||||
; handle valve 1 (elevator2)
|
||||
;===========================
|
||||
;===========================
|
||||
handle_valve1:
|
||||
|
||||
lda CHANNEL_VALVES
|
||||
eor #CHANNEL_VALVE1
|
||||
sta CHANNEL_VALVES
|
||||
|
||||
jsr adjust_valve_backgrounds
|
||||
|
||||
jsr change_direction ; update background
|
||||
|
||||
rts
|
||||
|
||||
;===========================
|
||||
;===========================
|
||||
; goto valve1
|
||||
;===========================
|
||||
;===========================
|
||||
goto_valve1:
|
||||
|
||||
lda #CHANNEL_VALVE1_ELEVATOR2
|
||||
sta LOCATION
|
||||
|
||||
jmp change_location
|
||||
|
||||
|
||||
;===========================
|
||||
;===========================
|
||||
; adjust valve backgrounds
|
||||
;===========================
|
||||
;===========================
|
||||
adjust_valve_backgrounds:
|
||||
|
||||
;=======================
|
||||
; for valve1
|
||||
|
||||
check_valve1:
|
||||
lda CHANNEL_VALVES
|
||||
and #CHANNEL_VALVE1
|
||||
beq valve1_is_off
|
||||
|
||||
valve1_is_on:
|
||||
ldy #LOCATION_NORTH_BG
|
||||
lda #<valve_bottom_on_lzsa
|
||||
sta location38,Y ; CHANNEL_VALVE1_ELEVATOR2
|
||||
lda #>valve_bottom_on_lzsa
|
||||
sta location38+1,Y ; CHANNEL_VALVE1_ELEVATOR2
|
||||
|
||||
ldy #LOCATION_SOUTH_BG
|
||||
lda #<valve_top_on_lzsa
|
||||
sta location38,Y ; CHANNEL_VALVE1_ELEVATOR2
|
||||
lda #>valve_top_on_lzsa
|
||||
sta location38+1,Y ; CHANNEL_VALVE1_ELEVATOR2
|
||||
|
||||
jmp check_valve2
|
||||
|
||||
valve1_is_off:
|
||||
ldy #LOCATION_NORTH_BG
|
||||
lda #<valve_bottom_off_lzsa
|
||||
sta location38,Y ; CHANNEL_VALVE1_ELEVATOR2
|
||||
lda #>valve_bottom_off_lzsa
|
||||
sta location38+1,Y ; CHANNEL_VALVE1_ELEVATOR2
|
||||
|
||||
ldy #LOCATION_SOUTH_BG
|
||||
lda #<valve_top_off_lzsa
|
||||
sta location38,Y ; CHANNEL_VALVE1_ELEVATOR2
|
||||
lda #>valve_top_off_lzsa
|
||||
sta location38+1,Y ; CHANNEL_VALVE1_ELEVATOR2
|
||||
|
||||
|
||||
check_valve2:
|
||||
|
||||
|
||||
rts
|
||||
|
||||
|
||||
;===========================
|
||||
;===========================
|
||||
; pick up myst linking book
|
||||
@ -233,6 +313,7 @@ no_extend_pipe:
|
||||
; should call this when entering level
|
||||
adjust_after_changes:
|
||||
|
||||
jsr adjust_valve_backgrounds
|
||||
|
||||
adjust_bridge:
|
||||
;=======================
|
||||
|
@ -360,6 +360,13 @@ CHANNEL_BOOK_CLOSED = 34
|
||||
CHANNEL_BOOK_OPEN = 35
|
||||
CHANNEL_ELEV1_OPEN = 36
|
||||
CHANNEL_IN_ELEV1_CLOSED = 37
|
||||
CHANNEL_VALVE1_ELEVATOR2= 38
|
||||
CHANNEL_VALVE2_TREE = 39
|
||||
CHANNEL_VALVE3_BROKEN = 40
|
||||
CHANNEL_VALVE4_ELEVATOR1= 41
|
||||
CHANNEL_VALVE5_ENTRY = 42
|
||||
CHANNEL_VALVE6_BRIDGE = 43
|
||||
|
||||
|
||||
; Cabin lost in woods
|
||||
CABIN_OUTSIDE = 0
|
||||
|
@ -11,13 +11,21 @@
|
||||
.byte ARBOR_ARRIVAL_CLOSED ; LOCATION = $82
|
||||
.endif
|
||||
|
||||
.if 1
|
||||
.if 0
|
||||
; MECHE
|
||||
.byte LOAD_MECHE ; WHICH_LOAD = $80
|
||||
.byte DIRECTION_W ; DIRECTION = $81
|
||||
.byte MECHE_ARRIVAL ; LOCATION = $82
|
||||
.endif
|
||||
|
||||
.if 1
|
||||
; CHANNEL
|
||||
.byte LOAD_CHANNEL ; WHICH_LOAD = $80
|
||||
.byte DIRECTION_S ; DIRECTION = $81
|
||||
.byte CHANNEL_ARRIVAL ; LOCATION = $82
|
||||
.endif
|
||||
|
||||
|
||||
|
||||
|
||||
.byte $00 ; RED_PAGES_TAKEN = $83
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 10 KiB |
@ -12,7 +12,7 @@ locations:
|
||||
.word location24,location25,location26,location27
|
||||
.word location28,location29,location30,location31
|
||||
.word location32,location33,location34,location35
|
||||
.word location36,location37
|
||||
.word location36,location37,location38
|
||||
|
||||
; CHANNEL_ARRIVAL -- arrival in channelwood
|
||||
location0:
|
||||
@ -223,7 +223,10 @@ location11:
|
||||
.word $0000 ; east bg
|
||||
.word steps_fork_w_lzsa ; west bg
|
||||
.byte BG_NORTH|BG_SOUTH|BG_WEST
|
||||
.byte $ff
|
||||
.byte DIRECTION_N ; special exit
|
||||
.byte 18,25 ; special x
|
||||
.byte 38,46 ; special y
|
||||
.word goto_valve1-1 ; special function
|
||||
|
||||
; CHANNEL_STEPS_PATH -- path going to steps
|
||||
location12:
|
||||
@ -277,7 +280,11 @@ location14:
|
||||
.word $0000 ; east bg
|
||||
.word $0000 ; west bg
|
||||
.byte BG_NORTH|BG_SOUTH
|
||||
.byte $ff
|
||||
.byte DIRECTION_S ; special exit
|
||||
.byte 25,31 ; special x
|
||||
.byte 24,32 ; special y
|
||||
.word goto_valve1-1 ; special function
|
||||
|
||||
|
||||
; CHANNEL_WIND_PATH2 -- path to windmill too
|
||||
location15:
|
||||
@ -700,3 +707,24 @@ location37:
|
||||
.byte 28,36 ; special y
|
||||
.word elev1_handle-1 ; special function
|
||||
|
||||
; CHANNEL_VALVE1_ELEVATOR2 -- valve for elevator2
|
||||
location38:
|
||||
.byte CHANNEL_STEPS_FORK ; north exit
|
||||
.byte CHANNEL_WIND_PATH ; south exit
|
||||
.byte $ff ; east exit
|
||||
.byte $ff ; west exit
|
||||
.byte DIRECTION_N ; north exit_dir
|
||||
.byte DIRECTION_S ; south exit_dir
|
||||
.byte $ff ; east exit_dir
|
||||
.byte $ff ; west exit_dir
|
||||
.word valve_bottom_off_lzsa ; north bg
|
||||
.word valve_top_off_lzsa ; south bg
|
||||
.word $0000 ; east bg
|
||||
.word $0000 ; west bg
|
||||
.byte BG_NORTH|BG_SOUTH
|
||||
.byte DIRECTION_N|DIRECTION_S ; special exit
|
||||
.byte 15,25 ; special x
|
||||
.byte 14,34 ; special y
|
||||
.word handle_valve1-1 ; special function
|
||||
|
||||
|
||||
|
12
mist/zp.inc
12
mist/zp.inc
@ -186,12 +186,12 @@ CHANNEL_SWITCHES= $B5 ; channelwood switches
|
||||
CHANNEL_SW_FAUCET = $80
|
||||
|
||||
CHANNEL_VALVES = $B6 ; channelwood valves
|
||||
CHANNEL_VALVE1 = $01
|
||||
CHANNEL_VALVE2 = $02
|
||||
CHANNEL_VALVE3 = $04
|
||||
CHANNEL_VALVE4 = $08
|
||||
CHANNEL_VALVE5 = $10
|
||||
CHANNEL_VALVE6 = $20
|
||||
CHANNEL_VALVE1 = $01 ; elevator2
|
||||
CHANNEL_VALVE2 = $02 ; big tree
|
||||
CHANNEL_VALVE3 = $04 ; broken
|
||||
CHANNEL_VALVE4 = $08 ; elevator1
|
||||
CHANNEL_VALVE5 = $10 ; entry
|
||||
CHANNEL_VALVE6 = $20 ; bridge
|
||||
|
||||
DENTIST_LIGHT = $B7 ; dentist lightswitch
|
||||
DENTIST_MONTH = $B8 ; dentist panel: month
|
||||
|
Loading…
x
Reference in New Issue
Block a user