summaryrefslogtreecommitdiff
path: root/src/intro.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/intro.c')
-rw-r--r--src/intro.c36
1 files changed, 16 insertions, 20 deletions
diff --git a/src/intro.c b/src/intro.c
index ba2197ae7..462a2134d 100644
--- a/src/intro.c
+++ b/src/intro.c
@@ -1,9 +1,10 @@
#include "global.h"
#include "gba/m4a_internal.h"
#include "intro.h"
-#include "asm.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"
@@ -18,9 +19,7 @@
#include "task.h"
#include "title_screen.h"
#include "trig.h"
-
-extern void *species_and_otid_get_pal(/*TODO: arg types*/);
-extern void sub_8143680(int, u8);
+#include "unknown_task.h"
extern struct SpriteTemplate gUnknown_02024E8C;
extern u16 gUnknown_02039318;
@@ -32,17 +31,10 @@ extern struct GcmbStruct gMultibootProgramStruct;
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 gInterfacePal_PokeBall[];
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[];
//--------------------------------------------------
@@ -51,7 +43,11 @@ extern void *const gUnknown_0840B5A0[];
static const u16 Palette_406340[] = INCBIN_U16("graphics/intro/unknown1.gbapal");
static const u16 Palette_406360[] = INCBIN_U16("graphics/intro/unknown2.gbapal");
+#if ENGLISH
static const u8 gIntroTiles[] = INCBIN_U8("graphics/intro/intro.4bpp.lz");
+#elif GERMAN
+extern const u8 gIntroTiles[];
+#endif
static const u16 gIntro1BGPals[][16] =
{
INCBIN_U16("graphics/intro/intro1_bgpal1.gbapal"),
@@ -419,12 +415,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},
@@ -746,17 +742,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},
@@ -1780,15 +1776,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)
{
- void *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;