Shorter names for engine/controller communication enum members

This commit is contained in:
DavidJCobb
2025-05-02 00:01:15 -04:00
parent 7ee3043c58
commit 0f17e70371
17 changed files with 234 additions and 225 deletions

View File

@@ -475,7 +475,7 @@ static void RecordedPlayerBufferExecCompleted(void)
{
u8 playerId = GetMultiplayerId();
PrepareBufferDataTransferLink(BATTLELINKCOMMTYPE_CONTROLLER_BECOMING_IDLE, 4, &playerId);
PrepareBufferDataTransferLink(B_COMM_CONTROLLER_IS_DONE, 4, &playerId);
gBattleBufferA[gActiveBattler][0] = CONTROLLER_TERMINATOR_NOP;
}
else
@@ -517,7 +517,7 @@ static void RecordedPlayerHandleGetMonData(void)
monToCheck >>= 1;
}
}
BtlController_EmitDataTransfer(BATTLELINKCOMMTYPE_CONTROLLER_TO_ENGINE, size, monData);
BtlController_EmitDataTransfer(B_COMM_TO_ENGINE, size, monData);
RecordedPlayerBufferExecCompleted();
}
@@ -1414,7 +1414,7 @@ static void ChooseActionInBattlePalace(void)
{
if (gBattleCommunication[4] >= gBattlersCount / 2)
{
BtlController_EmitTwoReturnValues(BATTLELINKCOMMTYPE_CONTROLLER_TO_ENGINE, RecordedBattle_GetBattlerAction(gActiveBattler), 0);
BtlController_EmitTwoReturnValues(B_COMM_TO_ENGINE, RecordedBattle_GetBattlerAction(gActiveBattler), 0);
RecordedPlayerBufferExecCompleted();
}
}
@@ -1427,7 +1427,7 @@ static void RecordedPlayerHandleChooseAction(void)
}
else
{
BtlController_EmitTwoReturnValues(BATTLELINKCOMMTYPE_CONTROLLER_TO_ENGINE, RecordedBattle_GetBattlerAction(gActiveBattler), 0);
BtlController_EmitTwoReturnValues(B_COMM_TO_ENGINE, RecordedBattle_GetBattlerAction(gActiveBattler), 0);
RecordedPlayerBufferExecCompleted();
}
}
@@ -1441,13 +1441,13 @@ static void RecordedPlayerHandleChooseMove(void)
{
if (gBattleTypeFlags & BATTLE_TYPE_PALACE)
{
BtlController_EmitTwoReturnValues(BATTLELINKCOMMTYPE_CONTROLLER_TO_ENGINE, 10, ChooseMoveAndTargetInBattlePalace());
BtlController_EmitTwoReturnValues(B_COMM_TO_ENGINE, 10, ChooseMoveAndTargetInBattlePalace());
}
else
{
u8 moveId = RecordedBattle_GetBattlerAction(gActiveBattler);
u8 target = RecordedBattle_GetBattlerAction(gActiveBattler);
BtlController_EmitTwoReturnValues(BATTLELINKCOMMTYPE_CONTROLLER_TO_ENGINE, 10, moveId | (target << 8));
BtlController_EmitTwoReturnValues(B_COMM_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(BATTLELINKCOMMTYPE_CONTROLLER_TO_ENGINE, *(gBattleStruct->monToSwitchIntoId + gActiveBattler), NULL);
BtlController_EmitChosenMonReturnValue(B_COMM_TO_ENGINE, *(gBattleStruct->monToSwitchIntoId + gActiveBattler), NULL);
RecordedPlayerBufferExecCompleted();
}