Fixed find-and-replace mistake
Functions were using the wrong constant.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user