aboutsummaryrefslogtreecommitdiffstats
path: root/engine/menus/main_menu.asm
diff options
context:
space:
mode:
authorSatoMew <SatoMew@users.noreply.github.com>2024-06-27 02:19:06 +0000
committerGitHub <noreply@github.com>2024-06-26 21:19:06 -0500
commit57bec62508c6ae3424977c9db55ad66fc1eb0a42 (patch)
treee7b3b81c68c901a6b2b1811c8a6e1c57b479dd44 /engine/menus/main_menu.asm
parentMerge branch 'master' of https://github.com/pret/pokered (diff)
downloadpokeyellow-57bec62508c6ae3424977c9db55ad66fc1eb0a42.tar.gz
pokeyellow-57bec62508c6ae3424977c9db55ad66fc1eb0a42.tar.xz
pokeyellow-57bec62508c6ae3424977c9db55ad66fc1eb0a42.zip
Improve documentation of some SRAM routines (#114)
Diffstat (limited to 'engine/menus/main_menu.asm')
-rw-r--r--engine/menus/main_menu.asm7
1 files changed, 2 insertions, 5 deletions
diff --git a/engine/menus/main_menu.asm b/engine/menus/main_menu.asm
index ca837143..06f3c2a7 100644
--- a/engine/menus/main_menu.asm
+++ b/engine/menus/main_menu.asm
@@ -276,13 +276,11 @@ DisplayOptionMenu:
ret
CheckForPlayerNameInSRAM:
-; Check if the player name data in SRAM has a string terminator character
-; (indicating that a name may have been saved there) and return whether it does
-; in carry.
ld a, SRAM_ENABLE
ld [MBC1SRamEnable], a
- ld a, $1
+ ld a, SRAM_BANKING_MODE
ld [MBC1SRamBankingMode], a
+ assert SRAM_BANKING_MODE == BANK("Save Data")
ld [MBC1SRamBank], a
ld b, NAME_LENGTH
ld hl, sPlayerName
@@ -292,7 +290,6 @@ CheckForPlayerNameInSRAM:
jr z, .found
dec b
jr nz, .loop
-; not found
xor a
ld [MBC1SRamEnable], a
ld [MBC1SRamBankingMode], a