mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-02-04 02:10:01 +01:00
add trump card, fix a few issues with pluck
This commit is contained in:
parent
5f7b5ba453
commit
501ae27390
@ -911,25 +911,25 @@ Move_PLUCK:
|
|||||||
loadspritegfx ANIM_TAG_SEED_BROWN
|
loadspritegfx ANIM_TAG_SEED_BROWN
|
||||||
loadspritegfx ANIM_TAG_IMPACT
|
loadspritegfx ANIM_TAG_IMPACT
|
||||||
playsewithpan SE_W077, SOUND_PAN_ATTACKER
|
playsewithpan SE_W077, SOUND_PAN_ATTACKER
|
||||||
createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, -10, -5, 1, 2
|
createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 40, -10, -5, 1, 2
|
||||||
createsprite gPluckParticleSpriteTemplate, ANIM_ATTACKER, 2, 3, 0, 30, 2, 1
|
createsprite gPluckParticleSpriteTemplate, ANIM_ATTACKER, 40, 3, 0, 20, 2, 1
|
||||||
createsprite gPluckParticleSpriteTemplate, ANIM_ATTACKER, 2, 7, 1, 20, 1, 1
|
createsprite gPluckParticleSpriteTemplate, ANIM_ATTACKER, 40, 7, 1, 20, 1, 1
|
||||||
createsprite gPluckParticleSpriteTemplate, ANIM_ATTACKER, 2, -3, 5, 40, 2, -1
|
createsprite gPluckParticleSpriteTemplate, ANIM_ATTACKER, 40, -3, 5, 25, 2, -1
|
||||||
createsprite gPluckParticleSpriteTemplate, ANIM_ATTACKER, 2, 4, -4, 50, 3, -1
|
createsprite gPluckParticleSpriteTemplate, ANIM_ATTACKER, 40, 4, -4, 30, 3, -1
|
||||||
delay 30
|
delay 30
|
||||||
playsewithpan SE_W077, SOUND_PAN_ATTACKER
|
playsewithpan SE_W077, SOUND_PAN_ATTACKER
|
||||||
createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 5, 10, 1, 2
|
createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 40, 5, 10, 1, 2
|
||||||
createsprite gPluckParticleSpriteTemplate, ANIM_ATTACKER, 2, 3, -4, 30, 1, 1
|
createsprite gPluckParticleSpriteTemplate, ANIM_ATTACKER, 40, 3, -4, 20, 1, 1
|
||||||
createsprite gPluckParticleSpriteTemplate, ANIM_ATTACKER, 2, 7, -6, 20, 0, 1
|
createsprite gPluckParticleSpriteTemplate, ANIM_ATTACKER, 40, 7, -6, 20, 0, 1
|
||||||
createsprite gPluckParticleSpriteTemplate, ANIM_ATTACKER, 2, -3, -9, 40, 1, -1
|
createsprite gPluckParticleSpriteTemplate, ANIM_ATTACKER, 40, -3, -9, 25, 1, -1
|
||||||
createsprite gPluckParticleSpriteTemplate, ANIM_ATTACKER, 2, 4, -4, 50, 2, -1
|
createsprite gPluckParticleSpriteTemplate, ANIM_ATTACKER, 40, 4, -4, 30, 2, -1
|
||||||
delay 30
|
delay 30
|
||||||
playsewithpan SE_W077, SOUND_PAN_ATTACKER
|
playsewithpan SE_W077, SOUND_PAN_ATTACKER
|
||||||
createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 1, 2
|
createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 40, 0, 0, 1, 2
|
||||||
createsprite gPluckParticleSpriteTemplate, ANIM_ATTACKER, 2, -3, -4, 30, 1, 1
|
createsprite gPluckParticleSpriteTemplate, ANIM_ATTACKER, 40, -3, -4, 20, 1, 1
|
||||||
createsprite gPluckParticleSpriteTemplate, ANIM_ATTACKER, 2, 7, -6, 50, 0, 1
|
createsprite gPluckParticleSpriteTemplate, ANIM_ATTACKER, 40, 7, -6, 25, 0, 1
|
||||||
createsprite gPluckParticleSpriteTemplate, ANIM_ATTACKER, 2, -4, -10, 40, 1, 1
|
createsprite gPluckParticleSpriteTemplate, ANIM_ATTACKER, 40, -4, -10, 25, 1, 1
|
||||||
createsprite gPluckParticleSpriteTemplate, ANIM_ATTACKER, 2, 4, -4, 40, 1, 2
|
createsprite gPluckParticleSpriteTemplate, ANIM_ATTACKER, 40, 4, -4, 25, 1, 2
|
||||||
waitforvisualfinish
|
waitforvisualfinish
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -1163,6 +1163,47 @@ Move_PSYCHO_SHIFT:
|
|||||||
end
|
end
|
||||||
|
|
||||||
Move_TRUMP_CARD:
|
Move_TRUMP_CARD:
|
||||||
|
loadspritegfx ANIM_TAG_TRUMP_CARD
|
||||||
|
loadspritegfx ANIM_TAG_CUT
|
||||||
|
loadspritegfx ANIM_TAG_TRUMP_CARD_PARTICLES
|
||||||
|
monbg ANIM_TARGET
|
||||||
|
setalpha 12, 8
|
||||||
|
playsewithpan SE_W013B, SOUND_PAN_TARGET
|
||||||
|
createsprite gTrumpCardSpriteTemplate, ANIM_ATTACKER, 40, 40, 0, 0, 32
|
||||||
|
delay 2
|
||||||
|
createsprite gTrumpCardSpriteTemplate, ANIM_ATTACKER, 40, 40, 0, 1, 32
|
||||||
|
delay 2
|
||||||
|
playsewithpan SE_W013B, SOUND_PAN_TARGET
|
||||||
|
createsprite gTrumpCardSpriteTemplate, ANIM_ATTACKER, 40, 40, 0, 0, 32
|
||||||
|
delay 2
|
||||||
|
createsprite gTrumpCardSpriteTemplate, ANIM_ATTACKER, 40, 40, 0, 2, 32
|
||||||
|
delay 2
|
||||||
|
playsewithpan SE_W013B, SOUND_PAN_TARGET
|
||||||
|
createsprite gTrumpCardSpriteTemplate, ANIM_ATTACKER, 40, 40, 0, 2, 32
|
||||||
|
delay 2
|
||||||
|
createsprite gTrumpCardSpriteTemplate, ANIM_ATTACKER, 40, 40, 0, 2, 32
|
||||||
|
delay 2
|
||||||
|
playsewithpan SE_W013B, SOUND_PAN_TARGET
|
||||||
|
playsewithpan SE_W015, SOUND_PAN_TARGET
|
||||||
|
createsprite gCuttingSliceSpriteTemplate, ANIM_ATTACKER, 2, 40, -32, 0
|
||||||
|
createsprite gTrumpCardSpriteTemplate, ANIM_ATTACKER, 40, 40, 0, 1, 32
|
||||||
|
delay 2
|
||||||
|
createsprite gTrumpCardSpriteTemplate, ANIM_ATTACKER, 40, 40, 0, 1, 32
|
||||||
|
delay 3
|
||||||
|
createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 0, 3, 10, 1
|
||||||
|
createsprite gTrumpCardParticleSpriteTempalte, ANIM_ATTACKER, 40, 0, 0, 1, 12, -5, -4, 0
|
||||||
|
createsprite gTrumpCardParticleSpriteTempalte, ANIM_ATTACKER, 40, 0, 0, 0, 13, 5, 4, 1
|
||||||
|
createsprite gTrumpCardParticleSpriteTempalte, ANIM_ATTACKER, 40, 0, 0, 1, 8, -3, 0, 2
|
||||||
|
createsprite gTrumpCardParticleSpriteTempalte, ANIM_ATTACKER, 40, 0, 0, 2, 12, -5, 4, 3
|
||||||
|
delay 2
|
||||||
|
createsprite gTrumpCardParticleSpriteTempalte, ANIM_ATTACKER, 40, 0, 0, 1, 10, 1, -4, 4
|
||||||
|
createsprite gTrumpCardParticleSpriteTempalte, ANIM_ATTACKER, 40, 0, 0, 0, 13, 5, 6, 1
|
||||||
|
createsprite gTrumpCardParticleSpriteTempalte, ANIM_ATTACKER, 40, 0, 0, 1, 12, -2, 1, 3
|
||||||
|
createsprite gTrumpCardParticleSpriteTempalte, ANIM_ATTACKER, 40, 0, 0, 2, 13, -2, 1, 2
|
||||||
|
waitforvisualfinish
|
||||||
|
clearmonbg ANIM_TARGET
|
||||||
|
blendoff
|
||||||
|
waitforvisualfinish
|
||||||
end
|
end
|
||||||
|
|
||||||
Move_HEAL_BLOCK:
|
Move_HEAL_BLOCK:
|
||||||
|
BIN
graphics/battle_anims/sprites/trump-card-particles.png
Normal file
BIN
graphics/battle_anims/sprites/trump-card-particles.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 140 B |
BIN
graphics/battle_anims/sprites/trump-cards.png
Normal file
BIN
graphics/battle_anims/sprites/trump-cards.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 143 B |
@ -305,6 +305,8 @@
|
|||||||
#define ANIM_TAG_MEGA_STONE (ANIM_SPRITES_START + 295)
|
#define ANIM_TAG_MEGA_STONE (ANIM_SPRITES_START + 295)
|
||||||
#define ANIM_TAG_MEGA_SYMBOL (ANIM_SPRITES_START + 296)
|
#define ANIM_TAG_MEGA_SYMBOL (ANIM_SPRITES_START + 296)
|
||||||
#define ANIM_TAG_MEGA_PARTICLES (ANIM_SPRITES_START + 297)
|
#define ANIM_TAG_MEGA_PARTICLES (ANIM_SPRITES_START + 297)
|
||||||
|
#define ANIM_TAG_TRUMP_CARD (ANIM_SPRITES_START + 298)
|
||||||
|
#define ANIM_TAG_TRUMP_CARD_PARTICLES (ANIM_SPRITES_START + 299)
|
||||||
|
|
||||||
// battlers
|
// battlers
|
||||||
#define ANIM_ATTACKER 0
|
#define ANIM_ATTACKER 0
|
||||||
|
@ -4411,6 +4411,8 @@ extern const u32 gBattleAnimBgTilemap_ScaryFaceOpponent[];
|
|||||||
extern const u32 gBattleAnimBgTilemap_ScaryFaceContest[];
|
extern const u32 gBattleAnimBgTilemap_ScaryFaceContest[];
|
||||||
extern const u32 gBattleAnimSpriteGfx_Bird[];
|
extern const u32 gBattleAnimSpriteGfx_Bird[];
|
||||||
extern const u32 gBattleAnimSpriteGfx_CrossImpact[];
|
extern const u32 gBattleAnimSpriteGfx_CrossImpact[];
|
||||||
|
extern const u32 gBattleAnimSpriteGfx_TrumpCard[];
|
||||||
|
extern const u32 gBattleAnimSpriteGfx_TrumpCardParticles[];
|
||||||
|
|
||||||
extern const u32 gBattleAnimSpritePal_Bone[];
|
extern const u32 gBattleAnimSpritePal_Bone[];
|
||||||
extern const u32 gBattleAnimSpritePal_Spark[];
|
extern const u32 gBattleAnimSpritePal_Spark[];
|
||||||
@ -4696,6 +4698,8 @@ extern const u32 gBattleAnimSpritePal_CrossImpact[];
|
|||||||
extern const u32 gBattleAnimSpritePal_Slash2[];
|
extern const u32 gBattleAnimSpritePal_Slash2[];
|
||||||
extern const u32 gBattleAnimSpritePal_WhipHit[];
|
extern const u32 gBattleAnimSpritePal_WhipHit[];
|
||||||
extern const u32 gBattleAnimSpritePal_BlueRing2[];
|
extern const u32 gBattleAnimSpritePal_BlueRing2[];
|
||||||
|
extern const u32 gBattleAnimSpritePal_TrumpCard[];
|
||||||
|
extern const u32 gBattleAnimSpritePal_TrumpCardParticles[];
|
||||||
|
|
||||||
extern const u32 gBattleAnimBgImage_Dark[];
|
extern const u32 gBattleAnimBgImage_Dark[];
|
||||||
extern const u32 gBattleAnimBgImage_Ghost[];
|
extern const u32 gBattleAnimBgImage_Ghost[];
|
||||||
|
@ -1423,6 +1423,8 @@ const struct CompressedSpriteSheet gBattleAnimPicTable[] =
|
|||||||
{gBattleAnimSpriteGfx_MegaStone, 0x800, ANIM_TAG_MEGA_STONE},
|
{gBattleAnimSpriteGfx_MegaStone, 0x800, ANIM_TAG_MEGA_STONE},
|
||||||
{gBattleAnimSpriteGfx_MegaSymbol, 0x0200, ANIM_TAG_MEGA_SYMBOL},
|
{gBattleAnimSpriteGfx_MegaSymbol, 0x0200, ANIM_TAG_MEGA_SYMBOL},
|
||||||
{gBattleAnimSpriteGfx_MegaParticles, 0x0180, ANIM_TAG_MEGA_PARTICLES},
|
{gBattleAnimSpriteGfx_MegaParticles, 0x0180, ANIM_TAG_MEGA_PARTICLES},
|
||||||
|
{gBattleAnimSpriteGfx_TrumpCard, 0x0180, ANIM_TAG_TRUMP_CARD},
|
||||||
|
{gBattleAnimSpriteGfx_TrumpCardParticles, 0x0060, ANIM_TAG_TRUMP_CARD_PARTICLES},
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct CompressedSpritePalette gBattleAnimPaletteTable[] =
|
const struct CompressedSpritePalette gBattleAnimPaletteTable[] =
|
||||||
@ -1725,6 +1727,8 @@ const struct CompressedSpritePalette gBattleAnimPaletteTable[] =
|
|||||||
{gBattleAnimSpritePal_MegaStone, ANIM_TAG_MEGA_STONE},
|
{gBattleAnimSpritePal_MegaStone, ANIM_TAG_MEGA_STONE},
|
||||||
{gBattleAnimSpritePal_MegaSymbol, ANIM_TAG_MEGA_SYMBOL},
|
{gBattleAnimSpritePal_MegaSymbol, ANIM_TAG_MEGA_SYMBOL},
|
||||||
{gBattleAnimSpritePal_MegaParticles, ANIM_TAG_MEGA_PARTICLES},
|
{gBattleAnimSpritePal_MegaParticles, ANIM_TAG_MEGA_PARTICLES},
|
||||||
|
{gBattleAnimSpritePal_TrumpCard, ANIM_TAG_TRUMP_CARD},
|
||||||
|
{gBattleAnimSpritePal_TrumpCardParticles, ANIM_TAG_TRUMP_CARD_PARTICLES},
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct BattleAnimBackground gBattleAnimBackgroundTable[] =
|
const struct BattleAnimBackground gBattleAnimBackgroundTable[] =
|
||||||
|
@ -156,6 +156,8 @@ static void sub_81033F0(struct Sprite *);
|
|||||||
static void sub_810342C(struct Sprite *);
|
static void sub_810342C(struct Sprite *);
|
||||||
static void AnimMoveFeintSwipe(struct Sprite *);
|
static void AnimMoveFeintSwipe(struct Sprite *);
|
||||||
static void AnimMoveFeintZoom(struct Sprite *);
|
static void AnimMoveFeintZoom(struct Sprite *);
|
||||||
|
static void AnimMoveTrumpCard(struct Sprite *);
|
||||||
|
static void AnimMoveTrumpCardParticle(struct Sprite* sprite);
|
||||||
|
|
||||||
const union AnimCmd gUnknown_085920F0[] =
|
const union AnimCmd gUnknown_085920F0[] =
|
||||||
{
|
{
|
||||||
@ -183,10 +185,122 @@ static const union AffineAnimCmd sFeintAffineZoom[] =
|
|||||||
AFFINEANIMCMD_END,
|
AFFINEANIMCMD_END,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const union AffineAnimCmd * const sFeintAffineAnims[] = {
|
static const union AffineAnimCmd sTrumpCardAffine0[] =
|
||||||
|
{
|
||||||
|
AFFINEANIMCMD_FRAME(0xC0, 0xC0, 30, 0),
|
||||||
|
AFFINEANIMCMD_END,
|
||||||
|
};
|
||||||
|
|
||||||
|
static const union AffineAnimCmd sTrumpCardAffine1[] =
|
||||||
|
{
|
||||||
|
AFFINEANIMCMD_FRAME(0xA0, 0xA0, 40, 0),
|
||||||
|
AFFINEANIMCMD_END,
|
||||||
|
};
|
||||||
|
|
||||||
|
static const union AffineAnimCmd sTrumpCardAffine2[] =
|
||||||
|
{
|
||||||
|
AFFINEANIMCMD_FRAME(0xD0, 0xD0, -20, 0),
|
||||||
|
AFFINEANIMCMD_END,
|
||||||
|
};
|
||||||
|
|
||||||
|
static const union AffineAnimCmd sTrumpCardAffine3[] =
|
||||||
|
{
|
||||||
|
AFFINEANIMCMD_FRAME(0xE0, 0xE0, 40, 0),
|
||||||
|
AFFINEANIMCMD_END,
|
||||||
|
};
|
||||||
|
|
||||||
|
static const union AffineAnimCmd sTrumpCardAffine4[] =
|
||||||
|
{
|
||||||
|
AFFINEANIMCMD_FRAME(0xF0, 0xF0, 60, 0),
|
||||||
|
AFFINEANIMCMD_END,
|
||||||
|
};
|
||||||
|
|
||||||
|
static const union AffineAnimCmd * const sTrumpCardAffineAnims[] =
|
||||||
|
{
|
||||||
|
sTrumpCardAffine0,
|
||||||
|
sTrumpCardAffine1,
|
||||||
|
sTrumpCardAffine2,
|
||||||
|
sTrumpCardAffine3,
|
||||||
|
sTrumpCardAffine4
|
||||||
|
};
|
||||||
|
|
||||||
|
static const union AffineAnimCmd * const sFeintAffineAnims[] =
|
||||||
|
{
|
||||||
sFeintAffineZoom,
|
sFeintAffineZoom,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const union AnimCmd sTrumpCardFrame0[] =
|
||||||
|
{
|
||||||
|
ANIMCMD_FRAME(0, 0),
|
||||||
|
ANIMCMD_END
|
||||||
|
};
|
||||||
|
|
||||||
|
static const union AnimCmd sTrumpCardFrame1[] =
|
||||||
|
{
|
||||||
|
ANIMCMD_FRAME(4, 0),
|
||||||
|
ANIMCMD_END
|
||||||
|
};
|
||||||
|
|
||||||
|
static const union AnimCmd sTrumpCardFrame2[] =
|
||||||
|
{
|
||||||
|
ANIMCMD_FRAME(8, 0),
|
||||||
|
ANIMCMD_END
|
||||||
|
};
|
||||||
|
|
||||||
|
static const union AnimCmd sTrumpCardParticleFrame0[] =
|
||||||
|
{
|
||||||
|
ANIMCMD_FRAME(0, 0),
|
||||||
|
ANIMCMD_END
|
||||||
|
};
|
||||||
|
|
||||||
|
static const union AnimCmd sTrumpCardParticleFrame1[] =
|
||||||
|
{
|
||||||
|
ANIMCMD_FRAME(1, 0),
|
||||||
|
ANIMCMD_END
|
||||||
|
};
|
||||||
|
|
||||||
|
static const union AnimCmd sTrumpCardParticleFrame2[] =
|
||||||
|
{
|
||||||
|
ANIMCMD_FRAME(2, 0),
|
||||||
|
ANIMCMD_END
|
||||||
|
};
|
||||||
|
|
||||||
|
static const union AnimCmd * const sTrumpCardAnims[] =
|
||||||
|
{
|
||||||
|
sTrumpCardFrame0,
|
||||||
|
sTrumpCardFrame1,
|
||||||
|
sTrumpCardFrame2
|
||||||
|
};
|
||||||
|
|
||||||
|
static const union AnimCmd * const sTrumpCardParticleAnims[] =
|
||||||
|
{
|
||||||
|
sTrumpCardParticleFrame0,
|
||||||
|
sTrumpCardParticleFrame1,
|
||||||
|
sTrumpCardParticleFrame2,
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct SpriteTemplate gTrumpCardParticleSpriteTempalte =
|
||||||
|
{
|
||||||
|
.tileTag = ANIM_TAG_TRUMP_CARD_PARTICLES,
|
||||||
|
.paletteTag = ANIM_TAG_TRUMP_CARD_PARTICLES,
|
||||||
|
.oam = &gUnknown_085249C4,
|
||||||
|
.anims = sTrumpCardParticleAnims,
|
||||||
|
.images = NULL,
|
||||||
|
.affineAnims = sTrumpCardAffineAnims,
|
||||||
|
.callback = AnimMoveTrumpCardParticle
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct SpriteTemplate gTrumpCardSpriteTemplate =
|
||||||
|
{
|
||||||
|
.tileTag = ANIM_TAG_TRUMP_CARD,
|
||||||
|
.paletteTag = ANIM_TAG_TRUMP_CARD,
|
||||||
|
.oam = &gUnknown_085249CC,
|
||||||
|
.anims = sTrumpCardAnims,
|
||||||
|
.images = NULL,
|
||||||
|
.affineAnims = gDummySpriteAffineAnimTable,
|
||||||
|
.callback = AnimMoveTrumpCard
|
||||||
|
};
|
||||||
|
|
||||||
const struct SpriteTemplate gFeintSwipeSpriteTemplate =
|
const struct SpriteTemplate gFeintSwipeSpriteTemplate =
|
||||||
{
|
{
|
||||||
.tileTag = ANIM_TAG_FEINT,
|
.tileTag = ANIM_TAG_FEINT,
|
||||||
@ -2777,6 +2891,84 @@ static void AnimMoveFeintZoom(struct Sprite* sprite)
|
|||||||
sprite->callback = RunStoredCallbackWhenAffineAnimEnds;
|
sprite->callback = RunStoredCallbackWhenAffineAnimEnds;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void AnimMoveTrumpCardArc(struct Sprite* sprite)
|
||||||
|
{
|
||||||
|
if(AnimTranslateLinear(sprite))
|
||||||
|
{
|
||||||
|
DestroyAnimSprite(sprite);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sprite->pos2.y = Sin(sprite->data[5], -20);
|
||||||
|
sprite->data[5] -= sprite->data[6];
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static void AnimMoveTrumpCard(struct Sprite* sprite)
|
||||||
|
{
|
||||||
|
if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
|
||||||
|
{
|
||||||
|
gBattleAnimArgs[0] = -gBattleAnimArgs[0];
|
||||||
|
}
|
||||||
|
InitSpritePosToAnimTarget(sprite, TRUE);
|
||||||
|
StartSpriteAnim(sprite, gBattleAnimArgs[2]);
|
||||||
|
sprite->data[0] = gBattleAnimArgs[3];
|
||||||
|
sprite->data[1] = sprite->pos1.x;
|
||||||
|
sprite->data[2] = sprite->pos1.x - 80;
|
||||||
|
sprite->data[3] = sprite->pos1.y;
|
||||||
|
sprite->data[4] = sprite->pos1.y;
|
||||||
|
sprite->data[5] = 128;
|
||||||
|
sprite->data[6] = 128 / sprite->data[0];
|
||||||
|
InitAnimLinearTranslation(sprite);
|
||||||
|
sprite->callback = AnimMoveTrumpCardArc;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void AnimMoveTrumpCardParticleAlive(struct Sprite* sprite)
|
||||||
|
{
|
||||||
|
if(sprite->data[0] > 0)
|
||||||
|
{
|
||||||
|
s16 yVelocity = sprite->data[2];
|
||||||
|
s16 xVelocity = sprite->data[1];
|
||||||
|
sprite->pos1.y -= yVelocity;
|
||||||
|
sprite->pos1.x += xVelocity;
|
||||||
|
if((sprite->data[0] % 2) == 0)
|
||||||
|
{
|
||||||
|
if(xVelocity > 0)
|
||||||
|
xVelocity--;
|
||||||
|
else if(xVelocity < 0)
|
||||||
|
xVelocity++;
|
||||||
|
|
||||||
|
if(yVelocity > 0)
|
||||||
|
yVelocity--;
|
||||||
|
else if(yVelocity < 0)
|
||||||
|
yVelocity++;
|
||||||
|
sprite->data[1] = xVelocity;
|
||||||
|
sprite->data[2] = yVelocity;
|
||||||
|
}
|
||||||
|
sprite->data[0]--;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sprite->callback = DestroyAnimSprite;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void AnimMoveTrumpCardParticle(struct Sprite* sprite)
|
||||||
|
{
|
||||||
|
if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
|
||||||
|
{
|
||||||
|
gBattleAnimArgs[0] = -gBattleAnimArgs[0];
|
||||||
|
}
|
||||||
|
InitSpritePosToAnimTarget(sprite, TRUE);
|
||||||
|
StartSpriteAnim(sprite, gBattleAnimArgs[2]);
|
||||||
|
StartSpriteAffineAnim(sprite, gBattleAnimArgs[6]);
|
||||||
|
sprite->data[0] = gBattleAnimArgs[3]; //lifespan
|
||||||
|
sprite->data[1] = gBattleAnimArgs[4]; //horizontal velocity, decaying
|
||||||
|
sprite->data[2] = gBattleAnimArgs[5]; //vertical velocity, decaying
|
||||||
|
sprite->callback = AnimMoveTrumpCardParticleAlive;
|
||||||
|
}
|
||||||
|
|
||||||
// seed (sprouts a sapling from a seed.)
|
// seed (sprouts a sapling from a seed.)
|
||||||
// Used by Leech Seed.
|
// Used by Leech Seed.
|
||||||
// arg 0: initial x pixel offset
|
// arg 0: initial x pixel offset
|
||||||
|
@ -119,6 +119,12 @@ const u32 gBattleAnimSpriteGfx_WavingHand[] = INCBIN_U32("graphics/battle_anims/
|
|||||||
const u32 gBattleAnimSpriteGfx_Feint[] = INCBIN_U32("graphics/battle_anims/sprites/feint-punch.4bpp.lz");
|
const u32 gBattleAnimSpriteGfx_Feint[] = INCBIN_U32("graphics/battle_anims/sprites/feint-punch.4bpp.lz");
|
||||||
const u32 gBattleAnimSpritePal_Feint[] = INCBIN_U32("graphics/battle_anims/sprites/feint-punch.gbapal.lz");
|
const u32 gBattleAnimSpritePal_Feint[] = INCBIN_U32("graphics/battle_anims/sprites/feint-punch.gbapal.lz");
|
||||||
|
|
||||||
|
const u32 gBattleAnimSpriteGfx_TrumpCard[] = INCBIN_U32("graphics/battle_anims/sprites/trump-cards.4bpp.lz");
|
||||||
|
const u32 gBattleAnimSpritePal_TrumpCard[] = INCBIN_U32("graphics/battle_anims/sprites/trump-cards.gbapal.lz");
|
||||||
|
|
||||||
|
const u32 gBattleAnimSpriteGfx_TrumpCardParticles[] = INCBIN_U32("graphics/battle_anims/sprites/trump-card-particles.4bpp.lz");
|
||||||
|
const u32 gBattleAnimSpritePal_TrumpCardParticles[] = INCBIN_U32("graphics/battle_anims/sprites/trump-card-particles.gbapal.lz");
|
||||||
|
|
||||||
const u32 gBattleAnimSpriteGfx_ClosingEye[] = INCBIN_U32("graphics/battle_anims/sprites/closing_eye.4bpp.lz");
|
const u32 gBattleAnimSpriteGfx_ClosingEye[] = INCBIN_U32("graphics/battle_anims/sprites/closing_eye.4bpp.lz");
|
||||||
const u32 gBattleAnimSpritePal_ClosingEye[] = INCBIN_U32("graphics/battle_anims/sprites/closing_eye.gbapal.lz");
|
const u32 gBattleAnimSpritePal_ClosingEye[] = INCBIN_U32("graphics/battle_anims/sprites/closing_eye.gbapal.lz");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user