summaryrefslogtreecommitdiff
path: root/src/contest.c
diff options
context:
space:
mode:
authorhuderlem <huderlem@gmail.com>2019-10-31 21:36:56 -0500
committerGitHub <noreply@github.com>2019-10-31 21:36:56 -0500
commit6eaac9ea9d221e37d801064c73ce61dc3467b643 (patch)
treec724683997ab8ab5729e02c0232bdd3d171dd120 /src/contest.c
parent218fcd99b395777e99b3b6b9478a3d97c7a7fc87 (diff)
parent27169f634b27a8985945e8b592f3f4ce0a38c53e (diff)
Merge pull request #863 from GriffinRichards/doc-partymenu
Document party menu
Diffstat (limited to 'src/contest.c')
-rw-r--r--src/contest.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/contest.c b/src/contest.c
index a3914cf30..2ad189058 100644
--- a/src/contest.c
+++ b/src/contest.c
@@ -2799,16 +2799,15 @@ void sub_80DACBC(u8 contestType, u8 rank, bool32 isPostgame)
}
}
-// GetContestAvailability?
-u8 sub_80DAE0C(struct Pokemon *pkmn)
+u8 GetContestEntryEligibility(struct Pokemon *pkmn)
{
u8 ribbon;
- u8 retVal;
+ u8 eligibility;
if (GetMonData(pkmn, MON_DATA_IS_EGG))
- return 3;
+ return CANT_ENTER_CONTEST_EGG;
if (GetMonData(pkmn, MON_DATA_HP) == 0)
- return 4;
+ return CANT_ENTER_CONTEST_FAINTED;
switch (gSpecialVar_ContestCategory)
{
case CONTEST_CATEGORY_COOL:
@@ -2827,19 +2826,19 @@ u8 sub_80DAE0C(struct Pokemon *pkmn)
ribbon = GetMonData(pkmn, MON_DATA_TOUGH_RIBBON);
break;
default:
- return 0;
+ return CANT_ENTER_CONTEST;
}
// Couldn't get this to match any other way.
// Returns 2, 1, or 0 respectively if ribbon's rank is above, equal, or below
// the current contest rank.
if (ribbon > gSpecialVar_ContestRank)
- retVal = 2;
+ eligibility = CAN_ENTER_CONTEST_HIGH_RANK;
else if (ribbon >= gSpecialVar_ContestRank)
- retVal = 1;
+ eligibility = CAN_ENTER_CONTEST_EQUAL_RANK;
else
- retVal = 0;
- return retVal;
+ eligibility = CANT_ENTER_CONTEST;
+ return eligibility;
}
static void DrawContestantWindowText(void)