mist: arbor: can now go up and down steps properly

This commit is contained in:
Vince Weaver 2020-06-27 00:01:40 -04:00
parent b66ae3b95c
commit a43e90b22c
15 changed files with 252 additions and 69 deletions

View File

@ -6,10 +6,10 @@ PNG_TO_40x48D = ../gr-utils/png_to_40x48d
PNG2RLE = ../gr-utils/png2rle
B2D = ../bmp2dhr/b2d
all: mist.dsk mist_side2.dsk
all: mist.dsk mist_side2.dsk mist_side3.dsk
zip: mist.dsk mist_side2.dsk
zip mist.zip mist.dsk mist_side2.dsk
zip: mist.dsk mist_side2.dsk mist_side3.dsk
zip mist.zip mist.dsk mist_side2.dsk mist_side3.dsk
mist.dsk: HELLO LOADER MIST_TITLE MIST OCTAGON VIEWER \
MECHE SELENA CABIN CHANNEL STONEY SAVE0
@ -30,13 +30,24 @@ mist.dsk: HELLO LOADER MIST_TITLE MIST OCTAGON VIEWER \
mist_side2.dsk: HELLO_DISK2 MECHE SELENA CHANNEL VIEWER ARBOR
cp empty.dsk mist_side2.dsk
$(DOS33) -y mist_side2.dsk SAVE A HELLO_DISK2 HELLO
$(DOS33) -y mist_side2.dsk BSAVE -a 0x2000 MECHE
$(DOS33) -y mist_side2.dsk BSAVE -a 0x2000 SELENA
# $(DOS33) -y mist_side2.dsk BSAVE -a 0x2000 MECHE
# $(DOS33) -y mist_side2.dsk BSAVE -a 0x2000 SELENA
$(DOS33) -y mist_side2.dsk BSAVE -a 0x2000 CHANNEL
$(DOS33) -y mist_side2.dsk BSAVE -a 0x2000 ARBOR
$(DOS33) -y mist_side2.dsk BSAVE -a 0x2000 VIEWER
# $(DOS33) -y mist_side2.dsk BSAVE -a 0x9000 ./audio/link_noise.btc LINK_NOISE.BTC
mist_side3.dsk: HELLO_DISK2 MECHE SELENA
cp empty.dsk mist_side3.dsk
$(DOS33) -y mist_side3.dsk SAVE A HELLO_DISK2 HELLO
$(DOS33) -y mist_side3.dsk BSAVE -a 0x2000 MECHE
$(DOS33) -y mist_side3.dsk BSAVE -a 0x2000 SELENA
# $(DOS33) -y mist_side2.dsk BSAVE -a 0x2000 CHANNEL
# $(DOS33) -y mist_side2.dsk BSAVE -a 0x2000 ARBOR
# $(DOS33) -y mist_side2.dsk BSAVE -a 0x2000 VIEWER
###
LOADER: loader.o

View File

@ -1,4 +1,7 @@
For release 1.0
+ split rocket puzzle off of selenetic?
+ LOADER
-- save game
-- sound loader (into language card?)
@ -29,10 +32,10 @@ For release 1.0
+ CHANNEL
-- hook up water valves at least
-- show water in pipe (because no sound clue for water running?)
-- hook up stairway
-- hook up pages and half letter
-- from path can still see down elev1 even if up
+ ARBOR
-- hook up pages and half letter
-- finish level
Done:

View File

