shithub: pokecrystal

Download patch

ref: b5a9e83a94f54c43fedca004fbd7223d6f144fc0
parent: c9cb67141bd13db51b8f6cb79f158cbca21660d0
author: Rangi <remy.oukaour+rangi42@gmail.com>
date: Sun Jul 29 12:00:11 EDT 2018

Fix reviewed issues.

Pokedex_PrintListing has a comment noting how it depends on wCurSpecies == wNamedObjectIndexBuffer; an assert would be more convenient, but is not possible since WRAM label addresses are not defined yet here.

--- a/engine/items/tmhm.asm
+++ b/engine/items/tmhm.asm
@@ -381,7 +381,7 @@
 	ld [wTempTMHM], a
 .okay
 	predef GetTMHMMove
-	ld a, [wTempTMHM]
+	ld a, [wNamedObjectIndexBuffer]
 	ld [wPutativeTMHMMove], a
 	call GetMoveName
 	pop hl
--- a/engine/pokedex/pokedex.asm
+++ b/engine/pokedex/pokedex.asm
@@ -1492,7 +1492,7 @@
 .loop
 	push af
 	ld a, [de]
-	ld [wTempSpecies], a
+	ld [wTempSpecies], a ; also sets wNamedObjectIndexBuffer
 	push de
 	push hl
 	call .PrintEntry
--- a/home/names.asm
+++ b/home/names.asm
@@ -2,10 +2,10 @@
 ; entries correspond to GetName constants (see constants/text_constants.asm)
 	dba PokemonNames        ; MON_NAME (not used; jumps to GetPokemonName)
 	dba MoveNames           ; MOVE_NAME
-	dbw 0, NULL             ; DUMMY_NAME
+	dba NULL                ; DUMMY_NAME
 	dba ItemNames           ; ITEM_NAME
-	dbw 0, wPartyMonOT       ; PARTY_OT_NAME
-	dbw 0, wOTPartyMonOT     ; ENEMY_OT_NAME
+	dbw 0, wPartyMonOT      ; PARTY_OT_NAME
+	dbw 0, wOTPartyMonOT    ; ENEMY_OT_NAME
 	dba TrainerClassNames   ; TRAINER_NAME
 	dbw 4, MoveDescriptions ; MOVE_DESC_NAME_BROKEN (wrong bank)