Merge pull request #1516 from GriffinRichards/doc-miscbattle
Miscellaneous battle documentation
This commit is contained in:
@@ -25,9 +25,6 @@
|
||||
#include "constants/battle_anim.h"
|
||||
#include "constants/songs.h"
|
||||
|
||||
extern struct MusicPlayerInfo gMPlayInfo_BGM;
|
||||
|
||||
// this file's functions
|
||||
static void RecordedPlayerHandleGetMonData(void);
|
||||
static void RecordedPlayerHandleGetRawMonData(void);
|
||||
static void RecordedPlayerHandleSetMonData(void);
|
||||
@@ -390,7 +387,7 @@ static void FreeMonSpriteAfterSwitchOutAnim(void)
|
||||
|
||||
static void CompleteOnInactiveTextPrinter(void)
|
||||
{
|
||||
if (!IsTextPrinterActive(0))
|
||||
if (!IsTextPrinterActive(B_WIN_MSG))
|
||||
RecordedPlayerBufferExecCompleted();
|
||||
}
|
||||
|
||||
@@ -520,7 +517,7 @@ static void RecordedPlayerHandleGetMonData(void)
|
||||
monToCheck >>= 1;
|
||||
}
|
||||
}
|
||||
BtlController_EmitDataTransfer(1, size, monData);
|
||||
BtlController_EmitDataTransfer(BUFFER_B, size, monData);
|
||||
RecordedPlayerBufferExecCompleted();
|
||||
}
|
||||
|
||||
@@ -1404,7 +1401,7 @@ static void RecordedPlayerHandlePrintString(void)
|
||||
gBattle_BG0_Y = 0;
|
||||
stringId = (u16*)(&gBattleBufferA[gActiveBattler][2]);
|
||||
BufferStringBattle(*stringId);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, 0);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG);
|
||||
gBattlerControllerFuncs[gActiveBattler] = CompleteOnInactiveTextPrinter;
|
||||
}
|
||||
|
||||
@@ -1417,7 +1414,7 @@ static void ChooseActionInBattlePalace(void)
|
||||
{
|
||||
if (gBattleCommunication[4] >= gBattlersCount / 2)
|
||||
{
|
||||
BtlController_EmitTwoReturnValues(1, RecordedBattle_GetBattlerAction(gActiveBattler), 0);
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, RecordedBattle_GetBattlerAction(gActiveBattler), 0);
|
||||
RecordedPlayerBufferExecCompleted();
|
||||
}
|
||||
}
|
||||
@@ -1430,7 +1427,7 @@ static void RecordedPlayerHandleChooseAction(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
BtlController_EmitTwoReturnValues(1, RecordedBattle_GetBattlerAction(gActiveBattler), 0);
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, RecordedBattle_GetBattlerAction(gActiveBattler), 0);
|
||||
RecordedPlayerBufferExecCompleted();
|
||||
}
|
||||
}
|
||||
@@ -1444,13 +1441,13 @@ static void RecordedPlayerHandleChooseMove(void)
|
||||
{
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_PALACE)
|
||||
{
|
||||
BtlController_EmitTwoReturnValues(1, 10, ChooseMoveAndTargetInBattlePalace());
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, 10, ChooseMoveAndTargetInBattlePalace());
|
||||
}
|
||||
else
|
||||
{
|
||||
u8 moveId = RecordedBattle_GetBattlerAction(gActiveBattler);
|
||||
u8 target = RecordedBattle_GetBattlerAction(gActiveBattler);
|
||||
BtlController_EmitTwoReturnValues(1, 10, moveId | (target << 8));
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, 10, moveId | (target << 8));
|
||||
}
|
||||
|
||||
RecordedPlayerBufferExecCompleted();
|
||||
@@ -1464,7 +1461,7 @@ static void RecordedPlayerHandleChooseItem(void)
|
||||
static void RecordedPlayerHandleChoosePokemon(void)
|
||||
{
|
||||
*(gBattleStruct->monToSwitchIntoId + gActiveBattler) = RecordedBattle_GetBattlerAction(gActiveBattler);
|
||||
BtlController_EmitChosenMonReturnValue(1, *(gBattleStruct->monToSwitchIntoId + gActiveBattler), NULL);
|
||||
BtlController_EmitChosenMonReturnValue(BUFFER_B, *(gBattleStruct->monToSwitchIntoId + gActiveBattler), NULL);
|
||||
RecordedPlayerBufferExecCompleted();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user