diff options
author | GriffinR <griffin.g.richards@gmail.com> | 2021-10-19 08:09:17 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-19 08:09:17 -0400 |
commit | 934a7e7a5d2074e9f80294ac8f538a2b038061b1 (patch) | |
tree | 0e2859b1814453bba70a514b3cee23e776a6a9f9 /src/battle_controller_player_partner.c | |
parent | 164590e37d67a385bf6479aafcbe5b351891bc0b (diff) | |
parent | e1900efe1ead0e3344ca95a327b453617c807b6a (diff) |
Merge pull request #1516 from GriffinRichards/doc-miscbattle
Miscellaneous battle documentation
Diffstat (limited to 'src/battle_controller_player_partner.c')
-rw-r--r-- | src/battle_controller_player_partner.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/battle_controller_player_partner.c b/src/battle_controller_player_partner.c index d1d23099a..91fea6cde 100644 --- a/src/battle_controller_player_partner.c +++ b/src/battle_controller_player_partner.c @@ -27,7 +27,6 @@ #include "constants/songs.h" #include "constants/trainers.h" -// this file's functions static void PlayerPartnerHandleGetMonData(void); static void PlayerPartnerHandleGetRawMonData(void); static void PlayerPartnerHandleSetMonData(void); @@ -300,7 +299,7 @@ static void CompleteOnHealthbarDone(void) static void CompleteOnInactiveTextPrinter(void) { - if (!IsTextPrinterActive(0)) + if (!IsTextPrinterActive(B_WIN_MSG)) PlayerPartnerBufferExecCompleted(); } @@ -333,7 +332,7 @@ static void Task_GiveExpToMon(u8 taskId) gainedExp -= nextLvlExp - currExp; savedActiveBank = gActiveBattler; gActiveBattler = battlerId; - BtlController_EmitTwoReturnValues(1, RET_VALUE_LEVELED_UP, gainedExp); + BtlController_EmitTwoReturnValues(BUFFER_B, RET_VALUE_LEVELED_UP, gainedExp); gActiveBattler = savedActiveBank; if (IsDoubleBattle() == TRUE @@ -412,7 +411,7 @@ static void Task_GiveExpWithExpBar(u8 taskId) gainedExp -= expOnNextLvl - currExp; savedActiveBank = gActiveBattler; gActiveBattler = battlerId; - BtlController_EmitTwoReturnValues(1, RET_VALUE_LEVELED_UP, gainedExp); + BtlController_EmitTwoReturnValues(BUFFER_B, RET_VALUE_LEVELED_UP, gainedExp); gActiveBattler = savedActiveBank; gTasks[taskId].func = Task_LaunchLvlUpAnim; } @@ -497,7 +496,7 @@ static void FreeMonSpriteAfterSwitchOutAnim(void) static void CompleteOnInactiveTextPrinter2(void) { - if (!IsTextPrinterActive(0)) + if (!IsTextPrinterActive(B_WIN_MSG)) PlayerPartnerBufferExecCompleted(); } @@ -627,7 +626,7 @@ static void PlayerPartnerHandleGetMonData(void) monToCheck >>= 1; } } - BtlController_EmitDataTransfer(1, size, monData); + BtlController_EmitDataTransfer(BUFFER_B, size, monData); PlayerPartnerBufferExecCompleted(); } @@ -1491,7 +1490,7 @@ static void PlayerPartnerHandlePrintString(void) gBattle_BG0_Y = 0; stringId = (u16*)(&gBattleBufferA[gActiveBattler][2]); BufferStringBattle(*stringId); - BattlePutTextOnWindow(gDisplayedStringBattle, 0); + BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG); gBattlerControllerFuncs[gActiveBattler] = CompleteOnInactiveTextPrinter2; } @@ -1528,7 +1527,7 @@ static void PlayerPartnerHandleChooseMove(void) gBattlerTarget = GetBattlerAtPosition(B_POSITION_OPPONENT_RIGHT); } - BtlController_EmitTwoReturnValues(1, 10, chosenMoveId | (gBattlerTarget << 8)); + BtlController_EmitTwoReturnValues(BUFFER_B, 10, chosenMoveId | (gBattlerTarget << 8)); PlayerPartnerBufferExecCompleted(); } @@ -1558,7 +1557,7 @@ static void PlayerPartnerHandleChoosePokemon(void) } *(gBattleStruct->monToSwitchIntoId + gActiveBattler) = chosenMonId; - BtlController_EmitChosenMonReturnValue(1, chosenMonId, NULL); + BtlController_EmitChosenMonReturnValue(BUFFER_B, chosenMonId, NULL); PlayerPartnerBufferExecCompleted(); } |