mirror of
https://github.com/a2-4am/4cade.git
synced 2025-01-11 07:30:02 +00:00
minimize flicker when redrawing overlays onscreen
This commit is contained in:
parent
d0cc8ecee1
commit
b8966ce199
@ -191,6 +191,9 @@ DrawUI
|
||||
jsr Draw40Chars ; draw UI line 1 on offscreen page
|
||||
jsr MaybeRedrawUIForDHGR ; transform for DHGR if this is a DHGR title screen
|
||||
plp
|
||||
gDrawingOnscreen=*+1
|
||||
lda #$00 ; SMC, might be 1
|
||||
bne @uidone
|
||||
+LDADDR UILine2
|
||||
jsr Draw40Chars ; draw UI line 2 on offscreen page
|
||||
jsr MaybeRedrawUIForDHGR ; transform for DHGR if this is a DHGR title screen
|
||||
@ -230,7 +233,9 @@ DrawUI
|
||||
+LDADDR gPathname
|
||||
jsr DrawCenteredString ; draw cheat UI line 2
|
||||
jsr MaybeRedrawUIForDHGR ; transform for DHGR if this is a DHGR title screen
|
||||
@uidone clc
|
||||
@uidone lda #0
|
||||
sta gDrawingOnscreen
|
||||
clc
|
||||
jmp ShowOtherPage
|
||||
|
||||
CheckCheats
|
||||
|
@ -227,12 +227,19 @@ SoftBell
|
||||
+
|
||||
ldx BestMatchIndex ; check if the new best match is the same
|
||||
cpx gGameToLaunch ; as the current best match
|
||||
bne +
|
||||
bne @load
|
||||
|
||||
jsr ToggleOffscreenPage ; Since we're not loading a new screenshot
|
||||
; we fake switching the 'offscreen' page
|
||||
; in order to draw on the visible page.
|
||||
bpl @noload ; (always branches)
|
||||
+ stx gGameToLaunch
|
||||
lda #1
|
||||
bne @noload ; always branches
|
||||
@load
|
||||
stx gGameToLaunch
|
||||
jsr LoadGameTitleOffscreen
|
||||
@noload jsr DrawUI
|
||||
lda #0
|
||||
@noload
|
||||
sta gDrawingOnscreen ; will minimize flicker in case we're
|
||||
jsr DrawUI ; drawing directly onscreen
|
||||
|
||||
; /!\ execution falls through to ui.animation/MaybeAnimateTitle
|
||||
|
Loading…
x
Reference in New Issue
Block a user