diff --git a/mist/cabin_boiler_puzzle.s b/mist/cabin_boiler_puzzle.s index 13aa4ace..7075b60d 100644 --- a/mist/cabin_boiler_puzzle.s +++ b/mist/cabin_boiler_puzzle.s @@ -2,7 +2,37 @@ ; mostly because the tree puzzle is sort of obscure in the original ; in original you get a match, then light it - ; also the match will burn out eventually + ; the match will flicker and burn out if you go outside + + ; light the pilot, it will turn red + ; PSI starts at zero + ; turn once clockwise, fire starts, nothing else? + ; turn once counter-clockwise fire turns off + ; turn twice CW -> ? + ; turn 3 CW -> ? + ; turn 4, 5, 6, 7, 8, 9, 10, 11, 12, CW -> ? + ; can turn up to 25 + ; at 12 starts gradually going up + ; (needle swings hits end, waits like 5s, goes up) + ; 0 - basement + ; 1 - down 1/2 + ; 2 - down 1 + ; 3 - half out + ; 4 - all out (can get on) * + ; 5 - + ; 6 - * + ; 7 - + ; 8 - * + ; 9 - + ; 10 - * + ; 11 - + ; 12 - * (top) (can look down at all spots) + ; button takes you down a level, but only to ground floor + ; will actually bump you back to Level 3 if you press on ground + ; button does nothing in basement + ; dial in basement does same as one upstairs + + ;=================================== ; update backgrounds based on state @@ -20,6 +50,54 @@ goto_safe: sta LOCATION jmp change_location + + ;==================== + ; open safe was touched + ;==================== + ; close safe or take/light match + + ; how does this interact with holding a page? + +touch_open_safe: + + lda CURSOR_X + cmp #21 + bcc handle_matches + + ; touching door +touching_safe_door: + lda #CABIN_SAFE + sta LOCATION + jmp change_location + +handle_matches: + lda CURSOR_Y + cmp #32 + bcc not_matches + cmp #41 + bcs not_matches + + lda HOLDING_ITEM + cmp #HOLDING_LIT_MATCH + beq not_matches + cmp #HOLDING_MATCH + beq light_match + + ; not a match yet +take_match: + lda #HOLDING_MATCH + sta HOLDING_ITEM + bne not_matches ; bra + +light_match: + lda #HOLDING_LIT_MATCH + sta HOLDING_ITEM + +not_matches: + rts + + + ;==================== ; safe was touched ;==================== @@ -54,6 +132,9 @@ pull_handle: lda #CABIN_OPEN_SAFE sta LOCATION + lda #DIRECTION_W|DIRECTION_ONLY_POINT + sta DIRECTION + jmp change_location wrong_combination: diff --git a/mist/draw_pointer.s b/mist/draw_pointer.s index 43be0e34..79260001 100644 --- a/mist/draw_pointer.s +++ b/mist/draw_pointer.s @@ -96,18 +96,29 @@ really_not_special: ; otherwise, finger_point finger_point: - lda HOLDING_PAGE - beq real_finger_point - cmp #HOLDING_BLUE_PAGE - beq blue_finger - cmp #HOLDING_RED_PAGE - beq red_finger - cmp #HOLDING_WHITE_PAGE - beq white_finger + ; holding item takes precednce + lda HOLDING_ITEM cmp #HOLDING_MATCH beq match_finger cmp #HOLDING_LIT_MATCH beq match_lit_finger + cmp #HOLDING_KEY + beq key_finger + + lda HOLDING_PAGE + beq real_finger_point + cmp #HOLDING_BLUE_PAGE + beq blue_finger + cmp #HOLDING_WHITE_PAGE + beq white_finger + cmp #HOLDING_RED_PAGE +; beq red_finger + +red_finger: + lda #finger_red_page_sprite + jmp finger_draw ; all that's left is key key_finger: @@ -128,11 +139,7 @@ match_lit_finger: lda #>finger_match_lit_sprite jmp finger_draw -red_finger: - lda #finger_red_page_sprite - jmp finger_draw + blue_finger: lda # cabin_graphics.inc echo "clearing_s_lzsa: .incbin \"clearing_s.lzsa\"" >> cabin_graphics.inc echo "clearing_w_lzsa: .incbin \"clearing_w.lzsa\"" >> cabin_graphics.inc @@ -43,6 +46,13 @@ cabin_graphics.inc: \ echo "tree_basement_book_open_s_lzsa: .incbin \"tree_basement_book_open_s.lzsa\"" >> cabin_graphics.inc echo "tree_basement_book_closed_s_lzsa: .incbin \"tree_basement_book_closed_s.lzsa\"" >> cabin_graphics.inc echo "tree_elevator_basement_s_lzsa: .incbin \"tree_elevator_basement_s.lzsa\"" >> cabin_graphics.inc + echo "tree_elevator_l2_lzsa: .incbin \"tree_elevator_l2.lzsa\"" >> cabin_graphics.inc + echo "tree_elevator_l4_lzsa: .incbin \"tree_elevator_l4.lzsa\"" >> cabin_graphics.inc + echo "tree_elevator_l6_lzsa: .incbin \"tree_elevator_l6.lzsa\"" >> cabin_graphics.inc + echo "tree_elevator_l8_lzsa: .incbin \"tree_elevator_l8.lzsa\"" >> cabin_graphics.inc + echo "tree_elevator_l10_lzsa: .incbin \"tree_elevator_l10.lzsa\"" >> cabin_graphics.inc + echo "tree_elevator_l12_lzsa: .incbin \"tree_elevator_l12.lzsa\"" >> cabin_graphics.inc + echo "tree_elevator_top_down_lzsa: .incbin \"tree_elevator_top_down.lzsa\"" >> cabin_graphics.inc %.gr: %.png $(PNG2GR) $< $@ diff --git a/mist/graphics_cabin/tree_elevator_basement_s.png b/mist/graphics_cabin/tree_elevator_basement_s.png index e75a6a3b..b0c8f5a0 100644 Binary files a/mist/graphics_cabin/tree_elevator_basement_s.png and b/mist/graphics_cabin/tree_elevator_basement_s.png differ diff --git a/mist/graphics_cabin/tree_elevator_l10.png b/mist/graphics_cabin/tree_elevator_l10.png new file mode 100644 index 00000000..8d72fe49 Binary files /dev/null and b/mist/graphics_cabin/tree_elevator_l10.png differ diff --git a/mist/graphics_cabin/tree_elevator_l12.png b/mist/graphics_cabin/tree_elevator_l12.png new file mode 100644 index 00000000..d2fdd572 Binary files /dev/null and b/mist/graphics_cabin/tree_elevator_l12.png differ diff --git a/mist/graphics_cabin/tree_elevator_l2.png b/mist/graphics_cabin/tree_elevator_l2.png new file mode 100644 index 00000000..63661d41 Binary files /dev/null and b/mist/graphics_cabin/tree_elevator_l2.png differ diff --git a/mist/graphics_cabin/tree_elevator_l4.png b/mist/graphics_cabin/tree_elevator_l4.png new file mode 100644 index 00000000..99cb4413 Binary files /dev/null and b/mist/graphics_cabin/tree_elevator_l4.png differ diff --git a/mist/graphics_cabin/tree_elevator_l6.png b/mist/graphics_cabin/tree_elevator_l6.png new file mode 100644 index 00000000..89de9e48 Binary files /dev/null and b/mist/graphics_cabin/tree_elevator_l6.png differ diff --git a/mist/graphics_cabin/tree_elevator_l8.png b/mist/graphics_cabin/tree_elevator_l8.png new file mode 100644 index 00000000..362e4f09 Binary files /dev/null and b/mist/graphics_cabin/tree_elevator_l8.png differ diff --git a/mist/graphics_cabin/tree_elevator_top_down.png b/mist/graphics_cabin/tree_elevator_top_down.png new file mode 100644 index 00000000..b190bef1 Binary files /dev/null and b/mist/graphics_cabin/tree_elevator_top_down.png differ diff --git a/mist/leveldata_cabin.inc b/mist/leveldata_cabin.inc index 31446840..385d18cf 100644 --- a/mist/leveldata_cabin.inc +++ b/mist/leveldata_cabin.inc @@ -269,6 +269,6 @@ location13: .word safe_open_w_lzsa ; west bg .byte BG_WEST .byte DIRECTION_W ; special exit - .byte 3,31 ; special x - .byte 16,44 ; special y - .word touch_safe-1 + .byte 14,34 ; special x + .byte 0,44 ; special y + .word touch_open_safe-1 diff --git a/mist/zp.inc b/mist/zp.inc index fde3cc42..4cc4d250 100644 --- a/mist/zp.inc +++ b/mist/zp.inc @@ -61,12 +61,12 @@ DIRECTION = $81 ; direction we are pointing LOCATION = $82 ; location on the map RED_PAGES_TAKEN = $83 ; red pages that have been picked up - OCTAGON_PAGE = 1 - MECHE_PAGE = 2 - SELENA_PAGE = 4 - STONEY_PAGE = 8 - CHANNEL_PAGE = 16 - FINAL_PAGE = 32 + OCTAGON_PAGE = $01 + MECHE_PAGE = $02 + SELENA_PAGE = $04 + STONEY_PAGE = $08 + CHANNEL_PAGE = $10 + FINAL_PAGE = $20 BLUE_PAGES_TAKEN= $84 ; blue pages that have been picked up CLOCK_BRIDGE = $85 ; is the clock island bridge raised GEAR_OPEN = $86 ; is the big gear open @@ -124,9 +124,12 @@ HOLDING_PAGE = $A9 ; which page in hand HOLDING_RED_PAGE = $80 HOLDING_BLUE_PAGE = $40 HOLDING_WHITE_PAGE = $C0 - HOLDING_KEY = $04 - HOLDING_LIT_MATCH = $02 - HOLDING_MATCH = $01 + ;FINAL_PAGE = $20 + ;CHANNEL_PAGE = $10 + ;STONEY_PAGE = $08 + ;SELENA_PAGE = $04 + ;MECHE_PAGE = $02 + ;OCTAGON_PAGE = $01 RED_PAGE_COUNT = $AA ; # of red pages in book BLUE_PAGE_COUNT = $AB ; # of blue pages in book @@ -200,7 +203,12 @@ SAFE_ONES = $C5 ; safe combination, ones TREE_LEVEL = $C6 ; how high is the tree hole -END_OF_SAVE = $C7 +HOLDING_ITEM = $C7 + HOLDING_KEY = $04 + HOLDING_LIT_MATCH = $02 + HOLDING_MATCH = $01 + +END_OF_SAVE = $C8 ; done game puzzle state