mirror of
https://github.com/a2-4am/4cade.git
synced 2024-12-26 20:30:29 +00:00
refactor GetGameDisplayName
This commit is contained in:
parent
c31d91ea60
commit
87a707898c
@ -9,7 +9,7 @@
|
|||||||
; D000..E5F4 - persistent data structures (per-game cheat categories,
|
; D000..E5F4 - persistent data structures (per-game cheat categories,
|
||||||
; gGlobalPrefsStore, gGamesListStore)
|
; gGlobalPrefsStore, gGamesListStore)
|
||||||
; ...unused...
|
; ...unused...
|
||||||
; EC31..FFF9 - main program code
|
; EC3B..FFF9 - main program code
|
||||||
; FFFA..FFFF - NMI, reset, IRQ vectors
|
; FFFA..FFFF - NMI, reset, IRQ vectors
|
||||||
;
|
;
|
||||||
; LC RAM BANK 2
|
; LC RAM BANK 2
|
||||||
|
@ -5,14 +5,13 @@
|
|||||||
;
|
;
|
||||||
; Public functions
|
; Public functions
|
||||||
; - GetGameDisplayName
|
; - GetGameDisplayName
|
||||||
|
; - GetGameDisplayNameInActionSlideshow
|
||||||
; - PlayGame
|
; - PlayGame
|
||||||
; - Launch
|
; - Launch
|
||||||
;
|
;
|
||||||
|
|
||||||
GetGameDisplayName
|
GetGameDisplayName
|
||||||
; in: A/Y points to game filename
|
; in: A/Y points to game filename
|
||||||
; X = #$60 if we should only look in gGamesListStore for a match
|
|
||||||
; X = #$EA if we should also look in gSlideshowStore
|
|
||||||
; out: C clear if game exists in gGamesListStore, and
|
; out: C clear if game exists in gGamesListStore, and
|
||||||
; A/Y points to game display name (but see hack notes below)
|
; A/Y points to game display name (but see hack notes below)
|
||||||
; X = game index, or #$FF if the game doesn't really exist but
|
; X = game index, or #$FF if the game doesn't really exist but
|
||||||
@ -22,6 +21,10 @@ GetGameDisplayName
|
|||||||
; list games that require a joystick, but the games list parser
|
; list games that require a joystick, but the games list parser
|
||||||
; filters out joystick-only games if the machine doesn't have a
|
; filters out joystick-only games if the machine doesn't have a
|
||||||
; joystick)
|
; joystick)
|
||||||
|
ldx #$60
|
||||||
|
+HIDE_NEXT_2_BYTES
|
||||||
|
GetGameDisplayNameInActionSlideshow
|
||||||
|
ldx #$EA
|
||||||
stx @maybeExit
|
stx @maybeExit
|
||||||
+STAY @key
|
+STAY @key
|
||||||
+STAY @slideshowKey
|
+STAY @slideshowKey
|
||||||
|
@ -104,8 +104,6 @@ DHGRSingle
|
|||||||
+
|
+
|
||||||
+STAY @tfname
|
+STAY @tfname
|
||||||
|
|
||||||
; find this game in gGamesListStore
|
|
||||||
ldx #$60
|
|
||||||
jsr GetGameDisplayName
|
jsr GetGameDisplayName
|
||||||
; if game is not found (C will be set here), it means it can't be played on
|
; if game is not found (C will be set here), it means it can't be played on
|
||||||
; this machine due to memory or joystick requirements, so we don't display
|
; this machine due to memory or joystick requirements, so we don't display
|
||||||
@ -141,9 +139,7 @@ DHGRSingle
|
|||||||
+
|
+
|
||||||
+STAY @afname
|
+STAY @afname
|
||||||
|
|
||||||
; find this game in gGamesListStore or gSlideshowStore
|
jsr GetGameDisplayNameInActionSlideshow
|
||||||
ldx #$EA
|
|
||||||
jsr GetGameDisplayName
|
|
||||||
; if game name is not found (C will be set here), it means the game
|
; if game name is not found (C will be set here), it means the game
|
||||||
; can't be played due to memory or joystick requirements, so we hide
|
; can't be played due to memory or joystick requirements, so we hide
|
||||||
; it from slideshows
|
; it from slideshows
|
||||||
|
@ -87,9 +87,7 @@ BlankGR
|
|||||||
+
|
+
|
||||||
+STAY @fname
|
+STAY @fname
|
||||||
|
|
||||||
; find this game in gGamesListStore or gSlideshowStore
|
jsr GetGameDisplayNameInActionSlideshow
|
||||||
ldx #$EA
|
|
||||||
jsr GetGameDisplayName
|
|
||||||
; if game name is not found (C will be set here), it means the game
|
; if game name is not found (C will be set here), it means the game
|
||||||
; can't be played due to memory or joystick requirements, so we hide
|
; can't be played due to memory or joystick requirements, so we hide
|
||||||
; it from slideshows
|
; it from slideshows
|
||||||
|
@ -51,8 +51,6 @@ HGRSingle
|
|||||||
+
|
+
|
||||||
+STAY @tfname
|
+STAY @tfname
|
||||||
|
|
||||||
; find this game in gGamesListStore
|
|
||||||
ldx #$60
|
|
||||||
jsr GetGameDisplayName
|
jsr GetGameDisplayName
|
||||||
; if game is not found (C will be set here), it means it can't be played on
|
; if game is not found (C will be set here), it means it can't be played on
|
||||||
; this machine due to memory or joystick requirements, so we don't display
|
; this machine due to memory or joystick requirements, so we don't display
|
||||||
@ -88,9 +86,7 @@ HGRSingle
|
|||||||
+
|
+
|
||||||
+STAY @afname
|
+STAY @afname
|
||||||
|
|
||||||
; find this game in gGamesListStore or gSlideshowStore
|
jsr GetGameDisplayNameInActionSlideshow
|
||||||
ldx #$EA
|
|
||||||
jsr GetGameDisplayName
|
|
||||||
; if game name is not found (C will be set here), it means the game
|
; if game name is not found (C will be set here), it means the game
|
||||||
; can't be played due to memory or joystick requirements, so we hide
|
; can't be played due to memory or joystick requirements, so we hide
|
||||||
; it from slideshows
|
; it from slideshows
|
||||||
|
@ -144,7 +144,6 @@ RunAttractModule
|
|||||||
; language card or auxiliary memory.
|
; language card or auxiliary memory.
|
||||||
|
|
||||||
+LDAY @key
|
+LDAY @key
|
||||||
ldx #$60
|
|
||||||
jsr GetGameDisplayName
|
jsr GetGameDisplayName
|
||||||
bcc + ; if game doesn't exist, skip the demo
|
bcc + ; if game doesn't exist, skip the demo
|
||||||
rts
|
rts
|
||||||
|
@ -68,8 +68,6 @@ SHRSingle
|
|||||||
+
|
+
|
||||||
+STAY @sfname
|
+STAY @sfname
|
||||||
|
|
||||||
; find this game in gGamesListStore
|
|
||||||
ldx #$60
|
|
||||||
jsr GetGameDisplayName
|
jsr GetGameDisplayName
|
||||||
; if game is not found (C will be set here), it means it can't be played on
|
; if game is not found (C will be set here), it means it can't be played on
|
||||||
; this machine due to memory or joystick requirements, so we don't display
|
; this machine due to memory or joystick requirements, so we don't display
|
||||||
|
Loading…
Reference in New Issue
Block a user