summaryrefslogtreecommitdiff
path: root/src/intro_credits_graphics.c
diff options
context:
space:
mode:
authorPhlosioneer <mattmdrr2@gmail.com>2019-03-11 03:12:15 -0400
committerhuderlem <huderlem@gmail.com>2019-03-16 12:37:04 -0500
commit9848f84b9ec2d5950cb5dc4600b7651486ff986a (patch)
tree43bf943b7ea0b7e533cb1b327fcedfb751f515db /src/intro_credits_graphics.c
parent291df27dcbc9b1d1ea4bdf2f7363d58409fbd81d (diff)
Use constants for Oam .shape and .size fields
Also some general formatting fixes for constants.
Diffstat (limited to 'src/intro_credits_graphics.c')
-rw-r--r--src/intro_credits_graphics.c159
1 files changed, 108 insertions, 51 deletions
diff --git a/src/intro_credits_graphics.c b/src/intro_credits_graphics.c
index b98708324..29ee2067f 100644
--- a/src/intro_credits_graphics.c
+++ b/src/intro_credits_graphics.c
@@ -57,43 +57,51 @@ static void nullsub_65(struct Sprite *sprite);
static void sub_817B7C4(struct Sprite *sprite);
static void nullsub_66(struct Sprite *sprite);
-static const struct SpriteTemplate gUnknown_085F504C = {
+static const struct SpriteTemplate gUnknown_085F504C =
+{
2000, 0xFFFF, &gDummyOamData, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_817B62C
};
-static const struct CompressedSpriteSheet gUnknown_085F5064[] = {
+static const struct CompressedSpriteSheet gUnknown_085F5064[] =
+{
{ gUnknown_085F16A8, 0x400, 2000 },
{ NULL }
};
-static const union AnimCmd gUnknown_085F5074[] = {
+static const union AnimCmd gUnknown_085F5074[] =
+{
ANIMCMD_FRAME( 0, 30),
ANIMCMD_END
};
-static const union AnimCmd gUnknown_085F507C[] = {
+static const union AnimCmd gUnknown_085F507C[] =
+{
ANIMCMD_FRAME(16, 30),
ANIMCMD_END
};
-static const union AnimCmd gUnknown_085F5084[] = {
+static const union AnimCmd gUnknown_085F5084[] =
+{
ANIMCMD_FRAME(20, 30),
ANIMCMD_END
};
-static const union AnimCmd gUnknown_085F508C[] = {
+static const union AnimCmd gUnknown_085F508C[] =
+{
ANIMCMD_FRAME(22, 30),
ANIMCMD_END
};
-static const union AnimCmd *const gUnknown_085F5094[] = {
+static const union AnimCmd *const gUnknown_085F5094[] =
+{
gUnknown_085F5074,
gUnknown_085F507C,
gUnknown_085F5084,
gUnknown_085F508C
};
-static const struct IntroCreditsSpriteMetadata gUnknown_085F50A4[] = {
+static const struct IntroCreditsSpriteMetadata gUnknown_085F50A4[] =
+{
{ 0, ST_OAM_SQUARE, 2, 72, 32, 100, 0xc00 },
{ 0, ST_OAM_SQUARE, 2, 158, 32, 100, 0xc00 },
{ 1, ST_OAM_SQUARE, 1, 192, 40, 101, 0x800 },
@@ -105,33 +113,39 @@ static const struct IntroCreditsSpriteMetadata gUnknown_085F50A4[] = {
{ 3, ST_OAM_H_RECTANGLE, 0, 240, 46, 103, 0x100 },
};
-static const struct CompressedSpriteSheet gUnknown_085F50EC[] = {
+static const struct CompressedSpriteSheet gUnknown_085F50EC[] =
+{
{ gIntro2TreeTiles, 0x400, 2000 },
{ NULL }
};
-static const union AnimCmd gUnknown_085F50FC[] = {
+static const union AnimCmd gUnknown_085F50FC[] =
+{
ANIMCMD_FRAME( 0, 30),
ANIMCMD_END
};
-static const union AnimCmd gUnknown_085F5104[] = {
+static const union AnimCmd gUnknown_085F5104[] =
+{
ANIMCMD_FRAME(16, 30),
ANIMCMD_END
};
-static const union AnimCmd gUnknown_085F510C[] = {
+static const union AnimCmd gUnknown_085F510C[] =
+{
ANIMCMD_FRAME(24, 30),
ANIMCMD_END
};
-static const union AnimCmd *const gUnknown_085F5114[] = {
+static const union AnimCmd *const gUnknown_085F5114[] =
+{
gUnknown_085F50FC,
gUnknown_085F5104,
gUnknown_085F510C
};
-static const struct IntroCreditsSpriteMetadata gUnknown_085F5120[] = {
+static const struct IntroCreditsSpriteMetadata gUnknown_085F5120[] =
+{
{ 0, ST_OAM_SQUARE, 2, 16, 88, 100, 0x2000 },
{ 0, ST_OAM_SQUARE, 2, 80, 88, 100, 0x2000 },
{ 0, ST_OAM_SQUARE, 2, 144, 88, 100, 0x2000 },
@@ -146,21 +160,25 @@ static const struct IntroCreditsSpriteMetadata gUnknown_085F5120[] = {
{ 2, ST_OAM_V_RECTANGLE, 2, 248, 88, 102, 0x800 },
};
-static const struct CompressedSpriteSheet gUnknown_085F5180[] = {
+static const struct CompressedSpriteSheet gUnknown_085F5180[] =
+{
{ gIntro2NightTiles, 0x400, 2000 },
{ NULL }
};
-static const union AnimCmd gUnknown_085F5190[] = {
+static const union AnimCmd gUnknown_085F5190[] =
+{
ANIMCMD_FRAME(0, 30),
ANIMCMD_END
};
-static const union AnimCmd *const gUnknown_085F5198[] = {
+static const union AnimCmd *const gUnknown_085F5198[] =
+{
gUnknown_085F5190
};
-static const struct IntroCreditsSpriteMetadata gUnknown_085F519C[] = {
+static const struct IntroCreditsSpriteMetadata gUnknown_085F519C[] =
+{
{ 0, ST_OAM_SQUARE, 2, 24, 88, 100, 0x1000 },
{ 0, ST_OAM_SQUARE, 2, 64, 88, 100, 0x1000 },
{ 0, ST_OAM_SQUARE, 2, 104, 88, 100, 0x1000 },
@@ -169,11 +187,16 @@ static const struct IntroCreditsSpriteMetadata gUnknown_085F519C[] = {
{ 0, ST_OAM_SQUARE, 2, 224, 88, 100, 0x1000 },
};
-static const struct OamData gOamData_85F51CC = {
- .y = 160, .shape = ST_OAM_SQUARE, .size = 3, .priority = 1
+static const struct OamData gOamData_85F51CC =
+{
+ .y = 160,
+ .shape = SPRITE_SHAPE(64x64),
+ .size = SPRITE_SIZE(64x64),
+ .priority = 1
};
-static const union AnimCmd gUnknown_085F51D4[] = {
+static const union AnimCmd gUnknown_085F51D4[] =
+{
ANIMCMD_FRAME( 0, 8),
ANIMCMD_FRAME( 64, 8),
ANIMCMD_FRAME(128, 8),
@@ -181,23 +204,31 @@ static const union AnimCmd gUnknown_085F51D4[] = {
ANIMCMD_JUMP(0)
};
-static const union AnimCmd *const gUnknown_085F51E8[] = {
+static const union AnimCmd *const gUnknown_085F51E8[] =
+{
gUnknown_085F51D4
};
-static const struct SpriteTemplate gUnknown_085F51EC = {
+static const struct SpriteTemplate gUnknown_085F51EC =
+{
1002, 1002, &gOamData_85F51CC, gUnknown_085F51E8, NULL, gDummySpriteAffineAnimTable, nullsub_65
};
-static const struct SpriteTemplate gUnknown_085F5204 = {
+static const struct SpriteTemplate gUnknown_085F5204 =
+{
1003, 1003, &gOamData_85F51CC, gUnknown_085F51E8, NULL, gDummySpriteAffineAnimTable, nullsub_65
};
-static const struct OamData gUnknown_085F521C = {
- .y = 160, .shape = ST_OAM_H_RECTANGLE, .size = 3, .priority = 1
+static const struct OamData gUnknown_085F521C =
+{
+ .y = 160,
+ .shape = SPRITE_SHAPE(64x32),
+ .size = SPRITE_SIZE(64x32),
+ .priority = 1
};
-static const union AnimCmd gUnknown_085F5224[] = {
+static const union AnimCmd gUnknown_085F5224[] =
+{
ANIMCMD_FRAME( 0, 8),
ANIMCMD_FRAME( 32, 8),
ANIMCMD_FRAME( 64, 8),
@@ -205,71 +236,89 @@ static const union AnimCmd gUnknown_085F5224[] = {
ANIMCMD_JUMP(0)
};
-static const union AnimCmd *const gUnknown_085F5238[] = {
+static const union AnimCmd *const gUnknown_085F5238[] =
+{
gUnknown_085F5224
};
-static const struct SpriteTemplate gUnknown_085F523C = {
+static const struct SpriteTemplate gUnknown_085F523C =
+{
1001, 1002, &gUnknown_085F521C, gUnknown_085F5238, NULL, gDummySpriteAffineAnimTable, sub_817B7C4
};
-static const struct SpriteTemplate gUnknown_085F5254 = {
+static const struct SpriteTemplate gUnknown_085F5254 =
+{
1001, 1003, &gUnknown_085F521C, gUnknown_085F5238, NULL, gDummySpriteAffineAnimTable, sub_817B7C4
};
-static const struct OamData gUnknown_085F526C = {
- .y = 160, .shape = ST_OAM_SQUARE, .size = 3, .priority = 1
+static const struct OamData gUnknown_085F526C =
+{
+ .y = 160,
+ .shape = SPRITE_SHAPE(64x64),
+ .size = SPRITE_SIZE(64x64),
+ .priority = 1
};
-static const union AnimCmd gUnknown_085F5274[] = {
+static const union AnimCmd gUnknown_085F5274[] =
+{
ANIMCMD_FRAME( 0, 16),
ANIMCMD_END
};
-static const union AnimCmd gUnknown_085F527C[] = {
+static const union AnimCmd gUnknown_085F527C[] =
+{
ANIMCMD_FRAME( 64, 16),
ANIMCMD_END
};
-static const union AnimCmd *const gUnknown_085F5284[] = {
+static const union AnimCmd *const gUnknown_085F5284[] =
+{
gUnknown_085F5274,
gUnknown_085F527C
};
-static const struct SpriteTemplate gUnknown_085F528C = {
+static const struct SpriteTemplate gUnknown_085F528C =
+{
1004, 1004, &gUnknown_085F526C, gUnknown_085F5284, NULL, gDummySpriteAffineAnimTable, nullsub_66
};
-static const struct SpriteTemplate gUnknown_085F52A4 = {
+static const struct SpriteTemplate gUnknown_085F52A4 =
+{
1005, 1005, &gUnknown_085F526C, gUnknown_085F5284, NULL, gDummySpriteAffineAnimTable, nullsub_66
};
-const struct CompressedSpriteSheet gIntro2BrendanSpriteSheet[] = {
+const struct CompressedSpriteSheet gIntro2BrendanSpriteSheet[] =
+{
{ gIntro2BrendanNoTurnGfx, 0x2000, 1002 },
{ NULL }
};
-const struct CompressedSpriteSheet gIntro2MaySpriteSheet[] = {
+const struct CompressedSpriteSheet gIntro2MaySpriteSheet[] =
+{
{ gIntro2MayNoTurnGfx, 0x2000, 1003 },
{ NULL }
};
-const struct CompressedSpriteSheet gIntro2BicycleSpriteSheet[] = {
+const struct CompressedSpriteSheet gIntro2BicycleSpriteSheet[] =
+{
{ gIntro2BicycleTiles, 0x1000, 1001 },
{ NULL }
};
-static const struct CompressedSpriteSheet gUnknown_085F52EC[] = {
+static const struct CompressedSpriteSheet gUnknown_085F52EC[] =
+{
{ gIntro2FlygonGfx, 0x1000, 1004 },
{ NULL }
};
-const struct CompressedSpriteSheet gIntro2FlygonSpriteSheet[] = {
+const struct CompressedSpriteSheet gIntro2FlygonSpriteSheet[] =
+{
{ gIntro2FlygonGfx, 0x1000, 1005 },
{ NULL }
};
-const struct SpritePalette gIntroBikeAndFlygonPalette[] = {
+const struct SpritePalette gIntroBikeAndFlygonPalette[] =
+{
{ gIntro2BrendanNoTurnPal, 1002 },
{ gIntro2BrendanNoTurnPal, 1003 },
{ gIntro2FlygonPal, 1004 },
@@ -277,32 +326,38 @@ const struct SpritePalette gIntroBikeAndFlygonPalette[] = {
{ NULL }
};
-const struct CompressedSpriteSheet gUnknown_085F5334[] = {
+const struct CompressedSpriteSheet gUnknown_085F5334[] =
+{
{ gIntro2BrendanTiles, 0x3800, 1002 },
{ NULL }
};
-const struct CompressedSpriteSheet gUnknown_085F5344[] = {
+const struct CompressedSpriteSheet gUnknown_085F5344[] =
+{
{ gIntro2MayTiles, 0x3800, 1003 },
{ NULL }
};
-const struct CompressedSpriteSheet gUnknown_085F5354[] = {
+const struct CompressedSpriteSheet gUnknown_085F5354[] =
+{
{ gIntro2BicycleTiles, 0x1000, 1001 },
{ NULL }
};
-static const struct CompressedSpriteSheet gUnknown_085F5364[] = {
+static const struct CompressedSpriteSheet gUnknown_085F5364[] =
+{
{ gIntro2LatiosTiles, 0x1000, 1004 },
{ NULL }
};
-static const struct CompressedSpriteSheet gUnknown_085F5374[] = {
+static const struct CompressedSpriteSheet gUnknown_085F5374[] =
+{
{ gIntro2LatiasTiles, 0x1000, 1005 },
{ NULL }
};
-const struct SpritePalette gUnknown_085F5384[] = {
+const struct SpritePalette gUnknown_085F5384[] =
+{
{ gIntro2BrendanPalette, 1002 },
{ gIntro2MayPalette, 1003 },
{ gIntro2LatiosPalette, 1004 },
@@ -310,12 +365,14 @@ const struct SpritePalette gUnknown_085F5384[] = {
{ NULL }
};
-const struct CompressedSpriteSheet gUnknown_085F53AC[] = {
+const struct CompressedSpriteSheet gUnknown_085F53AC[] =
+{
{ gIntro2BrendanTiles, 0x2000, 1002},
{ NULL }
};
-const struct CompressedSpriteSheet gUnknown_085F53BC[] = {
+const struct CompressedSpriteSheet gUnknown_085F53BC[] =
+{
{ gIntro2MayTiles, 0x2000, 1003},
{ NULL }
};