From 9ae4f7799890a2825620faf22422c1657b8e48c5 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Tue, 10 Mar 2020 16:12:56 -0400 Subject: [PATCH] mist: can walk down to generator room now --- mist/Makefile | 1 + mist/generator_puzzle.s | 24 +++++++++ mist/leveldata_island.inc | 101 +++++++++++++++++++++++++++++++++++++- mist/mist.s | 1 + 4 files changed, 125 insertions(+), 2 deletions(-) create mode 100644 mist/generator_puzzle.s diff --git a/mist/Makefile b/mist/Makefile index 77be43d9..e8abe502 100644 --- a/mist/Makefile +++ b/mist/Makefile @@ -56,6 +56,7 @@ mist.o: mist.s zp.inc hardware.inc \ keyboard.s \ draw_pointer.s \ end_level.s \ + generator_puzzle.s \ gr_copy.s audio.s text_print.s decompress_fast_v2.s ca65 -o mist.o mist.s -l mist.lst diff --git a/mist/generator_puzzle.s b/mist/generator_puzzle.s new file mode 100644 index 00000000..957278ed --- /dev/null +++ b/mist/generator_puzzle.s @@ -0,0 +1,24 @@ +;====================== +; open the generator_door + +open_gen_door: + + ldy #LOCATION_NORTH_EXIT + lda #36 + sta location35,Y + + ldy #LOCATION_NORTH_EXIT_DIR + lda #DIRECTION_N + sta location35,Y + + ldy #LOCATION_NORTH_BG + lda #gen_door_open_n_lzsa + sta location35+1,Y + + jsr change_location + + rts + + diff --git a/mist/leveldata_island.inc b/mist/leveldata_island.inc index 17ac8c2b..7e3a110a 100644 --- a/mist/leveldata_island.inc +++ b/mist/leveldata_island.inc @@ -41,6 +41,8 @@ locations: .word location20,location21,location22,location23 .word location24,location25,location26,location27 .word location28,location29,location30,location31 + .word location32,location33,location34,location35 + .word location36 ; myst linking book location0: @@ -464,11 +466,11 @@ location23: .byte 17 ; north exit .byte 15 ; south exit .byte $ff ; east exit - .byte $ff ; west exit + .byte 32 ; west exit .byte DIRECTION_N ; north exit_dir .byte DIRECTION_S ; south exit_dir .byte $ff ; east exit_dir - .byte $ff ; west exit_dir + .byte DIRECTION_W ; west exit_dir .word tree4_n_lzsa ; north bg .word tree4_s_lzsa ; south bg .word $0000 ; east bg @@ -621,5 +623,100 @@ location31: .byte BG_NORTH | BG_SOUTH .byte $ff ; TODO: lightswitch +; green shack +location32: + .byte $ff ; north exit + .byte $ff ; south exit + .byte 23 ; east exit + .byte 33 ; west exit + .byte $ff ; north exit_dir + .byte $ff ; south exit_dir + .byte DIRECTION_N ; east exit_dir + .byte DIRECTION_N ; west exit_dir + .word $0000 ; north bg + .word $0000 ; south bg + .word green_house_e_lzsa ; east bg + .word green_house_w_lzsa ; west bg + .byte BG_EAST | BG_WEST + .byte $ff + +; green shack steps 1 +location33: + .byte 34 ; north exit + .byte 32 ; south exit + .byte $ff ; east exit + .byte $ff ; west exit + .byte DIRECTION_N ; north exit_dir + .byte DIRECTION_E ; south exit_dir + .byte $ff ; east exit_dir + .byte $ff ; west exit_dir + .word green_steps1_n_lzsa ; north bg + .word green_steps1_s_lzsa ; south bg + .word $0000 ; east bg + .word $0000 ; west bg + .byte BG_NORTH | BG_SOUTH + .byte $ff + +; green shack steps 6 +location34: + .byte 35 ; north exit + .byte $ff ; south exit + .byte $ff ; east exit + .byte 33 ; west exit + .byte DIRECTION_N ; north exit_dir + .byte $ff ; south exit_dir + .byte $ff ; east exit_dir + .byte DIRECTION_S ; west exit_dir + .word green_steps6_n_lzsa ; north bg + .word $0000 ; south bg + .word $0000 ; east bg + .word green_steps6_w_lzsa ; west bg + .byte BG_NORTH | BG_WEST + .byte $ff + +; generator room door +location35: + .byte 35 ; north exit + .byte 34 ; south exit + .byte $ff ; east exit + .byte $ff ; west exit + .byte DIRECTION_S ; north exit_dir + .byte DIRECTION_W ; south exit_dir + .byte $ff ; east exit_dir + .byte $ff ; west exit_dir + .word gen_door_closed_n_lzsa ; north bg + .word gen_door_s_lzsa ; south bg + .word $0000 ; east bg + .word $0000 ; west bg + .byte BG_NORTH | BG_SOUTH + .byte DIRECTION_N ; special exit + .byte 27,32 ; special x + .byte 26,32 ; special y + .word open_gen_door-1 ; special function + + +; generator room +location36: + .byte 36 ; north exit + .byte 35 ; south exit + .byte $ff ; east exit + .byte $ff ; west exit + .byte DIRECTION_S ; north exit_dir + .byte DIRECTION_S ; south exit_dir + .byte $ff ; east exit_dir + .byte $ff ; west exit_dir + .word generator_n_lzsa ; north bg + .word generator_s_lzsa ; south bg + .word $0000 ; east bg + .word $0000 ; west bg + .byte BG_NORTH | BG_SOUTH + .byte $ff + + + + + + + diff --git a/mist/mist.s b/mist/mist.s index 4a7f6ea9..ad6dc9b2 100644 --- a/mist/mist.s +++ b/mist/mist.s @@ -191,6 +191,7 @@ exit_level: .include "clock_bridge_puzzle.s" .include "marker_switch.s" .include "brother_books.s" + .include "generator_puzzle.s" ; linking books