@ -32,8 +32,12 @@ elev1_handle:
rts
;=========================
; close elevator1 door
;=========================
;=========================
; close elevator1 door
;=========================
;=========================
elev1_close_door:
lda #ARBOR_INSIDE_ELEV1
@ -41,8 +45,12 @@ elev1_close_door:
jmp change_location
;==================================
; hut handle, toggle top stair gate
;==================================
;==================================
; hut handle, toggle top stair gate
;==================================
;==================================
hut_handle:
lda CHANNEL_SWITCHES
eor #CHANNEL_SW_GATE_TOP
@ -117,10 +125,82 @@ done_elev2_close_door:
handle_top_gate:
lda CHANNEL_SWITCHES
and #CHANNEL_SW_GATE_TOP
beq done_handle_top_gate ; if gate not open
lda #ARBOR_STEPS_TOP
sta LOCATION
jsr change_location
done_handle_top_gate:
rts
;=================================
;=================================
; handle gate at bottom of stairs
;=================================
;=================================
stair_gate:
lda CHANNEL_SWITCHES
and #CHANNEL_SW_GATE_BOTTOM
beq stair_gate_closed ; if gate not open
stair_gate_open:
; 13-16 close gate
lda CURSOR_X
cmp #16
bcc close_stair_gate
; otherwise, exit back to channelwood
lda #CHANNEL_STEPS_DOOR
sta LOCATION
lda #DIRECTION_E
sta DIRECTION
lda #LOAD_CHANNEL
sta WHICH_LOAD
lda #$ff
sta LEVEL_OVER
rts
close_stair_gate:
; open the gate
lda CHANNEL_SWITCHES
and #~CHANNEL_SW_GATE_BOTTOM
jmp update_stair_gate
stair_gate_closed:
; open the gate
lda CHANNEL_SWITCHES
ora #CHANNEL_SW_GATE_BOTTOM
update_stair_gate:
sta CHANNEL_SWITCHES
jsr update_arbor_state
jmp change_location
;===============================================
;===============================================
; update all backgrounds based on switch states
@ -136,41 +216,113 @@ update_arbor_state:
top_gate_open:
; change top gate to open
; change far view
ldy #LOCATION_SOUTH_BG
lda #<switch_hut_open_s_lzsa
sta location14,Y ; ARBOR_SWITCH_HUT
lda #>switch_hut_open_s_lzsa
sta location14+1,Y ; ARBOR_SWITCH_HUT
lda #<switch_hut_open_s_lzsa
sta location14,Y ; ARBOR_SWITCH_HUT
lda #>switch_hut_open_s_lzsa
sta location14+1,Y ; ARBOR_SWITCH_HUT
; change bridge view
ldy #LOCATION_WEST_BG
lda #<bridge7_open_w_lzsa
sta location22,Y ; ARBOR_BRIDGE7
lda #>bridge7_open_w_lzsa
sta location22+1,Y ; ARBOR_BRIDGE7
; FIXME: change gate graphic close
; FIXME: change gate exit
; change to allow crossing bridge
; ldy #LOCATION_EAST_EXIT
; lda #CHANNEL_AFTER_BRIDGE1
; sta location3,Y ; CHANNEL_BRIDGE
; change doors, elevator closed view
; should be gate open, elevator closed
lda #<doors_open_elev2_closed_w_lzsa
sta location23,Y ; ARBOR_DOORS
lda #>doors_open_elev2_closed_w_lzsa
sta location23+1,Y ; ARBOR_DOORS
; change doors, elevator open view
; should be gate open, elevator open
lda #<doors_open_w_lzsa
sta location24,Y ; ARBOR_DOORS_ELEV2_OPEN
lda #>doors_open_w_lzsa
sta location24+1,Y ; ARBOR_DOORS_ELEV2_OPEN
; change to allow traversing gate
ldy #LOCATION_SPECIAL_EXIT
lda #DIRECTION_W
sta location23,Y ; ARBOR_DOORS
sta location24,Y ; ARBOR_DOORS_ELEV2_OPEN
jmp top_gate_done
top_gate_closed:
; change top gate to open
ldy #LOCATION_SOUTH_BG
; change top gate to closed
; change far view
ldy #LOCATION_SOUTH_BG
lda #<switch_hut_closed_s_lzsa
sta location14,Y ; ARBOR_SWITCH_HUT
lda #>switch_hut_closed_s_lzsa
sta location14+1,Y ; ARBOR_SWITCH_HUT
; FIXME: change gate graphic close
; FIXME: change gate exit
; change to allow crossing bridge
; ldy #LOCATION_EAST_EXIT
; lda #CHANNEL_AFTER_BRIDGE1
; sta location3,Y ; CHANNEL_BRIDGE
; change bridge view
ldy #LOCATION_WEST_BG
lda #<bridge7_closed_w_lzsa
sta location22,Y ; ARBOR_BRIDGE7
lda #>bridge7_closed_w_lzsa
sta location22+1,Y ; ARBOR_BRIDGE7
; change doors, elevator closed view
; should be gate closed, elevator closed
lda #<doors_closed_w_lzsa
sta location23,Y ; ARBOR_DOORS
lda #>doors_closed_w_lzsa
sta location23+1,Y ; ARBOR_DOORS
; change doors, elevator open view
; should be gate closed, elevator open
lda #<doors_elev2_open_w_lzsa
sta location24,Y ; ARBOR_DOORS_ELEV2_OPEN
lda #>doors_elev2_open_w_lzsa
sta location24+1,Y ; ARBOR_DOORS_ELEV2_OPEN
; change to disallow traversing gate
ldy #LOCATION_SPECIAL_EXIT
lda #$ff
sta location23,Y ; ARBOR_DOORS
sta location24,Y ; ARBOR_DOORS_ELEV2_OPEN
top_gate_done:
update_stair_door:
lda CHANNEL_SWITCHES
and #CHANNEL_SW_GATE_BOTTOM
beq bottom_gate_closed
bottom_gate_open:
; change bottom gate to open
ldy #LOCATION_WEST_BG
lda #<steps_bottom_open_w_lzsa
sta location32,Y ; ARBOR_STEPS_BOTTOM
lda #>steps_bottom_open_w_lzsa
sta location32+1,Y ; ARBOR_STEPS_BOTTOM
jmp bottom_gate_done
bottom_gate_closed:
ldy #LOCATION_WEST_BG
lda #<steps_bottom_closed_w_lzsa
sta location32,Y ; ARBOR_STEPS_BOTTOM
lda #>steps_bottom_closed_w_lzsa
sta location32+1,Y ; ARBOR_STEPS_BOTTOM
bottom_gate_done:
done_update_arbor_state:
rts

