diff --git a/src/battle_controller_link_opponent.c b/src/battle_controller_link_opponent.c index 280b1e2103..fb29cc0432 100644 --- a/src/battle_controller_link_opponent.c +++ b/src/battle_controller_link_opponent.c @@ -548,7 +548,7 @@ static void LinkOpponentHandleGetMonData(void) monToCheck >>= 1; } } - BtlController_EmitDataTransfer(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, size, monData); + BtlController_EmitDataTransfer(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, size, monData); LinkOpponentBufferExecCompleted(); } diff --git a/src/battle_controller_link_partner.c b/src/battle_controller_link_partner.c index 7e5eb37e91..950552ea72 100644 --- a/src/battle_controller_link_partner.c +++ b/src/battle_controller_link_partner.c @@ -442,7 +442,7 @@ static void LinkPartnerHandleGetMonData(void) monToCheck >>= 1; } } - BtlController_EmitDataTransfer(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, size, monData); + BtlController_EmitDataTransfer(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, size, monData); LinkPartnerBufferExecCompleted(); } diff --git a/src/battle_controller_opponent.c b/src/battle_controller_opponent.c index 12603f72bc..284d3eeded 100644 --- a/src/battle_controller_opponent.c +++ b/src/battle_controller_opponent.c @@ -561,7 +561,7 @@ static void OpponentHandleGetMonData(void) monToCheck >>= 1; } } - BtlController_EmitDataTransfer(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, size, monData); + BtlController_EmitDataTransfer(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, size, monData); OpponentBufferExecCompleted(); } @@ -881,7 +881,7 @@ static void OpponentHandleGetRawMonData(void) for (i = 0; i < gBattleBufferA[gActiveBattler][2]; i++) dst[i] = src[i]; - BtlController_EmitDataTransfer(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, gBattleBufferA[gActiveBattler][2], dst); + BtlController_EmitDataTransfer(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, gBattleBufferA[gActiveBattler][2], dst); OpponentBufferExecCompleted(); } @@ -1552,7 +1552,7 @@ static void OpponentHandleChooseMove(void) { if (gBattleTypeFlags & BATTLE_TYPE_PALACE) { - BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, 10, ChooseMoveAndTargetInBattlePalace()); + BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, 10, ChooseMoveAndTargetInBattlePalace()); OpponentBufferExecCompleted(); } else @@ -1569,13 +1569,13 @@ static void OpponentHandleChooseMove(void) switch (chosenMoveId) { case AI_CHOICE_WATCH: - BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, B_ACTION_SAFARI_WATCH_CAREFULLY, 0); + BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, B_ACTION_SAFARI_WATCH_CAREFULLY, 0); break; case AI_CHOICE_FLEE: - BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, B_ACTION_RUN, 0); + BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, B_ACTION_RUN, 0); break; case 6: - BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, 15, gBattlerTarget); + BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, 15, gBattlerTarget); break; default: if (gBattleMoves[moveInfo->moves[chosenMoveId]].target & (MOVE_TARGET_USER_OR_SELECTED | MOVE_TARGET_USER)) @@ -1586,7 +1586,7 @@ static void OpponentHandleChooseMove(void) if (gAbsentBattlerFlags & gBitTable[gBattlerTarget]) gBattlerTarget = GetBattlerAtPosition(B_POSITION_PLAYER_RIGHT); } - BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, 10, (chosenMoveId) | (gBattlerTarget << 8)); + BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, 10, (chosenMoveId) | (gBattlerTarget << 8)); break; } OpponentBufferExecCompleted(); @@ -1601,11 +1601,11 @@ static void OpponentHandleChooseMove(void) } while (move == MOVE_NONE); if (gBattleMoves[move].target & (MOVE_TARGET_USER_OR_SELECTED | MOVE_TARGET_USER)) - BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, 10, (chosenMoveId) | (gActiveBattler << 8)); + BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, 10, (chosenMoveId) | (gActiveBattler << 8)); else if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) - BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, 10, (chosenMoveId) | (GetBattlerAtPosition(Random() & 2) << 8)); + BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, 10, (chosenMoveId) | (GetBattlerAtPosition(Random() & 2) << 8)); else - BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, 10, (chosenMoveId) | (GetBattlerAtPosition(B_POSITION_PLAYER_LEFT) << 8)); + BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, 10, (chosenMoveId) | (GetBattlerAtPosition(B_POSITION_PLAYER_LEFT) << 8)); OpponentBufferExecCompleted(); } @@ -1614,7 +1614,7 @@ static void OpponentHandleChooseMove(void) static void OpponentHandleChooseItem(void) { - BtlController_EmitOneReturnValue(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, *(gBattleStruct->chosenItem + (gActiveBattler / 2) * 2)); + BtlController_EmitOneReturnValue(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, *(gBattleStruct->chosenItem + (gActiveBattler / 2) * 2)); OpponentBufferExecCompleted(); } @@ -1671,7 +1671,7 @@ static void OpponentHandleChoosePokemon(void) *(gBattleStruct->monToSwitchIntoId + gActiveBattler) = chosenMonId; - BtlController_EmitChosenMonReturnValue(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, chosenMonId, NULL); + BtlController_EmitChosenMonReturnValue(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, chosenMonId, NULL); OpponentBufferExecCompleted(); } diff --git a/src/battle_controller_player.c b/src/battle_controller_player.c index 9c4d755110..a71b2c251d 100644 --- a/src/battle_controller_player.c +++ b/src/battle_controller_player.c @@ -249,16 +249,16 @@ static void HandleInputChooseAction(void) switch (gActionSelectionCursor[gActiveBattler]) { case 0: // Top left - BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, B_ACTION_USE_MOVE, 0); + BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, B_ACTION_USE_MOVE, 0); break; case 1: // Top right - BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, B_ACTION_USE_ITEM, 0); + BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, B_ACTION_USE_ITEM, 0); break; case 2: // Bottom left - BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, B_ACTION_SWITCH, 0); + BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, B_ACTION_SWITCH, 0); break; case 3: // Bottom right - BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, B_ACTION_RUN, 0); + BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, B_ACTION_RUN, 0); break; } PlayerBufferExecCompleted(); @@ -319,7 +319,7 @@ static void HandleInputChooseAction(void) return; } PlaySE(SE_SELECT); - BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, B_ACTION_CANCEL_PARTNER, 0); + BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, B_ACTION_CANCEL_PARTNER, 0); PlayerBufferExecCompleted(); } } @@ -365,7 +365,7 @@ static void HandleInputChooseTarget(void) { PlaySE(SE_SELECT); gSprites[gBattlerSpriteIds[gMultiUsePlayerCursor]].callback = SpriteCB_HideAsMoveTarget; - BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, 10, gMoveSelectionCursor[gActiveBattler] | (gMultiUsePlayerCursor << 8)); + BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, 10, gMoveSelectionCursor[gActiveBattler] | (gMultiUsePlayerCursor << 8)); EndBounceEffect(gMultiUsePlayerCursor, BOUNCE_HEALTHBOX); PlayerBufferExecCompleted(); } @@ -523,7 +523,7 @@ static void HandleInputChooseMove(void) if (!canSelectTarget) { - BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, 10, gMoveSelectionCursor[gActiveBattler] | (gMultiUsePlayerCursor << 8)); + BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, 10, gMoveSelectionCursor[gActiveBattler] | (gMultiUsePlayerCursor << 8)); PlayerBufferExecCompleted(); } else @@ -543,7 +543,7 @@ static void HandleInputChooseMove(void) else if (JOY_NEW(B_BUTTON) || gPlayerDpadHoldFrames > 59) { PlaySE(SE_SELECT); - BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, 10, 0xFFFF); + BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, 10, 0xFFFF); PlayerBufferExecCompleted(); } else if (JOY_NEW(DPAD_LEFT)) @@ -1174,7 +1174,7 @@ static void Task_GiveExpToMon(u8 taskId) gainedExp -= nextLvlExp - currExp; savedActiveBattler = gActiveBattler; gActiveBattler = battlerId; - BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, RET_VALUE_LEVELED_UP, gainedExp); + BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, RET_VALUE_LEVELED_UP, gainedExp); gActiveBattler = savedActiveBattler; if (IsDoubleBattle() == TRUE @@ -1253,7 +1253,7 @@ static void Task_GiveExpWithExpBar(u8 taskId) gainedExp -= expOnNextLvl - currExp; savedActiveBattler = gActiveBattler; gActiveBattler = battlerId; - BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, RET_VALUE_LEVELED_UP, gainedExp); + BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, RET_VALUE_LEVELED_UP, gainedExp); gActiveBattler = savedActiveBattler; gTasks[taskId].func = Task_LaunchLvlUpAnim; } @@ -1361,9 +1361,9 @@ static void WaitForMonSelection(void) if (gMain.callback2 == BattleMainCB2 && !gPaletteFade.active) { if (gPartyMenuUseExitCallback == TRUE) - BtlController_EmitChosenMonReturnValue(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, gSelectedMonPartyId, gBattlePartyCurrentOrder); + BtlController_EmitChosenMonReturnValue(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, gSelectedMonPartyId, gBattlePartyCurrentOrder); else - BtlController_EmitChosenMonReturnValue(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, PARTY_SIZE, NULL); + BtlController_EmitChosenMonReturnValue(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, PARTY_SIZE, NULL); if ((gBattleBufferA[gActiveBattler][1] & 0xF) == 1) PrintLinkStandbyMsg(); @@ -1387,7 +1387,7 @@ static void CompleteWhenChoseItem(void) { if (gMain.callback2 == BattleMainCB2 && !gPaletteFade.active) { - BtlController_EmitOneReturnValue(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, gSpecialVar_ItemId); + BtlController_EmitOneReturnValue(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, gSpecialVar_ItemId); PlayerBufferExecCompleted(); } } @@ -1439,9 +1439,9 @@ static void PlayerHandleYesNoInput(void) PlaySE(SE_SELECT); if (gMultiUsePlayerCursor != 0) - BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, 0xE, 0); + BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, 0xE, 0); else - BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, 0xD, 0); + BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, 0xD, 0); PlayerBufferExecCompleted(); } @@ -1600,7 +1600,7 @@ static void PlayerHandleGetMonData(void) monToCheck >>= 1; } } - BtlController_EmitDataTransfer(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, size, monData); + BtlController_EmitDataTransfer(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, size, monData); PlayerBufferExecCompleted(); } @@ -1920,7 +1920,7 @@ void PlayerHandleGetRawMonData(void) for (i = 0; i < gBattleBufferA[gActiveBattler][2]; i++) dst[i] = src[i]; - BtlController_EmitDataTransfer(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, gBattleBufferA[gActiveBattler][2], dst); + BtlController_EmitDataTransfer(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, gBattleBufferA[gActiveBattler][2], dst); PlayerBufferExecCompleted(); } @@ -2621,7 +2621,7 @@ static void PlayerChooseMoveInBattlePalace(void) if (--*(gBattleStruct->arenaMindPoints + gActiveBattler) == 0) { gBattlePalaceMoveSelectionRngValue = gRngValue; - BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, 10, ChooseMoveAndTargetInBattlePalace()); + BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, 10, ChooseMoveAndTargetInBattlePalace()); PlayerBufferExecCompleted(); } } @@ -2671,7 +2671,7 @@ static void PlayerHandleChoosePokemon(void) if (gBattleTypeFlags & BATTLE_TYPE_ARENA && (gBattleBufferA[gActiveBattler][1] & 0xF) != PARTY_ACTION_CANT_SWITCH) { - BtlController_EmitChosenMonReturnValue(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, gBattlerPartyIndexes[gActiveBattler] + 1, gBattlePartyCurrentOrder); + BtlController_EmitChosenMonReturnValue(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, gBattlerPartyIndexes[gActiveBattler] + 1, gBattlePartyCurrentOrder); PlayerBufferExecCompleted(); } else @@ -2828,25 +2828,25 @@ static void PlayerHandleCmd32(void) static void PlayerHandleTwoReturnValues(void) { - BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, 0, 0); + BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, 0, 0); PlayerBufferExecCompleted(); } static void PlayerHandleChosenMonReturnValue(void) { - BtlController_EmitChosenMonReturnValue(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, 0, NULL); + BtlController_EmitChosenMonReturnValue(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, 0, NULL); PlayerBufferExecCompleted(); } static void PlayerHandleOneReturnValue(void) { - BtlController_EmitOneReturnValue(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, 0); + BtlController_EmitOneReturnValue(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, 0); PlayerBufferExecCompleted(); } static void PlayerHandleOneReturnValue_Duplicate(void) { - BtlController_EmitOneReturnValue_Duplicate(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, 0); + BtlController_EmitOneReturnValue_Duplicate(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, 0); PlayerBufferExecCompleted(); } diff --git a/src/battle_controller_player_partner.c b/src/battle_controller_player_partner.c index 37a72e3aaa..1c1c38c4e2 100644 --- a/src/battle_controller_player_partner.c +++ b/src/battle_controller_player_partner.c @@ -332,7 +332,7 @@ static void Task_GiveExpToMon(u8 taskId) gainedExp -= nextLvlExp - currExp; savedActiveBank = gActiveBattler; gActiveBattler = battlerId; - BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, RET_VALUE_LEVELED_UP, gainedExp); + BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, RET_VALUE_LEVELED_UP, gainedExp); gActiveBattler = savedActiveBank; if (IsDoubleBattle() == TRUE @@ -411,7 +411,7 @@ static void Task_GiveExpWithExpBar(u8 taskId) gainedExp -= expOnNextLvl - currExp; savedActiveBank = gActiveBattler; gActiveBattler = battlerId; - BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, RET_VALUE_LEVELED_UP, gainedExp); + BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, RET_VALUE_LEVELED_UP, gainedExp); gActiveBattler = savedActiveBank; gTasks[taskId].func = Task_LaunchLvlUpAnim; } @@ -626,7 +626,7 @@ static void PlayerPartnerHandleGetMonData(void) monToCheck >>= 1; } } - BtlController_EmitDataTransfer(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, size, monData); + BtlController_EmitDataTransfer(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, size, monData); PlayerPartnerBufferExecCompleted(); } @@ -1527,7 +1527,7 @@ static void PlayerPartnerHandleChooseMove(void) gBattlerTarget = GetBattlerAtPosition(B_POSITION_OPPONENT_RIGHT); } - BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, 10, chosenMoveId | (gBattlerTarget << 8)); + BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, 10, chosenMoveId | (gBattlerTarget << 8)); PlayerPartnerBufferExecCompleted(); } @@ -1557,7 +1557,7 @@ static void PlayerPartnerHandleChoosePokemon(void) } *(gBattleStruct->monToSwitchIntoId + gActiveBattler) = chosenMonId; - BtlController_EmitChosenMonReturnValue(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, chosenMonId, NULL); + BtlController_EmitChosenMonReturnValue(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, chosenMonId, NULL); PlayerPartnerBufferExecCompleted(); } diff --git a/src/battle_controller_recorded_opponent.c b/src/battle_controller_recorded_opponent.c index 2a04c9d219..1ce5a02b7c 100644 --- a/src/battle_controller_recorded_opponent.c +++ b/src/battle_controller_recorded_opponent.c @@ -534,7 +534,7 @@ static void RecordedOpponentHandleGetMonData(void) monToCheck >>= 1; } } - BtlController_EmitDataTransfer(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, size, monData); + BtlController_EmitDataTransfer(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, size, monData); RecordedOpponentBufferExecCompleted(); } @@ -1402,7 +1402,7 @@ static void RecordedOpponentHandlePrintSelectionString(void) static void RecordedOpponentHandleChooseAction(void) { - BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, RecordedBattle_GetBattlerAction(gActiveBattler), 0); + BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, RecordedBattle_GetBattlerAction(gActiveBattler), 0); RecordedOpponentBufferExecCompleted(); } @@ -1415,13 +1415,13 @@ static void RecordedOpponentHandleChooseMove(void) { if (gBattleTypeFlags & BATTLE_TYPE_PALACE) { - BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, 10, ChooseMoveAndTargetInBattlePalace()); + BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, 10, ChooseMoveAndTargetInBattlePalace()); } else { u8 moveId = RecordedBattle_GetBattlerAction(gActiveBattler); u8 target = RecordedBattle_GetBattlerAction(gActiveBattler); - BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, 10, moveId | (target << 8)); + BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, 10, moveId | (target << 8)); } RecordedOpponentBufferExecCompleted(); @@ -1435,7 +1435,7 @@ static void RecordedOpponentHandleChooseItem(void) static void RecordedOpponentHandleChoosePokemon(void) { *(gBattleStruct->monToSwitchIntoId + gActiveBattler) = RecordedBattle_GetBattlerAction(gActiveBattler); - BtlController_EmitChosenMonReturnValue(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, *(gBattleStruct->monToSwitchIntoId + gActiveBattler), NULL); + BtlController_EmitChosenMonReturnValue(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, *(gBattleStruct->monToSwitchIntoId + gActiveBattler), NULL); RecordedOpponentBufferExecCompleted(); } diff --git a/src/battle_controller_recorded_player.c b/src/battle_controller_recorded_player.c index fda899712e..063ce882e0 100644 --- a/src/battle_controller_recorded_player.c +++ b/src/battle_controller_recorded_player.c @@ -517,7 +517,7 @@ static void RecordedPlayerHandleGetMonData(void) monToCheck >>= 1; } } - BtlController_EmitDataTransfer(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, size, monData); + BtlController_EmitDataTransfer(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, size, monData); RecordedPlayerBufferExecCompleted(); } @@ -1414,7 +1414,7 @@ static void ChooseActionInBattlePalace(void) { if (gBattleCommunication[4] >= gBattlersCount / 2) { - BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, RecordedBattle_GetBattlerAction(gActiveBattler), 0); + BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, RecordedBattle_GetBattlerAction(gActiveBattler), 0); RecordedPlayerBufferExecCompleted(); } } @@ -1427,7 +1427,7 @@ static void RecordedPlayerHandleChooseAction(void) } else { - BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, RecordedBattle_GetBattlerAction(gActiveBattler), 0); + BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, RecordedBattle_GetBattlerAction(gActiveBattler), 0); RecordedPlayerBufferExecCompleted(); } } @@ -1441,13 +1441,13 @@ static void RecordedPlayerHandleChooseMove(void) { if (gBattleTypeFlags & BATTLE_TYPE_PALACE) { - BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, 10, ChooseMoveAndTargetInBattlePalace()); + BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, 10, ChooseMoveAndTargetInBattlePalace()); } else { u8 moveId = RecordedBattle_GetBattlerAction(gActiveBattler); u8 target = RecordedBattle_GetBattlerAction(gActiveBattler); - BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, 10, moveId | (target << 8)); + BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, 10, moveId | (target << 8)); } RecordedPlayerBufferExecCompleted(); @@ -1461,7 +1461,7 @@ static void RecordedPlayerHandleChooseItem(void) static void RecordedPlayerHandleChoosePokemon(void) { *(gBattleStruct->monToSwitchIntoId + gActiveBattler) = RecordedBattle_GetBattlerAction(gActiveBattler); - BtlController_EmitChosenMonReturnValue(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, *(gBattleStruct->monToSwitchIntoId + gActiveBattler), NULL); + BtlController_EmitChosenMonReturnValue(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, *(gBattleStruct->monToSwitchIntoId + gActiveBattler), NULL); RecordedPlayerBufferExecCompleted(); } diff --git a/src/battle_controller_safari.c b/src/battle_controller_safari.c index 09727b6cfd..485a806b5e 100644 --- a/src/battle_controller_safari.c +++ b/src/battle_controller_safari.c @@ -176,16 +176,16 @@ static void HandleInputChooseAction(void) switch (gActionSelectionCursor[gActiveBattler]) { case 0: - BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, B_ACTION_SAFARI_BALL, 0); + BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, B_ACTION_SAFARI_BALL, 0); break; case 1: - BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, B_ACTION_SAFARI_POKEBLOCK, 0); + BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, B_ACTION_SAFARI_POKEBLOCK, 0); break; case 2: - BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, B_ACTION_SAFARI_GO_NEAR, 0); + BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, B_ACTION_SAFARI_GO_NEAR, 0); break; case 3: - BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, B_ACTION_SAFARI_RUN, 0); + BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, B_ACTION_SAFARI_RUN, 0); break; } SafariBufferExecCompleted(); @@ -280,7 +280,7 @@ static void CompleteWhenChosePokeblock(void) { if (gMain.callback2 == BattleMainCB2 && !gPaletteFade.active) { - BtlController_EmitOneReturnValue(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, gSpecialVar_ItemId); + BtlController_EmitOneReturnValue(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, gSpecialVar_ItemId); SafariBufferExecCompleted(); } } diff --git a/src/battle_controller_wally.c b/src/battle_controller_wally.c index e0dabb23c4..4a2b293787 100644 --- a/src/battle_controller_wally.c +++ b/src/battle_controller_wally.c @@ -196,7 +196,7 @@ static void WallyHandleActions(void) if (--gBattleStruct->wallyWaitFrames == 0) { PlaySE(SE_SELECT); - BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, B_ACTION_USE_MOVE, 0); + BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, B_ACTION_USE_MOVE, 0); WallyBufferExecCompleted(); gBattleStruct->wallyBattleState++; gBattleStruct->wallyMovesState = 0; @@ -207,7 +207,7 @@ static void WallyHandleActions(void) if (--gBattleStruct->wallyWaitFrames == 0) { PlaySE(SE_SELECT); - BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, B_ACTION_USE_MOVE, 0); + BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, B_ACTION_USE_MOVE, 0); WallyBufferExecCompleted(); gBattleStruct->wallyBattleState++; gBattleStruct->wallyMovesState = 0; @@ -217,7 +217,7 @@ static void WallyHandleActions(void) case 3: if (--gBattleStruct->wallyWaitFrames == 0) { - BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, B_ACTION_WALLY_THROW, 0); + BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, B_ACTION_WALLY_THROW, 0); WallyBufferExecCompleted(); gBattleStruct->wallyBattleState++; gBattleStruct->wallyMovesState = 0; @@ -238,7 +238,7 @@ static void WallyHandleActions(void) if (--gBattleStruct->wallyWaitFrames == 0) { PlaySE(SE_SELECT); - BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, B_ACTION_USE_ITEM, 0); + BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, B_ACTION_USE_ITEM, 0); WallyBufferExecCompleted(); } break; @@ -278,7 +278,7 @@ static void CompleteOnChosenItem(void) { if (gMain.callback2 == BattleMainCB2 && !gPaletteFade.active) { - BtlController_EmitOneReturnValue(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, gSpecialVar_ItemId); + BtlController_EmitOneReturnValue(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, gSpecialVar_ItemId); WallyBufferExecCompleted(); } } @@ -444,7 +444,7 @@ static void WallyHandleGetMonData(void) monToCheck >>= 1; } } - BtlController_EmitDataTransfer(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, size, monData); + BtlController_EmitDataTransfer(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, size, monData); WallyBufferExecCompleted(); } @@ -1241,7 +1241,7 @@ static void WallyHandleChooseMove(void) if (--gBattleStruct->wallyMoveFrames == 0) { PlaySE(SE_SELECT); - BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, 10, 0x100); + BtlController_EmitTwoReturnValues(BATTLELINKMSGTYPE_CONTROLLER_TO_ENGINE, 10, 0x100); WallyBufferExecCompleted(); } break;