From 4d2b22a899c11dfcacfec6889968ab01655a3fe3 Mon Sep 17 00:00:00 2001 From: Marijn van der Werf Date: Fri, 26 May 2017 14:53:51 +0200 Subject: Add headers --- src/intro.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'src/intro.c') diff --git a/src/intro.c b/src/intro.c index ba2197ae7..20cb36cd7 100644 --- a/src/intro.c +++ b/src/intro.c @@ -1,7 +1,9 @@ +#include "intro_credits_graphics.h" +#include "unknown_task.h" +#include "hall_of_fame.h" #include "global.h" #include "gba/m4a_internal.h" #include "intro.h" -#include "asm.h" #include "data2.h" #include "decompress.h" #include "libgncmultiboot.h" @@ -19,9 +21,6 @@ #include "title_screen.h" #include "trig.h" -extern void *species_and_otid_get_pal(/*TODO: arg types*/); -extern void sub_8143680(int, u8); - extern struct SpriteTemplate gUnknown_02024E8C; extern u16 gUnknown_02039318; extern u16 gUnknown_0203931A; @@ -33,16 +32,9 @@ extern u16 gSaveFileStatus; extern u8 gReservedSpritePaletteCount; extern const u8 gInterfaceGfx_PokeBall[]; extern const u16 gInterfacePal_PokeBall[]; -extern const struct SpriteSheet gIntro2BrendanSpriteSheet; -extern const struct SpriteSheet gIntro2MaySpriteSheet; -extern const struct SpriteSheet gIntro2BicycleSpriteSheet; -extern const struct SpriteSheet gIntro2LatiosSpriteSheet; -extern const struct SpriteSheet gIntro2LatiasSpriteSheet; -extern const struct SpritePalette gIntro2SpritePalettes[]; extern const u8 gIntroCopyright_Gfx[]; extern const u16 gIntroCopyright_Pal[]; extern const u16 gIntroCopyright_Tilemap[]; -extern const u16 gUnknown_08393E64[]; extern void *const gUnknown_0840B5A0[]; //-------------------------------------------------- -- cgit v1.2.3 From f26daa3d6954d2db3a7c44b79d319a7a084462c2 Mon Sep 17 00:00:00 2001 From: Marijn van der Werf Date: Fri, 26 May 2017 15:01:42 +0200 Subject: Sort includes --- src/intro.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/intro.c') diff --git a/src/intro.c b/src/intro.c index 20cb36cd7..d5383b899 100644 --- a/src/intro.c +++ b/src/intro.c @@ -1,11 +1,10 @@ -#include "intro_credits_graphics.h" -#include "unknown_task.h" -#include "hall_of_fame.h" #include "global.h" #include "gba/m4a_internal.h" #include "intro.h" #include "data2.h" #include "decompress.h" +#include "hall_of_fame.h" +#include "intro_credits_graphics.h" #include "libgncmultiboot.h" #include "link.h" #include "m4a.h" @@ -20,6 +19,7 @@ #include "task.h" #include "title_screen.h" #include "trig.h" +#include "unknown_task.h" extern struct SpriteTemplate gUnknown_02024E8C; extern u16 gUnknown_02039318; -- cgit v1.2.3 From e072ddd6fbae8b303de546d0e9bd5ace2ecb20a1 Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Mon, 19 Jun 2017 13:34:32 -0500 Subject: move data to C and introduce CompressedSpriteSheet and CompressedSpritePalette --- src/intro.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/intro.c') diff --git a/src/intro.c b/src/intro.c index f13bd04e6..396f5e5df 100644 --- a/src/intro.c +++ b/src/intro.c @@ -31,7 +31,7 @@ extern struct GcmbStruct gMultibootProgramStruct; extern u16 gSaveFileStatus; extern u8 gReservedSpritePaletteCount; extern const u8 gInterfaceGfx_PokeBall[]; -extern const u16 gInterfacePal_PokeBall[]; +extern const u8 gInterfacePal_PokeBall[]; extern const u8 gIntroCopyright_Gfx[]; extern const u16 gIntroCopyright_Pal[]; extern const u16 gIntroCopyright_Tilemap[]; @@ -411,12 +411,12 @@ static const struct SpriteTemplate gSpriteTemplate_840AFF0 = .affineAnims = gDummySpriteAffineAnimTable, .callback = sub_813DA64, }; -const struct SpriteSheet gUnknown_0840B008[] = +const struct CompressedSpriteSheet gUnknown_0840B008[] = { {gIntroTiles, 0x1400, 2000}, {NULL}, }; -const struct SpriteSheet gUnknown_0840B018[] = +const struct CompressedSpriteSheet gUnknown_0840B018[] = { {gIntro1EonTiles, 0x400, 2002}, {NULL}, @@ -738,17 +738,17 @@ static const struct SpriteTemplate gSpriteTemplate_840B1F4 = .affineAnims = gDummySpriteAffineAnimTable, .callback = sub_813EDFC, }; -const struct SpriteSheet gIntro3PokeballGfx_Table[] = +const struct CompressedSpriteSheet gIntro3PokeballGfx_Table[] = { {gInterfaceGfx_PokeBall, 0x100, 2002}, {NULL}, }; -const struct SpriteSheet gIntro3MiscGfx_Table[] = +const struct CompressedSpriteSheet gIntro3MiscGfx_Table[] = { {gIntro3MiscTiles, 0xa00, 2003}, {NULL}, }; -const struct SpritePalette gInterfacePokeballPal_Table[] = +const struct CompressedSpritePalette gInterfacePokeballPal_Table[] = { {gInterfacePal_PokeBall, 2002}, {NULL}, @@ -1772,15 +1772,15 @@ void sub_813CE30(u16 scrX, u16 scrY, u16 zoom, u16 alpha) static u16 sub_813CE88(u16 species, s16 x, s16 y, u16 d, u8 front) { - const u16 *pal; + const u8 *lzPaletteData; u8 spriteId; if (front) LoadSpecialPokePic(&gMonFrontPicTable[species], gMonFrontPicCoords[species].coords, gMonFrontPicCoords[species].y_offset, 0x2000000, gUnknown_0840B5A0[d], species, 0, 1); else LoadSpecialPokePic(&gMonBackPicTable[species], gMonBackPicCoords[species].coords, gMonBackPicCoords[species].y_offset, 0x2000000, gUnknown_0840B5A0[d], species, 0, 0); - pal = species_and_otid_get_pal(species, 0, 0xFFFF); - LoadCompressedPalette(pal, 0x100 + d * 0x10, 0x20); + lzPaletteData = species_and_otid_get_pal(species, 0, 0xFFFF); + LoadCompressedPalette(lzPaletteData, 0x100 + d * 0x10, 0x20); sub_8143648(d, d); spriteId = CreateSprite(&gUnknown_02024E8C, x, y, (d + 1) * 4); gSprites[spriteId].oam.paletteNum = d; -- cgit v1.2.3