From 71dc5edf2e590c85b5874f82dde3b418e5769450 Mon Sep 17 00:00:00 2001 From: ExpoSeed <> Date: Mon, 27 Jul 2020 17:10:42 -0500 Subject: Document some battle_util.c --- src/battle_script_commands.c | 2 +- src/battle_util.c | 8 ++++---- src/pokemon.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 4e0e087b6..994d35625 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -5471,7 +5471,7 @@ static void Cmd_switchineffects(void) s32 i; gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]); - sub_803FA70(gActiveBattler); + UpdateSentPokesToOpponentValue(gActiveBattler); gHitMarker &= ~(HITMARKER_FAINTED(gActiveBattler)); gSpecialStatuses[gActiveBattler].flag40 = 0; diff --git a/src/battle_util.c b/src/battle_util.c index 9cc2252b6..a579f7edd 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -259,7 +259,7 @@ void ResetSentPokesToOpponentValue(void) gSentPokesToOpponent[(i & BIT_FLANK) >> 1] = bits; } -void sub_803F9EC(u8 battler) +void OpponentSwitchInResetSentPokesToOpponent(u8 battler) { s32 i = 0; u32 bits = 0; @@ -279,11 +279,11 @@ void sub_803F9EC(u8 battler) } } -void sub_803FA70(u8 battler) +void UpdateSentPokesToOpponentValue(u8 battler) { if (GetBattlerSide(battler) == B_SIDE_OPPONENT) { - sub_803F9EC(battler); + OpponentSwitchInResetSentPokesToOpponent(battler); } else { @@ -1250,7 +1250,7 @@ bool8 HandleFaintedMonActions(void) gBattleStruct->faintedActionsState = 3; break; case 2: - sub_803F9EC(gBattlerFainted); + OpponentSwitchInResetSentPokesToOpponent(gBattlerFainted); if (++gBattleStruct->faintedActionsBattlerId == gBattlersCount) gBattleStruct->faintedActionsState = 3; else diff --git a/src/pokemon.c b/src/pokemon.c index 80e93c568..b26f2f412 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -4628,7 +4628,7 @@ void CopyPlayerPartyMonToBattleData(u8 battlerId, u8 partyIndex) gBattleMons[battlerId].statStages[i] = 6; gBattleMons[battlerId].status2 = 0; - sub_803FA70(battlerId); + UpdateSentPokesToOpponentValue(battlerId); ClearTemporarySpeciesSpriteData(battlerId, FALSE); } -- cgit v1.2.3 From b401e2eb86dba8a48c12fec75c2201de7fb1ec63 Mon Sep 17 00:00:00 2001 From: ExpoSeed <> Date: Mon, 27 Jul 2020 21:22:16 -0500 Subject: Fix naming style of function --- src/battle_util.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/battle_util.c b/src/battle_util.c index a579f7edd..89fe95fbc 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -259,7 +259,7 @@ void ResetSentPokesToOpponentValue(void) gSentPokesToOpponent[(i & BIT_FLANK) >> 1] = bits; } -void OpponentSwitchInResetSentPokesToOpponent(u8 battler) +void OpponentSwitchInResetSentPokesToOpponentValue(u8 battler) { s32 i = 0; u32 bits = 0; @@ -283,7 +283,7 @@ void UpdateSentPokesToOpponentValue(u8 battler) { if (GetBattlerSide(battler) == B_SIDE_OPPONENT) { - OpponentSwitchInResetSentPokesToOpponent(battler); + OpponentSwitchInResetSentPokesToOpponentValue(battler); } else { @@ -1250,7 +1250,7 @@ bool8 HandleFaintedMonActions(void) gBattleStruct->faintedActionsState = 3; break; case 2: - OpponentSwitchInResetSentPokesToOpponent(gBattlerFainted); + OpponentSwitchInResetSentPokesToOpponentValue(gBattlerFainted); if (++gBattleStruct->faintedActionsBattlerId == gBattlersCount) gBattleStruct->faintedActionsState = 3; else -- cgit v1.2.3