Add anim tag sprite defines

This commit is contained in:
DizzyEggg 2018-09-15 00:30:20 +02:00
parent a08d9dd451
commit 2a7811456a
6 changed files with 633 additions and 681 deletions

View File

@ -18033,8 +18033,8 @@ _0810794C:
bx r0 bx r0
thumb_func_end sub_810790C thumb_func_end sub_810790C
thumb_func_start sub_8107954 thumb_func_start AnimTask_CreateSurfWave
sub_8107954: @ 8107954 AnimTask_CreateSurfWave: @ 8107954
push {r4-r7,lr} push {r4-r7,lr}
mov r7, r10 mov r7, r10
mov r6, r9 mov r6, r9
@ -18256,7 +18256,7 @@ _08107B58:
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end sub_8107954 thumb_func_end AnimTask_CreateSurfWave
thumb_func_start sub_8107B84 thumb_func_start sub_8107B84
sub_8107B84: @ 8107B84 sub_8107B84: @ 8107B84
@ -22914,8 +22914,8 @@ _0810A054:
.pool .pool
thumb_func_end sub_8109E2C thumb_func_end sub_8109E2C
thumb_func_start sub_810A060 thumb_func_start AnimTask_BlendBackground
sub_810A060: @ 810A060 AnimTask_BlendBackground: @ 810A060
push {r4,lr} push {r4,lr}
sub sp, 0x10 sub sp, 0x10
adds r4, r0, 0 adds r4, r0, 0
@ -22938,7 +22938,7 @@ sub_810A060: @ 810A060
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end sub_810A060 thumb_func_end AnimTask_BlendBackground
thumb_func_start sub_810A094 thumb_func_start sub_810A094
sub_810A094: @ 810A094 sub_810A094: @ 810A094
@ -36190,8 +36190,8 @@ _08110BC6:
bx r0 bx r0
thumb_func_end sub_8110B80 thumb_func_end sub_8110B80
thumb_func_start sub_8110BCC thumb_func_start AnimTask_LoadSandstormBackground
sub_8110BCC: @ 8110BCC AnimTask_LoadSandstormBackground: @ 8110BCC
push {r4-r6,lr} push {r4-r6,lr}
sub sp, 0x10 sub sp, 0x10
lsls r0, 24 lsls r0, 24
@ -36275,7 +36275,7 @@ _08110C6E:
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end sub_8110BCC thumb_func_end AnimTask_LoadSandstormBackground
thumb_func_start sub_8110CB0 thumb_func_start sub_8110CB0
sub_8110CB0: @ 8110CB0 sub_8110CB0: @ 8110CB0
@ -47427,8 +47427,8 @@ _08116832:
.pool .pool
thumb_func_end sub_811675C thumb_func_end sub_811675C
thumb_func_start sub_8116848 thumb_func_start AnimTask_BlendParticle
sub_8116848: @ 8116848 AnimTask_BlendParticle: @ 8116848
push {r4,lr} push {r4,lr}
adds r4, r0, 0 adds r4, r0, 0
lsls r4, 24 lsls r4, 24
@ -47447,7 +47447,7 @@ sub_8116848: @ 8116848
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end sub_8116848 thumb_func_end AnimTask_BlendParticle
thumb_func_start sub_8116874 thumb_func_start sub_8116874
sub_8116874: @ 8116874 sub_8116874: @ 8116874

View File

@ -10048,8 +10048,8 @@ _0815F1DE:
.pool .pool
thumb_func_end sub_815F18C thumb_func_end sub_815F18C
thumb_func_start sub_815F20C thumb_func_start AnimTask_MonToSubstitute
sub_815F20C: @ 815F20C AnimTask_MonToSubstitute: @ 815F20C
push {r4-r7,lr} push {r4-r7,lr}
mov r7, r9 mov r7, r9
mov r6, r8 mov r6, r8
@ -10183,7 +10183,7 @@ _0815F310:
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end sub_815F20C thumb_func_end AnimTask_MonToSubstitute
thumb_func_start sub_815F330 thumb_func_start sub_815F330
sub_815F330: @ 815F330 sub_815F330: @ 815F330

