summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPhlosioneer <mattmdrr2@gmail.com>2019-03-12 22:56:53 -0400
committerhuderlem <huderlem@gmail.com>2019-03-16 12:25:02 -0500
commit61344a4fee6500cd61a0bc2c2d3346db361134c4 (patch)
tree54f974434f97cc92cd863ec8aab3c22d7804819f /src
parentd0115db5656944bcb4f44323bbd01b9a30780abc (diff)
Document the water droplet data.
Diffstat (limited to 'src')
-rw-r--r--src/intro.c12
-rw-r--r--src/title_screen.c19
2 files changed, 23 insertions, 8 deletions
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]]);
}
}