diff --git a/mist/channel_switches.s b/mist/channel_switches.s index 008b2335..a8eca194 100644 --- a/mist/channel_switches.s +++ b/mist/channel_switches.s @@ -66,14 +66,53 @@ book_elevator_handle_done: rts + +;============================= +; elevator1 handle pulled + +; FIXME: check for water power +; FIXME: animate +elev1_handle: + + ; click speaker + bit SPEAKER + + ; check for water power + + ; go to next floor, which involves moving to ARBOR level + + lda #ARBOR_INSIDE_ELEV1 + sta LOCATION + + lda #DIRECTION_W + sta DIRECTION + + lda #LOAD_ARBOR + sta WHICH_LOAD + + lda #$ff + sta LEVEL_OVER + + rts + + ;========================= - ; close door + ; close book elevator door book_elevator_close_door: lda #CHANNEL_BOOK_E_IN_CLOSED sta LOCATION jmp change_location + ;========================= + ; close elevator1 door +elev1_close_door: + + lda #CHANNEL_IN_ELEV1_CLOSED + sta LOCATION + jmp change_location + + ;======================= ; raise bridge diff --git a/mist/common_defines.inc b/mist/common_defines.inc index 3f133d11..594b7dcd 100644 --- a/mist/common_defines.inc +++ b/mist/common_defines.inc @@ -36,19 +36,19 @@ LOCATION_SPECIAL_FUNC=22 ; pointer-1 of function to call on click ;================================ ; Loader definitions -LOAD_TITLE = $0 -LOAD_MIST = $1 -LOAD_MECHE = $2 -LOAD_SELENA = $3 -LOAD_OCTAGON = $4 -LOAD_VIEWER = $5 -LOAD_STONEY = $6 -LOAD_CHANNEL = $7 -LOAD_CABIN = $8 -LOAD_DENTIST = $9 -LOAD_ARBOR = $10 -LOAD_SHIPUP = $11 -LOAD_ENDING = $12 +LOAD_TITLE = 0 +LOAD_MIST = 1 +LOAD_MECHE = 2 +LOAD_SELENA = 3 +LOAD_OCTAGON = 4 +LOAD_VIEWER = 5 +LOAD_STONEY = 6 +LOAD_CHANNEL = 7 +LOAD_CABIN = 8 +LOAD_DENTIST = 9 +LOAD_ARBOR = 10 +LOAD_SHIPUP = 11 +LOAD_ENDING = 12 @@ -312,7 +312,7 @@ CHANNEL_PATH5 = 5 CHANNEL_PATH6 = 6 CHANNEL_FORK = 7 CHANNEL_BEFORE_ELEV1 = 8 -CHANNEL_IN_ELEVATOR1 = 9 +CHANNEL_IN_ELEV1_OPEN = 9 CHANNEL_PIPE_BRIDGE2 = 10 CHANNEL_STEPS_FORK = 11 CHANNEL_STEPS_PATH = 12 @@ -339,6 +339,8 @@ CHANNEL_BOOK_E_INSIDE_TOP= 32 CHANNEL_BOOK_ROOM = 33 CHANNEL_BOOK_CLOSED = 34 CHANNEL_BOOK_OPEN = 35 +CHANNEL_ELEV1_OPEN = 36 +CHANNEL_IN_ELEV1_CLOSED = 37 ; Cabin lost in woods CABIN_OUTSIDE = 0 diff --git a/mist/graphics_channel/Makefile b/mist/graphics_channel/Makefile index f4b74ca6..3b67a550 100644 --- a/mist/graphics_channel/Makefile +++ b/mist/graphics_channel/Makefile @@ -17,9 +17,9 @@ channel_graphics.inc: \ path5_e.lzsa path5_s.lzsa path5_n.lzsa \ path6_s.lzsa path6_w.lzsa path6_n.lzsa \ fork_n.lzsa fork_s.lzsa fork_w.lzsa \ - before_elev1_e.lzsa before_elev1_w.lzsa \ + before_elev1_e.lzsa before_elev1_w.lzsa before_elev1_open_w.lzsa \ pipe_bridge2_up_w.lzsa pipe_bridge2_w.lzsa pipe_bridge2_e.lzsa \ - elevator1_open.lzsa \ + elevator1_open.lzsa elevator1_closed.lzsa \ steps_fork_n.lzsa steps_fork_s.lzsa steps_fork_w.lzsa \ steps_path_e.lzsa steps_path_w.lzsa \ steps_door_e.lzsa steps_door_w.lzsa \ @@ -67,10 +67,12 @@ channel_graphics.inc: \ echo "fork_w_lzsa: .incbin \"fork_w.lzsa\"" >> channel_graphics.inc echo "before_elev1_e_lzsa: .incbin \"before_elev1_e.lzsa\"" >> channel_graphics.inc echo "before_elev1_w_lzsa: .incbin \"before_elev1_w.lzsa\"" >> channel_graphics.inc + echo "before_elev1_open_w_lzsa: .incbin \"before_elev1_open_w.lzsa\"" >> channel_graphics.inc echo "pipe_bridge2_e_lzsa: .incbin \"pipe_bridge2_e.lzsa\"" >> channel_graphics.inc echo "pipe_bridge2_w_lzsa: .incbin \"pipe_bridge2_w.lzsa\"" >> channel_graphics.inc echo "pipe_bridge2_up_w_lzsa: .incbin \"pipe_bridge2_up_w.lzsa\"" >> channel_graphics.inc echo "elevator1_open_lzsa: .incbin \"elevator1_open.lzsa\"" >> channel_graphics.inc + echo "elevator1_closed_lzsa: .incbin \"elevator1_closed.lzsa\"" >> channel_graphics.inc echo "steps_fork_n_lzsa: .incbin \"steps_fork_n.lzsa\"" >> channel_graphics.inc echo "steps_fork_s_lzsa: .incbin \"steps_fork_s.lzsa\"" >> channel_graphics.inc echo "steps_fork_w_lzsa: .incbin \"steps_fork_w.lzsa\"" >> channel_graphics.inc diff --git a/mist/graphics_channel/before_elev1_open_w.png b/mist/graphics_channel/before_elev1_open_w.png new file mode 100644 index 00000000..2042dc15 Binary files /dev/null and b/mist/graphics_channel/before_elev1_open_w.png differ diff --git a/mist/graphics_channel/elevator1_closed.png b/mist/graphics_channel/elevator1_closed.png new file mode 100644 index 00000000..39a8f423 Binary files /dev/null and b/mist/graphics_channel/elevator1_closed.png differ diff --git a/mist/leveldata_channel.inc b/mist/leveldata_channel.inc index 2ac178cc..02945894 100644 --- a/mist/leveldata_channel.inc +++ b/mist/leveldata_channel.inc @@ -12,7 +12,7 @@ locations: .word location24,location25,location26,location27 .word location28,location29,location30,location31 .word location32,location33,location34,location35 - + .word location36,location37 ; CHANNEL_ARRIVAL -- arrival in channelwood location0: @@ -158,11 +158,11 @@ location8: .byte $ff ; north exit .byte $ff ; south exit .byte CHANNEL_FORK ; east exit - .byte CHANNEL_IN_ELEVATOR1 ; west exit + .byte CHANNEL_ELEV1_OPEN ; west exit .byte $ff ; north exit_dir .byte $ff ; south exit_dir .byte DIRECTION_N ; east exit_dir - .byte DIRECTION_E ; west exit_dir + .byte DIRECTION_W ; west exit_dir .word $0000 ; north bg .word $0000 ; south bg .word before_elev1_e_lzsa ; east bg @@ -170,7 +170,7 @@ location8: .byte BG_EAST|BG_WEST .byte $ff -; CHANNEL_IN_ELEVATOR1 -- inside elevator1 +; CHANNEL_IN_ELEV1_OPEN -- inside elevator1, door open location9: .byte $ff ; north exit .byte $ff ; south exit @@ -185,7 +185,11 @@ location9: .word elevator1_open_lzsa ; east bg .word $0000 ; west bg .byte BG_EAST - .byte $ff + .byte DIRECTION_E ; special exit + .byte 10,17 ; special x + .byte 6,46 ; special y + .word elev1_close_door-1 ; special function + ; CHANNEL_PIPE_BRIDGE2 -- east side of pipe bridge location10: @@ -656,3 +660,40 @@ location35: .byte 12,22 ; special y .word mist_link_book-1 ; special function +; CHANNEL_ELEV1_OPEN -- outside elevator1, open +location36: + .byte $ff ; north exit + .byte $ff ; south exit + .byte CHANNEL_FORK ; east exit + .byte CHANNEL_IN_ELEV1_OPEN ; west exit + .byte $ff ; north exit_dir + .byte $ff ; south exit_dir + .byte DIRECTION_N ; east exit_dir + .byte DIRECTION_E ; west exit_dir + .word $0000 ; north bg + .word $0000 ; south bg + .word before_elev1_e_lzsa ; east bg + .word before_elev1_open_w_lzsa ; west bg + .byte BG_WEST|BG_EAST + .byte $ff + +; CHANNEL_IN_ELEV1_CLOSED -- inside elevator1, closed +location37: + .byte $ff ; north exit + .byte $ff ; south exit + .byte CHANNEL_IN_ELEV1_OPEN ; east exit + .byte $ff ; west exit + .byte $ff ; north exit_dir + .byte $ff ; south exit_dir + .byte DIRECTION_E ; east exit_dir + .byte $ff ; west exit_dir + .word $0000 ; north bg + .word $0000 ; south bg + .word elevator1_closed_lzsa ; east bg + .word $0000 ; west bg + .byte BG_EAST + .byte DIRECTION_E ; special exit + .byte 26,34 ; special x + .byte 28,36 ; special y + .word elev1_handle-1 ; special function +