diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/.clang-format | 24 | ||||
-rw-r--r-- | include/data2.h | 19 | ||||
-rw-r--r-- | include/decompress.h | 14 | ||||
-rw-r--r-- | include/field_effect.h | 6 | ||||
-rw-r--r-- | include/fonts/font0_widths.h | 41 | ||||
-rw-r--r-- | include/fonts/font1_widths.h | 37 | ||||
-rw-r--r-- | include/fonts/font3_widths.h | 41 | ||||
-rw-r--r-- | include/fonts/font4_widths.h | 37 | ||||
-rw-r--r-- | include/fonts/type1_map.h | 250 | ||||
-rw-r--r-- | include/fonts/type3_map.h | 131 | ||||
-rw-r--r-- | include/graphics.h | 26 | ||||
-rw-r--r-- | include/intro_credits_graphics.h | 14 | ||||
-rw-r--r-- | include/pokeball.h | 6 | ||||
-rw-r--r-- | include/pokemon.h | 5 | ||||
-rw-r--r-- | include/songs.h | 20 | ||||
-rw-r--r-- | include/sprite.h | 21 |
16 files changed, 113 insertions, 579 deletions
diff --git a/include/.clang-format b/include/.clang-format new file mode 100644 index 000000000..995d5d96d --- /dev/null +++ b/include/.clang-format @@ -0,0 +1,24 @@ +BasedOnStyle: LLVM +AllowShortFunctionsOnASingleLine: None +BreakBeforeBraces: Allman +ColumnLimit: 100 +UseTab: Never +IndentWidth: 4 +TabWidth: 4 +AlignAfterOpenBracket: DontAlign +Cpp11BracedListStyle: false +BreakStringLiterals: false +IndentCaseLabels: false +BinPackArguments: false +BinPackParameters: false +IncludeCategories: + - Regex: '^"gba/types\.h"$' + Priority: -4 + - Regex: '^"global\.h"$' + Priority: -3 + - Regex: '^"gba/gba\.h"$' + Priority: -2 + - Regex: '^"gba/' + Priority: -1 + - Regex: '.\*' + Priority: 1 diff --git a/include/data2.h b/include/data2.h index 759efe3d3..f292472ef 100644 --- a/include/data2.h +++ b/include/data2.h @@ -3,7 +3,8 @@ #include "sprite.h" -struct UnknownStructD2 { +struct UnknownStructD2 +{ u32 unk0; u32 unk4; u32 unk8; @@ -21,15 +22,15 @@ extern const union AffineAnimCmd *const gSpriteAffineAnimTable_81E7C18; extern const union AnimCmd *const gSpriteAnimTable_81E7C64[]; extern struct MonCoords gMonFrontPicCoords[]; extern struct MonCoords gMonBackPicCoords[]; -extern struct SpriteSheet gMonFrontPicTable[]; -extern struct SpriteSheet gMonBackPicTable[]; -extern const struct SpritePalette gMonPaletteTable[]; -extern const struct SpritePalette gMonShinyPaletteTable[]; +extern struct CompressedSpriteSheet gMonFrontPicTable[]; +extern struct CompressedSpriteSheet gMonBackPicTable[]; +extern const struct CompressedSpritePalette gMonPaletteTable[]; +extern const struct CompressedSpritePalette gMonShinyPaletteTable[]; extern const union AnimCmd *const *const gUnknown_081EC2A4[]; extern const union AnimCmd *const *const gUnknown_081ECACC[]; extern struct MonCoords gTrainerBackPicCoords[]; -extern struct SpriteSheet gTrainerBackPicTable[]; -extern const struct SpritePalette gTrainerBackPicPaletteTable[]; +extern struct CompressedSpriteSheet gTrainerBackPicTable[]; +extern const struct CompressedSpritePalette gTrainerBackPicPaletteTable[]; extern u8 gEnemyMonElevation[]; extern const u8 gTrainerClassNames[][13]; extern const struct Trainer gTrainers[]; @@ -37,8 +38,8 @@ extern u8 gSpeciesNames[][11]; extern u8 gMoveNames[][13]; extern const struct UnknownStructD2 gUnknown_081F9674; extern const u8 gUnknown_081F96C8[]; -extern struct SpriteSheet gUnknown_081FAEA4; -extern struct SpritePalette gUnknown_081FAEAC; +extern struct CompressedSpriteSheet gUnknown_081FAEA4; +extern struct CompressedSpritePalette gUnknown_081FAEAC; extern const struct SpriteTemplate gSpriteTemplate_81FAF0C; extern void *const gUnknown_081FAF4C[]; extern struct BattleMove gBattleMoves[]; diff --git a/include/decompress.h b/include/decompress.h index 28570afdd..07d69301f 100644 --- a/include/decompress.h +++ b/include/decompress.h @@ -5,13 +5,13 @@ void sub_800D238(const void *src, void *dest); void LZDecompressVram(const void *src, void *dest); -void LoadCompressedObjectPic(const struct SpriteSheet *a); -void LoadCompressedObjectPicOverrideBuffer(const struct SpriteSheet *a, void *buffer); -void LoadCompressedObjectPalette(const struct SpritePalette *a); -void LoadCompressedObjectPaletteOverrideBuffer(const struct SpritePalette *a, void *buffer); -void DecompressPicFromTable_2(const struct SpriteSheet *a, u8 b, u8 c, void *d, void *e, s32 f); -void HandleLoadSpecialPokePic(const struct SpriteSheet *spriteSheet, u32 b, u32 c, u32 d, void *dest, s32 species, u32 g); -void LoadSpecialPokePic(const struct SpriteSheet *spriteSheet, u32 b, u32 c, u32 d, void *dest, s32 species, u32 g, u32 h); +void LoadCompressedObjectPic(const struct CompressedSpriteSheet *a); +void LoadCompressedObjectPicOverrideBuffer(const struct CompressedSpriteSheet *a, void *buffer); +void LoadCompressedObjectPalette(const struct CompressedSpritePalette *a); +void LoadCompressedObjectPaletteOverrideBuffer(const struct CompressedSpritePalette *a, void *buffer); +void DecompressPicFromTable_2(const struct CompressedSpriteSheet *a, u8 b, u8 c, void *d, void *e, s32 f); +void HandleLoadSpecialPokePic(const struct CompressedSpriteSheet *spriteSheet, u32 b, u32 c, u32 d, void *dest, s32 species, u32 g); +void LoadSpecialPokePic(const struct CompressedSpriteSheet *spriteSheet, u32 b, u32 c, u32 d, void *dest, s32 species, u32 g, u32 h); void Unused_LZDecompressWramIndirect(const void **src, void *dest); #endif // GUARD_DECOMPRESS_H diff --git a/include/field_effect.h b/include/field_effect.h index 74b5fa34d..cd84652b1 100644 --- a/include/field_effect.h +++ b/include/field_effect.h @@ -72,15 +72,13 @@ enum FieldEffectScriptIdx FLDEFF_USE_TELEPORT }; -extern const struct SpritePalette gTrainerFrontPicPaletteTable[2]; +extern const struct CompressedSpritePalette gTrainerFrontPicPaletteTable[2]; extern const struct SpritePalette gUnknown_0839F114; -extern const struct SpriteSheet gTrainerFrontPicTable[2]; +extern const struct CompressedSpriteSheet gTrainerFrontPicTable[2]; extern const struct SpriteTemplate gSpriteTemplate_839F128; extern const struct OamData gOamData_839F0F4; extern struct SpriteTemplate gUnknown_02024E8C; -extern const struct SpritePalette *sub_80409C8(u16, u32, u32); - extern u8 gLastFieldPokeMenuOpened; u32 FieldEffectStart(u8 id); diff --git a/include/fonts/font0_widths.h b/include/fonts/font0_widths.h deleted file mode 100644 index 77fcff3ee..000000000 --- a/include/fonts/font0_widths.h +++ /dev/null @@ -1,41 +0,0 @@ -#if REVISION >= 1 -static const u8 sFont0Widths[] = -{ - 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 8, 6, 6, 6, 6, 6, 4, 8, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, 6, 6, 8, - 8, 8, 8, 8, 8, 8, 3, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 7, 6, 4, 8, 8, 8, 7, 8, 8, 4, 6, 6, 4, 4, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 6, 7, 8, 7, 7, 8, 8, 4, - 7, 8, 8, 8, 8, 8, 7, 8, 7, 7, 7, 7, 7, 7, 8, 7, - 7, 7, 7, 7, 5, 6, 6, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 3, 6, 3, 5, 3, - 6, 6, 6, 3, 3, 6, 6, 6, 3, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 4, 5, 6, - 3, 6, 6, 6, 6, 6, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, - 3, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 1, 1, -}; -#else -static const u8 sFont0Widths[] = -{ - 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 8, 6, 6, 6, 6, 6, 5, 8, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, - 7, 7, 7, 8, 8, 8, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 7, 6, 3, 8, 8, 8, 7, 8, 8, 4, 6, 6, 4, 4, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 8, 7, 7, 8, 8, 6, - 7, 8, 8, 8, 8, 8, 7, 8, 7, 7, 7, 7, 7, 7, 8, 7, - 7, 7, 7, 7, 7, 7, 7, 8, 6, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 3, 6, 3, 5, 3, - 6, 6, 6, 3, 3, 6, 6, 6, 3, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 4, 5, 6, - 3, 6, 6, 6, 6, 6, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, - 3, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 1, 1, -}; -#endif diff --git a/include/fonts/font1_widths.h b/include/fonts/font1_widths.h deleted file mode 100644 index 454bbfaca..000000000 --- a/include/fonts/font1_widths.h +++ /dev/null @@ -1,37 +0,0 @@ -#if REVISION >= 1 -static const u8 sFont1Widths[] = -{ - 5, 3, 8, 8, 8, 8, 8, 8, 8, 4, 5, 4, 4, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 5, 8, 8, 8, 8, 8, 4, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 5, 5, 5, - 6, 5, 5, 5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 5, 5, - 5, 5, 4, 4, 5, 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 6, 6, 7, 7, 7, 7, 6, 7, 6, 6, 7, 6, - 7, 7, 7, 6, 7, 6, 7, 6, 7, 6, 6, 7, 6, 6, 3, 3, - 5, 5, 5, 5, 3, 3, 5, 5, 5, 5, 5, 5, -}; -#endif diff --git a/include/fonts/font3_widths.h b/include/fonts/font3_widths.h deleted file mode 100644 index 45dc69c06..000000000 --- a/include/fonts/font3_widths.h +++ /dev/null @@ -1,41 +0,0 @@ -#if REVISION >= 1 -static const u8 sFont3Widths[] = -{ - 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 8, 6, 6, 6, 6, 6, 4, 8, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, 6, 6, 8, - 8, 8, 8, 8, 8, 8, 3, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 7, 6, 4, 8, 8, 8, 7, 8, 8, 4, 6, 6, 4, 4, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 6, 7, 8, 7, 7, 8, 8, 4, - 7, 8, 8, 8, 8, 8, 7, 8, 7, 7, 7, 7, 7, 7, 8, 7, - 7, 7, 7, 7, 5, 6, 6, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 3, 6, 3, 5, 3, - 6, 6, 6, 3, 3, 6, 6, 6, 3, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 4, 5, 6, - 3, 6, 6, 6, 6, 6, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, - 3, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 1, 1, -}; -#else -static const u8 sFont3Widths[] = -{ - 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 8, 6, 6, 6, 6, 6, 4, 8, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 7, 6, 4, 8, 8, 8, 7, 8, 8, 4, 6, 6, 4, 4, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 6, 7, 8, 7, 7, 8, 8, 4, - 7, 8, 8, 8, 8, 8, 7, 8, 7, 7, 7, 7, 7, 7, 8, 7, - 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 3, 6, 3, 5, 3, - 6, 6, 6, 3, 3, 6, 6, 6, 3, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 4, 5, 6, - 3, 6, 6, 6, 6, 6, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, - 3, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 1, 1, -}; -#endif diff --git a/include/fonts/font4_widths.h b/include/fonts/font4_widths.h deleted file mode 100644 index 63adf4921..000000000 --- a/include/fonts/font4_widths.h +++ /dev/null @@ -1,37 +0,0 @@ -#if REVISION >= 1 -static const u8 sFont4Widths[] = -{ - 5, 3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 7, 7, 8, 5, - 5, 5, 3, 5, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 4, 5, 5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 4, 4, 5, 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 6, 6, 7, 7, 7, 7, 6, 7, 6, 6, 7, 6, - 7, 7, 7, 6, 7, 6, 7, 6, 7, 6, 6, 7, 6, 6, 3, 3, - 5, 5, 5, 5, 3, 3, 5, 5, 5, 5, 5, 5, -}; -#endif diff --git a/include/fonts/type1_map.h b/include/fonts/type1_map.h deleted file mode 100644 index 45e42f62c..000000000 --- a/include/fonts/type1_map.h +++ /dev/null @@ -1,250 +0,0 @@ -static const u8 sFontType1Map[] = -{ - 0xD4, 0xD4, - 0xD4, 0x31, - 0xD4, 0x32, - 0xD4, 0x33, - 0xD4, 0x34, - 0xD4, 0x35, - 0xD4, 0x36, - 0xD4, 0x37, - 0xD4, 0x38, - 0xD4, 0x39, - 0xD4, 0x3A, - 0xD4, 0x3B, - 0xD4, 0x3C, - 0xD4, 0x3D, - 0xD4, 0x3E, - 0xD4, 0x3F, - 0xD4, 0x40, - 0xD4, 0x41, - 0xD4, 0x42, - 0xD4, 0x43, - 0xD4, 0x44, - 0xD4, 0x45, - 0xD4, 0x46, - 0xD4, 0x47, - 0xD4, 0x48, - 0xD4, 0x49, - 0xD4, 0x4A, - 0xD4, 0x4B, - 0xD4, 0x4C, - 0xD4, 0x4D, - 0xD4, 0x4E, - 0xD4, 0x4F, - 0xD4, 0x50, - 0xD4, 0x51, - 0xD4, 0x52, - 0xD4, 0x53, - 0xD4, 0x54, - 0xD4, 0x55, - 0xD4, 0x56, - 0xD4, 0x57, - 0xD4, 0x58, - 0xD4, 0x59, - 0xD4, 0x5A, - 0xD4, 0x5B, - 0xD4, 0x5C, - 0xD4, 0x5D, - 0xD4, 0x5E, - 0xD4, 0x31, - 0xD4, 0x32, - 0xD4, 0x33, - 0xD4, 0x34, - 0xD4, 0x35, - 0xD4, 0x60, - 0xD4, 0x61, - 0xD4, 0x62, - 0x65, 0x36, - 0x65, 0x37, - 0x65, 0x38, - 0x65, 0x39, - 0x65, 0x3A, - 0x65, 0x3B, - 0x65, 0x3C, - 0x65, 0x3D, - 0x65, 0x3E, - 0x65, 0x3F, - 0x65, 0x40, - 0x65, 0x41, - 0x65, 0x42, - 0x65, 0x43, - 0x65, 0x44, - 0x65, 0x4A, - 0x65, 0x4B, - 0x65, 0x4C, - 0x65, 0x4D, - 0x65, 0x4E, - 0x64, 0x4A, - 0x64, 0x4B, - 0x64, 0x4C, - 0x64, 0x4D, - 0x64, 0x4E, - 0xD4, 0x5F, - 0xD4, 0x00, - 0xD4, 0x01, - 0xD4, 0x02, - 0xD4, 0x03, - 0xD4, 0x04, - 0xD4, 0x05, - 0xD4, 0x06, - 0xD4, 0x07, - 0xD4, 0x08, - 0xD4, 0x09, - 0xD4, 0x0A, - 0xD4, 0x0B, - 0xD4, 0x0C, - 0xD4, 0x0D, - 0xD4, 0x0E, - 0xD4, 0x0F, - 0xD4, 0x10, - 0xD4, 0x11, - 0xD4, 0x12, - 0xD4, 0x13, - 0xD4, 0x14, - 0xD4, 0x15, - 0xD4, 0x16, - 0xD4, 0x17, - 0xD4, 0x18, - 0xD4, 0x19, - 0xD4, 0x1A, - 0xD4, 0x1B, - 0xD4, 0x4D, - 0xD4, 0x1C, - 0xD4, 0x1D, - 0xD4, 0x1E, - 0xD4, 0x1F, - 0xD4, 0x20, - 0xD4, 0x21, - 0xD4, 0x22, - 0xD4, 0x23, - 0xD4, 0x24, - 0xD4, 0x25, - 0xD4, 0x58, - 0xD4, 0x26, - 0xD4, 0x27, - 0xD4, 0x28, - 0xD4, 0x29, - 0xD4, 0x2A, - 0xD4, 0x2B, - 0xD4, 0x69, - 0xD4, 0x30, - 0xD4, 0x6A, - 0xD4, 0x6B, - 0xD4, 0x74, - 0xD4, 0x2D, - 0xD4, 0x2E, - 0xD4, 0x2F, - 0x65, 0x05, - 0x65, 0x06, - 0x65, 0x07, - 0x65, 0x08, - 0x65, 0x09, - 0x65, 0x0A, - 0x65, 0x0B, - 0x65, 0x0C, - 0x65, 0x0D, - 0x65, 0x0E, - 0x65, 0x0F, - 0x65, 0x10, - 0x65, 0x11, - 0x65, 0x12, - 0x65, 0x13, - 0x65, 0x19, - 0x65, 0x1A, - 0x65, 0x1B, - 0x65, 0x4D, - 0x65, 0x1C, - 0x64, 0x19, - 0x64, 0x1A, - 0x64, 0x1B, - 0x64, 0x4D, - 0x64, 0x1C, - 0xD4, 0x2C, - 0xD4, 0x76, - 0xD4, 0x77, - 0xD4, 0x78, - 0xD4, 0x79, - 0xD4, 0x7A, - 0xD4, 0x7B, - 0xD4, 0x7C, - 0xD4, 0x7D, - 0xD4, 0x7E, - 0xD4, 0x7F, - 0xD4, 0x67, - 0xD4, 0x66, - 0xD4, 0x68, - 0xD4, 0x63, - 0xD4, 0xD2, - 0xD4, 0xD3, - 0xD4, 0xD0, - 0xD4, 0xD1, - 0xD4, 0xCE, - 0xD4, 0xCF, - 0xD4, 0x6F, - 0xD4, 0x75, - 0xD4, 0x70, - 0xD4, 0x72, - 0xD4, 0x71, - 0xD4, 0x73, - 0xD4, 0x80, - 0xD4, 0x81, - 0xD4, 0x82, - 0xD4, 0x83, - 0xD4, 0x84, - 0xD4, 0x85, - 0xD4, 0x86, - 0xD4, 0x87, - 0xD4, 0x88, - 0xD4, 0x89, - 0xD4, 0x8A, - 0xD4, 0x8B, - 0xD4, 0x8C, - 0xD4, 0x8D, - 0xD4, 0x8E, - 0xD4, 0x8F, - 0xD4, 0x90, - 0xD4, 0x91, - 0xD4, 0x92, - 0xD4, 0x93, - 0xD4, 0x94, - 0xD4, 0x95, - 0xD4, 0x96, - 0xD4, 0x97, - 0xD4, 0x98, - 0xD4, 0x99, - 0xD4, 0x9A, - 0xD4, 0x9B, - 0xD4, 0x9C, - 0xD4, 0x9D, - 0xD4, 0x9E, - 0xD4, 0x9F, - 0xD4, 0xA0, - 0xD4, 0xA1, - 0xD4, 0xA2, - 0xD4, 0xA3, - 0xD4, 0xA4, - 0xD4, 0xA5, - 0xD4, 0xA6, - 0xD4, 0xA7, - 0xD4, 0xA8, - 0xD4, 0xA9, - 0xD4, 0xAA, - 0xD4, 0xAB, - 0xD4, 0xAC, - 0xD4, 0xAD, - 0xD4, 0xAE, - 0xD4, 0xAF, - 0xD4, 0xB0, - 0xD4, 0xB1, - 0xD4, 0xB2, - 0xD4, 0xB3, - 0xD4, 0x6D, - 0xD4, 0xD5, - 0xD4, 0xD6, - 0xD4, 0xD7, - 0xD4, 0xD8, - 0xD4, 0xD9, - 0xD4, 0xDA, - 0xD4, 0xDB, -}; diff --git a/include/fonts/type3_map.h b/include/fonts/type3_map.h deleted file mode 100644 index 48219423b..000000000 --- a/include/fonts/type3_map.h +++ /dev/null @@ -1,131 +0,0 @@ -static const u8 sFontType3Map[] = -{ - 0x00, 0x10, - 0x01, 0x10, - 0x02, 0x10, - 0x03, 0x10, - 0x04, 0x11, - 0x05, 0x11, - 0x06, 0x11, - 0x07, 0x11, - 0x08, 0x12, - 0x09, 0x12, - 0x0A, 0x12, - 0x0B, 0x12, - 0x0C, 0x13, - 0x0D, 0x13, - 0x0E, 0x13, - 0x0F, 0x13, - 0x00, 0x14, - 0x01, 0x14, - 0x02, 0x14, - 0x03, 0x14, - 0x04, 0x15, - 0x05, 0x15, - 0x06, 0x15, - 0x07, 0x15, - 0x08, 0x16, - 0x09, 0x16, - 0x0A, 0x16, - 0x0B, 0x16, - 0x0C, 0x17, - 0x0D, 0x17, - 0x0E, 0x17, - 0x0F, 0x17, - 0x00, 0x18, - 0x01, 0x18, - 0x02, 0x18, - 0x03, 0x18, - 0x04, 0x19, - 0x05, 0x19, - 0x06, 0x19, - 0x07, 0x19, - 0x08, 0x1A, - 0x09, 0x1A, - 0x0A, 0x1A, - 0x0B, 0x1A, - 0x0C, 0x1B, - 0x0D, 0x1B, - 0x0E, 0x1B, - 0x0F, 0x1B, - 0x00, 0x1C, - 0x01, 0x1C, - 0x02, 0x1C, - 0x03, 0x1C, - 0x04, 0x1D, - 0x05, 0x1D, - 0x06, 0x1D, - 0x07, 0x1D, - 0x08, 0x1E, - 0x09, 0x1E, - 0x0A, 0x1E, - 0x0B, 0x1E, - 0x0C, 0x1F, - 0x0D, 0x1F, - 0x0E, 0x1F, - 0x0F, 0x1F, - 0x20, 0x24, - 0x20, 0x24, - 0x21, 0x24, - 0x21, 0x24, - 0x20, 0x24, - 0x20, 0x24, - 0x21, 0x24, - 0x21, 0x24, - 0x22, 0x25, - 0x22, 0x25, - 0x23, 0x25, - 0x23, 0x25, - 0x22, 0x25, - 0x22, 0x25, - 0x23, 0x25, - 0x23, 0x25, - 0x20, 0x24, - 0x20, 0x24, - 0x21, 0x24, - 0x21, 0x24, - 0x20, 0x24, - 0x20, 0x24, - 0x21, 0x24, - 0x21, 0x24, - 0x22, 0x25, - 0x22, 0x25, - 0x23, 0x25, - 0x23, 0x25, - 0x22, 0x25, - 0x22, 0x25, - 0x23, 0x25, - 0x23, 0x25, - 0x20, 0x26, - 0x20, 0x26, - 0x21, 0x26, - 0x21, 0x26, - 0x20, 0x26, - 0x20, 0x26, - 0x21, 0x26, - 0x21, 0x26, - 0x22, 0x27, - 0x22, 0x27, - 0x23, 0x27, - 0x23, 0x27, - 0x22, 0x27, - 0x22, 0x27, - 0x23, 0x27, - 0x23, 0x27, - 0x20, 0x26, - 0x20, 0x26, - 0x21, 0x26, - 0x21, 0x26, - 0x20, 0x26, - 0x20, 0x26, - 0x21, 0x26, - 0x21, 0x26, - 0x22, 0x27, - 0x22, 0x27, - 0x23, 0x27, - 0x23, 0x27, - 0x22, 0x27, - 0x22, 0x27, - 0x23, 0x27, - 0x23, 0x27, -}; diff --git a/include/graphics.h b/include/graphics.h index 096a1982c..c3fe20996 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -2,6 +2,32 @@ #define GUARD_GRAPHICS_H // data/graphics.s +extern const u8 gInterfaceGfx_PokeBall[]; +extern const u8 gInterfacePal_PokeBall[]; +extern const u8 gInterfaceGfx_GreatBall[]; +extern const u8 gInterfacePal_GreatBall[]; +extern const u8 gInterfaceGfx_SafariBall[]; +extern const u8 gInterfacePal_SafariBall[]; +extern const u8 gInterfaceGfx_UltraBall[]; +extern const u8 gInterfacePal_UltraBall[]; +extern const u8 gInterfaceGfx_MasterBall[]; +extern const u8 gInterfacePal_MasterBall[]; +extern const u8 gInterfaceGfx_NetBall[]; +extern const u8 gInterfacePal_NetBall[]; +extern const u8 gInterfaceGfx_DiveBall[]; +extern const u8 gInterfacePal_DiveBall[]; +extern const u8 gInterfaceGfx_NestBall[]; +extern const u8 gInterfacePal_NestBall[]; +extern const u8 gInterfaceGfx_RepeatBall[]; +extern const u8 gInterfacePal_RepeatBall[]; +extern const u8 gInterfaceGfx_TimerBall[]; +extern const u8 gInterfacePal_TimerBall[]; +extern const u8 gInterfaceGfx_LuxuryBall[]; +extern const u8 gInterfacePal_LuxuryBall[]; +extern const u8 gInterfaceGfx_PremierBall[]; +extern const u8 gInterfacePal_PremierBall[]; +extern const u8 gUnknown_08D030D0[]; + extern const u8 gMonFootprint_QuestionMark[]; // data/graphics/pokemon/graphics.inc diff --git a/include/intro_credits_graphics.h b/include/intro_credits_graphics.h index 85485a2c4..5abb2381b 100644 --- a/include/intro_credits_graphics.h +++ b/include/intro_credits_graphics.h @@ -1,14 +1,14 @@ #ifndef GUARD_INTRO_CREDITS_GRAPHICS_H #define GUARD_INTRO_CREDITS_GRAPHICS_H -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 CompressedSpriteSheet gIntro2BrendanSpriteSheet; +extern const struct CompressedSpriteSheet gIntro2MaySpriteSheet; +extern const struct CompressedSpriteSheet gIntro2BicycleSpriteSheet; +extern const struct CompressedSpriteSheet gIntro2LatiosSpriteSheet; +extern const struct CompressedSpriteSheet gIntro2LatiasSpriteSheet; extern const struct SpritePalette gIntro2SpritePalettes[]; -extern const struct SpriteSheet gUnknown_08416E24; -extern const struct SpriteSheet gUnknown_08416E34; +extern const struct CompressedSpriteSheet gUnknown_08416E24; +extern const struct CompressedSpriteSheet gUnknown_08416E34; void load_intro_part2_graphics(/*TODO: arg types*/); void sub_8148C78(/*TODO: arg types*/); diff --git a/include/pokeball.h b/include/pokeball.h index b6fbbcf77..19f813415 100644 --- a/include/pokeball.h +++ b/include/pokeball.h @@ -1,7 +1,11 @@ #ifndef GUARD_POKEBALL_H #define GUARD_POKEBALL_H -void CreatePokeballSprite(u8 r0, u8 r1, u8 r2, u8 r3, u8 s1, u8 s2, u8 s3, u16 s4); +extern const struct SpriteTemplate gBallSpriteTemplates[]; + +void CreatePokeballSprite(u8 r0, u8 r1, u8 r2, u8 r3, u8 s1, u8 s2, u8 s3, u32 s4); void sub_804777C(u8); +void sub_80478DC(u8); +void sub_804794C(u8); #endif // GUARD_POKEBALL_H diff --git a/include/pokemon.h b/include/pokemon.h index d67cd647a..47990073b 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -503,8 +503,9 @@ u8 sub_8040574(struct Pokemon *party); void ClearBattleMonForms(void); void sub_80408BC(); void current_map_music_set__default_for_battle(u16); -const u16 *species_and_otid_get_pal(u16, u32, u32); -const struct SpritePalette *sub_80409C8(u16, u32, u32); +const u8 *pokemon_get_pal(struct Pokemon *mon); +const u8 *species_and_otid_get_pal(u16, u32, u32); +const struct CompressedSpritePalette *sub_80409C8(u16, u32, u32); bool8 IsOtherTrainer(u32, u8 *); void sub_8040B8C(void); void SetWildMonHeldItem(void); diff --git a/include/songs.h b/include/songs.h index ab055becf..a813cc785 100644 --- a/include/songs.h +++ b/include/songs.h @@ -59,12 +59,12 @@ enum SE_MOTER, SE_CARD, SE_SAVE, - SE_KON, - SE_KON2, - SE_KON3, - SE_KON4, - SE_SUIKOMU, - SE_NAGERU, + /*0x38*/ SE_KON, + /*0x39*/ SE_KON2, + /*0x3A*/ SE_KON3, + /*0x3B*/ SE_KON4, + /*0x3C*/ SE_SUIKOMU, + /*0x3D*/ SE_NAGERU, SE_TOY_C, SE_TOY_D, SE_TOY_E, @@ -270,10 +270,10 @@ enum BGM_NAMINORI, BGM_DAN01, /*0x16F*/ BGM_FANFA1, - BGM_ME_ASA, - BGM_ME_BACHI, - BGM_FANFA4, - BGM_FANFA5, + /*0x170*/ BGM_ME_ASA, + /*0x171*/ BGM_ME_BACHI, + /*0x172*/ BGM_FANFA4, + /*0x173*/ BGM_FANFA5, BGM_ME_WAZA, BGM_BIJYUTU, BGM_DOORO_X4, diff --git a/include/sprite.h b/include/sprite.h index dd9d5efb7..3f893132e 100644 --- a/include/sprite.h +++ b/include/sprite.h @@ -5,11 +5,18 @@ struct SpriteSheet { - const u8 *data; + const u8 *data; // Raw uncompressed pixel data u16 size; u16 tag; }; +struct CompressedSpriteSheet +{ + const u8 *data; // LZ77 compressed pixel data + u16 size; // Uncompressed size of pixel data + u16 tag; +}; + struct SpriteFrameImage { u8 *data; @@ -20,7 +27,13 @@ struct SpriteFrameImage struct SpritePalette { - const u16 *data; + const u16 *data; // Raw uncompressed palette data + u16 tag; +}; + +struct CompressedSpritePalette +{ + const u8 *data; // LZ77 compressed palette data u16 tag; }; @@ -99,6 +112,10 @@ union AffineAnimCmd #define AFFINEANIMCMD_FRAME(_xScale, _yScale, _rotation, _duration) \ {.frame = {.xScale = _xScale, .yScale = _yScale, .rotation = _rotation, .duration = _duration}} +#define AFFINEANIMCMD_LOOP(_count) \ + {.loop = {.type = AFFINEANIMCMDTYPE_LOOP, .count = _count}} +#define AFFINEANIMCMD_JUMP(_target) \ + {.jump = {.type = AFFINEANIMCMDTYPE_JUMP, .target = _target}} #define AFFINEANIMCMD_END \ {.type = AFFINEANIMCMDTYPE_END} |