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_recorded_opponent.c | |
parent | 164590e37d67a385bf6479aafcbe5b351891bc0b (diff) | |
parent | e1900efe1ead0e3344ca95a327b453617c807b6a (diff) |
Merge pull request #1516 from GriffinRichards/doc-miscbattle
Miscellaneous battle documentation
Diffstat (limited to 'src/battle_controller_recorded_opponent.c')
-rw-r--r-- | src/battle_controller_recorded_opponent.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/battle_controller_recorded_opponent.c b/src/battle_controller_recorded_opponent.c index acf595918..c6e649508 100644 --- a/src/battle_controller_recorded_opponent.c +++ b/src/battle_controller_recorded_opponent.c @@ -29,9 +29,6 @@ #include "constants/songs.h" #include "constants/trainers.h" -extern struct MusicPlayerInfo gMPlayInfo_BGM; - -// this file's functions static void RecordedOpponentHandleGetMonData(void); static void RecordedOpponentHandleGetRawMonData(void); static void RecordedOpponentHandleSetMonData(void); @@ -408,7 +405,7 @@ static void FreeMonSpriteAfterSwitchOutAnim(void) static void CompleteOnInactiveTextPrinter(void) { - if (!IsTextPrinterActive(0)) + if (!IsTextPrinterActive(B_WIN_MSG)) RecordedOpponentBufferExecCompleted(); } @@ -541,7 +538,7 @@ static void RecordedOpponentHandleGetMonData(void) monToCheck >>= 1; } } - BtlController_EmitDataTransfer(1, size, monData); + BtlController_EmitDataTransfer(BUFFER_B, size, monData); RecordedOpponentBufferExecCompleted(); } @@ -1398,7 +1395,7 @@ static void RecordedOpponentHandlePrintString(void) gBattle_BG0_Y = 0; stringId = (u16*)(&gBattleBufferA[gActiveBattler][2]); BufferStringBattle(*stringId); - BattlePutTextOnWindow(gDisplayedStringBattle, 0); + BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG); gBattlerControllerFuncs[gActiveBattler] = CompleteOnInactiveTextPrinter; } @@ -1409,7 +1406,7 @@ static void RecordedOpponentHandlePrintSelectionString(void) static void RecordedOpponentHandleChooseAction(void) { - BtlController_EmitTwoReturnValues(1, RecordedBattle_GetBattlerAction(gActiveBattler), 0); + BtlController_EmitTwoReturnValues(BUFFER_B, RecordedBattle_GetBattlerAction(gActiveBattler), 0); RecordedOpponentBufferExecCompleted(); } @@ -1422,13 +1419,13 @@ static void RecordedOpponentHandleChooseMove(void) { if (gBattleTypeFlags & BATTLE_TYPE_PALACE) { - BtlController_EmitTwoReturnValues(1, 10, ChooseMoveAndTargetInBattlePalace()); + BtlController_EmitTwoReturnValues(BUFFER_B, 10, ChooseMoveAndTargetInBattlePalace()); } else { u8 moveId = RecordedBattle_GetBattlerAction(gActiveBattler); u8 target = RecordedBattle_GetBattlerAction(gActiveBattler); - BtlController_EmitTwoReturnValues(1, 10, moveId | (target << 8)); + BtlController_EmitTwoReturnValues(BUFFER_B, 10, moveId | (target << 8)); } RecordedOpponentBufferExecCompleted(); @@ -1442,7 +1439,7 @@ static void RecordedOpponentHandleChooseItem(void) static void RecordedOpponentHandleChoosePokemon(void) { *(gBattleStruct->monToSwitchIntoId + gActiveBattler) = RecordedBattle_GetBattlerAction(gActiveBattler); - BtlController_EmitChosenMonReturnValue(1, *(gBattleStruct->monToSwitchIntoId + gActiveBattler), NULL); + BtlController_EmitChosenMonReturnValue(BUFFER_B, *(gBattleStruct->monToSwitchIntoId + gActiveBattler), NULL); RecordedOpponentBufferExecCompleted(); } |