diff options
author | Diegoisawesome <Diegoisawesome@users.noreply.github.com> | 2018-07-16 13:35:17 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-16 13:35:17 -0700 |
commit | 06b3ce408f774c7192202308e783cc22bb8e7643 (patch) | |
tree | 68390ab7335854c9c0721192ec4b8d563d0a48fe /src/battle_tv.c | |
parent | 07ef76277021d5cddf14004e37e785c31fcea69b (diff) | |
parent | 118fa3afcee68deb3eeb2bc876a9afd02a45677c (diff) |
Merge pull request #272 from DizzyEggg/final_battle_files_touches
Thoroughly document and label battle files
Diffstat (limited to 'src/battle_tv.c')
-rw-r--r-- | src/battle_tv.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/battle_tv.c b/src/battle_tv.c index e5d97be30..6f9ee414e 100644 --- a/src/battle_tv.c +++ b/src/battle_tv.c @@ -9,8 +9,6 @@ #include "battle_message.h" #include "tv.h" -extern struct StringInfoBattle *gStringInfo; - // this file's functions static bool8 sub_817E0B8(u16 stringId); static void AddMovePoints(u8 caseId, u16 arg1, u8 arg2, u8 arg3); @@ -223,7 +221,7 @@ void BattleTv_SetDataBasedOnString(u16 stringId) atkSide = GetBattlerSide(gBattlerAttacker); defSide = GetBattlerSide(gBattlerTarget); effSide = GetBattlerSide(gEffectBattler); - scriptingSide = GetBattlerSide(gStringInfo->scrActive); + scriptingSide = GetBattlerSide(gBattleMsgDataPtr->scrActive); if (atkSide == B_SIDE_PLAYER) atkMon = &gPlayerParty[gBattlerPartyIndexes[gBattlerAttacker]]; @@ -235,7 +233,7 @@ void BattleTv_SetDataBasedOnString(u16 stringId) else defMon = &gEnemyParty[gBattlerPartyIndexes[gBattlerTarget]]; - moveSlot = GetBattlerMoveSlotId(gBattlerAttacker, gStringInfo->currentMove); + moveSlot = GetBattlerMoveSlotId(gBattlerAttacker, gBattleMsgDataPtr->currentMove); if (moveSlot >= 4 && sub_817E0B8(stringId) && stringId > BATTLESTRINGS_ID_ADDER) { @@ -480,8 +478,8 @@ void BattleTv_SetDataBasedOnString(u16 stringId) break; case STRINGID_PKMNFASTASLEEP: if (tvPtr->mon[atkSide][gBattlerPartyIndexes[gBattlerAttacker]].slpMonId != 0 - && gStringInfo->currentMove != MOVE_SNORE - && gStringInfo->currentMove != MOVE_SLEEP_TALK) + && gBattleMsgDataPtr->currentMove != MOVE_SNORE + && gBattleMsgDataPtr->currentMove != MOVE_SLEEP_TALK) AddMovePoints(9, 3, tvPtr->mon[atkSide][gBattlerPartyIndexes[gBattlerAttacker]].slpMonId - 1, tvPtr->mon[atkSide][gBattlerPartyIndexes[gBattlerAttacker]].slpMoveSlot); break; case STRINGID_PKMNWASFROZEN: @@ -798,8 +796,8 @@ void TryPutLinkBattleTvShowOnAir(void) if (gBattleTypeFlags & BATTLE_TYPE_MULTI) { - if ((playerBestMonId < 3 && !sub_806D82C(gBattleScripting.multiplayerId)) - || (playerBestMonId >= 3 && sub_806D82C(gBattleScripting.multiplayerId))) + if ((playerBestMonId < 3 && !GetLinkTrainerFlankId(gBattleScripting.multiplayerId)) + || (playerBestMonId >= 3 && GetLinkTrainerFlankId(gBattleScripting.multiplayerId))) { j = (opponentBestMonId < 3) ? 0 : 1; PutBattleUpdateOnTheAir(sub_806EF84(j, gBattleScripting.multiplayerId), moveId, playerBestSpecies, opponentBestSpecies); @@ -1080,7 +1078,7 @@ _0817E5C8:\n\ ldr r0, =gBattleScripting\n\ adds r0, 0x25\n\ ldrb r0, [r0]\n\ - bl sub_806D82C\n\ + bl GetLinkTrainerFlankId\n\ lsls r0, 16\n\ cmp r0, 0\n\ beq _0817E630\n\ @@ -1090,7 +1088,7 @@ _0817E620:\n\ ldr r0, =gBattleScripting\n\ adds r0, 0x25\n\ ldrb r0, [r0]\n\ - bl sub_806D82C\n\ + bl GetLinkTrainerFlankId\n\ lsls r0, 16\n\ cmp r0, 0\n\ beq _0817E670\n\ |