Added 46 move animations
- Magnet Bomb. - Mirror Shot. - Aqua Ring. - Aqua Tail. - Aqua Jet. - Attack Order. - Defend Order. - Heal Order. - Dragon Rush. - Dragon Pulse. - Discharge. - Magnet Rise. - Charge Beam. - Shadow Claw. - Shadow Force. - Ominous Wind. - Lava Plume. - Magma Storm. - Avalanche. - Vacuum Wave. - Force Palm. - Lucky Chant. - Double Hit. - Giga Impact. - Captivate. - Rock Climb. - Last Resort. - Grass Knot. - Wood Hammer. - Zen Headbutt. - Lunar Dance. - Trick Room. - Psycho Cut. - Power Gem. - Stone Edge. - Rock Wrecker. - Head Smash. - Sealth Rock. - Punishment. - Sucker Punch. - Nasty Plot. - Switcheroo. - Earth Power. - Gunk Shot. - Defog. Fix Pyscho Shift Hollow Orb graphics were not being loaded before creating the sprite Fix Gastro Acid anim Fix gastro acid palette asignation. .
19
graphics/battle_anims/backgrounds/giga_impact.pal
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
JASC-PAL
|
||||||
|
0100
|
||||||
|
16
|
||||||
|
0 0 0
|
||||||
|
255 214 0
|
||||||
|
255 197 0
|
||||||
|
255 173 0
|
||||||
|
255 165 0
|
||||||
|
148 90 222
|
||||||
|
255 107 0
|
||||||
|
255 132 0
|
||||||
|
255 148 0
|
||||||
|
255 156 41
|
||||||
|
0 0 0
|
||||||
|
0 90 0
|
||||||
|
0 0 0
|
||||||
|
0 0 0
|
||||||
|
0 0 0
|
||||||
|
0 0 0
|
19
graphics/battle_anims/backgrounds/magma_storm.pal
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
JASC-PAL
|
||||||
|
0100
|
||||||
|
16
|
||||||
|
0 0 0
|
||||||
|
255 214 0
|
||||||
|
255 197 0
|
||||||
|
255 173 0
|
||||||
|
255 165 0
|
||||||
|
148 90 222
|
||||||
|
255 107 0
|
||||||
|
255 132 0
|
||||||
|
255 148 0
|
||||||
|
255 156 41
|
||||||
|
0 0 0
|
||||||
|
0 90 0
|
||||||
|
0 0 0
|
||||||
|
0 0 0
|
||||||
|
0 0 0
|
||||||
|
0 0 0
|
BIN
graphics/battle_anims/backgrounds/rock_wrecker.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
graphics/battle_anims/backgrounds/rock_wrecker_map.bin
Normal file
BIN
graphics/battle_anims/backgrounds/trick_room.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
graphics/battle_anims/backgrounds/trick_room_map.bin
Normal file
BIN
graphics/battle_anims/sprites/attack_order.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
graphics/battle_anims/sprites/dragon_pulse.png
Normal file
After Width: | Height: | Size: 930 B |
BIN
graphics/battle_anims/sprites/poison_jab.png
Normal file
After Width: | Height: | Size: 912 B |
BIN
graphics/battle_anims/sprites/power_gem.png
Normal file
After Width: | Height: | Size: 905 B |
BIN
graphics/battle_anims/sprites/psycho_cut.png
Normal file
After Width: | Height: | Size: 922 B |
BIN
graphics/battle_anims/sprites/stealth_rock.png
Normal file
After Width: | Height: | Size: 926 B |
BIN
graphics/battle_anims/sprites/stone_edge.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
graphics/battle_anims/sprites/wood_hammer.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
@ -312,6 +312,15 @@
|
|||||||
#define ANIM_TAG_COLORED_ORBS (ANIM_SPRITES_START + 302)
|
#define ANIM_TAG_COLORED_ORBS (ANIM_SPRITES_START + 302)
|
||||||
#define ANIM_TAG_WORRY_SEED (ANIM_SPRITES_START + 303)
|
#define ANIM_TAG_WORRY_SEED (ANIM_SPRITES_START + 303)
|
||||||
#define ANIM_TAG_SMALL_CLOUD (ANIM_SPRITES_START + 304)
|
#define ANIM_TAG_SMALL_CLOUD (ANIM_SPRITES_START + 304)
|
||||||
|
#define ANIM_TAG_ATTACK_ORDER (ANIM_SPRITES_START + 305)
|
||||||
|
#define ANIM_TAG_DRAGON_PULSE (ANIM_SPRITES_START + 306)
|
||||||
|
#define ANIM_TAG_WOOD_HAMMER (ANIM_SPRITES_START + 307)
|
||||||
|
#define ANIM_TAG_PSYCHO_CUT (ANIM_SPRITES_START + 308)
|
||||||
|
#define ANIM_TAG_POWER_GEM (ANIM_SPRITES_START + 309)
|
||||||
|
#define ANIM_TAG_STONE_EDGE (ANIM_SPRITES_START + 310)
|
||||||
|
#define ANIM_TAG_STEALTH_ROCK (ANIM_SPRITES_START + 311)
|
||||||
|
#define ANIM_TAG_POISON_JAB (ANIM_SPRITES_START + 312)
|
||||||
|
#define ANIM_TAG_GREEN_POISON_BUBBLE (ANIM_SPRITES_START + 313)
|
||||||
|
|
||||||
// battlers
|
// battlers
|
||||||
#define ANIM_ATTACKER 0
|
#define ANIM_ATTACKER 0
|
||||||
@ -361,6 +370,12 @@
|
|||||||
#define BG_SOLARBEAM_OPPONENT 24
|
#define BG_SOLARBEAM_OPPONENT 24
|
||||||
#define BG_SOLARBEAM_PLAYER 25
|
#define BG_SOLARBEAM_PLAYER 25
|
||||||
#define BG_SOLARBEAM_CONTESTS 26
|
#define BG_SOLARBEAM_CONTESTS 26
|
||||||
|
#define BG_MAGMA_STORM 27
|
||||||
|
#define BG_GIGA_IMPACT_OPPONENT 28
|
||||||
|
#define BG_GIGA_IMPACT_PLAYER 29
|
||||||
|
#define BG_GIGA_IMPACT_CONTEST 30
|
||||||
|
#define BG_TRICK_ROOM 31
|
||||||
|
#define BG_ROCK_WRECKER 32
|
||||||
|
|
||||||
// table ids for general animations
|
// table ids for general animations
|
||||||
#define B_ANIM_CASTFORM_CHANGE 0x0
|
#define B_ANIM_CASTFORM_CHANGE 0x0
|
||||||
|
@ -4418,6 +4418,14 @@ extern const u32 gBattleAnimSpriteGfx_WringOut[];
|
|||||||
extern const u32 gBattleAnimSpriteGfx_ColoredOrbs[];
|
extern const u32 gBattleAnimSpriteGfx_ColoredOrbs[];
|
||||||
extern const u32 gBattleAnimSpriteGfx_WorrySeed[];
|
extern const u32 gBattleAnimSpriteGfx_WorrySeed[];
|
||||||
extern const u32 gBattleAnimSpriteGfx_SmallCloud[];
|
extern const u32 gBattleAnimSpriteGfx_SmallCloud[];
|
||||||
|
extern const u32 gBattleAnimSpriteGfx_AttackOrder[];
|
||||||
|
extern const u32 gBattleAnimSpriteGfx_DragonPulse[];
|
||||||
|
extern const u32 gBattleAnimSpriteGfx_WoodHammer[];
|
||||||
|
extern const u32 gBattleAnimSpriteGfx_PsychoCut[];
|
||||||
|
extern const u32 gBattleAnimSpriteGfx_PowerGem[];
|
||||||
|
extern const u32 gBattleAnimSpriteGfx_StoneEdge[];
|
||||||
|
extern const u32 gBattleAnimSpriteGfx_StealthRock[];
|
||||||
|
extern const u32 gBattleAnimSpriteGfx_PoisonJab[];
|
||||||
|
|
||||||
extern const u32 gBattleAnimSpritePal_Bone[];
|
extern const u32 gBattleAnimSpritePal_Bone[];
|
||||||
extern const u32 gBattleAnimSpritePal_Spark[];
|
extern const u32 gBattleAnimSpritePal_Spark[];
|
||||||
@ -4710,6 +4718,14 @@ extern const u32 gBattleAnimSpritePal_WringOut[];
|
|||||||
extern const u32 gBattleAnimSpritePal_ColoredOrbs[];
|
extern const u32 gBattleAnimSpritePal_ColoredOrbs[];
|
||||||
extern const u32 gBattleAnimSpritePal_WorrySeed[];
|
extern const u32 gBattleAnimSpritePal_WorrySeed[];
|
||||||
extern const u32 gBattleAnimSpritePal_SmallCloud[];
|
extern const u32 gBattleAnimSpritePal_SmallCloud[];
|
||||||
|
extern const u32 gBattleAnimSpritePal_AttackOrder[];
|
||||||
|
extern const u32 gBattleAnimSpritePal_DragonPulse[];
|
||||||
|
extern const u32 gBattleAnimSpritePal_WoodHammer[];
|
||||||
|
extern const u32 gBattleAnimSpritePal_PsychoCut[];
|
||||||
|
extern const u32 gBattleAnimSpritePal_PowerGem[];
|
||||||
|
extern const u32 gBattleAnimSpritePal_StoneEdge[];
|
||||||
|
extern const u32 gBattleAnimSpritePal_StealthRock[];
|
||||||
|
extern const u32 gBattleAnimSpritePal_PoisonJab[];
|
||||||
|
|
||||||
extern const u32 gBattleAnimBgImage_Dark[];
|
extern const u32 gBattleAnimBgImage_Dark[];
|
||||||
extern const u32 gBattleAnimBgImage_Ghost[];
|
extern const u32 gBattleAnimBgImage_Ghost[];
|
||||||
@ -4724,6 +4740,8 @@ extern const u32 gBattleAnimBgImage_Cosmic[];
|
|||||||
extern const u32 gBattleAnimBgImage_InAir[];
|
extern const u32 gBattleAnimBgImage_InAir[];
|
||||||
extern const u32 gBattleAnimBgImage_Aurora[];
|
extern const u32 gBattleAnimBgImage_Aurora[];
|
||||||
extern const u32 gBattleAnimBgImage_Fissure[];
|
extern const u32 gBattleAnimBgImage_Fissure[];
|
||||||
|
extern const u32 gBattleAnimBgImage_TrickRoom[];
|
||||||
|
extern const u32 gBattleAnimBgImage_RockWrecker[];
|
||||||
extern const u32 gBattleAnimBgPalette_Dark[];
|
extern const u32 gBattleAnimBgPalette_Dark[];
|
||||||
extern const u32 gBattleAnimBgPalette_Ghost[];
|
extern const u32 gBattleAnimBgPalette_Ghost[];
|
||||||
extern const u32 gBattleAnimBgPalette_Psychic[];
|
extern const u32 gBattleAnimBgPalette_Psychic[];
|
||||||
@ -4740,6 +4758,10 @@ extern const u32 gBattleAnimBgPalette_Aurora[];
|
|||||||
extern const u32 gBattleAnimBgPalette_Fissure[];
|
extern const u32 gBattleAnimBgPalette_Fissure[];
|
||||||
extern const u32 gBattleAnimBgPalette_Bug[];
|
extern const u32 gBattleAnimBgPalette_Bug[];
|
||||||
extern const u32 gBattleAnimBgPalette_Solarbeam[];
|
extern const u32 gBattleAnimBgPalette_Solarbeam[];
|
||||||
|
extern const u32 gBattleAnimBgPalette_MagmaStorm[];
|
||||||
|
extern const u32 gBattleAnimBgPalette_GigaImpact[];
|
||||||
|
extern const u32 gBattleAnimBgPalette_TrickRoom[];
|
||||||
|
extern const u32 gBattleAnimBgPalette_RockWrecker[];
|
||||||
extern const u32 gBattleAnimBgTilemap_Dark[];
|
extern const u32 gBattleAnimBgTilemap_Dark[];
|
||||||
extern const u32 gBattleAnimBgTilemap_Ghost[];
|
extern const u32 gBattleAnimBgTilemap_Ghost[];
|
||||||
extern const u32 gBattleAnimBgTilemap_Psychic[];
|
extern const u32 gBattleAnimBgTilemap_Psychic[];
|
||||||
@ -4750,6 +4772,8 @@ extern const u32 gBattleAnimBgTilemap_Drill[];
|
|||||||
extern const u32 gBattleAnimBgTilemap_DrillContests[];
|
extern const u32 gBattleAnimBgTilemap_DrillContests[];
|
||||||
extern const u32 gBattleAnimBgTilemap_HighspeedOpponent[];
|
extern const u32 gBattleAnimBgTilemap_HighspeedOpponent[];
|
||||||
extern const u32 gBattleAnimBgTilemap_HighspeedPlayer[];
|
extern const u32 gBattleAnimBgTilemap_HighspeedPlayer[];
|
||||||
|
extern const u32 gBattleAnimBgTilemap_TrickRoom[];
|
||||||
|
extern const u32 gBattleAnimBgTilemap_RockWrecker[];
|
||||||
extern const u32 gUnknown_08C2A634[];
|
extern const u32 gUnknown_08C2A634[];
|
||||||
extern const u32 gUnknown_08C2A6D4[];
|
extern const u32 gUnknown_08C2A6D4[];
|
||||||
extern const u32 gUnknown_08C2A6EC[];
|
extern const u32 gUnknown_08C2A6EC[];
|
||||||
|
@ -1430,6 +1430,15 @@ const struct CompressedSpriteSheet gBattleAnimPicTable[] =
|
|||||||
{gBattleAnimSpriteGfx_ColoredOrbs, 0x0300, ANIM_TAG_COLORED_ORBS},
|
{gBattleAnimSpriteGfx_ColoredOrbs, 0x0300, ANIM_TAG_COLORED_ORBS},
|
||||||
{gBattleAnimSpriteGfx_WorrySeed, 0x0080, ANIM_TAG_WORRY_SEED},
|
{gBattleAnimSpriteGfx_WorrySeed, 0x0080, ANIM_TAG_WORRY_SEED},
|
||||||
{gBattleAnimSpriteGfx_SmallCloud, 0x0080, ANIM_TAG_SMALL_CLOUD},
|
{gBattleAnimSpriteGfx_SmallCloud, 0x0080, ANIM_TAG_SMALL_CLOUD},
|
||||||
|
{gBattleAnimSpriteGfx_AttackOrder, 0x0480, ANIM_TAG_ATTACK_ORDER},
|
||||||
|
{gBattleAnimSpriteGfx_DragonPulse, 0x0100, ANIM_TAG_DRAGON_PULSE},
|
||||||
|
{gBattleAnimSpriteGfx_WoodHammer, 0x0C00, ANIM_TAG_WOOD_HAMMER},
|
||||||
|
{gBattleAnimSpriteGfx_PsychoCut, 0x0200, ANIM_TAG_PSYCHO_CUT},
|
||||||
|
{gBattleAnimSpriteGfx_PowerGem, 0x0080, ANIM_TAG_POWER_GEM},
|
||||||
|
{gBattleAnimSpriteGfx_StoneEdge, 0x0A00, ANIM_TAG_STONE_EDGE},
|
||||||
|
{gBattleAnimSpriteGfx_StealthRock, 0x0080, ANIM_TAG_STEALTH_ROCK},
|
||||||
|
{gBattleAnimSpriteGfx_PoisonJab, 0x0080, ANIM_TAG_POISON_JAB},
|
||||||
|
{gBattleAnimSpriteGfx_PoisonBubble, 0x0180, ANIM_TAG_GREEN_POISON_BUBBLE},
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct CompressedSpritePalette gBattleAnimPaletteTable[] =
|
const struct CompressedSpritePalette gBattleAnimPaletteTable[] =
|
||||||
@ -1739,6 +1748,15 @@ const struct CompressedSpritePalette gBattleAnimPaletteTable[] =
|
|||||||
{gBattleAnimSpritePal_ColoredOrbs, ANIM_TAG_COLORED_ORBS},
|
{gBattleAnimSpritePal_ColoredOrbs, ANIM_TAG_COLORED_ORBS},
|
||||||
{gBattleAnimSpritePal_WorrySeed, ANIM_TAG_WORRY_SEED},
|
{gBattleAnimSpritePal_WorrySeed, ANIM_TAG_WORRY_SEED},
|
||||||
{gBattleAnimSpritePal_SmallCloud, ANIM_TAG_SMALL_CLOUD},
|
{gBattleAnimSpritePal_SmallCloud, ANIM_TAG_SMALL_CLOUD},
|
||||||
|
{gBattleAnimSpritePal_AttackOrder, ANIM_TAG_ATTACK_ORDER},
|
||||||
|
{gBattleAnimSpritePal_DragonPulse, ANIM_TAG_DRAGON_PULSE},
|
||||||
|
{gBattleAnimSpritePal_WoodHammer, ANIM_TAG_WOOD_HAMMER},
|
||||||
|
{gBattleAnimSpritePal_PsychoCut, ANIM_TAG_PSYCHO_CUT},
|
||||||
|
{gBattleAnimSpritePal_PowerGem, ANIM_TAG_POWER_GEM},
|
||||||
|
{gBattleAnimSpritePal_StoneEdge, ANIM_TAG_STONE_EDGE},
|
||||||
|
{gBattleAnimSpritePal_StealthRock, ANIM_TAG_STEALTH_ROCK},
|
||||||
|
{gBattleAnimSpritePal_PoisonJab, ANIM_TAG_POISON_JAB},
|
||||||
|
{gBattleAnimSpritePal_Vine, ANIM_TAG_GREEN_POISON_BUBBLE},
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct BattleAnimBackground gBattleAnimBackgroundTable[] =
|
const struct BattleAnimBackground gBattleAnimBackgroundTable[] =
|
||||||
@ -1770,6 +1788,12 @@ const struct BattleAnimBackground gBattleAnimBackgroundTable[] =
|
|||||||
[BG_SOLARBEAM_OPPONENT] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_Solarbeam, gBattleAnimBgTilemap_ImpactOpponent},
|
[BG_SOLARBEAM_OPPONENT] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_Solarbeam, gBattleAnimBgTilemap_ImpactOpponent},
|
||||||
[BG_SOLARBEAM_PLAYER] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_Solarbeam, gBattleAnimBgTilemap_ImpactPlayer},
|
[BG_SOLARBEAM_PLAYER] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_Solarbeam, gBattleAnimBgTilemap_ImpactPlayer},
|
||||||
[BG_SOLARBEAM_CONTESTS] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_Solarbeam, gBattleAnimBgTilemap_ImpactContests},
|
[BG_SOLARBEAM_CONTESTS] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_Solarbeam, gBattleAnimBgTilemap_ImpactContests},
|
||||||
|
[BG_MAGMA_STORM] = {gBattleAnimBgImage_InAir, gBattleAnimBgPalette_MagmaStorm, gBattleAnimBgTilemap_InAir},
|
||||||
|
[BG_GIGA_IMPACT_OPPONENT] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_GigaImpact, gBattleAnimBgTilemap_ImpactOpponent},
|
||||||
|
[BG_GIGA_IMPACT_PLAYER] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_GigaImpact, gBattleAnimBgTilemap_ImpactPlayer},
|
||||||
|
[BG_GIGA_IMPACT_CONTEST] = {gBattleAnimBgImage_Impact, gBattleAnimBgPalette_GigaImpact, gBattleAnimBgTilemap_ImpactContests},
|
||||||
|
[BG_TRICK_ROOM] = {gBattleAnimBgImage_TrickRoom, gBattleAnimBgPalette_TrickRoom, gBattleAnimBgTilemap_TrickRoom},
|
||||||
|
[BG_ROCK_WRECKER] = {gBattleAnimBgImage_RockWrecker, gBattleAnimBgPalette_RockWrecker, gBattleAnimBgTilemap_RockWrecker},
|
||||||
};
|
};
|
||||||
|
|
||||||
static void (* const sScriptCmdTable[])(void) =
|
static void (* const sScriptCmdTable[])(void) =
|
||||||
|
@ -162,6 +162,10 @@ static void AnimMoveAccupressure(struct Sprite* sprite);
|
|||||||
static void AnimMoveWringOut(struct Sprite* sprite);
|
static void AnimMoveWringOut(struct Sprite* sprite);
|
||||||
static void AnimMoveWorrySeed(struct Sprite* sprite);
|
static void AnimMoveWorrySeed(struct Sprite* sprite);
|
||||||
static void AnimMoveSmallCloud(struct Sprite* sprite);
|
static void AnimMoveSmallCloud(struct Sprite* sprite);
|
||||||
|
static void AnimGrassKnotStep(struct Sprite *sprite);
|
||||||
|
void AnimGrassKnot(struct Sprite *sprite);
|
||||||
|
void AnimWoodHammerSmall(struct Sprite *sprite);
|
||||||
|
void AnimWoodHammerBig(struct Sprite *sprite);
|
||||||
|
|
||||||
const union AnimCmd gUnknown_085920F0[] =
|
const union AnimCmd gUnknown_085920F0[] =
|
||||||
{
|
{
|
||||||
@ -793,6 +797,17 @@ const struct SpriteTemplate gTwisterLeafParticleSpriteTemplate =
|
|||||||
.callback = AnimMoveTwisterParticle,
|
.callback = AnimMoveTwisterParticle,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const struct SpriteTemplate gAttackOrderParticleSpriteTemplate =
|
||||||
|
{
|
||||||
|
.tileTag = ANIM_TAG_ATTACK_ORDER,
|
||||||
|
.paletteTag = ANIM_TAG_ATTACK_ORDER,
|
||||||
|
.oam = &gUnknown_0852490C,
|
||||||
|
.anims = gUnknown_08592388,
|
||||||
|
.images = NULL,
|
||||||
|
.affineAnims = gDummySpriteAffineAnimTable,
|
||||||
|
.callback = AnimMoveTwisterParticle,
|
||||||
|
};
|
||||||
|
|
||||||
const union AnimCmd gUnknown_085923C0[] =
|
const union AnimCmd gUnknown_085923C0[] =
|
||||||
{
|
{
|
||||||
ANIMCMD_FRAME(0, 3),
|
ANIMCMD_FRAME(0, 3),
|
||||||
@ -2699,6 +2714,194 @@ const struct SpriteTemplate gNightSlashRightSpriteTemplate =
|
|||||||
.callback = AnimNightSlash,
|
.callback = AnimNightSlash,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const struct SpriteTemplate gLuckyChantBigStarsSpriteTemplate =
|
||||||
|
{
|
||||||
|
.tileTag = ANIM_TAG_GOLD_STARS,
|
||||||
|
.paletteTag = ANIM_TAG_GOLD_STARS,
|
||||||
|
.oam = &gUnknown_0852490C,
|
||||||
|
.anims = gUnknown_08592314,
|
||||||
|
.images = NULL,
|
||||||
|
.affineAnims = gDummySpriteAffineAnimTable,
|
||||||
|
.callback = AnimPetalDanceBigFlower,
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct SpriteTemplate gLuckyChantSmallStarsSpriteTemplate =
|
||||||
|
{
|
||||||
|
.tileTag = ANIM_TAG_GOLD_STARS,
|
||||||
|
.paletteTag = ANIM_TAG_GOLD_STARS,
|
||||||
|
.oam = &gUnknown_08524904,
|
||||||
|
.anims = gUnknown_08592318,
|
||||||
|
.images = NULL,
|
||||||
|
.affineAnims = gDummySpriteAffineAnimTable,
|
||||||
|
.callback = AnimPetalDanceSmallFlower,
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AnimCmd gWoodHammerBigAnimCmd_1[] =
|
||||||
|
{
|
||||||
|
ANIMCMD_FRAME(0, 1),
|
||||||
|
ANIMCMD_END,
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AnimCmd gWoodHammerBigAnimCmd_2[] =
|
||||||
|
{
|
||||||
|
ANIMCMD_FRAME(16, 1),
|
||||||
|
ANIMCMD_END,
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AnimCmd *const gWoodHammerBigAnims[] =
|
||||||
|
{
|
||||||
|
gWoodHammerBigAnimCmd_1,
|
||||||
|
gWoodHammerBigAnimCmd_2,
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AffineAnimCmd gWoodHammerBigAffineAnimCmd_1[] =
|
||||||
|
{
|
||||||
|
AFFINEANIMCMD_FRAME(0x0, 0x0, -5, 5),
|
||||||
|
AFFINEANIMCMD_JUMP(0),
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AffineAnimCmd gWoodHammerBigAffineAnimCmd_2[] =
|
||||||
|
{
|
||||||
|
AFFINEANIMCMD_FRAME(0x0, 0x0, 5, 5),
|
||||||
|
AFFINEANIMCMD_JUMP(0),
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AffineAnimCmd *const gWoodHammerBigAffineAnims[] =
|
||||||
|
{
|
||||||
|
gWoodHammerBigAffineAnimCmd_1,
|
||||||
|
gWoodHammerBigAffineAnimCmd_2,
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AnimCmd gWoodHammerSmallAnimCmd_1[] =
|
||||||
|
{
|
||||||
|
ANIMCMD_FRAME(32, 1),
|
||||||
|
ANIMCMD_END,
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AnimCmd gWoodHammerSmallAnimCmd_2[] =
|
||||||
|
{
|
||||||
|
ANIMCMD_FRAME(48, 1),
|
||||||
|
ANIMCMD_END,
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AnimCmd gWoodHammerSmallAnimCmd_3[] =
|
||||||
|
{
|
||||||
|
ANIMCMD_FRAME(64, 1),
|
||||||
|
ANIMCMD_END,
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AnimCmd *const gWoodHammerSmallAnims[] =
|
||||||
|
{
|
||||||
|
gWoodHammerSmallAnimCmd_1,
|
||||||
|
gWoodHammerSmallAnimCmd_2,
|
||||||
|
gWoodHammerSmallAnimCmd_3,
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct SpriteTemplate gGrassKnotSpriteTemplate =
|
||||||
|
{
|
||||||
|
.tileTag = ANIM_TAG_RAZOR_LEAF,
|
||||||
|
.paletteTag = ANIM_TAG_RAZOR_LEAF,
|
||||||
|
.oam = &gUnknown_08524934,
|
||||||
|
.anims = gUnknown_085923D4,
|
||||||
|
.images = NULL,
|
||||||
|
.affineAnims = gDummySpriteAffineAnimTable,
|
||||||
|
.callback = AnimGrassKnot,
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct SpriteTemplate gWoodHammerBigSpriteTemplate =
|
||||||
|
{
|
||||||
|
.tileTag = ANIM_TAG_WOOD_HAMMER,
|
||||||
|
.paletteTag = ANIM_TAG_WOOD_HAMMER,
|
||||||
|
.oam = &gUnknown_08524974,
|
||||||
|
.anims = gWoodHammerBigAnims,
|
||||||
|
.images = NULL,
|
||||||
|
.affineAnims = gWoodHammerBigAffineAnims,
|
||||||
|
.callback = AnimWoodHammerBig,
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct SpriteTemplate gWoodHammerSmallSpriteTemplate =
|
||||||
|
{
|
||||||
|
.tileTag = ANIM_TAG_WOOD_HAMMER,
|
||||||
|
.paletteTag = ANIM_TAG_WOOD_HAMMER,
|
||||||
|
.oam = &gUnknown_08524914,
|
||||||
|
.anims = gWoodHammerSmallAnims,
|
||||||
|
.images = NULL,
|
||||||
|
.affineAnims = gDummySpriteAffineAnimTable,
|
||||||
|
.callback = AnimWoodHammerSmall,
|
||||||
|
};
|
||||||
|
|
||||||
|
void AnimGrassKnot(struct Sprite *sprite)
|
||||||
|
{
|
||||||
|
if (BATTLE_PARTNER(gBattleAnimAttacker) == gBattleAnimTarget && GetBattlerPosition(gBattleAnimTarget) < B_POSITION_PLAYER_RIGHT)
|
||||||
|
gBattleAnimArgs[0] *= -1;
|
||||||
|
|
||||||
|
InitSpritePosToAnimTarget(sprite, TRUE);
|
||||||
|
|
||||||
|
if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
|
||||||
|
gBattleAnimArgs[2] = -gBattleAnimArgs[2];
|
||||||
|
|
||||||
|
sprite->data[0] = gBattleAnimArgs[3];
|
||||||
|
sprite->data[1] = sprite->pos1.x;
|
||||||
|
sprite->data[2] = sprite->pos1.x + gBattleAnimArgs[2];
|
||||||
|
sprite->data[3] = sprite->pos1.y;
|
||||||
|
sprite->data[4] = sprite->pos1.y;
|
||||||
|
|
||||||
|
InitAnimLinearTranslation(sprite);
|
||||||
|
|
||||||
|
sprite->data[5] = gBattleAnimArgs[5];
|
||||||
|
sprite->data[6] = gBattleAnimArgs[4];
|
||||||
|
sprite->data[7] = 0;
|
||||||
|
|
||||||
|
sprite->callback = AnimGrassKnotStep;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void AnimGrassKnotStep(struct Sprite *sprite)
|
||||||
|
{
|
||||||
|
if (!AnimTranslateLinear(sprite))
|
||||||
|
{
|
||||||
|
sprite->pos2.y += Sin(sprite->data[7] >> 8, sprite->data[5]);
|
||||||
|
sprite->data[7] += sprite->data[6];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DestroyAnimSprite(sprite);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void AnimWoodHammerBig(struct Sprite *sprite)
|
||||||
|
{
|
||||||
|
if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_OPPONENT)
|
||||||
|
StartSpriteAffineAnim(sprite, 1);
|
||||||
|
|
||||||
|
TranslateAnimSpriteToTargetMonLocation(sprite);
|
||||||
|
}
|
||||||
|
|
||||||
|
void AnimWoodHammerSmall(struct Sprite *sprite)
|
||||||
|
{
|
||||||
|
StartSpriteAnim(sprite, gBattleAnimArgs[5]);
|
||||||
|
AnimateSprite(sprite);
|
||||||
|
|
||||||
|
if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
|
||||||
|
sprite->pos1.x -= gBattleAnimArgs[0];
|
||||||
|
else
|
||||||
|
sprite->pos1.x += gBattleAnimArgs[0];
|
||||||
|
|
||||||
|
sprite->pos1.y += gBattleAnimArgs[1];
|
||||||
|
|
||||||
|
sprite->data[0] = gBattleAnimArgs[4];
|
||||||
|
sprite->data[1] = sprite->pos1.x;
|
||||||
|
sprite->data[2] = sprite->pos1.x + gBattleAnimArgs[2];
|
||||||
|
sprite->data[3] = sprite->pos1.y;
|
||||||
|
sprite->data[4] = sprite->pos1.y + gBattleAnimArgs[3];
|
||||||
|
|
||||||
|
InitSpriteDataForLinearTranslation(sprite);
|
||||||
|
sprite->data[3] = 0;
|
||||||
|
sprite->data[4] = 0;
|
||||||
|
|
||||||
|
sprite->callback = TranslateSpriteLinearFixedPoint;
|
||||||
|
StoreSpriteCallbackInData6(sprite, DestroySpriteAndMatrix);
|
||||||
|
}
|
||||||
|
|
||||||
// Animates the falling particles that horizontally wave back and forth.
|
// Animates the falling particles that horizontally wave back and forth.
|
||||||
// Used by Sleep Powder, Stun Spore, and Poison Powder.
|
// Used by Sleep Powder, Stun Spore, and Poison Powder.
|
||||||
// arg 0: initial x pixel offset
|
// arg 0: initial x pixel offset
|
||||||
|
@ -4708,6 +4708,17 @@ static void AnimForesightMagnifyingGlassStep(struct Sprite *sprite)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const struct SpriteTemplate gDracoMeteorSmashSpriteTemplate =
|
||||||
|
{
|
||||||
|
.tileTag = ANIM_TAG_WARM_ROCK,
|
||||||
|
.paletteTag = ANIM_TAG_WARM_ROCK,
|
||||||
|
.oam = &gUnknown_08524914,//&gUnknown_0852490C,
|
||||||
|
.anims = gDummySpriteAnimTable,
|
||||||
|
.images = NULL,
|
||||||
|
.affineAnims = gDummySpriteAffineAnimTable,
|
||||||
|
.callback = AnimMeteorMashStar,
|
||||||
|
};
|
||||||
|
|
||||||
static void AnimMeteorMashStarStep(struct Sprite *sprite)
|
static void AnimMeteorMashStarStep(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
sprite->pos2.x = ((sprite->data[2] - sprite->data[0]) * sprite->data[5]) / sprite->data[4];
|
sprite->pos2.x = ((sprite->data[2] - sprite->data[0]) * sprite->data[5]) / sprite->data[4];
|
||||||
|
85
src/dark.c
@ -24,6 +24,7 @@ static void sub_81140C8(u8);
|
|||||||
static void sub_8114244(struct Task *);
|
static void sub_8114244(struct Task *);
|
||||||
static void sub_8114374(u8);
|
static void sub_8114374(u8);
|
||||||
static void sub_8114748(u8);
|
static void sub_8114748(u8);
|
||||||
|
void AnimPunishment(struct Sprite *sprite);
|
||||||
|
|
||||||
const struct SpriteTemplate gUnknown_08596FC8 =
|
const struct SpriteTemplate gUnknown_08596FC8 =
|
||||||
{
|
{
|
||||||
@ -186,6 +187,90 @@ const struct SpriteTemplate gBattleAnimSpriteTemplate_8597138 =
|
|||||||
.callback = sub_81144BC,
|
.callback = sub_81144BC,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const union AffineAnimCmd gPunishmentImpactAffineAnimCmd_1[] =
|
||||||
|
{
|
||||||
|
AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 8),
|
||||||
|
AFFINEANIMCMD_END,
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AffineAnimCmd gPunishmentImpactAffineAnimCmd_2[] =
|
||||||
|
{
|
||||||
|
AFFINEANIMCMD_FRAME(0xD8, 0xD8, 0, 0),
|
||||||
|
AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 8),
|
||||||
|
AFFINEANIMCMD_END,
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AffineAnimCmd gPunishmentImpactAffineAnimCmd_3[] =
|
||||||
|
{
|
||||||
|
AFFINEANIMCMD_FRAME(0xB0, 0xB0, 0, 0),
|
||||||
|
AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 8),
|
||||||
|
AFFINEANIMCMD_END,
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AffineAnimCmd gPunishmentImpactAffineAnimCmd_4[] =
|
||||||
|
{
|
||||||
|
AFFINEANIMCMD_FRAME(0x80, 0x80, 0, 0),
|
||||||
|
AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 8),
|
||||||
|
AFFINEANIMCMD_END,
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AffineAnimCmd *const gPunishmentImpactAffineAnim[] =
|
||||||
|
{
|
||||||
|
gPunishmentImpactAffineAnimCmd_1,
|
||||||
|
gPunishmentImpactAffineAnimCmd_2,
|
||||||
|
gPunishmentImpactAffineAnimCmd_3,
|
||||||
|
gPunishmentImpactAffineAnimCmd_4,
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AnimCmd gPunishmentAnimCmd[] =
|
||||||
|
{
|
||||||
|
ANIMCMD_FRAME(0, 4),
|
||||||
|
ANIMCMD_FRAME(16, 4),
|
||||||
|
ANIMCMD_FRAME(32, 4),
|
||||||
|
ANIMCMD_FRAME(48, 4),
|
||||||
|
ANIMCMD_FRAME(64, 4),
|
||||||
|
ANIMCMD_END,
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AnimCmd *const gPunishmentAnim[] =
|
||||||
|
{
|
||||||
|
gPunishmentAnimCmd,
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct SpriteTemplate gPunishmentSpriteTemplate =
|
||||||
|
{
|
||||||
|
.tileTag = ANIM_TAG_SCRATCH,
|
||||||
|
.paletteTag = ANIM_TAG_POISON_BUBBLE,
|
||||||
|
.oam = &gUnknown_08524974,
|
||||||
|
.anims = gPunishmentAnim,
|
||||||
|
.images = NULL,
|
||||||
|
.affineAnims = gDummySpriteAffineAnimTable,
|
||||||
|
.callback = sub_80A77C8,
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct SpriteTemplate gPunishmentImpactSpriteTemplate =
|
||||||
|
{
|
||||||
|
.tileTag = ANIM_TAG_IMPACT,
|
||||||
|
.paletteTag = ANIM_TAG_POISON_BUBBLE,
|
||||||
|
.oam = &gUnknown_08524974,//gUnknown_08524A94,
|
||||||
|
.anims = gDummySpriteAnimTable,
|
||||||
|
.images = NULL,
|
||||||
|
.affineAnims = gPunishmentImpactAffineAnim,
|
||||||
|
.callback = AnimPunishment,
|
||||||
|
};
|
||||||
|
|
||||||
|
void AnimPunishment(struct Sprite *sprite)
|
||||||
|
{
|
||||||
|
StartSpriteAffineAnim(sprite, gBattleAnimArgs[3]);
|
||||||
|
if (gBattleAnimArgs[2] == 0)
|
||||||
|
InitSpritePosToAnimAttacker(sprite, 1);
|
||||||
|
else
|
||||||
|
InitSpritePosToAnimTarget(sprite, TRUE);
|
||||||
|
|
||||||
|
sprite->callback = RunStoredCallbackWhenAffineAnimEnds;
|
||||||
|
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
||||||
|
}
|
||||||
|
|
||||||
void sub_81136E8(u8 taskId)
|
void sub_81136E8(u8 taskId)
|
||||||
{
|
{
|
||||||
int battler;
|
int battler;
|
||||||
|
133
src/dragon.c
@ -14,6 +14,9 @@ static void sub_81132E0(struct Sprite *);
|
|||||||
static void sub_81134B8(u8);
|
static void sub_81134B8(u8);
|
||||||
static void sub_8113574(struct Task *);
|
static void sub_8113574(struct Task *);
|
||||||
static void sub_811369C(struct Sprite *);
|
static void sub_811369C(struct Sprite *);
|
||||||
|
static void AnimDragonRushStep(struct Sprite *sprite);
|
||||||
|
void AnimSpinningDracoMeteor(struct Sprite *sprite);
|
||||||
|
static void AnimSpinningDracoMeteorFinish(struct Sprite *sprite);
|
||||||
|
|
||||||
EWRAM_DATA static u16 gUnknown_0203A100[7] = {0};
|
EWRAM_DATA static u16 gUnknown_0203A100[7] = {0};
|
||||||
|
|
||||||
@ -187,6 +190,136 @@ const struct SpriteTemplate gUnknown_08596FB0 =
|
|||||||
.callback = sub_81135EC,
|
.callback = sub_81135EC,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const union AnimCmd gDragonRushAnimCmds[] =
|
||||||
|
{
|
||||||
|
ANIMCMD_FRAME(0, 4),
|
||||||
|
ANIMCMD_FRAME(64, 4),
|
||||||
|
ANIMCMD_END,
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AnimCmd *const gDragonRushAnimTable[] =
|
||||||
|
{
|
||||||
|
gDragonRushAnimCmds,
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AffineAnimCmd gDragonRushAffineanimCmds1[] =
|
||||||
|
{
|
||||||
|
AFFINEANIMCMD_FRAME(0x100, 0x100, 0, 0),
|
||||||
|
AFFINEANIMCMD_FRAME(0, 0, -4, 8),
|
||||||
|
AFFINEANIMCMD_END,
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AffineAnimCmd gDragonRushAffineanimCmds2[] =
|
||||||
|
{
|
||||||
|
AFFINEANIMCMD_FRAME(-0x100, 0x100, 0, 0),
|
||||||
|
AFFINEANIMCMD_FRAME(0, 0, 4, 8),
|
||||||
|
AFFINEANIMCMD_END,
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AffineAnimCmd *const gDragonRushAffineAnimTable[] =
|
||||||
|
{
|
||||||
|
gDragonRushAffineanimCmds1,
|
||||||
|
gDragonRushAffineanimCmds2,
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AnimCmd gDracoMeteorAnimTable[] =
|
||||||
|
{
|
||||||
|
ANIMCMD_FRAME(0, 1),
|
||||||
|
ANIMCMD_END,
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AnimCmd *const gDracoMeteorAnimCmd[] =
|
||||||
|
{
|
||||||
|
gDracoMeteorAnimTable,
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AffineAnimCmd gDracoMeteorAffineAnimCmd[] =
|
||||||
|
{
|
||||||
|
AFFINEANIMCMD_FRAME(0x100, 0x100, 0, 0),
|
||||||
|
AFFINEANIMCMD_FRAME(0xFFF8, 0xFFF8, 20, 1),
|
||||||
|
AFFINEANIMCMD_JUMP(1),
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AffineAnimCmd *const gDracoMeteorAffineAnims[] =
|
||||||
|
{
|
||||||
|
gDracoMeteorAffineAnimCmd,
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct SpriteTemplate gDragonRushSpriteTemplate =
|
||||||
|
{
|
||||||
|
.tileTag = ANIM_TAG_SLAM_HIT_2,
|
||||||
|
.paletteTag = ANIM_TAG_RED_HEART,
|
||||||
|
.oam = &gUnknown_0852497C,
|
||||||
|
.anims = gDragonRushAnimTable,
|
||||||
|
.images = NULL,
|
||||||
|
.affineAnims = gDragonRushAffineAnimTable,
|
||||||
|
.callback = AnimDragonRushStep,
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct SpriteTemplate gDracoMetorSpriteTemplate =
|
||||||
|
{
|
||||||
|
.tileTag = ANIM_TAG_IMPACT,
|
||||||
|
.paletteTag = ANIM_TAG_IMPACT,
|
||||||
|
.oam = &gUnknown_085249D4,
|
||||||
|
.anims = gDracoMeteorAnimCmd,
|
||||||
|
.images = NULL,
|
||||||
|
.affineAnims = gDracoMeteorAffineAnims,
|
||||||
|
.callback = AnimSpinningDracoMeteor,
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct SpriteTemplate gDragonPulseSpriteTemplate =
|
||||||
|
{
|
||||||
|
.tileTag = ANIM_TAG_DRAGON_PULSE,
|
||||||
|
.paletteTag = ANIM_TAG_DRAGON_PULSE,
|
||||||
|
.oam = &gUnknown_08524954,
|
||||||
|
.anims = gDummySpriteAnimTable,
|
||||||
|
.images = NULL,
|
||||||
|
.affineAnims = gDummySpriteAffineAnimTable,
|
||||||
|
.callback = TranslateAnimSpriteToTargetMonLocation,
|
||||||
|
};
|
||||||
|
|
||||||
|
static void AnimDragonRushStep(struct Sprite *sprite)
|
||||||
|
{
|
||||||
|
// These two cases are identical.
|
||||||
|
if (GetBattlerSide(gBattleAnimTarget) == B_SIDE_PLAYER)
|
||||||
|
{
|
||||||
|
sprite->data[1] += sprite->data[0];
|
||||||
|
sprite->data[1] &= 0xFF;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sprite->data[1] += sprite->data[0];
|
||||||
|
sprite->data[1] &= 0xFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
sprite->pos2.x = Cos(sprite->data[1], 20);
|
||||||
|
sprite->pos2.y = Sin(sprite->data[1], 20);
|
||||||
|
if (sprite->animEnded)
|
||||||
|
DestroyAnimSprite(sprite);
|
||||||
|
|
||||||
|
sprite->data[2]++;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void AnimSpinningDracoMeteorFinish(struct Sprite *sprite)
|
||||||
|
{
|
||||||
|
StartSpriteAffineAnim(sprite, 0);
|
||||||
|
sprite->affineAnimPaused = 1;
|
||||||
|
sprite->data[0] = 20;
|
||||||
|
|
||||||
|
sprite->callback = WaitAnimForDuration;
|
||||||
|
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
||||||
|
}
|
||||||
|
|
||||||
|
void AnimSpinningDracoMeteor(struct Sprite *sprite)
|
||||||
|
{
|
||||||
|
InitSpritePosToAnimTarget(sprite, TRUE);
|
||||||
|
StartSpriteAnim(sprite, gBattleAnimArgs[2]);
|
||||||
|
sprite->data[0] = gBattleAnimArgs[3];
|
||||||
|
|
||||||
|
sprite->callback = WaitAnimForDuration;
|
||||||
|
StoreSpriteCallbackInData6(sprite, AnimSpinningDracoMeteorFinish);
|
||||||
|
}
|
||||||
|
|
||||||
void sub_8113064(struct Sprite *sprite)
|
void sub_8113064(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2);
|
sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2);
|
||||||
|
59
src/fight.c
@ -35,6 +35,7 @@ static void sub_810D5DC(struct Sprite *);
|
|||||||
static void sub_810D6A8(struct Sprite *);
|
static void sub_810D6A8(struct Sprite *);
|
||||||
static void sub_810D770(struct Sprite *);
|
static void sub_810D770(struct Sprite *);
|
||||||
static void sub_810D830(struct Sprite *);
|
static void sub_810D830(struct Sprite *);
|
||||||
|
void forcePalmAnimCallback(struct Sprite *sprite);
|
||||||
|
|
||||||
extern struct SpriteTemplate gBasicHitSplatSpriteTemplate;
|
extern struct SpriteTemplate gBasicHitSplatSpriteTemplate;
|
||||||
|
|
||||||
@ -436,6 +437,64 @@ const struct SpriteTemplate gAuraSphereBlast =
|
|||||||
.callback = sub_810D874,
|
.callback = sub_810D874,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const union AffineAnimCmd gForcePalmAffineAnimCmd_1[] =
|
||||||
|
{
|
||||||
|
AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 8),
|
||||||
|
AFFINEANIMCMD_END,
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AffineAnimCmd gForcePalmAffineAnimCmd_2[] =
|
||||||
|
{
|
||||||
|
AFFINEANIMCMD_FRAME(0xD8, 0xD8, 0, 0),
|
||||||
|
AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 8),
|
||||||
|
AFFINEANIMCMD_END,
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AffineAnimCmd gForcePalmAffineAnimCmd_3[] =
|
||||||
|
{
|
||||||
|
AFFINEANIMCMD_FRAME(0xB0, 0xB0, 0, 0),
|
||||||
|
AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 8),
|
||||||
|
AFFINEANIMCMD_END,
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AffineAnimCmd gForcePalmAffineAnimCmd_4[] =
|
||||||
|
{
|
||||||
|
AFFINEANIMCMD_FRAME(0x80, 0x80, 0, 0),
|
||||||
|
AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 8),
|
||||||
|
AFFINEANIMCMD_END,
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AffineAnimCmd *const gForcePalmAffineAnims[] =
|
||||||
|
{
|
||||||
|
gForcePalmAffineAnimCmd_1,
|
||||||
|
gForcePalmAffineAnimCmd_2,
|
||||||
|
gForcePalmAffineAnimCmd_3,
|
||||||
|
gForcePalmAffineAnimCmd_4,
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct SpriteTemplate gForcePalmSpriteTemplate =
|
||||||
|
{
|
||||||
|
.tileTag = ANIM_TAG_IMPACT,
|
||||||
|
.paletteTag = ANIM_TAG_SHADOW_BALL,
|
||||||
|
.oam = &gUnknown_08524A94,
|
||||||
|
.anims = gDummySpriteAnimTable,
|
||||||
|
.images = NULL,
|
||||||
|
.affineAnims = gForcePalmAffineAnims,
|
||||||
|
.callback = forcePalmAnimCallback,
|
||||||
|
};
|
||||||
|
|
||||||
|
void forcePalmAnimCallback(struct Sprite *sprite)
|
||||||
|
{
|
||||||
|
StartSpriteAffineAnim(sprite, gBattleAnimArgs[3]);
|
||||||
|
if (gBattleAnimArgs[2] == 0)
|
||||||
|
InitSpritePosToAnimAttacker(sprite, 1);
|
||||||
|
else
|
||||||
|
InitSpritePosToAnimTarget(sprite, TRUE);
|
||||||
|
|
||||||
|
sprite->callback = RunStoredCallbackWhenAffineAnimEnds;
|
||||||
|
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
||||||
|
}
|
||||||
|
|
||||||
void unc_080B08A0(struct Sprite *sprite)
|
void unc_080B08A0(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
SetAnimSpriteInitialXOffset(sprite, gBattleAnimArgs[0]);
|
SetAnimSpriteInitialXOffset(sprite, gBattleAnimArgs[0]);
|
||||||
|
42
src/fire.c
@ -38,6 +38,8 @@ static void sub_8109AFC(struct Sprite *);
|
|||||||
static void sub_8109C4C(struct Sprite *);
|
static void sub_8109C4C(struct Sprite *);
|
||||||
static void sub_8109CB0(struct Sprite *);
|
static void sub_8109CB0(struct Sprite *);
|
||||||
static void sub_8109E2C(u8 taskId);
|
static void sub_8109E2C(u8 taskId);
|
||||||
|
static void AnimLavaPlumeOrbitScatterStep(struct Sprite *sprite);
|
||||||
|
void AnimLavaPlumeOrbitScatter(struct Sprite *sprite);
|
||||||
|
|
||||||
const union AnimCmd gUnknown_08595340[] =
|
const union AnimCmd gUnknown_08595340[] =
|
||||||
{
|
{
|
||||||
@ -480,6 +482,46 @@ const s8 gUnknown_08595694[16] =
|
|||||||
-1, 0, 1, 0, -1, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, 1,
|
-1, 0, 1, 0, -1, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const union AffineAnimCmd gLavaPlumeAffineAnimCmd[] =
|
||||||
|
{
|
||||||
|
AFFINEANIMCMD_FRAME(0x80, 0x80, 0, 0),
|
||||||
|
AFFINEANIMCMD_FRAME(0x8, 0x8, 0, 1),
|
||||||
|
AFFINEANIMCMD_JUMP(1),
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AffineAnimCmd *const gLavaPlumeAffineAnims[] =
|
||||||
|
{
|
||||||
|
gLavaPlumeAffineAnimCmd,
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct SpriteTemplate gLavaPlumeSpriteTemplate =
|
||||||
|
{
|
||||||
|
.tileTag = ANIM_TAG_FIRE_PLUME,
|
||||||
|
.paletteTag = ANIM_TAG_FIRE_PLUME,
|
||||||
|
.oam = &gUnknown_08524914,
|
||||||
|
.anims = gUnknown_085953D8,
|
||||||
|
.images = NULL,
|
||||||
|
.affineAnims = gLavaPlumeAffineAnims,
|
||||||
|
.callback = AnimLavaPlumeOrbitScatter,
|
||||||
|
};
|
||||||
|
|
||||||
|
void AnimLavaPlumeOrbitScatter(struct Sprite *sprite)
|
||||||
|
{
|
||||||
|
sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2);
|
||||||
|
sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3);
|
||||||
|
sprite->data[0] = Sin(gBattleAnimArgs[0], 10);
|
||||||
|
sprite->data[1] = Cos(gBattleAnimArgs[0], 7);
|
||||||
|
sprite->callback = AnimLavaPlumeOrbitScatterStep;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void AnimLavaPlumeOrbitScatterStep(struct Sprite *sprite)
|
||||||
|
{
|
||||||
|
sprite->pos2.x += sprite->data[0];
|
||||||
|
sprite->pos2.y += sprite->data[1];
|
||||||
|
if (sprite->pos1.x + sprite->pos2.x + 16 > 272u || sprite->pos1.y + sprite->pos2.y > 160 || sprite->pos1.y + sprite->pos2.y < -16)
|
||||||
|
DestroyAnimSprite(sprite);
|
||||||
|
}
|
||||||
|
|
||||||
static void sub_8108EC8(struct Sprite *sprite)
|
static void sub_8108EC8(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
sprite->data[0] = gBattleAnimArgs[0];
|
sprite->data[0] = gBattleAnimArgs[0];
|
||||||
|
@ -175,6 +175,30 @@ const u32 gBattleAnimSpritePal_WorrySeed[] = INCBIN_U32("graphics/battle_anims/s
|
|||||||
const u32 gBattleAnimSpriteGfx_SmallCloud[] = INCBIN_U32("graphics/battle_anims/sprites/small_cloud.4bpp.lz");
|
const u32 gBattleAnimSpriteGfx_SmallCloud[] = INCBIN_U32("graphics/battle_anims/sprites/small_cloud.4bpp.lz");
|
||||||
const u32 gBattleAnimSpritePal_SmallCloud[] = INCBIN_U32("graphics/battle_anims/sprites/small_cloud.gbapal.lz");
|
const u32 gBattleAnimSpritePal_SmallCloud[] = INCBIN_U32("graphics/battle_anims/sprites/small_cloud.gbapal.lz");
|
||||||
|
|
||||||
|
const u32 gBattleAnimSpriteGfx_AttackOrder[] = INCBIN_U32("graphics/battle_anims/sprites/attack_order.4bpp.lz");
|
||||||
|
const u32 gBattleAnimSpritePal_AttackOrder[] = INCBIN_U32("graphics/battle_anims/sprites/attack_order.gbapal.lz");
|
||||||
|
|
||||||
|
const u32 gBattleAnimSpriteGfx_DragonPulse[] = INCBIN_U32("graphics/battle_anims/sprites/dragon_pulse.4bpp.lz");
|
||||||
|
const u32 gBattleAnimSpritePal_DragonPulse[] = INCBIN_U32("graphics/battle_anims/sprites/dragon_pulse.gbapal.lz");
|
||||||
|
|
||||||
|
const u32 gBattleAnimSpriteGfx_WoodHammer[] = INCBIN_U32("graphics/battle_anims/sprites/wood_hammer.4bpp.lz");
|
||||||
|
const u32 gBattleAnimSpritePal_WoodHammer[] = INCBIN_U32("graphics/battle_anims/sprites/wood_hammer.gbapal.lz");
|
||||||
|
|
||||||
|
const u32 gBattleAnimSpriteGfx_PsychoCut[] = INCBIN_U32("graphics/battle_anims/sprites/psycho_cut.4bpp.lz");
|
||||||
|
const u32 gBattleAnimSpritePal_PsychoCut[] = INCBIN_U32("graphics/battle_anims/sprites/psycho_cut.gbapal.lz");
|
||||||
|
|
||||||
|
const u32 gBattleAnimSpriteGfx_PowerGem[] = INCBIN_U32("graphics/battle_anims/sprites/power_gem.4bpp.lz");
|
||||||
|
const u32 gBattleAnimSpritePal_PowerGem[] = INCBIN_U32("graphics/battle_anims/sprites/power_gem.gbapal.lz");
|
||||||
|
|
||||||
|
const u32 gBattleAnimSpriteGfx_StoneEdge[] = INCBIN_U32("graphics/battle_anims/sprites/stone_edge.4bpp.lz");
|
||||||
|
const u32 gBattleAnimSpritePal_StoneEdge[] = INCBIN_U32("graphics/battle_anims/sprites/stone_edge.gbapal.lz");
|
||||||
|
|
||||||
|
const u32 gBattleAnimSpriteGfx_StealthRock[] = INCBIN_U32("graphics/battle_anims/sprites/stealth_rock.4bpp.lz");
|
||||||
|
const u32 gBattleAnimSpritePal_StealthRock[] = INCBIN_U32("graphics/battle_anims/sprites/stealth_rock.gbapal.lz");
|
||||||
|
|
||||||
|
const u32 gBattleAnimSpriteGfx_PoisonJab[] = INCBIN_U32("graphics/battle_anims/sprites/poison_jab.4bpp.lz");
|
||||||
|
const u32 gBattleAnimSpritePal_PoisonJab[] = INCBIN_U32("graphics/battle_anims/sprites/poison_jab.gbapal.lz");
|
||||||
|
|
||||||
const u32 gUnknownGfx_C06D98[] = INCBIN_U32("graphics/unknown/unknown_C06D98.4bpp.lz");
|
const u32 gUnknownGfx_C06D98[] = INCBIN_U32("graphics/unknown/unknown_C06D98.4bpp.lz");
|
||||||
const u32 gUnknownPal_C06D98[] = INCBIN_U32("graphics/unknown/unknown_C06D98.gbapal.lz");
|
const u32 gUnknownPal_C06D98[] = INCBIN_U32("graphics/unknown/unknown_C06D98.gbapal.lz");
|
||||||
const u32 gUnknownPal_C06D98_2[] = INCBIN_U32("graphics/unknown/unknown_C06D98_2.gbapal.lz");
|
const u32 gUnknownPal_C06D98_2[] = INCBIN_U32("graphics/unknown/unknown_C06D98_2.gbapal.lz");
|
||||||
@ -1121,6 +1145,18 @@ const u32 gBattleAnimSpritePal_WhipHit[] = INCBIN_U32("graphics/battle_anims/spr
|
|||||||
|
|
||||||
const u32 gBattleAnimBgPalette_Solarbeam[] = INCBIN_U32("graphics/battle_anims/backgrounds/solarbeam.gbapal.lz");
|
const u32 gBattleAnimBgPalette_Solarbeam[] = INCBIN_U32("graphics/battle_anims/backgrounds/solarbeam.gbapal.lz");
|
||||||
|
|
||||||
|
const u32 gBattleAnimBgPalette_MagmaStorm[] = INCBIN_U32("graphics/battle_anims/backgrounds/magma_storm.gbapal.lz");
|
||||||
|
|
||||||
|
const u32 gBattleAnimBgPalette_GigaImpact[] = INCBIN_U32("graphics/battle_anims/backgrounds/giga_impact.gbapal.lz");
|
||||||
|
|
||||||
|
const u32 gBattleAnimBgImage_TrickRoom[] = INCBIN_U32("graphics/battle_anims/backgrounds/trick_room.4bpp.lz");
|
||||||
|
const u32 gBattleAnimBgPalette_TrickRoom[] = INCBIN_U32("graphics/battle_anims/backgrounds/trick_room.gbapal.lz");
|
||||||
|
const u32 gBattleAnimBgTilemap_TrickRoom[] = INCBIN_U32("graphics/battle_anims/backgrounds/trick_room_map.bin.lz");
|
||||||
|
|
||||||
|
const u32 gBattleAnimBgImage_RockWrecker[] = INCBIN_U32("graphics/battle_anims/backgrounds/rock_wrecker.4bpp.lz");
|
||||||
|
const u32 gBattleAnimBgPalette_RockWrecker[] = INCBIN_U32("graphics/battle_anims/backgrounds/rock_wrecker.gbapal.lz");
|
||||||
|
const u32 gBattleAnimBgTilemap_RockWrecker[] = INCBIN_U32("graphics/battle_anims/backgrounds/rock_wrecker_map.bin.lz");
|
||||||
|
|
||||||
const u32 gUnknown_E6BC04[] = INCBIN_U32("graphics/unknown/unknown_E6BC04.bin.lz");
|
const u32 gUnknown_E6BC04[] = INCBIN_U32("graphics/unknown/unknown_E6BC04.bin.lz");
|
||||||
|
|
||||||
const u32 sBlenderCenterGfx[] = INCBIN_U32("graphics/berry_blender/center.8bpp.lz");
|
const u32 sBlenderCenterGfx[] = INCBIN_U32("graphics/berry_blender/center.8bpp.lz");
|
||||||
|
76
src/ice.c
@ -48,6 +48,8 @@ void AnimTask_Haze2(u8);
|
|||||||
void AnimTask_OverlayFogTiles(u8);
|
void AnimTask_OverlayFogTiles(u8);
|
||||||
void AnimTask_Hail2(u8);
|
void AnimTask_Hail2(u8);
|
||||||
bool8 GenerateHailParticle(u8 hailStructId, u8 affineAnimNum, u8 taskId, u8 c);
|
bool8 GenerateHailParticle(u8 hailStructId, u8 affineAnimNum, u8 taskId, u8 c);
|
||||||
|
static void AvalancheAnim_Step2(struct Sprite *sprite);
|
||||||
|
void AvalancheAnim_Step(struct Sprite *sprite);
|
||||||
|
|
||||||
const union AnimCmd gUnknown_08595A48[] =
|
const union AnimCmd gUnknown_08595A48[] =
|
||||||
{
|
{
|
||||||
@ -522,6 +524,80 @@ const struct SpriteTemplate gUnknown_08595DFC =
|
|||||||
.callback = InitIceBallParticle,
|
.callback = InitIceBallParticle,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const union AnimCmd gAvalancheAnimTable_1[] =
|
||||||
|
{
|
||||||
|
ANIMCMD_FRAME(32, 1),
|
||||||
|
ANIMCMD_END,
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AnimCmd gAvalancheAnimTable_2[] =
|
||||||
|
{
|
||||||
|
ANIMCMD_FRAME(48, 1),
|
||||||
|
ANIMCMD_END,
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AnimCmd gAvalancheAnimTable_3[] =
|
||||||
|
{
|
||||||
|
ANIMCMD_FRAME(64, 1),
|
||||||
|
ANIMCMD_END,
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AnimCmd *const gAvalancheAnimCmd[] =
|
||||||
|
{
|
||||||
|
gAvalancheAnimTable_1,
|
||||||
|
gAvalancheAnimTable_2,
|
||||||
|
gAvalancheAnimTable_3,
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct SpriteTemplate gAvalancheSpriteTemplate =
|
||||||
|
{
|
||||||
|
.tileTag = ANIM_TAG_ROCKS,
|
||||||
|
.paletteTag = ANIM_TAG_ICE_CHUNK,
|
||||||
|
.oam = &gUnknown_08524914,
|
||||||
|
.anims = gAvalancheAnimCmd,
|
||||||
|
.images = NULL,
|
||||||
|
.affineAnims = gDummySpriteAffineAnimTable,
|
||||||
|
.callback = AvalancheAnim_Step,
|
||||||
|
};
|
||||||
|
|
||||||
|
void AvalancheAnim_Step(struct Sprite *sprite)
|
||||||
|
{
|
||||||
|
if (gBattleAnimArgs[3] != 0)
|
||||||
|
SetAverageBattlerPositions(gBattleAnimTarget, 0, &sprite->pos1.x, &sprite->pos1.y);
|
||||||
|
|
||||||
|
sprite->pos1.x += gBattleAnimArgs[0];
|
||||||
|
sprite->pos1.y += 14;
|
||||||
|
|
||||||
|
StartSpriteAnim(sprite, gBattleAnimArgs[1]);
|
||||||
|
AnimateSprite(sprite);
|
||||||
|
|
||||||
|
sprite->data[0] = 0;
|
||||||
|
sprite->data[1] = 0;
|
||||||
|
sprite->data[2] = 4;
|
||||||
|
sprite->data[3] = 16;
|
||||||
|
sprite->data[4] = -70;
|
||||||
|
sprite->data[5] = gBattleAnimArgs[2];
|
||||||
|
|
||||||
|
StoreSpriteCallbackInData6(sprite, AvalancheAnim_Step2);
|
||||||
|
sprite->callback = TranslateSpriteInEllipseOverDuration;
|
||||||
|
sprite->callback(sprite);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void AvalancheAnim_Step2(struct Sprite *sprite)
|
||||||
|
{
|
||||||
|
sprite->pos1.x += sprite->data[5];
|
||||||
|
|
||||||
|
sprite->data[0] = 192;
|
||||||
|
sprite->data[1] = sprite->data[5];
|
||||||
|
sprite->data[2] = 4;
|
||||||
|
sprite->data[3] = 32;
|
||||||
|
sprite->data[4] = -24;
|
||||||
|
|
||||||
|
StoreSpriteCallbackInData6(sprite, DestroySpriteAndMatrix);
|
||||||
|
sprite->callback = TranslateSpriteInEllipseOverDuration;
|
||||||
|
sprite->callback(sprite);
|
||||||
|
}
|
||||||
|
|
||||||
// probably unused
|
// probably unused
|
||||||
static void sub_810B6C4(struct Sprite *sprite)
|
static void sub_810B6C4(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
|
202
src/poison.c
@ -12,6 +12,11 @@ static void sub_810DC10(struct Sprite *);
|
|||||||
static void sub_810DCB4(struct Sprite *);
|
static void sub_810DCB4(struct Sprite *);
|
||||||
static void sub_810DD24(struct Sprite *);
|
static void sub_810DD24(struct Sprite *);
|
||||||
static void AnimBubbleEffectStep(struct Sprite *);
|
static void AnimBubbleEffectStep(struct Sprite *);
|
||||||
|
static void AnimSuckerPunchStep(struct Sprite *sprite);
|
||||||
|
void AnimSuckerPunch(struct Sprite *sprite);
|
||||||
|
void AnimGunkShotParticlesStep(struct Sprite *sprite);
|
||||||
|
void AnimGunkShotParticles(struct Sprite *sprite);
|
||||||
|
void AnimGunkShotImpact(struct Sprite *sprite);
|
||||||
|
|
||||||
extern const union AnimCmd *const gUnknown_08595200[];
|
extern const union AnimCmd *const gUnknown_08595200[];
|
||||||
|
|
||||||
@ -189,8 +194,8 @@ const struct SpriteTemplate gWaterBubbleSpriteTemplate =
|
|||||||
|
|
||||||
const struct SpriteTemplate gGreenPoisonDrip =
|
const struct SpriteTemplate gGreenPoisonDrip =
|
||||||
{
|
{
|
||||||
.tileTag = ANIM_TAG_POISON_BUBBLE,
|
.tileTag = ANIM_TAG_GREEN_POISON_BUBBLE,
|
||||||
.paletteTag = ANIM_TAG_VINE,
|
.paletteTag = ANIM_TAG_GREEN_POISON_BUBBLE,
|
||||||
.oam = &gUnknown_085249CC,
|
.oam = &gUnknown_085249CC,
|
||||||
.anims = gUnknown_08596168,
|
.anims = gUnknown_08596168,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
@ -200,8 +205,8 @@ const struct SpriteTemplate gGreenPoisonDrip =
|
|||||||
|
|
||||||
const struct SpriteTemplate gGreenPoisonBubble =
|
const struct SpriteTemplate gGreenPoisonBubble =
|
||||||
{
|
{
|
||||||
.tileTag = ANIM_TAG_POISON_BUBBLE,
|
.tileTag = ANIM_TAG_GREEN_POISON_BUBBLE,
|
||||||
.paletteTag = ANIM_TAG_VINE,
|
.paletteTag = ANIM_TAG_GREEN_POISON_BUBBLE,
|
||||||
.oam = &gUnknown_085249CC,
|
.oam = &gUnknown_085249CC,
|
||||||
.anims = gUnknown_08596164,
|
.anims = gUnknown_08596164,
|
||||||
.images = NULL,
|
.images = NULL,
|
||||||
@ -209,6 +214,195 @@ const struct SpriteTemplate gGreenPoisonBubble =
|
|||||||
.callback = sub_810DC2C,
|
.callback = sub_810DC2C,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const union AnimCmd gSuckerPunchAnimCmd[] =
|
||||||
|
{
|
||||||
|
ANIMCMD_FRAME(0, 3),
|
||||||
|
ANIMCMD_FRAME(0, 3, .hFlip = TRUE),
|
||||||
|
ANIMCMD_FRAME(0, 3, .vFlip = TRUE, .hFlip = TRUE),
|
||||||
|
ANIMCMD_FRAME(0, 3, .vFlip = TRUE),
|
||||||
|
ANIMCMD_JUMP(0),
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AnimCmd *const gSuckerPunchAnim[] =
|
||||||
|
{
|
||||||
|
gSuckerPunchAnimCmd,
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AnimCmd gGunkShotParticlesAnimCmd[] =
|
||||||
|
{
|
||||||
|
ANIMCMD_FRAME(0, 1),
|
||||||
|
ANIMCMD_FRAME(4, 1),
|
||||||
|
ANIMCMD_FRAME(8, 1),
|
||||||
|
ANIMCMD_FRAME(12, 1),
|
||||||
|
ANIMCMD_JUMP(0),
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AnimCmd *const gGunkShotParticlesAnims[] =
|
||||||
|
{
|
||||||
|
gGunkShotParticlesAnimCmd,
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AffineAnimCmd gSuckerPunchImpactAffineAnimCmd_1[] =
|
||||||
|
{
|
||||||
|
AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 8),
|
||||||
|
AFFINEANIMCMD_END,
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AffineAnimCmd gSuckerPunchImpactAffineAnimCmd_2[] =
|
||||||
|
{
|
||||||
|
AFFINEANIMCMD_FRAME(0xD8, 0xD8, 0, 0),
|
||||||
|
AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 8),
|
||||||
|
AFFINEANIMCMD_END,
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AffineAnimCmd gSuckerPunchImpactAffineAnimCmd_3[] =
|
||||||
|
{
|
||||||
|
AFFINEANIMCMD_FRAME(0xB0, 0xB0, 0, 0),
|
||||||
|
AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 8),
|
||||||
|
AFFINEANIMCMD_END,
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AffineAnimCmd gSuckerPunchImpactAffineAnimCmd_4[] =
|
||||||
|
{
|
||||||
|
AFFINEANIMCMD_FRAME(0x80, 0x80, 0, 0),
|
||||||
|
AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 8),
|
||||||
|
AFFINEANIMCMD_END,
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AffineAnimCmd *const gSuckerPunchImpactAffineAnim[] =
|
||||||
|
{
|
||||||
|
gSuckerPunchImpactAffineAnimCmd_1,
|
||||||
|
gSuckerPunchImpactAffineAnimCmd_2,
|
||||||
|
gSuckerPunchImpactAffineAnimCmd_3,
|
||||||
|
gSuckerPunchImpactAffineAnimCmd_4,
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct SpriteTemplate gSuckerPunchSpriteTemplate =
|
||||||
|
{
|
||||||
|
.tileTag = ANIM_TAG_POISON_JAB,
|
||||||
|
.paletteTag = ANIM_TAG_POISON_JAB,
|
||||||
|
.oam = &gUnknown_0852496C,
|
||||||
|
.anims = gSuckerPunchAnim,
|
||||||
|
.images = NULL,
|
||||||
|
.affineAnims = gDummySpriteAffineAnimTable,
|
||||||
|
.callback = AnimSuckerPunch,
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct SpriteTemplate gGunkShoParticlesSpriteTemplate =
|
||||||
|
{
|
||||||
|
.tileTag = ANIM_TAG_WATER_ORB,
|
||||||
|
.paletteTag = ANIM_TAG_POISON_BUBBLE,
|
||||||
|
.oam = &gUnknown_08524A2C,
|
||||||
|
.anims = gGunkShotParticlesAnims,
|
||||||
|
.images = NULL,
|
||||||
|
.affineAnims = gDummySpriteAffineAnimTable,
|
||||||
|
.callback = AnimGunkShotParticles,
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct SpriteTemplate gGunkShotImpactSpriteTemplate =
|
||||||
|
{
|
||||||
|
.tileTag = ANIM_TAG_WATER_IMPACT,
|
||||||
|
.paletteTag = ANIM_TAG_POISON_BUBBLE,
|
||||||
|
.oam = &gUnknown_08524A94,
|
||||||
|
.anims = gDummySpriteAnimTable,
|
||||||
|
.images = NULL,
|
||||||
|
.affineAnims = gSuckerPunchImpactAffineAnim,
|
||||||
|
.callback = AnimGunkShotImpact,
|
||||||
|
};
|
||||||
|
|
||||||
|
void AnimGunkShotImpact(struct Sprite *sprite)
|
||||||
|
{
|
||||||
|
StartSpriteAffineAnim(sprite, gBattleAnimArgs[3]);
|
||||||
|
if (gBattleAnimArgs[2] == 0)
|
||||||
|
InitSpritePosToAnimAttacker(sprite, 1);
|
||||||
|
else
|
||||||
|
InitSpritePosToAnimTarget(sprite, TRUE);
|
||||||
|
|
||||||
|
sprite->callback = RunStoredCallbackWhenAffineAnimEnds;
|
||||||
|
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
||||||
|
}
|
||||||
|
|
||||||
|
void AnimGunkShotParticles(struct Sprite *sprite)
|
||||||
|
{
|
||||||
|
u16 retArg;
|
||||||
|
|
||||||
|
InitSpritePosToAnimAttacker(sprite, TRUE);
|
||||||
|
sprite->data[0] = 30;
|
||||||
|
sprite->data[1] = sprite->pos1.x;
|
||||||
|
sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 2);
|
||||||
|
sprite->data[3] = sprite->pos1.y;
|
||||||
|
sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3);
|
||||||
|
InitAnimLinearTranslation(sprite);
|
||||||
|
sprite->data[5] = 0xD200 / sprite->data[0];
|
||||||
|
sprite->data[7] = gBattleAnimArgs[3];
|
||||||
|
retArg = gBattleAnimArgs[ARG_RET_ID];
|
||||||
|
if (gBattleAnimArgs[ARG_RET_ID] > 127)
|
||||||
|
{
|
||||||
|
sprite->data[6] = (retArg - 127) * 256;
|
||||||
|
sprite->data[7] = -sprite->data[7];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sprite->data[6] = retArg * 256;
|
||||||
|
}
|
||||||
|
sprite->callback = AnimGunkShotParticlesStep;
|
||||||
|
sprite->callback(sprite);
|
||||||
|
}
|
||||||
|
|
||||||
|
void AnimGunkShotParticlesStep(struct Sprite *sprite)
|
||||||
|
{
|
||||||
|
if (AnimTranslateLinear(sprite))
|
||||||
|
DestroyAnimSprite(sprite);
|
||||||
|
sprite->pos2.y += Sin(sprite->data[6] >> 8, sprite->data[7]);
|
||||||
|
if ((sprite->data[6] + sprite->data[5]) >> 8 > 127)
|
||||||
|
{
|
||||||
|
sprite->data[6] = 0;
|
||||||
|
sprite->data[7] = -sprite->data[7];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sprite->data[6] += sprite->data[5];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void AnimSuckerPunch(struct Sprite *sprite)
|
||||||
|
{
|
||||||
|
if (BATTLE_PARTNER(gBattleAnimAttacker) == gBattleAnimTarget && GetBattlerPosition(gBattleAnimTarget) < B_POSITION_PLAYER_RIGHT)
|
||||||
|
gBattleAnimArgs[0] *= -1;
|
||||||
|
|
||||||
|
InitSpritePosToAnimTarget(sprite, TRUE);
|
||||||
|
|
||||||
|
if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
|
||||||
|
gBattleAnimArgs[2] = -gBattleAnimArgs[2];
|
||||||
|
|
||||||
|
sprite->data[0] = gBattleAnimArgs[3];
|
||||||
|
sprite->data[1] = sprite->pos1.x;
|
||||||
|
sprite->data[2] = sprite->pos1.x + gBattleAnimArgs[2];
|
||||||
|
sprite->data[3] = sprite->pos1.y;
|
||||||
|
sprite->data[4] = sprite->pos1.y;
|
||||||
|
|
||||||
|
InitAnimLinearTranslation(sprite);
|
||||||
|
|
||||||
|
sprite->data[5] = gBattleAnimArgs[5];
|
||||||
|
sprite->data[6] = gBattleAnimArgs[4];
|
||||||
|
sprite->data[7] = 0;
|
||||||
|
|
||||||
|
sprite->callback = AnimSuckerPunchStep;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void AnimSuckerPunchStep(struct Sprite *sprite)
|
||||||
|
{
|
||||||
|
if (!AnimTranslateLinear(sprite))
|
||||||
|
{
|
||||||
|
sprite->pos2.y += Sin(sprite->data[7] >> 8, sprite->data[5]);
|
||||||
|
sprite->data[7] += sprite->data[6];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DestroyAnimSprite(sprite);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void sub_810DBAC(struct Sprite *sprite)
|
void sub_810DBAC(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (!gBattleAnimArgs[3])
|
if (!gBattleAnimArgs[3])
|
||||||
|
118
src/psychic.c
@ -28,6 +28,8 @@ static void sub_810F9D4(u8);
|
|||||||
static void sub_810FD3C(u8);
|
static void sub_810FD3C(u8);
|
||||||
static void sub_810FF34(u8);
|
static void sub_810FF34(u8);
|
||||||
static void sub_8110134(u8);
|
static void sub_8110134(u8);
|
||||||
|
void AnimateZenHeadbutt(struct Sprite *sprite);
|
||||||
|
void AnimPsychoCut(struct Sprite *sprite);
|
||||||
|
|
||||||
const union AffineAnimCmd gUnknown_0859652C[] =
|
const union AffineAnimCmd gUnknown_0859652C[] =
|
||||||
{
|
{
|
||||||
@ -419,6 +421,122 @@ const struct SpriteTemplate gUnknown_08596920 =
|
|||||||
.callback = sub_8110240,
|
.callback = sub_8110240,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const union AffineAnimCmd gZenHeadbuttAffineAnimCmd[] =
|
||||||
|
{
|
||||||
|
AFFINEANIMCMD_FRAME(0x10, 0x10, 0, 0),
|
||||||
|
AFFINEANIMCMD_FRAME(0x8, 0x8, 0, 18),
|
||||||
|
AFFINEANIMCMD_LOOP(0),
|
||||||
|
AFFINEANIMCMD_FRAME(0xFFFB, 0xFFFB, 0, 8),
|
||||||
|
AFFINEANIMCMD_FRAME(0x5, 0x5, 0, 8),
|
||||||
|
AFFINEANIMCMD_LOOP(5),
|
||||||
|
AFFINEANIMCMD_END,
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AffineAnimCmd *const gZenHeadbuttAffineAnims[] =
|
||||||
|
{
|
||||||
|
gZenHeadbuttAffineAnimCmd,
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct SpriteTemplate gZenHeadbuttSpriteTemplate =
|
||||||
|
{
|
||||||
|
.tileTag = ANIM_TAG_CIRCLE_OF_LIGHT,
|
||||||
|
.paletteTag = ANIM_TAG_WATER_IMPACT,
|
||||||
|
.oam = &gUnknown_08524A9C,
|
||||||
|
.anims = gDummySpriteAnimTable,
|
||||||
|
.images = NULL,
|
||||||
|
.affineAnims = gZenHeadbuttAffineAnims,
|
||||||
|
.callback = AnimateZenHeadbutt,
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct SpriteTemplate gPsychoCutSpiralSpriteTemplate =
|
||||||
|
{
|
||||||
|
.tileTag = ANIM_TAG_SPIRAL,
|
||||||
|
.paletteTag = ANIM_TAG_PSYCHO_CUT,
|
||||||
|
.oam = &gUnknown_08524A9C,
|
||||||
|
.anims = gDummySpriteAnimTable,
|
||||||
|
.images = NULL,
|
||||||
|
.affineAnims = gUnknown_08596544,
|
||||||
|
.callback = sub_80A77C8,
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct SpriteTemplate gPsychoCutSpriteTemplate =
|
||||||
|
{
|
||||||
|
.tileTag = ANIM_TAG_PSYCHO_CUT,
|
||||||
|
.paletteTag = ANIM_TAG_PSYCHO_CUT,
|
||||||
|
.oam = &gUnknown_08524974,
|
||||||
|
.anims = gDummySpriteAnimTable,
|
||||||
|
.images = NULL,
|
||||||
|
.affineAnims = gDummySpriteAffineAnimTable,
|
||||||
|
.callback = AnimPsychoCut,
|
||||||
|
};
|
||||||
|
|
||||||
|
void AnimPsychoCut(struct Sprite *sprite)
|
||||||
|
{
|
||||||
|
s16 lVarX, lVarY;
|
||||||
|
u16 rot;
|
||||||
|
|
||||||
|
if (IsContest())
|
||||||
|
{
|
||||||
|
gBattleAnimArgs[2] = -gBattleAnimArgs[2];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (GetBattlerSide(gBattleAnimAttacker))
|
||||||
|
{
|
||||||
|
gBattleAnimArgs[2] = -gBattleAnimArgs[2];
|
||||||
|
gBattleAnimArgs[1] = -gBattleAnimArgs[1];
|
||||||
|
gBattleAnimArgs[3] = -gBattleAnimArgs[3];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!IsContest() && GetBattlerSide(gBattleAnimAttacker) == GetBattlerSide(gBattleAnimTarget))
|
||||||
|
{
|
||||||
|
if (GetBattlerPosition(gBattleAnimTarget) == B_POSITION_PLAYER_LEFT
|
||||||
|
|| GetBattlerPosition(gBattleAnimTarget) == B_POSITION_OPPONENT_LEFT)
|
||||||
|
{
|
||||||
|
s16 temp1, temp2;
|
||||||
|
|
||||||
|
temp1 = gBattleAnimArgs[2];
|
||||||
|
gBattleAnimArgs[2] = -temp1;
|
||||||
|
|
||||||
|
temp2 = gBattleAnimArgs[0];
|
||||||
|
gBattleAnimArgs[0] = -temp2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
InitSpritePosToAnimAttacker(sprite, 1);
|
||||||
|
|
||||||
|
lVarX = GetBattlerSpriteCoord(gBattleAnimTarget, 2) + gBattleAnimArgs[2];
|
||||||
|
lVarY = GetBattlerSpriteCoord(gBattleAnimTarget, 3) + gBattleAnimArgs[3];
|
||||||
|
rot = ArcTan2Neg(lVarX - sprite->pos1.x, lVarY - sprite->pos1.y);
|
||||||
|
rot += 0xC000;
|
||||||
|
TrySetSpriteRotScale(sprite, FALSE, 0x100, 0x100, rot);
|
||||||
|
|
||||||
|
sprite->data[0] = gBattleAnimArgs[4];
|
||||||
|
sprite->data[2] = lVarX;
|
||||||
|
sprite->data[4] = lVarY;
|
||||||
|
|
||||||
|
sprite->callback = StartAnimLinearTranslation;
|
||||||
|
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
||||||
|
}
|
||||||
|
|
||||||
|
void AnimateZenHeadbutt(struct Sprite *sprite)
|
||||||
|
{
|
||||||
|
if (gBattleAnimArgs[0] == 0)
|
||||||
|
{
|
||||||
|
sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2);
|
||||||
|
sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3) + 18;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimTarget, 2);
|
||||||
|
sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimTarget, 3) + 18;
|
||||||
|
}
|
||||||
|
|
||||||
|
StoreSpriteCallbackInData6(sprite, DestroySpriteAndMatrix);
|
||||||
|
sprite->callback = RunStoredCallbackWhenAffineAnimEnds;
|
||||||
|
}
|
||||||
|
|
||||||
void sub_810F1EC(struct Sprite *sprite)
|
void sub_810F1EC(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
u8 isContest = IsContest();
|
u8 isContest = IsContest();
|
||||||
|
180
src/rock.c
@ -29,6 +29,13 @@ static void sub_8111214(struct Task *task);
|
|||||||
static u8 sub_811135C(void);
|
static u8 sub_811135C(void);
|
||||||
static void sub_81113C8(struct Sprite *sprite);
|
static void sub_81113C8(struct Sprite *sprite);
|
||||||
static void sub_811149C(struct Sprite *sprite);
|
static void sub_811149C(struct Sprite *sprite);
|
||||||
|
static void AnimPowerGemOrbitFastStep(struct Sprite *sprite);
|
||||||
|
void AnimPowerGemOrbitFast(struct Sprite *sprite);
|
||||||
|
static void AnimPowerGemScatterStep(struct Sprite *sprite);
|
||||||
|
void AnimPowerGemScatter(struct Sprite *sprite);
|
||||||
|
static void AnimStealthRockStep2(struct Sprite *sprite);
|
||||||
|
static void AnimStealthRockStep(struct Sprite *sprite);
|
||||||
|
void AnimStealthRock(struct Sprite *sprite);
|
||||||
|
|
||||||
const union AnimCmd gUnknown_08596AE0[] =
|
const union AnimCmd gUnknown_08596AE0[] =
|
||||||
{
|
{
|
||||||
@ -305,6 +312,179 @@ const struct SpriteTemplate gUnknown_08596CE0 =
|
|||||||
.callback = sub_80A8EE4,
|
.callback = sub_80A8EE4,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const union AffineAnimCmd gPowerGemScatterAffineAnimCmd[] =
|
||||||
|
{
|
||||||
|
AFFINEANIMCMD_FRAME(0x80, 0x80, 0, 0),
|
||||||
|
AFFINEANIMCMD_FRAME(0x8, 0x8, 0, 1),
|
||||||
|
AFFINEANIMCMD_JUMP(1),
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AffineAnimCmd *const gPowerGemScatterAffineAnims[] =
|
||||||
|
{
|
||||||
|
gPowerGemScatterAffineAnimCmd,
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AffineAnimCmd gPowerGemOrbAffineAnimCmd[] =
|
||||||
|
{
|
||||||
|
AFFINEANIMCMD_FRAME(0x80, 0x80, 0, 0),
|
||||||
|
AFFINEANIMCMD_FRAME(0x8, 0x8, 0, 1),
|
||||||
|
AFFINEANIMCMD_JUMP(1),
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AffineAnimCmd *const gPowerGemOrbAffineAnims[] =
|
||||||
|
{
|
||||||
|
gPowerGemOrbAffineAnimCmd,
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct SpriteTemplate gPowerGemScatterSpriteTemplate =
|
||||||
|
{
|
||||||
|
.tileTag = ANIM_TAG_POWER_GEM,
|
||||||
|
.paletteTag = ANIM_TAG_POWER_GEM,
|
||||||
|
.oam = &gUnknown_085249CC,
|
||||||
|
.anims = gDummySpriteAnimTable,
|
||||||
|
.images = NULL,
|
||||||
|
.affineAnims = gPowerGemScatterAffineAnims,
|
||||||
|
.callback = AnimPowerGemScatter,
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct SpriteTemplate gPowerGemOrbSpriteTemplate =
|
||||||
|
{
|
||||||
|
.tileTag = ANIM_TAG_POWER_GEM,
|
||||||
|
.paletteTag = ANIM_TAG_POWER_GEM,
|
||||||
|
.oam = &gUnknown_0852496C,
|
||||||
|
.anims = gDummySpriteAnimTable,
|
||||||
|
.images = NULL,
|
||||||
|
.affineAnims = gPowerGemOrbAffineAnims,
|
||||||
|
.callback = AnimPowerGemOrbitFast,
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct SpriteTemplate gStoneEdgeSpriteTemplate =
|
||||||
|
{
|
||||||
|
.tileTag = ANIM_TAG_STONE_EDGE,
|
||||||
|
.paletteTag = ANIM_TAG_STONE_EDGE,
|
||||||
|
.oam = &gUnknown_08524914,
|
||||||
|
.anims = gUnknown_085954D0,
|
||||||
|
.images = NULL,
|
||||||
|
.affineAnims = gDummySpriteAffineAnimTable,
|
||||||
|
.callback = sub_8110B38,
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct SpriteTemplate gStealthRockSpriteTemplate =
|
||||||
|
{
|
||||||
|
.tileTag = ANIM_TAG_STEALTH_ROCK,
|
||||||
|
.paletteTag = ANIM_TAG_STEALTH_ROCK,
|
||||||
|
.oam = &gUnknown_0852490C,
|
||||||
|
.anims = gDummySpriteAnimTable,
|
||||||
|
.images = NULL,
|
||||||
|
.affineAnims = gDummySpriteAffineAnimTable,
|
||||||
|
.callback = AnimStealthRock,
|
||||||
|
};
|
||||||
|
|
||||||
|
void AnimStealthRock(struct Sprite *sprite)
|
||||||
|
{
|
||||||
|
u16 x;
|
||||||
|
u16 y;
|
||||||
|
|
||||||
|
InitSpritePosToAnimAttacker(sprite, TRUE);
|
||||||
|
SetAverageBattlerPositions(gBattleAnimTarget, FALSE, &x, &y);
|
||||||
|
|
||||||
|
if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
|
||||||
|
gBattleAnimArgs[2] = -gBattleAnimArgs[2];
|
||||||
|
|
||||||
|
sprite->data[0] = gBattleAnimArgs[4];
|
||||||
|
sprite->data[2] = x + gBattleAnimArgs[2];
|
||||||
|
sprite->data[4] = y + gBattleAnimArgs[3];
|
||||||
|
sprite->data[5] = -50;
|
||||||
|
|
||||||
|
InitAnimArcTranslation(sprite);
|
||||||
|
sprite->callback = AnimStealthRockStep;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void AnimStealthRockStep(struct Sprite *sprite)
|
||||||
|
{
|
||||||
|
if (TranslateAnimHorizontalArc(sprite))
|
||||||
|
{
|
||||||
|
sprite->data[0] = 30;
|
||||||
|
sprite->data[1] = 0;
|
||||||
|
sprite->callback = WaitAnimForDuration;
|
||||||
|
StoreSpriteCallbackInData6(sprite, AnimStealthRockStep2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void AnimStealthRockStep2(struct Sprite *sprite)
|
||||||
|
{
|
||||||
|
if (sprite->data[1] & 1)
|
||||||
|
sprite->invisible ^= 1;
|
||||||
|
|
||||||
|
if (++sprite->data[1] == 16)
|
||||||
|
DestroyAnimSprite(sprite);
|
||||||
|
}
|
||||||
|
|
||||||
|
void AnimPowerGemScatter(struct Sprite *sprite)
|
||||||
|
{
|
||||||
|
sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2);
|
||||||
|
sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3);
|
||||||
|
sprite->data[0] = Sin(gBattleAnimArgs[0], 10);
|
||||||
|
sprite->data[1] = Cos(gBattleAnimArgs[0], 7);
|
||||||
|
sprite->callback = AnimPowerGemScatterStep;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void AnimPowerGemScatterStep(struct Sprite *sprite)
|
||||||
|
{
|
||||||
|
sprite->pos2.x += sprite->data[0];
|
||||||
|
sprite->pos2.y += sprite->data[1];
|
||||||
|
if (sprite->pos1.x + sprite->pos2.x + 16 > 272u || sprite->pos1.y + sprite->pos2.y > 160 || sprite->pos1.y + sprite->pos2.y < -16)
|
||||||
|
DestroyAnimSprite(sprite);
|
||||||
|
}
|
||||||
|
|
||||||
|
void AnimPowerGemOrbitFast(struct Sprite *sprite)
|
||||||
|
{
|
||||||
|
sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2);
|
||||||
|
sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3);
|
||||||
|
sprite->affineAnimPaused = 1;
|
||||||
|
sprite->data[0] = gBattleAnimArgs[0];
|
||||||
|
sprite->data[1] = gBattleAnimArgs[1];
|
||||||
|
sprite->data[7] = GetBattlerSpriteSubpriority(gBattleAnimAttacker);
|
||||||
|
sprite->callback = AnimPowerGemOrbitFastStep;
|
||||||
|
sprite->callback(sprite);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void AnimPowerGemOrbitFastStep(struct Sprite *sprite)
|
||||||
|
{
|
||||||
|
if (sprite->data[1] >= 64 && sprite->data[1] <= 191)
|
||||||
|
sprite->subpriority = sprite->data[7] + 1;
|
||||||
|
else
|
||||||
|
sprite->subpriority = sprite->data[7] - 1;
|
||||||
|
|
||||||
|
sprite->pos2.x = Sin(sprite->data[1], sprite->data[2] >> 8);
|
||||||
|
sprite->pos2.y = Cos(sprite->data[1], sprite->data[3] >> 8);
|
||||||
|
sprite->data[1] = (sprite->data[1] + 9) & 0xFF;
|
||||||
|
switch (sprite->data[5])
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
sprite->data[2] -= 0x400;
|
||||||
|
sprite->data[3] -= 0x100;
|
||||||
|
if (++sprite->data[4] == sprite->data[0])
|
||||||
|
{
|
||||||
|
sprite->data[5] = 2;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 0:
|
||||||
|
sprite->data[2] += 0x400;
|
||||||
|
sprite->data[3] += 0x100;
|
||||||
|
if (++sprite->data[4] == sprite->data[0])
|
||||||
|
{
|
||||||
|
sprite->data[4] = 0;
|
||||||
|
sprite->data[5] = 1;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((u16)gBattleAnimArgs[7] == 0xFFFF)
|
||||||
|
DestroyAnimSprite(sprite);
|
||||||
|
}
|
||||||
|
|
||||||
void sub_81109F0(struct Sprite *sprite)
|
void sub_81109F0(struct Sprite *sprite)
|
||||||
{
|
{
|
||||||
if (gBattleAnimArgs[3] != 0)
|
if (gBattleAnimArgs[3] != 0)
|
||||||
|
137
src/water.c
@ -53,6 +53,9 @@ void sub_8108408(struct Task*, u8);
|
|||||||
void sub_810871C(struct Task*, u8);
|
void sub_810871C(struct Task*, u8);
|
||||||
void sub_8108AC0(struct Task*);
|
void sub_8108AC0(struct Task*);
|
||||||
void sub_8108D54(struct Sprite*, int, int);
|
void sub_8108D54(struct Sprite*, int, int);
|
||||||
|
void AnimAquaTail(struct Sprite *sprite);
|
||||||
|
static void AnimKnockOffAquaTailStep(struct Sprite *sprite);
|
||||||
|
void AnimKnockOffAquaTail(struct Sprite *sprite);
|
||||||
|
|
||||||
extern const union AffineAnimCmd *const gUnknown_08593420[];
|
extern const union AffineAnimCmd *const gUnknown_08593420[];
|
||||||
extern const union AffineAnimCmd *const gUnknown_08596208[];
|
extern const union AffineAnimCmd *const gUnknown_08596208[];
|
||||||
@ -480,6 +483,140 @@ const struct SpriteTemplate gUnknown_08595328 =
|
|||||||
|
|
||||||
extern const struct SpriteTemplate gUnknown_08597388;
|
extern const struct SpriteTemplate gUnknown_08597388;
|
||||||
|
|
||||||
|
const union AffineAnimCmd gAquaTailHitAffineAnimCmd_1[] =
|
||||||
|
{
|
||||||
|
AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 8),
|
||||||
|
AFFINEANIMCMD_END,
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AffineAnimCmd gAquaTailHitAffineAnimCmd_2[] =
|
||||||
|
{
|
||||||
|
AFFINEANIMCMD_FRAME(0xD8, 0xD8, 0, 0),
|
||||||
|
AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 8),
|
||||||
|
AFFINEANIMCMD_END,
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AffineAnimCmd gAquaTailHitAffineAnimCmd_3[] =
|
||||||
|
{
|
||||||
|
AFFINEANIMCMD_FRAME(0xB0, 0xB0, 0, 0),
|
||||||
|
AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 8),
|
||||||
|
AFFINEANIMCMD_END,
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AffineAnimCmd gAquaTailHitAffineAnimCmd_4[] =
|
||||||
|
{
|
||||||
|
AFFINEANIMCMD_FRAME(0x80, 0x80, 0, 0),
|
||||||
|
AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 8),
|
||||||
|
AFFINEANIMCMD_END,
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AffineAnimCmd *const gAquaTailHitAffineAnims[] =
|
||||||
|
{
|
||||||
|
gAquaTailHitAffineAnimCmd_1,
|
||||||
|
gAquaTailHitAffineAnimCmd_2,
|
||||||
|
gAquaTailHitAffineAnimCmd_3,
|
||||||
|
gAquaTailHitAffineAnimCmd_4,
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AnimCmd gKnockOffAquaTailAnimCmd[] =
|
||||||
|
{
|
||||||
|
ANIMCMD_FRAME(0, 4),
|
||||||
|
ANIMCMD_FRAME(64, 4),
|
||||||
|
ANIMCMD_END,
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AnimCmd *const gKnockOffAquaTailAnim[] =
|
||||||
|
{
|
||||||
|
gKnockOffAquaTailAnimCmd,
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AffineAnimCmd gKnockOffAquaTailAffineanimCmd_1[] =
|
||||||
|
{
|
||||||
|
AFFINEANIMCMD_FRAME(0x100, 0x100, 0, 0),
|
||||||
|
AFFINEANIMCMD_FRAME(0, 0, -4, 8),
|
||||||
|
AFFINEANIMCMD_END,
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AffineAnimCmd gKnockOffAquaTailAffineanimCmd_2[] =
|
||||||
|
{
|
||||||
|
AFFINEANIMCMD_FRAME(-0x100, 0x100, 0, 0),
|
||||||
|
AFFINEANIMCMD_FRAME(0, 0, 4, 8),
|
||||||
|
AFFINEANIMCMD_END,
|
||||||
|
};
|
||||||
|
|
||||||
|
const union AffineAnimCmd *const gKnockOffAquaTailAffineAnim[] =
|
||||||
|
{
|
||||||
|
gKnockOffAquaTailAffineanimCmd_1,
|
||||||
|
gKnockOffAquaTailAffineanimCmd_2,
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct SpriteTemplate gAquaTailKnockOffSpriteTemplate =
|
||||||
|
{
|
||||||
|
.tileTag = ANIM_TAG_SLAM_HIT_2,
|
||||||
|
.paletteTag = ANIM_TAG_WATER_IMPACT,
|
||||||
|
.oam = &gUnknown_0852497C,
|
||||||
|
.anims = gKnockOffAquaTailAnim,
|
||||||
|
.images = NULL,
|
||||||
|
.affineAnims = gKnockOffAquaTailAffineAnim,
|
||||||
|
.callback = AnimKnockOffAquaTail,
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct SpriteTemplate gAquaTailHitSpriteTemplate =
|
||||||
|
{
|
||||||
|
.tileTag = ANIM_TAG_IMPACT,
|
||||||
|
.paletteTag = ANIM_TAG_WATER_IMPACT,
|
||||||
|
.oam = &gUnknown_08524A94,
|
||||||
|
.anims = gDummySpriteAnimTable,
|
||||||
|
.images = NULL,
|
||||||
|
.affineAnims = gAquaTailHitAffineAnims,
|
||||||
|
.callback = AnimAquaTail,
|
||||||
|
};
|
||||||
|
|
||||||
|
void AnimAquaTail(struct Sprite *sprite)
|
||||||
|
{
|
||||||
|
StartSpriteAffineAnim(sprite, gBattleAnimArgs[3]);
|
||||||
|
if (gBattleAnimArgs[2] == 0)
|
||||||
|
InitSpritePosToAnimAttacker(sprite, 1);
|
||||||
|
else
|
||||||
|
InitSpritePosToAnimTarget(sprite, TRUE);
|
||||||
|
|
||||||
|
sprite->callback = RunStoredCallbackWhenAffineAnimEnds;
|
||||||
|
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
||||||
|
}
|
||||||
|
|
||||||
|
void AnimKnockOffAquaTail(struct Sprite *sprite)
|
||||||
|
{
|
||||||
|
if (GetBattlerSide(gBattleAnimTarget) == B_SIDE_PLAYER)
|
||||||
|
{
|
||||||
|
sprite->pos1.x -= gBattleAnimArgs[0];
|
||||||
|
sprite->pos1.y += gBattleAnimArgs[1];
|
||||||
|
sprite->data[0] = -11;
|
||||||
|
sprite->data[1] = 192;
|
||||||
|
StartSpriteAffineAnim(sprite, 1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sprite->data[0] = 11;
|
||||||
|
sprite->data[1] = 192;
|
||||||
|
sprite->pos1.x += gBattleAnimArgs[0];
|
||||||
|
sprite->pos1.y += gBattleAnimArgs[1];
|
||||||
|
}
|
||||||
|
|
||||||
|
sprite->callback = AnimKnockOffAquaTailStep;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void AnimKnockOffAquaTailStep(struct Sprite *sprite)
|
||||||
|
{
|
||||||
|
sprite->data[1] += sprite->data[0];
|
||||||
|
sprite->data[1] &= 0xFF;
|
||||||
|
sprite->pos2.x = Cos(sprite->data[1], 20);
|
||||||
|
sprite->pos2.y = Sin(sprite->data[1], 20);
|
||||||
|
if (sprite->animEnded)
|
||||||
|
DestroyAnimSprite(sprite);
|
||||||
|
|
||||||
|
sprite->data[2]++;
|
||||||
|
}
|
||||||
|
|
||||||
void AnimTask_CreateRaindrops(u8 taskId)
|
void AnimTask_CreateRaindrops(u8 taskId)
|
||||||
{
|
{
|
||||||
u8 x, y;
|
u8 x, y;
|
||||||
|