diff --git a/mist/TODO b/mist/TODO index 474ba6fb..8b078fe2 100644 --- a/mist/TODO +++ b/mist/TODO @@ -17,13 +17,12 @@ For release 1.0 -- load 1s clip of sounds (4k each) into language card? + STONEY - -- proper crawlway exits if we have space - -- have lights off mean darken the levels -- have lights come on in telescope view -- allow coming at steps from an angle - -- allow clicking on tunnel to get there -- hook up compass rose + -- if space allows, lighten floor of compass rose when + right button pressed -- hook up pump -- hook up key/trunk puzzle diff --git a/mist/default_save.s b/mist/default_save.s index 2a3a74e9..7bd3be8b 100644 --- a/mist/default_save.s +++ b/mist/default_save.s @@ -109,7 +109,7 @@ .byte $00 ; SHIP_RAISED = $AF ; stoneship .byte $00 ; PUMP_STATE = $B0 -.byte $07 ; BATTERY_CHARGE = $B1 +.byte $00 ; BATTERY_CHARGE = $B1 .byte $00 ; COMPASS_STATE = $B2 .byte $00 ; CRANK_ANGLE = $B3 .byte $00 ; WHITE_PAGE_TAKEN = $B4 diff --git a/mist/graphics_stoney/compass_room_n.png b/mist/graphics_stoney/compass_room_n.png index a79f0857..c6ad56aa 100644 Binary files a/mist/graphics_stoney/compass_room_n.png and b/mist/graphics_stoney/compass_room_n.png differ diff --git a/mist/graphics_stoney/compass_room_w.png b/mist/graphics_stoney/compass_room_w.png index c6e4cdc9..22184130 100644 Binary files a/mist/graphics_stoney/compass_room_w.png and b/mist/graphics_stoney/compass_room_w.png differ diff --git a/mist/leveldata_stoney.inc b/mist/leveldata_stoney.inc index abcfadfd..a3b8ecc8 100644 --- a/mist/leveldata_stoney.inc +++ b/mist/leveldata_stoney.inc @@ -659,7 +659,7 @@ location35: .byte DIRECTION_W .byte 6,35 ; special x .byte 0,46 ; special y - .word view_compass_right-1 ; special function + .word compass_puzzle-1 ; special function ; STONEY_RIGHT_TUNNEL1 -- right tunnel to blue room location36: @@ -862,7 +862,7 @@ location46: .byte DIRECTION_W .byte 6,35 ; special x .byte 0,46 ; special y - .word view_compass_right-1 ; special function + .word compass_puzzle-1 ; special function ; STONEY_CRAWLWAY_ENTRANCE_LEFT -- left_crawlway_entrance diff --git a/mist/stoney.s b/mist/stoney.s index 594e4592..3337561f 100644 --- a/mist/stoney.s +++ b/mist/stoney.s @@ -36,6 +36,8 @@ stoney_start: sta LEVEL_OVER ; resets if you leave + ; FIXME: temp debug + lda #$7 sta BATTERY_CHARGE ; init cursor @@ -71,6 +73,9 @@ game_loop: ;==================================== ; turn lights off (if applicable) ;==================================== + lda COMPASS_STATE + bne dont_touch_lights + lda LOCATION cmp #STONEY_BOOK_STAIRS1 beq turn_off_the_lights @@ -308,7 +313,10 @@ stoney_half_message: .include "stoney_puzzles.s" .include "handle_pages.s" + .include "lights_off.s" + .include "simple_sounds.s" + ; level data .include "leveldata_stoney.inc" - .include "lights_off.s" + diff --git a/mist/stoney_puzzles.s b/mist/stoney_puzzles.s index ee50fe0b..28cbe206 100644 --- a/mist/stoney_puzzles.s +++ b/mist/stoney_puzzles.s @@ -60,7 +60,74 @@ ;================================== ; compass puzzle ;================================== + ; want to click on 135 degrees + ; turns on lights (sets COMPASS_STATE to 1), runs update_compas_state + ; click on other pins + ; turns off lights, shorts out power + ; COMPASS_STATE to 0 + ; BATTERY_CHARGE to 0 + ; also puzzle only works if battery charge is > 0 + ; to keep you from pressing all in dark + compass_puzzle: + lda BATTERY_CHARGE + beq compass_oob + + lda CURSOR_Y + cmp #7 + bcc check_top ; blt + cmp #38 + bcs check_bottom ; bge + +check_middle: + lda CURSOR_X + cmp #6 + bcc compass_oob + cmp #12 + bcc wrong_knob + cmp #28 + bcc compass_oob + cmp #35 + bcs compass_oob + + lda CURSOR_Y + cmp #32 + bcs right_knob + bcc wrong_knob + +check_top: + lda CURSOR_X + cmp #10 + bcc compass_oob + cmp #30 + bcs compass_oob + bcc wrong_knob + +check_bottom: + lda CURSOR_X + cmp #13 + bcc compass_oob + cmp #28 + bcs compass_oob + bcc wrong_knob + +right_knob: + jsr click_speaker + + lda #1 + sta COMPASS_STATE + jmp update_compass_state + +wrong_knob: + lda #0 + sta COMPASS_STATE + sta BATTERY_CHARGE + + jsr long_beep + + jmp update_compass_state + +compass_oob: rts @@ -178,7 +245,7 @@ goto_left_tunnel: goto_compass_right: - lda #DIRECTION_W + lda #DIRECTION_W|DIRECTION_ONLY_POINT sta DIRECTION lda #STONEY_COMPASS_ROSE_RIGHT @@ -207,6 +274,9 @@ goto_right_tunnel: goto_compass_left: + lda #DIRECTION_W|DIRECTION_ONLY_POINT + sta DIRECTION + lda #STONEY_COMPASS_ROSE_LEFT sta LOCATION