Add controller buffer constants, finish misc battle doc

This commit is contained in:
GriffinR
2021-10-12 19:50:32 -04:00
parent b0598b1aef
commit fc15b0d5f0
22 changed files with 435 additions and 399 deletions

View File

@@ -332,7 +332,7 @@ static void Task_GiveExpToMon(u8 taskId)
gainedExp -= nextLvlExp - currExp;
savedActiveBank = gActiveBattler;
gActiveBattler = battlerId;
BtlController_EmitTwoReturnValues(1, RET_VALUE_LEVELED_UP, gainedExp);
BtlController_EmitTwoReturnValues(BUFFER_B, 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(1, RET_VALUE_LEVELED_UP, gainedExp);
BtlController_EmitTwoReturnValues(BUFFER_B, RET_VALUE_LEVELED_UP, gainedExp);
gActiveBattler = savedActiveBank;
gTasks[taskId].func = Task_LaunchLvlUpAnim;
}
@@ -626,7 +626,7 @@ static void PlayerPartnerHandleGetMonData(void)
monToCheck >>= 1;
}
}
BtlController_EmitDataTransfer(1, size, monData);
BtlController_EmitDataTransfer(BUFFER_B, size, monData);
PlayerPartnerBufferExecCompleted();
}
@@ -1527,7 +1527,7 @@ static void PlayerPartnerHandleChooseMove(void)
gBattlerTarget = GetBattlerAtPosition(B_POSITION_OPPONENT_RIGHT);
}
BtlController_EmitTwoReturnValues(1, 10, chosenMoveId | (gBattlerTarget << 8));
BtlController_EmitTwoReturnValues(BUFFER_B, 10, chosenMoveId | (gBattlerTarget << 8));
PlayerPartnerBufferExecCompleted();
}
@@ -1557,7 +1557,7 @@ static void PlayerPartnerHandleChoosePokemon(void)
}
*(gBattleStruct->monToSwitchIntoId + gActiveBattler) = chosenMonId;
BtlController_EmitChosenMonReturnValue(1, chosenMonId, NULL);
BtlController_EmitChosenMonReturnValue(BUFFER_B, chosenMonId, NULL);
PlayerPartnerBufferExecCompleted();
}