stop getname from applying to all names

This commit is contained in:
May Evans 2022-08-31 16:27:35 +01:00
parent dbd504a154
commit 40180459ee

View file

@ -18,17 +18,16 @@ GetName::
ld a, [wd0b5]
ld [wd11e], a
; TM names are separate from item names.
; BUG: This applies to all names instead of just items.
ASSERT NUM_POKEMON_INDEXES < HM01, \
"A bug in GetName will get TM/HM names for Pokémon above ${x:HM01}."
ASSERT NUM_ATTACKS < HM01, \
"A bug in GetName will get TM/HM names for moves above ${x:HM01}."
ASSERT NUM_TRAINERS < HM01, \
"A bug in GetName will get TM/HM names for trainers above ${x:HM01}."
push bc ; this fixes some frustrating bollocks - PvK
ld b, a
ld a, [wNameListType]
cp ITEM_NAME
ld a, b
pop bc
jr nz, .notMachine
cp HM01
jp nc, GetMachineName
.notMachine
ldh a, [hLoadedROMBank]
push af
push hl