Mega evo animation

This commit is contained in:
DizzyEggg 2019-05-03 17:27:49 +02:00
parent d0f91a996d
commit 900c15c20c
12 changed files with 113 additions and 31 deletions

View File

@ -13137,32 +13137,49 @@ General_WishHeal:
end
General_MegaEvolution:
loadspritegfx ANIM_TAG_ORBS
loadspritegfx ANIM_TAG_CIRCLE_OF_LIGHT
loadspritegfx ANIM_TAG_METEOR
loadspritegfx ANIM_TAG_FLAT_ROCK
monbg ANIM_ATK_PARTNER
loadspritegfx ANIM_TAG_MEGA_STONE
loadspritegfx ANIM_TAG_MEGA_PARTICLES
loadspritegfx ANIM_TAG_MEGA_SYMBOL
monbg ANIM_ATTACKER
setalpha 12, 8
createvisualtask sub_8115A04, 2, 2, 1, 4, 0, 11, RGB(31, 31, 11)
playsewithpan SE_W025, -64
call SolarBeamSetUp1
loopsewithpan SE_W025, SOUND_PAN_ATTACKER, 13, 3
createvisualtask sub_8115A04, 2, 2, 0, 6, 0, 11, RGB(31, 31, 11)
call MegaEvolutionParticles
call MegaEvolutionParticles
call MegaEvolutionParticles
waitforvisualfinish
createsprite gUnknown_08595FEC, ANIM_TARGET, 2, 0
playsewithpan SE_W025, -64
delay 15
createsprite gBattleAnimSpriteTemplate_85972D8, ANIM_ATTACKER, 2, 4, 1, 180, 1
createvisualtask sub_8159244, 5, 234, 0
playsewithpan SE_W076, SOUND_PAN_ATTACKER
createsprite gMegaStoneSpriteTemplate, ANIM_ATTACKER, 41, 0, 0, 0, 0
delay 20
createvisualtask sub_815B7D0, 2, 0, 1
delay 4
createvisualtask sub_8117494, 50
createvisualtask sub_8116664, 5, 5, 2, 0, 16, RGB_WHITEALPHA
waitforvisualfinish
createvisualtask sub_8117494, 2
playsewithpan SE_W043, -64
createvisualtask sub_815B7D0, 2, 0, 1
createvisualtask sub_8116664, 5, 5, 2, 16, 0, RGB_WHITEALPHA
createvisualtask sub_81152DC, 5, 1, 5, 14
waitforvisualfinish
createsprite gMegaSymbolSpriteTemplate ANIM_ATTACKER, 2
waitforvisualfinish
clearmonbg ANIM_ATK_PARTNER
blendoff
clearmonbg ANIM_ATTACKER
end
MegaEvolutionParticles:
createsprite gMegaParticlesSpriteTemplate, ANIM_ATTACKER, 2, 40, -10, 13
delay 3
createsprite gMegaParticlesSpriteTemplate, ANIM_ATTACKER, 2, -35, -10, 13
delay 3
createsprite gMegaParticlesSpriteTemplate, ANIM_ATTACKER, 2, 15, -40, 13
delay 3
createsprite gMegaParticlesSpriteTemplate, ANIM_ATTACKER, 2, -10, -32, 13
delay 3
createsprite gMegaParticlesSpriteTemplate, ANIM_ATTACKER, 2, 25, -20, 13
delay 3
createsprite gMegaParticlesSpriteTemplate, ANIM_ATTACKER, 2, -40, -20, 13
delay 3
createsprite gMegaParticlesSpriteTemplate, ANIM_ATTACKER, 2, 5, -40, 13
delay 3
return
General_TerrainMisty:
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 510 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 487 B

View File

