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