From 8979c6307f8fd3ddb52177059176b3adf491821c Mon Sep 17 00:00:00 2001 From: 4am Date: Fri, 21 Jun 2019 13:17:57 -0400 Subject: [PATCH] cover fade on esc --- src/fx/fx.cover.fade.a | 14 +++++++++----- src/ui.search.mode.a | 6 +++--- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/fx/fx.cover.fade.a b/src/fx/fx.cover.fade.a index d252c6dcf..08b6c17f5 100644 --- a/src/fx/fx.cover.fade.a +++ b/src/fx/fx.cover.fade.a @@ -35,9 +35,7 @@ TMP = $FC ; 4 bytes lda #74 sta COUNTER -- lda $C000 - bmi @done - ldx COUNTER +- ldx COUNTER ldy Order,x lda TransformHi,y sta @j+2 @@ -45,10 +43,16 @@ TMP = $FC ; 4 bytes sta @j+1 @j jsr $FDFD ; SMC lda #80 - jsr WaitForKeyWithTimeout + sec +@wait1 pha +@wait2 sbc #1 + bne @wait2 + pla + sbc #1 + bne @wait1 dec COUNTER bpl - -@done rts + rts InitPRNG lda $4E diff --git a/src/ui.search.mode.a b/src/ui.search.mode.a index e0c192ab8..cbb457e6c 100644 --- a/src/ui.search.mode.a +++ b/src/ui.search.mode.a @@ -48,10 +48,10 @@ _SearchModeInputLoop bne - ; on every keypress (whether or not dec $52 ; the key leads to an action) bne - - jsr _CoverFade lda #kAttractMode ; no input for ~30 seconds sta Mode ; switch to attract mode - rts + jmp _CoverFade + @gotKey jsr _ResetInputTimeout @@ -115,7 +115,7 @@ InputDispatch OnClear ldx InputLength bne + - jsr BlankHGR + jsr _CoverFade pla ; Esc with no input exits search mode pla ; and switches to attract mode rts