Clean up rayquaza scene documentation

This commit is contained in:
GriffinR 2020-08-27 15:36:48 -04:00
parent a220d3986f
commit 38d4fc9c17
13 changed files with 213 additions and 197 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 261 B

After

Width:  |  Height:  |  Size: 261 B

View File

Before

Width:  |  Height:  |  Size: 179 B

After

Width:  |  Height:  |  Size: 179 B

Binary file not shown.

View File

Before

Width:  |  Height:  |  Size: 339 B

After

Width:  |  Height:  |  Size: 339 B

View File

@ -3313,34 +3313,24 @@ extern const u32 gRaySceneDuoFight_Groudon_Gfx[];
extern const u32 gRaySceneDuoFight_GroudonShoulder_Gfx[]; extern const u32 gRaySceneDuoFight_GroudonShoulder_Gfx[];
extern const u32 gRaySceneDuoFight_GroudonClaw_Gfx[]; extern const u32 gRaySceneDuoFight_GroudonClaw_Gfx[];
extern const u32 gRaySceneDuoFight_Kyogre_Gfx[]; extern const u32 gRaySceneDuoFight_Kyogre_Gfx[];
extern const u32 gRaySceneDuoFight_KyogreShoulder_Gfx[]; extern const u32 gRaySceneDuoFight_KyogrePectoralFin_Gfx[];
extern const u32 gRaySceneDuoFight_KyogreFin_Gfx[]; extern const u32 gRaySceneDuoFight_KyogreDorsalFin_Gfx[];
extern const u32 gRaySceneDuoFight_Groudon_Pal[]; extern const u32 gRaySceneDuoFight_Groudon_Pal[];
extern const u32 gRaySceneDuoFight_Kyogre_Pal[]; extern const u32 gRaySceneDuoFight_Kyogre_Pal[];
extern const u32 gRaySceneDuoFight_Clouds_Gfx[];
extern const u32 gRaySceneDuoFight_Clouds_Pal[];
extern const u32 gRaySceneDuoFight_Clouds1_Tilemap[];
extern const u32 gRaySceneDuoFight_Clouds2_Tilemap[];
extern const u32 gRaySceneDuoFight_Clouds3_Tilemap[];
extern const u32 gRaySceneTakesFlight_Smoke_Gfx[]; extern const u32 gRaySceneTakesFlight_Smoke_Gfx[];
extern const u32 gRaySceneTakesFlight_Smoke_Pal[]; extern const u32 gRaySceneTakesFlight_Smoke_Pal[];
extern const u32 gRaySceneTakesFlight_Rayquaza_Pal[]; extern const u32 gRaySceneTakesFlight_Rayquaza_Pal[];
extern const u32 gRaySceneDescends_Rayquaza_Gfx[];
extern const u32 gRaySceneDescends_RayquazaTail_Gfx[];
extern const u32 gRaySceneChasesAway_Groudon_Gfx[];
extern const u32 gRaySceneChasesAway_GroudonTail_Gfx[];
extern const u32 gRaySceneChasesAway_Kyogre_Gfx[];
extern const u32 gRaySceneChasesAway_Rayquaza_Gfx[];
extern const u32 gRaySceneChasesAway_RayquazaTail_Gfx[];
extern const u32 gRaySceneTakesFlight_Bg_Gfx[]; extern const u32 gRaySceneTakesFlight_Bg_Gfx[];
extern const u32 gRaySceneTakesFlight_Bg_Tilemap[]; extern const u32 gRaySceneTakesFlight_Bg_Tilemap[];
extern const u32 gRaySceneTakesFlight_Rayquaza_Gfx[]; extern const u32 gRaySceneTakesFlight_Rayquaza_Gfx[];
extern const u32 gRaySceneTakesFlight_Rayquaza_Tilemap[]; extern const u32 gRaySceneTakesFlight_Rayquaza_Tilemap[];
extern const u32 gRaySceneChasesAway_KyogreSplash_Gfx[]; extern const u32 gRaySceneDescends_Rayquaza_Gfx[];
extern const u32 gRaySceneChasesAway_Groudon_Pal[]; extern const u32 gRaySceneDescends_RayquazaTail_Gfx[];
extern const u32 gRaySceneChasesAway_Kyogre_Pal[];
extern const u32 gRaySceneChasesAway_Rayquaza_Pal[];
extern const u32 gRaySceneChasesAway_KyogreSplash_Pal[];
extern const u32 gRaySceneDuoFight_Clouds_Gfx[];
extern const u32 gRaySceneDuoFight_Clouds_Pal[];
extern const u32 gRaySceneDuoFight_Clouds2_Tilemap[];
extern const u32 gRaySceneDuoFight_Clouds1_Tilemap[];
extern const u32 gRaySceneDuoFight_Clouds3_Tilemap[];
extern const u32 gRaySceneDescends_Light_Gfx[]; extern const u32 gRaySceneDescends_Light_Gfx[];
extern const u32 gRaySceneDescends_Light_Tilemap[]; extern const u32 gRaySceneDescends_Light_Tilemap[];
extern const u32 gRaySceneDescends_Bg_Gfx[]; extern const u32 gRaySceneDescends_Bg_Gfx[];
@ -3349,16 +3339,26 @@ extern const u32 gRaySceneDescends_Bg_Pal[];
extern const u32 gRaySceneCharges_Rayquaza_Gfx[]; extern const u32 gRaySceneCharges_Rayquaza_Gfx[];
extern const u32 gRaySceneCharges_Streaks_Gfx[]; extern const u32 gRaySceneCharges_Streaks_Gfx[];
extern const u32 gRaySceneCharges_Bg_Gfx[]; extern const u32 gRaySceneCharges_Bg_Gfx[];
extern const u32 gRaySceneCharges_Rayquaza2_Tilemap[]; extern const u32 gRaySceneCharges_Orbs_Tilemap[];
extern const u32 gRaySceneCharges_Rayquaza_Tilemap[]; extern const u32 gRaySceneCharges_Rayquaza_Tilemap[];
extern const u32 gRaySceneCharges_Streaks_Tilemap[]; extern const u32 gRaySceneCharges_Streaks_Tilemap[];
extern const u32 gRaySceneCharges_Bg_Tilemap[]; extern const u32 gRaySceneCharges_Bg_Tilemap[];
extern const u32 gRaySceneCharges_Bg_Pal[]; extern const u32 gRaySceneCharges_Bg_Pal[];
extern const u32 gRaySceneChasesAway_Ring_Tilemap[]; extern const u32 gRaySceneChasesAway_Groudon_Gfx[];
extern const u32 gRaySceneChasesAway_GroudonTail_Gfx[];
extern const u32 gRaySceneChasesAway_Kyogre_Gfx[];
extern const u32 gRaySceneChasesAway_Rayquaza_Gfx[];
extern const u32 gRaySceneChasesAway_RayquazaTail_Gfx[];
extern const u32 gRaySceneChasesAway_KyogreSplash_Gfx[];
extern const u32 gRaySceneChasesAway_Groudon_Pal[];
extern const u32 gRaySceneChasesAway_Kyogre_Pal[];
extern const u32 gRaySceneChasesAway_Rayquaza_Pal[];
extern const u32 gRaySceneChasesAway_KyogreSplash_Pal[];
extern const u32 gRaySceneChasesAway_Bg_Tilemap[]; extern const u32 gRaySceneChasesAway_Bg_Tilemap[];
extern const u32 gRaySceneChasesAway_Ring_Map[]; extern const u32 gRaySceneChasesAway_Light_Tilemap[];
extern const u32 gRaySceneChasesAway_Ring_Tilemap[];
extern const u32 gRaySceneChasesAway_Bg_Pal[]; extern const u32 gRaySceneChasesAway_Bg_Pal[];
extern const u32 gRaySceneChasesAway_Bg_Gfx[]; extern const u32 gRaySceneChasesAway_Light_Gfx[];
extern const u32 gRaySceneChasesAway_Ring_Gfx[]; extern const u32 gRaySceneChasesAway_Ring_Gfx[];
// Pokeballs // Pokeballs

View File

