diff --git a/include/title_screen.h b/include/title_screen.h index ad0809ed2..b7100f124 100644 --- a/include/title_screen.h +++ b/include/title_screen.h @@ -1,7 +1,7 @@ #ifndef GUARD_TITLE_SCREEN_H #define GUARD_TITLE_SCREEN_H -extern const u16 gIntroWaterDropData[]; +extern const u16 gIntroWaterDropAlphaBlend[]; void CB2_InitTitleScreen(void); diff --git a/src/intro.c b/src/intro.c index 23457f370..84127cf64 100644 --- a/src/intro.c +++ b/src/intro.c @@ -2427,7 +2427,7 @@ static void Task_IntroWaterDrops_1(u8 taskId) | BLDCNT_TGT2_BG3 | BLDCNT_TGT2_OBJ | BLDCNT_TGT2_BD); - SetGpuReg(REG_OFFSET_BLDALPHA, gIntroWaterDropData[31]); + SetGpuReg(REG_OFFSET_BLDALPHA, gIntroWaterDropAlphaBlend[31]); SetGpuReg(REG_OFFSET_BLDY, 0); gTasks[taskId].data[1] = 0x40; gTasks[taskId].data[0]++; @@ -2439,11 +2439,11 @@ static void Task_IntroWaterDrops_1(u8 taskId) gTasks[taskId].data[1]--; tmp = gTasks[taskId].data[1] / 2; - SetGpuReg(REG_OFFSET_BLDALPHA, gIntroWaterDropData[tmp]); + SetGpuReg(REG_OFFSET_BLDALPHA, gIntroWaterDropAlphaBlend[tmp]); } else { - SetGpuReg(REG_OFFSET_BLDALPHA, gIntroWaterDropData[0]); + SetGpuReg(REG_OFFSET_BLDALPHA, gIntroWaterDropAlphaBlend[0]); gTasks[taskId].data[1] = 0x10; gTasks[taskId].data[0]++; } @@ -2470,7 +2470,7 @@ static void Task_IntroWaterDrops_2(u8 taskId) | BLDCNT_TGT2_BG3 | BLDCNT_TGT2_OBJ | BLDCNT_TGT2_BD); - SetGpuReg(REG_OFFSET_BLDALPHA, gIntroWaterDropData[0]); + SetGpuReg(REG_OFFSET_BLDALPHA, gIntroWaterDropAlphaBlend[0]); SetGpuReg(REG_OFFSET_BLDY, 0); gTasks[taskId].data[1] = 0; gTasks[taskId].data[0]++; @@ -2482,11 +2482,11 @@ static void Task_IntroWaterDrops_2(u8 taskId) gTasks[taskId].data[1]++; tmp = gTasks[taskId].data[1] / 2; - SetGpuReg(REG_OFFSET_BLDALPHA, gIntroWaterDropData[tmp]); + SetGpuReg(REG_OFFSET_BLDALPHA, gIntroWaterDropAlphaBlend[tmp]); } else { - SetGpuReg(REG_OFFSET_BLDALPHA, gIntroWaterDropData[31]); + SetGpuReg(REG_OFFSET_BLDALPHA, gIntroWaterDropAlphaBlend[31]); gTasks[taskId].data[1] = 0x10; gTasks[taskId].data[0]++; } diff --git a/src/title_screen.c b/src/title_screen.c index ca34f90f8..23b0772bd 100644 --- a/src/title_screen.c +++ b/src/title_screen.c @@ -64,7 +64,22 @@ static const u32 sTitleScreenRayquazaTilemap[] = INCBIN_U32("graphics/title_scre static const u32 sTitleScreenLogoShineGfx[] = INCBIN_U32("graphics/title_screen/logo_shine.4bpp.lz"); static const u32 sTitleScreenCloudsGfx[] = INCBIN_U32("graphics/title_screen/clouds.4bpp.lz"); -const u16 gIntroWaterDropData[] = +// This is BLDALPHA data. It's equivalent to: +// +// BLDALPHA_BLEND(0, 16) +// BLDALPHA_BLEND(1, 16) +// ... +// BLDALPHA_BLEND(14, 16) +// BLDALPHA_BLEND(15, 16) +// BLDALPHA_BLEND(16, 15) +// BLDALPHA_BLEND(16, 14) +// ... +// BLDALPHA_BLEND(16, 1) +// BLDALPHA_BLEND(16, 0) +// BLDALPHA_BLEND(16, 0) +// BLDALPHA_BLEND(16, 0) +// ... (repeated until array has 32 entries) +const u16 gIntroWaterDropAlphaBlend[] = { 0x0010, 0x0110, 0x0210, 0x0310, 0x0410, 0x0510, 0x0610, 0x0710, 0x0810, 0x0910, 0x0a10, 0x0b10, 0x0c10, 0x0d10, 0x0e10, 0x0f10, @@ -324,7 +339,7 @@ static void SpriteCB_VersionBannerLeft(struct Sprite *sprite) sprite->pos1.y++; if (sprite->data[0] != 0) sprite->data[0]--; - SetGpuReg(REG_OFFSET_BLDALPHA, gIntroWaterDropData[sprite->data[0]]); + SetGpuReg(REG_OFFSET_BLDALPHA, gIntroWaterDropAlphaBlend[sprite->data[0]]); } }