Document and make tileset_anims.c easier to use
This commit is contained in:
parent
4d9c513e3e
commit
1f767e4c49
1 changed files with 59 additions and 59 deletions
|
@ -225,25 +225,25 @@ const u16 gTilesetAnims_Mauville1b_Frame1[] = INCBIN_U16("data/tilesets/secondar
|
|||
const u16 tileset_anims_space_1[16] = {};
|
||||
|
||||
u16 *const gTilesetAnims_MauvilleVDests0[] = {
|
||||
(u16 *)BG_VRAM + TILE_VRAM(0x260)),
|
||||
(u16 *)BG_VRAM + TILE_VRAM(0x264)),
|
||||
(u16 *)BG_VRAM + TILE_VRAM(0x268)),
|
||||
(u16 *)BG_VRAM + TILE_VRAM(0x26C)),
|
||||
(u16 *)BG_VRAM + TILE_VRAM(0x270)),
|
||||
(u16 *)BG_VRAM + TILE_VRAM(0x274)),
|
||||
(u16 *)BG_VRAM + TILE_VRAM(0x278)),
|
||||
(u16 *)BG_VRAM + TILE_VRAM(0x27C))
|
||||
(u16 *)(BG_VRAM + 0x4c00),
|
||||
(u16 *)(BG_VRAM + 0x4c80),
|
||||
(u16 *)(BG_VRAM + 0x4d00),
|
||||
(u16 *)(BG_VRAM + 0x4d80),
|
||||
(u16 *)(BG_VRAM + 0x4e00),
|
||||
(u16 *)(BG_VRAM + 0x4e80),
|
||||
(u16 *)(BG_VRAM + 0x4f00),
|
||||
(u16 *)(BG_VRAM + 0x4f80)
|
||||
};
|
||||
|
||||
u16 *const gTilesetAnims_MauvilleVDests1[] = {
|
||||
(u16 *)BG_VRAM + TILE_VRAM(0x280)),
|
||||
(u16 *)BG_VRAM + TILE_VRAM(0x284)),
|
||||
(u16 *)BG_VRAM + TILE_VRAM(0x288)),
|
||||
(u16 *)BG_VRAM + TILE_VRAM(0x28C)),
|
||||
(u16 *)BG_VRAM + TILE_VRAM(0x290)),
|
||||
(u16 *)BG_VRAM + TILE_VRAM(0x294)),
|
||||
(u16 *)BG_VRAM + TILE_VRAM(0x298)),
|
||||
(u16 *)BG_VRAM + TILE_VRAM(0x29C))
|
||||
(u16 *)(BG_VRAM + 0x5000),
|
||||
(u16 *)(BG_VRAM + 0x5080),
|
||||
(u16 *)(BG_VRAM + 0x5100),
|
||||
(u16 *)(BG_VRAM + 0x5180),
|
||||
(u16 *)(BG_VRAM + 0x5200),
|
||||
(u16 *)(BG_VRAM + 0x5280),
|
||||
(u16 *)(BG_VRAM + 0x5300),
|
||||
(u16 *)(BG_VRAM + 0x5380)
|
||||
};
|
||||
|
||||
const u16 *const gTilesetAnims_Mauville0a[] = {
|
||||
|
@ -307,14 +307,14 @@ const u16 gTilesetAnims_Rustboro0_Frame6[] = INCBIN_U16("data/tilesets/secondary
|
|||
const u16 gTilesetAnims_Rustboro0_Frame7[] = INCBIN_U16("data/tilesets/secondary/rustboro/anim/0/7.4bpp");
|
||||
|
||||
u16 *const gTilesetAnims_RustboroVDests0[] = {
|
||||
(u16 *)BG_VRAM + TILE_VRAM(0x280)),
|
||||
(u16 *)BG_VRAM + TILE_VRAM(0x284)),
|
||||
(u16 *)BG_VRAM + TILE_VRAM(0x288)),
|
||||
(u16 *)BG_VRAM + TILE_VRAM(0x28C)),
|
||||
(u16 *)BG_VRAM + TILE_VRAM(0x290)),
|
||||
(u16 *)BG_VRAM + TILE_VRAM(0x294)),
|
||||
(u16 *)BG_VRAM + TILE_VRAM(0x298)),
|
||||
(u16 *)BG_VRAM + TILE_VRAM(0x29C))
|
||||
(u16 *)(BG_VRAM + 0x5000),
|
||||
(u16 *)(BG_VRAM + 0x5080),
|
||||
(u16 *)(BG_VRAM + 0x5100),
|
||||
(u16 *)(BG_VRAM + 0x5180),
|
||||
(u16 *)(BG_VRAM + 0x5200),
|
||||
(u16 *)(BG_VRAM + 0x5280),
|
||||
(u16 *)(BG_VRAM + 0x5300),
|
||||
(u16 *)(BG_VRAM + 0x5380)
|
||||
};
|
||||
|
||||
const u16 *const gTilesetAnims_Rustboro0[] = {
|
||||
|
@ -383,14 +383,14 @@ const u16 gTilesetAnims_EverGrande0_Frame7[] = INCBIN_U16("data/tilesets/seconda
|
|||
const u16 tileset_anims_space_4[16] = {};
|
||||
|
||||
u16 *const gTilesetAnims_EverGrandeVDests0[] = {
|
||||
(u16 *)BG_VRAM + TILE_VRAM(0x2E0)),
|
||||
(u16 *)BG_VRAM + TILE_VRAM(0x2E4)),
|
||||
(u16 *)BG_VRAM + TILE_VRAM(0x2E8)),
|
||||
(u16 *)BG_VRAM + TILE_VRAM(0x2EC)),
|
||||
(u16 *)BG_VRAM + TILE_VRAM(0x2F0)),
|
||||
(u16 *)BG_VRAM + TILE_VRAM(0x2F4)),
|
||||
(u16 *)BG_VRAM + TILE_VRAM(0x2F8)),
|
||||
(u16 *)BG_VRAM + TILE_VRAM(0x2FC))
|
||||
(u16 *)(BG_VRAM + 0x5c00),
|
||||
(u16 *)(BG_VRAM + 0x5c80),
|
||||
(u16 *)(BG_VRAM + 0x5d00),
|
||||
(u16 *)(BG_VRAM + 0x5d80),
|
||||
(u16 *)(BG_VRAM + 0x5e00),
|
||||
(u16 *)(BG_VRAM + 0x5e80),
|
||||
(u16 *)(BG_VRAM + 0x5f00),
|
||||
(u16 *)(BG_VRAM + 0x5f80)
|
||||
};
|
||||
|
||||
const u16 *const gTilesetAnims_EverGrande0[] = {
|
||||
|
@ -716,10 +716,10 @@ void TilesetCb_InsideBuilding(void)
|
|||
|
||||
sPrimaryTilesetCBCounter = 0;
|
||||
sPrimaryTilesetCBBufferSize = 0x100;
|
||||
sPrimaryTilesetCB = sPrimaryTilesetTimer;
|
||||
sPrimaryTilesetCB = sub_80A0BB4;
|
||||
}
|
||||
|
||||
static void sPrimaryTilesetTimer(u16 timer)
|
||||
static void sub_80A0B70(u16 timer)
|
||||
{
|
||||
static void gTilesetAnims_GeneralVDests0(u16);
|
||||
static void gTilesetAnims_GeneralVDests1(u16);
|
||||
|
@ -752,7 +752,7 @@ static void gTilesetAnims_GeneralVDests0(u16 timer)
|
|||
u16 idx;
|
||||
|
||||
idx = timer % 4;
|
||||
AppendTilesetAnimToBuffer(gTilesetAnims_General0[idx], (u16 *)BG_VRAM + TILE_VRAM(0x1FC)), 0x80);
|
||||
AppendTilesetAnimToBuffer(gTilesetAnims_General0[idx], (u16 *)(BG_VRAM + TILE_VRAM(0x1FC)), 0x80);
|
||||
}
|
||||
|
||||
static void gTilesetAnims_GeneralVDests1(u16 timer)
|
||||
|
@ -760,7 +760,7 @@ static void gTilesetAnims_GeneralVDests1(u16 timer)
|
|||
u8 idx;
|
||||
|
||||
idx = timer % 8;
|
||||
AppendTilesetAnimToBuffer(gTilesetAnims_General1[idx], (u16 *)BG_VRAM + TILE_VRAM(0x1B0)), 0x3C0);
|
||||
AppendTilesetAnimToBuffer(gTilesetAnims_General1[idx], (u16 *)(BG_VRAM + TILE_VRAM(0x1B0)), 0x3C0);
|
||||
}
|
||||
|
||||
static void gTilesetAnims_GeneralVDests2(u16 timer)
|
||||
|
@ -768,7 +768,7 @@ static void gTilesetAnims_GeneralVDests2(u16 timer)
|
|||
u16 idx;
|
||||
|
||||
idx = timer % 8;
|
||||
AppendTilesetAnimToBuffer(gTilesetAnims_General2[idx], (u16 *)BG_VRAM + TILE_VRAM(0x1D0)), 0x140);
|
||||
AppendTilesetAnimToBuffer(gTilesetAnims_General2[idx], (u16 *)(BG_VRAM + TILE_VRAM(0x1D0)), 0x140);
|
||||
}
|
||||
|
||||
static void gTilesetAnims_GeneralVDests3(u16 timer)
|
||||
|
@ -776,7 +776,7 @@ static void gTilesetAnims_GeneralVDests3(u16 timer)
|
|||
u16 idx;
|
||||
|
||||
idx = timer % 4;
|
||||
AppendTilesetAnimToBuffer(gTilesetAnims_General3[idx], (u16 *)BG_VRAM + TILE_VRAM(0x1F0)), 0xc0);
|
||||
AppendTilesetAnimToBuffer(gTilesetAnims_General3[idx], (u16 *)(BG_VRAM + TILE_VRAM(0x1F0)), 0xc0);
|
||||
}
|
||||
|
||||
void TilesetCb_Petalburg(void)
|
||||
|
@ -1129,7 +1129,7 @@ static void gTilesetAnims_GeneralVDests4 (u16 timer)
|
|||
u16 idx;
|
||||
|
||||
idx = timer % 4;
|
||||
AppendTilesetAnimToBuffer(gTilesetAnims_General4[idx], (u16 *)BG_VRAM + TILE_VRAM(0x1E0)), 0x140);
|
||||
AppendTilesetAnimToBuffer(gTilesetAnims_General4[idx], (u16 *)(BG_VRAM + TILE_VRAM(0x1E0)), 0x140);
|
||||
}
|
||||
|
||||
static void sub_80A12D4(u8 timer)
|
||||
|
@ -1137,10 +1137,10 @@ static void sub_80A12D4(u8 timer)
|
|||
u8 idx;
|
||||
|
||||
idx = timer % 4;
|
||||
AppendTilesetAnimToBuffer(gTilesetAnims_Lavaridge0[idx], (u16 *)BG_VRAM + TILE_VRAM(0x320)), 0x80);
|
||||
AppendTilesetAnimToBuffer(gTilesetAnims_Lavaridge0[idx], (u16 *)(BG_VRAM + TILE_VRAM(0x320)), 0x80);
|
||||
|
||||
idx = (timer + 2) % 4;
|
||||
AppendTilesetAnimToBuffer(gTilesetAnims_Lavaridge0[idx], (u16 *)BG_VRAM + TILE_VRAM(0x324)), 0x80);
|
||||
AppendTilesetAnimToBuffer(gTilesetAnims_Lavaridge0[idx], (u16 *)(BG_VRAM + TILE_VRAM(0x324)), 0x80);
|
||||
}
|
||||
|
||||
static void sub_80A131C(u8 timer)
|
||||
|
@ -1148,7 +1148,7 @@ static void sub_80A131C(u8 timer)
|
|||
u8 idx;
|
||||
|
||||
idx = timer % 4;
|
||||
AppendTilesetAnimToBuffer(gTilesetAnims_Pacifidlog0[idx], (u16 *)BG_VRAM + TILE_VRAM(0x3D0)), 0x3C0);
|
||||
AppendTilesetAnimToBuffer(gTilesetAnims_Pacifidlog0[idx], (u16 *)(BG_VRAM + TILE_VRAM(0x3D0)), 0x3C0);
|
||||
}
|
||||
|
||||
static void sub_80A1344(u8 timer)
|
||||
|
@ -1156,7 +1156,7 @@ static void sub_80A1344(u8 timer)
|
|||
u8 idx;
|
||||
|
||||
idx = timer % 4;
|
||||
AppendTilesetAnimToBuffer(gTilesetAnims_Underwater0[idx], (u16 *)BG_VRAM + TILE_VRAM(0x3FO)), 0x80);
|
||||
AppendTilesetAnimToBuffer(gTilesetAnims_Underwater0[idx], (u16 *)(BG_VRAM + TILE_VRAM(0x3F0)), 0x80);
|
||||
}
|
||||
|
||||
static void sub_80A136C(u8 timer)
|
||||
|
@ -1164,7 +1164,7 @@ static void sub_80A136C(u8 timer)
|
|||
u8 idx;
|
||||
|
||||
idx = timer % 8;
|
||||
AppendTilesetAnimToBuffer(gTilesetAnims_Pacifidlog1[idx], (u16 *)BG_VRAM + TILE_VRAM(0x3F0)), 0x100);
|
||||
AppendTilesetAnimToBuffer(gTilesetAnims_Pacifidlog1[idx], (u16 *)(BG_VRAM + TILE_VRAM(0x3F0)), 0x100);
|
||||
}
|
||||
|
||||
static void sub_80A1394(u16 timer_div, u8 timer_mod)
|
||||
|
@ -1197,7 +1197,7 @@ static void sub_80A1470(u16 timer)
|
|||
u16 idx;
|
||||
|
||||
idx = timer % 2;
|
||||
AppendTilesetAnimToBuffer(gTilesetAnims_Rustboro1[idx], (u16 *)BG_VRAM + TILE_VRAM(0x3C0)), 0x80);
|
||||
AppendTilesetAnimToBuffer(gTilesetAnims_Rustboro1[idx], (u16 *)(BG_VRAM + TILE_VRAM(0x3C0)), 0x80);
|
||||
}
|
||||
|
||||
static void sub_80A1498(u16 timer)
|
||||
|
@ -1205,7 +1205,7 @@ static void sub_80A1498(u16 timer)
|
|||
u16 idx;
|
||||
|
||||
idx = timer % 4;
|
||||
AppendTilesetAnimToBuffer(gTilesetAnims_Lavaridge1_Cave0[idx], (u16 *)BG_VRAM + TILE_VRAM(0x2A0), 0x80);
|
||||
AppendTilesetAnimToBuffer(gTilesetAnims_Lavaridge1_Cave0[idx], (u16 *)(BG_VRAM + TILE_VRAM(0x2A0)), 0x80);
|
||||
}
|
||||
|
||||
static void sub_80A14C0(u16 timer_div, u8 timer_mod)
|
||||
|
@ -1221,7 +1221,7 @@ static void sub_80A14F8(u16 timer)
|
|||
u16 idx;
|
||||
|
||||
idx = timer % 4;
|
||||
AppendTilesetAnimToBuffer(gTilesetAnims_Lavaridge1_Cave0[idx], (u16 *)BG_VRAM + TILE_VRAM(0x3A0)), 0x80);
|
||||
AppendTilesetAnimToBuffer(gTilesetAnims_Lavaridge1_Cave0[idx], (u16 *)(BG_VRAM + TILE_VRAM(0x3A0)), 0x80);
|
||||
}
|
||||
|
||||
static void sub_80A1520(u16 timer)
|
||||
|
@ -1229,7 +1229,7 @@ static void sub_80A1520(u16 timer)
|
|||
u16 idx;
|
||||
|
||||
idx = timer % 4;
|
||||
AppendTilesetAnimToBuffer(gTilesetAnims_Dewford0[idx], (u16 *)BG_VRAM + TILE_VRAM(0x2AA)), 0xC0);
|
||||
AppendTilesetAnimToBuffer(gTilesetAnims_Dewford0[idx], (u16 *)(BG_VRAM + TILE_VRAM(0x2AA)), 0xC0);
|
||||
}
|
||||
|
||||
static void sub_80A1548(u16 timer)
|
||||
|
@ -1237,7 +1237,7 @@ static void sub_80A1548(u16 timer)
|
|||
u16 idx;
|
||||
|
||||
idx = timer % 4;
|
||||
AppendTilesetAnimToBuffer(gTilesetAnims_BattleFrontierOutsideWest0[idx], (u16 *)BG_VRAM + TILE_VRAM(0x2DA)), 0xC0);
|
||||
AppendTilesetAnimToBuffer(gTilesetAnims_BattleFrontierOutsideWest0[idx], (u16 *)(BG_VRAM + TILE_VRAM(0x2DA)), 0xC0);
|
||||
}
|
||||
|
||||
static void sub_80A1570(u16 timer)
|
||||
|
@ -1245,7 +1245,7 @@ static void sub_80A1570(u16 timer)
|
|||
u16 idx;
|
||||
|
||||
idx = timer % 4;
|
||||
AppendTilesetAnimToBuffer(gTilesetAnims_BattleFrontierOutsideEast0[idx], (u16 *)BG_VRAM + TILE_VRAM(0x2DA)), 0xC0);
|
||||
AppendTilesetAnimToBuffer(gTilesetAnims_BattleFrontierOutsideEast0[idx], (u16 *)(BG_VRAM + TILE_VRAM(0x2DA)), 0xC0);
|
||||
}
|
||||
|
||||
static void sub_80A1598(u16 timer)
|
||||
|
@ -1253,7 +1253,7 @@ static void sub_80A1598(u16 timer)
|
|||
u16 idx;
|
||||
|
||||
idx = timer % 4;
|
||||
AppendTilesetAnimToBuffer(gTilesetAnims_Slateport0[idx], (u16 *)BG_VRAM + TILE_VRAM(0x2E0)), 0x80);
|
||||
AppendTilesetAnimToBuffer(gTilesetAnims_Slateport0[idx], (u16 *)(BG_VRAM + TILE_VRAM(0x2E0)), 0x80);
|
||||
}
|
||||
|
||||
static void sub_80A15C0(u16 timer)
|
||||
|
@ -1331,7 +1331,7 @@ static void sub_80A16B0(u16 timer)
|
|||
u16 idx;
|
||||
|
||||
idx = timer % 3;
|
||||
AppendTilesetAnimToBuffer(gTilesetAnims_SootopolisGym0[idx], (u16 *))BG_VRAM + TILE_VRAM(0x3F0)), 0x180);
|
||||
AppendTilesetAnimToBuffer(gTilesetAnims_SootopolisGym0[idx], (u16 *)(BG_VRAM + TILE_VRAM(0x3F0)), 0x180);
|
||||
AppendTilesetAnimToBuffer(gTilesetAnims_SootopolisGym1[idx], (u16 *)(BG_VRAM + TILE_VRAM(0x3D0)), 0x280);
|
||||
}
|
||||
|
||||
|
@ -1340,7 +1340,7 @@ static void sub_80A16F8(u16 timer)
|
|||
u16 idx;
|
||||
|
||||
idx = timer % 4;
|
||||
AppendTilesetAnimToBuffer(gTilesetAnims_EliteFour1[idx], (u16 *)BG_VRAM + TILE_VRAM(0x3F8)), 0x20);
|
||||
AppendTilesetAnimToBuffer(gTilesetAnims_EliteFour1[idx], (u16 *)(BG_VRAM + TILE_VRAM(0x3F8)), 0x20);
|
||||
}
|
||||
|
||||
static void sub_80A1720(u16 timer)
|
||||
|
@ -1348,7 +1348,7 @@ static void sub_80A1720(u16 timer)
|
|||
u16 idx;
|
||||
|
||||
idx = timer % 2;
|
||||
AppendTilesetAnimToBuffer(gTilesetAnims_EliteFour0[idx], (u16 *)BG_VRAM + TILE_VRAM(0x3E0)), 0x80);
|
||||
AppendTilesetAnimToBuffer(gTilesetAnims_EliteFour0[idx], (u16 *)(BG_VRAM + TILE_VRAM(0x3E0)), 0x80);
|
||||
}
|
||||
|
||||
static void sub_80A1748(u16 timer)
|
||||
|
@ -1356,7 +1356,7 @@ static void sub_80A1748(u16 timer)
|
|||
u16 idx;
|
||||
|
||||
idx = timer % 2;
|
||||
AppendTilesetAnimToBuffer(gTilesetAnims_MauvilleGym0[idx], (u16 *)BG_VRAM + TILE_VRAM(0x290)), 0x200);
|
||||
AppendTilesetAnimToBuffer(gTilesetAnims_MauvilleGym0[idx], (u16 *)(BG_VRAM + TILE_VRAM(0x290)), 0x200);
|
||||
}
|
||||
|
||||
static void sub_80A1770(u16 timer)
|
||||
|
@ -1364,7 +1364,7 @@ static void sub_80A1770(u16 timer)
|
|||
u16 idx;
|
||||
|
||||
idx = timer % 2;
|
||||
AppendTilesetAnimToBuffer(gTilesetAnims_BikeShop0[idx], (u16 *)BG_VRAM + TILE_VRAM(0x3F0)), 0x120);
|
||||
AppendTilesetAnimToBuffer(gTilesetAnims_BikeShop0[idx], (u16 *)(BG_VRAM + TILE_VRAM(0x3F0)), 0x120);
|
||||
}
|
||||
|
||||
static void sub_80A1798(u16 timer)
|
||||
|
@ -1372,7 +1372,7 @@ static void sub_80A1798(u16 timer)
|
|||
u16 idx;
|
||||
|
||||
idx = timer % 8;
|
||||
AppendTilesetAnimToBuffer(gTilesetAnims_Sootopolis0[idx], (u16 *)BG_VRAM + TILE_VRAM(0x2F0)), 0xc00);
|
||||
AppendTilesetAnimToBuffer(gTilesetAnims_Sootopolis0[idx], (u16 *)(BG_VRAM + TILE_VRAM(0x2F0)), 0xc00);
|
||||
}
|
||||
|
||||
static void sub_80A17C0(u16 timer)
|
||||
|
@ -1380,7 +1380,7 @@ static void sub_80A17C0(u16 timer)
|
|||
u16 idx;
|
||||
|
||||
idx = timer % 3;
|
||||
AppendTilesetAnimToBuffer(gTilesetAnims_BattlePyramid0[idx], (u16 *)BG_VRAM + TILE_VRAM(0x297)), 0x100);
|
||||
AppendTilesetAnimToBuffer(gTilesetAnims_BattlePyramid0[idx], (u16 *)(BG_VRAM + TILE_VRAM(0x297)), 0x100);
|
||||
}
|
||||
|
||||
static void sub_80A17EC(u16 timer)
|
||||
|
@ -1388,7 +1388,7 @@ static void sub_80A17EC(u16 timer)
|
|||
u16 idx;
|
||||
|
||||
idx = timer % 3;
|
||||
AppendTilesetAnimToBuffer(gTilesetAnims_BattlePyramid1[idx], (u16 *)BG_VRAM + TILE_VRAM(0x287)), 0x100);
|
||||
AppendTilesetAnimToBuffer(gTilesetAnims_BattlePyramid1[idx], (u16 *)(BG_VRAM + TILE_VRAM(0x287)), 0x100);
|
||||
}
|
||||
|
||||
static void sub_80A1818(u16 a1)
|
||||
|
|
Loading…
Reference in a new issue