View File

@ -389,8 +389,8 @@ ARBOR_INSIDE_ELEV2_CLOSED= 26
ARBOR_IN_ELEV2_TOP_CLOSED= 27
ARBOR_IN_ELEV2_TOP_OPEN= 28
ARBOR_STEPS_TOP = 29
ARBOR_STEPS1 = 30
ARBOR_STEPS2 = 31
ARBOR_STEPS2 = 30
ARBOR_STEPS1 = 31
ARBOR_STEPS_BOTTOM = 32
ARBOR_OUTSIDE_ELEV2_OPEN= 33
ARBOR_OUTSIDE_ELEV2_CLOSED= 34

View File

@ -30,11 +30,15 @@ arbor_graphics.inc: \
bridge6_n.lzsa bridge6_s.lzsa \
shack2_n.lzsa shack2_s.lzsa shack2_e.lzsa shack2_w.lzsa \
bridge7_e.lzsa bridge7_open_w.lzsa bridge7_closed_w.lzsa \
doors_e.lzsa doors_closed_w.lzsa \
doors_e.lzsa doors_closed_w.lzsa doors_open_w.lzsa \
doors_elev2_open_w.lzsa doors_open_elev2_closed_w.lzsa \
inside_elevator2_open.lzsa inside_elevator2_closed.lzsa \
elevator2_open_top.lzsa elevator2_closed_top.lzsa \
outside_elevator2_e.lzsa outside_elevator2_open_w.lzsa outside_elevator2_closed_w.lzsa
outside_elevator2_e.lzsa outside_elevator2_open_w.lzsa outside_elevator2_closed_w.lzsa \
steps_top_e.lzsa steps_top_w.lzsa \
steps1_e.lzsa steps1_w.lzsa \
steps2_e.lzsa steps2_w.lzsa \
steps_bottom_e.lzsa steps_bottom_open_w.lzsa steps_bottom_closed_w.lzsa
echo "arrival_e_lzsa: .incbin \"arrival_e.lzsa\"" > arbor_graphics.inc
echo "arrival_open_e_lzsa: .incbin \"arrival_open_e.lzsa\"" >> arbor_graphics.inc
echo "arrival_w_lzsa: .incbin \"arrival_w.lzsa\"" >> arbor_graphics.inc
@ -88,8 +92,9 @@ arbor_graphics.inc: \
echo "bridge7_open_w_lzsa: .incbin \"bridge7_open_w.lzsa\"" >> arbor_graphics.inc
echo "doors_e_lzsa: .incbin \"doors_e.lzsa\"" >> arbor_graphics.inc
echo "doors_closed_w_lzsa: .incbin \"doors_closed_w.lzsa\"" >> arbor_graphics.inc
echo "doors_open_w_lzsa: .incbin \"doors_open_w.lzsa\"" >> arbor_graphics.inc
echo "doors_elev2_open_w_lzsa: .incbin \"doors_elev2_open_w.lzsa\"" >> arbor_graphics.inc
echo "doors_open_lev2_closed_w_lzsa: .incbin \"doors_open_elev2_closed_w.lzsa\"" >> arbor_graphics.inc
echo "doors_open_elev2_closed_w_lzsa: .incbin \"doors_open_elev2_closed_w.lzsa\"" >> arbor_graphics.inc
echo "inside_elevator2_open_lzsa: .incbin \"inside_elevator2_open.lzsa\"" >> arbor_graphics.inc
echo "inside_elevator2_closed_lzsa: .incbin \"inside_elevator2_closed.lzsa\"" >> arbor_graphics.inc
echo "elevator2_open_top_lzsa: .incbin \"elevator2_open_top.lzsa\"" >> arbor_graphics.inc
@ -97,6 +102,15 @@ arbor_graphics.inc: \
echo "outside_elevator2_e_lzsa: .incbin \"outside_elevator2_e.lzsa\"" >> arbor_graphics.inc
echo "outside_elevator2_open_w_lzsa: .incbin \"outside_elevator2_open_w.lzsa\"" >> arbor_graphics.inc
echo "outside_elevator2_closed_w_lzsa: .incbin \"outside_elevator2_closed_w.lzsa\"" >> arbor_graphics.inc
echo "steps_top_e_lzsa: .incbin \"steps_top_e.lzsa\"" >> arbor_graphics.inc
echo "steps_top_w_lzsa: .incbin \"steps_top_w.lzsa\"" >> arbor_graphics.inc
echo "steps1_w_lzsa: .incbin \"steps1_w.lzsa\"" >> arbor_graphics.inc
echo "steps1_e_lzsa: .incbin \"steps1_e.lzsa\"" >> arbor_graphics.inc
echo "steps2_w_lzsa: .incbin \"steps2_w.lzsa\"" >> arbor_graphics.inc
echo "steps2_e_lzsa: .incbin \"steps2_e.lzsa\"" >> arbor_graphics.inc
echo "steps_bottom_e_lzsa: .incbin \"steps_bottom_e.lzsa\"" >> arbor_graphics.inc
echo "steps_bottom_open_w_lzsa: .incbin \"steps_bottom_open_w.lzsa\"" >> arbor_graphics.inc
echo "steps_bottom_closed_w_lzsa: .incbin \"steps_bottom_closed_w.lzsa\"" >> arbor_graphics.inc
%.gr: %.png
$(PNG2GR) $< $@

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 980 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 972 B

