mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 19:54:21 +01:00
ball throw and start removing empty controller functions
This commit is contained in:
parent
c72bb27325
commit
5a8b6c18ef
@ -252,8 +252,11 @@ void BtlController_EmitResetActionMoveSelection(u8 bufferId, u8 caseId);
|
||||
void BtlController_EmitEndLinkBattle(u8 bufferId, u8 battleOutcome);
|
||||
void BtlController_EmitDebugMenu(u8 bufferId);
|
||||
|
||||
void BtlController_Empty(void); // Empty command, does nothing, only completes the execution.
|
||||
void BtlController_TerminatorNop(void); // Dummy function at the end of the table.
|
||||
void StartSendOutAnim(u32 battler, bool32 dontClearSubstituteBit);
|
||||
|
||||
// handlers
|
||||
void BtlController_HandleGetMonData(u32 battler, struct Pokemon *party);
|
||||
void BtlController_HandleGetRawMonData(u32 battler, struct Pokemon *party);
|
||||
void BtlController_HandleSetMonData(u32 battler, struct Pokemon *party);
|
||||
@ -262,6 +265,8 @@ void BtlController_HandleLoadMonSprite(u32 battler, struct Pokemon *party, void
|
||||
void BtlController_HandleSwitchInAnim(u32 battler, bool32 isPlayerSide, void (*controllerCallback)(void));
|
||||
void BtlController_HandleReturnMonToBall(u32 battler);
|
||||
void BtlController_HandleFaintAnimation(u32 battler);
|
||||
void BtlController_HandleSuccessBallThrowAnim(u32 battler, u32 target, u32 animId, bool32 allowCriticalCapture);
|
||||
void BtlController_HandleBallThrowAnim(u32 battler, u32 target, u32 animId, bool32 allowCriticalCapture);
|
||||
|
||||
// player controller
|
||||
void SetControllerToPlayer(void);
|
||||
|
@ -1585,12 +1585,6 @@ static void CompleteWhenChoseItem(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void CompleteOnSpecialAnimDone(void)
|
||||
{
|
||||
if (!gDoingBattleAnim || !gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].specialAnimActive)
|
||||
PlayerBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void DoHitAnimBlinkSpriteEffect(void)
|
||||
{
|
||||
u8 spriteId = gBattlerSpriteIds[gActiveBattler];
|
||||
@ -1964,28 +1958,12 @@ static void PlayerHandlePaletteFade(void)
|
||||
|
||||
static void PlayerHandleSuccessBallThrowAnim(void)
|
||||
{
|
||||
gBattleSpritesDataPtr->animationData->ballThrowCaseId = BALL_3_SHAKES_SUCCESS;
|
||||
gDoingBattleAnim = TRUE;
|
||||
if (IsCriticalCapture())
|
||||
InitAndLaunchSpecialAnimation(gActiveBattler, gActiveBattler, gBattlerTarget, B_ANIM_CRITICAL_CAPTURE_THROW);
|
||||
else
|
||||
InitAndLaunchSpecialAnimation(gActiveBattler, gActiveBattler, gBattlerTarget, B_ANIM_BALL_THROW);
|
||||
|
||||
gBattlerControllerFuncs[gActiveBattler] = CompleteOnSpecialAnimDone;
|
||||
BtlController_HandleSuccessBallThrowAnim(gActiveBattler, gBattlerTarget, B_ANIM_BALL_THROW, TRUE);
|
||||
}
|
||||
|
||||
static void PlayerHandleBallThrowAnim(void)
|
||||
{
|
||||
u8 ballThrowCaseId = gBattleResources->bufferA[gActiveBattler][1];
|
||||
|
||||
gBattleSpritesDataPtr->animationData->ballThrowCaseId = ballThrowCaseId;
|
||||
gDoingBattleAnim = TRUE;
|
||||
if (IsCriticalCapture())
|
||||
InitAndLaunchSpecialAnimation(gActiveBattler, gActiveBattler, gBattlerTarget, B_ANIM_CRITICAL_CAPTURE_THROW);
|
||||
else
|
||||
InitAndLaunchSpecialAnimation(gActiveBattler, gActiveBattler, gBattlerTarget, B_ANIM_BALL_THROW);
|
||||
|
||||
gBattlerControllerFuncs[gActiveBattler] = CompleteOnSpecialAnimDone;
|
||||
BtlController_HandleBallThrowAnim(gActiveBattler, gBattlerTarget, B_ANIM_BALL_THROW, TRUE);
|
||||
}
|
||||
|
||||
static void PlayerHandlePause(void)
|
||||
|
@ -32,48 +32,28 @@
|
||||
#include "constants/trainers.h"
|
||||
|
||||
static void PlayerPartnerHandleGetMonData(void);
|
||||
static void PlayerPartnerHandleGetRawMonData(void);
|
||||
static void PlayerPartnerHandleSetMonData(void);
|
||||
static void PlayerPartnerHandleSetRawMonData(void);
|
||||
static void PlayerPartnerHandleLoadMonSprite(void);
|
||||
static void PlayerPartnerHandleSwitchInAnim(void);
|
||||
static void PlayerPartnerHandleReturnMonToBall(void);
|
||||
static void PlayerPartnerHandleDrawTrainerPic(void);
|
||||
static void PlayerPartnerHandleTrainerSlide(void);
|
||||
static void PlayerPartnerHandleTrainerSlideBack(void);
|
||||
static void PlayerPartnerHandleFaintAnimation(void);
|
||||
static void PlayerPartnerHandlePaletteFade(void);
|
||||
static void PlayerPartnerHandleSuccessBallThrowAnim(void);
|
||||
static void PlayerPartnerHandleBallThrowAnim(void);
|
||||
static void PlayerPartnerHandlePause(void);
|
||||
static void PlayerPartnerHandleMoveAnimation(void);
|
||||
static void PlayerPartnerHandlePrintString(void);
|
||||
static void PlayerPartnerHandlePrintSelectionString(void);
|
||||
static void PlayerPartnerHandleChooseAction(void);
|
||||
static void PlayerPartnerHandleYesNoBox(void);
|
||||
static void PlayerPartnerHandleChooseMove(void);
|
||||
static void PlayerPartnerHandleChooseItem(void);
|
||||
static void PlayerPartnerHandleChoosePokemon(void);
|
||||
static void PlayerPartnerHandleCmd23(void);
|
||||
static void PlayerPartnerHandleHealthBarUpdate(void);
|
||||
static void PlayerPartnerHandleExpUpdate(void);
|
||||
static void PlayerPartnerHandleStatusIconUpdate(void);
|
||||
static void PlayerPartnerHandleStatusAnimation(void);
|
||||
static void PlayerPartnerHandleStatusXor(void);
|
||||
static void PlayerPartnerHandleDataTransfer(void);
|
||||
static void PlayerPartnerHandleDMA3Transfer(void);
|
||||
static void PlayerPartnerHandlePlayBGM(void);
|
||||
static void PlayerPartnerHandleCmd32(void);
|
||||
static void PlayerPartnerHandleTwoReturnValues(void);
|
||||
static void PlayerPartnerHandleChosenMonReturnValue(void);
|
||||
static void PlayerPartnerHandleOneReturnValue(void);
|
||||
static void PlayerPartnerHandleOneReturnValue_Duplicate(void);
|
||||
static void PlayerPartnerHandleClearUnkVar(void);
|
||||
static void PlayerPartnerHandleSetUnkVar(void);
|
||||
static void PlayerPartnerHandleClearUnkFlag(void);
|
||||
static void PlayerPartnerHandleToggleUnkFlag(void);
|
||||
static void PlayerPartnerHandleHitAnimation(void);
|
||||
static void PlayerPartnerHandleCantSwitch(void);
|
||||
static void PlayerPartnerHandlePlaySE(void);
|
||||
static void PlayerPartnerHandlePlayFanfareOrBGM(void);
|
||||
static void PlayerPartnerHandleFaintingCry(void);
|
||||
@ -81,14 +61,9 @@ static void PlayerPartnerHandleIntroSlide(void);
|
||||
static void PlayerPartnerHandleIntroTrainerBallThrow(void);
|
||||
static void PlayerPartnerHandleDrawPartyStatusSummary(void);
|
||||
static void PlayerPartnerHandleHidePartyStatusSummary(void);
|
||||
static void PlayerPartnerHandleEndBounceEffect(void);
|
||||
static void PlayerPartnerHandleSpriteInvisibility(void);
|
||||
static void PlayerPartnerHandleBattleAnimation(void);
|
||||
static void PlayerPartnerHandleLinkStandbyMsg(void);
|
||||
static void PlayerPartnerHandleResetActionMoveSelection(void);
|
||||
static void PlayerPartnerHandleEndLinkBattle(void);
|
||||
static void PlayerPartnerHandleBattleDebug(void);
|
||||
static void PlayerPartnerCmdEnd(void);
|
||||
|
||||
static void PlayerPartnerBufferRunCommand(void);
|
||||
static void PlayerPartnerBufferExecCompleted(void);
|
||||
@ -107,48 +82,48 @@ static void EndDrawPartyStatusSummary(void);
|
||||
static void (*const sPlayerPartnerBufferCommands[CONTROLLER_CMDS_COUNT])(void) =
|
||||
{
|
||||
[CONTROLLER_GETMONDATA] = PlayerPartnerHandleGetMonData,
|
||||
[CONTROLLER_GETRAWMONDATA] = PlayerPartnerHandleGetRawMonData,
|
||||
[CONTROLLER_GETRAWMONDATA] = BtlController_Empty,
|
||||
[CONTROLLER_SETMONDATA] = PlayerPartnerHandleSetMonData,
|
||||
[CONTROLLER_SETRAWMONDATA] = PlayerPartnerHandleSetRawMonData,
|
||||
[CONTROLLER_LOADMONSPRITE] = PlayerPartnerHandleLoadMonSprite,
|
||||
[CONTROLLER_SWITCHINANIM] = PlayerPartnerHandleSwitchInAnim,
|
||||
[CONTROLLER_RETURNMONTOBALL] = PlayerPartnerHandleReturnMonToBall,
|
||||
[CONTROLLER_DRAWTRAINERPIC] = PlayerPartnerHandleDrawTrainerPic,
|
||||
[CONTROLLER_TRAINERSLIDE] = PlayerPartnerHandleTrainerSlide,
|
||||
[CONTROLLER_TRAINERSLIDE] = BtlController_Empty,
|
||||
[CONTROLLER_TRAINERSLIDEBACK] = PlayerPartnerHandleTrainerSlideBack,
|
||||
[CONTROLLER_FAINTANIMATION] = PlayerPartnerHandleFaintAnimation,
|
||||
[CONTROLLER_PALETTEFADE] = PlayerPartnerHandlePaletteFade,
|
||||
[CONTROLLER_SUCCESSBALLTHROWANIM] = PlayerPartnerHandleSuccessBallThrowAnim,
|
||||
[CONTROLLER_BALLTHROWANIM] = PlayerPartnerHandleBallThrowAnim,
|
||||
[CONTROLLER_PAUSE] = PlayerPartnerHandlePause,
|
||||
[CONTROLLER_PALETTEFADE] = BtlController_Empty,
|
||||
[CONTROLLER_SUCCESSBALLTHROWANIM] = BtlController_Empty,
|
||||
[CONTROLLER_BALLTHROWANIM] = BtlController_Empty,
|
||||
[CONTROLLER_PAUSE] = BtlController_Empty,
|
||||
[CONTROLLER_MOVEANIMATION] = PlayerPartnerHandleMoveAnimation,
|
||||
[CONTROLLER_PRINTSTRING] = PlayerPartnerHandlePrintString,
|
||||
[CONTROLLER_PRINTSTRINGPLAYERONLY] = PlayerPartnerHandlePrintSelectionString,
|
||||
[CONTROLLER_PRINTSTRINGPLAYERONLY] = BtlController_Empty,
|
||||
[CONTROLLER_CHOOSEACTION] = PlayerPartnerHandleChooseAction,
|
||||
[CONTROLLER_YESNOBOX] = PlayerPartnerHandleYesNoBox,
|
||||
[CONTROLLER_YESNOBOX] = BtlController_Empty,
|
||||
[CONTROLLER_CHOOSEMOVE] = PlayerPartnerHandleChooseMove,
|
||||
[CONTROLLER_OPENBAG] = PlayerPartnerHandleChooseItem,
|
||||
[CONTROLLER_OPENBAG] = BtlController_Empty,
|
||||
[CONTROLLER_CHOOSEPOKEMON] = PlayerPartnerHandleChoosePokemon,
|
||||
[CONTROLLER_23] = PlayerPartnerHandleCmd23,
|
||||
[CONTROLLER_23] = BtlController_Empty,
|
||||
[CONTROLLER_HEALTHBARUPDATE] = PlayerPartnerHandleHealthBarUpdate,
|
||||
[CONTROLLER_EXPUPDATE] = PlayerPartnerHandleExpUpdate,
|
||||
[CONTROLLER_STATUSICONUPDATE] = PlayerPartnerHandleStatusIconUpdate,
|
||||
[CONTROLLER_STATUSANIMATION] = PlayerPartnerHandleStatusAnimation,
|
||||
[CONTROLLER_STATUSXOR] = PlayerPartnerHandleStatusXor,
|
||||
[CONTROLLER_DATATRANSFER] = PlayerPartnerHandleDataTransfer,
|
||||
[CONTROLLER_DMA3TRANSFER] = PlayerPartnerHandleDMA3Transfer,
|
||||
[CONTROLLER_PLAYBGM] = PlayerPartnerHandlePlayBGM,
|
||||
[CONTROLLER_32] = PlayerPartnerHandleCmd32,
|
||||
[CONTROLLER_TWORETURNVALUES] = PlayerPartnerHandleTwoReturnValues,
|
||||
[CONTROLLER_CHOSENMONRETURNVALUE] = PlayerPartnerHandleChosenMonReturnValue,
|
||||
[CONTROLLER_ONERETURNVALUE] = PlayerPartnerHandleOneReturnValue,
|
||||
[CONTROLLER_ONERETURNVALUE_DUPLICATE] = PlayerPartnerHandleOneReturnValue_Duplicate,
|
||||
[CONTROLLER_STATUSXOR] = BtlController_Empty,
|
||||
[CONTROLLER_DATATRANSFER] = BtlController_Empty,
|
||||
[CONTROLLER_DMA3TRANSFER] = BtlController_Empty,
|
||||
[CONTROLLER_PLAYBGM] = BtlController_Empty,
|
||||
[CONTROLLER_32] = BtlController_Empty,
|
||||
[CONTROLLER_TWORETURNVALUES] = BtlController_Empty,
|
||||
[CONTROLLER_CHOSENMONRETURNVALUE] = BtlController_Empty,
|
||||
[CONTROLLER_ONERETURNVALUE] = BtlController_Empty,
|
||||
[CONTROLLER_ONERETURNVALUE_DUPLICATE] = BtlController_Empty,
|
||||
[CONTROLLER_CLEARUNKVAR] = PlayerPartnerHandleClearUnkVar,
|
||||
[CONTROLLER_SETUNKVAR] = PlayerPartnerHandleSetUnkVar,
|
||||
[CONTROLLER_CLEARUNKFLAG] = PlayerPartnerHandleClearUnkFlag,
|
||||
[CONTROLLER_TOGGLEUNKFLAG] = PlayerPartnerHandleToggleUnkFlag,
|
||||
[CONTROLLER_HITANIMATION] = PlayerPartnerHandleHitAnimation,
|
||||
[CONTROLLER_CANTSWITCH] = PlayerPartnerHandleCantSwitch,
|
||||
[CONTROLLER_CANTSWITCH] = BtlController_Empty,
|
||||
[CONTROLLER_PLAYSE] = PlayerPartnerHandlePlaySE,
|
||||
[CONTROLLER_PLAYFANFAREORBGM] = PlayerPartnerHandlePlayFanfareOrBGM,
|
||||
[CONTROLLER_FAINTINGCRY] = PlayerPartnerHandleFaintingCry,
|
||||
@ -156,14 +131,14 @@ static void (*const sPlayerPartnerBufferCommands[CONTROLLER_CMDS_COUNT])(void) =
|
||||
[CONTROLLER_INTROTRAINERBALLTHROW] = PlayerPartnerHandleIntroTrainerBallThrow,
|
||||
[CONTROLLER_DRAWPARTYSTATUSSUMMARY] = PlayerPartnerHandleDrawPartyStatusSummary,
|
||||
[CONTROLLER_HIDEPARTYSTATUSSUMMARY] = PlayerPartnerHandleHidePartyStatusSummary,
|
||||
[CONTROLLER_ENDBOUNCE] = PlayerPartnerHandleEndBounceEffect,
|
||||
[CONTROLLER_ENDBOUNCE] = BtlController_Empty,
|
||||
[CONTROLLER_SPRITEINVISIBILITY] = PlayerPartnerHandleSpriteInvisibility,
|
||||
[CONTROLLER_BATTLEANIMATION] = PlayerPartnerHandleBattleAnimation,
|
||||
[CONTROLLER_LINKSTANDBYMSG] = PlayerPartnerHandleLinkStandbyMsg,
|
||||
[CONTROLLER_RESETACTIONMOVESELECTION] = PlayerPartnerHandleResetActionMoveSelection,
|
||||
[CONTROLLER_LINKSTANDBYMSG] = BtlController_Empty,
|
||||
[CONTROLLER_RESETACTIONMOVESELECTION] = BtlController_Empty,
|
||||
[CONTROLLER_ENDLINKBATTLE] = PlayerPartnerHandleEndLinkBattle,
|
||||
[CONTROLLER_DEBUGMENU] = PlayerPartnerHandleBattleDebug,
|
||||
[CONTROLLER_TERMINATOR_NOP] = PlayerPartnerCmdEnd
|
||||
[CONTROLLER_DEBUGMENU] = BtlController_Empty,
|
||||
[CONTROLLER_TERMINATOR_NOP] = BtlController_TerminatorNop
|
||||
};
|
||||
|
||||
static void PlayerPartnerDummy(void)
|
||||
@ -581,11 +556,6 @@ static void PlayerPartnerHandleGetMonData(void)
|
||||
BtlController_HandleGetMonData(gActiveBattler, gPlayerParty);
|
||||
}
|
||||
|
||||
static void PlayerPartnerHandleGetRawMonData(void)
|
||||
{
|
||||
PlayerPartnerBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void PlayerPartnerHandleSetMonData(void)
|
||||
{
|
||||
BtlController_HandleSetMonData(gActiveBattler, gPlayerParty);
|
||||
@ -672,11 +642,6 @@ static void PlayerPartnerHandleDrawTrainerPic(void)
|
||||
|
||||
#undef sSpeedX
|
||||
|
||||
static void PlayerPartnerHandleTrainerSlide(void)
|
||||
{
|
||||
PlayerPartnerBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void PlayerPartnerHandleTrainerSlideBack(void)
|
||||
{
|
||||
SetSpritePrimaryCoordsFromSecondaryCoords(&gSprites[gBattlerSpriteIds[gActiveBattler]]);
|
||||
@ -693,26 +658,6 @@ static void PlayerPartnerHandleFaintAnimation(void)
|
||||
BtlController_HandleFaintAnimation(gActiveBattler);
|
||||
}
|
||||
|
||||
static void PlayerPartnerHandlePaletteFade(void)
|
||||
{
|
||||
PlayerPartnerBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void PlayerPartnerHandleSuccessBallThrowAnim(void)
|
||||
{
|
||||
PlayerPartnerBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void PlayerPartnerHandleBallThrowAnim(void)
|
||||
{
|
||||
PlayerPartnerBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void PlayerPartnerHandlePause(void)
|
||||
{
|
||||
PlayerPartnerBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void PlayerPartnerHandleMoveAnimation(void)
|
||||
{
|
||||
if (!IsBattleSEPlaying(gActiveBattler))
|
||||
@ -793,22 +738,12 @@ static void PlayerPartnerHandlePrintString(void)
|
||||
gBattlerControllerFuncs[gActiveBattler] = CompleteOnInactiveTextPrinter2;
|
||||
}
|
||||
|
||||
static void PlayerPartnerHandlePrintSelectionString(void)
|
||||
{
|
||||
PlayerPartnerBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void PlayerPartnerHandleChooseAction(void)
|
||||
{
|
||||
AI_TrySwitchOrUseItem();
|
||||
PlayerPartnerBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void PlayerPartnerHandleYesNoBox(void)
|
||||
{
|
||||
PlayerPartnerBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void PlayerPartnerHandleChooseMove(void)
|
||||
{
|
||||
u8 chosenMoveId;
|
||||
@ -838,11 +773,6 @@ static void PlayerPartnerHandleChooseMove(void)
|
||||
PlayerPartnerBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void PlayerPartnerHandleChooseItem(void)
|
||||
{
|
||||
PlayerPartnerBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void PlayerPartnerHandleChoosePokemon(void)
|
||||
{
|
||||
s32 chosenMonId;
|
||||
@ -876,11 +806,6 @@ static void PlayerPartnerHandleChoosePokemon(void)
|
||||
PlayerPartnerBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void PlayerPartnerHandleCmd23(void)
|
||||
{
|
||||
PlayerPartnerBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void PlayerPartnerHandleHealthBarUpdate(void)
|
||||
{
|
||||
s16 hpVal;
|
||||
@ -957,51 +882,6 @@ static void PlayerPartnerHandleStatusAnimation(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void PlayerPartnerHandleStatusXor(void)
|
||||
{
|
||||
PlayerPartnerBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void PlayerPartnerHandleDataTransfer(void)
|
||||
{
|
||||
PlayerPartnerBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void PlayerPartnerHandleDMA3Transfer(void)
|
||||
{
|
||||
PlayerPartnerBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void PlayerPartnerHandlePlayBGM(void)
|
||||
{
|
||||
PlayerPartnerBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void PlayerPartnerHandleCmd32(void)
|
||||
{
|
||||
PlayerPartnerBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void PlayerPartnerHandleTwoReturnValues(void)
|
||||
{
|
||||
PlayerPartnerBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void PlayerPartnerHandleChosenMonReturnValue(void)
|
||||
{
|
||||
PlayerPartnerBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void PlayerPartnerHandleOneReturnValue(void)
|
||||
{
|
||||
PlayerPartnerBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void PlayerPartnerHandleOneReturnValue_Duplicate(void)
|
||||
{
|
||||
PlayerPartnerBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void PlayerPartnerHandleClearUnkVar(void)
|
||||
{
|
||||
gUnusedControllerStruct.unk = 0;
|
||||
@ -1041,11 +921,6 @@ static void PlayerPartnerHandleHitAnimation(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void PlayerPartnerHandleCantSwitch(void)
|
||||
{
|
||||
PlayerPartnerBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void PlayerPartnerHandlePlaySE(void)
|
||||
{
|
||||
s8 pan;
|
||||
@ -1202,11 +1077,6 @@ static void PlayerPartnerHandleHidePartyStatusSummary(void)
|
||||
PlayerPartnerBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void PlayerPartnerHandleEndBounceEffect(void)
|
||||
{
|
||||
PlayerPartnerBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void PlayerPartnerHandleSpriteInvisibility(void)
|
||||
{
|
||||
if (IsBattlerSpritePresent(gActiveBattler))
|
||||
@ -1231,16 +1101,6 @@ static void PlayerPartnerHandleBattleAnimation(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void PlayerPartnerHandleLinkStandbyMsg(void)
|
||||
{
|
||||
PlayerPartnerBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void PlayerPartnerHandleResetActionMoveSelection(void)
|
||||
{
|
||||
PlayerPartnerBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void PlayerPartnerHandleEndLinkBattle(void)
|
||||
{
|
||||
gBattleOutcome = gBattleResources->bufferA[gActiveBattler][1];
|
||||
@ -1249,12 +1109,3 @@ static void PlayerPartnerHandleEndLinkBattle(void)
|
||||
PlayerPartnerBufferExecCompleted();
|
||||
gBattlerControllerFuncs[gActiveBattler] = SetBattleEndCallbacks;
|
||||
}
|
||||
|
||||
static void PlayerPartnerHandleBattleDebug(void)
|
||||
{
|
||||
PlayerPartnerBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void PlayerPartnerCmdEnd(void)
|
||||
{
|
||||
}
|
||||
|
@ -24,64 +24,22 @@
|
||||
#include "constants/songs.h"
|
||||
#include "constants/rgb.h"
|
||||
|
||||
static void SafariHandleGetMonData(void);
|
||||
static void SafariHandleGetRawMonData(void);
|
||||
static void SafariHandleSetMonData(void);
|
||||
static void SafariHandleSetRawMonData(void);
|
||||
static void SafariHandleLoadMonSprite(void);
|
||||
static void SafariHandleSwitchInAnim(void);
|
||||
static void SafariHandleReturnMonToBall(void);
|
||||
static void SafariHandleDrawTrainerPic(void);
|
||||
static void SafariHandleTrainerSlide(void);
|
||||
static void SafariHandleTrainerSlideBack(void);
|
||||
static void SafariHandleFaintAnimation(void);
|
||||
static void SafariHandlePaletteFade(void);
|
||||
static void SafariHandleSuccessBallThrowAnim(void);
|
||||
static void SafariHandleBallThrowAnim(void);
|
||||
static void SafariHandlePause(void);
|
||||
static void SafariHandleMoveAnimation(void);
|
||||
static void SafariHandlePrintString(void);
|
||||
static void SafariHandlePrintSelectionString(void);
|
||||
static void SafariHandleChooseAction(void);
|
||||
static void SafariHandleYesNoBox(void);
|
||||
static void SafariHandleChooseMove(void);
|
||||
static void SafariHandleChooseItem(void);
|
||||
static void SafariHandleChoosePokemon(void);
|
||||
static void SafariHandleCmd23(void);
|
||||
static void SafariHandleHealthBarUpdate(void);
|
||||
static void SafariHandleExpUpdate(void);
|
||||
static void SafariHandleStatusIconUpdate(void);
|
||||
static void SafariHandleStatusAnimation(void);
|
||||
static void SafariHandleStatusXor(void);
|
||||
static void SafariHandleDataTransfer(void);
|
||||
static void SafariHandleDMA3Transfer(void);
|
||||
static void SafariHandlePlayBGM(void);
|
||||
static void SafariHandleCmd32(void);
|
||||
static void SafariHandleTwoReturnValues(void);
|
||||
static void SafariHandleChosenMonReturnValue(void);
|
||||
static void SafariHandleOneReturnValue(void);
|
||||
static void SafariHandleOneReturnValue_Duplicate(void);
|
||||
static void SafariHandleClearUnkVar(void);
|
||||
static void SafariHandleSetUnkVar(void);
|
||||
static void SafariHandleClearUnkFlag(void);
|
||||
static void SafariHandleToggleUnkFlag(void);
|
||||
static void SafariHandleHitAnimation(void);
|
||||
static void SafariHandleCantSwitch(void);
|
||||
static void SafariHandlePlaySE(void);
|
||||
static void SafariHandlePlayFanfareOrBGM(void);
|
||||
static void SafariHandleFaintingCry(void);
|
||||
static void SafariHandleIntroSlide(void);
|
||||
static void SafariHandleIntroTrainerBallThrow(void);
|
||||
static void SafariHandleDrawPartyStatusSummary(void);
|
||||
static void SafariHandleHidePartyStatusSummary(void);
|
||||
static void SafariHandleEndBounceEffect(void);
|
||||
static void SafariHandleSpriteInvisibility(void);
|
||||
static void SafariHandleBattleAnimation(void);
|
||||
static void SafariHandleLinkStandbyMsg(void);
|
||||
static void SafariHandleResetActionMoveSelection(void);
|
||||
static void SafariHandleEndLinkBattle(void);
|
||||
static void SafariHandleBattleDebug(void);
|
||||
static void SafariCmdEnd(void);
|
||||
|
||||
static void SafariBufferRunCommand(void);
|
||||
static void SafariBufferExecCompleted(void);
|
||||
@ -89,70 +47,66 @@ static void CompleteWhenChosePokeblock(void);
|
||||
|
||||
static void (*const sSafariBufferCommands[CONTROLLER_CMDS_COUNT])(void) =
|
||||
{
|
||||
[CONTROLLER_GETMONDATA] = SafariHandleGetMonData,
|
||||
[CONTROLLER_GETRAWMONDATA] = SafariHandleGetRawMonData,
|
||||
[CONTROLLER_SETMONDATA] = SafariHandleSetMonData,
|
||||
[CONTROLLER_SETRAWMONDATA] = SafariHandleSetRawMonData,
|
||||
[CONTROLLER_LOADMONSPRITE] = SafariHandleLoadMonSprite,
|
||||
[CONTROLLER_SWITCHINANIM] = SafariHandleSwitchInAnim,
|
||||
[CONTROLLER_RETURNMONTOBALL] = SafariHandleReturnMonToBall,
|
||||
[CONTROLLER_GETMONDATA] = BtlController_Empty,
|
||||
[CONTROLLER_GETRAWMONDATA] = BtlController_Empty,
|
||||
[CONTROLLER_SETMONDATA] = BtlController_Empty,
|
||||
[CONTROLLER_SETRAWMONDATA] = BtlController_Empty,
|
||||
[CONTROLLER_LOADMONSPRITE] = BtlController_Empty,
|
||||
[CONTROLLER_SWITCHINANIM] = BtlController_Empty,
|
||||
[CONTROLLER_RETURNMONTOBALL] = BtlController_Empty,
|
||||
[CONTROLLER_DRAWTRAINERPIC] = SafariHandleDrawTrainerPic,
|
||||
[CONTROLLER_TRAINERSLIDE] = SafariHandleTrainerSlide,
|
||||
[CONTROLLER_TRAINERSLIDEBACK] = SafariHandleTrainerSlideBack,
|
||||
[CONTROLLER_FAINTANIMATION] = SafariHandleFaintAnimation,
|
||||
[CONTROLLER_PALETTEFADE] = SafariHandlePaletteFade,
|
||||
[CONTROLLER_TRAINERSLIDE] = BtlController_Empty,
|
||||
[CONTROLLER_TRAINERSLIDEBACK] = BtlController_Empty,
|
||||
[CONTROLLER_FAINTANIMATION] = BtlController_Empty,
|
||||
[CONTROLLER_PALETTEFADE] = BtlController_Empty,
|
||||
[CONTROLLER_SUCCESSBALLTHROWANIM] = SafariHandleSuccessBallThrowAnim,
|
||||
[CONTROLLER_BALLTHROWANIM] = SafariHandleBallThrowAnim,
|
||||
[CONTROLLER_PAUSE] = SafariHandlePause,
|
||||
[CONTROLLER_MOVEANIMATION] = SafariHandleMoveAnimation,
|
||||
[CONTROLLER_PAUSE] = BtlController_Empty,
|
||||
[CONTROLLER_MOVEANIMATION] = BtlController_Empty,
|
||||
[CONTROLLER_PRINTSTRING] = SafariHandlePrintString,
|
||||
[CONTROLLER_PRINTSTRINGPLAYERONLY] = SafariHandlePrintSelectionString,
|
||||
[CONTROLLER_CHOOSEACTION] = SafariHandleChooseAction,
|
||||
[CONTROLLER_YESNOBOX] = SafariHandleYesNoBox,
|
||||
[CONTROLLER_CHOOSEMOVE] = SafariHandleChooseMove,
|
||||
[CONTROLLER_YESNOBOX] = BtlController_Empty,
|
||||
[CONTROLLER_CHOOSEMOVE] = BtlController_Empty,
|
||||
[CONTROLLER_OPENBAG] = SafariHandleChooseItem,
|
||||
[CONTROLLER_CHOOSEPOKEMON] = SafariHandleChoosePokemon,
|
||||
[CONTROLLER_23] = SafariHandleCmd23,
|
||||
[CONTROLLER_HEALTHBARUPDATE] = SafariHandleHealthBarUpdate,
|
||||
[CONTROLLER_EXPUPDATE] = SafariHandleExpUpdate,
|
||||
[CONTROLLER_CHOOSEPOKEMON] = BtlController_Empty,
|
||||
[CONTROLLER_23] = BtlController_Empty,
|
||||
[CONTROLLER_HEALTHBARUPDATE] = BtlController_Empty,
|
||||
[CONTROLLER_EXPUPDATE] = BtlController_Empty,
|
||||
[CONTROLLER_STATUSICONUPDATE] = SafariHandleStatusIconUpdate,
|
||||
[CONTROLLER_STATUSANIMATION] = SafariHandleStatusAnimation,
|
||||
[CONTROLLER_STATUSXOR] = SafariHandleStatusXor,
|
||||
[CONTROLLER_DATATRANSFER] = SafariHandleDataTransfer,
|
||||
[CONTROLLER_DMA3TRANSFER] = SafariHandleDMA3Transfer,
|
||||
[CONTROLLER_PLAYBGM] = SafariHandlePlayBGM,
|
||||
[CONTROLLER_32] = SafariHandleCmd32,
|
||||
[CONTROLLER_TWORETURNVALUES] = SafariHandleTwoReturnValues,
|
||||
[CONTROLLER_CHOSENMONRETURNVALUE] = SafariHandleChosenMonReturnValue,
|
||||
[CONTROLLER_ONERETURNVALUE] = SafariHandleOneReturnValue,
|
||||
[CONTROLLER_ONERETURNVALUE_DUPLICATE] = SafariHandleOneReturnValue_Duplicate,
|
||||
[CONTROLLER_CLEARUNKVAR] = SafariHandleClearUnkVar,
|
||||
[CONTROLLER_SETUNKVAR] = SafariHandleSetUnkVar,
|
||||
[CONTROLLER_CLEARUNKFLAG] = SafariHandleClearUnkFlag,
|
||||
[CONTROLLER_TOGGLEUNKFLAG] = SafariHandleToggleUnkFlag,
|
||||
[CONTROLLER_HITANIMATION] = SafariHandleHitAnimation,
|
||||
[CONTROLLER_CANTSWITCH] = SafariHandleCantSwitch,
|
||||
[CONTROLLER_STATUSANIMATION] = BtlController_Empty,
|
||||
[CONTROLLER_STATUSXOR] = BtlController_Empty,
|
||||
[CONTROLLER_DATATRANSFER] = BtlController_Empty,
|
||||
[CONTROLLER_DMA3TRANSFER] = BtlController_Empty,
|
||||
[CONTROLLER_PLAYBGM] = BtlController_Empty,
|
||||
[CONTROLLER_32] = BtlController_Empty,
|
||||
[CONTROLLER_TWORETURNVALUES] = BtlController_Empty,
|
||||
[CONTROLLER_CHOSENMONRETURNVALUE] = BtlController_Empty,
|
||||
[CONTROLLER_ONERETURNVALUE] = BtlController_Empty,
|
||||
[CONTROLLER_ONERETURNVALUE_DUPLICATE] = BtlController_Empty,
|
||||
[CONTROLLER_CLEARUNKVAR] = BtlController_Empty,
|
||||
[CONTROLLER_SETUNKVAR] = BtlController_Empty,
|
||||
[CONTROLLER_CLEARUNKFLAG] = BtlController_Empty,
|
||||
[CONTROLLER_TOGGLEUNKFLAG] = BtlController_Empty,
|
||||
[CONTROLLER_HITANIMATION] = BtlController_Empty,
|
||||
[CONTROLLER_CANTSWITCH] = BtlController_Empty,
|
||||
[CONTROLLER_PLAYSE] = SafariHandlePlaySE,
|
||||
[CONTROLLER_PLAYFANFAREORBGM] = SafariHandlePlayFanfareOrBGM,
|
||||
[CONTROLLER_FAINTINGCRY] = SafariHandleFaintingCry,
|
||||
[CONTROLLER_INTROSLIDE] = SafariHandleIntroSlide,
|
||||
[CONTROLLER_INTROTRAINERBALLTHROW] = SafariHandleIntroTrainerBallThrow,
|
||||
[CONTROLLER_DRAWPARTYSTATUSSUMMARY] = SafariHandleDrawPartyStatusSummary,
|
||||
[CONTROLLER_HIDEPARTYSTATUSSUMMARY] = SafariHandleHidePartyStatusSummary,
|
||||
[CONTROLLER_ENDBOUNCE] = SafariHandleEndBounceEffect,
|
||||
[CONTROLLER_SPRITEINVISIBILITY] = SafariHandleSpriteInvisibility,
|
||||
[CONTROLLER_DRAWPARTYSTATUSSUMMARY] = BtlController_Empty,
|
||||
[CONTROLLER_HIDEPARTYSTATUSSUMMARY] = BtlController_Empty,
|
||||
[CONTROLLER_ENDBOUNCE] = BtlController_Empty,
|
||||
[CONTROLLER_SPRITEINVISIBILITY] = BtlController_Empty,
|
||||
[CONTROLLER_BATTLEANIMATION] = SafariHandleBattleAnimation,
|
||||
[CONTROLLER_LINKSTANDBYMSG] = SafariHandleLinkStandbyMsg,
|
||||
[CONTROLLER_RESETACTIONMOVESELECTION] = SafariHandleResetActionMoveSelection,
|
||||
[CONTROLLER_LINKSTANDBYMSG] = BtlController_Empty,
|
||||
[CONTROLLER_RESETACTIONMOVESELECTION] = BtlController_Empty,
|
||||
[CONTROLLER_ENDLINKBATTLE] = SafariHandleEndLinkBattle,
|
||||
[CONTROLLER_DEBUGMENU] = SafariHandleBattleDebug,
|
||||
[CONTROLLER_TERMINATOR_NOP] = SafariCmdEnd
|
||||
[CONTROLLER_DEBUGMENU] = BtlController_Empty,
|
||||
[CONTROLLER_TERMINATOR_NOP] = BtlController_TerminatorNop
|
||||
};
|
||||
|
||||
static void SpriteCB_Null4(void)
|
||||
{
|
||||
}
|
||||
|
||||
void SetControllerToSafari(void)
|
||||
{
|
||||
gBattlerControllerEndFuncs[gActiveBattler] = SafariBufferExecCompleted;
|
||||
@ -263,12 +217,6 @@ static void SafariSetBattleEndCallbacks(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void CompleteOnSpecialAnimDone(void)
|
||||
{
|
||||
if (!gDoingBattleAnim || !gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].specialAnimActive)
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void SafariOpenPokeblockCase(void)
|
||||
{
|
||||
if (!gPaletteFade.active)
|
||||
@ -316,41 +264,6 @@ static void CompleteOnFinishedStatusAnimation(void)
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void SafariHandleGetMonData(void)
|
||||
{
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void SafariHandleGetRawMonData(void)
|
||||
{
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void SafariHandleSetMonData(void)
|
||||
{
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void SafariHandleSetRawMonData(void)
|
||||
{
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void SafariHandleLoadMonSprite(void)
|
||||
{
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void SafariHandleSwitchInAnim(void)
|
||||
{
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void SafariHandleReturnMonToBall(void)
|
||||
{
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
|
||||
#define sSpeedX data[0]
|
||||
|
||||
static void SafariHandleDrawTrainerPic(void)
|
||||
@ -371,52 +284,14 @@ static void SafariHandleDrawTrainerPic(void)
|
||||
|
||||
#undef sSpeedX
|
||||
|
||||
static void SafariHandleTrainerSlide(void)
|
||||
{
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void SafariHandleTrainerSlideBack(void)
|
||||
{
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void SafariHandleFaintAnimation(void)
|
||||
{
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void SafariHandlePaletteFade(void)
|
||||
{
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void SafariHandleSuccessBallThrowAnim(void)
|
||||
{
|
||||
gBattleSpritesDataPtr->animationData->ballThrowCaseId = BALL_3_SHAKES_SUCCESS;
|
||||
gDoingBattleAnim = TRUE;
|
||||
InitAndLaunchSpecialAnimation(gActiveBattler, gActiveBattler, GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), B_ANIM_BALL_THROW_WITH_TRAINER);
|
||||
gBattlerControllerFuncs[gActiveBattler] = CompleteOnSpecialAnimDone;
|
||||
BtlController_HandleSuccessBallThrowAnim(gActiveBattler, GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), B_ANIM_BALL_THROW_WITH_TRAINER, FALSE);
|
||||
}
|
||||
|
||||
static void SafariHandleBallThrowAnim(void)
|
||||
{
|
||||
u8 ballThrowCaseId = gBattleResources->bufferA[gActiveBattler][1];
|
||||
|
||||
gBattleSpritesDataPtr->animationData->ballThrowCaseId = ballThrowCaseId;
|
||||
gDoingBattleAnim = TRUE;
|
||||
InitAndLaunchSpecialAnimation(gActiveBattler, gActiveBattler, GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), B_ANIM_BALL_THROW_WITH_TRAINER);
|
||||
gBattlerControllerFuncs[gActiveBattler] = CompleteOnSpecialAnimDone;
|
||||
}
|
||||
|
||||
static void SafariHandlePause(void)
|
||||
{
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void SafariHandleMoveAnimation(void)
|
||||
{
|
||||
SafariBufferExecCompleted();
|
||||
BtlController_HandleBallThrowAnim(gActiveBattler, GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), B_ANIM_BALL_THROW_WITH_TRAINER, FALSE);
|
||||
}
|
||||
|
||||
static void SafariHandlePrintString(void)
|
||||
@ -464,16 +339,6 @@ static void SafariHandleChooseAction(void)
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_ACTION_PROMPT);
|
||||
}
|
||||
|
||||
static void SafariHandleYesNoBox(void)
|
||||
{
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void SafariHandleChooseMove(void)
|
||||
{
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void SafariHandleChooseItem(void)
|
||||
{
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
@ -481,112 +346,12 @@ static void SafariHandleChooseItem(void)
|
||||
gBattlerInMenuId = gActiveBattler;
|
||||
}
|
||||
|
||||
static void SafariHandleChoosePokemon(void)
|
||||
{
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void SafariHandleCmd23(void)
|
||||
{
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void SafariHandleHealthBarUpdate(void)
|
||||
{
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void SafariHandleExpUpdate(void)
|
||||
{
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void SafariHandleStatusIconUpdate(void)
|
||||
{
|
||||
UpdateHealthboxAttribute(gHealthboxSpriteIds[gActiveBattler], &gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], HEALTHBOX_SAFARI_BALLS_TEXT);
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void SafariHandleStatusAnimation(void)
|
||||
{
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void SafariHandleStatusXor(void)
|
||||
{
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void SafariHandleDataTransfer(void)
|
||||
{
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void SafariHandleDMA3Transfer(void)
|
||||
{
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void SafariHandlePlayBGM(void)
|
||||
{
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void SafariHandleCmd32(void)
|
||||
{
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void SafariHandleTwoReturnValues(void)
|
||||
{
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void SafariHandleChosenMonReturnValue(void)
|
||||
{
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void SafariHandleOneReturnValue(void)
|
||||
{
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void SafariHandleOneReturnValue_Duplicate(void)
|
||||
{
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void SafariHandleClearUnkVar(void)
|
||||
{
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void SafariHandleSetUnkVar(void)
|
||||
{
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void SafariHandleClearUnkFlag(void)
|
||||
{
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void SafariHandleToggleUnkFlag(void)
|
||||
{
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void SafariHandleHitAnimation(void)
|
||||
{
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void SafariHandleCantSwitch(void)
|
||||
{
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void SafariHandlePlaySE(void)
|
||||
{
|
||||
s8 pan;
|
||||
@ -638,26 +403,6 @@ static void SafariHandleIntroTrainerBallThrow(void)
|
||||
gBattlerControllerFuncs[gActiveBattler] = CompleteOnHealthboxSpriteCallbackDummy;
|
||||
}
|
||||
|
||||
static void SafariHandleDrawPartyStatusSummary(void)
|
||||
{
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void SafariHandleHidePartyStatusSummary(void)
|
||||
{
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void SafariHandleEndBounceEffect(void)
|
||||
{
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void SafariHandleSpriteInvisibility(void)
|
||||
{
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void SafariHandleBattleAnimation(void)
|
||||
{
|
||||
u8 animationId = gBattleResources->bufferA[gActiveBattler][1];
|
||||
@ -669,16 +414,6 @@ static void SafariHandleBattleAnimation(void)
|
||||
gBattlerControllerFuncs[gActiveBattler] = CompleteOnFinishedBattleAnimation;
|
||||
}
|
||||
|
||||
static void SafariHandleLinkStandbyMsg(void)
|
||||
{
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void SafariHandleResetActionMoveSelection(void)
|
||||
{
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void SafariHandleEndLinkBattle(void)
|
||||
{
|
||||
gBattleOutcome = gBattleResources->bufferA[gActiveBattler][1];
|
||||
@ -693,7 +428,3 @@ static void SafariHandleBattleDebug(void)
|
||||
{
|
||||
SafariBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void SafariCmdEnd(void)
|
||||
{
|
||||
}
|
||||
|
@ -36,61 +36,27 @@
|
||||
static void WallyHandleGetMonData(void);
|
||||
static void WallyHandleGetRawMonData(void);
|
||||
static void WallyHandleSetMonData(void);
|
||||
static void WallyHandleSetRawMonData(void);
|
||||
static void WallyHandleLoadMonSprite(void);
|
||||
static void WallyHandleSwitchInAnim(void);
|
||||
static void WallyHandleReturnMonToBall(void);
|
||||
static void WallyHandleDrawTrainerPic(void);
|
||||
static void WallyHandleTrainerSlide(void);
|
||||
static void WallyHandleTrainerSlideBack(void);
|
||||
static void WallyHandleFaintAnimation(void);
|
||||
static void WallyHandlePaletteFade(void);
|
||||
static void WallyHandleSuccessBallThrowAnim(void);
|
||||
static void WallyHandleBallThrowAnim(void);
|
||||
static void WallyHandlePause(void);
|
||||
static void WallyHandleMoveAnimation(void);
|
||||
static void WallyHandlePrintString(void);
|
||||
static void WallyHandlePrintSelectionString(void);
|
||||
static void WallyHandleChooseAction(void);
|
||||
static void WallyHandleYesNoBox(void);
|
||||
static void WallyHandleChooseMove(void);
|
||||
static void WallyHandleChooseItem(void);
|
||||
static void WallyHandleChoosePokemon(void);
|
||||
static void WallyHandleCmd23(void);
|
||||
static void WallyHandleHealthBarUpdate(void);
|
||||
static void WallyHandleExpUpdate(void);
|
||||
static void WallyHandleStatusIconUpdate(void);
|
||||
static void WallyHandleStatusAnimation(void);
|
||||
static void WallyHandleStatusXor(void);
|
||||
static void WallyHandleDataTransfer(void);
|
||||
static void WallyHandleDMA3Transfer(void);
|
||||
static void WallyHandlePlayBGM(void);
|
||||
static void WallyHandleCmd32(void);
|
||||
static void WallyHandleTwoReturnValues(void);
|
||||
static void WallyHandleChosenMonReturnValue(void);
|
||||
static void WallyHandleOneReturnValue(void);
|
||||
static void WallyHandleOneReturnValue_Duplicate(void);
|
||||
static void WallyHandleClearUnkVar(void);
|
||||
static void WallyHandleSetUnkVar(void);
|
||||
static void WallyHandleClearUnkFlag(void);
|
||||
static void WallyHandleToggleUnkFlag(void);
|
||||
static void WallyHandleHitAnimation(void);
|
||||
static void WallyHandleCantSwitch(void);
|
||||
static void WallyHandlePlaySE(void);
|
||||
static void WallyHandlePlayFanfareOrBGM(void);
|
||||
static void WallyHandleFaintingCry(void);
|
||||
static void WallyHandleIntroSlide(void);
|
||||
static void WallyHandleIntroTrainerBallThrow(void);
|
||||
static void WallyHandleDrawPartyStatusSummary(void);
|
||||
static void WallyHandleHidePartyStatusSummary(void);
|
||||
static void WallyHandleEndBounceEffect(void);
|
||||
static void WallyHandleSpriteInvisibility(void);
|
||||
static void WallyHandleBattleAnimation(void);
|
||||
static void WallyHandleLinkStandbyMsg(void);
|
||||
static void WallyHandleResetActionMoveSelection(void);
|
||||
static void WallyHandleEndLinkBattle(void);
|
||||
static void WallyHandleBattleDebug(void);
|
||||
static void WallyCmdEnd(void);
|
||||
|
||||
static void WallyBufferRunCommand(void);
|
||||
static void WallyBufferExecCompleted(void);
|
||||
@ -106,61 +72,61 @@ static void (*const sWallyBufferCommands[CONTROLLER_CMDS_COUNT])(void) =
|
||||
[CONTROLLER_GETMONDATA] = WallyHandleGetMonData,
|
||||
[CONTROLLER_GETRAWMONDATA] = WallyHandleGetRawMonData,
|
||||
[CONTROLLER_SETMONDATA] = WallyHandleSetMonData,
|
||||
[CONTROLLER_SETRAWMONDATA] = WallyHandleSetRawMonData,
|
||||
[CONTROLLER_LOADMONSPRITE] = WallyHandleLoadMonSprite,
|
||||
[CONTROLLER_SWITCHINANIM] = WallyHandleSwitchInAnim,
|
||||
[CONTROLLER_SETRAWMONDATA] = BtlController_Empty,
|
||||
[CONTROLLER_LOADMONSPRITE] = BtlController_Empty,
|
||||
[CONTROLLER_SWITCHINANIM] = BtlController_Empty,
|
||||
[CONTROLLER_RETURNMONTOBALL] = WallyHandleReturnMonToBall,
|
||||
[CONTROLLER_DRAWTRAINERPIC] = WallyHandleDrawTrainerPic,
|
||||
[CONTROLLER_TRAINERSLIDE] = WallyHandleTrainerSlide,
|
||||
[CONTROLLER_TRAINERSLIDEBACK] = WallyHandleTrainerSlideBack,
|
||||
[CONTROLLER_FAINTANIMATION] = WallyHandleFaintAnimation,
|
||||
[CONTROLLER_PALETTEFADE] = WallyHandlePaletteFade,
|
||||
[CONTROLLER_TRAINERSLIDEBACK] = BtlController_Empty,
|
||||
[CONTROLLER_FAINTANIMATION] = BtlController_Empty,
|
||||
[CONTROLLER_PALETTEFADE] = BtlController_Empty,
|
||||
[CONTROLLER_SUCCESSBALLTHROWANIM] = WallyHandleSuccessBallThrowAnim,
|
||||
[CONTROLLER_BALLTHROWANIM] = WallyHandleBallThrowAnim,
|
||||
[CONTROLLER_PAUSE] = WallyHandlePause,
|
||||
[CONTROLLER_PAUSE] = BtlController_Empty,
|
||||
[CONTROLLER_MOVEANIMATION] = WallyHandleMoveAnimation,
|
||||
[CONTROLLER_PRINTSTRING] = WallyHandlePrintString,
|
||||
[CONTROLLER_PRINTSTRINGPLAYERONLY] = WallyHandlePrintSelectionString,
|
||||
[CONTROLLER_CHOOSEACTION] = WallyHandleChooseAction,
|
||||
[CONTROLLER_YESNOBOX] = WallyHandleYesNoBox,
|
||||
[CONTROLLER_YESNOBOX] = BtlController_Empty,
|
||||
[CONTROLLER_CHOOSEMOVE] = WallyHandleChooseMove,
|
||||
[CONTROLLER_OPENBAG] = WallyHandleChooseItem,
|
||||
[CONTROLLER_CHOOSEPOKEMON] = WallyHandleChoosePokemon,
|
||||
[CONTROLLER_23] = WallyHandleCmd23,
|
||||
[CONTROLLER_CHOOSEPOKEMON] = BtlController_Empty,
|
||||
[CONTROLLER_23] = BtlController_Empty,
|
||||
[CONTROLLER_HEALTHBARUPDATE] = WallyHandleHealthBarUpdate,
|
||||
[CONTROLLER_EXPUPDATE] = WallyHandleExpUpdate,
|
||||
[CONTROLLER_STATUSICONUPDATE] = WallyHandleStatusIconUpdate,
|
||||
[CONTROLLER_STATUSANIMATION] = WallyHandleStatusAnimation,
|
||||
[CONTROLLER_STATUSXOR] = WallyHandleStatusXor,
|
||||
[CONTROLLER_DATATRANSFER] = WallyHandleDataTransfer,
|
||||
[CONTROLLER_DMA3TRANSFER] = WallyHandleDMA3Transfer,
|
||||
[CONTROLLER_PLAYBGM] = WallyHandlePlayBGM,
|
||||
[CONTROLLER_32] = WallyHandleCmd32,
|
||||
[CONTROLLER_TWORETURNVALUES] = WallyHandleTwoReturnValues,
|
||||
[CONTROLLER_CHOSENMONRETURNVALUE] = WallyHandleChosenMonReturnValue,
|
||||
[CONTROLLER_ONERETURNVALUE] = WallyHandleOneReturnValue,
|
||||
[CONTROLLER_ONERETURNVALUE_DUPLICATE] = WallyHandleOneReturnValue_Duplicate,
|
||||
[CONTROLLER_CLEARUNKVAR] = WallyHandleClearUnkVar,
|
||||
[CONTROLLER_SETUNKVAR] = WallyHandleSetUnkVar,
|
||||
[CONTROLLER_CLEARUNKFLAG] = WallyHandleClearUnkFlag,
|
||||
[CONTROLLER_TOGGLEUNKFLAG] = WallyHandleToggleUnkFlag,
|
||||
[CONTROLLER_EXPUPDATE] = BtlController_Empty,
|
||||
[CONTROLLER_STATUSICONUPDATE] = BtlController_Empty,
|
||||
[CONTROLLER_STATUSANIMATION] = BtlController_Empty,
|
||||
[CONTROLLER_STATUSXOR] = BtlController_Empty,
|
||||
[CONTROLLER_DATATRANSFER] = BtlController_Empty,
|
||||
[CONTROLLER_DMA3TRANSFER] = BtlController_Empty,
|
||||
[CONTROLLER_PLAYBGM] = BtlController_Empty,
|
||||
[CONTROLLER_32] = BtlController_Empty,
|
||||
[CONTROLLER_TWORETURNVALUES] = BtlController_Empty,
|
||||
[CONTROLLER_CHOSENMONRETURNVALUE] = BtlController_Empty,
|
||||
[CONTROLLER_ONERETURNVALUE] = BtlController_Empty,
|
||||
[CONTROLLER_ONERETURNVALUE_DUPLICATE] = BtlController_Empty,
|
||||
[CONTROLLER_CLEARUNKVAR] = BtlController_Empty,
|
||||
[CONTROLLER_SETUNKVAR] = BtlController_Empty,
|
||||
[CONTROLLER_CLEARUNKFLAG] = BtlController_Empty,
|
||||
[CONTROLLER_TOGGLEUNKFLAG] = BtlController_Empty,
|
||||
[CONTROLLER_HITANIMATION] = WallyHandleHitAnimation,
|
||||
[CONTROLLER_CANTSWITCH] = WallyHandleCantSwitch,
|
||||
[CONTROLLER_CANTSWITCH] = BtlController_Empty,
|
||||
[CONTROLLER_PLAYSE] = WallyHandlePlaySE,
|
||||
[CONTROLLER_PLAYFANFAREORBGM] = WallyHandlePlayFanfareOrBGM,
|
||||
[CONTROLLER_FAINTINGCRY] = WallyHandleFaintingCry,
|
||||
[CONTROLLER_INTROSLIDE] = WallyHandleIntroSlide,
|
||||
[CONTROLLER_INTROTRAINERBALLTHROW] = WallyHandleIntroTrainerBallThrow,
|
||||
[CONTROLLER_DRAWPARTYSTATUSSUMMARY] = WallyHandleDrawPartyStatusSummary,
|
||||
[CONTROLLER_HIDEPARTYSTATUSSUMMARY] = WallyHandleHidePartyStatusSummary,
|
||||
[CONTROLLER_ENDBOUNCE] = WallyHandleEndBounceEffect,
|
||||
[CONTROLLER_SPRITEINVISIBILITY] = WallyHandleSpriteInvisibility,
|
||||
[CONTROLLER_HIDEPARTYSTATUSSUMMARY] = BtlController_Empty,
|
||||
[CONTROLLER_ENDBOUNCE] = BtlController_Empty,
|
||||
[CONTROLLER_SPRITEINVISIBILITY] = BtlController_Empty,
|
||||
[CONTROLLER_BATTLEANIMATION] = WallyHandleBattleAnimation,
|
||||
[CONTROLLER_LINKSTANDBYMSG] = WallyHandleLinkStandbyMsg,
|
||||
[CONTROLLER_RESETACTIONMOVESELECTION] = WallyHandleResetActionMoveSelection,
|
||||
[CONTROLLER_LINKSTANDBYMSG] = BtlController_Empty,
|
||||
[CONTROLLER_RESETACTIONMOVESELECTION] = BtlController_Empty,
|
||||
[CONTROLLER_ENDLINKBATTLE] = WallyHandleEndLinkBattle,
|
||||
[CONTROLLER_DEBUGMENU] = WallyHandleBattleDebug,
|
||||
[CONTROLLER_TERMINATOR_NOP] = WallyCmdEnd
|
||||
[CONTROLLER_DEBUGMENU] = BtlController_Empty,
|
||||
[CONTROLLER_TERMINATOR_NOP] = BtlController_TerminatorNop
|
||||
};
|
||||
|
||||
static void SpriteCB_Null7(void)
|
||||
@ -260,12 +226,6 @@ static void CompleteOnInactiveTextPrinter(void)
|
||||
WallyBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void CompleteOnFinishedAnimation(void)
|
||||
{
|
||||
if (!gDoingBattleAnim)
|
||||
WallyBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void OpenBagAfterPaletteFade(void)
|
||||
{
|
||||
if (!gPaletteFade.active)
|
||||
@ -409,12 +369,6 @@ static void WallyBufferExecCompleted(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void CompleteOnFinishedStatusAnimation(void)
|
||||
{
|
||||
if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].statusAnimActive)
|
||||
WallyBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void WallyHandleGetMonData(void)
|
||||
{
|
||||
BtlController_HandleGetMonData(gActiveBattler, gPlayerParty);
|
||||
@ -430,21 +384,6 @@ static void WallyHandleSetMonData(void)
|
||||
BtlController_HandleSetMonData(gActiveBattler, gPlayerParty);
|
||||
}
|
||||
|
||||
static void WallyHandleSetRawMonData(void)
|
||||
{
|
||||
WallyBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void WallyHandleLoadMonSprite(void)
|
||||
{
|
||||
WallyBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void WallyHandleSwitchInAnim(void)
|
||||
{
|
||||
WallyBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void WallyHandleReturnMonToBall(void)
|
||||
{
|
||||
BtlController_HandleReturnMonToBall(gActiveBattler);
|
||||
@ -484,42 +423,14 @@ static void WallyHandleTrainerSlide(void)
|
||||
|
||||
#undef sSpeedX
|
||||
|
||||
static void WallyHandleTrainerSlideBack(void)
|
||||
{
|
||||
WallyBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void WallyHandleFaintAnimation(void)
|
||||
{
|
||||
WallyBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void WallyHandlePaletteFade(void)
|
||||
{
|
||||
WallyBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void WallyHandleSuccessBallThrowAnim(void)
|
||||
{
|
||||
gBattleSpritesDataPtr->animationData->ballThrowCaseId = BALL_3_SHAKES_SUCCESS;
|
||||
gDoingBattleAnim = TRUE;
|
||||
InitAndLaunchSpecialAnimation(gActiveBattler, gActiveBattler, GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), B_ANIM_BALL_THROW_WITH_TRAINER);
|
||||
gBattlerControllerFuncs[gActiveBattler] = CompleteOnFinishedAnimation;
|
||||
BtlController_HandleSuccessBallThrowAnim(gActiveBattler, GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), B_ANIM_BALL_THROW_WITH_TRAINER, FALSE);
|
||||
}
|
||||
|
||||
static void WallyHandleBallThrowAnim(void)
|
||||
{
|
||||
u8 ballThrowCaseId = gBattleResources->bufferA[gActiveBattler][1];
|
||||
|
||||
gBattleSpritesDataPtr->animationData->ballThrowCaseId = ballThrowCaseId;
|
||||
gDoingBattleAnim = TRUE;
|
||||
InitAndLaunchSpecialAnimation(gActiveBattler, gActiveBattler, GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), B_ANIM_BALL_THROW_WITH_TRAINER);
|
||||
gBattlerControllerFuncs[gActiveBattler] = CompleteOnFinishedAnimation;
|
||||
}
|
||||
|
||||
static void WallyHandlePause(void)
|
||||
{
|
||||
WallyBufferExecCompleted();
|
||||
BtlController_HandleBallThrowAnim(gActiveBattler, GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), B_ANIM_BALL_THROW_WITH_TRAINER, FALSE);
|
||||
}
|
||||
|
||||
static void WallyHandleMoveAnimation(void)
|
||||
@ -628,11 +539,6 @@ static void WallyHandleChooseAction(void)
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_ACTION_PROMPT);
|
||||
}
|
||||
|
||||
static void WallyHandleYesNoBox(void)
|
||||
{
|
||||
WallyBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void WallyHandleChooseMove(void)
|
||||
{
|
||||
switch (gBattleStruct->wallyMovesState)
|
||||
@ -668,16 +574,6 @@ static void WallyHandleChooseItem(void)
|
||||
gBattlerInMenuId = gActiveBattler;
|
||||
}
|
||||
|
||||
static void WallyHandleChoosePokemon(void)
|
||||
{
|
||||
WallyBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void WallyHandleCmd23(void)
|
||||
{
|
||||
WallyBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void WallyHandleHealthBarUpdate(void)
|
||||
{
|
||||
s16 hpVal;
|
||||
@ -703,86 +599,6 @@ static void WallyHandleHealthBarUpdate(void)
|
||||
gBattlerControllerFuncs[gActiveBattler] = CompleteOnHealthbarDone;
|
||||
}
|
||||
|
||||
static void WallyHandleExpUpdate(void)
|
||||
{
|
||||
WallyBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void WallyHandleStatusIconUpdate(void)
|
||||
{
|
||||
WallyBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void WallyHandleStatusAnimation(void)
|
||||
{
|
||||
WallyBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void WallyHandleStatusXor(void)
|
||||
{
|
||||
WallyBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void WallyHandleDataTransfer(void)
|
||||
{
|
||||
WallyBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void WallyHandleDMA3Transfer(void)
|
||||
{
|
||||
WallyBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void WallyHandlePlayBGM(void)
|
||||
{
|
||||
WallyBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void WallyHandleCmd32(void)
|
||||
{
|
||||
WallyBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void WallyHandleTwoReturnValues(void)
|
||||
{
|
||||
WallyBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void WallyHandleChosenMonReturnValue(void)
|
||||
{
|
||||
WallyBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void WallyHandleOneReturnValue(void)
|
||||
{
|
||||
WallyBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void WallyHandleOneReturnValue_Duplicate(void)
|
||||
{
|
||||
WallyBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void WallyHandleClearUnkVar(void)
|
||||
{
|
||||
WallyBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void WallyHandleSetUnkVar(void)
|
||||
{
|
||||
WallyBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void WallyHandleClearUnkFlag(void)
|
||||
{
|
||||
WallyBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void WallyHandleToggleUnkFlag(void)
|
||||
{
|
||||
WallyBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void WallyHandleHitAnimation(void)
|
||||
{
|
||||
if (gSprites[gBattlerSpriteIds[gActiveBattler]].invisible == TRUE)
|
||||
@ -798,11 +614,6 @@ static void WallyHandleHitAnimation(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void WallyHandleCantSwitch(void)
|
||||
{
|
||||
WallyBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void WallyHandlePlaySE(void)
|
||||
{
|
||||
PlaySE(gBattleResources->bufferA[gActiveBattler][1] | (gBattleResources->bufferA[gActiveBattler][2] << 8));
|
||||
@ -904,21 +715,6 @@ static void WallyHandleDrawPartyStatusSummary(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void WallyHandleHidePartyStatusSummary(void)
|
||||
{
|
||||
WallyBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void WallyHandleEndBounceEffect(void)
|
||||
{
|
||||
WallyBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void WallyHandleSpriteInvisibility(void)
|
||||
{
|
||||
WallyBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void WallyHandleBattleAnimation(void)
|
||||
{
|
||||
u8 animationId = gBattleResources->bufferA[gActiveBattler][1];
|
||||
@ -930,16 +726,6 @@ static void WallyHandleBattleAnimation(void)
|
||||
gBattlerControllerFuncs[gActiveBattler] = CompleteOnFinishedBattleAnimation;
|
||||
}
|
||||
|
||||
static void WallyHandleLinkStandbyMsg(void)
|
||||
{
|
||||
WallyBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void WallyHandleResetActionMoveSelection(void)
|
||||
{
|
||||
WallyBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void WallyHandleEndLinkBattle(void)
|
||||
{
|
||||
gBattleOutcome = gBattleResources->bufferA[gActiveBattler][1];
|
||||
@ -950,12 +736,3 @@ static void WallyHandleEndLinkBattle(void)
|
||||
if (!(gBattleTypeFlags & BATTLE_TYPE_IS_MASTER) && gBattleTypeFlags & BATTLE_TYPE_LINK)
|
||||
gBattlerControllerFuncs[gActiveBattler] = SetBattleEndCallbacks;
|
||||
}
|
||||
|
||||
static void WallyHandleBattleDebug(void)
|
||||
{
|
||||
WallyBufferExecCompleted();
|
||||
}
|
||||
|
||||
static void WallyCmdEnd(void)
|
||||
{
|
||||
}
|
||||
|
@ -1551,6 +1551,8 @@ void BtlController_EmitDebugMenu(u8 bufferId)
|
||||
}
|
||||
|
||||
// Standardized Controller functions
|
||||
|
||||
// Can be used for all the controllers.
|
||||
void BattleControllerComplete(u32 battler)
|
||||
{
|
||||
gBattlerControllerEndFuncs[battler]();
|
||||
@ -2176,6 +2178,23 @@ static void Controller_FaintOpponentMon(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void Controller_WaitForBallThrow(void)
|
||||
{
|
||||
if (!gDoingBattleAnim || !gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].specialAnimActive)
|
||||
BattleControllerComplete(gActiveBattler);
|
||||
}
|
||||
|
||||
// Used for all the commands which do nothing.
|
||||
void BtlController_Empty(void)
|
||||
{
|
||||
BattleControllerComplete(gActiveBattler);
|
||||
}
|
||||
|
||||
// Dummy function at the end of the table.
|
||||
void BtlController_TerminatorNop(void)
|
||||
{
|
||||
}
|
||||
|
||||
// Handlers of all the controller commands
|
||||
void BtlController_HandleGetMonData(u32 battler, struct Pokemon *party)
|
||||
{
|
||||
@ -2335,3 +2354,25 @@ void BtlController_HandleFaintAnimation(u32 battler)
|
||||
|
||||
#undef sSpeedX
|
||||
#undef sSpeedY
|
||||
|
||||
static void HandleBallThrow(u32 battler, u32 target, u32 animId, bool32 allowCriticalCapture)
|
||||
{
|
||||
gDoingBattleAnim = TRUE;
|
||||
if (allowCriticalCapture && IsCriticalCapture())
|
||||
animId = B_ANIM_CRITICAL_CAPTURE_THROW;
|
||||
InitAndLaunchSpecialAnimation(battler, battler, target, animId);
|
||||
|
||||
gBattlerControllerFuncs[battler] = Controller_WaitForBallThrow;
|
||||
}
|
||||
|
||||
void BtlController_HandleSuccessBallThrowAnim(u32 battler, u32 target, u32 animId, bool32 allowCriticalCapture)
|
||||
{
|
||||
gBattleSpritesDataPtr->animationData->ballThrowCaseId = BALL_3_SHAKES_SUCCESS;
|
||||
HandleBallThrow(battler, target, animId, allowCriticalCapture);
|
||||
}
|
||||
|
||||
void BtlController_HandleBallThrowAnim(u32 battler, u32 target, u32 animId, bool32 allowCriticalCapture)
|
||||
{
|
||||
gBattleSpritesDataPtr->animationData->ballThrowCaseId = gBattleResources->bufferA[battler][1];
|
||||
HandleBallThrow(battler, target, animId, allowCriticalCapture);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user