summaryrefslogtreecommitdiff
path: root/src/pokedex.c
diff options
context:
space:
mode:
authorGriffinR <griffin.g.richards@gmail.com>2020-07-20 18:03:49 -0400
committerGitHub <noreply@github.com>2020-07-20 18:03:49 -0400
commit4dc2ba23f617f0b53a8f4d95e82a71580a808c91 (patch)
tree9522877c5990fcc3877e985f0d1c228a1c42593d /src/pokedex.c
parentc6b4319b682807d714f88857f16287770b483db8 (diff)
parentaeeff84462973b267e62031a945603d96afed716 (diff)
Merge branch 'master' into constants-mapdatasize
Diffstat (limited to 'src/pokedex.c')
-rw-r--r--src/pokedex.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/pokedex.c b/src/pokedex.c
index 8d7ecb896..ea6c69478 100644
--- a/src/pokedex.c
+++ b/src/pokedex.c
@@ -1961,8 +1961,8 @@ static void sub_808D640(void)
static void SortPokedex(u8 dexMode, u8 sortMode)
{
+ s16 i, r5, r10;
u16 vars[3]; //I have no idea why three regular variables are stored in an array, but whatever.
- s16 i;
gPokedexView->pokemonListCount = 0;
@@ -2004,18 +2004,13 @@ static void SortPokedex(u8 dexMode, u8 sortMode)
}
else
{
- bool32 r10;
- s16 r5;
-
- r10 = r5 = i = 0;
- for (i = 0; i < vars[0]; i++)
+ for (i = 0, r5= 0, r10 = 0; i < vars[0]; i++)
{
vars[2] = i + 1;
if (GetSetPokedexFlag(vars[2], 0))
r10 = 1;
if (r10)
{
- asm(""); //Needed to match for some reason
gPokedexView->unk0[r5].dexNum = vars[2];
gPokedexView->unk0[r5].seen = GetSetPokedexFlag(vars[2], 0);
gPokedexView->unk0[r5].owned = GetSetPokedexFlag(vars[2], 1);