View File

@ -538,63 +538,62 @@ location28:
.byte 6,46 ; special y
.word elevator2_close_door-1 ; special function
; ARBOR_STEPS_TOP -- top of steps
location29:
.byte $ff ; north exit
.byte $ff ; south exit
.byte ARBOR_DOORS ; east exit
.byte ARBOR_STEPS1 ; west exit
.byte $ff ; north exit_dir
.byte $ff ; south exit_dir
.byte DIRECTION_E ; east exit_dir
.byte DIRECTION_W ; west exit_dir
.word $0000 ; north bg
.word $0000 ; south bg
.word inside_elevator2_closed_lzsa ; east bg
.word $0000 ; west bg
.byte BG_EAST
.byte $ff
; ARBOR_STEPS1 -- down steps
location30:
.byte $ff ; north exit
.byte $ff ; south exit
.byte ARBOR_STEPS_TOP ; east exit
.byte ARBOR_STEPS2 ; west exit
.byte $ff ; north exit_dir
.byte $ff ; south exit_dir
.byte DIRECTION_E ; east exit_dir
.byte DIRECTION_W ; west exit_dir
.word $0000 ; north bg
.word $0000 ; south bg
.word inside_elevator2_closed_lzsa ; east bg
.word $0000 ; west bg
.byte BG_EAST
.word $0000 ; north bg
.word $0000 ; south bg
.word steps_top_e_lzsa ; east bg
.word steps_top_w_lzsa ; west bg
.byte BG_EAST|BG_WEST
.byte $ff
; ARBOR_STEPS2 -- down steps further
; ARBOR_STEPS2 -- down steps
location30:
.byte $ff ; north exit
.byte $ff ; south exit
.byte ARBOR_STEPS_TOP ; east exit
.byte ARBOR_STEPS1 ; west exit
.byte $ff ; north exit_dir
.byte $ff ; south exit_dir
.byte DIRECTION_E ; east exit_dir
.byte DIRECTION_W ; west exit_dir
.word $0000 ; north bg
.word $0000 ; south bg
.word steps2_e_lzsa ; east bg
.word steps2_w_lzsa ; west bg
.byte BG_EAST|BG_WEST
.byte $ff
; ARBOR_STEPS1 -- down steps further
location31:
.byte $ff ; north exit
.byte $ff ; south exit
.byte ARBOR_STEPS1 ; east exit
.byte ARBOR_STEPS2 ; east exit
.byte ARBOR_STEPS_BOTTOM ; west exit
.byte $ff ; north exit_dir
.byte $ff ; south exit_dir
.byte DIRECTION_E ; east exit_dir
.byte DIRECTION_W ; west exit_dir
.word $0000 ; north bg
.word $0000 ; south bg
.word inside_elevator2_closed_lzsa ; east bg
.word $0000 ; west bg
.byte BG_EAST
.word $0000 ; north bg
.word $0000 ; south bg
.word steps1_e_lzsa ; east bg
.word steps1_w_lzsa ; west bg
.byte BG_EAST|BG_WEST
.byte $ff
; ARBOR_STEPS_BOTTOM -- bottom of steps
location32:
.byte $ff ; north exit
.byte $ff ; south exit
.byte ARBOR_STEPS2 ; east exit
.byte ARBOR_STEPS1 ; east exit
.byte $ff ; west exit
.byte $ff ; north exit_dir
.byte $ff ; south exit_dir
@ -602,10 +601,14 @@ location32:
.byte $ff ; west exit_dir
.word $0000 ; north bg
.word $0000 ; south bg
.word inside_elevator2_closed_lzsa ; east bg
.word $0000 ; west bg
.byte BG_EAST
.byte $ff
.word steps_bottom_e_lzsa ; east bg
.word steps_bottom_closed_w_lzsa ; west bg
.byte BG_EAST|BG_WEST
.byte DIRECTION_W ; special exit
.byte 13,30 ; special x
.byte 6,46 ; special y
.word stair_gate-1 ; special function
; ARBOR_OUTSIDE_ELEV2_OPEN -- outside of elevator2 at top, door open
location33: