Fix Pokedex Number Bug

This commit is contained in:
Skeli 2020-05-12 13:18:53 +03:00
parent 7a9fb8c77e
commit 78a8cd75ce
2 changed files with 9 additions and 6 deletions

View File

@ -30,11 +30,11 @@ DisplayRegionalDexNumHook:
bl bxr1
cmp r0, #0x0
beq UseRegionalDexOrdering
ldr r1, =0x203ACF0
ldr r1, [r1]
add r1, #0x42
ldrb r1, [r1]
cmp r1, #0x0 @;Check if looking at regional dex
ldr r0, =0x203ACF0
ldr r0, [r0]
add r0, #0xC
ldr r0, [r0]
cmp r0, #0x9 @;Check if looking at regional dex
beq UseRegionalDexOrdering
mov r0, r5
ldr r1, =SpeciesToNationalPokedexNum

View File

@ -329,16 +329,19 @@ u16 LoadPokedexViews(u8 type)
u16 i, counter, count, lastMeaningfulIndex;
const u16* dexList;
bool8 showUnseenSpecies = FALSE;
bool8 showUncaughtSpecies = FALSE;
switch (type) {
case 0:
dexList = gPokedexOrder_Regional;
count = gRegionalDexCount;
showUnseenSpecies = TRUE;
showUncaughtSpecies = TRUE;
break;
case 1:
dexList = gPokedexOrder_Alphabetical;
count = gPokedexOrderAlphabeticalCount;
showUncaughtSpecies = TRUE;
break;
case 2:
dexList = gPokedexOrder_Type;
@ -371,7 +374,7 @@ u16 LoadPokedexViews(u8 type)
gPokedexScreenDataPtr->listItem[counter++].id = species | (0 << 16); //Unseen
}
}
else
else if (caught || showUncaughtSpecies)
{
lastMeaningfulIndex = counter + 1;
gPokedexScreenDataPtr->listItem[counter].name = gSpeciesNames[species];