Synced src/pokeball.c

This commit is contained in:
Eduardo Quezada
2022-07-29 21:39:25 -04:00
parent c40791fd4e
commit dcb9d9de1e
32 changed files with 575 additions and 495 deletions
+14 -8
View File
@@ -55,6 +55,12 @@
#define MAX_TRAINER_ITEMS 4
enum {
BATTLER_AFFINE_NORMAL,
BATTLER_AFFINE_EMERGE,
BATTLER_AFFINE_RETURN,
};
#define MOVE_TARGET_SELECTED 0
#define MOVE_TARGET_DEPENDS (1 << 0)
#define MOVE_TARGET_USER_OR_SELECTED (1 << 1)
@@ -545,15 +551,15 @@ struct BattleAnimationInfo
u8 field_6;
u8 field_7;
u8 ballThrowCaseId;
u8 healthboxSlideInStarted : 1;
u8 field_9_x2 : 1;
u8 field_9_x1C : 3;
u8 field_9_x20 : 1;
u8 field_9_x40 : 1;
u8 field_9_x80 : 1;
u8 field_A;
u8 introAnimActive:1;
u8 wildMonInvisible:1;
u8 field_9_x1C:3;
u8 field_9_x20:1;
u8 field_9_x40:1;
u8 field_9_x80:1;
u8 numBallParticles;
u8 field_B;
s16 field_C;
s16 ballSubpx;
u8 field_E;
u8 field_F;
};
+1 -1
View File
@@ -317,7 +317,7 @@ void AnimRecycle(struct Sprite *);
// battle_anim_special.c
void TryShinyAnimation(u8 battler, struct Pokemon *mon);
u8 ItemIdToBallId(u16 itemId);
u8 LaunchBallStarsTask(u8 x, u8 y, u8 priority, u8 subpriority, u8 ballId);
u8 AnimateBallOpenParticles(u8 x, u8 y, u8 priority, u8 subpriority, u8 ballId);
u8 LaunchBallFadeMonTask(bool8 unFadeLater, u8 battlerId, u32 arg2, u8 ballId);
void DoLoadHealthboxPalsForLevelUp(u8 *, u8 *, u8 battlerId);
void DoFreeHealthboxPalsForLevelUp(u8 batterId);
+1 -1
View File
@@ -40,6 +40,6 @@ void BattleInterfaceSetWindowPals(void);
void ClearTemporarySpeciesSpriteData(u8 battlerId, bool8 dontClearSubstitute);
void AllocateMonSpritesGfx(void);
void FreeMonSpritesGfx(void);
bool32 ShouldPlayNormalPokeCry(struct Pokemon *mon);
bool32 ShouldPlayNormalMonCry(struct Pokemon *mon);
#endif // GUARD_BATTLE_GFX_SFX_UTIL_H
+1 -1
View File
@@ -312,7 +312,7 @@
#define NUM_CASTFORM_FORMS 4
#define CASTFORM_SUBSTITUTE (1 << 7)
// Return value for IsRunningFromBattleImpossible.
// Return value for IsRunningFromBattleImpossible.
#define BATTLE_RUN_SUCCESS 0
#define BATTLE_RUN_FORBIDDEN 1
#define BATTLE_RUN_FAILURE 2
+24 -24
View File
@@ -3,30 +3,30 @@
#include "global.h"
extern const u32 gInterfaceGfx_PokeBall[];
extern const u32 gInterfacePal_PokeBall[];
extern const u32 gInterfaceGfx_GreatBall[];
extern const u32 gInterfacePal_GreatBall[];
extern const u32 gInterfaceGfx_SafariBall[];
extern const u32 gInterfacePal_SafariBall[];
extern const u32 gInterfaceGfx_UltraBall[];
extern const u32 gInterfacePal_UltraBall[];
extern const u32 gInterfaceGfx_MasterBall[];
extern const u32 gInterfacePal_MasterBall[];
extern const u32 gInterfaceGfx_NetBall[];
extern const u32 gInterfacePal_NetBall[];
extern const u32 gInterfaceGfx_DiveBall[];
extern const u32 gInterfacePal_DiveBall[];
extern const u32 gInterfaceGfx_NestBall[];
extern const u32 gInterfacePal_NestBall[];
extern const u32 gInterfaceGfx_RepeatBall[];
extern const u32 gInterfacePal_RepeatBall[];
extern const u32 gInterfaceGfx_TimerBall[];
extern const u32 gInterfacePal_TimerBall[];
extern const u32 gInterfaceGfx_LuxuryBall[];
extern const u32 gInterfacePal_LuxuryBall[];
extern const u32 gInterfaceGfx_PremierBall[];
extern const u32 gInterfacePal_PremierBall[];
extern const u32 gBallGfx_Poke[];
extern const u32 gBallPal_Poke[];
extern const u32 gBallGfx_Great[];
extern const u32 gBallPal_Great[];
extern const u32 gBallGfx_Safari[];
extern const u32 gBallPal_Safari[];
extern const u32 gBallGfx_Ultra[];
extern const u32 gBallPal_Ultra[];
extern const u32 gBallGfx_Master[];
extern const u32 gBallPal_Master[];
extern const u32 gBallGfx_Net[];
extern const u32 gBallPal_Net[];
extern const u32 gBallGfx_Dive[];
extern const u32 gBallPal_Dive[];
extern const u32 gBallGfx_Nest[];
extern const u32 gBallPal_Nest[];
extern const u32 gBallGfx_Repeat[];
extern const u32 gBallPal_Repeat[];
extern const u32 gBallGfx_Timer[];
extern const u32 gBallPal_Timer[];
extern const u32 gBallGfx_Luxury[];
extern const u32 gBallPal_Luxury[];
extern const u32 gBallGfx_Premier[];
extern const u32 gBallPal_Premier[];
extern const u32 gOpenPokeballGfx[];
// pokemon gfx
+1 -1
View File
@@ -324,7 +324,7 @@ struct STWIStatus
vu8 sending;
};
// This struct is used as u8 array in SDK.
// This struct is used as u8 array in SDK.
struct RfuIntrStruct
{
union RfuPacket rxPacketAlloc;
+9 -1
View File
@@ -20,6 +20,14 @@ enum
POKEBALL_COUNT
};
enum {
BALL_AFFINE_ANIM_0,
BALL_ROTATE_RIGHT,
BALL_ROTATE_LEFT,
BALL_AFFINE_ANIM_3,
BALL_AFFINE_ANIM_4
};
extern const struct CompressedSpriteSheet gBallSpriteSheets[POKEBALL_COUNT];
extern const struct CompressedSpritePalette gBallSpritePalettes[POKEBALL_COUNT];
extern const struct SpriteTemplate gBallSpriteTemplates[];
@@ -34,6 +42,6 @@ void DoHitAnimHealthboxEffect(u8 bank);
void LoadBallGfx(u8 ballId);
void FreeBallGfx(u8 ballId);
void StartHealthboxSlideIn(u8 battler);
void DestroySpriteAndFreeResources2(struct Sprite *sprite);
void DestroySpriteAndFreeResources_Ball(struct Sprite *sprite);
#endif // GUARD_POKEBALL_H