mirror of
https://github.com/a2-4am/4cade.git
synced 2024-12-28 19:31:55 +00:00
ensure reload of search index after exiting mini attract mode
fixes https://github.com/a2-4am/4cade/issues/430
This commit is contained in:
parent
ff3b536e1c
commit
535b5b39ce
@ -65,7 +65,7 @@ MegaAttractMode
|
|||||||
; in: gGameToLaunch = index in gSearchStore (word)
|
; in: gGameToLaunch = index in gSearchStore (word)
|
||||||
; gSearchStore populated
|
; gSearchStore populated
|
||||||
; out: all flags and registers clobbered
|
; out: all flags and registers clobbered
|
||||||
; assume all of main memory has been clobbered
|
; assume all of main memory has been clobbered (including gSearchStore)
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
MiniAttractMode
|
MiniAttractMode
|
||||||
jsr GetGameToLaunch
|
jsr GetGameToLaunch
|
||||||
|
@ -96,6 +96,9 @@ OnBrowseCheat
|
|||||||
|
|
||||||
OnBrowseTab
|
OnBrowseTab
|
||||||
jsr MiniAttractMode
|
jsr MiniAttractMode
|
||||||
|
pha ; must reload search index before calling either
|
||||||
|
jsr ReloadSearchIndex ; PlayGame or LoadGameTitleOffscreen, because
|
||||||
|
pla ; mini attract mode may have clobbered all of main memory
|
||||||
cmp #$8D
|
cmp #$8D
|
||||||
beq OnBrowseLaunch
|
beq OnBrowseLaunch
|
||||||
; execution falls through here
|
; execution falls through here
|
||||||
@ -104,6 +107,7 @@ ForceBrowseChanged
|
|||||||
; execution falls through here
|
; execution falls through here
|
||||||
OnBrowseChanged
|
OnBrowseChanged
|
||||||
; in: gGameToLaunch = game index (word)
|
; in: gGameToLaunch = game index (word)
|
||||||
|
; gSearchStore populated
|
||||||
jsr SwitchToBank2
|
jsr SwitchToBank2
|
||||||
jsr EnableAcceleratorAndSwitchToBank1
|
jsr EnableAcceleratorAndSwitchToBank1
|
||||||
jsr LoadGameTitleOffscreen
|
jsr LoadGameTitleOffscreen
|
||||||
|
@ -162,7 +162,8 @@ OnTab
|
|||||||
jsr MiniAttractMode
|
jsr MiniAttractMode
|
||||||
cmp #$8D ; if we exited mini attract mode
|
cmp #$8D ; if we exited mini attract mode
|
||||||
bne .req_redraw ; by pressing Enter, launch the game
|
bne .req_redraw ; by pressing Enter, launch the game
|
||||||
|
jsr ReloadSearchIndex ; must reload search index before calling PlayGame
|
||||||
|
; /!\ execution falls through here
|
||||||
OnLaunch
|
OnLaunch
|
||||||
ldx gGameToLaunch+1
|
ldx gGameToLaunch+1
|
||||||
inx
|
inx
|
||||||
@ -170,7 +171,7 @@ OnLaunch
|
|||||||
jsr PlayGame
|
jsr PlayGame
|
||||||
|
|
||||||
.req_redraw
|
.req_redraw
|
||||||
sec ; tell caller to redraw UI
|
sec ; tell caller to reload search index and redraw UI from scratch
|
||||||
rts
|
rts
|
||||||
|
|
||||||
OnCheat
|
OnCheat
|
||||||
|
Loading…
Reference in New Issue
Block a user