Renamed BATTLELINKMSGTYPE_ to BATTLELINKCOMMTYPE_
I want to avoid the word "message" since PRET has already chosen "battle message" as the term for predefined strings usable in the battle scripts and UI.
I was considering the term "battle link packet" instead, but the library for wireless communications already uses the word "packet" even though GBATEK does not. I'm going with "battle link communication type" instead. For this particular context, I don't think we need a compound noun ("X type"); the singular noun "type" is fine enough.
This commit is contained in:
@@ -3360,7 +3360,7 @@ static void BattleIntroGetMonsData(void)
|
||||
{
|
||||
case 0:
|
||||
gActiveBattler = gBattleCommunication[1];
|
||||
BtlController_EmitGetMonData(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, REQUEST_ALL_BATTLE, 0);
|
||||
BtlController_EmitGetMonData(BATTLELINKCOMMTYPE_ENGINE_TO_CONTROLLER, REQUEST_ALL_BATTLE, 0);
|
||||
MarkBattlerForControllerExec(gActiveBattler);
|
||||
gBattleCommunication[MULTIUSE_STATE]++;
|
||||
break;
|
||||
@@ -3382,7 +3382,7 @@ static void BattleIntroPrepareBackgroundSlide(void)
|
||||
if (gBattleControllerExecFlags == 0)
|
||||
{
|
||||
gActiveBattler = GetBattlerAtPosition(0);
|
||||
BtlController_EmitIntroSlide(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, gBattleEnvironment);
|
||||
BtlController_EmitIntroSlide(BATTLELINKCOMMTYPE_ENGINE_TO_CONTROLLER, gBattleEnvironment);
|
||||
MarkBattlerForControllerExec(gActiveBattler);
|
||||
gBattleMainFunc = BattleIntroDrawTrainersOrMonsSprites;
|
||||
gBattleCommunication[MULTIUSE_STATE] = 0;
|
||||
@@ -3427,7 +3427,7 @@ static void BattleIntroDrawTrainersOrMonsSprites(void)
|
||||
|
||||
if (GetBattlerPosition(gActiveBattler) == B_POSITION_PLAYER_LEFT)
|
||||
{
|
||||
BtlController_EmitDrawTrainerPic(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER);
|
||||
BtlController_EmitDrawTrainerPic(BATTLELINKCOMMTYPE_ENGINE_TO_CONTROLLER);
|
||||
MarkBattlerForControllerExec(gActiveBattler);
|
||||
}
|
||||
|
||||
@@ -3435,7 +3435,7 @@ static void BattleIntroDrawTrainersOrMonsSprites(void)
|
||||
{
|
||||
if (GetBattlerPosition(gActiveBattler) == B_POSITION_OPPONENT_LEFT)
|
||||
{
|
||||
BtlController_EmitDrawTrainerPic(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER);
|
||||
BtlController_EmitDrawTrainerPic(BATTLELINKCOMMTYPE_ENGINE_TO_CONTROLLER);
|
||||
MarkBattlerForControllerExec(gActiveBattler);
|
||||
}
|
||||
if (GetBattlerSide(gActiveBattler) == B_SIDE_OPPONENT
|
||||
@@ -3460,7 +3460,7 @@ static void BattleIntroDrawTrainersOrMonsSprites(void)
|
||||
{
|
||||
HandleSetPokedexFlag(SpeciesToNationalPokedexNum(gBattleMons[gActiveBattler].species), FLAG_SET_SEEN, gBattleMons[gActiveBattler].personality);
|
||||
}
|
||||
BtlController_EmitLoadMonSprite(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER);
|
||||
BtlController_EmitLoadMonSprite(BATTLELINKCOMMTYPE_ENGINE_TO_CONTROLLER);
|
||||
MarkBattlerForControllerExec(gActiveBattler);
|
||||
gBattleResults.lastOpponentSpecies = GetMonData(&gEnemyParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_SPECIES, NULL);
|
||||
}
|
||||
@@ -3471,14 +3471,14 @@ static void BattleIntroDrawTrainersOrMonsSprites(void)
|
||||
if (GetBattlerPosition(gActiveBattler) == B_POSITION_PLAYER_RIGHT
|
||||
|| GetBattlerPosition(gActiveBattler) == B_POSITION_OPPONENT_RIGHT)
|
||||
{
|
||||
BtlController_EmitDrawTrainerPic(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER);
|
||||
BtlController_EmitDrawTrainerPic(BATTLELINKCOMMTYPE_ENGINE_TO_CONTROLLER);
|
||||
MarkBattlerForControllerExec(gActiveBattler);
|
||||
}
|
||||
}
|
||||
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS && GetBattlerPosition(gActiveBattler) == B_POSITION_OPPONENT_RIGHT)
|
||||
{
|
||||
BtlController_EmitDrawTrainerPic(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER);
|
||||
BtlController_EmitDrawTrainerPic(BATTLELINKCOMMTYPE_ENGINE_TO_CONTROLLER);
|
||||
MarkBattlerForControllerExec(gActiveBattler);
|
||||
}
|
||||
|
||||
@@ -3513,7 +3513,7 @@ static void BattleIntroDrawPartySummaryScreens(void)
|
||||
}
|
||||
}
|
||||
gActiveBattler = GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT);
|
||||
BtlController_EmitDrawPartyStatusSummary(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, hpStatus, PARTY_SUMM_SKIP_DRAW_DELAY);
|
||||
BtlController_EmitDrawPartyStatusSummary(BATTLELINKCOMMTYPE_ENGINE_TO_CONTROLLER, hpStatus, PARTY_SUMM_SKIP_DRAW_DELAY);
|
||||
MarkBattlerForControllerExec(gActiveBattler);
|
||||
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
@@ -3531,7 +3531,7 @@ static void BattleIntroDrawPartySummaryScreens(void)
|
||||
}
|
||||
}
|
||||
gActiveBattler = GetBattlerAtPosition(B_POSITION_PLAYER_LEFT);
|
||||
BtlController_EmitDrawPartyStatusSummary(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, hpStatus, PARTY_SUMM_SKIP_DRAW_DELAY);
|
||||
BtlController_EmitDrawPartyStatusSummary(BATTLELINKCOMMTYPE_ENGINE_TO_CONTROLLER, hpStatus, PARTY_SUMM_SKIP_DRAW_DELAY);
|
||||
MarkBattlerForControllerExec(gActiveBattler);
|
||||
|
||||
gBattleMainFunc = BattleIntroPrintTrainerWantsToBattle;
|
||||
@@ -3631,7 +3631,7 @@ static void BattleIntroOpponent2SendsOutMonAnimation(void)
|
||||
{
|
||||
if (GetBattlerPosition(gActiveBattler) == position)
|
||||
{
|
||||
BtlController_EmitIntroTrainerBallThrow(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER);
|
||||
BtlController_EmitIntroTrainerBallThrow(BATTLELINKCOMMTYPE_ENGINE_TO_CONTROLLER);
|
||||
MarkBattlerForControllerExec(gActiveBattler);
|
||||
}
|
||||
}
|
||||
@@ -3669,7 +3669,7 @@ static void BattleIntroOpponent1SendsOutMonAnimation(void)
|
||||
{
|
||||
if (GetBattlerPosition(gActiveBattler) == position)
|
||||
{
|
||||
BtlController_EmitIntroTrainerBallThrow(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER);
|
||||
BtlController_EmitIntroTrainerBallThrow(BATTLELINKCOMMTYPE_ENGINE_TO_CONTROLLER);
|
||||
MarkBattlerForControllerExec(gActiveBattler);
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_MULTI | BATTLE_TYPE_TWO_OPPONENTS))
|
||||
{
|
||||
@@ -3761,7 +3761,7 @@ static void BattleIntroPlayer2SendsOutMonAnimation(void)
|
||||
{
|
||||
if (GetBattlerPosition(gActiveBattler) == position)
|
||||
{
|
||||
BtlController_EmitIntroTrainerBallThrow(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER);
|
||||
BtlController_EmitIntroTrainerBallThrow(BATTLELINKCOMMTYPE_ENGINE_TO_CONTROLLER);
|
||||
MarkBattlerForControllerExec(gActiveBattler);
|
||||
}
|
||||
}
|
||||
@@ -3800,7 +3800,7 @@ static void BattleIntroPlayer1SendsOutMonAnimation(void)
|
||||
{
|
||||
if (GetBattlerPosition(gActiveBattler) == position)
|
||||
{
|
||||
BtlController_EmitIntroTrainerBallThrow(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER);
|
||||
BtlController_EmitIntroTrainerBallThrow(BATTLELINKCOMMTYPE_ENGINE_TO_CONTROLLER);
|
||||
MarkBattlerForControllerExec(gActiveBattler);
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_MULTI))
|
||||
{
|
||||
@@ -3825,7 +3825,7 @@ static void UNUSED BattleIntroSwitchInPlayerMons(void)
|
||||
{
|
||||
if (GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER)
|
||||
{
|
||||
BtlController_EmitSwitchInAnim(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, gBattlerPartyIndexes[gActiveBattler], FALSE);
|
||||
BtlController_EmitSwitchInAnim(BATTLELINKCOMMTYPE_ENGINE_TO_CONTROLLER, gBattlerPartyIndexes[gActiveBattler], FALSE);
|
||||
MarkBattlerForControllerExec(gActiveBattler);
|
||||
}
|
||||
}
|
||||
@@ -4165,7 +4165,7 @@ static void HandleTurnActionSelectionState(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
BtlController_EmitChooseAction(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, gChosenActionByBattler[0], gBattleBufferB[0][1] | (gBattleBufferB[0][2] << 8));
|
||||
BtlController_EmitChooseAction(BATTLELINKCOMMTYPE_ENGINE_TO_CONTROLLER, gChosenActionByBattler[0], gBattleBufferB[0][1] | (gBattleBufferB[0][2] << 8));
|
||||
MarkBattlerForControllerExec(gActiveBattler);
|
||||
gBattleCommunication[gActiveBattler]++;
|
||||
}
|
||||
@@ -4214,7 +4214,7 @@ static void HandleTurnActionSelectionState(void)
|
||||
i);
|
||||
}
|
||||
|
||||
BtlController_EmitChooseMove(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) != 0, FALSE, &moveInfo);
|
||||
BtlController_EmitChooseMove(BATTLELINKCOMMTYPE_ENGINE_TO_CONTROLLER, (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) != 0, FALSE, &moveInfo);
|
||||
MarkBattlerForControllerExec(gActiveBattler);
|
||||
}
|
||||
break;
|
||||
@@ -4233,7 +4233,7 @@ static void HandleTurnActionSelectionState(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
BtlController_EmitChooseItem(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, gBattleStruct->battlerPartyOrders[gActiveBattler]);
|
||||
BtlController_EmitChooseItem(BATTLELINKCOMMTYPE_ENGINE_TO_CONTROLLER, gBattleStruct->battlerPartyOrders[gActiveBattler]);
|
||||
MarkBattlerForControllerExec(gActiveBattler);
|
||||
}
|
||||
break;
|
||||
@@ -4243,7 +4243,7 @@ static void HandleTurnActionSelectionState(void)
|
||||
|| gBattleTypeFlags & BATTLE_TYPE_ARENA
|
||||
|| gStatuses3[gActiveBattler] & STATUS3_ROOTED)
|
||||
{
|
||||
BtlController_EmitChoosePokemon(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, PARTY_ACTION_CANT_SWITCH, PARTY_SIZE, ABILITY_NONE, gBattleStruct->battlerPartyOrders[gActiveBattler]);
|
||||
BtlController_EmitChoosePokemon(BATTLELINKCOMMTYPE_ENGINE_TO_CONTROLLER, PARTY_ACTION_CANT_SWITCH, PARTY_SIZE, ABILITY_NONE, gBattleStruct->battlerPartyOrders[gActiveBattler]);
|
||||
}
|
||||
else if ((i = ABILITY_ON_OPPOSING_FIELD(gActiveBattler, ABILITY_SHADOW_TAG))
|
||||
|| ((i = ABILITY_ON_OPPOSING_FIELD(gActiveBattler, ABILITY_ARENA_TRAP))
|
||||
@@ -4252,16 +4252,16 @@ static void HandleTurnActionSelectionState(void)
|
||||
|| ((i = AbilityBattleEffects(ABILITYEFFECT_CHECK_FIELD_EXCEPT_BATTLER, gActiveBattler, ABILITY_MAGNET_PULL, 0, 0))
|
||||
&& IS_BATTLER_OF_TYPE(gActiveBattler, TYPE_STEEL)))
|
||||
{
|
||||
BtlController_EmitChoosePokemon(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, ((i - 1) << 4) | PARTY_ACTION_ABILITY_PREVENTS, PARTY_SIZE, gLastUsedAbility, gBattleStruct->battlerPartyOrders[gActiveBattler]);
|
||||
BtlController_EmitChoosePokemon(BATTLELINKCOMMTYPE_ENGINE_TO_CONTROLLER, ((i - 1) << 4) | PARTY_ACTION_ABILITY_PREVENTS, PARTY_SIZE, gLastUsedAbility, gBattleStruct->battlerPartyOrders[gActiveBattler]);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gActiveBattler == 2 && gChosenActionByBattler[0] == B_ACTION_SWITCH)
|
||||
BtlController_EmitChoosePokemon(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, PARTY_ACTION_CHOOSE_MON, *(gBattleStruct->monToSwitchIntoId + 0), ABILITY_NONE, gBattleStruct->battlerPartyOrders[gActiveBattler]);
|
||||
BtlController_EmitChoosePokemon(BATTLELINKCOMMTYPE_ENGINE_TO_CONTROLLER, PARTY_ACTION_CHOOSE_MON, *(gBattleStruct->monToSwitchIntoId + 0), ABILITY_NONE, gBattleStruct->battlerPartyOrders[gActiveBattler]);
|
||||
else if (gActiveBattler == 3 && gChosenActionByBattler[1] == B_ACTION_SWITCH)
|
||||
BtlController_EmitChoosePokemon(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, PARTY_ACTION_CHOOSE_MON, *(gBattleStruct->monToSwitchIntoId + 1), ABILITY_NONE, gBattleStruct->battlerPartyOrders[gActiveBattler]);
|
||||
BtlController_EmitChoosePokemon(BATTLELINKCOMMTYPE_ENGINE_TO_CONTROLLER, PARTY_ACTION_CHOOSE_MON, *(gBattleStruct->monToSwitchIntoId + 1), ABILITY_NONE, gBattleStruct->battlerPartyOrders[gActiveBattler]);
|
||||
else
|
||||
BtlController_EmitChoosePokemon(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, PARTY_ACTION_CHOOSE_MON, PARTY_SIZE, ABILITY_NONE, gBattleStruct->battlerPartyOrders[gActiveBattler]);
|
||||
BtlController_EmitChoosePokemon(BATTLELINKCOMMTYPE_ENGINE_TO_CONTROLLER, PARTY_ACTION_CHOOSE_MON, PARTY_SIZE, ABILITY_NONE, gBattleStruct->battlerPartyOrders[gActiveBattler]);
|
||||
}
|
||||
MarkBattlerForControllerExec(gActiveBattler);
|
||||
break;
|
||||
@@ -4276,7 +4276,7 @@ static void HandleTurnActionSelectionState(void)
|
||||
}
|
||||
break;
|
||||
case B_ACTION_SAFARI_POKEBLOCK:
|
||||
BtlController_EmitChooseItem(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, gBattleStruct->battlerPartyOrders[gActiveBattler]);
|
||||
BtlController_EmitChooseItem(BATTLELINKCOMMTYPE_ENGINE_TO_CONTROLLER, gBattleStruct->battlerPartyOrders[gActiveBattler]);
|
||||
MarkBattlerForControllerExec(gActiveBattler);
|
||||
break;
|
||||
case B_ACTION_CANCEL_PARTNER:
|
||||
@@ -4286,7 +4286,7 @@ static void HandleTurnActionSelectionState(void)
|
||||
if (gBattleMons[GetBattlerAtPosition(BATTLE_PARTNER(GetBattlerPosition(gActiveBattler)))].status2 & STATUS2_MULTIPLETURNS
|
||||
|| gBattleMons[GetBattlerAtPosition(BATTLE_PARTNER(GetBattlerPosition(gActiveBattler)))].status2 & STATUS2_RECHARGE)
|
||||
{
|
||||
BtlController_EmitEndBounceEffect(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER);
|
||||
BtlController_EmitEndBounceEffect(BATTLELINKCOMMTYPE_ENGINE_TO_CONTROLLER);
|
||||
MarkBattlerForControllerExec(gActiveBattler);
|
||||
return;
|
||||
}
|
||||
@@ -4314,7 +4314,7 @@ static void HandleTurnActionSelectionState(void)
|
||||
{
|
||||
RecordedBattle_ClearBattlerAction(GetBattlerAtPosition(BATTLE_PARTNER(GetBattlerPosition(gActiveBattler))), 3);
|
||||
}
|
||||
BtlController_EmitEndBounceEffect(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER);
|
||||
BtlController_EmitEndBounceEffect(BATTLELINKCOMMTYPE_ENGINE_TO_CONTROLLER);
|
||||
MarkBattlerForControllerExec(gActiveBattler);
|
||||
return;
|
||||
}
|
||||
@@ -4467,11 +4467,11 @@ static void HandleTurnActionSelectionState(void)
|
||||
|| (position & BIT_FLANK) != B_FLANK_LEFT
|
||||
|| (*(&gBattleStruct->absentBattlerFlags) & gBitTable[GetBattlerAtPosition(BATTLE_PARTNER(position))]))
|
||||
{
|
||||
BtlController_EmitLinkStandbyMsg(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, LINK_STANDBY_MSG_STOP_BOUNCE, i);
|
||||
BtlController_EmitLinkStandbyMsg(BATTLELINKCOMMTYPE_ENGINE_TO_CONTROLLER, LINK_STANDBY_MSG_STOP_BOUNCE, i);
|
||||
}
|
||||
else
|
||||
{
|
||||
BtlController_EmitLinkStandbyMsg(BATTLELINKMSGTYPE_ENGINE_TO_CONTROLLER, LINK_STANDBY_STOP_BOUNCE_ONLY, i);
|
||||
BtlController_EmitLinkStandbyMsg(BATTLELINKCOMMTYPE_ENGINE_TO_CONTROLLER, LINK_STANDBY_STOP_BOUNCE_ONLY, i);
|
||||
}
|
||||
MarkBattlerForControllerExec(gActiveBattler);
|
||||
gBattleCommunication[gActiveBattler]++;
|
||||
|
||||
Reference in New Issue
Block a user