@ -224,7 +224,10 @@ void sub_8117854(u8 taskId, int unused, u16 arg2, u8 battler1, u8 arg4, u8 arg5,
// battle_anim_effects_1.c
void sub_810310C(u8 battler, struct Sprite* sprite);
void AnimMoveTwisterParticle(struct Sprite* sprite);
void AnimPowerAbsorptionOrb(struct Sprite* sprite);
extern const union AnimCmd *const gUnknown_08592388[];
extern const union AnimCmd *const gUnknown_085921C8[];
extern const union AffineAnimCmd *const gUnknown_085921DC[];
void sub_8100898(struct Sprite *);
// water.c
@ -238,6 +241,12 @@ void sub_810E044(struct Sprite *sprite);
//poison.c
extern const union AffineAnimCmd *const gUnknown_085961A0[];
// ghost.c
void sub_8112B78(struct Sprite *sprite);
// psychic.c
extern const union AffineAnimCmd *const gUnknown_08596894[];
// smokescreen.c
u8 sub_807521C(s16 x, s16 y, u8 a3);

View File

@ -300,6 +300,9 @@
#define ANIM_TAG_PURPLE_JAB (ANIM_SPRITES_START + 290)
#define ANIM_TAG_TOXIC_SPIKES (ANIM_SPRITES_START + 291)
#define ANIM_TAG_ENERGY_BALL (ANIM_SPRITES_START + 292)
#define ANIM_TAG_MEGA_STONE (ANIM_SPRITES_START + 293)
#define ANIM_TAG_MEGA_SYMBOL (ANIM_SPRITES_START + 294)
#define ANIM_TAG_MEGA_PARTICLES (ANIM_SPRITES_START + 295)
// battlers
#define ANIM_ATTACKER 0

View File

@ -4949,5 +4949,11 @@ extern const u32 gBattleAnimSpritePal_PurpleJab[];
extern const u32 gBattleAnimSpritePal_ToxicSpikes[];
extern const u32 gBattleAnimSpriteGfx_EnergyBall[];
extern const u32 gBattleAnimSpritePal_EnergyBall[];
extern const u32 gBattleAnimSpriteGfx_MegaStone[];
extern const u32 gBattleAnimSpritePal_MegaStone[];
extern const u32 gBattleAnimSpriteGfx_MegaParticles[];
extern const u32 gBattleAnimSpritePal_MegaParticles[];
extern const u32 gBattleAnimSpriteGfx_MegaSymbol[];
extern const u32 gBattleAnimSpritePal_MegaSymbol[];
#endif //GUARD_GRAPHICS_H

View File

@ -1418,6 +1418,9 @@ const struct CompressedSpriteSheet gBattleAnimPicTable[] =
{gBattleAnimSpriteGfx_PurpleJab, 0x0100, ANIM_TAG_PURPLE_JAB},
{gBattleAnimSpriteGfx_Spikes, 0x0080, ANIM_TAG_TOXIC_SPIKES},
{gBattleAnimSpriteGfx_EnergyBall, 0x0200, ANIM_TAG_ENERGY_BALL},
{gBattleAnimSpriteGfx_MegaStone, 0x800, ANIM_TAG_MEGA_STONE},
{gBattleAnimSpriteGfx_MegaSymbol, 0x0200, ANIM_TAG_MEGA_SYMBOL},
{gBattleAnimSpriteGfx_MegaParticles, 0x0180, ANIM_TAG_MEGA_PARTICLES},
};
const struct CompressedSpritePalette gBattleAnimPaletteTable[] =
@ -1715,6 +1718,9 @@ const struct CompressedSpritePalette gBattleAnimPaletteTable[] =
{gBattleAnimSpritePal_PurpleJab, ANIM_TAG_PURPLE_JAB},
{gBattleAnimSpritePal_ToxicSpikes, ANIM_TAG_TOXIC_SPIKES},
{gBattleAnimSpritePal_EnergyBall, ANIM_TAG_ENERGY_BALL},
{gBattleAnimSpritePal_MegaStone, ANIM_TAG_MEGA_STONE},
{gBattleAnimSpritePal_MegaSymbol, ANIM_TAG_MEGA_SYMBOL},
{gBattleAnimSpritePal_MegaParticles, ANIM_TAG_MEGA_PARTICLES},
};
const struct BattleAnimBackground gBattleAnimBackgroundTable[] =

View File