@ -1,17 +1,17 @@
// Scene 1 (RAY_ANIM_DUO_FIGHT / RAY_ANIM_DUO_FIGHT_PRE) // Scene 1 (RAY_ANIM_DUO_FIGHT / RAY_ANIM_DUO_FIGHT_PRE)
const u32 gRaySceneDuoFight_Groudon_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_1/groudon.4bpp.lz"); const u32 gRaySceneDuoFight_Groudon_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_1/groudon.4bpp.lz");
const u32 gRaySceneDuoFight_GroudonShoulder_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_1/groudon_shoulder.4bpp.lz"); const u32 gRaySceneDuoFight_GroudonShoulder_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_1/groudon_shoulder.4bpp.lz");
const u32 gRaySceneDuoFight_GroudonClaw_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_1/groudon_claw.4bpp.lz"); const u32 gRaySceneDuoFight_GroudonClaw_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_1/groudon_claw.4bpp.lz");
const u32 gRaySceneDuoFight_Kyogre_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_1/kyogre.4bpp.lz"); const u32 gRaySceneDuoFight_Kyogre_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_1/kyogre.4bpp.lz");
const u32 gRaySceneDuoFight_KyogreShoulder_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_1/kyogre_shoulder.4bpp.lz"); const u32 gRaySceneDuoFight_KyogrePectoralFin_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_1/kyogre_pectoral_fin.4bpp.lz");
const u32 gRaySceneDuoFight_KyogreFin_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_1/kyogre_fin.4bpp.lz"); const u32 gRaySceneDuoFight_KyogreDorsalFin_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_1/kyogre_dorsal_fin.4bpp.lz");
const u32 gRaySceneDuoFight_Groudon_Pal[] = INCBIN_U32("graphics/rayquaza_scene/scene_1/groudon.gbapal.lz"); const u32 gRaySceneDuoFight_Groudon_Pal[] = INCBIN_U32("graphics/rayquaza_scene/scene_1/groudon.gbapal.lz");
const u32 gRaySceneDuoFight_Kyogre_Pal[] = INCBIN_U32("graphics/rayquaza_scene/scene_1/kyogre.gbapal.lz"); const u32 gRaySceneDuoFight_Kyogre_Pal[] = INCBIN_U32("graphics/rayquaza_scene/scene_1/kyogre.gbapal.lz");
const u32 gRaySceneDuoFight_Clouds_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_1/clouds.4bpp.lz"); const u32 gRaySceneDuoFight_Clouds_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_1/clouds.4bpp.lz");
const u32 gRaySceneDuoFight_Clouds_Pal[] = INCBIN_U32("graphics/rayquaza_scene/scene_1/clouds.gbapal.lz"); // pal 1 clouds, pal 2 rain const u32 gRaySceneDuoFight_Clouds_Pal[] = INCBIN_U32("graphics/rayquaza_scene/scene_1/clouds.gbapal.lz"); // pal 1 clouds, pal 2 rain
const u32 gRaySceneDuoFight_Clouds1_Tilemap[] = INCBIN_U32("graphics/rayquaza_scene/scene_1/clouds1.bin.lz"); const u32 gRaySceneDuoFight_Clouds1_Tilemap[] = INCBIN_U32("graphics/rayquaza_scene/scene_1/clouds1.bin.lz");
const u32 gRaySceneDuoFight_Clouds2_Tilemap[] = INCBIN_U32("graphics/rayquaza_scene/scene_1/clouds2.bin.lz"); const u32 gRaySceneDuoFight_Clouds2_Tilemap[] = INCBIN_U32("graphics/rayquaza_scene/scene_1/clouds2.bin.lz");
const u32 gRaySceneDuoFight_Clouds3_Tilemap[] = INCBIN_U32("graphics/rayquaza_scene/scene_1/clouds3.bin.lz"); const u32 gRaySceneDuoFight_Clouds3_Tilemap[] = INCBIN_U32("graphics/rayquaza_scene/scene_1/clouds3.bin.lz");
// Scene 2 (RAY_ANIM_TAKES_FLIGHT) // Scene 2 (RAY_ANIM_TAKES_FLIGHT)
const u32 gRaySceneTakesFlight_Smoke_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_2/smoke.4bpp.lz"); const u32 gRaySceneTakesFlight_Smoke_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_2/smoke.4bpp.lz");
@ -34,14 +34,14 @@ const u32 gRaySceneDescends_Bg_Tilemap[] = INCBIN_U32("graphics/rayquaza_s
const u32 gRaySceneDescends_Light_Tilemap[] = INCBIN_U32("graphics/rayquaza_scene/scene_3/light.bin.lz"); const u32 gRaySceneDescends_Light_Tilemap[] = INCBIN_U32("graphics/rayquaza_scene/scene_3/light.bin.lz");
// Scene 4 (RAY_ANIM_CHARGES) // Scene 4 (RAY_ANIM_CHARGES)
const u32 gRaySceneCharges_Bg_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_4/bg.4bpp.lz"); const u32 gRaySceneCharges_Bg_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_4/bg.4bpp.lz");
const u32 gRaySceneCharges_Bg_Tilemap[] = INCBIN_U32("graphics/rayquaza_scene/scene_4/bg.bin.lz"); const u32 gRaySceneCharges_Bg_Tilemap[] = INCBIN_U32("graphics/rayquaza_scene/scene_4/bg.bin.lz");
const u32 gRaySceneCharges_Streaks_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_4/streaks.4bpp.lz"); const u32 gRaySceneCharges_Streaks_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_4/streaks.4bpp.lz");
const u32 gRaySceneCharges_Streaks_Tilemap[] = INCBIN_U32("graphics/rayquaza_scene/scene_4/streaks.bin.lz"); const u32 gRaySceneCharges_Streaks_Tilemap[] = INCBIN_U32("graphics/rayquaza_scene/scene_4/streaks.bin.lz");
const u32 gRaySceneCharges_Rayquaza_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_4/rayquaza.4bpp.lz"); const u32 gRaySceneCharges_Rayquaza_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_4/rayquaza.4bpp.lz");
const u32 gRaySceneCharges_Rayquaza_Tilemap[] = INCBIN_U32("graphics/rayquaza_scene/scene_4/rayquaza.bin.lz"); const u32 gRaySceneCharges_Rayquaza_Tilemap[] = INCBIN_U32("graphics/rayquaza_scene/scene_4/rayquaza.bin.lz");
const u32 gRaySceneCharges_Rayquaza2_Tilemap[] = INCBIN_U32("graphics/rayquaza_scene/scene_4/rayquaza2.bin.lz"); // TODO: Clarify const u32 gRaySceneCharges_Orbs_Tilemap[] = INCBIN_U32("graphics/rayquaza_scene/scene_4/orbs.bin.lz");
const u32 gRaySceneCharges_Bg_Pal[] = INCBIN_U32("graphics/rayquaza_scene/scene_4/bg.gbapal.lz"); const u32 gRaySceneCharges_Bg_Pal[] = INCBIN_U32("graphics/rayquaza_scene/scene_4/bg.gbapal.lz");
// Scene 5 (RAY_ANIM_CHASES_AWAY) // Scene 5 (RAY_ANIM_CHASES_AWAY)
const u32 gRaySceneChasesAway_Groudon_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_5/groudon.4bpp.lz"); const u32 gRaySceneChasesAway_Groudon_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_5/groudon.4bpp.lz");
@ -54,9 +54,9 @@ const u32 gRaySceneChasesAway_Groudon_Pal[] = INCBIN_U32("graphics/rayquaza
const u32 gRaySceneChasesAway_Kyogre_Pal[] = INCBIN_U32("graphics/rayquaza_scene/scene_5/kyogre.gbapal.lz"); const u32 gRaySceneChasesAway_Kyogre_Pal[] = INCBIN_U32("graphics/rayquaza_scene/scene_5/kyogre.gbapal.lz");
const u32 gRaySceneChasesAway_Rayquaza_Pal[] = INCBIN_U32("graphics/rayquaza_scene/scene_5/rayquaza.gbapal.lz"); const u32 gRaySceneChasesAway_Rayquaza_Pal[] = INCBIN_U32("graphics/rayquaza_scene/scene_5/rayquaza.gbapal.lz");
const u32 gRaySceneChasesAway_KyogreSplash_Pal[] = INCBIN_U32("graphics/rayquaza_scene/scene_5/kyogre_splash.gbapal.lz"); const u32 gRaySceneChasesAway_KyogreSplash_Pal[] = INCBIN_U32("graphics/rayquaza_scene/scene_5/kyogre_splash.gbapal.lz");
const u32 gRaySceneChasesAway_Bg_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_5/bg.4bpp.lz"); const u32 gRaySceneChasesAway_Light_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_5/light.4bpp.lz");
const u32 gRaySceneChasesAway_Ring_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_5/ring.8bpp.lz"); const u32 gRaySceneChasesAway_Ring_Gfx[] = INCBIN_U32("graphics/rayquaza_scene/scene_5/ring.8bpp.lz");
const u32 gRaySceneChasesAway_Light_Tilemap[] = INCBIN_U32("graphics/rayquaza_scene/scene_5/light.bin.lz");
const u32 gRaySceneChasesAway_Bg_Tilemap[] = INCBIN_U32("graphics/rayquaza_scene/scene_5/bg.bin.lz"); const u32 gRaySceneChasesAway_Bg_Tilemap[] = INCBIN_U32("graphics/rayquaza_scene/scene_5/bg.bin.lz");
const u32 gRaySceneChasesAway_Ring_Tilemap[] = INCBIN_U32("graphics/rayquaza_scene/scene_5/ring.bin.lz"); const u32 gRaySceneChasesAway_Ring_Tilemap[] = INCBIN_U32("graphics/rayquaza_scene/scene_5/ring.bin.lz");
const u32 gRaySceneChasesAway_Ring_Map[] = INCBIN_U32("graphics/rayquaza_scene/scene_5/ring_map.bin.lz"); // TODO: Clarify
const u32 gRaySceneChasesAway_Bg_Pal[] = INCBIN_U32("graphics/rayquaza_scene/scene_5/bg.gbapal.lz"); const u32 gRaySceneChasesAway_Bg_Pal[] = INCBIN_U32("graphics/rayquaza_scene/scene_5/bg.gbapal.lz");

