Upgraded Dragon Darts Animation (#4620)
* Upgraded Dragon Darts Animation * Fixed Dragon Darts not workin in link battles * Apply suggestions from code review Co-authored-by: Bassoonian <iasperbassoonian@gmail.com> --------- Co-authored-by: Hedara <hedara90@gmail.com> Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
This commit is contained in:
parent
80b193280d
commit
d999092689
13 changed files with 190 additions and 3 deletions
|
@ -315,6 +315,19 @@
|
|||
.Lsprite_\@_2:
|
||||
.endm
|
||||
|
||||
.macro createdragondartsprite anim_battler:req, subpriority_offset:req, argv:vararg
|
||||
.byte 0x33
|
||||
.if \anim_battler == ANIM_TARGET
|
||||
.byte ANIMSPRITE_IS_TARGET | (\subpriority_offset & 0x7F)
|
||||
.else
|
||||
.byte (\subpriority_offset & 0x7F)
|
||||
.endif
|
||||
.byte (.Lsprite_\@_2 - .Lsprite_\@_1) / 2
|
||||
.Lsprite_\@_1:
|
||||
.2byte \argv
|
||||
.Lsprite_\@_2:
|
||||
.endm
|
||||
|
||||
@ useful macros
|
||||
.macro jumpreteq value:req, ptr:req
|
||||
jumpargeq ARG_RET_ID, \value, \ptr
|
||||
|
|
|
@ -13865,10 +13865,12 @@ Move_MAGIC_POWDER::
|
|||
end
|
||||
|
||||
Move_DRAGON_DARTS::
|
||||
loadspritegfx ANIM_TAG_DREEPY_SHINY
|
||||
loadspritegfx ANIM_TAG_DREEPY
|
||||
loadspritegfx ANIM_TAG_AIR_WAVE
|
||||
loadspritegfx ANIM_TAG_EXPLOSION
|
||||
playsewithpan SE_FALL, SOUND_PAN_ATTACKER
|
||||
createsprite gDreepyMissileTemplate, ANIM_TARGET, 2, 0x0, 0x0, 0x19
|
||||
createdragondartsprite ANIM_TARGET, 2, 0x0, 0x0, 0x19
|
||||
delay 0x19
|
||||
playsewithpan SE_M_SELF_DESTRUCT, SOUND_PAN_TARGET
|
||||
createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 3, 0, 16, 1
|
||||
|
|
19
graphics/battle_anims/sprites/dreepy_missile.pal
Normal file
19
graphics/battle_anims/sprites/dreepy_missile.pal
Normal file
|
@ -0,0 +1,19 @@
|
|||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
153 217 234
|
||||
254 87 103
|
||||
77 119 117
|
||||
62 67 67
|
||||
170 237 211
|
||||
138 189 179
|
||||
121 163 146
|
||||
77 119 117
|
||||
251 234 137
|
||||
195 97 109
|
||||
78 52 54
|
||||
222 214 198
|
||||
173 146 118
|
||||
151 135 135
|
||||
122 105 94
|
||||
0 4 1
|
Binary file not shown.
Before Width: | Height: | Size: 281 B After Width: | Height: | Size: 4.3 KiB |
19
graphics/battle_anims/sprites/dreepy_missile_shiny.pal
Normal file
19
graphics/battle_anims/sprites/dreepy_missile_shiny.pal
Normal file
|
@ -0,0 +1,19 @@
|
|||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
153 217 234
|
||||
222 223 109
|
||||
77 119 117
|
||||
62 67 67
|
||||
170 237 211
|
||||
138 189 179
|
||||
77 171 225
|
||||
53 110 226
|
||||
251 234 137
|
||||
195 97 109
|
||||
78 52 54
|
||||
222 214 198
|
||||
173 146 118
|
||||
151 135 135
|
||||
122 105 94
|
||||
0 4 1
|
|
@ -537,6 +537,9 @@ extern const union AnimCmd *const gAnims_WillOWispOrb[];
|
|||
extern const union AnimCmd *const gAnims_FirePlume[];
|
||||
|
||||
// battle_anim_dragon.c
|
||||
extern const union AnimCmd *const gAnims_DreepyMissilePlayer[];
|
||||
extern const union AnimCmd *const gAnims_DreepyMissileOpponent[];
|
||||
extern const union AnimCmd *const gAnims_DreepyMissileOpponentNotDrag[];
|
||||
extern const union AnimCmd *const gAnims_DragonBreathFire[];
|
||||
extern const union AnimCmd *const gAnims_DragonRageFirePlume[];
|
||||
extern const union AffineAnimCmd *const gAffineAnims_DragonRageFire[];
|
||||
|
|
|
@ -407,6 +407,7 @@
|
|||
#define ANIM_TAG_SYRUP_SPLAT_YELLOW (ANIM_SPRITES_START + 393)
|
||||
#define ANIM_TAG_TERA_CRYSTAL (ANIM_SPRITES_START + 394)
|
||||
#define ANIM_TAG_TERA_SHATTER (ANIM_SPRITES_START + 395)
|
||||
#define ANIM_TAG_DREEPY_SHINY (ANIM_SPRITES_START + 396)
|
||||
|
||||
// battlers
|
||||
#define ANIM_ATTACKER 0
|
||||
|
|
|
@ -2752,6 +2752,8 @@ extern const u32 gBattleAnimSpriteGfx_DragonPulseRing[];
|
|||
extern const u32 gBattleAnimSpritePal_DragonPulseRing[];
|
||||
extern const u32 gBattleAnimSpriteGfx_DreepyMissile[];
|
||||
extern const u32 gBattleAnimSpritePal_DreepyMissile[];
|
||||
extern const u32 gBattleAnimSpriteGfx_DreepyMissileShiny[];
|
||||
extern const u32 gBattleAnimSpritePal_DreepyMissileShiny[];
|
||||
extern const u32 gBattleAnimSpriteGfx_Drill[];
|
||||
extern const u32 gBattleAnimSpritePal_Drill[];
|
||||
extern const u32 gBattleAnimSpriteGfx_NewEmbers[];
|
||||
|
|
|
@ -85,6 +85,7 @@ static void Cmd_stopsound(void);
|
|||
static void Cmd_createvisualtaskontargets(void);
|
||||
static void Cmd_createspriteontargets(void);
|
||||
static void Cmd_createspriteontargets_onpos(void);
|
||||
static void Cmd_createdragondartsprite(void);
|
||||
static void RunAnimScriptCommand(void);
|
||||
static void Task_UpdateMonBg(u8 taskId);
|
||||
static void FlipBattlerBgTiles(void);
|
||||
|
@ -176,6 +177,7 @@ static void (* const sScriptCmdTable[])(void) =
|
|||
Cmd_createvisualtaskontargets, // 0x30
|
||||
Cmd_createspriteontargets, // 0x31
|
||||
Cmd_createspriteontargets_onpos, // 0x32
|
||||
Cmd_createdragondartsprite, // 0x33
|
||||
};
|
||||
|
||||
void ClearBattleAnimationVars(void)
|
||||
|
@ -2133,3 +2135,62 @@ static void Cmd_stopsound(void)
|
|||
m4aMPlayStop(&gMPlayInfo_SE2);
|
||||
sBattleAnimScriptPtr++;
|
||||
}
|
||||
|
||||
static void Cmd_createdragondartsprite(void)
|
||||
{
|
||||
s32 i;
|
||||
struct SpriteTemplate template;
|
||||
u8 argVar;
|
||||
u8 argsCount;
|
||||
s16 subpriority;
|
||||
struct Pokemon *party = GetBattlerParty(gBattleAnimAttacker);
|
||||
|
||||
sBattleAnimScriptPtr++;
|
||||
|
||||
argVar = sBattleAnimScriptPtr[0];
|
||||
sBattleAnimScriptPtr++;
|
||||
argsCount = sBattleAnimScriptPtr[0];
|
||||
sBattleAnimScriptPtr++;
|
||||
|
||||
for (i = 0; i < argsCount; i++)
|
||||
{
|
||||
gBattleAnimArgs[i] = T1_READ_16(sBattleAnimScriptPtr);
|
||||
sBattleAnimScriptPtr += 2;
|
||||
}
|
||||
|
||||
subpriority = GetSubpriorityForMoveAnim(argVar);
|
||||
|
||||
if (GetMonData(&party[gBattlerPartyIndexes[gBattleAnimAttacker]], MON_DATA_SPECIES) == SPECIES_DRAGAPULT)
|
||||
{
|
||||
template.tileTag = ANIM_TAG_DREEPY;
|
||||
if (IsMonShiny(&party[gBattlerPartyIndexes[gBattleAnimAttacker]]) == TRUE)
|
||||
template.paletteTag = ANIM_TAG_DREEPY_SHINY;
|
||||
else
|
||||
template.paletteTag = ANIM_TAG_DREEPY;
|
||||
template.oam = &gOamData_AffineOff_ObjNormal_32x32;
|
||||
if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_OPPONENT)
|
||||
template.anims = gAnims_DreepyMissileOpponent;
|
||||
else
|
||||
template.anims = gAnims_DreepyMissilePlayer;
|
||||
}
|
||||
else
|
||||
{
|
||||
template.tileTag = ANIM_TAG_AIR_WAVE;
|
||||
template.paletteTag = ANIM_TAG_DREEPY;
|
||||
template.oam = &gOamData_AffineOff_ObjNormal_32x16;
|
||||
if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_OPPONENT)
|
||||
template.anims = gAnims_DreepyMissileOpponentNotDrag;
|
||||
else
|
||||
template.anims = gAnims_DreepyMissilePlayer;
|
||||
}
|
||||
|
||||
template.images = NULL;
|
||||
template.affineAnims = gDummySpriteAffineAnimTable;
|
||||
template.callback = AnimShadowBall;
|
||||
|
||||
if (CreateSpriteAndAnimate(&template,
|
||||
GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2),
|
||||
GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET),
|
||||
subpriority) != MAX_SPRITES) // Don't increment the task count if the sprite couldn't be created(i.e. there are too many created sprites atm).
|
||||
gAnimVisualTaskCount++;
|
||||
}
|
||||
|
|
|
@ -42,6 +42,39 @@ const struct SpriteTemplate gOutrageFlameSpriteTemplate =
|
|||
.callback = AnimOutrageFlame,
|
||||
};
|
||||
|
||||
static const union AnimCmd sAnim_DreepyMissileOpponent_0[] =
|
||||
{
|
||||
ANIMCMD_FRAME(0, 0, .hFlip = TRUE),
|
||||
ANIMCMD_END,
|
||||
};
|
||||
|
||||
const union AnimCmd *const gAnims_DreepyMissileOpponent[] =
|
||||
{
|
||||
sAnim_DreepyMissileOpponent_0,
|
||||
};
|
||||
|
||||
static const union AnimCmd sAnim_DreepyMissilePlayer_0[] =
|
||||
{
|
||||
ANIMCMD_FRAME(0, 0),
|
||||
ANIMCMD_END,
|
||||
};
|
||||
|
||||
const union AnimCmd *const gAnims_DreepyMissilePlayer[] =
|
||||
{
|
||||
sAnim_DreepyMissilePlayer_0,
|
||||
};
|
||||
|
||||
static const union AnimCmd sAnim_DreepyMissileNotDrag_0[] =
|
||||
{
|
||||
ANIMCMD_FRAME(0, 0, .hFlip = TRUE, .vFlip = TRUE),
|
||||
ANIMCMD_END,
|
||||
};
|
||||
|
||||
const union AnimCmd *const gAnims_DreepyMissileOpponentNotDrag[] =
|
||||
{
|
||||
sAnim_DreepyMissileNotDrag_0,
|
||||
};
|
||||
|
||||
static const union AnimCmd sAnim_DragonBreathFire_0[] =
|
||||
{
|
||||
ANIMCMD_FRAME(16, 3),
|
||||
|
|
|
@ -3712,12 +3712,42 @@ const struct SpriteTemplate gMagicPowderBluePowderTemplate =
|
|||
};
|
||||
|
||||
//dreepy missile
|
||||
const struct SpriteTemplate gDreepyMissileTemplate =
|
||||
const struct SpriteTemplate gDreepyMissilePlayerTemplate =
|
||||
{
|
||||
.tileTag = ANIM_TAG_DREEPY,
|
||||
.paletteTag = ANIM_TAG_DREEPY,
|
||||
.oam = &gOamData_AffineOff_ObjNormal_32x32,
|
||||
.anims = gDummySpriteAnimTable,
|
||||
.anims = gAnims_DreepyMissilePlayer,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = AnimShadowBall
|
||||
};
|
||||
const struct SpriteTemplate gDreepyMissileOpponentTemplate =
|
||||
{
|
||||
.tileTag = ANIM_TAG_DREEPY,
|
||||
.paletteTag = ANIM_TAG_DREEPY,
|
||||
.oam = &gOamData_AffineOff_ObjNormal_32x32,
|
||||
.anims = gAnims_DreepyMissileOpponent,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = AnimShadowBall
|
||||
};
|
||||
const struct SpriteTemplate gDreepyMissilePlayerShinyTemplate =
|
||||
{
|
||||
.tileTag = ANIM_TAG_DREEPY,
|
||||
.paletteTag = ANIM_TAG_DREEPY_SHINY,
|
||||
.oam = &gOamData_AffineOff_ObjNormal_32x32,
|
||||
.anims = gAnims_DreepyMissilePlayer,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = AnimShadowBall
|
||||
};
|
||||
const struct SpriteTemplate gDreepyMissileOpponentShinyTemplate =
|
||||
{
|
||||
.tileTag = ANIM_TAG_DREEPY,
|
||||
.paletteTag = ANIM_TAG_DREEPY_SHINY,
|
||||
.oam = &gOamData_AffineOff_ObjNormal_32x32,
|
||||
.anims = gAnims_DreepyMissileOpponent,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = AnimShadowBall
|
||||
|
|
|
@ -1456,6 +1456,7 @@ const struct CompressedSpriteSheet gBattleAnimPicTable[] =
|
|||
{gBattleAnimSpriteGfx_SyrupSplat, 0x400, ANIM_TAG_SYRUP_SPLAT_YELLOW},
|
||||
{gBattleAnimSpriteGfx_TeraCrystal, 0x800, ANIM_TAG_TERA_CRYSTAL},
|
||||
{gBattleAnimSpriteGfx_TeraShatter, 0x0180, ANIM_TAG_TERA_SHATTER},
|
||||
{gBattleAnimSpriteGfx_DreepyMissile, 0x200, ANIM_TAG_DREEPY_SHINY},
|
||||
};
|
||||
|
||||
const struct CompressedSpritePalette gBattleAnimPaletteTable[] =
|
||||
|
@ -1913,6 +1914,7 @@ const struct CompressedSpritePalette gBattleAnimPaletteTable[] =
|
|||
{gBattleAnimSpritePal_SyrupYellow, ANIM_TAG_SYRUP_SPLAT_YELLOW},
|
||||
{gBattleAnimSpritePal_TeraCrystal, ANIM_TAG_TERA_CRYSTAL},
|
||||
{gBattleAnimSpritePal_TeraShatter, ANIM_TAG_TERA_SHATTER},
|
||||
{gBattleAnimSpritePal_DreepyMissileShiny, ANIM_TAG_DREEPY_SHINY},
|
||||
};
|
||||
|
||||
const struct BattleAnimBackground gBattleAnimBackgroundTable[] =
|
||||
|
|
|
@ -126,6 +126,8 @@ const u32 gBattleAnimSpritePal_DragonPulseRing[] = INCBIN_U32("graphics/battle_a
|
|||
|
||||
const u32 gBattleAnimSpriteGfx_DreepyMissile[] = INCBIN_U32("graphics/battle_anims/sprites/dreepy_missile.4bpp.lz");
|
||||
const u32 gBattleAnimSpritePal_DreepyMissile[] = INCBIN_U32("graphics/battle_anims/sprites/dreepy_missile.gbapal.lz");
|
||||
const u32 gBattleAnimSpriteGfx_DreepyMissileShiny[] = INCBIN_U32("graphics/battle_anims/sprites/dreepy_missile.4bpp.lz");
|
||||
const u32 gBattleAnimSpritePal_DreepyMissileShiny[] = INCBIN_U32("graphics/battle_anims/sprites/dreepy_missile_shiny.gbapal.lz");
|
||||
|
||||
const u32 gBattleAnimSpriteGfx_Drill[] = INCBIN_U32("graphics/battle_anims/sprites/drill.4bpp.lz");
|
||||
const u32 gBattleAnimSpritePal_Drill[] = INCBIN_U32("graphics/battle_anims/sprites/drill.gbapal.lz");
|
||||
|
|
Loading…
Reference in a new issue