diff options
Diffstat (limited to 'src/field_specials.c')
-rw-r--r-- | src/field_specials.c | 330 |
1 files changed, 165 insertions, 165 deletions
diff --git a/src/field_specials.c b/src/field_specials.c index 46f8e7fe8..e19f02c09 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -521,9 +521,9 @@ void SpawnLinkPartnerObjectEvent(void) s16 x = 0; s16 y = 0; u8 movementTypes[] = { - MOVEMENT_TYPE_FACE_UP, - MOVEMENT_TYPE_FACE_LEFT, - MOVEMENT_TYPE_FACE_DOWN, + MOVEMENT_TYPE_FACE_UP, + MOVEMENT_TYPE_FACE_LEFT, + MOVEMENT_TYPE_FACE_DOWN, MOVEMENT_TYPE_FACE_RIGHT }; s8 coordOffsets[][2] = { @@ -1422,8 +1422,8 @@ bool8 Special_AreLeadMonEVsMaxedOut(void) u8 TryUpdateRusturfTunnelState(void) { - if (!FlagGet(FLAG_RUSTURF_TUNNEL_OPENED) - && gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(RUSTURF_TUNNEL) + if (!FlagGet(FLAG_RUSTURF_TUNNEL_OPENED) + && gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(RUSTURF_TUNNEL) && gSaveBlock1Ptr->location.mapNum == MAP_NUM(RUSTURF_TUNNEL)) { if (FlagGet(FLAG_HIDE_RUSTURF_TUNNEL_ROCK_1)) @@ -1710,7 +1710,7 @@ void OffsetCameraForBattle(void) SetCameraPanning(8, 0); } -const struct WindowTemplate gElevatorFloor_WindowTemplate = +const struct WindowTemplate gElevatorFloor_WindowTemplate = { .bg = 0, .tilemapLeft = 21, @@ -2020,27 +2020,27 @@ void BufferVarsForIVRater(void) bool8 UsedPokemonCenterWarp(void) { - static const u16 sPokemonCenters[] = - { - MAP_OLDALE_TOWN_POKEMON_CENTER_1F, - MAP_DEWFORD_TOWN_POKEMON_CENTER_1F, - MAP_LAVARIDGE_TOWN_POKEMON_CENTER_1F, - MAP_FALLARBOR_TOWN_POKEMON_CENTER_1F, - MAP_VERDANTURF_TOWN_POKEMON_CENTER_1F, - MAP_PACIFIDLOG_TOWN_POKEMON_CENTER_1F, - MAP_PETALBURG_CITY_POKEMON_CENTER_1F, - MAP_SLATEPORT_CITY_POKEMON_CENTER_1F, - MAP_MAUVILLE_CITY_POKEMON_CENTER_1F, - MAP_RUSTBORO_CITY_POKEMON_CENTER_1F, - MAP_FORTREE_CITY_POKEMON_CENTER_1F, - MAP_LILYCOVE_CITY_POKEMON_CENTER_1F, - MAP_MOSSDEEP_CITY_POKEMON_CENTER_1F, - MAP_SOOTOPOLIS_CITY_POKEMON_CENTER_1F, - MAP_EVER_GRANDE_CITY_POKEMON_CENTER_1F, - MAP_EVER_GRANDE_CITY_POKEMON_LEAGUE_1F, - MAP_BATTLE_FRONTIER_POKEMON_CENTER_1F, - MAP_UNION_ROOM, - 0xFFFF + static const u16 sPokemonCenters[] = + { + MAP_OLDALE_TOWN_POKEMON_CENTER_1F, + MAP_DEWFORD_TOWN_POKEMON_CENTER_1F, + MAP_LAVARIDGE_TOWN_POKEMON_CENTER_1F, + MAP_FALLARBOR_TOWN_POKEMON_CENTER_1F, + MAP_VERDANTURF_TOWN_POKEMON_CENTER_1F, + MAP_PACIFIDLOG_TOWN_POKEMON_CENTER_1F, + MAP_PETALBURG_CITY_POKEMON_CENTER_1F, + MAP_SLATEPORT_CITY_POKEMON_CENTER_1F, + MAP_MAUVILLE_CITY_POKEMON_CENTER_1F, + MAP_RUSTBORO_CITY_POKEMON_CENTER_1F, + MAP_FORTREE_CITY_POKEMON_CENTER_1F, + MAP_LILYCOVE_CITY_POKEMON_CENTER_1F, + MAP_MOSSDEEP_CITY_POKEMON_CENTER_1F, + MAP_SOOTOPOLIS_CITY_POKEMON_CENTER_1F, + MAP_EVER_GRANDE_CITY_POKEMON_CENTER_1F, + MAP_EVER_GRANDE_CITY_POKEMON_LEAGUE_1F, + MAP_BATTLE_FRONTIER_POKEMON_CENTER_1F, + MAP_UNION_ROOM, + 0xFFFF }; int i; @@ -2073,71 +2073,71 @@ void UpdateFrontierManiac(u16 daysSince) void ShowFrontierManiacMessage(void) { - static const u8 *const sFrontierManiacMessages[][FRONTIER_MANIAC_MESSAGE_COUNT] = + static const u8 *const sFrontierManiacMessages[][FRONTIER_MANIAC_MESSAGE_COUNT] = { [FRONTIER_MANIAC_BATTLE_TOWER_SINGLES] = - { - BattleFrontier_Lounge2_Text_SalonMaidenIsThere, - BattleFrontier_Lounge2_Text_SalonMaidenSilverMons, - BattleFrontier_Lounge2_Text_SalonMaidenGoldMons + { + BattleFrontier_Lounge2_Text_SalonMaidenIsThere, + BattleFrontier_Lounge2_Text_SalonMaidenSilverMons, + BattleFrontier_Lounge2_Text_SalonMaidenGoldMons }, [FRONTIER_MANIAC_BATTLE_TOWER_DOUBLES] = - { - BattleFrontier_Lounge2_Text_DoubleBattleAdvice1, - BattleFrontier_Lounge2_Text_DoubleBattleAdvice2, - BattleFrontier_Lounge2_Text_DoubleBattleAdvice3 + { + BattleFrontier_Lounge2_Text_DoubleBattleAdvice1, + BattleFrontier_Lounge2_Text_DoubleBattleAdvice2, + BattleFrontier_Lounge2_Text_DoubleBattleAdvice3 }, - [FRONTIER_MANIAC_BATTLE_TOWER_MULTIS] = - { - BattleFrontier_Lounge2_Text_MultiBattleAdvice, - BattleFrontier_Lounge2_Text_MultiBattleAdvice, - BattleFrontier_Lounge2_Text_MultiBattleAdvice + [FRONTIER_MANIAC_BATTLE_TOWER_MULTIS] = + { + BattleFrontier_Lounge2_Text_MultiBattleAdvice, + BattleFrontier_Lounge2_Text_MultiBattleAdvice, + BattleFrontier_Lounge2_Text_MultiBattleAdvice }, [FRONTIER_MANIAC_BATTLE_TOWER_LINK] = - { - BattleFrontier_Lounge2_Text_LinkMultiBattleAdvice, - BattleFrontier_Lounge2_Text_LinkMultiBattleAdvice, - BattleFrontier_Lounge2_Text_LinkMultiBattleAdvice + { + BattleFrontier_Lounge2_Text_LinkMultiBattleAdvice, + BattleFrontier_Lounge2_Text_LinkMultiBattleAdvice, + BattleFrontier_Lounge2_Text_LinkMultiBattleAdvice }, [FRONTIER_MANIAC_BATTLE_DOME] = - { - BattleFrontier_Lounge2_Text_DomeAceIsThere, - BattleFrontier_Lounge2_Text_DomeAceSilverMons, - BattleFrontier_Lounge2_Text_DomeAceGoldMons + { + BattleFrontier_Lounge2_Text_DomeAceIsThere, + BattleFrontier_Lounge2_Text_DomeAceSilverMons, + BattleFrontier_Lounge2_Text_DomeAceGoldMons }, [FRONTIER_MANIAC_BATTLE_FACTORY] = - { - BattleFrontier_Lounge2_Text_FactoryHeadIsThere, - BattleFrontier_Lounge2_Text_FactoryHeadSilverMons, - BattleFrontier_Lounge2_Text_FactoryHeadGoldMons + { + BattleFrontier_Lounge2_Text_FactoryHeadIsThere, + BattleFrontier_Lounge2_Text_FactoryHeadSilverMons, + BattleFrontier_Lounge2_Text_FactoryHeadGoldMons }, [FRONTIER_MANIAC_BATTLE_PALACE] = - { - BattleFrontier_Lounge2_Text_PalaceMavenIsThere, - BattleFrontier_Lounge2_Text_PalaceMavenSilverMons, - BattleFrontier_Lounge2_Text_PalaceMavenGoldMons + { + BattleFrontier_Lounge2_Text_PalaceMavenIsThere, + BattleFrontier_Lounge2_Text_PalaceMavenSilverMons, + BattleFrontier_Lounge2_Text_PalaceMavenGoldMons }, [FRONTIER_MANIAC_BATTLE_ARENA] = - { - BattleFrontier_Lounge2_Text_ArenaTycoonIsThere, - BattleFrontier_Lounge2_Text_ArenaTycoonSilverMons, - BattleFrontier_Lounge2_Text_ArenaTycoonGoldMons + { + BattleFrontier_Lounge2_Text_ArenaTycoonIsThere, + BattleFrontier_Lounge2_Text_ArenaTycoonSilverMons, + BattleFrontier_Lounge2_Text_ArenaTycoonGoldMons }, - [FRONTIER_MANIAC_BATTLE_PIKE] = - { - BattleFrontier_Lounge2_Text_PikeQueenIsThere, - BattleFrontier_Lounge2_Text_PikeQueenSilverMons, - BattleFrontier_Lounge2_Text_PikeQueenGoldMons + [FRONTIER_MANIAC_BATTLE_PIKE] = + { + BattleFrontier_Lounge2_Text_PikeQueenIsThere, + BattleFrontier_Lounge2_Text_PikeQueenSilverMons, + BattleFrontier_Lounge2_Text_PikeQueenGoldMons }, [FRONTIER_MANIAC_BATTLE_PYRAMID] = - { - BattleFrontier_Lounge2_Text_PyramidKingIsThere, - BattleFrontier_Lounge2_Text_PyramidKingSilverMons, - BattleFrontier_Lounge2_Text_PyramidKingGoldMons + { + BattleFrontier_Lounge2_Text_PyramidKingIsThere, + BattleFrontier_Lounge2_Text_PyramidKingSilverMons, + BattleFrontier_Lounge2_Text_PyramidKingGoldMons }, }; - static const u8 sFrontierManiacStreakThresholds[][FRONTIER_MANIAC_MESSAGE_COUNT - 1] = + static const u8 sFrontierManiacStreakThresholds[][FRONTIER_MANIAC_MESSAGE_COUNT - 1] = { [FRONTIER_MANIAC_BATTLE_TOWER_SINGLES] = { 21, 56 }, [FRONTIER_MANIAC_BATTLE_TOWER_DOUBLES] = { 21, 35 }, @@ -2161,7 +2161,7 @@ void ShowFrontierManiacMessage(void) case FRONTIER_MANIAC_BATTLE_TOWER_DOUBLES: case FRONTIER_MANIAC_BATTLE_TOWER_MULTIS: case FRONTIER_MANIAC_BATTLE_TOWER_LINK: - if (gSaveBlock2Ptr->frontier.towerWinStreaks[facility][FRONTIER_LVL_50] + if (gSaveBlock2Ptr->frontier.towerWinStreaks[facility][FRONTIER_LVL_50] >= gSaveBlock2Ptr->frontier.towerWinStreaks[facility][FRONTIER_LVL_OPEN]) { winStreak = gSaveBlock2Ptr->frontier.towerWinStreaks[facility][FRONTIER_LVL_50]; @@ -2172,7 +2172,7 @@ void ShowFrontierManiacMessage(void) } break; case FRONTIER_MANIAC_BATTLE_DOME: - if (gSaveBlock2Ptr->frontier.domeWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_50] + if (gSaveBlock2Ptr->frontier.domeWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_50] >= gSaveBlock2Ptr->frontier.domeWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_OPEN]) { winStreak = gSaveBlock2Ptr->frontier.domeWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_50]; @@ -2183,7 +2183,7 @@ void ShowFrontierManiacMessage(void) } break; case FRONTIER_MANIAC_BATTLE_FACTORY: - if (gSaveBlock2Ptr->frontier.factoryWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_50] + if (gSaveBlock2Ptr->frontier.factoryWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_50] >= gSaveBlock2Ptr->frontier.factoryWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_OPEN]) { winStreak = gSaveBlock2Ptr->frontier.factoryWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_50]; @@ -2194,7 +2194,7 @@ void ShowFrontierManiacMessage(void) } break; case FRONTIER_MANIAC_BATTLE_PALACE: - if (gSaveBlock2Ptr->frontier.palaceWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_50] + if (gSaveBlock2Ptr->frontier.palaceWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_50] >= gSaveBlock2Ptr->frontier.palaceWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_OPEN]) { winStreak = gSaveBlock2Ptr->frontier.palaceWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_50]; @@ -2205,7 +2205,7 @@ void ShowFrontierManiacMessage(void) } break; case FRONTIER_MANIAC_BATTLE_ARENA: - if (gSaveBlock2Ptr->frontier.arenaWinStreaks[FRONTIER_LVL_50] + if (gSaveBlock2Ptr->frontier.arenaWinStreaks[FRONTIER_LVL_50] >= gSaveBlock2Ptr->frontier.arenaWinStreaks[FRONTIER_LVL_OPEN]) { winStreak = gSaveBlock2Ptr->frontier.arenaWinStreaks[FRONTIER_LVL_50]; @@ -2216,7 +2216,7 @@ void ShowFrontierManiacMessage(void) } break; case FRONTIER_MANIAC_BATTLE_PIKE: - if (gSaveBlock2Ptr->frontier.pikeWinStreaks[FRONTIER_LVL_50] + if (gSaveBlock2Ptr->frontier.pikeWinStreaks[FRONTIER_LVL_50] >= gSaveBlock2Ptr->frontier.pikeWinStreaks[FRONTIER_LVL_OPEN]) { winStreak = gSaveBlock2Ptr->frontier.pikeWinStreaks[FRONTIER_LVL_50]; @@ -2227,7 +2227,7 @@ void ShowFrontierManiacMessage(void) } break; case FRONTIER_MANIAC_BATTLE_PYRAMID: - if (gSaveBlock2Ptr->frontier.pyramidWinStreaks[FRONTIER_LVL_50] + if (gSaveBlock2Ptr->frontier.pyramidWinStreaks[FRONTIER_LVL_50] >= gSaveBlock2Ptr->frontier.pyramidWinStreaks[FRONTIER_LVL_OPEN]) { winStreak = gSaveBlock2Ptr->frontier.pyramidWinStreaks[FRONTIER_LVL_50]; @@ -2429,13 +2429,13 @@ void ShowScrollableMultichoice(void) } } -static const u8 *const sScrollableMultichoiceOptions[][MAX_SCROLL_MULTI_LENGTH] = +static const u8 *const sScrollableMultichoiceOptions[][MAX_SCROLL_MULTI_LENGTH] = { - [SCROLL_MULTI_NONE] = + [SCROLL_MULTI_NONE] = { gText_Exit }, - [SCROLL_MULTI_GLASS_WORKSHOP_VENDOR] = + [SCROLL_MULTI_GLASS_WORKSHOP_VENDOR] = { gText_BlueFlute, gText_YellowFlute, @@ -2446,7 +2446,7 @@ static const u8 *const sScrollableMultichoiceOptions[][MAX_SCROLL_MULTI_LENGTH] gText_PrettyDesk, gText_Exit }, - [SCROLL_MULTI_POKEMON_FAN_CLUB_RATER] = + [SCROLL_MULTI_POKEMON_FAN_CLUB_RATER] = { gText_0Pts, gText_10Pts, @@ -2461,7 +2461,7 @@ static const u8 *const sScrollableMultichoiceOptions[][MAX_SCROLL_MULTI_LENGTH] gText_100Pts, gText_QuestionMark }, - [SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_1] = + [SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_1] = { gText_KissPoster16BP, gText_KissCushion32BP, @@ -2535,7 +2535,7 @@ static const u8 *const sScrollableMultichoiceOptions[][MAX_SCROLL_MULTI_LENGTH] gText_ExchangeService, gText_Exit }, - [SCROLL_MULTI_BF_MOVE_TUTOR_1] = + [SCROLL_MULTI_BF_MOVE_TUTOR_1] = { gText_Softboiled16BP, gText_SeismicToss24BP, @@ -2549,7 +2549,7 @@ static const u8 *const sScrollableMultichoiceOptions[][MAX_SCROLL_MULTI_LENGTH] gText_SwordsDance48BP, gText_Exit }, - [SCROLL_MULTI_BF_MOVE_TUTOR_2] = + [SCROLL_MULTI_BF_MOVE_TUTOR_2] = { gText_DefenseCurl16BP, gText_Snore24BP, @@ -2896,7 +2896,7 @@ void UpdateFrontierGambler(u16 daysSince) void ShowFrontierGamblerLookingMessage(void) { - static const u8 *const sFrontierGamblerLookingMessages[] = + static const u8 *const sFrontierGamblerLookingMessages[] = { BattleFrontier_Lounge3_Text_ChallengeBattleTowerSingle, BattleFrontier_Lounge3_Text_ChallengeBattleTowerDouble, @@ -2919,7 +2919,7 @@ void ShowFrontierGamblerLookingMessage(void) void ShowFrontierGamblerGoMessage(void) { - static const u8 *const sFrontierGamblerGoMessages[] = + static const u8 *const sFrontierGamblerGoMessages[] = { BattleFrontier_Lounge3_Text_GetToBattleTowerSingle, BattleFrontier_Lounge3_Text_GetToBattleTowerDouble, @@ -2940,19 +2940,19 @@ void ShowFrontierGamblerGoMessage(void) void FrontierGamblerSetWonOrLost(bool8 won) { - static const u16 sFrontierChallenges[] = + static const u16 sFrontierChallenges[] = { FRONTIER_CHALLENGE(FRONTIER_FACILITY_TOWER, FRONTIER_MODE_SINGLES), FRONTIER_CHALLENGE(FRONTIER_FACILITY_TOWER, FRONTIER_MODE_DOUBLES), FRONTIER_CHALLENGE(FRONTIER_FACILITY_TOWER, FRONTIER_MODE_MULTIS), FRONTIER_CHALLENGE(FRONTIER_FACILITY_DOME, FRONTIER_MODE_SINGLES), FRONTIER_CHALLENGE(FRONTIER_FACILITY_DOME, FRONTIER_MODE_DOUBLES), - FRONTIER_CHALLENGE(FRONTIER_FACILITY_FACTORY, FRONTIER_MODE_SINGLES), - FRONTIER_CHALLENGE(FRONTIER_FACILITY_FACTORY, FRONTIER_MODE_DOUBLES), - FRONTIER_CHALLENGE(FRONTIER_FACILITY_PALACE, FRONTIER_MODE_SINGLES), - FRONTIER_CHALLENGE(FRONTIER_FACILITY_PALACE, FRONTIER_MODE_DOUBLES), - FRONTIER_CHALLENGE(FRONTIER_FACILITY_ARENA, FRONTIER_MODE_SINGLES), - FRONTIER_CHALLENGE(FRONTIER_FACILITY_PIKE, FRONTIER_MODE_SINGLES), + FRONTIER_CHALLENGE(FRONTIER_FACILITY_FACTORY, FRONTIER_MODE_SINGLES), + FRONTIER_CHALLENGE(FRONTIER_FACILITY_FACTORY, FRONTIER_MODE_DOUBLES), + FRONTIER_CHALLENGE(FRONTIER_FACILITY_PALACE, FRONTIER_MODE_SINGLES), + FRONTIER_CHALLENGE(FRONTIER_FACILITY_PALACE, FRONTIER_MODE_DOUBLES), + FRONTIER_CHALLENGE(FRONTIER_FACILITY_ARENA, FRONTIER_MODE_SINGLES), + FRONTIER_CHALLENGE(FRONTIER_FACILITY_PIKE, FRONTIER_MODE_SINGLES), FRONTIER_CHALLENGE(FRONTIER_FACILITY_PYRAMID, FRONTIER_MODE_SINGLES) }; @@ -3140,31 +3140,31 @@ static void HideFrontierExchangeCornerItemIcon(u16 menu, u16 unused) } static const u16 sBattleFrontier_TutorMoves1[] = -{ - MOVE_SOFT_BOILED, - MOVE_SEISMIC_TOSS, - MOVE_DREAM_EATER, - MOVE_MEGA_PUNCH, - MOVE_MEGA_KICK, - MOVE_BODY_SLAM, - MOVE_ROCK_SLIDE, - MOVE_COUNTER, - MOVE_THUNDER_WAVE, - MOVE_SWORDS_DANCE +{ + MOVE_SOFT_BOILED, + MOVE_SEISMIC_TOSS, + MOVE_DREAM_EATER, + MOVE_MEGA_PUNCH, + MOVE_MEGA_KICK, + MOVE_BODY_SLAM, + MOVE_ROCK_SLIDE, + MOVE_COUNTER, + MOVE_THUNDER_WAVE, + MOVE_SWORDS_DANCE }; static const u16 sBattleFrontier_TutorMoves2[] = -{ - MOVE_DEFENSE_CURL, - MOVE_SNORE, - MOVE_MUD_SLAP, - MOVE_SWIFT, - MOVE_ICY_WIND, - MOVE_ENDURE, - MOVE_PSYCH_UP, - MOVE_ICE_PUNCH, - MOVE_THUNDER_PUNCH, - MOVE_FIRE_PUNCH +{ + MOVE_DEFENSE_CURL, + MOVE_SNORE, + MOVE_MUD_SLAP, + MOVE_SWIFT, + MOVE_ICY_WIND, + MOVE_ENDURE, + MOVE_PSYCH_UP, + MOVE_ICE_PUNCH, + MOVE_THUNDER_PUNCH, + MOVE_FIRE_PUNCH }; void BufferBattleFrontierTutorMoveName(void) @@ -3181,7 +3181,7 @@ void BufferBattleFrontierTutorMoveName(void) static void ShowBattleFrontierTutorWindow(u8 menu, u16 selection) { - static const struct WindowTemplate sBattleFrontierTutor_WindowTemplate = + static const struct WindowTemplate sBattleFrontierTutor_WindowTemplate = { .bg = 0, .tilemapLeft = 1, @@ -3205,7 +3205,7 @@ static void ShowBattleFrontierTutorWindow(u8 menu, u16 selection) static void ShowBattleFrontierTutorMoveDescription(u8 menu, u16 selection) { - static const u8 *const sBattleFrontier_TutorMoveDescriptions1[] = + static const u8 *const sBattleFrontier_TutorMoveDescriptions1[] = { BattleFrontier_Lounge7_Text_SoftboiledDesc, BattleFrontier_Lounge7_Text_SeismicTossDesc, @@ -3220,7 +3220,7 @@ static void ShowBattleFrontierTutorMoveDescription(u8 menu, u16 selection) gText_Exit, }; - static const u8 *const sBattleFrontier_TutorMoveDescriptions2[] = + static const u8 *const sBattleFrontier_TutorMoveDescriptions2[] = { BattleFrontier_Lounge7_Text_DefenseCurlDesc, BattleFrontier_Lounge7_Text_SnoreDesc, @@ -3335,20 +3335,20 @@ void sub_813AF48(void) } // Undefine Scrollable Multichoice task data macros -#undef tMaxItemsOnScreen -#undef tNumItems -#undef tLeft -#undef tTop -#undef tWidth -#undef tHeight -#undef tKeepOpenAfterSelect -#undef tScrollOffset -#undef tSelectedRow -#undef tScrollMultiId -#undef tScrollArrowId -#undef tWindowId -#undef tListTaskId -#undef tTaskId +#undef tMaxItemsOnScreen +#undef tNumItems +#undef tLeft +#undef tTop +#undef tWidth +#undef tHeight +#undef tKeepOpenAfterSelect +#undef tScrollOffset +#undef tSelectedRow +#undef tScrollMultiId +#undef tScrollArrowId +#undef tWindowId +#undef tListTaskId +#undef tTaskId void DoDeoxysRockInteraction(void) { @@ -3730,7 +3730,7 @@ bool32 ShouldDistributeEonTicket(void) { if (!VarGet(VAR_DISTRIBUTE_EON_TICKET)) return FALSE; - + return TRUE; } @@ -3794,17 +3794,17 @@ static void Task_LinkRetireStatusWithBattleTowerPartner(u8 taskId) gSpecialVar_0x8005 = gBlockRecvBuffer[1][0]; ResetBlockReceivedFlag(1); - if (gSpecialVar_0x8004 == BATTLE_TOWER_LINK_RETIRE + if (gSpecialVar_0x8004 == BATTLE_TOWER_LINK_RETIRE && gSpecialVar_0x8005 == BATTLE_TOWER_LINK_RETIRE) { gSpecialVar_Result = BATTLE_TOWER_LINKSTAT_BOTH_RETIRE; } - else if (gSpecialVar_0x8004 == BATTLE_TOWER_LINK_CONTINUE + else if (gSpecialVar_0x8004 == BATTLE_TOWER_LINK_CONTINUE && gSpecialVar_0x8005 == BATTLE_TOWER_LINK_RETIRE) { gSpecialVar_Result = BATTLE_TOWER_LINKSTAT_MEMBER_RETIRE; } - else if (gSpecialVar_0x8004 == BATTLE_TOWER_LINK_RETIRE + else if (gSpecialVar_0x8004 == BATTLE_TOWER_LINK_RETIRE && gSpecialVar_0x8005 == BATTLE_TOWER_LINK_CONTINUE) { gSpecialVar_Result = BATTLE_TOWER_LINKSTAT_LEADER_RETIRE; @@ -4026,13 +4026,13 @@ bool8 InPokemonCenter(void) } /* Summary of the Lilycove Trainer Fan Club, because it's a little messy - + ## The Fan Club room itself There are initially 4 members of the Fan Club (+ an interviewer), none of whom are fans of the player After becoming the champion there will be 8 members of the Fan Club, 3 of whom are automatically fans of the player After this point, if a club member is a fan of the player they will sit at the front table and comment on the player If they are not fans of the player, they will sit at the far table and can make comments about a different trainer (see BufferFanClubTrainerName) - + ## Gaining/losing fans After every link battle the player will gain a fan if they won, or lose a fan if they lost If the player has at least 3 fans, this is the only way to gain fans @@ -4101,16 +4101,16 @@ void UpdateTrainerFanClubGameClear(void) } // If the player has < 3 fans, gain a new fan whenever the counter reaches 20+ -// Defeating Drake or participating in a Contest increments the counter by 2 +// Defeating Drake or participating in a Contest increments the counter by 2 // Participating at Battle Tower or in a Secret Base battle increments the counter by 1 u8 TryGainNewFanFromCounter(u8 incrementId) { - static const u8 sCounterIncrements[] = - { - [FANCOUNTER_DEFEATED_DRAKE] = 2, - [FANCOUNTER_BATTLED_AT_BASE] = 1, - [FANCOUNTER_FINISHED_CONTEST] = 2, - [FANCOUNTER_USED_BATTLE_TOWER] = 1 + static const u8 sCounterIncrements[] = + { + [FANCOUNTER_DEFEATED_DRAKE] = 2, + [FANCOUNTER_BATTLED_AT_BASE] = 1, + [FANCOUNTER_FINISHED_CONTEST] = 2, + [FANCOUNTER_USED_BATTLE_TOWER] = 1 }; if (VarGet(VAR_LILYCOVE_FAN_CLUB_STATE) == 2) @@ -4143,16 +4143,16 @@ u8 TryGainNewFanFromCounter(u8 incrementId) // If all the members are already fans of the player then this redundantly sets the first fan in the list to be a fan static u16 PlayerGainRandomTrainerFan(void) { - static const u8 sFanClubMemberIds[NUM_TRAINER_FAN_CLUB_MEMBERS] = - { - FANCLUB_MEMBER1, - FANCLUB_MEMBER2, - FANCLUB_MEMBER3, - FANCLUB_MEMBER4, - FANCLUB_MEMBER5, + static const u8 sFanClubMemberIds[NUM_TRAINER_FAN_CLUB_MEMBERS] = + { + FANCLUB_MEMBER1, + FANCLUB_MEMBER2, + FANCLUB_MEMBER3, + FANCLUB_MEMBER4, + FANCLUB_MEMBER5, FANCLUB_MEMBER6, - FANCLUB_MEMBER7, - FANCLUB_MEMBER8 + FANCLUB_MEMBER7, + FANCLUB_MEMBER8 }; u8 i; @@ -4179,16 +4179,16 @@ static u16 PlayerGainRandomTrainerFan(void) // If no fan was lost while looping, the last current fan in the list will stop being a fan static u16 PlayerLoseRandomTrainerFan(void) { - static const u8 sFanClubMemberIds[NUM_TRAINER_FAN_CLUB_MEMBERS] = - { - FANCLUB_MEMBER1, - FANCLUB_MEMBER6, - FANCLUB_MEMBER7, - FANCLUB_MEMBER4, - FANCLUB_MEMBER3, - FANCLUB_MEMBER5, - FANCLUB_MEMBER8, - FANCLUB_MEMBER2 + static const u8 sFanClubMemberIds[NUM_TRAINER_FAN_CLUB_MEMBERS] = + { + FANCLUB_MEMBER1, + FANCLUB_MEMBER6, + FANCLUB_MEMBER7, + FANCLUB_MEMBER4, + FANCLUB_MEMBER3, + FANCLUB_MEMBER5, + FANCLUB_MEMBER8, + FANCLUB_MEMBER2 }; u8 i; |