shithub: pokecrystal

Download patch

ref: 1cb364cc1825d1b149eb4e0fe09d1cab21006208
parent: db8830ba53f27cb36f16012c1efcc94812a36776
author: mid-kid <esteve.varela@gmail.com>
date: Wed Jul 18 15:06:56 EDT 2018

Fix usage of NUM_UNOWN

--- a/engine/pokedex/pokedex.asm
+++ b/engine/pokedex/pokedex.asm
@@ -1317,7 +1317,7 @@
 	call Pokedex_PlaceFrontpicAtHL
 	ld de, 0
 	ld b, 0
-	ld c, 26
+	ld c, NUM_UNOWN
 .loop
 	ld hl, wUnownDex
 	add hl, de
@@ -2486,11 +2486,11 @@
 	ld a, BANK(UnownFont)
 	call FarCopyBytes
 	ld hl, sScratch + $188
-	ld bc, 27 tiles
+	ld bc, (NUM_UNOWN + 1) tiles
 	call Pokedex_InvertTiles
 	ld de, sScratch + $188
 	ld hl, vTiles2 tile $40
-	lb bc, BANK(Pokedex_LoadUnownFont), 27
+	lb bc, BANK(Pokedex_LoadUnownFont), NUM_UNOWN + 1
 	call Request2bpp
 	call CloseSRAM
 	ret