summaryrefslogtreecommitdiff
path: root/src/pokedex.c
diff options
context:
space:
mode:
authorDiegoisawesome <Diegoisawesome@users.noreply.github.com>2019-01-23 14:43:37 -0600
committerGitHub <noreply@github.com>2019-01-23 14:43:37 -0600
commit4cd4cbe13312b1b0bb9c318cc453d084bb5c345f (patch)
tree845639b20a44976fc89bbd89899b4ba055c022ca /src/pokedex.c
parent900f294011ea0eb06c48c28b4b4aea51e5cf32b7 (diff)
parent524db6068e40db9221fa1ef8214009c2f1ace3c8 (diff)
Merge pull request #522 from DizzyEggg/trainer_card
Trainer card
Diffstat (limited to 'src/pokedex.c')
-rw-r--r--src/pokedex.c106
1 files changed, 53 insertions, 53 deletions
diff --git a/src/pokedex.c b/src/pokedex.c
index 8c6ed3159..f99a8226a 100644
--- a/src/pokedex.c
+++ b/src/pokedex.c
@@ -4271,46 +4271,46 @@ s8 GetSetPokedexFlag(u16 nationalDexNo, u8 caseID)
retVal = 0;
switch (caseID)
{
- case FLAG_GET_SEEN:
- if (gSaveBlock2Ptr->pokedex.seen[index] & mask)
+ case FLAG_GET_SEEN:
+ if (gSaveBlock2Ptr->pokedex.seen[index] & mask)
+ {
+ if ((gSaveBlock2Ptr->pokedex.seen[index] & mask) == (gSaveBlock1Ptr->seen1[index] & mask)
+ && (gSaveBlock2Ptr->pokedex.seen[index] & mask) == (gSaveBlock1Ptr->seen2[index] & mask))
+ retVal = 1;
+ else
{
- if ((gSaveBlock2Ptr->pokedex.seen[index] & mask) == (gSaveBlock1Ptr->seen1[index] & mask)
- && (gSaveBlock2Ptr->pokedex.seen[index] & mask) == (gSaveBlock1Ptr->seen2[index] & mask))
- retVal = 1;
- else
- {
- gSaveBlock2Ptr->pokedex.seen[index] &= ~mask;
- gSaveBlock1Ptr->seen1[index] &= ~mask;
- gSaveBlock1Ptr->seen2[index] &= ~mask;
- retVal = 0;
- }
+ gSaveBlock2Ptr->pokedex.seen[index] &= ~mask;
+ gSaveBlock1Ptr->seen1[index] &= ~mask;
+ gSaveBlock1Ptr->seen2[index] &= ~mask;
+ retVal = 0;
}
- break;
- case FLAG_GET_CAUGHT:
- if (gSaveBlock2Ptr->pokedex.owned[index] & mask)
+ }
+ break;
+ case FLAG_GET_CAUGHT:
+ if (gSaveBlock2Ptr->pokedex.owned[index] & mask)
+ {
+ if ((gSaveBlock2Ptr->pokedex.owned[index] & mask) == (gSaveBlock2Ptr->pokedex.seen[index] & mask)
+ && (gSaveBlock2Ptr->pokedex.owned[index] & mask) == (gSaveBlock1Ptr->seen1[index] & mask)
+ && (gSaveBlock2Ptr->pokedex.owned[index] & mask) == (gSaveBlock1Ptr->seen2[index] & mask))
+ retVal = 1;
+ else
{
- if ((gSaveBlock2Ptr->pokedex.owned[index] & mask) == (gSaveBlock2Ptr->pokedex.seen[index] & mask)
- && (gSaveBlock2Ptr->pokedex.owned[index] & mask) == (gSaveBlock1Ptr->seen1[index] & mask)
- && (gSaveBlock2Ptr->pokedex.owned[index] & mask) == (gSaveBlock1Ptr->seen2[index] & mask))
- retVal = 1;
- else
- {
- gSaveBlock2Ptr->pokedex.owned[index] &= ~mask;
- gSaveBlock2Ptr->pokedex.seen[index] &= ~mask;
- gSaveBlock1Ptr->seen1[index] &= ~mask;
- gSaveBlock1Ptr->seen2[index] &= ~mask;
- retVal = 0;
- }
+ gSaveBlock2Ptr->pokedex.owned[index] &= ~mask;
+ gSaveBlock2Ptr->pokedex.seen[index] &= ~mask;
+ gSaveBlock1Ptr->seen1[index] &= ~mask;
+ gSaveBlock1Ptr->seen2[index] &= ~mask;
+ retVal = 0;
}
- break;
- case FLAG_SET_SEEN:
- gSaveBlock2Ptr->pokedex.seen[index] |= mask;
- gSaveBlock1Ptr->seen1[index] |= mask;
- gSaveBlock1Ptr->seen2[index] |= mask;
- break;
- case FLAG_SET_CAUGHT:
- gSaveBlock2Ptr->pokedex.owned[index] |= mask;
- break;
+ }
+ break;
+ case FLAG_SET_SEEN:
+ gSaveBlock2Ptr->pokedex.seen[index] |= mask;
+ gSaveBlock1Ptr->seen1[index] |= mask;
+ gSaveBlock1Ptr->seen2[index] |= mask;
+ break;
+ case FLAG_SET_CAUGHT:
+ gSaveBlock2Ptr->pokedex.owned[index] |= mask;
+ break;
}
return retVal;
}
@@ -4324,14 +4324,14 @@ u16 GetNationalPokedexCount(u8 caseID)
{
switch (caseID)
{
- case FLAG_GET_SEEN:
- if (GetSetPokedexFlag(i + 1, FLAG_GET_SEEN))
- count++;
- break;
- case FLAG_GET_CAUGHT:
- if (GetSetPokedexFlag(i + 1, FLAG_GET_CAUGHT))
- count++;
- break;
+ case FLAG_GET_SEEN:
+ if (GetSetPokedexFlag(i + 1, FLAG_GET_SEEN))
+ count++;
+ break;
+ case FLAG_GET_CAUGHT:
+ if (GetSetPokedexFlag(i + 1, FLAG_GET_CAUGHT))
+ count++;
+ break;
}
}
return count;
@@ -4346,14 +4346,14 @@ u16 GetHoennPokedexCount(u8 caseID)
{
switch (caseID)
{
- case FLAG_GET_SEEN:
- if (GetSetPokedexFlag(HoennToNationalOrder(i + 1), FLAG_GET_SEEN))
- count++;
- break;
- case FLAG_GET_CAUGHT:
- if (GetSetPokedexFlag(HoennToNationalOrder(i + 1), FLAG_GET_CAUGHT))
- count++;
- break;
+ case FLAG_GET_SEEN:
+ if (GetSetPokedexFlag(HoennToNationalOrder(i + 1), FLAG_GET_SEEN))
+ count++;
+ break;
+ case FLAG_GET_CAUGHT:
+ if (GetSetPokedexFlag(HoennToNationalOrder(i + 1), FLAG_GET_CAUGHT))
+ count++;
+ break;
}
}
return count;
@@ -4381,7 +4381,7 @@ u16 sub_80C089C(u8 caseID)
return count;
}
-bool8 sub_80C08E4(void)
+bool16 HasAllHoennMons(void)
{
u16 i;