mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-13 23:23:43 +01:00
Gave an entrance animation to Delta Stream
This commit is contained in:
parent
97ce02464b
commit
69b7910f47
@ -822,6 +822,7 @@ gBattleAnims_General::
|
|||||||
.4byte General_SlideOffScreen @ B_ANIM_SLIDE_OFFSCREEN
|
.4byte General_SlideOffScreen @ B_ANIM_SLIDE_OFFSCREEN
|
||||||
.4byte General_RestoreBg @ B_ANIM_RESTORE_BG
|
.4byte General_RestoreBg @ B_ANIM_RESTORE_BG
|
||||||
.4byte General_TotemFlare @ B_ANIM_TOTEM_FLARE
|
.4byte General_TotemFlare @ B_ANIM_TOTEM_FLARE
|
||||||
|
.4byte General_StrongWinds @ B_ANIM_STRONG_WINDS
|
||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
gBattleAnims_Special::
|
gBattleAnims_Special::
|
||||||
@ -24397,6 +24398,30 @@ General_TotemFlare::
|
|||||||
clearmonbg ANIM_ATTACKER
|
clearmonbg ANIM_ATTACKER
|
||||||
end
|
end
|
||||||
|
|
||||||
|
General_StrongWinds::
|
||||||
|
loadspritegfx ANIM_TAG_FLYING_DIRT
|
||||||
|
playsewithpan SE_M_GUST, 0
|
||||||
|
createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_FLYING_DIRT, 0, 12, 12, RGB(20, 20, 20)
|
||||||
|
waitforvisualfinish
|
||||||
|
createvisualtask AnimTask_LoadWindstormBackground, 5, FALSE
|
||||||
|
delay 16
|
||||||
|
createsprite gFlyingSandCrescentSpriteTemplate, ANIM_ATTACKER, 40, 10, 2304, 96, 0
|
||||||
|
delay 10
|
||||||
|
createsprite gFlyingSandCrescentSpriteTemplate, ANIM_ATTACKER, 40, 90, 2048, 96, 0
|
||||||
|
delay 10
|
||||||
|
createsprite gFlyingSandCrescentSpriteTemplate, ANIM_ATTACKER, 40, 50, 2560, 96, 0
|
||||||
|
delay 10
|
||||||
|
createsprite gFlyingSandCrescentSpriteTemplate, ANIM_ATTACKER, 40, 20, 2304, 96, 0
|
||||||
|
delay 10
|
||||||
|
createsprite gFlyingSandCrescentSpriteTemplate, ANIM_ATTACKER, 40, 70, 1984, 96, 0
|
||||||
|
delay 10
|
||||||
|
createsprite gFlyingSandCrescentSpriteTemplate, ANIM_ATTACKER, 40, 0, 2816, 96, 0
|
||||||
|
delay 10
|
||||||
|
createsprite gFlyingSandCrescentSpriteTemplate, ANIM_ATTACKER, 40, 60, 2560, 96, 0
|
||||||
|
waitforvisualfinish
|
||||||
|
stopsound
|
||||||
|
end
|
||||||
|
|
||||||
RainbowEndureEffect:
|
RainbowEndureEffect:
|
||||||
launchtemplate gBlueEndureEnergySpriteTemplate 0x2 0x4 0x0 0xffe8 0x1a 0x2
|
launchtemplate gBlueEndureEnergySpriteTemplate 0x2 0x4 0x0 0xffe8 0x1a 0x2
|
||||||
delay 0x3
|
delay 0x3
|
||||||
|
@ -6933,7 +6933,8 @@ BattleScript_DeltaStreamActivates::
|
|||||||
pause B_WAIT_TIME_SHORT
|
pause B_WAIT_TIME_SHORT
|
||||||
call BattleScript_AbilityPopUp
|
call BattleScript_AbilityPopUp
|
||||||
printstring STRINGID_MYSTERIOUSAIRCURRENT
|
printstring STRINGID_MYSTERIOUSAIRCURRENT
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitstate
|
||||||
|
playanimation BS_ATTACKER, B_ANIM_STRONG_WINDS, NULL
|
||||||
end3
|
end3
|
||||||
|
|
||||||
BattleScript_AttackWeakenedByStrongWinds::
|
BattleScript_AttackWeakenedByStrongWinds::
|
||||||
|
BIN
graphics/battle_anims/backgrounds/windstorm_brew.png
Normal file
BIN
graphics/battle_anims/backgrounds/windstorm_brew.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
@ -523,6 +523,7 @@
|
|||||||
#define B_ANIM_SLIDE_OFFSCREEN 26 // for Emergency Exit
|
#define B_ANIM_SLIDE_OFFSCREEN 26 // for Emergency Exit
|
||||||
#define B_ANIM_RESTORE_BG 27 // for Terrain Endings
|
#define B_ANIM_RESTORE_BG 27 // for Terrain Endings
|
||||||
#define B_ANIM_TOTEM_FLARE 28 // Totem boosts aura flare
|
#define B_ANIM_TOTEM_FLARE 28 // Totem boosts aura flare
|
||||||
|
#define B_ANIM_STRONG_WINDS 29
|
||||||
|
|
||||||
// special animations table (gBattleAnims_Special)
|
// special animations table (gBattleAnims_Special)
|
||||||
#define B_ANIM_LVL_UP 0
|
#define B_ANIM_LVL_UP 0
|
||||||
|
@ -4697,6 +4697,7 @@ extern const u32 gBattleAnimSpritePal_MagnifyingGlass[];
|
|||||||
extern const u32 gBattleAnimSpritePal_BrownOrb[];
|
extern const u32 gBattleAnimSpritePal_BrownOrb[];
|
||||||
extern const u32 gBattleAnimSpritePal_MetalSoundWaves[];
|
extern const u32 gBattleAnimSpritePal_MetalSoundWaves[];
|
||||||
extern const u32 gBattleAnimSpritePal_FlyingDirt[];
|
extern const u32 gBattleAnimSpritePal_FlyingDirt[];
|
||||||
|
extern const u32 gBattleAnimSpritePal_Windstorm[];
|
||||||
extern const u32 gBattleAnimSpritePal_IcicleSpear[];
|
extern const u32 gBattleAnimSpritePal_IcicleSpear[];
|
||||||
extern const u32 gBattleAnimSpritePal_Hail[];
|
extern const u32 gBattleAnimSpritePal_Hail[];
|
||||||
extern const u32 gBattleAnimSpritePal_GlowyRedOrb[];
|
extern const u32 gBattleAnimSpritePal_GlowyRedOrb[];
|
||||||
@ -5199,6 +5200,9 @@ extern const u16 gSlotMachineReelTimePikachu_Pal[];
|
|||||||
extern const u32 gBattleAnimBgTilemap_Sandstorm[];
|
extern const u32 gBattleAnimBgTilemap_Sandstorm[];
|
||||||
extern const u32 gBattleAnimBgImage_Sandstorm[];
|
extern const u32 gBattleAnimBgImage_Sandstorm[];
|
||||||
|
|
||||||
|
extern const u32 gBattleAnimBgTilemap_Windstorm[];
|
||||||
|
extern const u32 gBattleAnimBgImage_Windstorm[];
|
||||||
|
|
||||||
// Pokedex Area Screen
|
// Pokedex Area Screen
|
||||||
extern const u32 gPokedexAreaScreenAreaUnknown_Gfx[];
|
extern const u32 gPokedexAreaScreenAreaUnknown_Gfx[];
|
||||||
extern const u16 gPokedexAreaScreenAreaUnknown_Pal[];
|
extern const u16 gPokedexAreaScreenAreaUnknown_Pal[];
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
#include "constants/battle_anim.h"
|
#include "constants/battle_anim.h"
|
||||||
#include "constants/rgb.h"
|
#include "constants/rgb.h"
|
||||||
#include "random.h"
|
#include "random.h"
|
||||||
|
#include "gpu_regs.h"
|
||||||
|
#include "graphics.h"
|
||||||
|
|
||||||
extern const struct SpriteTemplate gFlashingHitSplatSpriteTemplate;
|
extern const struct SpriteTemplate gFlashingHitSplatSpriteTemplate;
|
||||||
|
|
||||||
@ -30,7 +32,7 @@ static void AnimUnusedFlashingLight_Step(struct Sprite *);
|
|||||||
static void AnimSkyAttackBird(struct Sprite *);
|
static void AnimSkyAttackBird(struct Sprite *);
|
||||||
static void AnimSkyAttackBird_Step(struct Sprite *);
|
static void AnimSkyAttackBird_Step(struct Sprite *);
|
||||||
static void AnimTask_AnimateGustTornadoPalette_Step(u8);
|
static void AnimTask_AnimateGustTornadoPalette_Step(u8);
|
||||||
|
static void AnimTask_LoadWindstormBackground_Step(u8 taskId);
|
||||||
|
|
||||||
const struct SpriteTemplate gEllipticalGustSpriteTemplate =
|
const struct SpriteTemplate gEllipticalGustSpriteTemplate =
|
||||||
{
|
{
|
||||||
@ -1231,3 +1233,99 @@ static void AnimTask_SetAttackerVisibility(u8 taskId)
|
|||||||
}
|
}
|
||||||
DestroyAnimVisualTask(taskId);
|
DestroyAnimVisualTask(taskId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AnimTask_LoadWindstormBackground(u8 taskId)
|
||||||
|
{
|
||||||
|
int var0;
|
||||||
|
struct BattleAnimBgData animBg;
|
||||||
|
|
||||||
|
var0 = 0;
|
||||||
|
SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG1 | BLDCNT_TGT2_ALL | BLDCNT_EFFECT_BLEND);
|
||||||
|
SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(0, 16));
|
||||||
|
SetAnimBgAttribute(1, BG_ANIM_PRIORITY, 1);
|
||||||
|
SetAnimBgAttribute(1, BG_ANIM_SCREEN_SIZE, 0);
|
||||||
|
|
||||||
|
if (!IsContest())
|
||||||
|
SetAnimBgAttribute(1, BG_ANIM_CHAR_BASE_BLOCK, 1);
|
||||||
|
|
||||||
|
gBattle_BG1_X = 0;
|
||||||
|
gBattle_BG1_Y = 0;
|
||||||
|
SetGpuReg(REG_OFFSET_BG1HOFS, gBattle_BG1_X);
|
||||||
|
SetGpuReg(REG_OFFSET_BG1VOFS, gBattle_BG1_Y);
|
||||||
|
|
||||||
|
GetBattleAnimBg1Data(&animBg);
|
||||||
|
AnimLoadCompressedBgGfx(animBg.bgId, gBattleAnimBgImage_Windstorm, animBg.tilesOffset);
|
||||||
|
AnimLoadCompressedBgTilemapHandleContest(&animBg, gBattleAnimBgTilemap_Windstorm, 0);
|
||||||
|
LoadCompressedPalette(gBattleAnimSpritePal_Windstorm, animBg.paletteId * 16, 32);
|
||||||
|
|
||||||
|
if (gBattleAnimArgs[0] && GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
|
||||||
|
var0 = 1;
|
||||||
|
|
||||||
|
gTasks[taskId].data[0] = var0;
|
||||||
|
gTasks[taskId].func = AnimTask_LoadWindstormBackground_Step;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void AnimTask_LoadWindstormBackground_Step(u8 taskId)
|
||||||
|
{
|
||||||
|
struct BattleAnimBgData animBg;
|
||||||
|
|
||||||
|
if (gTasks[taskId].data[0] == 0)
|
||||||
|
gBattle_BG1_X += -6;
|
||||||
|
else
|
||||||
|
gBattle_BG1_X += 6;
|
||||||
|
|
||||||
|
gBattle_BG1_Y += -1;
|
||||||
|
|
||||||
|
switch (gTasks[taskId].data[12])
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
if (++gTasks[taskId].data[10] == 4)
|
||||||
|
{
|
||||||
|
gTasks[taskId].data[10] = 0;
|
||||||
|
gTasks[taskId].data[11]++;
|
||||||
|
SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(gTasks[taskId].data[11], 16 - gTasks[taskId].data[11]));
|
||||||
|
if (gTasks[taskId].data[11] == 7)
|
||||||
|
{
|
||||||
|
gTasks[taskId].data[12]++;
|
||||||
|
gTasks[taskId].data[11] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
if (++gTasks[taskId].data[11] == 101)
|
||||||
|
{
|
||||||
|
gTasks[taskId].data[11] = 7;
|
||||||
|
gTasks[taskId].data[12]++;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
if (++gTasks[taskId].data[10] == 4)
|
||||||
|
{
|
||||||
|
gTasks[taskId].data[10] = 0;
|
||||||
|
gTasks[taskId].data[11]--;
|
||||||
|
SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(gTasks[taskId].data[11], 16 - gTasks[taskId].data[11]));
|
||||||
|
if (gTasks[taskId].data[11] == 0)
|
||||||
|
{
|
||||||
|
gTasks[taskId].data[12]++;
|
||||||
|
gTasks[taskId].data[11] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
GetBattleAnimBg1Data(&animBg);
|
||||||
|
ClearBattleAnimBg(animBg.bgId);
|
||||||
|
gTasks[taskId].data[12]++;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
if (!IsContest())
|
||||||
|
SetAnimBgAttribute(1, BG_ANIM_CHAR_BASE_BLOCK, 0);
|
||||||
|
|
||||||
|
gBattle_BG1_X = 0;
|
||||||
|
gBattle_BG1_Y = 0;
|
||||||
|
SetGpuReg(REG_OFFSET_BLDCNT, 0);
|
||||||
|
SetGpuReg(REG_OFFSET_BLDALPHA, 0);
|
||||||
|
SetAnimBgAttribute(1, BG_ANIM_PRIORITY, 1);
|
||||||
|
DestroyAnimVisualTask(taskId);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -1312,11 +1312,14 @@ const u32 gUnknown_08D85A1C[] = INCBIN_U32("graphics/battle_frontier/battle_tile
|
|||||||
#include "data/graphics/intro_scene.h"
|
#include "data/graphics/intro_scene.h"
|
||||||
|
|
||||||
const u32 gBattleAnimSpriteGfx_FlyingDirt[] = INCBIN_U32("graphics/battle_anims/sprites/flying_dirt.4bpp.lz");
|
const u32 gBattleAnimSpriteGfx_FlyingDirt[] = INCBIN_U32("graphics/battle_anims/sprites/flying_dirt.4bpp.lz");
|
||||||
|
const u32 gBattleAnimSpritePal_FlyingDirt[] = INCBIN_U32("graphics/battle_anims/sprites/flying_dirt.gbapal.lz");
|
||||||
|
|
||||||
const u32 gBattleAnimBgTilemap_Sandstorm[] = INCBIN_U32("graphics/battle_anims/backgrounds/sandstorm_brew.bin.lz");
|
const u32 gBattleAnimBgTilemap_Sandstorm[] = INCBIN_U32("graphics/battle_anims/backgrounds/sandstorm_brew.bin.lz");
|
||||||
const u32 gBattleAnimBgImage_Sandstorm[] = INCBIN_U32("graphics/battle_anims/backgrounds/sandstorm_brew.4bpp.lz");
|
const u32 gBattleAnimBgImage_Sandstorm[] = INCBIN_U32("graphics/battle_anims/backgrounds/sandstorm_brew.4bpp.lz");
|
||||||
|
|
||||||
const u32 gBattleAnimSpritePal_FlyingDirt[] = INCBIN_U32("graphics/battle_anims/sprites/flying_dirt.gbapal.lz");
|
const u32 gBattleAnimBgTilemap_Windstorm[] = INCBIN_U32("graphics/battle_anims/backgrounds/sandstorm_brew.bin.lz");
|
||||||
|
const u32 gBattleAnimBgImage_Windstorm[] = INCBIN_U32("graphics/battle_anims/backgrounds/windstorm_brew.4bpp.lz");
|
||||||
|
const u32 gBattleAnimSpritePal_Windstorm[] = INCBIN_U32("graphics/battle_anims/backgrounds/windstorm_brew.gbapal.lz");
|
||||||
|
|
||||||
const u32 gBattleAnimSpriteGfx_MetalSoundWaves[] = INCBIN_U32("graphics/battle_anims/sprites/metal_sound_waves.4bpp.lz");
|
const u32 gBattleAnimSpriteGfx_MetalSoundWaves[] = INCBIN_U32("graphics/battle_anims/sprites/metal_sound_waves.4bpp.lz");
|
||||||
const u32 gBattleAnimSpritePal_MetalSoundWaves[] = INCBIN_U32("graphics/battle_anims/sprites/metal_sound_waves.gbapal.lz");
|
const u32 gBattleAnimSpritePal_MetalSoundWaves[] = INCBIN_U32("graphics/battle_anims/sprites/metal_sound_waves.gbapal.lz");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user