View File

@ -52,7 +52,7 @@ static u8 UpdateFastPaletteFade(void);
static u8 UpdateHardwarePaletteFade(void); static u8 UpdateHardwarePaletteFade(void);
static void UpdateBlendRegisters(void); static void UpdateBlendRegisters(void);
static bool8 IsSoftwarePaletteFadeFinishing(void); static bool8 IsSoftwarePaletteFadeFinishing(void);
static void sub_80A2D54(u8 taskId); static void Task_BlendPalettesGradually(u8 taskId);
// palette buffers require alignment with agbcc because // palette buffers require alignment with agbcc because
// unaligned word reads are issued in BlendPalette otherwise // unaligned word reads are issued in BlendPalette otherwise
@ -956,7 +956,7 @@ void BlendPalettesGradually(u32 selectedPalettes, s8 delay, u8 coeff, u8 coeffTa
{ {
u8 taskId; u8 taskId;
taskId = CreateTask((void *)sub_80A2D54, priority); taskId = CreateTask((void *)Task_BlendPalettesGradually, priority);
gTasks[taskId].tCoeff = coeff; gTasks[taskId].tCoeff = coeff;
gTasks[taskId].tCoeffTarget = coeffTarget; gTasks[taskId].tCoeffTarget = coeffTarget;
@ -981,13 +981,13 @@ void BlendPalettesGradually(u32 selectedPalettes, s8 delay, u8 coeff, u8 coeffTa
} }
// Unused // Unused
static bool32 sub_80A2CF8(u8 id) static bool32 IsBlendPalettesGraduallyTaskActive(u8 id)
{ {
int i; int i;
for (i = 0; i < NUM_TASKS; i++) for (i = 0; i < NUM_TASKS; i++)
if ((gTasks[i].isActive == TRUE) if ((gTasks[i].isActive == TRUE)
&& (gTasks[i].func == sub_80A2D54) && (gTasks[i].func == Task_BlendPalettesGradually)
&& (gTasks[i].tId == id)) && (gTasks[i].tId == id))
return TRUE; return TRUE;
@ -995,20 +995,20 @@ static bool32 sub_80A2CF8(u8 id)
} }
// Unused // Unused
static void sub_80A2D34(void) static void DestroyBlendPalettesGraduallyTask(void)
{ {
u8 taskId; u8 taskId;
while (1) while (1)
{ {
taskId = FindTaskIdByFunc(sub_80A2D54); taskId = FindTaskIdByFunc(Task_BlendPalettesGradually);
if (taskId == 0xFF) if (taskId == 0xFF)
break; break;
DestroyTask(taskId); DestroyTask(taskId);
} }
} }
static void sub_80A2D54(u8 taskId) static void Task_BlendPalettesGradually(u8 taskId)
{ {
u32 palettes; u32 palettes;
s16 *data; s16 *data;

View File

@ -43,21 +43,21 @@ enum
RAY_ANIM_END RAY_ANIM_END
}; };
#define TAG_DUOFIGHT_GROUDON 30505 #define TAG_DUOFIGHT_GROUDON 30505
#define TAG_DUOFIGHT_GROUDON_SHOULDER 30506 #define TAG_DUOFIGHT_GROUDON_SHOULDER 30506
#define TAG_DUOFIGHT_GROUDON_CLAW 30507 #define TAG_DUOFIGHT_GROUDON_CLAW 30507
#define TAG_DUOFIGHT_KYOGRE 30508 #define TAG_DUOFIGHT_KYOGRE 30508
#define TAG_DUOFIGHT_KYOGRE_SHOULDER 30509 #define TAG_DUOFIGHT_KYOGRE_PECTORAL_FIN 30509
#define TAG_DUOFIGHT_KYOGRE_FIN 30510 #define TAG_DUOFIGHT_KYOGRE_DORSAL_FIN 30510
#define TAG_FLIGHT_SMOKE 30555 #define TAG_FLIGHT_SMOKE 30555
#define TAG_DESCENDS_RAYQUAZA 30556 #define TAG_DESCENDS_RAYQUAZA 30556
#define TAG_DESCENDS_RAYQUAZA_TAIL 30557 #define TAG_DESCENDS_RAYQUAZA_TAIL 30557
#define TAG_CHASE_GROUDON 30565 #define TAG_CHASE_GROUDON 30565
#define TAG_CHASE_GROUDON_TAIL 30566 #define TAG_CHASE_GROUDON_TAIL 30566
#define TAG_CHASE_KYOGRE 30568 #define TAG_CHASE_KYOGRE 30568
#define TAG_CHASE_RAYQUAZA 30569 #define TAG_CHASE_RAYQUAZA 30569
#define TAG_CHASE_RAYQUAZA_TAIL 30570 #define TAG_CHASE_RAYQUAZA_TAIL 30570
#define TAG_CHASE_SPLASH 30571 #define TAG_CHASE_SPLASH 30571
#define MAX_SMOKE 10 #define MAX_SMOKE 10
@ -286,7 +286,7 @@ static const struct OamData sOam_32x8 =
.affineParam = 0 .affineParam = 0
}; };
static const union AnimCmd sSpriteAnim_862A6FC[] = static const union AnimCmd sAnim_DuoFightPre_Groudon_Head[] =
{ {
ANIMCMD_FRAME(0, 30), ANIMCMD_FRAME(0, 30),
ANIMCMD_FRAME(64, 30), ANIMCMD_FRAME(64, 30),
@ -295,7 +295,7 @@ static const union AnimCmd sSpriteAnim_862A6FC[] =
ANIMCMD_JUMP(0), ANIMCMD_JUMP(0),
}; };
static const union AnimCmd sSpriteAnim_862A710[] = static const union AnimCmd sAnim_DuoFightPre_Groudon_Body[] =
{ {
ANIMCMD_FRAME(192, 30), ANIMCMD_FRAME(192, 30),
ANIMCMD_FRAME(256, 30), ANIMCMD_FRAME(256, 30),
@ -306,8 +306,8 @@ static const union AnimCmd sSpriteAnim_862A710[] =
static const union AnimCmd *const sAnims_DuoFightPre_Groudon[] = static const union AnimCmd *const sAnims_DuoFightPre_Groudon[] =
{ {
sSpriteAnim_862A6FC, sAnim_DuoFightPre_Groudon_Head,
sSpriteAnim_862A710 sAnim_DuoFightPre_Groudon_Body
}; };
static const struct SpriteTemplate sSpriteTemplate_DuoFightPre_Groudon = static const struct SpriteTemplate sSpriteTemplate_DuoFightPre_Groudon =
@ -321,15 +321,15 @@ static const struct SpriteTemplate sSpriteTemplate_DuoFightPre_Groudon =
.callback = SpriteCallbackDummy, .callback = SpriteCallbackDummy,
}; };
static const union AnimCmd sAnim_DuoFightPre_GroudonShoulderKyogreFin[] = static const union AnimCmd sAnim_DuoFightPre_GroudonShoulderKyogreDorsalFin[] =
{ {
ANIMCMD_FRAME(0, 1), ANIMCMD_FRAME(0, 1),
ANIMCMD_END ANIMCMD_END
}; };
static const union AnimCmd *const sAnims_DuoFightPre_GroudonShoulderKyogreFin[] = static const union AnimCmd *const sAnims_DuoFightPre_GroudonShoulderKyogreDorsalFin[] =
{ {
sAnim_DuoFightPre_GroudonShoulderKyogreFin sAnim_DuoFightPre_GroudonShoulderKyogreDorsalFin
}; };
static const struct SpriteTemplate sSpriteTemplate_DuoFightPre_GroudonShoulder = static const struct SpriteTemplate sSpriteTemplate_DuoFightPre_GroudonShoulder =
@ -337,7 +337,7 @@ static const struct SpriteTemplate sSpriteTemplate_DuoFightPre_GroudonShoulder =
.tileTag = TAG_DUOFIGHT_GROUDON_SHOULDER, .tileTag = TAG_DUOFIGHT_GROUDON_SHOULDER,
.paletteTag = TAG_DUOFIGHT_GROUDON, .paletteTag = TAG_DUOFIGHT_GROUDON,
.oam = &sOam_32x32, .oam = &sOam_32x32,
.anims = sAnims_DuoFightPre_GroudonShoulderKyogreFin, .anims = sAnims_DuoFightPre_GroudonShoulderKyogreDorsalFin,
.images = NULL, .images = NULL,
.affineAnims = gDummySpriteAffineAnimTable, .affineAnims = gDummySpriteAffineAnimTable,
.callback = SpriteCallbackDummy, .callback = SpriteCallbackDummy,
@ -365,43 +365,43 @@ static const struct SpriteTemplate sSpriteTemplate_DuoFightPre_GroudonClaw =
.callback = SpriteCallbackDummy, .callback = SpriteCallbackDummy,
}; };
static const union AnimCmd sSpriteAnim_862A78C[] = static const union AnimCmd sAnim_DuoFightPre_Kyogre_TopLeft[] =
{ {
ANIMCMD_FRAME(0, 1), ANIMCMD_FRAME(0, 1),
ANIMCMD_END ANIMCMD_END
}; };
static const union AnimCmd sSpriteAnim_862A794[] = static const union AnimCmd sAnim_DuoFightPre_Kyogre_TopRight[] =
{ {
ANIMCMD_FRAME(8, 1), ANIMCMD_FRAME(8, 1),
ANIMCMD_END ANIMCMD_END
}; };
static const union AnimCmd sSpriteAnim_862A79C[] = static const union AnimCmd sAnim_DuoFightPre_Kyogre_FaceLeft[] =
{ {
ANIMCMD_FRAME(16, 1), ANIMCMD_FRAME(16, 1),
ANIMCMD_END ANIMCMD_END
}; };
static const union AnimCmd sSpriteAnim_862A7A4[] = static const union AnimCmd sAnim_DuoFightPre_Kyogre_FaceRight[] =
{ {
ANIMCMD_FRAME(24, 1), ANIMCMD_FRAME(24, 1),
ANIMCMD_END ANIMCMD_END
}; };
static const union AnimCmd sSpriteAnim_862A7AC[] = static const union AnimCmd sAnim_DuoFightPre_Kyogre_ChinLeft[] =
{ {
ANIMCMD_FRAME(32, 1), ANIMCMD_FRAME(32, 1),
ANIMCMD_END ANIMCMD_END
}; };
static const union AnimCmd sSpriteAnim_862A7B4[] = static const union AnimCmd sAnim_DuoFightPre_Kyogre_ChinRight[] =
{ {
ANIMCMD_FRAME(40, 1), ANIMCMD_FRAME(40, 1),
ANIMCMD_END ANIMCMD_END
}; };
static const union AnimCmd sSpriteAnim_862A7BC[] = static const union AnimCmd sAnim_DuoFightPre_Kyogre_LeftPectoralFin[] =
{ {
ANIMCMD_FRAME(48, 36), ANIMCMD_FRAME(48, 36),
ANIMCMD_FRAME(64, 36), ANIMCMD_FRAME(64, 36),
@ -410,7 +410,7 @@ static const union AnimCmd sSpriteAnim_862A7BC[] =
ANIMCMD_JUMP(0), ANIMCMD_JUMP(0),
}; };
static const union AnimCmd sSpriteAnim_862A7D0[] = static const union AnimCmd sAnim_DuoFightPre_Kyogre_LeftShoulder[] =
{ {
ANIMCMD_FRAME(56, 36), ANIMCMD_FRAME(56, 36),
ANIMCMD_FRAME(72, 36), ANIMCMD_FRAME(72, 36),
@ -419,7 +419,7 @@ static const union AnimCmd sSpriteAnim_862A7D0[] =
ANIMCMD_JUMP(0), ANIMCMD_JUMP(0),
}; };
static const union AnimCmd sSpriteAnim_862A7E4[] = static const union AnimCmd sAnim_DuoFightPre_Kyogre_RightShoulder[] =
{ {
ANIMCMD_FRAME(96, 36), ANIMCMD_FRAME(96, 36),
ANIMCMD_FRAME(104, 36), ANIMCMD_FRAME(104, 36),
@ -428,17 +428,18 @@ static const union AnimCmd sSpriteAnim_862A7E4[] =
ANIMCMD_JUMP(0), ANIMCMD_JUMP(0),
}; };
// Edge of the right pectoral fin is its own sprite (see KyogrePectoralFin)
static const union AnimCmd *const sAnims_DuoFightPre_Kyogre[] = static const union AnimCmd *const sAnims_DuoFightPre_Kyogre[] =
{ {
sSpriteAnim_862A78C, sAnim_DuoFightPre_Kyogre_TopLeft,
sSpriteAnim_862A794, sAnim_DuoFightPre_Kyogre_TopRight,
sSpriteAnim_862A79C, sAnim_DuoFightPre_Kyogre_FaceLeft,
sSpriteAnim_862A7A4, sAnim_DuoFightPre_Kyogre_FaceRight,
sSpriteAnim_862A7AC, sAnim_DuoFightPre_Kyogre_ChinLeft,
sSpriteAnim_862A7B4, sAnim_DuoFightPre_Kyogre_ChinRight,
sSpriteAnim_862A7BC, sAnim_DuoFightPre_Kyogre_LeftPectoralFin,
sSpriteAnim_862A7D0, sAnim_DuoFightPre_Kyogre_LeftShoulder,
sSpriteAnim_862A7E4 sAnim_DuoFightPre_Kyogre_RightShoulder
}; };
static const struct SpriteTemplate sSpriteTemplate_DuoFightPre_Kyogre = static const struct SpriteTemplate sSpriteTemplate_DuoFightPre_Kyogre =
@ -452,7 +453,7 @@ static const struct SpriteTemplate sSpriteTemplate_DuoFightPre_Kyogre =
.callback = SpriteCallbackDummy, .callback = SpriteCallbackDummy,
}; };
static const union AnimCmd sAnim_DuoFightPre_KyogreShoulder[] = static const union AnimCmd sAnim_DuoFightPre_KyogrePectoralFin[] =
{ {
ANIMCMD_FRAME(0, 36), ANIMCMD_FRAME(0, 36),
ANIMCMD_FRAME(2, 36), ANIMCMD_FRAME(2, 36),
@ -461,28 +462,28 @@ static const union AnimCmd sAnim_DuoFightPre_KyogreShoulder[] =
ANIMCMD_JUMP(0), ANIMCMD_JUMP(0),
}; };
static const union AnimCmd *const sAnims_DuoFightPre_KyogreShoulder[] = static const union AnimCmd *const sAnims_DuoFightPre_KyogrePectoralFin[] =
{ {
sAnim_DuoFightPre_KyogreShoulder sAnim_DuoFightPre_KyogrePectoralFin
}; };
static const struct SpriteTemplate sSpriteTemplate_DuoFightPre_KyogreShoulder = static const struct SpriteTemplate sSpriteTemplate_DuoFightPre_KyogrePectoralFin =
{ {
.tileTag = TAG_DUOFIGHT_KYOGRE_SHOULDER, .tileTag = TAG_DUOFIGHT_KYOGRE_PECTORAL_FIN,
.paletteTag = TAG_DUOFIGHT_KYOGRE, .paletteTag = TAG_DUOFIGHT_KYOGRE,
.oam = &sOam_16x8, .oam = &sOam_16x8,
.anims = sAnims_DuoFightPre_KyogreShoulder, .anims = sAnims_DuoFightPre_KyogrePectoralFin,
.images = NULL, .images = NULL,
.affineAnims = gDummySpriteAffineAnimTable, .affineAnims = gDummySpriteAffineAnimTable,
.callback = SpriteCallbackDummy, .callback = SpriteCallbackDummy,
}; };
static const struct SpriteTemplate sSpriteTemplate_DuoFightPre_KyogreFin = static const struct SpriteTemplate sSpriteTemplate_DuoFightPre_KyogreDorsalFin =
{ {
.tileTag = TAG_DUOFIGHT_KYOGRE_FIN, .tileTag = TAG_DUOFIGHT_KYOGRE_DORSAL_FIN,
.paletteTag = TAG_DUOFIGHT_KYOGRE, .paletteTag = TAG_DUOFIGHT_KYOGRE,
.oam = &sOam_32x32, .oam = &sOam_32x32,
.anims = sAnims_DuoFightPre_GroudonShoulderKyogreFin, .anims = sAnims_DuoFightPre_GroudonShoulderKyogreDorsalFin,
.images = NULL, .images = NULL,
.affineAnims = gDummySpriteAffineAnimTable, .affineAnims = gDummySpriteAffineAnimTable,
.callback = SpriteCallbackDummy, .callback = SpriteCallbackDummy,
@ -526,7 +527,7 @@ static const struct BgTemplate sBgTemplates_DuoFight[] =
}, },
}; };
static const union AnimCmd sSpriteAnim_862A894[] = static const union AnimCmd sAnim_DuoFight_Groudon_Head[] =
{ {
ANIMCMD_FRAME(0, 20), ANIMCMD_FRAME(0, 20),
ANIMCMD_FRAME(64, 20), ANIMCMD_FRAME(64, 20),
@ -535,7 +536,7 @@ static const union AnimCmd sSpriteAnim_862A894[] =
ANIMCMD_JUMP(0), ANIMCMD_JUMP(0),
}; };
static const union AnimCmd sSpriteAnim_862A8A8[] = static const union AnimCmd sAnim_DuoFight_Groudon_Body[] =
{ {
ANIMCMD_FRAME(192, 20), ANIMCMD_FRAME(192, 20),
ANIMCMD_FRAME(256, 20), ANIMCMD_FRAME(256, 20),
@ -546,8 +547,8 @@ static const union AnimCmd sSpriteAnim_862A8A8[] =
static const union AnimCmd *const sAnims_DuoFight_Groudon[] = static const union AnimCmd *const sAnims_DuoFight_Groudon[] =
{ {
sSpriteAnim_862A894, sAnim_DuoFight_Groudon_Head,
sSpriteAnim_862A8A8 sAnim_DuoFight_Groudon_Body
}; };
static const struct CompressedSpriteSheet sSpriteSheet_DuoFight_Groudon = static const struct CompressedSpriteSheet sSpriteSheet_DuoFight_Groudon =
@ -571,15 +572,15 @@ static const struct SpriteTemplate sSpriteTemplate_DuoFight_Groudon =
.callback = SpriteCallbackDummy, .callback = SpriteCallbackDummy,
}; };
static const union AnimCmd sAnim_DuoFight_GroudonShoulderKyogreFin[] = static const union AnimCmd sAnim_DuoFight_GroudonShoulderKyogreDorsalFin[] =
{ {
ANIMCMD_FRAME(0, 1), ANIMCMD_FRAME(0, 1),
ANIMCMD_END ANIMCMD_END
}; };
static const union AnimCmd *const sAnims_DuoFight_GroudonShoulderKyogreFin[] = static const union AnimCmd *const sAnims_DuoFight_GroudonShoulderKyogreDorsalFin[] =
{ {
sAnim_DuoFight_GroudonShoulderKyogreFin sAnim_DuoFight_GroudonShoulderKyogreDorsalFin
}; };
static const struct CompressedSpriteSheet sSpriteSheet_DuoFight_GroudonShoulder = static const struct CompressedSpriteSheet sSpriteSheet_DuoFight_GroudonShoulder =
@ -592,7 +593,7 @@ static const struct SpriteTemplate sSpriteTemplate_DuoFight_GroudonShoulder =
.tileTag = TAG_DUOFIGHT_GROUDON_SHOULDER, .tileTag = TAG_DUOFIGHT_GROUDON_SHOULDER,
.paletteTag = TAG_DUOFIGHT_GROUDON, .paletteTag = TAG_DUOFIGHT_GROUDON,
.oam = &sOam_32x32, .oam = &sOam_32x32,
.anims = sAnims_DuoFight_GroudonShoulderKyogreFin, .anims = sAnims_DuoFight_GroudonShoulderKyogreDorsalFin,
.images = NULL, .images = NULL,
.affineAnims = gDummySpriteAffineAnimTable, .affineAnims = gDummySpriteAffineAnimTable,
.callback = SpriteCallbackDummy, .callback = SpriteCallbackDummy,
@ -625,43 +626,43 @@ static const struct SpriteTemplate sSpriteTemplate_DuoFight_GroudonClaw =
.callback = SpriteCallbackDummy, .callback = SpriteCallbackDummy,
}; };
static const union AnimCmd sSpriteAnim_862A944[] = static const union AnimCmd sAnim_DuoFight_Kyogre_TopLeft[] =
{ {
ANIMCMD_FRAME(0, 1), ANIMCMD_FRAME(0, 1),
ANIMCMD_END ANIMCMD_END
}; };
static const union AnimCmd sSpriteAnim_862A94C[] = static const union AnimCmd sAnim_DuoFight_Kyogre_TopRight[] =
{ {
ANIMCMD_FRAME(8, 1), ANIMCMD_FRAME(8, 1),
ANIMCMD_END ANIMCMD_END
}; };
static const union AnimCmd sSpriteAnim_862A954[] = static const union AnimCmd sAnim_DuoFight_Kyogre_FaceLeft[] =
{ {
ANIMCMD_FRAME(16, 1), ANIMCMD_FRAME(16, 1),
ANIMCMD_END ANIMCMD_END
}; };
static const union AnimCmd sSpriteAnim_862A95C[] = static const union AnimCmd sAnim_DuoFight_Kyogre_FaceRight[] =
{ {
ANIMCMD_FRAME(24, 1), ANIMCMD_FRAME(24, 1),
ANIMCMD_END ANIMCMD_END
}; };
static const union AnimCmd sSpriteAnim_862A964[] = static const union AnimCmd sAnim_DuoFight_Kyogre_ChinLeft[] =
{ {
ANIMCMD_FRAME(32, 1), ANIMCMD_FRAME(32, 1),
ANIMCMD_END ANIMCMD_END
}; };
static const union AnimCmd sSpriteAnim_862A96C[] = static const union AnimCmd sAnim_DuoFight_Kyogre_ChinRight[] =
{ {
ANIMCMD_FRAME(40, 1), ANIMCMD_FRAME(40, 1),
ANIMCMD_END ANIMCMD_END
}; };
static const union AnimCmd sSpriteAnim_862A974[] = static const union AnimCmd sAnim_DuoFight_Kyogre_LeftPectoralFin[] =
{ {
ANIMCMD_FRAME(48, 24), ANIMCMD_FRAME(48, 24),
ANIMCMD_FRAME(64, 24), ANIMCMD_FRAME(64, 24),
@ -670,7 +671,7 @@ static const union AnimCmd sSpriteAnim_862A974[] =
ANIMCMD_JUMP(0), ANIMCMD_JUMP(0),
}; };
static const union AnimCmd sSpriteAnim_862A988[] = static const union AnimCmd sAnim_DuoFight_Kyogre_LeftShoulder[] =
{ {
ANIMCMD_FRAME(56, 24), ANIMCMD_FRAME(56, 24),
ANIMCMD_FRAME(72, 24), ANIMCMD_FRAME(72, 24),
@ -679,7 +680,7 @@ static const union AnimCmd sSpriteAnim_862A988[] =
ANIMCMD_JUMP(0), ANIMCMD_JUMP(0),
}; };
static const union AnimCmd sSpriteAnim_862A99C[] = static const union AnimCmd sAnim_DuoFight_Kyogre_RightShoulder[] =
{ {
ANIMCMD_FRAME(96, 24), ANIMCMD_FRAME(96, 24),
ANIMCMD_FRAME(104, 24), ANIMCMD_FRAME(104, 24),
@ -690,15 +691,15 @@ static const union AnimCmd sSpriteAnim_862A99C[] =
static const union AnimCmd *const sAnims_DuoFight_Kyogre[] = static const union AnimCmd *const sAnims_DuoFight_Kyogre[] =
{ {
sSpriteAnim_862A944, sAnim_DuoFight_Kyogre_TopLeft,
sSpriteAnim_862A94C, sAnim_DuoFight_Kyogre_TopRight,
sSpriteAnim_862A954, sAnim_DuoFight_Kyogre_FaceLeft,
sSpriteAnim_862A95C, sAnim_DuoFight_Kyogre_FaceRight,
sSpriteAnim_862A964, sAnim_DuoFight_Kyogre_ChinLeft,
sSpriteAnim_862A96C, sAnim_DuoFight_Kyogre_ChinRight,
sSpriteAnim_862A974, sAnim_DuoFight_Kyogre_LeftPectoralFin,
sSpriteAnim_862A988, sAnim_DuoFight_Kyogre_LeftShoulder,
sSpriteAnim_862A99C sAnim_DuoFight_Kyogre_RightShoulder
}; };
static const struct CompressedSpriteSheet sSpriteSheet_DuoFight_Kyogre = static const struct CompressedSpriteSheet sSpriteSheet_DuoFight_Kyogre =
@ -722,7 +723,7 @@ static const struct SpriteTemplate sSpriteTemplate_DuoFight_Kyogre =
.callback = SpriteCallbackDummy, .callback = SpriteCallbackDummy,
}; };
static const union AnimCmd sAnim_DuoFight_KyogreShoulder[] = static const union AnimCmd sAnim_DuoFight_KyogrePectoralFin[] =
{ {
ANIMCMD_FRAME(0, 24), ANIMCMD_FRAME(0, 24),
ANIMCMD_FRAME(2, 24), ANIMCMD_FRAME(2, 24),
@ -731,38 +732,38 @@ static const union AnimCmd sAnim_DuoFight_KyogreShoulder[] =
ANIMCMD_JUMP(0), ANIMCMD_JUMP(0),
}; };
static const union AnimCmd *const sAnims_DuoFight_KyogreShoulder[] = static const union AnimCmd *const sAnims_DuoFight_KyogrePectoralFin[] =
{ {
sAnim_DuoFight_KyogreShoulder sAnim_DuoFight_KyogrePectoralFin
}; };
static const struct CompressedSpriteSheet sSpriteSheet_DuoFight_KyogreShoulder = static const struct CompressedSpriteSheet sSpriteSheet_DuoFight_KyogrePectoralFin =
{ {
gRaySceneDuoFight_KyogreShoulder_Gfx, 0xC0, TAG_DUOFIGHT_KYOGRE_SHOULDER gRaySceneDuoFight_KyogrePectoralFin_Gfx, 0xC0, TAG_DUOFIGHT_KYOGRE_PECTORAL_FIN
}; };
static const struct SpriteTemplate sSpriteTemplate_DuoFight_KyogreShoulder = static const struct SpriteTemplate sSpriteTemplate_DuoFight_KyogrePectoralFin =
{ {
.tileTag = TAG_DUOFIGHT_KYOGRE_SHOULDER, .tileTag = TAG_DUOFIGHT_KYOGRE_PECTORAL_FIN,
.paletteTag = TAG_DUOFIGHT_KYOGRE, .paletteTag = TAG_DUOFIGHT_KYOGRE,
.oam = &sOam_16x8, .oam = &sOam_16x8,
.anims = sAnims_DuoFight_KyogreShoulder, .anims = sAnims_DuoFight_KyogrePectoralFin,
.images = NULL, .images = NULL,
.affineAnims = gDummySpriteAffineAnimTable, .affineAnims = gDummySpriteAffineAnimTable,
.callback = SpriteCallbackDummy, .callback = SpriteCallbackDummy,
}; };
static const struct CompressedSpriteSheet sSpriteSheet_DuoFight_KyogreFin = static const struct CompressedSpriteSheet sSpriteSheet_DuoFight_KyogreDorsalFin =
{ {
gRaySceneDuoFight_KyogreFin_Gfx, 0x200, TAG_DUOFIGHT_KYOGRE_FIN gRaySceneDuoFight_KyogreDorsalFin_Gfx, 0x200, TAG_DUOFIGHT_KYOGRE_DORSAL_FIN
}; };
static const struct SpriteTemplate sSpriteTemplate_DuoFight_KyogreFin = static const struct SpriteTemplate sSpriteTemplate_DuoFight_KyogreDorsalFin =
{ {
.tileTag = TAG_DUOFIGHT_KYOGRE_FIN, .tileTag = TAG_DUOFIGHT_KYOGRE_DORSAL_FIN,
.paletteTag = TAG_DUOFIGHT_KYOGRE, .paletteTag = TAG_DUOFIGHT_KYOGRE,
.oam = &sOam_32x32, .oam = &sOam_32x32,
.anims = sAnims_DuoFight_GroudonShoulderKyogreFin, .anims = sAnims_DuoFight_GroudonShoulderKyogreDorsalFin,
.images = NULL, .images = NULL,
.affineAnims = gDummySpriteAffineAnimTable, .affineAnims = gDummySpriteAffineAnimTable,
.callback = SpriteCallbackDummy, .callback = SpriteCallbackDummy,
@ -999,13 +1000,13 @@ static const struct BgTemplate sBgTemplates_Charges[] =
} }
}; };
static const union AnimCmd sSpriteAnim_862AB54[] = static const union AnimCmd sAnim_ChasesAway_Groudon_Still[] =
{ {
ANIMCMD_FRAME(0, 1), ANIMCMD_FRAME(0, 1),
ANIMCMD_END ANIMCMD_END
}; };
static const union AnimCmd sSpriteAnim_862AB5C[] = static const union AnimCmd sAnim_ChasesAway_Groudon_Moving[] =
{ {
ANIMCMD_FRAME(0, 48), ANIMCMD_FRAME(0, 48),
ANIMCMD_FRAME(64, 32), ANIMCMD_FRAME(64, 32),
@ -1016,8 +1017,8 @@ static const union AnimCmd sSpriteAnim_862AB5C[] =
static const union AnimCmd *const sAnims_ChasesAway_Groudon[] = static const union AnimCmd *const sAnims_ChasesAway_Groudon[] =
{ {
sSpriteAnim_862AB54, sAnim_ChasesAway_Groudon_Still,
sSpriteAnim_862AB5C sAnim_ChasesAway_Groudon_Moving
}; };
static const union AnimCmd sAnim_ChasesAway_GroudonTail[] = static const union AnimCmd sAnim_ChasesAway_GroudonTail[] =
@ -1031,19 +1032,19 @@ static const union AnimCmd *const sAnims_ChasesAway_GroudonTail[] =
sAnim_ChasesAway_GroudonTail, sAnim_ChasesAway_GroudonTail,
}; };
static const union AnimCmd sSpriteAnim_862AB84[] = static const union AnimCmd sAnim_ChasesAway_Kyogre_Front[] =
{ {
ANIMCMD_FRAME(0, 1), ANIMCMD_FRAME(0, 1),
ANIMCMD_END ANIMCMD_END
}; };
static const union AnimCmd sSpriteAnim_862AB8C[] = static const union AnimCmd sAnim_ChasesAway_Kyogre_Back[] =
{ {
ANIMCMD_FRAME(16, 1), ANIMCMD_FRAME(16, 1),
ANIMCMD_END ANIMCMD_END
}; };
static const union AnimCmd sSpriteAnim_862AB94[] = static const union AnimCmd sAnim_ChasesAway_Kyogre_Tail[] =
{ {
ANIMCMD_FRAME(32, 1), ANIMCMD_FRAME(32, 1),
ANIMCMD_END ANIMCMD_END
@ -1051,30 +1052,30 @@ static const union AnimCmd sSpriteAnim_862AB94[] =
static const union AnimCmd *const sAnims_ChasesAway_Kyogre[] = static const union AnimCmd *const sAnims_ChasesAway_Kyogre[] =
{ {
sSpriteAnim_862AB84, sAnim_ChasesAway_Kyogre_Front,
sSpriteAnim_862AB8C, sAnim_ChasesAway_Kyogre_Back,
sSpriteAnim_862AB94 sAnim_ChasesAway_Kyogre_Tail
}; };
static const union AnimCmd sSpriteAnim_862ABA8[] = static const union AnimCmd sAnim_ChasesAway_Rayquaza_FlyingDown[] =
{ {
ANIMCMD_FRAME(0, 1), ANIMCMD_FRAME(0, 1),
ANIMCMD_END ANIMCMD_END
}; };
static const union AnimCmd sSpriteAnim_862ABB0[] = static const union AnimCmd sAnim_ChasesAway_Rayquaza_Arriving[] =
{ {
ANIMCMD_FRAME(64, 1), ANIMCMD_FRAME(64, 1),
ANIMCMD_END ANIMCMD_END
}; };
static const union AnimCmd sSpriteAnim_862ABB8[] = static const union AnimCmd sAnim_ChasesAway_Rayquaza_Floating[] =
{ {
ANIMCMD_FRAME(128, 1), ANIMCMD_FRAME(128, 1),
ANIMCMD_END ANIMCMD_END
}; };
static const union AnimCmd sSpriteAnim_862ABC0[] = static const union AnimCmd sAnim_ChasesAway_Rayquaza_Shouting[] =
{ {
ANIMCMD_FRAME(192, 1), ANIMCMD_FRAME(192, 1),
ANIMCMD_END ANIMCMD_END
@ -1082,31 +1083,31 @@ static const union AnimCmd sSpriteAnim_862ABC0[] =
static const union AnimCmd *const sAnims_ChasesAway_Rayquaza[] = static const union AnimCmd *const sAnims_ChasesAway_Rayquaza[] =
{ {
sSpriteAnim_862ABA8, sAnim_ChasesAway_Rayquaza_FlyingDown,
sSpriteAnim_862ABB0, sAnim_ChasesAway_Rayquaza_Arriving,
sSpriteAnim_862ABB8, sAnim_ChasesAway_Rayquaza_Floating,
sSpriteAnim_862ABC0 sAnim_ChasesAway_Rayquaza_Shouting
}; };
static const union AnimCmd sSpriteAnim_862ABD8[] = static const union AnimCmd sAnim_ChasesAway_RayquazaTail_FlyingDown[] =
{ {
ANIMCMD_FRAME(0, 1), ANIMCMD_FRAME(0, 1),
ANIMCMD_END ANIMCMD_END
}; };
static const union AnimCmd sSpriteAnim_862ABE0[] = static const union AnimCmd sAnim_ChasesAway_RayquazaTail_Arriving[] =
{ {
ANIMCMD_FRAME(16, 1), ANIMCMD_FRAME(16, 1),
ANIMCMD_END ANIMCMD_END
}; };
static const union AnimCmd sSpriteAnim_862ABE8[] = static const union AnimCmd sAnim_ChasesAway_RayquazaTail_Floating[] =
{ {
ANIMCMD_FRAME(32, 1), ANIMCMD_FRAME(32, 1),
ANIMCMD_END ANIMCMD_END
}; };
static const union AnimCmd sSpriteAnim_862ABF0[] = static const union AnimCmd sAnim_ChasesAway_RayquazaTail_Shouting[] =
{ {
ANIMCMD_FRAME(48, 1), ANIMCMD_FRAME(48, 1),
ANIMCMD_END ANIMCMD_END
@ -1114,10 +1115,10 @@ static const union AnimCmd sSpriteAnim_862ABF0[] =
static const union AnimCmd *const sAnims_ChasesAway_RayquazaTail[] = static const union AnimCmd *const sAnims_ChasesAway_RayquazaTail[] =
{ {
sSpriteAnim_862ABD8, sAnim_ChasesAway_RayquazaTail_FlyingDown,
sSpriteAnim_862ABE0, sAnim_ChasesAway_RayquazaTail_Arriving,
sSpriteAnim_862ABE8, sAnim_ChasesAway_RayquazaTail_Floating,
sSpriteAnim_862ABF0 sAnim_ChasesAway_RayquazaTail_Shouting
}; };
static const union AnimCmd sAnim_ChasesAway_KyogreSplash[] = static const union AnimCmd sAnim_ChasesAway_KyogreSplash[] =
@ -1369,7 +1370,10 @@ static void ResetWindowDimensions(void)
SetGpuReg(REG_OFFSET_WINOUT, WINOUT_WIN01_ALL); SetGpuReg(REG_OFFSET_WINOUT, WINOUT_WIN01_ALL);
} }
#define tCounter data[0]
// RAY_ANIM_DUO_FIGHT / RAY_ANIM_DUO_FIGHT_PRE
#define tTimer data[0]
#define tHelperTaskId data[1] #define tHelperTaskId data[1]
#define tGroudonSpriteId data[2] #define tGroudonSpriteId data[2]
#define tKyogreSpriteId data[3] #define tKyogreSpriteId data[3]
@ -1384,18 +1388,18 @@ static void Task_HandleDuoFightPre(u8 taskId)
DuoFight_AnimateRain(); DuoFight_AnimateRain();
if (!gPaletteFade.active) if (!gPaletteFade.active)
{ {
s16 counter = tCounter; s16 frame = tTimer;
if (counter == 64) if (frame == 64)
{ {
DuoFight_Lightning1(); DuoFight_Lightning1();
} }
else if (counter == 144) else if (frame == 144)
{ {
DuoFight_Lightning2(); DuoFight_Lightning2();
} }
else else
{ {
switch (counter) switch (frame)
{ {
case 328: case 328:
DuoFightEnd(taskId, 0); DuoFightEnd(taskId, 0);
@ -1406,7 +1410,7 @@ static void Task_HandleDuoFightPre(u8 taskId)
} }
} }
tCounter++; tTimer++;
} }
} }
@ -1479,8 +1483,8 @@ static u8 DuoFightPre_CreateKyogreSprites(void)
data[2] |= CreateSprite(&sSpriteTemplate_DuoFightPre_Kyogre, 104, 128, 2); data[2] |= CreateSprite(&sSpriteTemplate_DuoFightPre_Kyogre, 104, 128, 2);
data[3] = CreateSprite(&sSpriteTemplate_DuoFightPre_Kyogre, 136, 128, 2) << 8; data[3] = CreateSprite(&sSpriteTemplate_DuoFightPre_Kyogre, 136, 128, 2) << 8;
data[3] |= CreateSprite(&sSpriteTemplate_DuoFightPre_Kyogre, 184, 128, 0); data[3] |= CreateSprite(&sSpriteTemplate_DuoFightPre_Kyogre, 184, 128, 0);
data[4] = CreateSprite(&sSpriteTemplate_DuoFightPre_KyogreShoulder, 208, 132, 0) << 8; data[4] = CreateSprite(&sSpriteTemplate_DuoFightPre_KyogrePectoralFin, 208, 132, 0) << 8;
data[4] |= CreateSprite(&sSpriteTemplate_DuoFightPre_KyogreFin, 200, 120, 1); data[4] |= CreateSprite(&sSpriteTemplate_DuoFightPre_KyogreDorsalFin, 200, 120, 1);
StartSpriteAnim(&gSprites[data[0] >> 8], 1); StartSpriteAnim(&gSprites[data[0] >> 8], 1);
StartSpriteAnim(&gSprites[data[0] & 0xFF], 2); StartSpriteAnim(&gSprites[data[0] & 0xFF], 2);
@ -1594,8 +1598,8 @@ static void LoadDuoFightSceneGfx(void)
LoadCompressedSpriteSheet(&sSpriteSheet_DuoFight_GroudonShoulder); LoadCompressedSpriteSheet(&sSpriteSheet_DuoFight_GroudonShoulder);
LoadCompressedSpriteSheet(&sSpriteSheet_DuoFight_GroudonClaw); LoadCompressedSpriteSheet(&sSpriteSheet_DuoFight_GroudonClaw);
LoadCompressedSpriteSheet(&sSpriteSheet_DuoFight_Kyogre); LoadCompressedSpriteSheet(&sSpriteSheet_DuoFight_Kyogre);
LoadCompressedSpriteSheet(&sSpriteSheet_DuoFight_KyogreShoulder); LoadCompressedSpriteSheet(&sSpriteSheet_DuoFight_KyogrePectoralFin);
LoadCompressedSpriteSheet(&sSpriteSheet_DuoFight_KyogreFin); LoadCompressedSpriteSheet(&sSpriteSheet_DuoFight_KyogreDorsalFin);
LoadCompressedSpritePalette(&sSpritePal_DuoFight_Groudon); LoadCompressedSpritePalette(&sSpritePal_DuoFight_Groudon);
LoadCompressedSpritePalette(&sSpritePal_DuoFight_Kyogre); LoadCompressedSpritePalette(&sSpritePal_DuoFight_Kyogre);
} }
@ -1608,7 +1612,7 @@ static void Task_DuoFightAnim(u8 taskId)
LoadDuoFightSceneGfx(); LoadDuoFightSceneGfx();
CpuFastFill16(0, gScanlineEffectRegBuffers, sizeof(gScanlineEffectRegBuffers)); CpuFastFill16(0, gScanlineEffectRegBuffers, sizeof(gScanlineEffectRegBuffers));
ScanlineEffect_SetParams(sScanlineParams_DuoFight_Clouds); ScanlineEffect_SetParams(sScanlineParams_DuoFight_Clouds);
tCounter = 0; tTimer = 0;
tHelperTaskId = CreateTask(Task_DuoFight_AnimateClouds, 0); tHelperTaskId = CreateTask(Task_DuoFight_AnimateClouds, 0);
if (sRayScene->animId == RAY_ANIM_DUO_FIGHT_PRE) if (sRayScene->animId == RAY_ANIM_DUO_FIGHT_PRE)
{ {
@ -1695,22 +1699,22 @@ static void Task_HandleDuoFight(u8 taskId)
DuoFight_AnimateRain(); DuoFight_AnimateRain();
if (!gPaletteFade.active) if (!gPaletteFade.active)
{ {
s16 counter = tCounter; s16 frame = tTimer;
if (counter == 32 || counter == 112) if (frame == 32 || frame == 112)
{ {
DuoFight_Lightning1(); DuoFight_Lightning1();
} }
else if (counter == 216) else if (frame == 216)
{ {
DuoFight_Lightning2(); DuoFight_Lightning2();
} }
else if (counter == 220) else if (frame == 220)
{ {
DuoFight_LightningLong(); DuoFight_LightningLong();
} }
else else
{ {
switch (counter) switch (frame)
{ {
case 412: case 412:
DuoFightEnd(taskId, 2); DuoFightEnd(taskId, 2);
@ -1726,7 +1730,7 @@ static void Task_HandleDuoFight(u8 taskId)
} }
} }
tCounter++; tTimer++;
} }
} }
@ -1771,10 +1775,10 @@ static void DuoFight_PanOffScene(u8 taskId)
if (GetBgY(1) == 0 || bgY > 0x8000) if (GetBgY(1) == 0 || bgY > 0x8000)
ChangeBgY(1, 0x400, 2); ChangeBgY(1, 0x400, 2);
if (tCounter != 16) if (tTimer != 16)
{ {
tCounter++; tTimer++;
SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(16 - tCounter, tCounter)); SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(16 - tTimer, tTimer));
} }
} }
@ -1797,7 +1801,7 @@ static void Task_DuoFightEnd(u8 taskId)
ScanlineEffect_Stop(); ScanlineEffect_Stop();
ResetSpriteData(); ResetSpriteData();
FreeAllSpritePalettes(); FreeAllSpritePalettes();
tCounter = 0; tTimer = 0;
gTasks[taskId].func = Task_SetNextAnim; gTasks[taskId].func = Task_SetNextAnim;
} }
} }
@ -1883,8 +1887,8 @@ static u8 DuoFight_CreateKyogreSprites(void)
data[2] |= CreateSprite(&sSpriteTemplate_DuoFight_Kyogre, 94, 128, 2); data[2] |= CreateSprite(&sSpriteTemplate_DuoFight_Kyogre, 94, 128, 2);
data[3] = CreateSprite(&sSpriteTemplate_DuoFight_Kyogre, 126, 128, 2) << 8; data[3] = CreateSprite(&sSpriteTemplate_DuoFight_Kyogre, 126, 128, 2) << 8;
data[3] |= CreateSprite(&sSpriteTemplate_DuoFight_Kyogre, 174, 128, 0); data[3] |= CreateSprite(&sSpriteTemplate_DuoFight_Kyogre, 174, 128, 0);
data[4] = CreateSprite(&sSpriteTemplate_DuoFight_KyogreShoulder, 198, 132, 0) << 8; data[4] = CreateSprite(&sSpriteTemplate_DuoFight_KyogrePectoralFin, 198, 132, 0) << 8;
data[4] |= CreateSprite(&sSpriteTemplate_DuoFight_KyogreFin, 190, 120, 1); data[4] |= CreateSprite(&sSpriteTemplate_DuoFight_KyogreDorsalFin, 190, 120, 1);
StartSpriteAnim(&gSprites[data[0] >> 8], 1); StartSpriteAnim(&gSprites[data[0] >> 8], 1);
StartSpriteAnim(&gSprites[data[0] & 0xFF], 2); StartSpriteAnim(&gSprites[data[0] & 0xFF], 2);
@ -1978,7 +1982,7 @@ static void DuoFight_SlideKyogreDown(struct Sprite *sprite)
} }
} }
#undef tCounter #undef tTimer
#undef tHelperTaskId #undef tHelperTaskId
#undef tGroudonSpriteId #undef tGroudonSpriteId
#undef tKyogreSpriteId #undef tKyogreSpriteId
@ -1987,6 +1991,9 @@ static void DuoFight_SlideKyogreDown(struct Sprite *sprite)
#undef sGroudonShoulderSpriteId #undef sGroudonShoulderSpriteId
#undef sGroudonClawSpriteId #undef sGroudonClawSpriteId
// RAY_ANIM_TAKES_FLIGHT
#define tState data[0] #define tState data[0]
#define tTimer data[1] #define tTimer data[1]
#define tScale data[2] #define tScale data[2]
@ -2194,6 +2201,9 @@ static void SpriteCB_TakesFlight_Smoke(struct Sprite *sprite)
#undef sSmokeId #undef sSmokeId
#undef sTimer #undef sTimer
// RAY_ANIM_DESCENDS
static void InitDescendsSceneBgs(void) static void InitDescendsSceneBgs(void)
{ {
ResetVramOamAndBgCntRegs(); ResetVramOamAndBgCntRegs();
@ -2441,6 +2451,9 @@ static void SpriteCB_Descends_Rayquaza(struct Sprite *sprite)
#undef sXMovePeriod #undef sXMovePeriod
#undef sYMovePeriod #undef sYMovePeriod
// RAY_ANIM_CHARGES
static void InitChargesSceneBgs(void) static void InitChargesSceneBgs(void)
{ {
ResetVramOamAndBgCntRegs(); ResetVramOamAndBgCntRegs();
@ -2471,7 +2484,7 @@ static void LoadChargesSceneGfx(void)
DecompressAndCopyTileDataToVram(3, gRaySceneCharges_Bg_Gfx, 0, 0, 0); DecompressAndCopyTileDataToVram(3, gRaySceneCharges_Bg_Gfx, 0, 0, 0);
while (FreeTempTileDataBuffersIfPossible()) while (FreeTempTileDataBuffersIfPossible())
; ;
LZDecompressWram(gRaySceneCharges_Rayquaza2_Tilemap, sRayScene->tilemapBuffers[0]); LZDecompressWram(gRaySceneCharges_Orbs_Tilemap, sRayScene->tilemapBuffers[0]);
LZDecompressWram(gRaySceneCharges_Rayquaza_Tilemap, sRayScene->tilemapBuffers[1]); LZDecompressWram(gRaySceneCharges_Rayquaza_Tilemap, sRayScene->tilemapBuffers[1]);
LZDecompressWram(gRaySceneCharges_Streaks_Tilemap, sRayScene->tilemapBuffers[2]); LZDecompressWram(gRaySceneCharges_Streaks_Tilemap, sRayScene->tilemapBuffers[2]);
LZDecompressWram(gRaySceneCharges_Bg_Tilemap, sRayScene->tilemapBuffers[3]); LZDecompressWram(gRaySceneCharges_Bg_Tilemap, sRayScene->tilemapBuffers[3]);
@ -2627,6 +2640,9 @@ static void Task_RayChargesEnd(u8 taskId)
#undef tRayquazaTaskId #undef tRayquazaTaskId
// RAY_ANIM_CHASES_AWAY
static void InitChasesAwaySceneBgs(void) static void InitChasesAwaySceneBgs(void)
{ {
ResetVramOamAndBgCntRegs(); ResetVramOamAndBgCntRegs();
@ -2650,12 +2666,12 @@ static void LoadChasesAwaySceneGfx(void)
{ {
ResetTempTileDataBuffers(); ResetTempTileDataBuffers();
DecompressAndCopyTileDataToVram(2, gRaySceneChasesAway_Ring_Gfx, 0, 0, 0); DecompressAndCopyTileDataToVram(2, gRaySceneChasesAway_Ring_Gfx, 0, 0, 0);
DecompressAndCopyTileDataToVram(0, gRaySceneChasesAway_Bg_Gfx, 0, 0, 0); DecompressAndCopyTileDataToVram(0, gRaySceneChasesAway_Light_Gfx, 0, 0, 0);
while (FreeTempTileDataBuffersIfPossible()) while (FreeTempTileDataBuffersIfPossible())
; ;
LZDecompressWram(gRaySceneChasesAway_Ring_Tilemap, sRayScene->tilemapBuffers[1]); LZDecompressWram(gRaySceneChasesAway_Bg_Tilemap, sRayScene->tilemapBuffers[1]);
LZDecompressWram(gRaySceneChasesAway_Bg_Tilemap, sRayScene->tilemapBuffers[0]); LZDecompressWram(gRaySceneChasesAway_Light_Tilemap, sRayScene->tilemapBuffers[0]);
LZDecompressWram(gRaySceneChasesAway_Ring_Map, sRayScene->tilemapBuffers[2]); LZDecompressWram(gRaySceneChasesAway_Ring_Tilemap, sRayScene->tilemapBuffers[2]);
LoadCompressedPalette(gRaySceneChasesAway_Bg_Pal, 0, 0x60); LoadCompressedPalette(gRaySceneChasesAway_Bg_Pal, 0, 0x60);
LoadCompressedSpriteSheet(&sSpriteSheet_ChasesAway_Groudon); LoadCompressedSpriteSheet(&sSpriteSheet_ChasesAway_Groudon);
LoadCompressedSpriteSheet(&sSpriteSheet_ChasesAway_GroudonTail); LoadCompressedSpriteSheet(&sSpriteSheet_ChasesAway_GroudonTail);