From 10e3d05f07f9c8d0c2f5def3d71ef34ea2a241e5 Mon Sep 17 00:00:00 2001 From: 4am Date: Fri, 20 Sep 2019 22:27:41 -0400 Subject: [PATCH] move UILine1 to main memory since it's always rebuilt from scratch now --- src/constants.a | 3 ++- src/ui.common.a | 13 +++---------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/src/constants.a b/src/constants.a index c41901540..826e4923d 100644 --- a/src/constants.a +++ b/src/constants.a @@ -9,7 +9,7 @@ ; D000..E5F4 - persistent data structures (per-game cheat categories, ; gGlobalPrefsStore, gGamesListStore) ; ...unused... -; EABC..FFF9 - main program code +; EAE5..FFF9 - main program code ; FFFA..FFFF - NMI, reset, IRQ vectors ; ; LC RAM BANK 2 @@ -79,6 +79,7 @@ zpCharMask = $F1 ; only uesd during init, then clobbered gPathname = $1F00 ; used by SetPath/AddToPath gKeyLen = $1F00 ; used by ParseGamesList gKey = $1F01 +UILine1 = $1F80 gValLen = $1F80 gVal = $1F81 diff --git a/src/ui.common.a b/src/ui.common.a index 97dd04985..4603fee31 100644 --- a/src/ui.common.a +++ b/src/ui.common.a @@ -22,7 +22,6 @@ ; Public variables ; - OffscreenPage -; - UILine1 ; - UILine2 ; - VisibleGameCount (set during init) ; @@ -35,11 +34,6 @@ OffscreenPage ; 1 = currently showing HGR page 1 ; (so offscreen is page 2 @ $4000) -UILine1 - !byte 0,0,0,0,0,0,0,0,0,0 - !byte 0,0,0,0,0,0,0,0,0,0 - !byte 0,0,0,0,0,0,0,0,0,0 - !byte 0,0,0,0,0,0,0,0,0,0 UILine2 !byte 0,0,0,0,0,0,0,0,0,0 !byte 0,0,0,0,0,0,0,0,0,0 @@ -161,7 +155,7 @@ DrawSearchBarOffscreen pla bit gCheatsEnabled - bpl @done ; if cheats are not enabled, we're done + bpl OffscreenDone ; if cheats are not enabled, we're done pha tax @@ -180,9 +174,7 @@ DrawSearchBarOffscreen lda OffscreenPage ror +LDADDR gPathname - jsr DrawCenteredString - -@done rts + jmp DrawCenteredString ;------------------------------------------------------------------------------ ; ClearOffscreen @@ -212,6 +204,7 @@ ClearOffscreen inc @a+2 dex bne @a +OffscreenDone rts ;------------------------------------------------------------------------------