View File

@ -3782,7 +3782,7 @@ gSimplePaletteBlendSpriteTemplate:: @ 8597274
spr_template 0x0000, 0x0000, gDummyOamData, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_81157FC spr_template 0x0000, 0x0000, gDummyOamData, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_81157FC
.align 2 .align 2
gBattleAnimSpriteTemplate_859728C:: @ 859728C gComplexPaletteBlendSpriteTemplate:: @ 859728C
spr_template 0x0000, 0x0000, gDummyOamData, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_81158A4 spr_template 0x0000, 0x0000, gDummyOamData, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_81158A4
.align 2 .align 2

File diff suppressed because it is too large Load Diff

View File

@ -31,7 +31,7 @@ extern struct MusicPlayerInfo gMPlayInfo_SE1;
extern struct MusicPlayerInfo gMPlayInfo_SE2; extern struct MusicPlayerInfo gMPlayInfo_SE2;
extern const u16 gMovesWithQuietBGM[]; extern const u16 gMovesWithQuietBGM[];
extern const u8 * const gBattleAnims_Moves[]; extern const u8 *const gBattleAnims_Moves[];
extern const struct CompressedSpriteSheet gBattleAnimPicTable[]; extern const struct CompressedSpriteSheet gBattleAnimPicTable[];
extern const struct CompressedSpritePalette gBattleAnimPaletteTable[]; extern const struct CompressedSpritePalette gBattleAnimPaletteTable[];
extern const struct BattleAnimBackground gBattleAnimBackgroundTable[]; extern const struct BattleAnimBackground gBattleAnimBackgroundTable[];

View File

