From fa69df8337e9a716b1b99391f7288dfa417c5e2e Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Sat, 8 Aug 2020 14:36:14 -0400 Subject: [PATCH] mist: stoney: print pumping message --- mist/stoney_puzzles.s | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/mist/stoney_puzzles.s b/mist/stoney_puzzles.s index ac83c456..90c961e2 100644 --- a/mist/stoney_puzzles.s +++ b/mist/stoney_puzzles.s @@ -323,6 +323,25 @@ goto_compass_left: umbrella_buttons: + ; first time you click on it switch to text and print pump message + lda #DIRECTION_W|DIRECTION_SPLIT + sta DIRECTION + jsr change_direction + + lda #1 + sta ANIMATE_FRAME + + lda DRAW_PAGE + pha + + lda #8 + sta DRAW_PAGE + + jsr clear_bottom + + pla + sta DRAW_PAGE + lda CURSOR_X cmp #15 bcc left_button_pressed @@ -367,6 +386,10 @@ clear_umbrella: jmp update_pump_state +pump_message: + .byte 13,21,"[PUMP NOISES]",0 + + ;============================ ; update pump state ;============================ @@ -451,8 +474,20 @@ skip_charge: do_draw_umbrella_light: lda DIRECTION + and #$f cmp #DIRECTION_W - bne done_draw_umbrella + bne done_draw_umbrella_notwest + + lda ANIMATE_FRAME + beq skip_pump_text + + lda #pump_message + sta OUTH + jsr move_and_print + +skip_pump_text: lda PUMP_STATE beq done_draw_umbrella @@ -479,6 +514,12 @@ umbrella_smc: done_draw_umbrella: rts + ; clear printing pump noise if we rotate +done_draw_umbrella_notwest: + lda #0 + sta ANIMATE_FRAME + rts + do_draw_crank_handle: