From bee60f4c64e6cdf2bfa3777b59067ff63450e4e3 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sat, 24 Apr 2021 23:29:49 -0400 Subject: [PATCH 1/2] Document battler sprite affine anims, default pokeball throw --- include/data.h | 10 ++- src/battle_anim_effects_3.c | 8 +- src/battle_anim_mons.c | 4 +- src/battle_anim_throw.c | 5 +- src/contest.c | 4 +- src/data.c | 162 ++++++++++++++++++---------------- src/egg_hatch.c | 2 +- src/pokeball.c | 100 +++++++++++---------- src/pokemon.c | 4 +- src/trainer_pokemon_sprites.c | 2 +- 10 files changed, 158 insertions(+), 143 deletions(-) diff --git a/include/data.h b/include/data.h index 2f8c44746..f94f55a8f 100644 --- a/include/data.h +++ b/include/data.h @@ -5,6 +5,12 @@ #define SPECIES_SHINY_TAG 500 +enum { + BATTLER_AFFINE_NORMAL, + BATTLER_AFFINE_EMERGE, + BATTLER_AFFINE_RETURN, +}; + struct MonCoords { // This would use a bitfield, but some function @@ -87,9 +93,9 @@ extern const struct SpriteFrameImage gTrainerBackPicTable_Steven[]; extern const union AffineAnimCmd *const gAffineAnims_BattleSpritePlayerSide[]; extern const union AffineAnimCmd *const gAffineAnims_BattleSpriteOpponentSide[]; -extern const union AffineAnimCmd *const gUnknown_082FF6C0[]; +extern const union AffineAnimCmd *const gAffineAnims_BattleSpriteContest[]; -extern const union AnimCmd *const gUnknown_082FF70C[]; +extern const union AnimCmd *const gAnims_MonPic[]; extern const struct MonCoords gMonFrontPicCoords[]; extern const struct CompressedSpriteSheet gMonStillFrontPicTable[]; extern const struct MonCoords gMonBackPicCoords[]; diff --git a/src/battle_anim_effects_3.c b/src/battle_anim_effects_3.c index 800431c6a..5aaf45f19 100755 --- a/src/battle_anim_effects_3.c +++ b/src/battle_anim_effects_3.c @@ -2319,11 +2319,11 @@ void AnimTask_TransformMon(u8 taskId) } if (IsSpeciesNotUnown(gContestResources->moveAnim->targetSpecies)) - gSprites[gBattlerSpriteIds[gBattleAnimAttacker]].affineAnims = gUnknown_082FF6C0; + gSprites[gBattlerSpriteIds[gBattleAnimAttacker]].affineAnims = gAffineAnims_BattleSpriteContest; else gSprites[gBattlerSpriteIds[gBattleAnimAttacker]].affineAnims = gAffineAnims_BattleSpriteOpponentSide; - StartSpriteAffineAnim(&gSprites[gBattlerSpriteIds[gBattleAnimAttacker]], 0); + StartSpriteAffineAnim(&gSprites[gBattlerSpriteIds[gBattleAnimAttacker]], BATTLER_AFFINE_NORMAL); } gTasks[taskId].data[0]++; @@ -4733,8 +4733,8 @@ void AnimTask_MonToSubstitute(u8 taskId) LoadBattleMonGfxAndAnimate(gBattleAnimAttacker, 0, spriteId); if (IsContest()) { - gSprites[gBattlerSpriteIds[gBattleAnimAttacker]].affineAnims = gUnknown_082FF6C0; - StartSpriteAffineAnim(&gSprites[gBattlerSpriteIds[gBattleAnimAttacker]], 0); + gSprites[gBattlerSpriteIds[gBattleAnimAttacker]].affineAnims = gAffineAnims_BattleSpriteContest; + StartSpriteAffineAnim(&gSprites[gBattlerSpriteIds[gBattleAnimAttacker]], BATTLER_AFFINE_NORMAL); } for (i = 0; i < NUM_TASK_DATA; i++) diff --git a/src/battle_anim_mons.c b/src/battle_anim_mons.c index 6fd8cd621..6dc0a0271 100644 --- a/src/battle_anim_mons.c +++ b/src/battle_anim_mons.c @@ -2078,8 +2078,8 @@ u8 CreateAdditionalMonSpriteForMoveAnim(u16 species, bool8 isBackpic, u8 id, s16 if (IsContest()) { - gSprites[spriteId].affineAnims = gUnknown_082FF6C0; - StartSpriteAffineAnim(&gSprites[spriteId], 0); + gSprites[spriteId].affineAnims = gAffineAnims_BattleSpriteContest; + StartSpriteAffineAnim(&gSprites[spriteId], BATTLER_AFFINE_NORMAL); } return spriteId; } diff --git a/src/battle_anim_throw.c b/src/battle_anim_throw.c index f6a48cf69..83768b476 100755 --- a/src/battle_anim_throw.c +++ b/src/battle_anim_throw.c @@ -16,6 +16,7 @@ #include "task.h" #include "trig.h" #include "util.h" +#include "data.h" #include "constants/items.h" #include "constants/moves.h" #include "constants/songs.h" @@ -1471,7 +1472,7 @@ static void SpriteCB_Ball_Release_Step(struct Sprite *sprite) // Animate Pokémon emerging from Poké Ball gSprites[gBattlerSpriteIds[gBattleAnimTarget]].invisible = FALSE; - StartSpriteAffineAnim(&gSprites[gBattlerSpriteIds[gBattleAnimTarget]], 1); + StartSpriteAffineAnim(&gSprites[gBattlerSpriteIds[gBattleAnimTarget]], BATTLER_AFFINE_EMERGE); AnimateSprite(&gSprites[gBattlerSpriteIds[gBattleAnimTarget]]); gSprites[gBattlerSpriteIds[gBattleAnimTarget]].sOffsetY = 4096; } @@ -1485,7 +1486,7 @@ static void SpriteCB_Ball_Release_Wait(struct Sprite *sprite) if (gSprites[gBattlerSpriteIds[gBattleAnimTarget]].affineAnimEnded) { - StartSpriteAffineAnim(&gSprites[gBattlerSpriteIds[gBattleAnimTarget]], 0); + StartSpriteAffineAnim(&gSprites[gBattlerSpriteIds[gBattleAnimTarget]], BATTLER_AFFINE_NORMAL); released = TRUE; } else diff --git a/src/contest.c b/src/contest.c index 246fc1e50..0d2d66a66 100644 --- a/src/contest.c +++ b/src/contest.c @@ -3133,10 +3133,10 @@ static u8 CreateContestantSprite(u16 species, u32 otId, u32 personality, u32 ind gSprites[spriteId].data[0] = gSprites[spriteId].oam.paletteNum; gSprites[spriteId].data[2] = species; if (IsSpeciesNotUnown(species)) - gSprites[spriteId].affineAnims = gUnknown_082FF6C0; + gSprites[spriteId].affineAnims = gAffineAnims_BattleSpriteContest; else gSprites[spriteId].affineAnims = gAffineAnims_BattleSpriteOpponentSide; - StartSpriteAffineAnim(gSprites + spriteId, 0); + StartSpriteAffineAnim(&gSprites[spriteId], BATTLER_AFFINE_NORMAL); return spriteId; } diff --git a/src/data.c b/src/data.c index 30672f7c4..d300d4f63 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} diff --git a/src/egg_hatch.c b/src/egg_hatch.c index 0ae0e1323..f2d28e916 100644 --- a/src/egg_hatch.c +++ b/src/egg_hatch.c @@ -811,7 +811,7 @@ static void SpriteCB_Egg_5(struct Sprite* sprite) if (sprite->data[0] == 0) { gSprites[sEggHatchData->pokeSpriteID].invisible = FALSE; - StartSpriteAffineAnim(&gSprites[sEggHatchData->pokeSpriteID], 1); + StartSpriteAffineAnim(&gSprites[sEggHatchData->pokeSpriteID], BATTLER_AFFINE_EMERGE); } if (sprite->data[0] == 8) BeginNormalPaletteFade(PALETTES_ALL, -1, 0x10, 0, RGB_WHITEALPHA); diff --git a/src/pokeball.c b/src/pokeball.c index 77d2b119c..3671e6a35 100644 --- a/src/pokeball.c +++ b/src/pokeball.c @@ -12,28 +12,29 @@ #include "task.h" #include "trig.h" #include "util.h" +#include "data.h" #include "constants/songs.h" extern struct MusicPlayerInfo gMPlayInfo_BGM; // this file's functions static void Task_DoPokeballSendOutAnim(u8 taskId); -static void SpriteCB_TestBallThrow(struct Sprite *sprite); static void SpriteCB_PlayerMonSendOut_1(struct Sprite *sprite); static void SpriteCB_PlayerMonSendOut_2(struct Sprite *sprite); static void SpriteCB_OpponentMonSendOut(struct Sprite *sprite); -static void sub_80756D4(struct Sprite *sprite); -static void sub_80756E0(struct Sprite *sprite); -static void sub_807574C(struct Sprite *sprite); -static void sub_80757E4(struct Sprite *sprite); -static void sub_8075838(struct Sprite *sprite); -static void sub_8075930(struct Sprite *sprite); +static void SpriteCB_BallThrow(struct Sprite *sprite); +static void SpriteCB_BallThrow_ReachMon(struct Sprite *sprite); +static void SpriteCB_BallThrow_StartShrinkMon(struct Sprite *sprite); +static void SpriteCB_BallThrow_ShrinkMon(struct Sprite *sprite); +static void SpriteCB_BallThrow_Close(struct Sprite *sprite); +static void SpriteCB_BallThrow_FallToGround(struct Sprite *sprite); +static void SpriteCB_BallThrow_StartShakes(struct Sprite *sprite); +static void SpriteCB_BallThrow_Shake(struct Sprite *sprite); +static void SpriteCB_BallThrow_StartCaptureMon(struct Sprite *sprite); +static void SpriteCB_BallThrow_CaptureMon(struct Sprite *sprite); static void SpriteCB_ReleaseMonFromBall(struct Sprite *sprite); static void SpriteCB_ReleaseMon2FromBall(struct Sprite *sprite); -static void sub_8075970(struct Sprite *sprite); static void HandleBallAnimEnd(struct Sprite *sprite); -static void sub_8075FB4(struct Sprite *sprite); -static void sub_80760F8(struct Sprite *sprite); static void SpriteCB_PokeballReleaseMon(struct Sprite *sprite); static void SpriteCB_ReleasedMonFlyOut(struct Sprite *sprite); static void SpriteCB_TradePokeball(struct Sprite *sprite); @@ -213,7 +214,7 @@ const struct SpriteTemplate gBallSpriteTemplates[POKEBALL_COUNT] = .anims = sBallAnimSequences, .images = NULL, .affineAnims = sAffineAnim_BallRotate, - .callback = SpriteCB_TestBallThrow, + .callback = SpriteCB_BallThrow, }, { .tileTag = GFX_TAG_GREATBALL, @@ -222,7 +223,7 @@ const struct SpriteTemplate gBallSpriteTemplates[POKEBALL_COUNT] = .anims = sBallAnimSequences, .images = NULL, .affineAnims = sAffineAnim_BallRotate, - .callback = SpriteCB_TestBallThrow, + .callback = SpriteCB_BallThrow, }, { .tileTag = GFX_TAG_SAFARIBALL, @@ -231,7 +232,7 @@ const struct SpriteTemplate gBallSpriteTemplates[POKEBALL_COUNT] = .anims = sBallAnimSequences, .images = NULL, .affineAnims = sAffineAnim_BallRotate, - .callback = SpriteCB_TestBallThrow, + .callback = SpriteCB_BallThrow, }, { .tileTag = GFX_TAG_ULTRABALL, @@ -240,7 +241,7 @@ const struct SpriteTemplate gBallSpriteTemplates[POKEBALL_COUNT] = .anims = sBallAnimSequences, .images = NULL, .affineAnims = sAffineAnim_BallRotate, - .callback = SpriteCB_TestBallThrow, + .callback = SpriteCB_BallThrow, }, { .tileTag = GFX_TAG_MASTERBALL, @@ -249,7 +250,7 @@ const struct SpriteTemplate gBallSpriteTemplates[POKEBALL_COUNT] = .anims = sBallAnimSequences, .images = NULL, .affineAnims = sAffineAnim_BallRotate, - .callback = SpriteCB_TestBallThrow, + .callback = SpriteCB_BallThrow, }, { .tileTag = GFX_TAG_NETBALL, @@ -258,7 +259,7 @@ const struct SpriteTemplate gBallSpriteTemplates[POKEBALL_COUNT] = .anims = sBallAnimSequences, .images = NULL, .affineAnims = sAffineAnim_BallRotate, - .callback = SpriteCB_TestBallThrow, + .callback = SpriteCB_BallThrow, }, { .tileTag = GFX_TAG_DIVEBALL, @@ -267,7 +268,7 @@ const struct SpriteTemplate gBallSpriteTemplates[POKEBALL_COUNT] = .anims = sBallAnimSequences, .images = NULL, .affineAnims = sAffineAnim_BallRotate, - .callback = SpriteCB_TestBallThrow, + .callback = SpriteCB_BallThrow, }, { .tileTag = GFX_TAG_NESTBALL, @@ -276,7 +277,7 @@ const struct SpriteTemplate gBallSpriteTemplates[POKEBALL_COUNT] = .anims = sBallAnimSequences, .images = NULL, .affineAnims = sAffineAnim_BallRotate, - .callback = SpriteCB_TestBallThrow, + .callback = SpriteCB_BallThrow, }, { .tileTag = GFX_TAG_REPEATBALL, @@ -285,7 +286,7 @@ const struct SpriteTemplate gBallSpriteTemplates[POKEBALL_COUNT] = .anims = sBallAnimSequences, .images = NULL, .affineAnims = sAffineAnim_BallRotate, - .callback = SpriteCB_TestBallThrow, + .callback = SpriteCB_BallThrow, }, { .tileTag = GFX_TAG_TIMERBALL, @@ -294,7 +295,7 @@ const struct SpriteTemplate gBallSpriteTemplates[POKEBALL_COUNT] = .anims = sBallAnimSequences, .images = NULL, .affineAnims = sAffineAnim_BallRotate, - .callback = SpriteCB_TestBallThrow, + .callback = SpriteCB_BallThrow, }, { .tileTag = GFX_TAG_LUXURYBALL, @@ -303,7 +304,7 @@ const struct SpriteTemplate gBallSpriteTemplates[POKEBALL_COUNT] = .anims = sBallAnimSequences, .images = NULL, .affineAnims = sAffineAnim_BallRotate, - .callback = SpriteCB_TestBallThrow, + .callback = SpriteCB_BallThrow, }, { .tileTag = GFX_TAG_PREMIERBALL, @@ -312,7 +313,7 @@ const struct SpriteTemplate gBallSpriteTemplates[POKEBALL_COUNT] = .anims = sBallAnimSequences, .images = NULL, .affineAnims = sAffineAnim_BallRotate, - .callback = SpriteCB_TestBallThrow, + .callback = SpriteCB_BallThrow, }, }; @@ -408,7 +409,10 @@ static void Task_DoPokeballSendOutAnim(u8 taskId) PlaySE(SE_BALL_THROW); } -static void SpriteCB_TestBallThrow(struct Sprite *sprite) +// This sequence of functions is very similar to those that get run when +// a Pokéball gets thrown at a wild Pokémon, starting at SpriteCB_Ball_Arc. +// These do not seem to get run. +static void SpriteCB_BallThrow(struct Sprite *sprite) { if (TranslateAnimHorizontalArc(sprite)) { @@ -430,7 +434,7 @@ static void SpriteCB_TestBallThrow(struct Sprite *sprite) sprite->sBattler = opponentBattler; sprite->data[7] = noOfShakes; DestroyTask(taskId); - sprite->callback = sub_80756D4; + sprite->callback = SpriteCB_BallThrow_ReachMon; } } @@ -440,26 +444,24 @@ static void SpriteCB_TestBallThrow(struct Sprite *sprite) #undef tBattler #undef tOpponentBattler -static void sub_80756D4(struct Sprite *sprite) +static void SpriteCB_BallThrow_ReachMon(struct Sprite *sprite) { - sprite->callback = sub_80756E0; + sprite->callback = SpriteCB_BallThrow_StartShrinkMon; } -// Start something for battler -static void sub_80756E0(struct Sprite *sprite) +static void SpriteCB_BallThrow_StartShrinkMon(struct Sprite *sprite) { if (++sprite->data[5] == 10) { sprite->data[5] = 0; - sprite->callback = sub_807574C; - StartSpriteAffineAnim(&gSprites[gBattlerSpriteIds[sprite->sBattler]], 2); + sprite->callback = SpriteCB_BallThrow_ShrinkMon; + StartSpriteAffineAnim(&gSprites[gBattlerSpriteIds[sprite->sBattler]], BATTLER_AFFINE_RETURN); AnimateSprite(&gSprites[gBattlerSpriteIds[sprite->sBattler]]); gSprites[gBattlerSpriteIds[sprite->sBattler]].data[1] = 0; } } -// Shrink player -static void sub_807574C(struct Sprite *sprite) +static void SpriteCB_BallThrow_ShrinkMon(struct Sprite *sprite) { sprite->data[5]++; if (sprite->data[5] == 11) @@ -469,7 +471,7 @@ static void sub_807574C(struct Sprite *sprite) StartSpriteAnim(sprite, 2); gSprites[gBattlerSpriteIds[sprite->sBattler]].invisible = TRUE; sprite->data[5] = 0; - sprite->callback = sub_80757E4; + sprite->callback = SpriteCB_BallThrow_Close; } else { @@ -478,7 +480,7 @@ static void sub_807574C(struct Sprite *sprite) } } -static void sub_80757E4(struct Sprite *sprite) +static void SpriteCB_BallThrow_Close(struct Sprite *sprite) { if (sprite->animEnded) { @@ -490,12 +492,12 @@ static void sub_80757E4(struct Sprite *sprite) sprite->data[5] = 0; sprite->pos1.y += Cos(0, 32); sprite->pos2.y = -Cos(0, sprite->data[4]); - sprite->callback = sub_8075838; + sprite->callback = SpriteCB_BallThrow_FallToGround; } } } -static void sub_8075838(struct Sprite *sprite) +static void SpriteCB_BallThrow_FallToGround(struct Sprite *sprite) { bool8 r5 = FALSE; @@ -548,14 +550,14 @@ static void sub_8075838(struct Sprite *sprite) } else { - sprite->callback = sub_8075930; + sprite->callback = SpriteCB_BallThrow_StartShakes; sprite->data[4] = 1; sprite->data[5] = 0; } } } -static void sub_8075930(struct Sprite *sprite) +static void SpriteCB_BallThrow_StartShakes(struct Sprite *sprite) { sprite->data[3]++; if (sprite->data[3] == 31) @@ -563,12 +565,12 @@ static void sub_8075930(struct Sprite *sprite) sprite->data[3] = 0; sprite->affineAnimPaused = TRUE; StartSpriteAffineAnim(sprite, 1); - sprite->callback = sub_8075970; + sprite->callback = SpriteCB_BallThrow_Shake; PlaySE(SE_BALL); } } -static void sub_8075970(struct Sprite *sprite) +static void SpriteCB_BallThrow_Shake(struct Sprite *sprite) { switch (sprite->data[3] & 0xFF) { @@ -611,7 +613,7 @@ static void sub_8075970(struct Sprite *sprite) { if (sprite->data[7] == 4 && sprite->data[3] >> 8 == 3) { - sprite->callback = sub_8075FB4; + sprite->callback = SpriteCB_BallThrow_StartCaptureMon; sprite->affineAnimPaused = TRUE; } else @@ -796,7 +798,7 @@ static void SpriteCB_ReleaseMonFromBall(struct Sprite *sprite) gTasks[taskId].tCryTaskState = 0; } - StartSpriteAffineAnim(&gSprites[gBattlerSpriteIds[sprite->sBattler]], 1); + StartSpriteAffineAnim(&gSprites[gBattlerSpriteIds[sprite->sBattler]], BATTLER_AFFINE_EMERGE); if (GetBattlerSide(sprite->sBattler) == B_SIDE_OPPONENT) gSprites[gBattlerSpriteIds[sprite->sBattler]].callback = SpriteCb_OpponentMonFromBall; @@ -817,10 +819,10 @@ static void SpriteCB_ReleaseMonFromBall(struct Sprite *sprite) #undef tCryTaskFrames #undef tCryTaskState -static void sub_8075FB4(struct Sprite *sprite) +static void SpriteCB_BallThrow_StartCaptureMon(struct Sprite *sprite) { sprite->animPaused = TRUE; - sprite->callback = sub_80760F8; + sprite->callback = SpriteCB_BallThrow_CaptureMon; sprite->data[3] = 0; sprite->data[4] = 0; sprite->data[5] = 0; @@ -836,7 +838,7 @@ static void HandleBallAnimEnd(struct Sprite *sprite) sprite->invisible = TRUE; if (gSprites[gBattlerSpriteIds[battlerId]].affineAnimEnded) { - StartSpriteAffineAnim(&gSprites[gBattlerSpriteIds[battlerId]], 0); + StartSpriteAffineAnim(&gSprites[gBattlerSpriteIds[battlerId]], BATTLER_AFFINE_NORMAL); affineAnimEnded = TRUE; } else @@ -867,7 +869,7 @@ static void HandleBallAnimEnd(struct Sprite *sprite) } } -static void sub_80760F8(struct Sprite *sprite) +static void SpriteCB_BallThrow_CaptureMon(struct Sprite *sprite) { u8 battlerId = sprite->sBattler; @@ -1042,7 +1044,7 @@ static void SpriteCB_PokeballReleaseMon(struct Sprite *sprite) sprite->data[1] = LaunchBallFadeMonTaskForPokeball(1, battlerId, r4); sprite->callback = SpriteCB_ReleasedMonFlyOut; gSprites[r7].invisible = FALSE; - StartSpriteAffineAnim(&gSprites[r7], 1); + StartSpriteAffineAnim(&gSprites[r7], BATTLER_AFFINE_EMERGE); AnimateSprite(&gSprites[r7]); gSprites[r7].data[1] = 0x1000; sprite->data[7] = 0; @@ -1065,7 +1067,7 @@ static void SpriteCB_ReleasedMonFlyOut(struct Sprite *sprite) sprite->invisible = TRUE; if (gSprites[monSpriteId].affineAnimEnded) { - StartSpriteAffineAnim(&gSprites[monSpriteId], 0); + StartSpriteAffineAnim(&gSprites[monSpriteId], BATTLER_AFFINE_NORMAL); r12 = TRUE; } var1 = (sprite->data[5] - sprite->pos1.x) * sprite->data[7] / 128 + sprite->pos1.x; @@ -1139,7 +1141,7 @@ static void SpriteCB_TradePokeball(struct Sprite *sprite) // play the shrink anim properly due to being paused. Works together with the fix to `sub_817F77C`. gSprites[monSpriteId].affineAnimPaused = FALSE; #endif // BUGFIX - StartSpriteAffineAnim(&gSprites[monSpriteId], 2); + StartSpriteAffineAnim(&gSprites[monSpriteId], BATTLER_AFFINE_RETURN); AnimateSprite(&gSprites[monSpriteId]); gSprites[monSpriteId].data[1] = 0; } diff --git a/src/pokemon.c b/src/pokemon.c index 1d736be74..b4eb6f01a 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -3433,7 +3433,7 @@ void SetMultiuseSpriteTemplateToPokemon(u16 speciesTag, u8 battlerPosition) gMultiuseSpriteTemplate.paletteTag = speciesTag; if (battlerPosition == B_POSITION_PLAYER_LEFT || battlerPosition == B_POSITION_PLAYER_RIGHT) - gMultiuseSpriteTemplate.anims = gUnknown_082FF70C; + gMultiuseSpriteTemplate.anims = gAnims_MonPic; else if (speciesTag > SPECIES_SHINY_TAG) gMultiuseSpriteTemplate.anims = gMonFrontAnimsPtrTable[speciesTag - SPECIES_SHINY_TAG]; else @@ -6826,7 +6826,7 @@ static void sub_806F1FC(struct Unknown_806F160_Struct* structPtr) structPtr->frameImages[i * structPtr->field_0_0 + j].data = &structPtr->byteArrays[i][j * 0x800]; } structPtr->templates[i].images = &structPtr->frameImages[i * structPtr->field_0_0]; - structPtr->templates[i].anims = gUnknown_082FF70C; + structPtr->templates[i].anims = gAnims_MonPic; structPtr->templates[i].paletteTag = i; } } diff --git a/src/trainer_pokemon_sprites.c b/src/trainer_pokemon_sprites.c index aab4142db..477c11faf 100644 --- a/src/trainer_pokemon_sprites.c +++ b/src/trainer_pokemon_sprites.c @@ -137,7 +137,7 @@ static void LoadPicPaletteBySlot(u16 species, u32 otId, u32 personality, u8 pale static void AssignSpriteAnimsTable(bool8 isTrainer) { if (!isTrainer) - sCreatingSpriteTemplate.anims = gUnknown_082FF70C; + sCreatingSpriteTemplate.anims = gAnims_MonPic; else sCreatingSpriteTemplate.anims = gTrainerFrontAnimsPtrTable[0]; } From e40f89b175189bcfca33285ee5a98de1b7ff74a6 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 25 Apr 2021 02:19:01 -0400 Subject: [PATCH 2/2] Move unknown data table, reference with species --- src/data.c | 115 +----- src/data/pokemon_graphics/unknown_table.h | 444 ++++++++++++++++++++++ 2 files changed, 445 insertions(+), 114 deletions(-) create mode 100644 src/data/pokemon_graphics/unknown_table.h diff --git a/src/data.c b/src/data.c index d300d4f63..5856d17b8 100644 --- a/src/data.c +++ b/src/data.c @@ -319,120 +319,7 @@ const union AnimCmd *const gAnims_MonPic[] = #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" diff --git a/src/data/pokemon_graphics/unknown_table.h b/src/data/pokemon_graphics/unknown_table.h new file mode 100644 index 000000000..737b79c1b --- /dev/null +++ b/src/data/pokemon_graphics/unknown_table.h @@ -0,0 +1,444 @@ +// Unknown and unused +static const u32 sUnused[] = +{ + [SPECIES_NONE] = 0x888, + [SPECIES_BULBASAUR] = 0x888, + [SPECIES_IVYSAUR] = 0x888, + [SPECIES_VENUSAUR] = 0x888, + [SPECIES_CHARMANDER] = 0x88, + [SPECIES_CHARMELEON] = 0x888, + [SPECIES_CHARIZARD] = 0x888, + [SPECIES_SQUIRTLE] = 0x886, + [SPECIES_WARTORTLE] = 0x888, + [SPECIES_BLASTOISE] = 0x886, + [SPECIES_CATERPIE] = 0x888, + [SPECIES_METAPOD] = 0x888, + [SPECIES_BUTTERFREE] = 0x888, + [SPECIES_WEEDLE] = 0x888, + [SPECIES_KAKUNA] = 0x888, + [SPECIES_BEEDRILL] = 0x888, + [SPECIES_PIDGEY] = 0x886, + [SPECIES_PIDGEOTTO] = 0x888, + [SPECIES_PIDGEOT] = 0x888, + [SPECIES_RATTATA] = 0x888, + [SPECIES_RATICATE] = 0x888, + [SPECIES_SPEAROW] = 0x888, + [SPECIES_FEAROW] = 0x886, + [SPECIES_EKANS] = 0x886, + [SPECIES_ARBOK] = 0x888, + [SPECIES_PIKACHU] = 0x88, + [SPECIES_RAICHU] = 0x88, + [SPECIES_SANDSHREW] = 0x88, + [SPECIES_SANDSLASH] = 0x88, + [SPECIES_NIDORAN_F] = 0x888, + [SPECIES_NIDORINA] = 0x886, + [SPECIES_NIDOQUEEN] = 0x888, + [SPECIES_NIDORAN_M] = 0x888, + [SPECIES_NIDORINO] = 0x888, + [SPECIES_NIDOKING] = 0x886, + [SPECIES_CLEFAIRY] = 0x886, + [SPECIES_CLEFABLE] = 0x888, + [SPECIES_VULPIX] = 0x88, + [SPECIES_NINETALES] = 0x88, + [SPECIES_JIGGLYPUFF] = 0x88, + [SPECIES_WIGGLYTUFF] = 0x88, + [SPECIES_ZUBAT] = 0x886, + [SPECIES_GOLBAT] = 0x886, + [SPECIES_ODDISH] = 0x88, + [SPECIES_GLOOM] = 0x886, + [SPECIES_VILEPLUME] = 0x886, + [SPECIES_PARAS] = 0x888, + [SPECIES_PARASECT] = 0x888, + [SPECIES_VENONAT] = 0x888, + [SPECIES_VENOMOTH] = 0x888, + [SPECIES_DIGLETT] = 0x888, + [SPECIES_DUGTRIO] = 0x888, + [SPECIES_MEOWTH] = 0x886, + [SPECIES_PERSIAN] = 0x888, + [SPECIES_PSYDUCK] = 0x88, + [SPECIES_GOLDUCK] = 0x88, + [SPECIES_MANKEY] = 0x888, + [SPECIES_PRIMEAPE] = 0x888, + [SPECIES_GROWLITHE] = 0x888, + [SPECIES_ARCANINE] = 0x886, + [SPECIES_POLIWAG] = 0x888, + [SPECIES_POLIWHIRL] = 0x888, + [SPECIES_POLIWRATH] = 0x888, + [SPECIES_ABRA] = 0x886, + [SPECIES_KADABRA] = 0x886, + [SPECIES_ALAKAZAM] = 0x886, + [SPECIES_MACHOP] = 0x886, + [SPECIES_MACHOKE] = 0x886, + [SPECIES_MACHAMP] = 0x886, + [SPECIES_BELLSPROUT] = 0x886, + [SPECIES_WEEPINBELL] = 0x888, + [SPECIES_VICTREEBEL] = 0x888, + [SPECIES_TENTACOOL] = 0x886, + [SPECIES_TENTACRUEL] = 0x886, + [SPECIES_GEODUDE] = 0x886, + [SPECIES_GRAVELER] = 0x886, + [SPECIES_GOLEM] = 0x886, + [SPECIES_PONYTA] = 0x888, + [SPECIES_RAPIDASH] = 0x888, + [SPECIES_SLOWPOKE] = 0x888, + [SPECIES_SLOWBRO] = 0x888, + [SPECIES_MAGNEMITE] = 0x886, + [SPECIES_MAGNETON] = 0x886, + [SPECIES_FARFETCHD] = 0x888, + [SPECIES_DODUO] = 0x886, + [SPECIES_DODRIO] = 0x886, + [SPECIES_SEEL] = 0x888, + [SPECIES_DEWGONG] = 0x888, + [SPECIES_GRIMER] = 0x88, + [SPECIES_MUK] = 0x88, + [SPECIES_SHELLDER] = 0x888, + [SPECIES_CLOYSTER] = 0x888, + [SPECIES_GASTLY] = 0x888, + [SPECIES_HAUNTER] = 0x888, + [SPECIES_GENGAR] = 0x888, + [SPECIES_ONIX] = 0x888, + [SPECIES_DROWZEE] = 0x888, + [SPECIES_HYPNO] = 0x888, + [SPECIES_KRABBY] = 0x888, + [SPECIES_KINGLER] = 0x888, + [SPECIES_VOLTORB] = 0x886, + [SPECIES_ELECTRODE] = 0x886, + [SPECIES_EXEGGCUTE] = 0x888, + [SPECIES_EXEGGUTOR] = 0x888, + [SPECIES_CUBONE] = 0x888, + [SPECIES_MAROWAK] = 0x888, + [SPECIES_HITMONLEE] = 0x88, + [SPECIES_HITMONCHAN] = 0x886, + [SPECIES_LICKITUNG] = 0x888, + [SPECIES_KOFFING] = 0x88, + [SPECIES_WEEZING] = 0x88, + [SPECIES_RHYHORN] = 0x88, + [SPECIES_RHYDON] = 0x88, + [SPECIES_CHANSEY] = 0x888, + [SPECIES_TANGELA] = 0x886, + [SPECIES_KANGASKHAN] = 0x888, + [SPECIES_HORSEA] = 0x88, + [SPECIES_SEADRA] = 0x88, + [SPECIES_GOLDEEN] = 0x886, + [SPECIES_SEAKING] = 0x886, + [SPECIES_STARYU] = 0x88, + [SPECIES_STARMIE] = 0x88, + [SPECIES_MR_MIME] = 0x888, + [SPECIES_SCYTHER] = 0x886, + [SPECIES_JYNX] = 0x886, + [SPECIES_ELECTABUZZ] = 0x888, + [SPECIES_MAGMAR] = 0x888, + [SPECIES_PINSIR] = 0x88, + [SPECIES_TAUROS] = 0x888, + [SPECIES_MAGIKARP] = 0x886, + [SPECIES_GYARADOS] = 0x886, + [SPECIES_LAPRAS] = 0x888, + [SPECIES_DITTO] = 0x886, + [SPECIES_EEVEE] = 0x888, + [SPECIES_VAPOREON] = 0x888, + [SPECIES_JOLTEON] = 0x886, + [SPECIES_FLAREON] = 0x888, + [SPECIES_PORYGON] = 0x888, + [SPECIES_OMANYTE] = 0x888, + [SPECIES_OMASTAR] = 0x888, + [SPECIES_KABUTO] = 0x888, + [SPECIES_KABUTOPS] = 0x888, + [SPECIES_AERODACTYL] = 0x888, + [SPECIES_SNORLAX] = 0x888, + [SPECIES_ARTICUNO] = 0x888, + [SPECIES_ZAPDOS] = 0x888, + [SPECIES_MOLTRES] = 0x888, + [SPECIES_DRATINI] = 0x888, + [SPECIES_DRAGONAIR] = 0x888, + [SPECIES_DRAGONITE] = 0x888, + [SPECIES_MEWTWO] = 0x88, + [SPECIES_MEW] = 0x888, + [SPECIES_CHIKORITA] = 0x888, + [SPECIES_BAYLEEF] = 0x888, + [SPECIES_MEGANIUM] = 0x888, + [SPECIES_CYNDAQUIL] = 0x888, + [SPECIES_QUILAVA] = 0x88, + [SPECIES_TYPHLOSION] = 0x888, + [SPECIES_TOTODILE] = 0x888, + [SPECIES_CROCONAW] = 0x886, + [SPECIES_FERALIGATR] = 0x886, + [SPECIES_SENTRET] = 0x888, + [SPECIES_FURRET] = 0x888, + [SPECIES_HOOTHOOT] = 0x888, + [SPECIES_NOCTOWL] = 0x888, + [SPECIES_LEDYBA] = 0x888, + [SPECIES_LEDIAN] = 0x888, + [SPECIES_SPINARAK] = 0x886, + [SPECIES_ARIADOS] = 0x888, + [SPECIES_CROBAT] = 0x886, + [SPECIES_CHINCHOU] = 0x88, + [SPECIES_LANTURN] = 0x88, + [SPECIES_PICHU] = 0x88, + [SPECIES_CLEFFA] = 0x888, + [SPECIES_IGGLYBUFF] = 0x88, + [SPECIES_TOGEPI] = 0x888, + [SPECIES_TOGETIC] = 0x888, + [SPECIES_NATU] = 0x88, + [SPECIES_XATU] = 0x88, + [SPECIES_MAREEP] = 0x888, + [SPECIES_FLAAFFY] = 0x886, + [SPECIES_AMPHAROS] = 0x888, + [SPECIES_BELLOSSOM] = 0x886, + [SPECIES_MARILL] = 0x886, + [SPECIES_AZUMARILL] = 0x886, + [SPECIES_SUDOWOODO] = 0x888, + [SPECIES_POLITOED] = 0x888, + [SPECIES_HOPPIP] = 0x888, + [SPECIES_SKIPLOOM] = 0x88, + [SPECIES_JUMPLUFF] = 0x888, + [SPECIES_AIPOM] = 0x888, + [SPECIES_SUNKERN] = 0x888, + [SPECIES_SUNFLORA] = 0x88, + [SPECIES_YANMA] = 0x888, + [SPECIES_WOOPER] = 0x888, + [SPECIES_QUAGSIRE] = 0x888, + [SPECIES_ESPEON] = 0x888, + [SPECIES_UMBREON] = 0x888, + [SPECIES_MURKROW] = 0x888, + [SPECIES_SLOWKING] = 0x888, + [SPECIES_MISDREAVUS] = 0x888, + [SPECIES_UNOWN] = 0x888, + [SPECIES_WOBBUFFET] = 0x88, + [SPECIES_GIRAFARIG] = 0x88, + [SPECIES_PINECO] = 0x886, + [SPECIES_FORRETRESS] = 0x888, + [SPECIES_DUNSPARCE] = 0x888, + [SPECIES_GLIGAR] = 0x888, + [SPECIES_STEELIX] = 0x888, + [SPECIES_SNUBBULL] = 0x888, + [SPECIES_GRANBULL] = 0x888, + [SPECIES_QWILFISH] = 0x888, + [SPECIES_SCIZOR] = 0x888, + [SPECIES_SHUCKLE] = 0x888, + [SPECIES_HERACROSS] = 0x88, + [SPECIES_SNEASEL] = 0x888, + [SPECIES_TEDDIURSA] = 0x886, + [SPECIES_URSARING] = 0x888, + [SPECIES_SLUGMA] = 0x88, + [SPECIES_MAGCARGO] = 0x88, + [SPECIES_SWINUB] = 0x888, + [SPECIES_PILOSWINE] = 0x888, + [SPECIES_CORSOLA] = 0x88, + [SPECIES_REMORAID] = 0x888, + [SPECIES_OCTILLERY] = 0x888, + [SPECIES_DELIBIRD] = 0x888, + [SPECIES_MANTINE] = 0x888, + [SPECIES_SKARMORY] = 0x88, + [SPECIES_HOUNDOUR] = 0x888, + [SPECIES_HOUNDOOM] = 0x888, + [SPECIES_KINGDRA] = 0x88, + [SPECIES_PHANPY] = 0x88, + [SPECIES_DONPHAN] = 0x88, + [SPECIES_PORYGON2] = 0x888, + [SPECIES_STANTLER] = 0x88, + [SPECIES_SMEARGLE] = 0x888, + [SPECIES_TYROGUE] = 0x888, + [SPECIES_HITMONTOP] = 0x888, + [SPECIES_SMOOCHUM] = 0x888, + [SPECIES_ELEKID] = 0x888, + [SPECIES_MAGBY] = 0x888, + [SPECIES_MILTANK] = 0x888, + [SPECIES_BLISSEY] = 0x888, + [SPECIES_RAIKOU] = 0x888, + [SPECIES_ENTEI] = 0x888, + [SPECIES_SUICUNE] = 0x888, + [SPECIES_LARVITAR] = 0x888, + [SPECIES_PUPITAR] = 0x888, + [SPECIES_TYRANITAR] = 0x888, + [SPECIES_LUGIA] = 0x886, + [SPECIES_HO_OH] = 0x888, + [SPECIES_CELEBI] = 0x888, + [SPECIES_OLD_UNOWN_B] = 0x888, + [SPECIES_OLD_UNOWN_C] = 0x888, + [SPECIES_OLD_UNOWN_D] = 0x888, + [SPECIES_OLD_UNOWN_E] = 0x888, + [SPECIES_OLD_UNOWN_F] = 0x888, + [SPECIES_OLD_UNOWN_G] = 0x888, + [SPECIES_OLD_UNOWN_H] = 0x888, + [SPECIES_OLD_UNOWN_I] = 0x888, + [SPECIES_OLD_UNOWN_J] = 0x888, + [SPECIES_OLD_UNOWN_K] = 0x888, + [SPECIES_OLD_UNOWN_L] = 0x888, + [SPECIES_OLD_UNOWN_M] = 0x888, + [SPECIES_OLD_UNOWN_N] = 0x888, + [SPECIES_OLD_UNOWN_O] = 0x888, + [SPECIES_OLD_UNOWN_P] = 0x888, + [SPECIES_OLD_UNOWN_Q] = 0x888, + [SPECIES_OLD_UNOWN_R] = 0x888, + [SPECIES_OLD_UNOWN_S] = 0x888, + [SPECIES_OLD_UNOWN_T] = 0x888, + [SPECIES_OLD_UNOWN_U] = 0x888, + [SPECIES_OLD_UNOWN_V] = 0x888, + [SPECIES_OLD_UNOWN_W] = 0x888, + [SPECIES_OLD_UNOWN_X] = 0x888, + [SPECIES_OLD_UNOWN_Y] = 0x888, + [SPECIES_OLD_UNOWN_Z] = 0x888, + [SPECIES_TREECKO] = 0x886, + [SPECIES_GROVYLE] = 0x886, + [SPECIES_SCEPTILE] = 0x886, + [SPECIES_TORCHIC] = 0x88, + [SPECIES_COMBUSKEN] = 0x88, + [SPECIES_BLAZIKEN] = 0x88, + [SPECIES_MUDKIP] = 0x886, + [SPECIES_MARSHTOMP] = 0x88, + [SPECIES_SWAMPERT] = 0x886, + [SPECIES_POOCHYENA] = 0x886, + [SPECIES_MIGHTYENA] = 0x886, + [SPECIES_ZIGZAGOON] = 0x88, + [SPECIES_LINOONE] = 0x886, + [SPECIES_WURMPLE] = 0x88, + [SPECIES_SILCOON] = 0x88, + [SPECIES_BEAUTIFLY] = 0x88, + [SPECIES_CASCOON] = 0x88, + [SPECIES_DUSTOX] = 0x88, + [SPECIES_LOTAD] = 0x886, + [SPECIES_LOMBRE] = 0x886, + [SPECIES_LUDICOLO] = 0x886, + [SPECIES_SEEDOT] = 0x888, + [SPECIES_NUZLEAF] = 0x888, + [SPECIES_SHIFTRY] = 0x886, + [SPECIES_NINCADA] = 0x886, + [SPECIES_NINJASK] = 0x886, + [SPECIES_SHEDINJA] = 0x886, + [SPECIES_TAILLOW] = 0x88, + [SPECIES_SWELLOW] = 0x88, + [SPECIES_SHROOMISH] = 0x886, + [SPECIES_BRELOOM] = 0x886, + [SPECIES_SPINDA] = 0x1882, + [SPECIES_WINGULL] = 0x88, + [SPECIES_PELIPPER] = 0x88, + [SPECIES_SURSKIT] = 0x88, + [SPECIES_MASQUERAIN] = 0x88, + [SPECIES_WAILMER] = 0x886, + [SPECIES_WAILORD] = 0x886, + [SPECIES_SKITTY] = 0x886, + [SPECIES_DELCATTY] = 0x88, + [SPECIES_KECLEON] = 0x88, + [SPECIES_BALTOY] = 0x88, + [SPECIES_CLAYDOL] = 0x88, + [SPECIES_NOSEPASS] = 0x886, + [SPECIES_TORKOAL] = 0x88, + [SPECIES_SABLEYE] = 0x886, + [SPECIES_BARBOACH] = 0x88, + [SPECIES_WHISCASH] = 0x88, + [SPECIES_LUVDISC] = 0x88, + [SPECIES_CORPHISH] = 0x88, + [SPECIES_CRAWDAUNT] = 0x88, + [SPECIES_FEEBAS] = 0x88, + [SPECIES_MILOTIC] = 0x88, + [SPECIES_CARVANHA] = 0x886, + [SPECIES_SHARPEDO] = 0x886, + [SPECIES_TRAPINCH] = 0x88, + [SPECIES_VIBRAVA] = 0x88, + [SPECIES_FLYGON] = 0x88, + [SPECIES_MAKUHITA] = 0x886, + [SPECIES_HARIYAMA] = 0x886, + [SPECIES_ELECTRIKE] = 0x88, + [SPECIES_MANECTRIC] = 0x88, + [SPECIES_NUMEL] = 0x88, + [SPECIES_CAMERUPT] = 0x88, + [SPECIES_SPHEAL] = 0x88, + [SPECIES_SEALEO] = 0x88, + [SPECIES_WALREIN] = 0x88, + [SPECIES_CACNEA] = 0x88, + [SPECIES_CACTURNE] = 0x88, + [SPECIES_SNORUNT] = 0x88, + [SPECIES_GLALIE] = 0x88, + [SPECIES_LUNATONE] = 0x88, + [SPECIES_SOLROCK] = 0x88, + [SPECIES_AZURILL] = 0x886, + [SPECIES_SPOINK] = 0x88, + [SPECIES_GRUMPIG] = 0x88, + [SPECIES_PLUSLE] = 0x886, + [SPECIES_MINUN] = 0x886, + [SPECIES_MAWILE] = 0x886, + [SPECIES_MEDITITE] = 0x886, + [SPECIES_MEDICHAM] = 0x886, + [SPECIES_SWABLU] = 0x88, + [SPECIES_ALTARIA] = 0x88, + [SPECIES_WYNAUT] = 0x88, + [SPECIES_DUSKULL] = 0x88, + [SPECIES_DUSCLOPS] = 0x88, + [SPECIES_ROSELIA] = 0x886, + [SPECIES_SLAKOTH] = 0x886, + [SPECIES_VIGOROTH] = 0x886, + [SPECIES_SLAKING] = 0x886, + [SPECIES_GULPIN] = 0x88, + [SPECIES_SWALOT] = 0x886, + [SPECIES_TROPIUS] = 0x88, + [SPECIES_WHISMUR] = 0x886, + [SPECIES_LOUDRED] = 0x886, + [SPECIES_EXPLOUD] = 0x886, + [SPECIES_CLAMPERL] = 0x88, + [SPECIES_HUNTAIL] = 0x88, + [SPECIES_GOREBYSS] = 0x88, + [SPECIES_ABSOL] = 0x88, + [SPECIES_SHUPPET] = 0x88, + [SPECIES_BANETTE] = 0x88, + [SPECIES_SEVIPER] = 0x88, + [SPECIES_ZANGOOSE] = 0x88, + [SPECIES_RELICANTH] = 0x88, + [SPECIES_ARON] = 0x886, + [SPECIES_LAIRON] = 0x886, + [SPECIES_AGGRON] = 0x886, + [SPECIES_CASTFORM] = 0x888, + [SPECIES_VOLBEAT] = 0x886, + [SPECIES_ILLUMISE] = 0x886, + [SPECIES_LILEEP] = 0x88, + [SPECIES_CRADILY] = 0x88, + [SPECIES_ANORITH] = 0x88, + [SPECIES_ARMALDO] = 0x88, + [SPECIES_RALTS] = 0x886, + [SPECIES_KIRLIA] = 0x886, + [SPECIES_GARDEVOIR] = 0x88, + [SPECIES_BAGON] = 0x88, + [SPECIES_SHELGON] = 0x88, + [SPECIES_SALAMENCE] = 0x88, + [SPECIES_BELDUM] = 0x88, + [SPECIES_METANG] = 0x88, + [SPECIES_METAGROSS] = 0x88, + [SPECIES_REGIROCK] = 0x88, + [SPECIES_REGICE] = 0x88, + [SPECIES_REGISTEEL] = 0x88, + [SPECIES_KYOGRE] = 0x88, + [SPECIES_GROUDON] = 0x88, + [SPECIES_RAYQUAZA] = 0x88, + [SPECIES_LATIAS] = 0x88, + [SPECIES_LATIOS] = 0x88, + [SPECIES_JIRACHI] = 0x88, + [SPECIES_DEOXYS] = 0x88, + [SPECIES_CHIMECHO] = 0x88, + [SPECIES_EGG] = 0x88, + [SPECIES_UNOWN_B] = 0x888, + [SPECIES_UNOWN_C] = 0x888, + [SPECIES_UNOWN_D] = 0x888, + [SPECIES_UNOWN_E] = 0x888, + [SPECIES_UNOWN_F] = 0x888, + [SPECIES_UNOWN_G] = 0x888, + [SPECIES_UNOWN_H] = 0x888, + [SPECIES_UNOWN_I] = 0x888, + [SPECIES_UNOWN_J] = 0x888, + [SPECIES_UNOWN_K] = 0x888, + [SPECIES_UNOWN_L] = 0x888, + [SPECIES_UNOWN_M] = 0x888, + [SPECIES_UNOWN_N] = 0x888, + [SPECIES_UNOWN_O] = 0x888, + [SPECIES_UNOWN_P] = 0x888, + [SPECIES_UNOWN_Q] = 0x888, + [SPECIES_UNOWN_R] = 0x888, + [SPECIES_UNOWN_S] = 0x888, + [SPECIES_UNOWN_T] = 0x888, + [SPECIES_UNOWN_U] = 0x888, + [SPECIES_UNOWN_V] = 0x888, + [SPECIES_UNOWN_W] = 0x888, + [SPECIES_UNOWN_X] = 0x888, + [SPECIES_UNOWN_Y] = 0x888, + [SPECIES_UNOWN_Z] = 0x888, + [SPECIES_UNOWN_EMARK] = 0x888, + [SPECIES_UNOWN_QMARK] = 0x888, +};