From 2860397c80b7e2223da73d715d5fa8cda33d80ee Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Wed, 8 Jul 2020 15:26:51 -0400 Subject: [PATCH] mist: can now get to all of the pillars --- mist/common_defines.inc | 9 +- mist/leveldata_mist.inc | 186 ++++++++++++++++++++++++++++++++++++++-- mist/mist_puzzles.s | 91 ++++++++++++++++++++ 3 files changed, 279 insertions(+), 7 deletions(-) diff --git a/mist/common_defines.inc b/mist/common_defines.inc index bfe463e1..1794c8d3 100644 --- a/mist/common_defines.inc +++ b/mist/common_defines.inc @@ -92,7 +92,14 @@ MIST_TOWER2_PATH = 27 MIST_TOWER2_BASE = 28 MIST_TOWER2_TOP = 29 MIST_VIEWER_DOOR = 30 - +MIST_PILLAR_EYE = 31 +MIST_PILLAR_SNAKE = 32 +MIST_PILLAR_BUG = 33 +MIST_PILLAR_ANCHOR = 34 +MIST_PILLAR_ARROW = 35 +MIST_PILLAR_LEAF = 36 +MIST_PILLAR_CROSS = 37 +MIST_PILLAR_EMU = 38 ; Mist Generator Building GEN_GREEN_SHACK = 0 diff --git a/mist/leveldata_mist.inc b/mist/leveldata_mist.inc index 786bed8f..4c04b127 100644 --- a/mist/leveldata_mist.inc +++ b/mist/leveldata_mist.inc @@ -11,7 +11,9 @@ locations: .word location16,location17,location18,location19 .word location20,location21,location22,location23 .word location24,location25,location26,location27 - .word location28,location29,location30 + .word location28,location29,location30,location31 + .word location32,location33,location34,location35 + .word location36,location37,location38 ; MIST_ARRIVAL_DOCK -- dock location0: @@ -218,7 +220,10 @@ location10: .word pool_e_lzsa ; east bg .word pool_w_lzsa ; west bg .byte BG_NORTH|BG_SOUTH|BG_EAST|BG_WEST - .byte $ff ; special exit + .byte DIRECTION_E|DIRECTION_W ; special exit + .byte 2,38 ; special x + .byte 10,32 ; special y + .word pool_pillars-1 ; MIST_CLOCK -- clock location11: @@ -272,10 +277,11 @@ location13: .word tree2_e_lzsa ; east bg .word tree2_w_lzsa ; west bg .byte BG_NORTH|BG_SOUTH|BG_EAST|BG_WEST - .byte DIRECTION_N ; special exit - .byte 25,31 ; special x - .byte 19,23 ; special y - .word click_switch-1 ; special function + .byte DIRECTION_E|DIRECTION_W + .byte 6,33 ; special x + .byte 10,38 ; special y + .word tree2_pillars-1 + ; MIST_TREE_CORRIDOR_5 -- tree corridor #5 location14: @@ -599,3 +605,171 @@ location30: .byte 2,46 ; special y .word enter_viewer-1 ; special function +; MIST_PILLAR_EYE -- pillar with eye +location31: + .byte $ff ; north exit + .byte $ff ; south exit + .byte $ff ; east exit + .byte MIST_POOL ; west exit + .byte $ff ; north exit_dir + .byte $ff ; south exit_dir + .byte $ff ; east exit_dir + .byte DIRECTION_W ; west exit_dir + .word $0000 ; north bg + .word $0000 ; south bg + .word $0000 ; east bg + .word pillar_eye_lzsa ; west bg + .byte BG_WEST + .byte DIRECTION_W ; special exit + .byte 14,27 ; special x + .byte 12,30 ; special y + .word touch_pillar_eye-1 ; special function + +; MIST_PILLAR_SNAKE -- pillar with snake +location32: + .byte $ff ; north exit + .byte $ff ; south exit + .byte $ff ; east exit + .byte MIST_POOL ; west exit + .byte $ff ; north exit_dir + .byte $ff ; south exit_dir + .byte $ff ; east exit_dir + .byte DIRECTION_W ; west exit_dir + .word $0000 ; north bg + .word $0000 ; south bg + .word $0000 ; east bg + .word pillar_snake_lzsa ; west bg + .byte BG_WEST + .byte DIRECTION_W ; special exit + .byte 14,27 ; special x + .byte 12,30 ; special y + .word touch_pillar_snake-1 ; special function + +; MIST_PILLAR_BUG -- pillar with bug +location33: + .byte $ff ; north exit + .byte $ff ; south exit + .byte $ff ; east exit + .byte MIST_TREE_CORRIDOR_2 ; west exit + .byte $ff ; north exit_dir + .byte $ff ; south exit_dir + .byte $ff ; east exit_dir + .byte DIRECTION_W ; west exit_dir + .word $0000 ; north bg + .word $0000 ; south bg + .word $0000 ; east bg + .word pillar_bug_lzsa ; west bg + .byte BG_WEST + .byte DIRECTION_W ; special exit + .byte 14,27 ; special x + .byte 12,30 ; special y + .word touch_pillar_bug-1 ; special function + +; MIST_PILLAR_ANCHOR -- pillar with anchor +location34: + .byte $ff ; north exit + .byte $ff ; south exit + .byte $ff ; east exit + .byte MIST_TREE_CORRIDOR_2 ; west exit + .byte $ff ; north exit_dir + .byte $ff ; south exit_dir + .byte $ff ; east exit_dir + .byte DIRECTION_W ; west exit_dir + .word $0000 ; north bg + .word $0000 ; south bg + .word $0000 ; east bg + .word pillar_anchor_lzsa ; west bg + .byte BG_WEST + .byte DIRECTION_W ; special exit + .byte 14,27 ; special x + .byte 12,30 ; special y + .word touch_pillar_anchor-1 ; special function + +; MIST_PILLAR_ARROW -- pillar with arrow +location35: + .byte $ff ; north exit + .byte $ff ; south exit + .byte MIST_TREE_CORRIDOR_2 ; 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 pillar_arrow_lzsa ; east bg + .word $0000 ; west bg + .byte BG_EAST + .byte DIRECTION_E ; special exit + .byte 14,27 ; special x + .byte 12,30 ; special y + .word touch_pillar_arrow-1 ; special function + +; MIST_PILLAR_LEAF -- pillar with leaf +location36: + .byte $ff ; north exit + .byte $ff ; south exit + .byte MIST_TREE_CORRIDOR_2 ; 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 pillar_leaf_lzsa ; east bg + .word $0000 ; west bg + .byte BG_EAST + .byte DIRECTION_E ; special exit + .byte 14,27 ; special x + .byte 12,30 ; special y + .word touch_pillar_leaf-1 ; special function + +; MIST_PILLAR_CROSS -- pillar with cross +location37: + .byte $ff ; north exit + .byte $ff ; south exit + .byte MIST_POOL ; 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 pillar_cross_lzsa ; east bg + .word $0000 ; west bg + .byte BG_EAST + .byte DIRECTION_E ; special exit + .byte 14,27 ; special x + .byte 12,30 ; special y + .word touch_pillar_cross-1 ; special function + +; MIST_PILLAR_EMU -- pillar with emu +location38: + .byte $ff ; north exit + .byte $ff ; south exit + .byte MIST_POOL ; 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 pillar_emu_lzsa ; east bg + .word $0000 ; west bg + .byte BG_EAST + .byte DIRECTION_E ; special exit + .byte 14,27 ; special x + .byte 12,30 ; special y + .word touch_pillar_emu-1 ; special function + + + + + + + + + diff --git a/mist/mist_puzzles.s b/mist/mist_puzzles.s index cf0b165e..5c5aa304 100644 --- a/mist/mist_puzzles.s +++ b/mist/mist_puzzles.s @@ -1,3 +1,94 @@ + +touch_pillar_eye: +touch_pillar_snake: +touch_pillar_bug: +touch_pillar_anchor: +touch_pillar_arrow: +touch_pillar_leaf: +touch_pillar_cross: +touch_pillar_emu: + rts + +tree2_pillars: + lda DIRECTION + cmp #DIRECTION_E + beq tree2_east + bne tree2_west + +tree2_west: + lda CURSOR_X + cmp #22 + bcs goto_bug_pillar + bcc goto_anchor_pillar + +tree2_east: + lda CURSOR_X + cmp #18 + bcs goto_arrow_pillar + bcc goto_leaf_pillar + +pool_pillars: + lda DIRECTION + cmp #DIRECTION_E + beq pool_east + bne pool_west + +pool_west: + lda CURSOR_X + cmp #28 + bcs goto_eye_pillar + cmp #12 + bcs goto_snake_pillar + bcc goto_bug_pillar + +pool_east: + lda CURSOR_X + cmp #28 + bcs goto_leaf_pillar + cmp #11 + bcs goto_cross_pillar + bcc goto_emu_pillar + + +goto_eye_pillar: + lda #MIST_PILLAR_EYE + jmp done_pillar + +goto_snake_pillar: + lda #MIST_PILLAR_SNAKE + jmp done_pillar + +goto_bug_pillar: + lda #MIST_PILLAR_BUG + jmp done_pillar + +goto_anchor_pillar: + lda #MIST_PILLAR_ANCHOR + jmp done_pillar + + +goto_emu_pillar: + lda #MIST_PILLAR_EMU + jmp done_pillar + +goto_cross_pillar: + lda #MIST_PILLAR_CROSS + jmp done_pillar + +goto_leaf_pillar: + lda #MIST_PILLAR_LEAF + jmp done_pillar + +goto_arrow_pillar: + lda #MIST_PILLAR_ARROW + jmp done_pillar + +done_pillar: + sta LOCATION + jmp change_location + + + ;======================= ; flip circuit breaker