From 6db014cc32d28a64499af7d605be3a062560d5e0 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 17 Oct 2019 19:22:03 -0400 Subject: Document party_menu first pass --- src/contest.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'src/contest.c') diff --git a/src/contest.c b/src/contest.c index a3914cf30..20fa9e1a8 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 contestViability; 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; + contestViability = CAN_ENTER_CONTEST_HIGH_RANK; else if (ribbon >= gSpecialVar_ContestRank) - retVal = 1; + contestViability = CAN_ENTER_CONTEST_EQUAL_RANK; else - retVal = 0; - return retVal; + contestViability = CANT_ENTER_CONTEST; + return contestViability; } static void DrawContestantWindowText(void) -- cgit v1.2.3 From aec7eb60892a745115c3521a7f049798f2d84f36 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 31 Oct 2019 14:11:55 -0400 Subject: Clean up party_menu doc --- src/contest.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/contest.c') diff --git a/src/contest.c b/src/contest.c index 20fa9e1a8..2ad189058 100644 --- a/src/contest.c +++ b/src/contest.c @@ -2802,7 +2802,7 @@ void sub_80DACBC(u8 contestType, u8 rank, bool32 isPostgame) u8 GetContestEntryEligibility(struct Pokemon *pkmn) { u8 ribbon; - u8 contestViability; + u8 eligibility; if (GetMonData(pkmn, MON_DATA_IS_EGG)) return CANT_ENTER_CONTEST_EGG; @@ -2833,12 +2833,12 @@ u8 GetContestEntryEligibility(struct Pokemon *pkmn) // Returns 2, 1, or 0 respectively if ribbon's rank is above, equal, or below // the current contest rank. if (ribbon > gSpecialVar_ContestRank) - contestViability = CAN_ENTER_CONTEST_HIGH_RANK; + eligibility = CAN_ENTER_CONTEST_HIGH_RANK; else if (ribbon >= gSpecialVar_ContestRank) - contestViability = CAN_ENTER_CONTEST_EQUAL_RANK; + eligibility = CAN_ENTER_CONTEST_EQUAL_RANK; else - contestViability = CANT_ENTER_CONTEST; - return contestViability; + eligibility = CANT_ENTER_CONTEST; + return eligibility; } static void DrawContestantWindowText(void) -- cgit v1.2.3