diff options
Diffstat (limited to 'src/data.c')
-rw-r--r-- | src/data.c | 277 |
1 files changed, 85 insertions, 192 deletions
diff --git a/src/data.c b/src/data.c index 30672f7c4..5856d17b8 100644 --- a/src/data.c +++ b/src/data.c @@ -124,172 +124,178 @@ static const union AnimCmd sAnim_GeneralFrame3[] = ANIMCMD_END, }; -static const union AffineAnimCmd gUnknown_082FF548[] = +// Many of these affine anims seem to go unused, and +// instead SetSpriteRotScale is used to manipulate +// the battler sprites directly (for instance, in AnimTask_SwitchOutShrinkMon). +// Those with explicit indexes are referenced elsewhere. + +static const union AffineAnimCmd sAffineAnim_Battler_Normal[] = { - AFFINEANIMCMD_FRAME(0x0100, 0x0100, 0x00, 0x00), + AFFINEANIMCMD_FRAME(0x100, 0x100, 0, 0), AFFINEANIMCMD_END, }; -static const union AffineAnimCmd gUnknown_082FF558[] = +static const union AffineAnimCmd sAffineAnim_Battler_Flipped[] = { - AFFINEANIMCMD_FRAME(0xff00, 0x0100, 0x00, 0x00), + AFFINEANIMCMD_FRAME(-0x100, 0x100, 0, 0), AFFINEANIMCMD_END, }; -static const union AffineAnimCmd gUnknown_082FF568[] = +static const union AffineAnimCmd sAffineAnim_Battler_Emerge[] = { - AFFINEANIMCMD_FRAME(0x0028, 0x0028, 0x00, 0x00), - AFFINEANIMCMD_FRAME(0x0012, 0x0012, 0x00, 0x0c), + AFFINEANIMCMD_FRAME(0x28, 0x28, 0, 0), + AFFINEANIMCMD_FRAME(0x12, 0x12, 0, 12), AFFINEANIMCMD_END, }; -static const union AffineAnimCmd gUnknown_082FF580[] = +static const union AffineAnimCmd sAffineAnim_Battler_Return[] = { - AFFINEANIMCMD_FRAME(0xfffe, 0xfffe, 0x00, 0x12), - AFFINEANIMCMD_FRAME(0xfff0, 0xfff0, 0x00, 0x0f), + AFFINEANIMCMD_FRAME( -0x2, -0x2, 0, 18), + AFFINEANIMCMD_FRAME(-0x10, -0x10, 0, 15), AFFINEANIMCMD_END, }; -static const union AffineAnimCmd gUnknown_082FF598[] = +static const union AffineAnimCmd sAffineAnim_Battler_HorizontalSquishLoop[] = { - AFFINEANIMCMD_FRAME(0x00a0, 0x0100, 0x00, 0x00), - AFFINEANIMCMD_FRAME(0x0004, 0x0000, 0x00, 0x08), - AFFINEANIMCMD_FRAME(0xfffc, 0x0000, 0x00, 0x08), + AFFINEANIMCMD_FRAME(0xA0, 0x100, 0, 0), + AFFINEANIMCMD_FRAME( 0x4, 0x0, 0, 8), + AFFINEANIMCMD_FRAME(-0x4, 0x0, 0, 8), AFFINEANIMCMD_JUMP(1), }; -static const union AffineAnimCmd gUnknown_082FF5B8[] = +static const union AffineAnimCmd sAffineAnim_Battler_Grow[] = { - AFFINEANIMCMD_FRAME(0x0002, 0x0002, 0x00, 0x14), + AFFINEANIMCMD_FRAME(0x2, 0x2, 0, 20), AFFINEANIMCMD_END, }; -static const union AffineAnimCmd gUnknown_082FF5C8[] = +static const union AffineAnimCmd sAffineAnim_Battler_Shrink[] = { - AFFINEANIMCMD_FRAME(0xfffe, 0xfffe, 0x00, 0x14), + AFFINEANIMCMD_FRAME(-0x2, -0x2, 0, 20), AFFINEANIMCMD_END, }; -static const union AffineAnimCmd gUnknown_082FF5D8[] = +static const union AffineAnimCmd sAffineAnim_Battler_BigToSmall[] = { - AFFINEANIMCMD_FRAME(0x0100, 0x0100, 0x00, 0000), - AFFINEANIMCMD_FRAME(0xfff0, 0xfff0, 0x00, 0x09), + AFFINEANIMCMD_FRAME(0x100, 0x100, 0, 0), + AFFINEANIMCMD_FRAME(-0x10, -0x10, 0, 9), AFFINEANIMCMD_END, }; -static const union AffineAnimCmd gUnknown_082FF5F0[] = +static const union AffineAnimCmd sAffineAnim_Battler_GrowLarge[] = { - AFFINEANIMCMD_FRAME(0x0004, 0x0004, 0x00, 0x3f), + AFFINEANIMCMD_FRAME(0x4, 0x4, 0, 63), AFFINEANIMCMD_END, }; -static const union AffineAnimCmd gUnknown_082FF600[] = +static const union AffineAnimCmd sAffineAnim_Battler_TipRight[] = { - AFFINEANIMCMD_FRAME(0x0000, 0x0000, 0xfd, 0x05), - AFFINEANIMCMD_FRAME(0x0000, 0x0000, 0x03, 0x05), + AFFINEANIMCMD_FRAME(0x0, 0x0, -3, 5), + AFFINEANIMCMD_FRAME(0x0, 0x0, 3, 5), AFFINEANIMCMD_END, }; const union AffineAnimCmd *const gAffineAnims_BattleSpritePlayerSide[] = { - gUnknown_082FF548, - gUnknown_082FF568, - gUnknown_082FF580, - gUnknown_082FF598, - gUnknown_082FF5B8, - gUnknown_082FF5C8, - gUnknown_082FF5F0, - gUnknown_082FF600, - gUnknown_082FF5D8, + [BATTLER_AFFINE_NORMAL] = sAffineAnim_Battler_Normal, + [BATTLER_AFFINE_EMERGE] = sAffineAnim_Battler_Emerge, + [BATTLER_AFFINE_RETURN] = sAffineAnim_Battler_Return, + sAffineAnim_Battler_HorizontalSquishLoop, + sAffineAnim_Battler_Grow, + sAffineAnim_Battler_Shrink, + sAffineAnim_Battler_GrowLarge, + sAffineAnim_Battler_TipRight, + sAffineAnim_Battler_BigToSmall, }; -static const union AffineAnimCmd gUnknown_082FF63C[] = +static const union AffineAnimCmd sAffineAnim_Battler_SpinShrink[] = { - AFFINEANIMCMD_FRAME(0xfffc, 0xfffc, 0x04, 0x3f), + AFFINEANIMCMD_FRAME(-0x4, -0x4, 4, 63), AFFINEANIMCMD_END, }; -static const union AffineAnimCmd gUnknown_082FF64C[] = +static const union AffineAnimCmd sAffineAnim_Battler_TipLeft[] = { - AFFINEANIMCMD_FRAME(0x0000, 0x0000, 0x03, 0x05), - AFFINEANIMCMD_FRAME(0x0000, 0x0000, 0xfd, 0x05), + AFFINEANIMCMD_FRAME(0x0, 0x0, 3, 5), + AFFINEANIMCMD_FRAME(0x0, 0x0, -3, 5), AFFINEANIMCMD_END, }; -static const union AffineAnimCmd gUnknown_082FF664[] = +static const union AffineAnimCmd sAffineAnim_Battler_RotateUpAndBack[] = { - AFFINEANIMCMD_FRAME(0x0000, 0x0000, 0xfb, 0x14), - AFFINEANIMCMD_FRAME(0x0000, 0x0000, 0x00, 0x14), - AFFINEANIMCMD_FRAME(0x0000, 0x0000, 0x05, 0x14), + AFFINEANIMCMD_FRAME(0x0, 0x0, -5, 20), + AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 20), + AFFINEANIMCMD_FRAME(0x0, 0x0, 5, 20), AFFINEANIMCMD_END, }; -static const union AffineAnimCmd gUnknown_082FF684[] = +static const union AffineAnimCmd sAffineAnim_Battler_Spin[] = { - AFFINEANIMCMD_FRAME(0x0000, 0x0000, 0x09, 0x6e), + AFFINEANIMCMD_FRAME(0x0, 0x0, 9, 110), AFFINEANIMCMD_END, }; const union AffineAnimCmd *const gAffineAnims_BattleSpriteOpponentSide[] = { - gUnknown_082FF548, - gUnknown_082FF568, - gUnknown_082FF580, - gUnknown_082FF598, - gUnknown_082FF5B8, - gUnknown_082FF5C8, - gUnknown_082FF63C, - gUnknown_082FF64C, - gUnknown_082FF664, - gUnknown_082FF5D8, - gUnknown_082FF684, + [BATTLER_AFFINE_NORMAL] = sAffineAnim_Battler_Normal, + [BATTLER_AFFINE_EMERGE] = sAffineAnim_Battler_Emerge, + [BATTLER_AFFINE_RETURN] = sAffineAnim_Battler_Return, + sAffineAnim_Battler_HorizontalSquishLoop, + sAffineAnim_Battler_Grow, + sAffineAnim_Battler_Shrink, + sAffineAnim_Battler_SpinShrink, + sAffineAnim_Battler_TipLeft, + sAffineAnim_Battler_RotateUpAndBack, + sAffineAnim_Battler_BigToSmall, + sAffineAnim_Battler_Spin, }; -const union AffineAnimCmd *const gUnknown_082FF6C0[] = +const union AffineAnimCmd *const gAffineAnims_BattleSpriteContest[] = { - gUnknown_082FF558, - gUnknown_082FF568, - gUnknown_082FF580, - gUnknown_082FF598, - gUnknown_082FF5B8, - gUnknown_082FF5C8, - gUnknown_082FF63C, - gUnknown_082FF64C, - gUnknown_082FF664, - gUnknown_082FF5D8, - gUnknown_082FF684, + [BATTLER_AFFINE_NORMAL] = sAffineAnim_Battler_Flipped, + [BATTLER_AFFINE_EMERGE] = sAffineAnim_Battler_Emerge, + [BATTLER_AFFINE_RETURN] = sAffineAnim_Battler_Return, + sAffineAnim_Battler_HorizontalSquishLoop, + sAffineAnim_Battler_Grow, + sAffineAnim_Battler_Shrink, + sAffineAnim_Battler_SpinShrink, + sAffineAnim_Battler_TipLeft, + sAffineAnim_Battler_RotateUpAndBack, + sAffineAnim_Battler_BigToSmall, + sAffineAnim_Battler_Spin, }; -static const union AnimCmd gUnknown_082FF6EC[] = + +static const union AnimCmd sAnim_MonPic_0[] = { ANIMCMD_FRAME(0, 0), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FF6F4[] = +static const union AnimCmd sAnim_MonPic_1[] = { ANIMCMD_FRAME(1, 0), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FF6FC[] = +static const union AnimCmd sAnim_MonPic_2[] = { ANIMCMD_FRAME(2, 0), ANIMCMD_END, }; -static const union AnimCmd gUnknown_082FF704[] = +static const union AnimCmd sAnim_MonPic_3[] = { ANIMCMD_FRAME(3, 0), ANIMCMD_END, }; -const union AnimCmd *const gUnknown_082FF70C[] = +const union AnimCmd *const gAnims_MonPic[] = { - gUnknown_082FF6EC, - gUnknown_082FF6F4, - gUnknown_082FF6FC, - gUnknown_082FF704, + sAnim_MonPic_0, + sAnim_MonPic_1, + sAnim_MonPic_2, + sAnim_MonPic_3, }; #define SPECIES_SPRITE(species, sprite) [SPECIES_##species] = {sprite, MON_PIC_SIZE, SPECIES_##species} @@ -313,120 +319,7 @@ const union AnimCmd *const gUnknown_082FF70C[] = #include "data/pokemon_graphics/enemy_mon_elevation.h" #include "data/pokemon_graphics/front_pic_anims.h" #include "data/pokemon_graphics/front_pic_table.h" - -static const u32 sUnused[] = -{ - 0x00000888, 0x00000888, 0x00000888, 0x00000888, - 0x00000088, 0x00000888, 0x00000888, 0x00000886, - 0x00000888, 0x00000886, 0x00000888, 0x00000888, - 0x00000888, 0x00000888, 0x00000888, 0x00000888, - 0x00000886, 0x00000888, 0x00000888, 0x00000888, - 0x00000888, 0x00000888, 0x00000886, 0x00000886, - 0x00000888, 0x00000088, 0x00000088, 0x00000088, - 0x00000088, 0x00000888, 0x00000886, 0x00000888, - 0x00000888, 0x00000888, 0x00000886, 0x00000886, - 0x00000888, 0x00000088, 0x00000088, 0x00000088, - 0x00000088, 0x00000886, 0x00000886, 0x00000088, - 0x00000886, 0x00000886, 0x00000888, 0x00000888, - 0x00000888, 0x00000888, 0x00000888, 0x00000888, - 0x00000886, 0x00000888, 0x00000088, 0x00000088, - 0x00000888, 0x00000888, 0x00000888, 0x00000886, - 0x00000888, 0x00000888, 0x00000888, 0x00000886, - 0x00000886, 0x00000886, 0x00000886, 0x00000886, - 0x00000886, 0x00000886, 0x00000888, 0x00000888, - 0x00000886, 0x00000886, 0x00000886, 0x00000886, - 0x00000886, 0x00000888, 0x00000888, 0x00000888, - 0x00000888, 0x00000886, 0x00000886, 0x00000888, - 0x00000886, 0x00000886, 0x00000888, 0x00000888, - 0x00000088, 0x00000088, 0x00000888, 0x00000888, - 0x00000888, 0x00000888, 0x00000888, 0x00000888, - 0x00000888, 0x00000888, 0x00000888, 0x00000888, - 0x00000886, 0x00000886, 0x00000888, 0x00000888, - 0x00000888, 0x00000888, 0x00000088, 0x00000886, - 0x00000888, 0x00000088, 0x00000088, 0x00000088, - 0x00000088, 0x00000888, 0x00000886, 0x00000888, - 0x00000088, 0x00000088, 0x00000886, 0x00000886, - 0x00000088, 0x00000088, 0x00000888, 0x00000886, - 0x00000886, 0x00000888, 0x00000888, 0x00000088, - 0x00000888, 0x00000886, 0x00000886, 0x00000888, - 0x00000886, 0x00000888, 0x00000888, 0x00000886, - 0x00000888, 0x00000888, 0x00000888, 0x00000888, - 0x00000888, 0x00000888, 0x00000888, 0x00000888, - 0x00000888, 0x00000888, 0x00000888, 0x00000888, - 0x00000888, 0x00000888, 0x00000088, 0x00000888, - 0x00000888, 0x00000888, 0x00000888, 0x00000888, - 0x00000088, 0x00000888, 0x00000888, 0x00000886, - 0x00000886, 0x00000888, 0x00000888, 0x00000888, - 0x00000888, 0x00000888, 0x00000888, 0x00000886, - 0x00000888, 0x00000886, 0x00000088, 0x00000088, - 0x00000088, 0x00000888, 0x00000088, 0x00000888, - 0x00000888, 0x00000088, 0x00000088, 0x00000888, - 0x00000886, 0x00000888, 0x00000886, 0x00000886, - 0x00000886, 0x00000888, 0x00000888, 0x00000888, - 0x00000088, 0x00000888, 0x00000888, 0x00000888, - 0x00000088, 0x00000888, 0x00000888, 0x00000888, - 0x00000888, 0x00000888, 0x00000888, 0x00000888, - 0x00000888, 0x00000888, 0x00000088, 0x00000088, - 0x00000886, 0x00000888, 0x00000888, 0x00000888, - 0x00000888, 0x00000888, 0x00000888, 0x00000888, - 0x00000888, 0x00000888, 0x00000088, 0x00000888, - 0x00000886, 0x00000888, 0x00000088, 0x00000088, - 0x00000888, 0x00000888, 0x00000088, 0x00000888, - 0x00000888, 0x00000888, 0x00000888, 0x00000088, - 0x00000888, 0x00000888, 0x00000088, 0x00000088, - 0x00000088, 0x00000888, 0x00000088, 0x00000888, - 0x00000888, 0x00000888, 0x00000888, 0x00000888, - 0x00000888, 0x00000888, 0x00000888, 0x00000888, - 0x00000888, 0x00000888, 0x00000888, 0x00000888, - 0x00000888, 0x00000886, 0x00000888, 0x00000888, - 0x00000888, 0x00000888, 0x00000888, 0x00000888, - 0x00000888, 0x00000888, 0x00000888, 0x00000888, - 0x00000888, 0x00000888, 0x00000888, 0x00000888, - 0x00000888, 0x00000888, 0x00000888, 0x00000888, - 0x00000888, 0x00000888, 0x00000888, 0x00000888, - 0x00000888, 0x00000888, 0x00000888, 0x00000888, - 0x00000888, 0x00000886, 0x00000886, 0x00000886, - 0x00000088, 0x00000088, 0x00000088, 0x00000886, - 0x00000088, 0x00000886, 0x00000886, 0x00000886, - 0x00000088, 0x00000886, 0x00000088, 0x00000088, - 0x00000088, 0x00000088, 0x00000088, 0x00000886, - 0x00000886, 0x00000886, 0x00000888, 0x00000888, - 0x00000886, 0x00000886, 0x00000886, 0x00000886, - 0x00000088, 0x00000088, 0x00000886, 0x00000886, - 0x00001882, 0x00000088, 0x00000088, 0x00000088, - 0x00000088, 0x00000886, 0x00000886, 0x00000886, - 0x00000088, 0x00000088, 0x00000088, 0x00000088, - 0x00000886, 0x00000088, 0x00000886, 0x00000088, - 0x00000088, 0x00000088, 0x00000088, 0x00000088, - 0x00000088, 0x00000088, 0x00000886, 0x00000886, - 0x00000088, 0x00000088, 0x00000088, 0x00000886, - 0x00000886, 0x00000088, 0x00000088, 0x00000088, - 0x00000088, 0x00000088, 0x00000088, 0x00000088, - 0x00000088, 0x00000088, 0x00000088, 0x00000088, - 0x00000088, 0x00000088, 0x00000886, 0x00000088, - 0x00000088, 0x00000886, 0x00000886, 0x00000886, - 0x00000886, 0x00000886, 0x00000088, 0x00000088, - 0x00000088, 0x00000088, 0x00000088, 0x00000886, - 0x00000886, 0x00000886, 0x00000886, 0x00000088, - 0x00000886, 0x00000088, 0x00000886, 0x00000886, - 0x00000886, 0x00000088, 0x00000088, 0x00000088, - 0x00000088, 0x00000088, 0x00000088, 0x00000088, - 0x00000088, 0x00000088, 0x00000886, 0x00000886, - 0x00000886, 0x00000888, 0x00000886, 0x00000886, - 0x00000088, 0x00000088, 0x00000088, 0x00000088, - 0x00000886, 0x00000886, 0x00000088, 0x00000088, - 0x00000088, 0x00000088, 0x00000088, 0x00000088, - 0x00000088, 0x00000088, 0x00000088, 0x00000088, - 0x00000088, 0x00000088, 0x00000088, 0x00000088, - 0x00000088, 0x00000088, 0x00000088, 0x00000088, - 0x00000088, 0x00000888, 0x00000888, 0x00000888, - 0x00000888, 0x00000888, 0x00000888, 0x00000888, - 0x00000888, 0x00000888, 0x00000888, 0x00000888, - 0x00000888, 0x00000888, 0x00000888, 0x00000888, - 0x00000888, 0x00000888, 0x00000888, 0x00000888, - 0x00000888, 0x00000888, 0x00000888, 0x00000888, - 0x00000888, 0x00000888, 0x00000888, 0x00000888, -}; +#include "data/pokemon_graphics/unknown_table.h" #include "data/trainer_parties.h" #include "data/text/trainer_class_names.h" |