@ -25,6 +25,7 @@
#include "blend_palette.h" #include "blend_palette.h"
#include "title_screen.h" #include "title_screen.h"
#include "constants/rgb.h" #include "constants/rgb.h"
#include "constants/battle_anim.h"
extern const struct CompressedSpriteSheet gBattleAnimPicTable[]; extern const struct CompressedSpriteSheet gBattleAnimPicTable[];
extern const struct CompressedSpritePalette gBattleAnimPaletteTable[]; extern const struct CompressedSpritePalette gBattleAnimPaletteTable[];
@ -118,7 +119,7 @@ static const struct SpriteTemplate gUnknown_085E4AB8 =
}; };
static const u8 gUnknown_085E4AD0[][2] = static const u8 gUnknown_085E4AD0[][2] =
{ {
{0x7C, 0x28}, {0x7C, 0x28},
{0x66, 0x1E}, {0x66, 0x1E},
{0x4D, 0x1E}, {0x4D, 0x1E},
{0x36, 0x0F}, {0x36, 0x0F},
@ -664,25 +665,25 @@ static const s16 gUnknown_085E4E94[][2] =
{5, 20}, {5, 20},
{3, 28}, {3, 28},
}; };
static const union AffineAnimCmd gUnknown_085E4ED8[] = static const union AffineAnimCmd gUnknown_085E4ED8[] =
{ {
AFFINEANIMCMD_FRAME(128, 128, 0, 0), AFFINEANIMCMD_FRAME(128, 128, 0, 0),
AFFINEANIMCMD_END, AFFINEANIMCMD_END,
}; };
static const union AffineAnimCmd gUnknown_085E4EE8[] = static const union AffineAnimCmd gUnknown_085E4EE8[] =
{ {
AFFINEANIMCMD_FRAME(128, 128, 0, 0), AFFINEANIMCMD_FRAME(128, 128, 0, 0),
AFFINEANIMCMD_FRAME(16, 16, 0, 16), AFFINEANIMCMD_FRAME(16, 16, 0, 16),
AFFINEANIMCMD_FRAME(-16, -16, 0, 8), AFFINEANIMCMD_FRAME(-16, -16, 0, 8),
AFFINEANIMCMD_END, AFFINEANIMCMD_END,
}; };
static const union AffineAnimCmd gUnknown_085E4F08[] = static const union AffineAnimCmd gUnknown_085E4F08[] =
{ {
AFFINEANIMCMD_FRAME(256, 256, 0, 0), AFFINEANIMCMD_FRAME(256, 256, 0, 0),
AFFINEANIMCMD_FRAME(8, 8, 0, 48), AFFINEANIMCMD_FRAME(8, 8, 0, 48),
AFFINEANIMCMD_END, AFFINEANIMCMD_END,
}; };
static const union AffineAnimCmd gUnknown_085E4F20[] = static const union AffineAnimCmd gUnknown_085E4F20[] =
{ {
AFFINEANIMCMD_FRAME(256, 256, 0, 0), AFFINEANIMCMD_FRAME(256, 256, 0, 0),
AFFINEANIMCMD_FRAME(2, 2, 0, 48), AFFINEANIMCMD_FRAME(2, 2, 0, 48),
@ -695,7 +696,7 @@ static const union AffineAnimCmd *const gUnknown_085E4F38[] =
gUnknown_085E4F08, gUnknown_085E4F08,
gUnknown_085E4F20, gUnknown_085E4F20,
}; };
static const u16 gUnknown_085E4F48[] = static const u16 gUnknown_085E4F48[] =
{ {
0x100, 0xC0, 0x80, 0x40, 0x00, 0x40, 0x80, 0xC0, 0x100 0x100, 0xC0, 0x80, 0x40, 0x00, 0x40, 0x80, 0xC0, 0x100
}; };
@ -1086,10 +1087,10 @@ static void Task_IntroWaterDrops(u8 taskId)
if (gIntroFrameCounter == 256) if (gIntroFrameCounter == 256)
CreateTask(Task_IntroWaterDrops_2, 0); CreateTask(Task_IntroWaterDrops_2, 0);
if (gIntroFrameCounter == 368) if (gIntroFrameCounter == 368)
CreateWaterDrop(48, 0, 0x400, 5, 0x70, TRUE); CreateWaterDrop(48, 0, 0x400, 5, 0x70, TRUE);
if (gIntroFrameCounter == 384) if (gIntroFrameCounter == 384)
CreateWaterDrop(200, 60, 0x400, 9, 0x80, TRUE); CreateWaterDrop(200, 60, 0x400, 9, 0x80, TRUE);
@ -1113,7 +1114,7 @@ static void Task_IntroWaterDrops_3(u8 taskId)
s16 *data = gTasks[taskId].data; s16 *data = gTasks[taskId].data;
if (++data[2] & 1) if (++data[2] & 1)
data[3]++; data[3]++;
switch (data[0]) switch (data[0])
{ {
case 0: case 0:
@ -1127,7 +1128,7 @@ static void Task_IntroWaterDrops_3(u8 taskId)
data[0] = 0; data[0] = 0;
break; break;
} }
if (data[3] > 0x3C) if (data[3] > 0x3C)
DestroyTask(taskId); DestroyTask(taskId);
} }
@ -1206,25 +1207,25 @@ static void Task_IntroStartBikeRide(u8 taskId)
LoadCompressedObjectPic(gIntro2BrendanSpriteSheet); LoadCompressedObjectPic(gIntro2BrendanSpriteSheet);
else else
LoadCompressedObjectPic(gIntro2MaySpriteSheet); LoadCompressedObjectPic(gIntro2MaySpriteSheet);
LoadCompressedObjectPic(gIntro2BicycleSpriteSheet); LoadCompressedObjectPic(gIntro2BicycleSpriteSheet);
LoadCompressedObjectPic(gIntro2FlygonSpriteSheet); LoadCompressedObjectPic(gIntro2FlygonSpriteSheet);
for (spriteId = 0; spriteId < 3; spriteId++) for (spriteId = 0; spriteId < 3; spriteId++)
{ {
LoadCompressedObjectPic(&gUnknown_085E4AE8[spriteId]); LoadCompressedObjectPic(&gUnknown_085E4AE8[spriteId]);
} }
LoadSpritePalettes(gUnknown_085F530C); LoadSpritePalettes(gUnknown_085F530C);
LoadSpritePalettes(gUnknown_085E4B08); LoadSpritePalettes(gUnknown_085E4B08);
CreateSprite(&gUnknown_085E4BDC, 0x110, 0x80, 0); CreateSprite(&gUnknown_085E4BDC, 0x110, 0x80, 0);
CreateSprite(&gUnknown_085E4BA4, 0x120, 0x6E, 1); CreateSprite(&gUnknown_085E4BA4, 0x120, 0x6E, 1);
if (gUnknown_0203BCC8 == 0) if (gUnknown_0203BCC8 == 0)
spriteId = intro_create_brendan_sprite(0x110, 100); spriteId = intro_create_brendan_sprite(0x110, 100);
else else
spriteId = intro_create_may_sprite(0x110, 100); spriteId = intro_create_may_sprite(0x110, 100);
gSprites[spriteId].callback = sub_816F9D4; gSprites[spriteId].callback = sub_816F9D4;
gSprites[spriteId].anims = gUnknown_085E4DC4; gSprites[spriteId].anims = gUnknown_085E4DC4;
gTasks[taskId].data[1] = spriteId; gTasks[taskId].data[1] = spriteId;
@ -1243,7 +1244,7 @@ static void Task_IntroHandleBikeAndFlygonMovement(u8 taskId)
{ {
s16 a; s16 a;
u16 sine; u16 sine;
if (gIntroFrameCounter == 1856) if (gIntroFrameCounter == 1856)
{ {
gUnknown_0203BD28 = 2; gUnknown_0203BD28 = 2;
@ -1427,7 +1428,7 @@ static void sub_816D9C0(struct Sprite *sprite)
case 4: case 4:
if (sprite->animEnded) if (sprite->animEnded)
sprite->pos1.x += 4; sprite->pos1.x += 4;
if (sprite->pos1.x > 336) if (sprite->pos1.x > 336)
{ {
StartSpriteAnim(sprite, 1); StartSpriteAnim(sprite, 1);
@ -1506,7 +1507,7 @@ static void Task_IntroLoadPart3Graphics(u8 taskId)
static void Task_IntroSpinAndZoomPokeball(u8 taskId) static void Task_IntroSpinAndZoomPokeball(u8 taskId)
{ {
gTasks[taskId].data[0] += 0x400; gTasks[taskId].data[0] += 0x400;
if (gTasks[taskId].data[1] <= 0x6BF) if (gTasks[taskId].data[1] <= 0x6BF)
{ {
gTasks[taskId].data[1] += gTasks[taskId].data[2]; gTasks[taskId].data[1] += gTasks[taskId].data[2];
@ -1516,9 +1517,9 @@ static void Task_IntroSpinAndZoomPokeball(u8 taskId)
{ {
gTasks[taskId].func = Task_IntroWaitToSetupPart3LegendsFight; gTasks[taskId].func = Task_IntroWaitToSetupPart3LegendsFight;
} }
sub_816F2A8(0x78, 0x50, 0x10000 / gTasks[taskId].data[1], gTasks[taskId].data[0]); sub_816F2A8(0x78, 0x50, 0x10000 / gTasks[taskId].data[1], gTasks[taskId].data[0]);
if (gIntroFrameCounter == 28) if (gIntroFrameCounter == 28)
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_WHITEALPHA); BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_WHITEALPHA);
} }
@ -1531,8 +1532,6 @@ static void Task_IntroWaitToSetupPart3LegendsFight(u8 taskId)
static void Task_IntroLoadPart1Graphics3(u8 taskId) static void Task_IntroLoadPart1Graphics3(u8 taskId)
{ {
u16 i;
if (!gPaletteFade.active) if (!gPaletteFade.active)
{ {
intro_reset_and_hide_bgs(); intro_reset_and_hide_bgs();
@ -1543,8 +1542,8 @@ static void Task_IntroLoadPart1Graphics3(u8 taskId)
LZDecompressVram(gIntro3GroudonTilemap, (void *)(VRAM + 0xC000)); LZDecompressVram(gIntro3GroudonTilemap, (void *)(VRAM + 0xC000));
LZDecompressVram(gIntro3LegendBgGfx, (void *)(VRAM + 0x4000)); LZDecompressVram(gIntro3LegendBgGfx, (void *)(VRAM + 0x4000));
LZDecompressVram(gIntro3GroudonBgTilemap, (void *)(VRAM + 0xE000)); LZDecompressVram(gIntro3GroudonBgTilemap, (void *)(VRAM + 0xE000));
LoadCompressedObjectPicUsingHeap(&gBattleAnimPicTable[0x3A]); LoadCompressedObjectPicUsingHeap(&gBattleAnimPicTable[GET_TRUE_SPRITE_INDEX(ANIM_TAG_058)]);
LoadCompressedObjectPaletteUsingHeap(&gBattleAnimPaletteTable[0x3A]); LoadCompressedObjectPaletteUsingHeap(&gBattleAnimPaletteTable[GET_TRUE_SPRITE_INDEX(ANIM_TAG_058)]);
CpuCopy16(gIntro3BgPal, gPlttBufferUnfaded, sizeof(gIntro3BgPal)); CpuCopy16(gIntro3BgPal, gPlttBufferUnfaded, sizeof(gIntro3BgPal));
gTasks[taskId].func = Task_IntroLoadPart1Graphics4; gTasks[taskId].func = Task_IntroLoadPart1Graphics4;
} }
@ -1584,12 +1583,10 @@ static void Task_IntroLoadPart1Graphics4(u8 taskId)
static void Task_IntroLoadPart1Graphics5(u8 taskId) static void Task_IntroLoadPart1Graphics5(u8 taskId)
{ {
u16 foo = gTasks[taskId].data[0];
if (gTasks[taskId].data[0] != 32) if (gTasks[taskId].data[0] != 32)
{ {
gTasks[taskId].data[0] += 4; gTasks[taskId].data[0] += 4;
SetGpuReg(REG_OFFSET_WIN0V, (gTasks[taskId].data[0] * 256) - (foo -= 0x9C)); SetGpuReg(REG_OFFSET_WIN0V, (gTasks[taskId].data[0] * 256) - (gTasks[taskId].data[0] - 160));
} }
else else
{ {
@ -1613,7 +1610,7 @@ static void Task_IntroLoadPart1Graphics7(u8 taskId)
static void Task_IntroLoadPart1Graphics8(u8 taskId) static void Task_IntroLoadPart1Graphics8(u8 taskId)
{ {
s16 *data = gTasks[taskId].data; s16 *data = gTasks[taskId].data;
data[5]++; data[5]++;
if ((u16)(data[0] - 1) < 7 && data[5] % 2 == 0) if ((u16)(data[0] - 1) < 7 && data[5] % 2 == 0)
data[4] ^= 3; data[4] ^= 3;
@ -1720,7 +1717,7 @@ static void sub_816E190(u8 a0)
{ {
int i; int i;
u8 spriteId; u8 spriteId;
for (i = 0; i < 6; i++) for (i = 0; i < 6; i++)
{ {
spriteId = CreateSprite(gUnknown_08596C10, gUnknown_085E4C64[i][0], 0xA0, i); spriteId = CreateSprite(gUnknown_08596C10, gUnknown_085E4C64[i][0], 0xA0, i);
@ -1737,7 +1734,7 @@ static void sub_816E1F8(struct Sprite *sprite)
sprite->data[3]++; sprite->data[3]++;
if (sprite->data[3] % 2 == 0) if (sprite->data[3] % 2 == 0)
sprite->pos2.y ^= 3; sprite->pos2.y ^= 3;
switch(sprite->data[0]) switch(sprite->data[0])
{ {
case 0: case 0:
@ -1752,7 +1749,7 @@ static void sub_816E1F8(struct Sprite *sprite)
sprite->pos1.x -= 2; sprite->pos1.x -= 2;
else else
sprite->pos1.x += 2; sprite->pos1.x += 2;
if (sprite->pos1.y < 0x50) if (sprite->pos1.y < 0x50)
sprite->pos1.y -= 2; sprite->pos1.y -= 2;
else else
@ -1783,9 +1780,9 @@ static void Task_IntroLoadPart1Graphics9(u8 taskId)
static void Task_IntroFadeIn0(u8 taskId) static void Task_IntroFadeIn0(u8 taskId)
{ {
s16 *data = gTasks[taskId].data; s16 *data = gTasks[taskId].data;
sub_816F2A8(data[1], data[2], data[3], 0); sub_816F2A8(data[1], data[2], data[3], 0);
switch (data[0]) switch (data[0])
{ {
case 0: case 0:
@ -1928,7 +1925,7 @@ static void sub_816E6D4(u8 a0)
{ {
int i; int i;
u8 spriteId; u8 spriteId;
for (i = 0; i < 6; i++) for (i = 0; i < 6; i++)
{ {
spriteId = CreateSprite(&gUnknown_085E4D14, gUnknown_085E4CA8[i][0], gUnknown_085E4CA8[i][1], i); spriteId = CreateSprite(&gUnknown_085E4D14, gUnknown_085E4CA8[i][0], gUnknown_085E4CA8[i][1], i);
@ -1943,7 +1940,7 @@ static void sub_816E74C(void)
{ {
int i; int i;
u8 spriteId; u8 spriteId;
for (i = 0; i < 6; i++) for (i = 0; i < 6; i++)
{ {
spriteId = CreateSprite(&gUnknown_085E4D14, gUnknown_085E4CA8[i + 6][0], gUnknown_085E4CA8[i + 6][1], i); spriteId = CreateSprite(&gUnknown_085E4D14, gUnknown_085E4CA8[i + 6][0], gUnknown_085E4CA8[i + 6][1], i);
@ -1980,7 +1977,7 @@ static void sub_816E7B4(struct Sprite *sprite)
sprite->pos1.x -= 3; sprite->pos1.x -= 3;
else else
sprite->pos1.x += 3; sprite->pos1.x += 3;
if (sprite->pos1.y < 80) if (sprite->pos1.y < 80)
sprite->pos1.y -= 3; sprite->pos1.y -= 3;
else else
@ -2053,10 +2050,10 @@ static void Task_IntroFadeIn3(u8 taskId)
static void Task_IntroFadeIn4(u8 taskId) static void Task_IntroFadeIn4(u8 taskId)
{ {
s16 *data = gTasks[taskId].data; s16 *data = gTasks[taskId].data;
SetGpuReg(REG_OFFSET_BG0HOFS, (data[6] >> 8)); SetGpuReg(REG_OFFSET_BG0HOFS, (data[6] >> 8));
SetGpuReg(REG_OFFSET_BG1HOFS, -(data[6] >> 8)); SetGpuReg(REG_OFFSET_BG1HOFS, -(data[6] >> 8));
switch (data[0]) switch (data[0])
{ {
case 0: case 0:
@ -2070,7 +2067,7 @@ static void Task_IntroFadeIn4(u8 taskId)
case 1: case 1:
if (data[6] == 0x2800) if (data[6] == 0x2800)
BeginNormalPaletteFade(0x0000FFFE, 3, 0, 16, RGB(9, 10, 10)); BeginNormalPaletteFade(0x0000FFFE, 3, 0, 16, RGB(9, 10, 10));
if (data[6] != 0) if (data[6] != 0)
data[6] -= 0x80; data[6] -= 0x80;
else if (!gPaletteFade.active) else if (!gPaletteFade.active)
@ -2103,7 +2100,7 @@ static void Task_IntroFadeIn6(u8 taskId)
{ {
s16 *data = gTasks[taskId].data; s16 *data = gTasks[taskId].data;
u8 spriteId; u8 spriteId;
switch (data[0]) switch (data[0])
{ {
case 0: case 0:
@ -2141,7 +2138,7 @@ static void sub_816EC6C(struct Sprite *sprite)
{ {
if (sprite->animEnded) if (sprite->animEnded)
sprite->invisible = TRUE; sprite->invisible = TRUE;
switch(sprite->data[0]) switch(sprite->data[0])
{ {
case 0: case 0:
@ -2171,7 +2168,7 @@ static void sub_816EC6C(struct Sprite *sprite)
static void Task_IntroFadeIn7(u8 taskId) static void Task_IntroFadeIn7(u8 taskId)
{ {
u8 newTaskId; u8 newTaskId;
LoadCompressedObjectPic(gUnknown_085E5048); LoadCompressedObjectPic(gUnknown_085E5048);
LoadSpritePalettes(gUnknown_085E5058); LoadSpritePalettes(gUnknown_085E5058);
SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_MODE_0 SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_MODE_0
@ -2194,12 +2191,12 @@ static void Task_IntroFadeIn7(u8 taskId)
static void Task_IntroFadeIn8(u8 taskId) static void Task_IntroFadeIn8(u8 taskId)
{ {
s16 *data = gTasks[taskId].data; s16 *data = gTasks[taskId].data;
if (data[7] % 2 == 0) if (data[7] % 2 == 0)
data[6] ^= 2; data[6] ^= 2;
data[7]++; data[7]++;
switch(data[0]) switch(data[0])
{ {
case 0: case 0:
@ -2248,9 +2245,9 @@ static void sub_816EEA8(u8 taskId)
{ {
u8 spriteId; u8 spriteId;
s16 *data = gTasks[taskId].data; s16 *data = gTasks[taskId].data;
data[2]++; data[2]++;
switch(data[0]) switch(data[0])
{ {
case 0: case 0:
@ -2377,7 +2374,7 @@ static void Task_IntroWaterDrops_1(u8 taskId)
if (gTasks[taskId].data[1] != 0) if (gTasks[taskId].data[1] != 0)
{ {
u8 tmp; u8 tmp;
gTasks[taskId].data[1]--; gTasks[taskId].data[1]--;
tmp = gTasks[taskId].data[1] / 2; tmp = gTasks[taskId].data[1] / 2;
SetGpuReg(REG_OFFSET_BLDALPHA, gUnknown_0853FF70[tmp]); SetGpuReg(REG_OFFSET_BLDALPHA, gUnknown_0853FF70[tmp]);
@ -2420,7 +2417,7 @@ static void Task_IntroWaterDrops_2(u8 taskId)
if (gTasks[taskId].data[1] < 62) if (gTasks[taskId].data[1] < 62)
{ {
u8 tmp; u8 tmp;
gTasks[taskId].data[1]++; gTasks[taskId].data[1]++;
tmp = gTasks[taskId].data[1] / 2; tmp = gTasks[taskId].data[1] / 2;
SetGpuReg(REG_OFFSET_BLDALPHA, gUnknown_0853FF70[tmp]); SetGpuReg(REG_OFFSET_BLDALPHA, gUnknown_0853FF70[tmp]);
@ -2903,7 +2900,7 @@ static u8 sub_816FDB8(s16 a0, s16 a1, s16 a2)
{ {
u16 i; u16 i;
u8 spriteId; u8 spriteId;
for (i = 0; i < 9; i++) for (i = 0; i < 9; i++)
{ {
spriteId = CreateSprite(&gUnknown_085E4F5C, gUnknown_085E4E94[i][1] + a0, a1 - 4, 0); spriteId = CreateSprite(&gUnknown_085E4F5C, gUnknown_085E4E94[i][1] + a0, a1 - 4, 0);
@ -2926,7 +2923,7 @@ static u8 sub_816FDB8(s16 a0, s16 a1, s16 a2)
static void sub_816FEDC(struct Sprite *sprite) static void sub_816FEDC(struct Sprite *sprite)
{ {
sprite->data[7]++; sprite->data[7]++;
if (sprite->data[0] != 0) if (sprite->data[0] != 0)
{ {
s16 sin1; s16 sin1;
@ -2944,7 +2941,7 @@ static void sub_816FEDC(struct Sprite *sprite)
SetOamMatrix(1, a, b, c, d); SetOamMatrix(1, a, b, c, d);
} }
switch (sprite->data[0]) switch (sprite->data[0])
{ {
case 0: case 0: