diff options
author | GriffinR <griffin.g.richards@gmail.com> | 2021-10-12 19:50:32 -0400 |
---|---|---|
committer | GriffinR <griffin.g.richards@gmail.com> | 2021-10-13 16:21:39 -0400 |
commit | fc15b0d5f0b9c6d004ca4c30c79557606a4b0eeb (patch) | |
tree | 1e10d8c3e0755a9a8644e35bca6905eb44542602 /src/battle_controller_opponent.c | |
parent | b0598b1aef16815272187adf84a999b6f190c8ba (diff) |
Add controller buffer constants, finish misc battle doc
Diffstat (limited to 'src/battle_controller_opponent.c')
-rw-r--r-- | src/battle_controller_opponent.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/battle_controller_opponent.c b/src/battle_controller_opponent.c index 3f62ba08d..fe339ddfc 100644 --- a/src/battle_controller_opponent.c +++ b/src/battle_controller_opponent.c @@ -555,7 +555,7 @@ static void OpponentHandleGetMonData(void) monToCheck >>= 1; } } - BtlController_EmitDataTransfer(1, size, monData); + BtlController_EmitDataTransfer(BUFFER_B, size, monData); OpponentBufferExecCompleted(); } @@ -875,7 +875,7 @@ static void OpponentHandleGetRawMonData(void) for (i = 0; i < gBattleBufferA[gActiveBattler][2]; i++) dst[i] = src[i]; - BtlController_EmitDataTransfer(1, gBattleBufferA[gActiveBattler][2], dst); + BtlController_EmitDataTransfer(BUFFER_B, gBattleBufferA[gActiveBattler][2], dst); OpponentBufferExecCompleted(); } @@ -1546,7 +1546,7 @@ static void OpponentHandleChooseMove(void) { if (gBattleTypeFlags & BATTLE_TYPE_PALACE) { - BtlController_EmitTwoReturnValues(1, 10, ChooseMoveAndTargetInBattlePalace()); + BtlController_EmitTwoReturnValues(BUFFER_B, 10, ChooseMoveAndTargetInBattlePalace()); OpponentBufferExecCompleted(); } else @@ -1563,13 +1563,13 @@ static void OpponentHandleChooseMove(void) switch (chosenMoveId) { case AI_CHOICE_WATCH: - BtlController_EmitTwoReturnValues(1, B_ACTION_SAFARI_WATCH_CAREFULLY, 0); + BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_SAFARI_WATCH_CAREFULLY, 0); break; case AI_CHOICE_FLEE: - BtlController_EmitTwoReturnValues(1, B_ACTION_RUN, 0); + BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_RUN, 0); break; case 6: - BtlController_EmitTwoReturnValues(1, 15, gBattlerTarget); + BtlController_EmitTwoReturnValues(BUFFER_B, 15, gBattlerTarget); break; default: if (gBattleMoves[moveInfo->moves[chosenMoveId]].target & (MOVE_TARGET_USER_OR_SELECTED | MOVE_TARGET_USER)) @@ -1580,7 +1580,7 @@ static void OpponentHandleChooseMove(void) if (gAbsentBattlerFlags & gBitTable[gBattlerTarget]) gBattlerTarget = GetBattlerAtPosition(B_POSITION_PLAYER_RIGHT); } - BtlController_EmitTwoReturnValues(1, 10, (chosenMoveId) | (gBattlerTarget << 8)); + BtlController_EmitTwoReturnValues(BUFFER_B, 10, (chosenMoveId) | (gBattlerTarget << 8)); break; } OpponentBufferExecCompleted(); @@ -1595,11 +1595,11 @@ static void OpponentHandleChooseMove(void) } while (move == MOVE_NONE); if (gBattleMoves[move].target & (MOVE_TARGET_USER_OR_SELECTED | MOVE_TARGET_USER)) - BtlController_EmitTwoReturnValues(1, 10, (chosenMoveId) | (gActiveBattler << 8)); + BtlController_EmitTwoReturnValues(BUFFER_B, 10, (chosenMoveId) | (gActiveBattler << 8)); else if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) - BtlController_EmitTwoReturnValues(1, 10, (chosenMoveId) | (GetBattlerAtPosition(Random() & 2) << 8)); + BtlController_EmitTwoReturnValues(BUFFER_B, 10, (chosenMoveId) | (GetBattlerAtPosition(Random() & 2) << 8)); else - BtlController_EmitTwoReturnValues(1, 10, (chosenMoveId) | (GetBattlerAtPosition(B_POSITION_PLAYER_LEFT) << 8)); + BtlController_EmitTwoReturnValues(BUFFER_B, 10, (chosenMoveId) | (GetBattlerAtPosition(B_POSITION_PLAYER_LEFT) << 8)); OpponentBufferExecCompleted(); } @@ -1608,7 +1608,7 @@ static void OpponentHandleChooseMove(void) static void OpponentHandleChooseItem(void) { - BtlController_EmitOneReturnValue(1, *(gBattleStruct->chosenItem + (gActiveBattler / 2) * 2)); + BtlController_EmitOneReturnValue(BUFFER_B, *(gBattleStruct->chosenItem + (gActiveBattler / 2) * 2)); OpponentBufferExecCompleted(); } @@ -1665,7 +1665,7 @@ static void OpponentHandleChoosePokemon(void) *(gBattleStruct->monToSwitchIntoId + gActiveBattler) = chosenMonId; - BtlController_EmitChosenMonReturnValue(1, chosenMonId, NULL); + BtlController_EmitChosenMonReturnValue(BUFFER_B, chosenMonId, NULL); OpponentBufferExecCompleted(); } |