Document battle_controller_player.c
This commit is contained in:
+23
-14
@@ -39,7 +39,7 @@ extern const struct SpriteTemplate gSpriteTemplate_EnemyShadow;
|
||||
// this file's functions
|
||||
static u8 GetBattlePalaceMoveGroup(u16 move);
|
||||
static u16 GetBattlePalaceTarget(void);
|
||||
static void sub_805D7EC(struct Sprite *sprite);
|
||||
static void SpriteCB_TrainerSlideVertical(struct Sprite *sprite);
|
||||
static bool8 ShouldAnimBeDoneRegardlessOfSubsitute(u8 animId);
|
||||
static void Task_ClearBitWhenBattleTableAnimDone(u8 taskId);
|
||||
static void Task_ClearBitWhenSpecialAnimDone(u8 taskId);
|
||||
@@ -336,7 +336,8 @@ static u16 GetBattlePalaceTarget(void)
|
||||
return (gActiveBattler ^ BIT_SIDE) << 8;
|
||||
}
|
||||
|
||||
void sub_805D714(struct Sprite *sprite)
|
||||
// Wait for the pokemon to finish appearing out from the pokeball on send out
|
||||
void SpriteCB_WaitForBattlerBallReleaseAnim(struct Sprite *sprite)
|
||||
{
|
||||
u8 spriteId = sprite->data[1];
|
||||
|
||||
@@ -369,28 +370,33 @@ void sub_805D770(struct Sprite *sprite, bool8 arg1)
|
||||
AnimateSprite(sprite);
|
||||
}
|
||||
|
||||
void sub_805D7AC(struct Sprite *sprite)
|
||||
#define sSpeedX data[0]
|
||||
|
||||
void SpriteCB_TrainerSlideIn(struct Sprite *sprite)
|
||||
{
|
||||
if (!(gIntroSlideFlags & 1))
|
||||
{
|
||||
sprite->pos2.x += sprite->data[0];
|
||||
sprite->pos2.x += sprite->sSpeedX;
|
||||
if (sprite->pos2.x == 0)
|
||||
{
|
||||
if (sprite->pos2.y != 0)
|
||||
sprite->callback = sub_805D7EC;
|
||||
sprite->callback = SpriteCB_TrainerSlideVertical;
|
||||
else
|
||||
sprite->callback = SpriteCallbackDummy;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_805D7EC(struct Sprite *sprite)
|
||||
// Slide up to 0 if necessary (used by multi battle intro)
|
||||
static void SpriteCB_TrainerSlideVertical(struct Sprite *sprite)
|
||||
{
|
||||
sprite->pos2.y -= 2;
|
||||
if (sprite->pos2.y == 0)
|
||||
sprite->callback = SpriteCallbackDummy;
|
||||
}
|
||||
|
||||
#undef sSpeedX
|
||||
|
||||
void InitAndLaunchChosenStatusAnimation(bool8 isStatus2, u32 status)
|
||||
{
|
||||
gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].statusAnimActive = 1;
|
||||
@@ -522,14 +528,15 @@ bool8 IsMoveWithoutAnimation(u16 moveId, u8 animationTurn)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 mplay_80342A4(u8 battlerId)
|
||||
// Check if SE has finished or 30 calls, whichever comes first
|
||||
bool8 IsBattleSEPlaying(u8 battlerId)
|
||||
{
|
||||
u8 zero = 0;
|
||||
|
||||
if (IsSEPlaying())
|
||||
{
|
||||
gBattleSpritesDataPtr->healthBoxesData[battlerId].field_8++;
|
||||
if (gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].field_8 < 30)
|
||||
gBattleSpritesDataPtr->healthBoxesData[battlerId].soundTimer++;
|
||||
if (gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].soundTimer < 30)
|
||||
return TRUE;
|
||||
|
||||
m4aMPlayStop(&gMPlayInfo_SE1);
|
||||
@@ -537,10 +544,11 @@ bool8 mplay_80342A4(u8 battlerId)
|
||||
}
|
||||
if (zero == 0)
|
||||
{
|
||||
gBattleSpritesDataPtr->healthBoxesData[battlerId].field_8 = 0;
|
||||
gBattleSpritesDataPtr->healthBoxesData[battlerId].soundTimer = 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// Never reached
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -660,11 +668,12 @@ void BattleLoadPlayerMonSpriteGfx(struct Pokemon *mon, u8 battlerId)
|
||||
}
|
||||
}
|
||||
|
||||
void nullsub_23(void)
|
||||
// Unused
|
||||
static void BattleGfxSfxDummy1(void)
|
||||
{
|
||||
}
|
||||
|
||||
void nullsub_24(u16 species)
|
||||
void BattleGfxSfxDummy2(u16 species)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -687,7 +696,7 @@ void DecompressTrainerBackPic(u16 backPicId, u8 battlerId)
|
||||
0x100 + 16 * battlerId, 0x20);
|
||||
}
|
||||
|
||||
void nullsub_25(u8 arg0)
|
||||
void BattleGfxSfxDummy3(u8 gender)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1110,7 +1119,7 @@ void HandleBattleLowHpMusicChange(void)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_805EB9C(u8 affineMode)
|
||||
void SetBattlerSpriteAffineMode(u8 affineMode)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user