@ -1190,6 +1190,39 @@ const union AffineAnimCmd gSlackOffSquishAffineAnimCmds[] =
AFFINEANIMCMD_END,
};
const struct SpriteTemplate gMegaStoneSpriteTemplate =
{
.tileTag = ANIM_TAG_MEGA_STONE,
.paletteTag = ANIM_TAG_MEGA_STONE,
.oam = &gUnknown_08524AFC,
.anims = gDummySpriteAnimTable,
.images = NULL,
.affineAnims = gUnknown_08596894,
.callback = sub_80A77C8,
};
const struct SpriteTemplate gMegaParticlesSpriteTemplate =
{
.tileTag = ANIM_TAG_MEGA_PARTICLES,
.paletteTag = ANIM_TAG_MEGA_PARTICLES,
.oam = &gUnknown_08524A8C,
.anims = gUnknown_085921C8,
.images = NULL,
.affineAnims = gUnknown_085921DC,
.callback = AnimPowerAbsorptionOrb,
};
const struct SpriteTemplate gMegaSymbolSpriteTemplate =
{
.tileTag = ANIM_TAG_MEGA_SYMBOL,
.paletteTag = ANIM_TAG_MEGA_SYMBOL,
.oam = &gUnknown_08524A34,
.anims = gDummySpriteAnimTable,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_8112B78,
};
void sub_815A0D4(struct Sprite *sprite)
{
sprite->pos1.x += gBattleAnimArgs[0];

View File

@ -1339,16 +1339,16 @@ void DestroyMegaTriggerSprite(void)
static const s8 sIndicatorPosSingles[][2] =
{
[B_POSITION_PLAYER_LEFT] = {42, -7},
[B_POSITION_OPPONENT_LEFT] = {10, 10},
[B_POSITION_PLAYER_LEFT] = {53, -8},
[B_POSITION_OPPONENT_LEFT] = {53, -8},
};
static const s8 sIndicatorPosDoubles[][2] =
{
[B_POSITION_PLAYER_LEFT] = {53, -8},
[B_POSITION_OPPONENT_LEFT] = {10, 10},
[B_POSITION_PLAYER_RIGHT] = {10, 10},
[B_POSITION_OPPONENT_RIGHT] = {10, 10},
[B_POSITION_OPPONENT_LEFT] = {53, -8},
[B_POSITION_PLAYER_RIGHT] = {53, -8},
[B_POSITION_OPPONENT_RIGHT] = {53, -8},
};
void CreateMegaIndicatorSprite(u32 battlerId, u32 which)

View File

@ -35,7 +35,6 @@ static void sub_81129F0(struct Sprite *);
static void sub_8112A4C(struct Sprite *);
static void sub_8112ACC(struct Sprite *);
static void sub_8112B44(struct Sprite *);
static void sub_8112B78(struct Sprite *);
static void sub_8112C4C(struct Sprite *);
static void sub_8112D10(u8 taskId);
static void sub_8112E9C(struct Sprite *);
@ -1153,7 +1152,7 @@ static void sub_8112B44(struct Sprite *sprite)
DestroyAnimSprite(sprite);
}
static void sub_8112B78(struct Sprite *sprite)
void sub_8112B78(struct Sprite *sprite)
{
u16 coeffB;
u16 coeffA;

View File

@ -32,6 +32,15 @@ const u32 gBattleAnimSpritePal_ToxicSpikes[] = INCBIN_U32("graphics/battle_anims
const u32 gBattleAnimSpriteGfx_EnergyBall[] = INCBIN_U32("graphics/battle_anims/sprites/energy_ball.4bpp.lz");
const u32 gBattleAnimSpritePal_EnergyBall[] = INCBIN_U32("graphics/battle_anims/sprites/energy_ball.gbapal.lz");
const u32 gBattleAnimSpriteGfx_MegaStone[] = INCBIN_U32("graphics/battle_anims/sprites/mega_stone.4bpp.lz");
const u32 gBattleAnimSpritePal_MegaStone[] = INCBIN_U32("graphics/battle_anims/sprites/mega_stone.gbapal.lz");
const u32 gBattleAnimSpriteGfx_MegaParticles[] = INCBIN_U32("graphics/battle_anims/sprites/mega_particles.4bpp.lz");
const u32 gBattleAnimSpritePal_MegaParticles[] = INCBIN_U32("graphics/battle_anims/sprites/mega_particles.gbapal.lz");
const u32 gBattleAnimSpriteGfx_MegaSymbol[] = INCBIN_U32("graphics/battle_anims/sprites/mega_symbol.4bpp.lz");
const u32 gBattleAnimSpritePal_MegaSymbol[] = INCBIN_U32("graphics/battle_anims/sprites/mega_symbol.gbapal.lz");
// Battle anims
const u32 gBattleAnimSpriteGfx_Bubble[] = INCBIN_U32("graphics/battle_anims/sprites/bubble.4bpp.lz");
const u32 gBattleAnimSpriteGfx_Bone[] = INCBIN_U32("graphics/battle_anims/sprites/bone.4bpp.lz");