diff options
| author | Sylvie <35663410+Rangi42@users.noreply.github.com> | 2024-07-24 12:21:59 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-24 12:21:59 -0400 |
| commit | 6e3ab0a9e97ff14123ac65f56cb4b4ddab45b695 (patch) | |
| tree | 32feac5e86fbac9eec6f40c14a19c8bd89c1b52d /home | |
| parent | Identify various flag labels and bit constants (#454) (diff) | |
| download | pokeyellow-6e3ab0a9e97ff14123ac65f56cb4b4ddab45b695.tar.gz pokeyellow-6e3ab0a9e97ff14123ac65f56cb4b4ddab45b695.tar.xz pokeyellow-6e3ab0a9e97ff14123ac65f56cb4b4ddab45b695.zip | |
Identify wcd6d as wNameBuffer and others (#455)
Diffstat (limited to 'home')
| -rw-r--r-- | home/list_menu.asm | 2 | ||||
| -rw-r--r-- | home/names.asm | 19 | ||||
| -rw-r--r-- | home/names2.asm | 2 | ||||
| -rw-r--r-- | home/pokemon.asm | 4 |
4 files changed, 13 insertions, 14 deletions
diff --git a/home/list_menu.asm b/home/list_menu.asm index 1629b188..3d864222 100644 --- a/home/list_menu.asm +++ b/home/list_menu.asm @@ -156,7 +156,7 @@ DisplayListMenuIDLoop:: ld a, [wWhichPokemon] call GetPartyMonName .storeChosenEntry ; store the menu entry that the player chose and return - ld de, wcd6d + ld de, wNameBuffer call CopyToStringBuffer ld a, CHOSE_MENU_ITEM ld [wMenuExitMethod], a diff --git a/home/names.asm b/home/names.asm index f7751fa0..2e5e1501 100644 --- a/home/names.asm +++ b/home/names.asm @@ -8,14 +8,14 @@ GetMonName:: ld a, [wd11e] dec a ld hl, MonsterNames - ld c, 10 + ld c, NAME_LENGTH - 1 ld b, 0 call AddNTimes - ld de, wcd6d + ld de, wNameBuffer push de - ld bc, 10 + ld bc, NAME_LENGTH - 1 call CopyData - ld hl, wcd6d + 10 + ld hl, wNameBuffer + NAME_LENGTH - 1 ld [hl], "@" pop de pop af @@ -25,8 +25,7 @@ GetMonName:: ret GetItemName:: -; given an item ID at [wd11e], store the name of the item into a string -; starting at wcd6d +; given an item ID at [wd11e], store the name of the item in wNameBuffer push hl push bc ld a, [wd11e] @@ -44,13 +43,13 @@ GetItemName:: .Machine call GetMachineName .Finish - ld de, wcd6d ; pointer to where item name is stored in RAM + ld de, wNameBuffer pop bc pop hl ret GetMachineName:: -; copies the name of the TM/HM in [wd11e] to wcd6d +; copies the name of the TM/HM in [wd11e] to wNameBuffer push hl push de push bc @@ -69,7 +68,7 @@ GetMachineName:: ld hl, TechnicalPrefix ; points to "TM" ld bc, 2 .WriteMachinePrefix - ld de, wcd6d + ld de, wNameBuffer call CopyData ; now get the machine number and convert it to text @@ -136,6 +135,6 @@ GetMoveName:: ld a, BANK(MoveNames) ld [wPredefBank], a call GetName - ld de, wcd6d ; pointer to where move name is stored in RAM + ld de, wNameBuffer pop hl ret diff --git a/home/names2.asm b/home/names2.asm index c27739d7..cd3823fd 100644 --- a/home/names2.asm +++ b/home/names2.asm @@ -83,7 +83,7 @@ GetName:: jr nz, .nextName ld h, d ld l, e - ld de, wcd6d + ld de, wNameBuffer ld bc, NAME_BUFFER_LENGTH call CopyData .gotPtr diff --git a/home/pokemon.asm b/home/pokemon.asm index 131fbd85..b228f086 100644 --- a/home/pokemon.asm +++ b/home/pokemon.asm @@ -435,7 +435,7 @@ GetMonHeader:: ld [MBC1RomBank], a ret -; copy party pokemon's name to wcd6d +; copy party pokemon's name to wNameBuffer GetPartyMonName2:: ld a, [wWhichPokemon] ; index within party ld hl, wPartyMonNicks @@ -445,7 +445,7 @@ GetPartyMonName:: push hl push bc call SkipFixedLengthTextEntries ; add NAME_LENGTH to hl, a times - ld de, wcd6d + ld de, wNameBuffer push de ld bc, NAME_LENGTH call CopyData |
