diff options
author | GriffinR <griffin.g.richards@gmail.com> | 2020-07-28 00:56:02 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-28 00:56:02 -0400 |
commit | e8568b79efa2f12ce929a4db15c8786f1dccc359 (patch) | |
tree | 63b9e1cce193b9f71b3ae27f5905030940740aea | |
parent | 79cc659d7e9b103e1197db8494af81195f0f29ad (diff) | |
parent | b401e2eb86dba8a48c12fec75c2201de7fb1ec63 (diff) |
Merge pull request #1114 from ExpoSeed/doc
Document some battle_util.c
-rw-r--r-- | include/battle_util.h | 4 | ||||
-rw-r--r-- | src/battle_script_commands.c | 2 | ||||
-rw-r--r-- | src/battle_util.c | 8 | ||||
-rw-r--r-- | src/pokemon.c | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/include/battle_util.h b/include/battle_util.h index b77fa10ad..157ba8eb6 100644 --- a/include/battle_util.h +++ b/include/battle_util.h @@ -52,8 +52,8 @@ void CancelMultiTurnMoves(u8 battlerId); bool8 WasUnableToUseMove(u8 battlerId); void PrepareStringBattle(u16 stringId, u8 battlerId); void ResetSentPokesToOpponentValue(void); -void sub_803F9EC(u8 battlerId); -void sub_803FA70(u8 battlerId); +void OpponentSwitchInResetSentPokesToOpponentValue(u8 battlerId); +void UpdateSentPokesToOpponentValue(u8 battlerId); void BattleScriptPush(const u8* bsPtr); void BattleScriptPushCursor(void); void BattleScriptPop(void); 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..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 sub_803F9EC(u8 battler) +void OpponentSwitchInResetSentPokesToOpponentValue(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); + OpponentSwitchInResetSentPokesToOpponentValue(battler); } else { @@ -1250,7 +1250,7 @@ bool8 HandleFaintedMonActions(void) gBattleStruct->faintedActionsState = 3; break; case 2: - sub_803F9EC(gBattlerFainted); + OpponentSwitchInResetSentPokesToOpponentValue(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); } |