diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index fd1ded459..23416bde8 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -134,7 +134,7 @@ gBattleAnims_Moves:: .4byte Move_FOCUS_ENERGY .4byte Move_BIDE .4byte Move_METRONOME - .4byte Move_MIRROR_MOVE @ doesn't have an actual animation + .4byte Move_MIRROR_MOVE @ doesnt have an actual animation .4byte Move_SELF_DESTRUCT .4byte Move_EGG_BOMB .4byte Move_LICK @@ -282,7 +282,7 @@ gBattleAnims_Moves:: .4byte Move_FOCUS_PUNCH .4byte Move_SMELLING_SALT .4byte Move_FOLLOW_ME - .4byte Move_NATURE_POWER @ doesnt have an actual animation + .4byte Move_NATURE_POWER .4byte Move_CHARGE .4byte Move_TAUNT .4byte Move_HELPING_HAND @@ -393,9 +393,9 @@ gBattleAnims_General:: .4byte General_PokeblockThrow .4byte General_ItemKnockoff .4byte General_TurnTrap - .4byte General_ItemEffect + .4byte General_HeldItemEffect .4byte General_SmokeballEscape - .4byte General_HangedOn + .4byte General_FocusBand .4byte General_Rain .4byte General_Sun .4byte General_Sandstorm @@ -412,13 +412,13 @@ gBattleAnims_General:: .align 2 gBattleAnims_Special:: - .4byte Special_LevelUp - .4byte Special_SwitchOutPlayerMon - .4byte Special_SwitchOutOpponentMon - .4byte Special_BallThrow - .4byte Special_SafariBallThrow - .4byte Special_SubstituteToMon - .4byte Special_MonToSubstitute + .4byte Special_LevelUp @ B_ANIM_LVL_UP + .4byte Special_SwitchOutPlayerMon @ B_ANIM_SWITCH_OUT_PLAYER_MON + .4byte Special_SwitchOutOpponentMon @ B_ANIM_SWITCH_OUT_OPPONENT_MON + .4byte Special_BallThrow @ B_ANIM_BALL_THROW + .4byte Special_SafariBallThrow @ B_ANIM_SAFARI_BALL_THROW + .4byte Special_SubstituteToMon @ B_ANIM_SUBSTITUTE_TO_MON + .4byte Special_MonToSubstitute @ B_ANIM_MON_TO_SUBSTITUTE Move_NONE: Move_MIRROR_MOVE: @@ -427,7 +427,7 @@ Move_POUND: monbg ANIM_TARGET setalpha 12, 8 playsewithpan SE_W003, SOUND_PAN_TARGET - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 1, 2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, ANIM_TARGET, 2 createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 3, 0, 6, 1 waitforvisualfinish clearmonbg ANIM_TARGET @@ -447,10 +447,10 @@ DoubleSlapContinue: blendoff end DoubleSlapLeft: - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, -8, 0, 1, 2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, -8, 0, ANIM_TARGET, 2 goto DoubleSlapContinue DoubleSlapRight: - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 8, 0, 1, 2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 8, 0, ANIM_TARGET, 2 goto DoubleSlapContinue Move_POISON_POWDER: @@ -565,13 +565,13 @@ Move_STRENGTH: createvisualtask AnimTask_TranslateMonEllipticalRespectSide, 2, ANIM_TARGET, 18, 6, 2, 4 delay 4 playsewithpan SE_W025B, SOUND_PAN_TARGET - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 16, 12, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 16, 12, ANIM_TARGET, 1 delay 4 playsewithpan SE_W025B, SOUND_PAN_TARGET - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, -16, -12, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, -16, -12, ANIM_TARGET, 1 delay 4 playsewithpan SE_W025B, SOUND_PAN_TARGET - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 3, 4, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 3, 4, ANIM_TARGET, 1 waitforvisualfinish createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 2, 0, 8, 1 waitforvisualfinish @@ -585,7 +585,7 @@ Move_TACKLE: setalpha 12, 8 createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 4, 4 delay 6 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 1, 2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, ANIM_TARGET, 2 createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 3, 0, 6, 1 playsewithpan SE_W004, SOUND_PAN_TARGET waitforvisualfinish @@ -603,7 +603,7 @@ Move_BODY_SLAM: delay 11 createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, 0, 26, 0, 0, 5 delay 6 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 4, -10, 0, 1, 0 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 4, -10, 0, ANIM_TARGET, 0 loopsewithpan SE_W025B, SOUND_PAN_TARGET, 10, 2 delay 1 createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, 1, -28, 0, 0, 3 @@ -625,34 +625,34 @@ Move_SUPERSONIC: monbgprio_2A ANIM_ATTACKER setalpha 12, 8 createvisualtask AnimTask_ShakeMon2, 2, ANIM_ATTACKER, 2, 0, 8, 1 - call Supersonic1 - call Supersonic1 - call Supersonic1 - call Supersonic1 - call Supersonic1 - call Supersonic1 + call SupersonicRing + call SupersonicRing + call SupersonicRing + call SupersonicRing + call SupersonicRing + call SupersonicRing waitforvisualfinish clearmonbg ANIM_ATK_PARTNER blendoff end -Supersonic1: +SupersonicRing: playsewithpan SE_W048, SOUND_PAN_ATTACKER - createsprite gSupersonicWaveSpriteTemplate, ANIM_TARGET, 2, 16, 0, 0, 0, 30, 0 + createsprite gSupersonicRingSpriteTemplate, ANIM_TARGET, 2, 16, 0, 0, 0, 30, 0 delay 2 return Move_SCREECH: loadspritegfx ANIM_TAG_PURPLE_RING createvisualtask AnimTask_ShakeMon2, 2, ANIM_ATTACKER, 3, 0, 2, 1 - call Screech1 - call Screech1 + call ScreechRing + call ScreechRing delay 16 createvisualtask AnimTask_SwayMon, 5, 0, 6, 2048, 2, ANIM_TARGET waitforvisualfinish end -Screech1: +ScreechRing: playsewithpan SE_W103, SOUND_PAN_ATTACKER - createsprite gScreechWaveSpriteTemplate, ANIM_TARGET, 2, 16, 0, 0, 0, 30, 0 + createsprite gScreechRingSpriteTemplate, ANIM_TARGET, 2, 16, 0, 0, 0, 30, 0 delay 2 return @@ -660,25 +660,25 @@ Move_FLAME_WHEEL: loadspritegfx ANIM_TAG_SMALL_EMBER monbg ANIM_DEF_PARTNER monbgprio_2A ANIM_TARGET - createsprite gBattleAnimSpriteTemplate_8595584, ANIM_ATTACKER, 3, 0, 0, 56, 0 + createsprite gFireSpiralOutwardSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 56, 0 playsewithpan SE_W172, SOUND_PAN_ATTACKER delay 2 - createsprite gBattleAnimSpriteTemplate_8595584, ANIM_ATTACKER, 3, 0, 0, 56, 4 + createsprite gFireSpiralOutwardSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 56, 4 playsewithpan SE_W172, SOUND_PAN_ATTACKER delay 2 - createsprite gBattleAnimSpriteTemplate_8595584, ANIM_ATTACKER, 3, 0, 0, 56, 8 + createsprite gFireSpiralOutwardSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 56, 8 playsewithpan SE_W172, SOUND_PAN_ATTACKER delay 2 - createsprite gBattleAnimSpriteTemplate_8595584, ANIM_ATTACKER, 3, 0, 0, 56, 12 + createsprite gFireSpiralOutwardSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 56, 12 playsewithpan SE_W172, SOUND_PAN_ATTACKER delay 2 - createsprite gBattleAnimSpriteTemplate_8595584, ANIM_ATTACKER, 3, 0, 0, 56, 16 + createsprite gFireSpiralOutwardSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 56, 16 playsewithpan SE_W172, SOUND_PAN_ATTACKER delay 2 - createsprite gBattleAnimSpriteTemplate_8595584, ANIM_ATTACKER, 3, 0, 0, 56, 20 + createsprite gFireSpiralOutwardSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 56, 20 playsewithpan SE_W172, SOUND_PAN_ATTACKER delay 2 - createsprite gBattleAnimSpriteTemplate_8595584, ANIM_ATTACKER, 3, 0, 0, 56, 24 + createsprite gFireSpiralOutwardSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 56, 24 playsewithpan SE_W172, SOUND_PAN_ATTACKER waitforvisualfinish createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, 0, 24, 0, 0, 6 @@ -686,7 +686,7 @@ Move_FLAME_WHEEL: createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 5, 0, 8, 1 createvisualtask AnimTask_BlendMonInAndOut, 3, ANIM_TARGET, RGB_RED, 12, 1, 1 playsewithpan SE_W172B, SOUND_PAN_TARGET - call FireMoveEffect + call FireSpreadEffect delay 7 createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 9 waitforvisualfinish @@ -694,7 +694,7 @@ Move_FLAME_WHEEL: end FlameWheel1: @ Unused - createsprite gBattleAnimSpriteTemplate_8595584, ANIM_ATTACKER, 3, 0, 0, 50 + createsprite gFireSpiralOutwardSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 50 delay 4 return @@ -710,17 +710,17 @@ Move_PIN_MISSILE: createsprite gPinMissileSpriteTemplate, ANIM_ATTACKER, 2, 20, -8, 8, 8, 20, -40 delay 4 playsewithpan SE_W030, SOUND_PAN_TARGET - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, -8, -8, 1, 2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, -8, -8, ANIM_TARGET, 2 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 3, 0, 2, 1 delay 9 createsprite gPinMissileSpriteTemplate, ANIM_ATTACKER, 2, 20, -8, 0, 0, 20, -32 delay 4 playsewithpan SE_W030, SOUND_PAN_TARGET - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 8, 8, 1, 2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 8, 8, ANIM_TARGET, 2 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 3, 0, 2, 1 delay 14 playsewithpan SE_W030, SOUND_PAN_TARGET - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 1, 2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, ANIM_TARGET, 2 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 3, 0, 2, 1 waitforvisualfinish clearmonbg ANIM_TARGET @@ -739,17 +739,17 @@ Move_ICICLE_SPEAR: createsprite gIcicleSpearSpriteTemplate, ANIM_ATTACKER, 2, 20, -8, 8, 8, 20, -40 delay 4 playsewithpan SE_W030, SOUND_PAN_TARGET - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, -8, -8, 1, 2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, -8, -8, ANIM_TARGET, 2 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 3, 0, 2, 1 delay 9 createsprite gIcicleSpearSpriteTemplate, ANIM_ATTACKER, 2, 20, -8, 0, 0, 20, -32 delay 4 playsewithpan SE_W030, SOUND_PAN_TARGET - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 8, 8, 1, 2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 8, 8, ANIM_TARGET, 2 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 3, 0, 2, 1 delay 14 playsewithpan SE_W030, SOUND_PAN_TARGET - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 1, 2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, ANIM_TARGET, 2 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 3, 0, 2, 1 waitforvisualfinish clearmonbg ANIM_TARGET @@ -763,7 +763,7 @@ Move_TAKE_DOWN: createvisualtask AnimTask_WindUpLunge, 5, ANIM_ATTACKER, -24, 8, 23, 10, 40, 10 delay 35 createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 1, RGB_BLACK, 10, 0, 0 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 4, -10, 0, 1, 0 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 4, -10, 0, ANIM_TARGET, 0 playsewithpan SE_W025B, SOUND_PAN_TARGET delay 1 createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, 1, -16, 0, 0, 4 @@ -794,17 +794,17 @@ Move_DOUBLE_EDGE: delay 3 waitforvisualfinish playsewithpan SE_W025B, SOUND_PAN_TARGET - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 4, -10, 0, 1, 0 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 4, -10, 0, ANIM_TARGET, 0 createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, 1, -32, 0, 0, 3 waitforvisualfinish - createvisualtask sub_80D6134, 2, 8, -256, 0, 0 - createvisualtask sub_80D6134, 2, 8, -256, 1, 0 + createvisualtask AnimTask_RotateMonSpriteToSide, 2, 8, -256, 0, 0 + createvisualtask AnimTask_RotateMonSpriteToSide, 2, 8, -256, 1, 0 createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_ATTACKER, 4, 0, 12, 1 createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_TARGET, 4, 0, 12, 1 createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 2, 16, 0, RGB_WHITE waitforvisualfinish - createvisualtask sub_80D6134, 2, 8, -256, 0, 1 - createvisualtask sub_80D6134, 2, 8, -256, 1, 1 + createvisualtask AnimTask_RotateMonSpriteToSide, 2, 8, -256, 0, 1 + createvisualtask AnimTask_RotateMonSpriteToSide, 2, 8, -256, 1, 1 waitforvisualfinish createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 5 delay 3 @@ -822,7 +822,7 @@ Move_POISON_STING: playsewithpan SE_W013B, SOUND_PAN_ATTACKER createsprite gLinearStingerSpriteTemplate, ANIM_TARGET, 2, 20, 0, -8, 0, 20 waitforvisualfinish - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 1, 2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, ANIM_TARGET, 2 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 2, 0, 5, 1 playsewithpan SE_W030, SOUND_PAN_TARGET waitforvisualfinish @@ -843,10 +843,10 @@ Move_TWINEEDLE: createsprite gLinearStingerSpriteTemplate, ANIM_TARGET, 2, 20, 12, 10, 12, 20 delay 20 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 2, 0, 5, 1 - createsprite gBattleAnimSpriteTemplate_8597370, ANIM_ATTACKER, 3, 0, -4, 1, 3 + createsprite gHandleInvertHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, -4, 1, 3 loopsewithpan SE_W030, SOUND_PAN_TARGET, 5, 2 delay 1 - createsprite gBattleAnimSpriteTemplate_8597370, ANIM_ATTACKER, 3, 10, 12, 1, 3 + createsprite gHandleInvertHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 10, 12, 1, 3 waitforvisualfinish clearmonbg ANIM_TARGET blendoff @@ -854,50 +854,50 @@ Move_TWINEEDLE: Move_FIRE_BLAST: loadspritegfx ANIM_TAG_SMALL_EMBER - createsoundtask sub_8158B30, 144, 145 - call FireBlast1 - call FireBlast1 - call FireBlast1 + createsoundtask sub_8158B30, SE_W172, SE_W172B + call FireBlastRing + call FireBlastRing + call FireBlastRing delay 24 - createvisualtask sub_8116620, 10, 1, 3, 0, 8, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, 1, 3, 0, 8, RGB_BLACK waitforvisualfinish delay 19 createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 5, 0, 20, 1 - call FireBlast2 + call FireBlastCross delay 3 - call FireBlast2 + call FireBlastCross delay 3 - call FireBlast2 + call FireBlastCross delay 3 - call FireBlast2 + call FireBlastCross delay 3 - call FireBlast2 + call FireBlastCross delay 3 - call FireBlast2 + call FireBlastCross delay 3 - call FireBlast2 + call FireBlastCross delay 3 - call FireBlast2 + call FireBlastCross delay 3 - call FireBlast2 + call FireBlastCross waitforvisualfinish - createvisualtask sub_8116620, 10, 1, 2, 8, 0, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, 1, 2, 8, 0, RGB_BLACK waitforvisualfinish end -FireBlast1: - createsprite gUnknown_0859551C, ANIM_TARGET, 2, 0, 0, 0 - createsprite gUnknown_0859551C, ANIM_TARGET, 2, 0, 0, 51 - createsprite gUnknown_0859551C, ANIM_TARGET, 2, 0, 0, 102 - createsprite gUnknown_0859551C, ANIM_TARGET, 2, 0, 0, 153 - createsprite gUnknown_0859551C, ANIM_TARGET, 2, 0, 0, 204 +FireBlastRing: + createsprite gFireBlastRingSpriteTemplate, ANIM_TARGET, 2, 0, 0, 0 + createsprite gFireBlastRingSpriteTemplate, ANIM_TARGET, 2, 0, 0, 51 + createsprite gFireBlastRingSpriteTemplate, ANIM_TARGET, 2, 0, 0, 102 + createsprite gFireBlastRingSpriteTemplate, ANIM_TARGET, 2, 0, 0, 153 + createsprite gFireBlastRingSpriteTemplate, ANIM_TARGET, 2, 0, 0, 204 delay 5 return -FireBlast2: - createsprite gUnknown_0859556C, ANIM_TARGET, 2, 0, 0, 10, 0, -2 - createsprite gUnknown_0859556C, ANIM_TARGET, 2, 0, 0, 13, -2, 0 - createsprite gUnknown_0859556C, ANIM_TARGET, 2, 0, 0, 13, 2, 0 - createsprite gUnknown_0859556C, ANIM_TARGET, 2, 0, 0, 15, -2, 2 - createsprite gUnknown_0859556C, ANIM_TARGET, 2, 0, 0, 15, 2, 2 +FireBlastCross: + createsprite gFireBlastCrossSpriteTemplate, ANIM_TARGET, 2, 0, 0, 10, 0, -2 + createsprite gFireBlastCrossSpriteTemplate, ANIM_TARGET, 2, 0, 0, 13, -2, 0 + createsprite gFireBlastCrossSpriteTemplate, ANIM_TARGET, 2, 0, 0, 13, 2, 0 + createsprite gFireBlastCrossSpriteTemplate, ANIM_TARGET, 2, 0, 0, 15, -2, 2 + createsprite gFireBlastCrossSpriteTemplate, ANIM_TARGET, 2, 0, 0, 15, 2, 2 return Move_LEECH_SEED: @@ -925,13 +925,13 @@ Move_EMBER: createsprite gEmberSpriteTemplate, ANIM_TARGET, 2, 20, 0, 16, 24, 20, 1 delay 16 playsewithpan SE_W172, SOUND_PAN_TARGET - call Ember1 - call Ember1 - call Ember1 + call EmberFireHit + call EmberFireHit + call EmberFireHit end -Ember1: - createsprite gEmberFlareSpriteTemplate, ANIM_TARGET, 2, -24, 24, 24, 24, 20, 1, 1 +EmberFireHit: + createsprite gEmberFlareSpriteTemplate, ANIM_TARGET, 2, -24, 24, 24, 24, 20, ANIM_TARGET, 1 delay 4 return @@ -944,12 +944,12 @@ Move_MEGA_PUNCH: setalpha 12, 8 playsewithpan SE_W025, SOUND_PAN_TARGET createsprite gMegaPunchKickSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 0, 50 - createvisualtask sub_8116620, 10, 4, 2, 0, 7, RGB_WHITE + createvisualtask AnimTask_BlendBattleAnimPal, 10, 4, 2, 0, 7, RGB_WHITE delay 50 call SetImpactBackground - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 1, 0 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, ANIM_TARGET, 0 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 4, 0, 22, 1 - createvisualtask sub_8116620, 10, 4, 2, 0, 0, RGB_WHITE + createvisualtask AnimTask_BlendBattleAnimPal, 10, 4, 2, 0, 0, RGB_WHITE createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 1, RGB_BLACK, 8, 0, 0 playsewithpan SE_W233B, SOUND_PAN_TARGET waitforvisualfinish @@ -987,13 +987,13 @@ Move_MEGA_KICK: setalpha 12, 8 playsewithpan SE_W025, SOUND_PAN_TARGET createsprite gMegaPunchKickSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 1, 50 - createvisualtask sub_8116620, 10, 4, 2, 0, 7, RGB_WHITE + createvisualtask AnimTask_BlendBattleAnimPal, 10, 4, 2, 0, 7, RGB_WHITE delay 50 playsewithpan SE_W025B, SOUND_PAN_TARGET call SetImpactBackground - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 1, 0 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, ANIM_TARGET, 0 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 4, 0, 22, 1 - createvisualtask sub_8116620, 10, 4, 2, 0, 0, RGB_WHITE + createvisualtask AnimTask_BlendBattleAnimPal, 10, 4, 2, 0, 0, RGB_WHITE createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 1, RGB_BLACK, 8, 0, 0 waitforvisualfinish clearmonbg ANIM_TARGET @@ -1017,11 +1017,11 @@ CometPunchContinue: blendoff end CometPunchLeft: - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, -8, -8, 1, 2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, -8, -8, ANIM_TARGET, 2 createsprite gFistFootSpriteTemplate, ANIM_ATTACKER, 3, -8, 0, 8, 1, 0 goto CometPunchContinue CometPunchRight: - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 8, -8, 1, 2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 8, -8, ANIM_TARGET, 2 createsprite gFistFootSpriteTemplate, ANIM_ATTACKER, 3, 8, 0, 8, 1, 0 goto CometPunchContinue @@ -1031,43 +1031,43 @@ Move_SONIC_BOOM: monbg ANIM_DEF_PARTNER monbgprio_28 ANIM_TARGET setalpha 12, 8 - call SonicBoom1 - call SonicBoom1 - call SonicBoom1 + call SonicBoomProjectile + call SonicBoomProjectile + call SonicBoomProjectile createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 3, 0, 10, 1 - call SonicBoom2 + call SonicBoomHit waitforvisualfinish clearmonbg ANIM_DEF_PARTNER blendoff end -SonicBoom1: +SonicBoomProjectile: playsewithpan SE_W013B, SOUND_PAN_ATTACKER createsprite gSonicBoomSpriteTemplate, ANIM_TARGET, 2, 16, 0, 0, 0, 15 delay 4 return -SonicBoom2: - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0, 0, 1, 2 +SonicBoomHit: + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0, 0, ANIM_TARGET, 2 delay 4 return Move_THUNDER_SHOCK: loadspritegfx ANIM_TAG_SPARK loadspritegfx ANIM_TAG_SPARK_2 - createvisualtask sub_8116620, 10, 1, 0, 0, 6, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, 1, 0, 0, 6, RGB_BLACK waitforvisualfinish delay 10 - createvisualtask sub_810A7DC, 5, 0, -44, 0 + createvisualtask AnimTask_ElectricBolt, 5, 0, -44, 0 playsewithpan SE_W085, SOUND_PAN_TARGET delay 9 - createvisualtask sub_8116620, 10, 4, 0, 0, 13, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, 4, 0, 0, 13, RGB_BLACK waitforvisualfinish - createvisualtask sub_8116620, 10, 4, 0, 13, 0, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, 4, 0, 13, 0, RGB_BLACK waitforvisualfinish delay 20 call ElectricityEffect waitforvisualfinish delay 20 - createvisualtask sub_8116620, 10, 1, 0, 6, 0, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, 1, 0, 6, 0, RGB_BLACK waitforvisualfinish end @@ -1075,48 +1075,48 @@ Move_THUNDERBOLT: loadspritegfx ANIM_TAG_SPARK loadspritegfx ANIM_TAG_SHOCK_3 loadspritegfx ANIM_TAG_SPARK_2 - createvisualtask sub_8116620, 10, 1, 0, 0, 6, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, 1, 0, 0, 6, RGB_BLACK waitforvisualfinish delay 10 - createvisualtask sub_810A7DC, 5, 24, -52, 0 + createvisualtask AnimTask_ElectricBolt, 5, 24, -52, 0 playsewithpan SE_W085, SOUND_PAN_TARGET delay 7 - createvisualtask sub_810A7DC, 5, -24, -52, 0 + createvisualtask AnimTask_ElectricBolt, 5, -24, -52, 0 playsewithpan SE_W085, SOUND_PAN_TARGET delay 7 - createvisualtask sub_810A7DC, 5, 0, -60, 1 + createvisualtask AnimTask_ElectricBolt, 5, 0, -60, 1 playsewithpan SE_W085, SOUND_PAN_TARGET delay 9 - createvisualtask sub_8116620, 10, 4, 0, 0, 13, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, 4, 0, 0, 13, RGB_BLACK waitforvisualfinish - createvisualtask sub_8116620, 10, 4, 0, 13, 0, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, 4, 0, 13, 0, RGB_BLACK waitforvisualfinish delay 20 - createsprite gBattleAnimSpriteTemplate_85957E0, ANIM_TARGET, 3, 44, 0, 0, 3 - createsprite gBattleAnimSpriteTemplate_85957F8, ANIM_TARGET, 4, 0, 0, 32, 44, 0, 40, 0, -32765 - createsprite gBattleAnimSpriteTemplate_85957F8, ANIM_TARGET, 4, 0, 0, 32, 44, 64, 40, 1, -32765 - createsprite gBattleAnimSpriteTemplate_85957F8, ANIM_TARGET, 4, 0, 0, 32, 44, 128, 40, 0, -32765 - createsprite gBattleAnimSpriteTemplate_85957F8, ANIM_TARGET, 4, 0, 0, 32, 44, 192, 40, 2, -32765 - createsprite gBattleAnimSpriteTemplate_85957F8, ANIM_TARGET, 4, 0, 0, 16, 44, 32, 40, 0, -32765 - createsprite gBattleAnimSpriteTemplate_85957F8, ANIM_TARGET, 4, 0, 0, 16, 44, 96, 40, 1, -32765 - createsprite gBattleAnimSpriteTemplate_85957F8, ANIM_TARGET, 4, 0, 0, 16, 44, 160, 40, 0, -32765 - createsprite gBattleAnimSpriteTemplate_85957F8, ANIM_TARGET, 4, 0, 0, 16, 44, 224, 40, 2, -32765 + createsprite gThunderboltOrbSpriteTemplate, ANIM_TARGET, 3, 44, 0, 0, 3 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0, 0, 32, 44, 0, 40, 0, -32765 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0, 0, 32, 44, 64, 40, 1, -32765 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0, 0, 32, 44, 128, 40, 0, -32765 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0, 0, 32, 44, 192, 40, 2, -32765 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0, 0, 16, 44, 32, 40, 0, -32765 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0, 0, 16, 44, 96, 40, 1, -32765 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0, 0, 16, 44, 160, 40, 0, -32765 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_TARGET, 4, 0, 0, 16, 44, 224, 40, 2, -32765 playsewithpan SE_W063, SOUND_PAN_TARGET delay 0 - createvisualtask sub_8116620, 10, 1, 0, 2, 2, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, 1, 0, 2, 2, RGB_BLACK delay 6 - createvisualtask sub_8116620, 10, 1, 0, 6, 6, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, 1, 0, 6, 6, RGB_BLACK delay 6 - createvisualtask sub_8116620, 10, 1, 0, 2, 2, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, 1, 0, 2, 2, RGB_BLACK delay 6 - createvisualtask sub_8116620, 10, 1, 0, 6, 6, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, 1, 0, 6, 6, RGB_BLACK waitforvisualfinish delay 20 waitplaysewithpan SE_W085B, SOUND_PAN_TARGET, 19 call ElectricityEffect waitforvisualfinish delay 20 - createvisualtask sub_8116620, 10, 1, 0, 6, 0, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, 1, 0, 6, 0, RGB_BLACK waitforvisualfinish end @@ -1124,20 +1124,20 @@ Move_THUNDER_WAVE: loadspritegfx ANIM_TAG_SPARK loadspritegfx ANIM_TAG_SPARK_2 loadspritegfx ANIM_TAG_SPARK_H - createvisualtask sub_8116620, 10, 1, 0, 0, 6, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, 1, 0, 0, 6, RGB_BLACK waitforvisualfinish delay 10 - createvisualtask sub_810A7DC, 5, 0, -48, 0 + createvisualtask AnimTask_ElectricBolt, 5, 0, -48, 0 playsewithpan SE_W086, SOUND_PAN_TARGET delay 20 loopsewithpan SE_W085B, SOUND_PAN_TARGET, 10, 4 - createsprite gUnknown_08595840, ANIM_TARGET, 2, -16, -16 + createsprite gThunderWaveSpriteTemplate, ANIM_TARGET, 2, -16, -16 delay 4 - createsprite gUnknown_08595840, ANIM_TARGET, 2, -16, 0 + createsprite gThunderWaveSpriteTemplate, ANIM_TARGET, 2, -16, 0 delay 4 - createsprite gUnknown_08595840, ANIM_TARGET, 2, -16, 16 + createsprite gThunderWaveSpriteTemplate, ANIM_TARGET, 2, -16, 16 waitforvisualfinish - createvisualtask sub_8116620, 10, 1, 0, 6, 0, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, 1, 0, 6, 0, RGB_BLACK waitforvisualfinish end @@ -1153,23 +1153,23 @@ BeatUpContinue: blendoff end BeatUpLeft: - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, -20, -20, 1, 2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, -20, -20, ANIM_TARGET, 2 createsprite gFistFootSpriteTemplate, ANIM_TARGET, 3, -20, -12, 8, 1, 0 createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 3, 0, 6, 1 playsewithpan SE_W233B, SOUND_PAN_TARGET delay 8 - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, 8, 0, 1, 2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, 8, 0, ANIM_TARGET, 2 createsprite gFistFootSpriteTemplate, ANIM_TARGET, 3, 8, 8, 8, 1, 0 createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 3, 0, 6, 1 playsewithpan SE_W233B, SOUND_PAN_TARGET goto BeatUpContinue BeatUpRight: - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, 12, -20, 1, 2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, 12, -20, ANIM_TARGET, 2 createsprite gFistFootSpriteTemplate, ANIM_TARGET, 3, 12, -12, 8, 1, 0 createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 3, 0, 6, 1 playsewithpan SE_W233B, SOUND_PAN_TARGET delay 8 - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, -12, 0, 1, 2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, -12, 0, ANIM_TARGET, 2 createsprite gFistFootSpriteTemplate, ANIM_TARGET, 3, -12, 8, 8, 1, 0 createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 3, 0, 6, 1 playsewithpan SE_W233B, SOUND_PAN_TARGET @@ -1181,9 +1181,9 @@ Move_STOMP: monbg ANIM_TARGET setalpha 12, 8 playsewithpan SE_W104, SOUND_PAN_TARGET - createsprite gUnknown_08595F60, ANIM_ATTACKER, 3, 0, -32, 15 + createsprite gStompFootSpriteTemplate, ANIM_ATTACKER, 3, 0, -32, 15 delay 19 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, -8, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, -8, ANIM_TARGET, 1 createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 0, 4, 9, 1 playsewithpan SE_W025B, SOUND_PAN_TARGET waitforvisualfinish @@ -1228,7 +1228,7 @@ Move_HIDDEN_POWER: createsprite gHiddenPowerOrbSpriteTemplate, ANIM_ATTACKER, 2, 26, 168 createsprite gHiddenPowerOrbSpriteTemplate, ANIM_ATTACKER, 2, 26, 210 delay 52 - setarg 7, -1 + setarg 7, 0xFFFF playsewithpan SE_W115, SOUND_PAN_ATTACKER createvisualtask AnimTask_ScaleMonAndRestore, 5, -7, -7, 11, ANIM_ATTACKER, 0 createsprite gHiddenPowerOrbScatterSpriteTemplate, ANIM_TARGET, 2, 0 @@ -1249,7 +1249,7 @@ Move_REVERSAL: createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 3, RGB_WHITE, 8, 0, 0 waitforvisualfinish delay 30 - createvisualtask sub_8115A04, 2, 31, 3, 2, 0, 10, RGB_WHITE + createvisualtask AnimTask_BlendColorCycle, 2, 31, 3, 2, 0, 10, RGB_WHITE delay 10 playsewithpan SE_W179, SOUND_PAN_ATTACKER createsprite gReversalOrbSpriteTemplate, ANIM_ATTACKER, 2, 26, 0 @@ -1265,8 +1265,8 @@ Move_REVERSAL: playsewithpan SE_W233B, SOUND_PAN_TARGET createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 1, RGB_WHITE, 8, 0, 0 createsprite gFistFootSpriteTemplate, ANIM_TARGET, 4, 0, 0, 10, 1, 0 - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0, 0, 1, 1 - createvisualtask sub_80D6388, 5, 0, 1, 8, 1, 0 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0, 0, ANIM_TARGET, 1 + createvisualtask AnimTask_ShakeTargetBasedOnMovePowerOrDmg, 5, FALSE, 1, 8, 1, 0 end Move_PURSUIT: @@ -1287,13 +1287,13 @@ PursuitContinue: end PursuitNormal: playsewithpan SE_W004, SOUND_PAN_TARGET - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 1, 2 - createvisualtask sub_80D6388, 5, 0, 1, 6, 1, 0 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, ANIM_TARGET, 2 + createvisualtask AnimTask_ShakeTargetBasedOnMovePowerOrDmg, 5, FALSE, 1, 6, 1, 0 goto PursuitContinue PursuitOnSwitchout: playsewithpan SE_W004, SOUND_PAN_TARGET - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 1, 1 - createvisualtask sub_80D6388, 5, 0, 1, 6, 1, 0 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, ANIM_TARGET, 1 + createvisualtask AnimTask_ShakeTargetBasedOnMovePowerOrDmg, 5, FALSE, 1, 6, 1, 0 goto PursuitContinue Move_SPIKE_CANNON: @@ -1310,9 +1310,9 @@ Move_SPIKE_CANNON: createsprite gLinearStingerSpriteTemplate, ANIM_ATTACKER, 2, 18, 0, 0, 0, 20 createsprite gLinearStingerSpriteTemplate, ANIM_ATTACKER, 2, 26, 8, 8, 8, 20 waitforvisualfinish - createsprite gBattleAnimSpriteTemplate_8597370, ANIM_ATTACKER, 3, -8, -8, 1, 2 - createsprite gBattleAnimSpriteTemplate_8597370, ANIM_ATTACKER, 3, 0, 0, 1, 2 - createsprite gBattleAnimSpriteTemplate_8597370, ANIM_ATTACKER, 3, 8, 8, 1, 2 + createsprite gHandleInvertHitSplatSpriteTemplate, ANIM_ATTACKER, 3, -8, -8, 1, 2 + createsprite gHandleInvertHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 1, 2 + createsprite gHandleInvertHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 8, 8, 1, 2 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 3, 0, 7, 1 loopsewithpan SE_W030, SOUND_PAN_TARGET, 5, 3 waitforvisualfinish @@ -1328,7 +1328,7 @@ Move_SWORDS_DANCE: createvisualtask AnimTask_TranslateMonEllipticalRespectSide, 2, ANIM_ATTACKER, 16, 6, 1, 4 createsprite gSwordsDanceBladeSpriteTemplate, ANIM_ATTACKER, 2, 0, 0 delay 22 - createvisualtask sub_8115D94, 2, ANIM_TAG_SWORD, 2, 2, RGB(18, 31, 31), 16, 0, 0 + createvisualtask AnimTask_FlashAnimTagWithColor, 2, ANIM_TAG_SWORD, 2, 2, RGB(18, 31, 31), 16, 0, 0 waitforvisualfinish clearmonbg ANIM_ATTACKER blendoff @@ -1338,16 +1338,16 @@ Move_SWORDS_DANCE: Move_PSYCH_UP: loadspritegfx ANIM_TAG_SPIRAL monbg ANIM_ATK_PARTNER - createvisualtask sub_8115B0C, 2, 1, 2, 6, 1, 11, 0 + createvisualtask AnimTask_BlendColorCycleExclude, 2, 1, 2, 6, 1, 11, RGB_BLACK setalpha 12, 8 loopsewithpan SE_W060B, SOUND_PAN_ATTACKER, 5, 10 - createsprite gUnknown_08596548, ANIM_ATTACKER, 2, 0, 0, 0, 0 + createsprite gPsychUpSpiralSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 0, 0 createvisualtask AnimTask_SwayMon, 5, 0, 5, 2560, 8, ANIM_ATTACKER delay 127 delay 4 playsewithpan SE_W060, SOUND_PAN_ATTACKER createvisualtask AnimTask_ScaleMonAndRestore, 5, -5, -5, 10, ANIM_ATTACKER, 1 - createvisualtask sub_8116620, 9, 2, 2, 10, 0, RGB_YELLOW + createvisualtask AnimTask_BlendBattleAnimPal, 9, 2, 2, 10, 0, RGB_YELLOW delay 30 clearmonbg ANIM_ATK_PARTNER blendoff @@ -1360,32 +1360,32 @@ Move_DIZZY_PUNCH: loadspritegfx ANIM_TAG_IMPACT monbg ANIM_TARGET setalpha 12, 8 - call DizzyPunch1 + call DizzyPunchLunge createsprite gFistFootSpriteTemplate, ANIM_TARGET, 5, 16, 8, 20, 1, 0 - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 4, 16, 0, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 4, 16, 0, ANIM_TARGET, 1 playsewithpan SE_W004, SOUND_PAN_TARGET - createsprite gUnknown_08595F78, ANIM_TARGET, 3, 16, 8, 160, -32 - createsprite gUnknown_08595F78, ANIM_TARGET, 3, 16, 8, -256, -40 - createsprite gUnknown_08595F78, ANIM_TARGET, 3, 16, 8, 128, -16 - createsprite gUnknown_08595F78, ANIM_TARGET, 3, 16, 8, 416, -38 - createsprite gUnknown_08595F78, ANIM_TARGET, 3, 16, 8, -128, -22 - createsprite gUnknown_08595F78, ANIM_TARGET, 3, 16, 8, -384, -31 + createsprite gDizzyPunchDuckSpriteTemplate, ANIM_TARGET, 3, 16, 8, 160, -32 + createsprite gDizzyPunchDuckSpriteTemplate, ANIM_TARGET, 3, 16, 8, -256, -40 + createsprite gDizzyPunchDuckSpriteTemplate, ANIM_TARGET, 3, 16, 8, 128, -16 + createsprite gDizzyPunchDuckSpriteTemplate, ANIM_TARGET, 3, 16, 8, 416, -38 + createsprite gDizzyPunchDuckSpriteTemplate, ANIM_TARGET, 3, 16, 8, -128, -22 + createsprite gDizzyPunchDuckSpriteTemplate, ANIM_TARGET, 3, 16, 8, -384, -31 delay 10 - call DizzyPunch1 + call DizzyPunchLunge createsprite gFistFootSpriteTemplate, ANIM_TARGET, 5, -16, -8, 20, 1, 0 - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 4, -16, -16, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 4, -16, -16, ANIM_TARGET, 1 playsewithpan SE_W233B, SOUND_PAN_TARGET - createsprite gUnknown_08595F78, ANIM_TARGET, 3, -16, -8, 160, -32 - createsprite gUnknown_08595F78, ANIM_TARGET, 3, -16, -8, -256, -40 - createsprite gUnknown_08595F78, ANIM_TARGET, 3, -16, -8, 128, -16 - createsprite gUnknown_08595F78, ANIM_TARGET, 3, -16, -8, 416, -38 - createsprite gUnknown_08595F78, ANIM_TARGET, 3, -16, -8, -128, -22 - createsprite gUnknown_08595F78, ANIM_TARGET, 3, -16, -8, -384, -31 + createsprite gDizzyPunchDuckSpriteTemplate, ANIM_TARGET, 3, -16, -8, 160, -32 + createsprite gDizzyPunchDuckSpriteTemplate, ANIM_TARGET, 3, -16, -8, -256, -40 + createsprite gDizzyPunchDuckSpriteTemplate, ANIM_TARGET, 3, -16, -8, 128, -16 + createsprite gDizzyPunchDuckSpriteTemplate, ANIM_TARGET, 3, -16, -8, 416, -38 + createsprite gDizzyPunchDuckSpriteTemplate, ANIM_TARGET, 3, -16, -8, -128, -22 + createsprite gDizzyPunchDuckSpriteTemplate, ANIM_TARGET, 3, -16, -8, -384, -31 waitforvisualfinish clearmonbg ANIM_TARGET blendoff end -DizzyPunch1: +DizzyPunchLunge: createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 6, 4 delay 6 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 3, 0, 7, 1 @@ -1402,17 +1402,17 @@ Move_FIRE_SPIN: end FireSpinEffect: - createsprite gUnknown_08596B88, ANIM_TARGET, 2, 0, 28, 528, 30, 13, 50, 1 + createsprite gFireSpinSpriteTemplate, ANIM_TARGET, 2, 0, 28, 528, 30, 13, 50, ANIM_TARGET delay 2 - createsprite gUnknown_08596B88, ANIM_TARGET, 2, 0, 32, 480, 20, 16, -46, 1 + createsprite gFireSpinSpriteTemplate, ANIM_TARGET, 2, 0, 32, 480, 20, 16, -46, ANIM_TARGET delay 2 - createsprite gUnknown_08596B88, ANIM_TARGET, 2, 0, 33, 576, 20, 8, 42, 1 + createsprite gFireSpinSpriteTemplate, ANIM_TARGET, 2, 0, 33, 576, 20, 8, 42, ANIM_TARGET delay 2 - createsprite gUnknown_08596B88, ANIM_TARGET, 2, 0, 31, 400, 25, 11, -42, 1 + createsprite gFireSpinSpriteTemplate, ANIM_TARGET, 2, 0, 31, 400, 25, 11, -42, ANIM_TARGET delay 2 - createsprite gUnknown_08596B88, ANIM_TARGET, 2, 0, 28, 512, 25, 16, 46, 1 + createsprite gFireSpinSpriteTemplate, ANIM_TARGET, 2, 0, 28, 512, 25, 16, 46, ANIM_TARGET delay 2 - createsprite gUnknown_08596B88, ANIM_TARGET, 2, 0, 33, 464, 30, 15, -50, 1 + createsprite gFireSpinSpriteTemplate, ANIM_TARGET, 2, 0, 33, 464, 30, 15, -50, ANIM_TARGET delay 2 return @@ -1456,18 +1456,18 @@ FuryCutterStrongest: Move_SELF_DESTRUCT: loadspritegfx ANIM_TAG_EXPLOSION - createvisualtask sub_8116620, 10, 2, 1, 0, 9, RGB_RED + createvisualtask AnimTask_BlendBattleAnimPal, 10, 2, 1, 0, 9, RGB_RED createvisualtask AnimTask_ShakeMon2, 5, 4, 6, 0, 38, 1 createvisualtask AnimTask_ShakeMon2, 5, 5, 6, 0, 38, 1 createvisualtask AnimTask_ShakeMon2, 5, 6, 6, 0, 38, 1 createvisualtask AnimTask_ShakeMon2, 5, 7, 6, 0, 38, 1 createvisualtask AnimTask_ShakeMon2, 5, 8, 6, 0, 38, 1 - call SelfDestruct1 - call SelfDestruct1 + call SelfDestructExplode + call SelfDestructExplode waitforvisualfinish - createvisualtask sub_8116620, 10, 2, 1, 9, 0, RGB_RED + createvisualtask AnimTask_BlendBattleAnimPal, 10, 2, 1, 9, 0, RGB_RED end -SelfDestruct1: +SelfDestructExplode: playsewithpan SE_W120, SOUND_PAN_ATTACKER createsprite gExplosionSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 0, 1 delay 6 @@ -1496,7 +1496,7 @@ Move_SLAM: createsprite gSlamHitSpriteTemplate, ANIM_ATTACKER, 2, 0, 0 delay 3 playsewithpan SE_W025B, SOUND_PAN_TARGET - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, ANIM_TARGET, 1 createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, 1, -12, 10, 0, 3 createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 5 delay 3 @@ -1530,7 +1530,7 @@ Move_DRILL_PECK: createsprite gBowMonSpriteTemplate, ANIM_ATTACKER, 2, 1 delay 2 loopsewithpan SE_W030, SOUND_PAN_TARGET, 4, 8 - createvisualtask sub_810EB88, 5 + createvisualtask AnimTask_DrillPeckHitSplats, 5 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 4, 0, 18, 1 waitforvisualfinish createsprite gBowMonSpriteTemplate, ANIM_ATTACKER, 2, 2 @@ -1548,76 +1548,76 @@ Move_WATERFALL: createvisualtask AnimTask_ShakeMon, 5, ANIM_ATTACKER, 0, 2, 23, 1 delay 5 playsewithpan SE_W152, SOUND_PAN_ATTACKER - createsprite gUnknown_08595238, ANIM_ATTACKER, 2, 10, 10, 25, 0 + createsprite gSmallBubblePairSpriteTemplate, ANIM_ATTACKER, 2, 10, 10, 25, ANIM_ATTACKER delay 4 playsewithpan SE_W152, SOUND_PAN_ATTACKER - createsprite gUnknown_08595238, ANIM_ATTACKER, 2, -15, 0, 25, 0 + createsprite gSmallBubblePairSpriteTemplate, ANIM_ATTACKER, 2, -15, 0, 25, ANIM_ATTACKER delay 4 playsewithpan SE_W152, SOUND_PAN_ATTACKER - createsprite gUnknown_08595238, ANIM_ATTACKER, 2, 20, 10, 25, 0 + createsprite gSmallBubblePairSpriteTemplate, ANIM_ATTACKER, 2, 20, 10, 25, ANIM_ATTACKER delay 4 playsewithpan SE_W152, SOUND_PAN_ATTACKER - createsprite gUnknown_08595238, ANIM_ATTACKER, 2, 0, -10, 25, 0 + createsprite gSmallBubblePairSpriteTemplate, ANIM_ATTACKER, 2, 0, -10, 25, ANIM_ATTACKER delay 4 playsewithpan SE_W152, SOUND_PAN_ATTACKER - createsprite gUnknown_08595238, ANIM_ATTACKER, 2, -10, 15, 25, 0 + createsprite gSmallBubblePairSpriteTemplate, ANIM_ATTACKER, 2, -10, 15, 25, ANIM_ATTACKER delay 4 playsewithpan SE_W152, SOUND_PAN_ATTACKER - createsprite gUnknown_08595238, ANIM_ATTACKER, 2, 25, 20, 25, 0 + createsprite gSmallBubblePairSpriteTemplate, ANIM_ATTACKER, 2, 25, 20, 25, ANIM_ATTACKER delay 4 playsewithpan SE_W152, SOUND_PAN_ATTACKER - createsprite gUnknown_08595238, ANIM_ATTACKER, 2, -20, 20, 25, 0 + createsprite gSmallBubblePairSpriteTemplate, ANIM_ATTACKER, 2, -20, 20, 25, ANIM_ATTACKER delay 4 playsewithpan SE_W152, SOUND_PAN_ATTACKER - createsprite gUnknown_08595238, ANIM_ATTACKER, 2, 12, 0, 25, 0 + createsprite gSmallBubblePairSpriteTemplate, ANIM_ATTACKER, 2, 12, 0, 25, ANIM_ATTACKER waitforvisualfinish delay 10 createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 6, 5 delay 6 - call UnderWaterAttack1 + call RisingWaterHitEffect waitforvisualfinish clearmonbg ANIM_DEF_PARTNER blendoff end -UnderWaterAttack1: +RisingWaterHitEffect: playsewithpan SE_W127, SOUND_PAN_TARGET createvisualtask AnimTask_ShakeMon2, 5, ANIM_TARGET, 4, 0, 17, 1 - createsprite gUnknown_08597388, ANIM_ATTACKER, 3, 0, 20, 1, 1 - createsprite gUnknown_08595250, ANIM_ATTACKER, 4, 0, 20 - createsprite gUnknown_08595250, ANIM_ATTACKER, 4, 0, 20 + createsprite gWaterHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 20, ANIM_TARGET, 1 + createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0, 20 + createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0, 20 delay 2 - createsprite gUnknown_08597388, ANIM_ATTACKER, 3, 0, 15, 1, 1 - createsprite gUnknown_08595250, ANIM_ATTACKER, 4, 0, 15 - createsprite gUnknown_08595250, ANIM_ATTACKER, 4, 0, 15 + createsprite gWaterHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 15, ANIM_TARGET, 1 + createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0, 15 + createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0, 15 delay 2 - createsprite gUnknown_08597388, ANIM_ATTACKER, 3, 0, 10, 1, 1 - createsprite gUnknown_08595250, ANIM_ATTACKER, 4, 0, 10 - createsprite gUnknown_08595250, ANIM_ATTACKER, 4, 0, 10 + createsprite gWaterHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 10, ANIM_TARGET, 1 + createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0, 10 + createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0, 10 delay 2 - createsprite gUnknown_08597388, ANIM_ATTACKER, 3, 0, 5, 1, 1 - createsprite gUnknown_08595250, ANIM_ATTACKER, 4, 0, 5 - createsprite gUnknown_08595250, ANIM_ATTACKER, 4, 0, 5 + createsprite gWaterHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 5, ANIM_TARGET, 1 + createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0, 5 + createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0, 5 delay 2 - createsprite gUnknown_08597388, ANIM_ATTACKER, 3, 0, 0, 1, 1 - createsprite gUnknown_08595250, ANIM_ATTACKER, 4, 0, 0 - createsprite gUnknown_08595250, ANIM_ATTACKER, 4, 0, 0 + createsprite gWaterHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, ANIM_TARGET, 1 + createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0, 0 + createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0, 0 delay 2 - createsprite gUnknown_08597388, ANIM_ATTACKER, 3, 0, -5, 1, 1 - createsprite gUnknown_08595250, ANIM_ATTACKER, 4, 0, -5 - createsprite gUnknown_08595250, ANIM_ATTACKER, 4, 0, -5 + createsprite gWaterHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, -5, ANIM_TARGET, 1 + createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0, -5 + createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0, -5 delay 2 - createsprite gUnknown_08597388, ANIM_ATTACKER, 3, 0, -10, 1, 1 - createsprite gUnknown_08595250, ANIM_ATTACKER, 4, 0, -10 - createsprite gUnknown_08595250, ANIM_ATTACKER, 4, 0, -10 + createsprite gWaterHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, -10, ANIM_TARGET, 1 + createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0, -10 + createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0, -10 delay 2 - createsprite gUnknown_08597388, ANIM_ATTACKER, 3, 0, -15, 1, 1 - createsprite gUnknown_08595250, ANIM_ATTACKER, 4, 0, -15 - createsprite gUnknown_08595250, ANIM_ATTACKER, 4, 0, -15 + createsprite gWaterHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, -15, ANIM_TARGET, 1 + createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0, -15 + createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0, -15 delay 2 - createsprite gUnknown_08597388, ANIM_ATTACKER, 3, 0, -20, 1, 1 - createsprite gUnknown_08595250, ANIM_ATTACKER, 4, 0, -20 - createsprite gUnknown_08595250, ANIM_ATTACKER, 4, 0, -20 + createsprite gWaterHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, -20, ANIM_TARGET, 1 + createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0, -20 + createsprite gSmallDriftingBubblesSpriteTemplate, ANIM_ATTACKER, 4, 0, -20 return Move_EXPLOSION: @@ -1631,9 +1631,9 @@ Move_EXPLOSION: call Explosion1 call Explosion1 waitforvisualfinish - createvisualtask sub_8116620, 10, 1, 1, 16, 16, RGB_WHITE + createvisualtask AnimTask_BlendBattleAnimPal, 10, 1, 1, 16, 16, RGB_WHITE delay 50 - createvisualtask sub_8116620, 10, 1, 3, 16, 0, RGB_WHITE + createvisualtask AnimTask_BlendBattleAnimPal, 10, 1, 3, 16, 0, RGB_WHITE end Explosion1: playsewithpan SE_W153, SOUND_PAN_ATTACKER @@ -1670,7 +1670,7 @@ Move_PROTECT: monbg ANIM_ATK_PARTNER monbgprio_28 ANIM_ATTACKER waitplaysewithpan SE_W115, SOUND_PAN_ATTACKER, 16 - createsprite gUnknown_08592ADC, ANIM_ATTACKER, 2, 24, 0, 90 + createsprite gProtectSpriteTemplate, ANIM_ATTACKER, 2, 24, 0, 90 waitforvisualfinish clearmonbg ANIM_ATK_PARTNER end @@ -1679,14 +1679,14 @@ Move_DETECT: loadspritegfx ANIM_TAG_SPARKLE_4 createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 2, 0, 9, RGB_BLACK waitforvisualfinish - createvisualtask sub_8116620, 10, 2, 1, 0, 9, RGB_WHITE + createvisualtask AnimTask_BlendBattleAnimPal, 10, 2, 1, 0, 9, RGB_WHITE delay 18 playsewithpan SE_W197, SOUND_PAN_ATTACKER - createsprite gUnknown_0853EE84, ANIM_ATTACKER, 13, 20, -20 + createsprite gSpinningSparkleSpriteTemplate, ANIM_ATTACKER, 13, 20, -20 waitforvisualfinish delay 10 createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 2, 9, 0, RGB_BLACK - createvisualtask sub_8116620, 10, 2, 2, 9, 0, RGB_WHITE + createvisualtask AnimTask_BlendBattleAnimPal, 10, 2, 2, 9, 0, RGB_WHITE waitforvisualfinish end @@ -1708,7 +1708,7 @@ Frustration_Continue: Frustration_Strongest: playsewithpan SE_W082, SOUND_PAN_ATTACKER createvisualtask AnimTask_ShakeMon2, 5, ANIM_ATTACKER, 1, 0, 15, 1 - createvisualtask sub_8116620, 10, 2, 3, 0, 9, 31 + createvisualtask AnimTask_BlendBattleAnimPal, 10, 2, 3, 0, 9, 31 waitforvisualfinish delay 20 playsewithpan SE_W207B, SOUND_PAN_ATTACKER @@ -1721,30 +1721,30 @@ Frustration_Strongest: createvisualtask AnimTask_SwayMon, 5, 0, 16, 6144, 8, ANIM_ATTACKER delay 5 createvisualtask AnimTask_ShakeMon2, 5, ANIM_TARGET, 4, 0, 30, 1 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 1, 0 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, ANIM_TARGET, 0 playsewithpan SE_W004, SOUND_PAN_TARGET delay 5 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 24, 8, 1, 0 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 24, 8, ANIM_TARGET, 0 playsewithpan SE_W004, SOUND_PAN_TARGET delay 5 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, -24, -16, 1, 0 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, -24, -16, ANIM_TARGET, 0 playsewithpan SE_W004, SOUND_PAN_TARGET delay 5 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 8, 4, 1, 0 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 8, 4, ANIM_TARGET, 0 playsewithpan SE_W004, SOUND_PAN_TARGET delay 5 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, -16, 19, 1, 0 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, -16, 19, ANIM_TARGET, 0 playsewithpan SE_W004, SOUND_PAN_TARGET delay 5 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 18, -18, 1, 0 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 18, -18, ANIM_TARGET, 0 playsewithpan SE_W004, SOUND_PAN_TARGET waitforvisualfinish - createvisualtask sub_8116620, 10, 2, 3, 9, 0, 31 + createvisualtask AnimTask_BlendBattleAnimPal, 10, 2, 3, 9, 0, 31 goto Frustration_Continue Frustration_Strong: playsewithpan SE_W082, SOUND_PAN_ATTACKER createvisualtask AnimTask_ShakeMon2, 5, ANIM_ATTACKER, 1, 0, 15, 1 - createvisualtask sub_8116620, 10, 2, 3, 0, 9, 31 + createvisualtask AnimTask_BlendBattleAnimPal, 10, 2, 3, 0, 9, 31 waitforvisualfinish delay 20 playsewithpan SE_W207B, SOUND_PAN_ATTACKER @@ -1754,18 +1754,18 @@ Frustration_Strong: createvisualtask AnimTask_StrongFrustrationGrowAndShrink, 5 delay 7 playsewithpan SE_W004, SOUND_PAN_TARGET - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 8, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 8, ANIM_TARGET, 1 createvisualtask AnimTask_ShakeMon2, 5, ANIM_TARGET, 4, 0, 6, 1 delay 14 playsewithpan SE_W004, SOUND_PAN_TARGET - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 12, -6, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 12, -6, ANIM_TARGET, 1 createvisualtask AnimTask_ShakeMon2, 5, ANIM_TARGET, 4, 0, 6, 1 delay 14 playsewithpan SE_W004, SOUND_PAN_TARGET - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, -12, -6, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, -12, -6, ANIM_TARGET, 1 createvisualtask AnimTask_ShakeMon2, 5, ANIM_TARGET, 4, 0, 6, 1 waitforvisualfinish - createvisualtask sub_8116620, 10, 2, 3, 9, 0, 31 + createvisualtask AnimTask_BlendBattleAnimPal, 10, 2, 3, 9, 0, 31 goto Frustration_Continue Frustration_Medium: playsewithpan SE_W207B, SOUND_PAN_ATTACKER @@ -1775,13 +1775,13 @@ Frustration_Medium: createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 4, 4 delay 6 playsewithpan SE_W004, SOUND_PAN_TARGET - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 10, 4, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 10, 4, ANIM_TARGET, 1 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 3, 0, 6, 1 waitforvisualfinish createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 4, 4 delay 6 playsewithpan SE_W004, SOUND_PAN_TARGET - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, -10, -4, 1, 2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, -10, -4, ANIM_TARGET, 2 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 3, 0, 6, 1 goto Frustration_Continue Frustration_Weak: @@ -1791,7 +1791,7 @@ Frustration_Weak: createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 10, 2 delay 12 playsewithpan SE_W004, SOUND_PAN_TARGET - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 1, 2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, ANIM_TARGET, 2 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 1, 0, 6, 1 goto Frustration_Continue @@ -1807,7 +1807,7 @@ Move_SAFEGUARD: createsprite gGuardRingSpriteTemplate, ANIM_ATTACKER, 2 waitforvisualfinish playsewithpan SE_REAPOKE, SOUND_PAN_ATTACKER - createvisualtask sub_8115A04, 2, 10, 0, 2, 0, 10, RGB_WHITE + createvisualtask AnimTask_BlendColorCycle, 2, 10, 0, 2, 0, 10, RGB_WHITE waitforvisualfinish clearmonbg ANIM_ATK_PARTNER blendoff @@ -1846,7 +1846,7 @@ Move_VICE_GRIP: createsprite gViceGripSpriteTemplate, ANIM_ATTACKER, 2, 0 createsprite gViceGripSpriteTemplate, ANIM_ATTACKER, 2, 1 delay 9 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 1, 0, 0, 1, 2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 1, 0, 0, ANIM_TARGET, 2 createvisualtask AnimTask_ShakeMon2, 5, ANIM_TARGET, 2, 0, 5, 1 waitforvisualfinish clearmonbg ANIM_DEF_PARTNER @@ -1863,12 +1863,12 @@ Move_GUILLOTINE: playsewithpan SE_W011, SOUND_PAN_TARGET createsprite gGuillotineSpriteTemplate, ANIM_ATTACKER, 2, 0 createsprite gGuillotineSpriteTemplate, ANIM_ATTACKER, 2, 1 - createvisualtask sub_8116620, 10, 4, 2, 0, 16, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, 4, 2, 0, 16, RGB_BLACK delay 9 createvisualtask AnimTask_ShakeMon2, 5, ANIM_TARGET, 2, 0, 23, 1 - delay 0x2E + delay 46 createvisualtask AnimTask_ShakeMon2, 5, ANIM_TARGET, 4, 0, 8, 1 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 1, 0 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, ANIM_TARGET, 0 createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 1, RGB_BLACK, 8, 0, 0 playsewithpan SE_W013, SOUND_PAN_TARGET waitforvisualfinish @@ -1888,7 +1888,7 @@ Move_PAY_DAY: createsprite gCoinThrowSpriteTemplate, ANIM_ATTACKER, 2, 20, 0, 0, 0, 1152 waitforvisualfinish playsewithpan SE_W006, SOUND_PAN_TARGET - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 1, 0, 0, 1, 2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 1, 0, 0, ANIM_TARGET, 2 createsprite gFallingCoinSpriteTemplate, ANIM_ATTACKER, 2 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 1, 0, 6, 1 waitforvisualfinish @@ -1899,90 +1899,90 @@ Move_PAY_DAY: Move_OUTRAGE: loadspritegfx ANIM_TAG_SMALL_EMBER loopsewithpan SE_W082, SOUND_PAN_ATTACKER, 8, 3 - createvisualtask sub_8115A04, 2, 7, 2, 5, 3, 8, RGB(14, 13, 0) + createvisualtask AnimTask_BlendColorCycle, 2, 7, 2, 5, 3, 8, RGB(14, 13, 0) createvisualtask AnimTask_TranslateMonEllipticalRespectSide, 2, ANIM_ATTACKER, 12, 6, 5, 4 delay 0 - createsprite gBattleAnimSpriteTemplate_8596E7C, ANIM_TARGET, 2, 0, 0, 30, 1280, 0, 3 + createsprite gOutrageFlameSpriteTemplate, ANIM_TARGET, 2, 0, 0, 30, 1280, 0, 3 delay 0 - createsprite gBattleAnimSpriteTemplate_8596E7C, ANIM_TARGET, 2, 0, 0, 30, -1280, 0, 3 + createsprite gOutrageFlameSpriteTemplate, ANIM_TARGET, 2, 0, 0, 30, -1280, 0, 3 delay 0 - createsprite gBattleAnimSpriteTemplate_8596E7C, ANIM_TARGET, 2, 0, 0, 30, 0, 1280, 3 + createsprite gOutrageFlameSpriteTemplate, ANIM_TARGET, 2, 0, 0, 30, 0, 1280, 3 delay 0 - createsprite gBattleAnimSpriteTemplate_8596E7C, ANIM_TARGET, 2, 0, 0, 30, 0, -1280, 3 + createsprite gOutrageFlameSpriteTemplate, ANIM_TARGET, 2, 0, 0, 30, 0, -1280, 3 delay 0 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 2, 0, 40, 1 - createsprite gBattleAnimSpriteTemplate_8596E7C, ANIM_TARGET, 2, 0, 0, 30, 1280, 768, 3 + createsprite gOutrageFlameSpriteTemplate, ANIM_TARGET, 2, 0, 0, 30, 1280, 768, 3 delay 0 - createsprite gBattleAnimSpriteTemplate_8596E7C, ANIM_TARGET, 2, 0, 0, 30, -1280, 768, 3 + createsprite gOutrageFlameSpriteTemplate, ANIM_TARGET, 2, 0, 0, 30, -1280, 768, 3 delay 0 - createsprite gBattleAnimSpriteTemplate_8596E7C, ANIM_TARGET, 2, 0, 0, 30, 1280, -768, 3 + createsprite gOutrageFlameSpriteTemplate, ANIM_TARGET, 2, 0, 0, 30, 1280, -768, 3 delay 0 - createsprite gBattleAnimSpriteTemplate_8596E7C, ANIM_TARGET, 2, 0, 0, 30, -1280, -768, 3 + createsprite gOutrageFlameSpriteTemplate, ANIM_TARGET, 2, 0, 0, 30, -1280, -768, 3 delay 0 - createsprite gBattleAnimSpriteTemplate_8596E7C, ANIM_TARGET, 2, 0, 0, 30, 1280, 0, 3 - call Outrage1 - call Outrage1 + createsprite gOutrageFlameSpriteTemplate, ANIM_TARGET, 2, 0, 0, 30, 1280, 0, 3 + call OutrageFlames + call OutrageFlames waitforvisualfinish end -Outrage1: +OutrageFlames: delay 3 - createsprite gBattleAnimSpriteTemplate_8596E7C, ANIM_TARGET, 2, 0, 0, 30, -1280, 0, 3 + createsprite gOutrageFlameSpriteTemplate, ANIM_TARGET, 2, 0, 0, 30, -1280, 0, 3 delay 0 - createsprite gBattleAnimSpriteTemplate_8596E7C, ANIM_TARGET, 2, 0, 0, 30, 0, 1280, 3 + createsprite gOutrageFlameSpriteTemplate, ANIM_TARGET, 2, 0, 0, 30, 0, 1280, 3 delay 0 - createsprite gBattleAnimSpriteTemplate_8596E7C, ANIM_TARGET, 2, 0, 0, 30, 0, -1280, 3 + createsprite gOutrageFlameSpriteTemplate, ANIM_TARGET, 2, 0, 0, 30, 0, -1280, 3 delay 0 - createsprite gBattleAnimSpriteTemplate_8596E7C, ANIM_TARGET, 2, 0, 0, 30, 1280, 768, 3 + createsprite gOutrageFlameSpriteTemplate, ANIM_TARGET, 2, 0, 0, 30, 1280, 768, 3 delay 0 - createsprite gBattleAnimSpriteTemplate_8596E7C, ANIM_TARGET, 2, 0, 0, 30, -1280, 768, 3 + createsprite gOutrageFlameSpriteTemplate, ANIM_TARGET, 2, 0, 0, 30, -1280, 768, 3 delay 0 - createsprite gBattleAnimSpriteTemplate_8596E7C, ANIM_TARGET, 2, 0, 0, 30, 1280, -768, 3 + createsprite gOutrageFlameSpriteTemplate, ANIM_TARGET, 2, 0, 0, 30, 1280, -768, 3 delay 0 - createsprite gBattleAnimSpriteTemplate_8596E7C, ANIM_TARGET, 2, 0, 0, 30, -1280, -768, 3 + createsprite gOutrageFlameSpriteTemplate, ANIM_TARGET, 2, 0, 0, 30, -1280, -768, 3 return Move_SPARK: loadspritegfx ANIM_TAG_IMPACT loadspritegfx ANIM_TAG_SPARK_2 delay 0 - createvisualtask sub_8115A04, 2, 3, -31, 1, 5, 5, RGB(31, 31, 22) + createvisualtask AnimTask_BlendColorCycle, 2, 3, -31, 1, 5, 5, RGB(31, 31, 22) playsewithpan SE_W085B, SOUND_PAN_ATTACKER - createsprite gBattleAnimSpriteTemplate_859574C, ANIM_ATTACKER, 0, 32, 24, 190, 12, 0, 1, 0 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 32, 24, 190, 12, ANIM_ATTACKER, 1, 0 delay 0 - createsprite gBattleAnimSpriteTemplate_859574C, ANIM_ATTACKER, 0, 80, 24, 22, 12, 0, 1, 0 - createsprite gBattleAnimSpriteTemplate_859574C, ANIM_ATTACKER, 0, 156, 24, 121, 13, 0, 1, 1 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 80, 24, 22, 12, ANIM_ATTACKER, 1, 0 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 156, 24, 121, 13, ANIM_ATTACKER, 1, 1 delay 0 - createvisualtask sub_8115A04, 2, 3, -31, 1, 0, 0, RGB(31, 31, 22) + createvisualtask AnimTask_BlendColorCycle, 2, 3, -31, 1, 0, 0, RGB(31, 31, 22) delay 10 - createvisualtask sub_8115A04, 2, 3, -31, 1, 5, 5, RGB(31, 31, 22) + createvisualtask AnimTask_BlendColorCycle, 2, 3, -31, 1, 5, 5, RGB(31, 31, 22) playsewithpan SE_W085B, SOUND_PAN_ATTACKER - createsprite gBattleAnimSpriteTemplate_859574C, ANIM_ATTACKER, 0, 100, 24, 60, 10, 0, 1, 0 - createsprite gBattleAnimSpriteTemplate_859574C, ANIM_ATTACKER, 0, 170, 24, 42, 11, 0, 1, 1 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 100, 24, 60, 10, ANIM_ATTACKER, 1, 0 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 170, 24, 42, 11, ANIM_ATTACKER, 1, 1 delay 0 - createsprite gBattleAnimSpriteTemplate_859574C, ANIM_ATTACKER, 0, 238, 24, 165, 10, 0, 1, 1 + createsprite gSparkElectricitySpriteTemplate, ANIM_ATTACKER, 0, 238, 24, 165, 10, ANIM_ATTACKER, 1, 1 delay 0 - createvisualtask sub_8115A04, 2, 3, -31, 1, 0, 0, RGB(31, 31, 22) + createvisualtask AnimTask_BlendColorCycle, 2, 3, -31, 1, 0, 0, RGB(31, 31, 22) delay 20 - createvisualtask sub_8115A04, 2, 3, -31, 1, 7, 7, RGB(31, 31, 22) + createvisualtask AnimTask_BlendColorCycle, 2, 3, -31, 1, 7, 7, RGB(31, 31, 22) playsewithpan SE_W085B, SOUND_PAN_ATTACKER - createsprite gBattleAnimSpriteTemplate_85957F8, ANIM_ATTACKER, 4, 0, 0, 32, 12, 0, 20, 0, 0 - createsprite gBattleAnimSpriteTemplate_85957F8, ANIM_ATTACKER, 4, 0, 0, 32, 12, 64, 20, 1, 0 - createsprite gBattleAnimSpriteTemplate_85957F8, ANIM_ATTACKER, 4, 0, 0, 32, 12, 128, 20, 0, 0 - createsprite gBattleAnimSpriteTemplate_85957F8, ANIM_ATTACKER, 4, 0, 0, 32, 12, 192, 20, 2, 0 - createsprite gBattleAnimSpriteTemplate_85957F8, ANIM_ATTACKER, 4, 0, 0, 16, 12, 32, 20, 0, 0 - createsprite gBattleAnimSpriteTemplate_85957F8, ANIM_ATTACKER, 4, 0, 0, 16, 12, 96, 20, 1, 0 - createsprite gBattleAnimSpriteTemplate_85957F8, ANIM_ATTACKER, 4, 0, 0, 16, 12, 160, 20, 0, 0 - createsprite gBattleAnimSpriteTemplate_85957F8, ANIM_ATTACKER, 4, 0, 0, 16, 12, 224, 20, 2, 0 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 4, 0, 0, 32, 12, 0, 20, 0, 0 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 4, 0, 0, 32, 12, 64, 20, 1, 0 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 4, 0, 0, 32, 12, 128, 20, 0, 0 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 4, 0, 0, 32, 12, 192, 20, 2, 0 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 4, 0, 0, 16, 12, 32, 20, 0, 0 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 4, 0, 0, 16, 12, 96, 20, 1, 0 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 4, 0, 0, 16, 12, 160, 20, 0, 0 + createsprite gSparkElectricityFlashingSpriteTemplate, ANIM_ATTACKER, 4, 0, 0, 16, 12, 224, 20, 2, 0 delay 4 waitforvisualfinish - createvisualtask sub_8115A04, 2, 3, -31, 1, 0, 0, RGB(31, 31, 22) + createvisualtask AnimTask_BlendColorCycle, 2, 3, -31, 1, 0, 0, RGB(31, 31, 22) createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 4, 4 delay 4 playsewithpan SE_W063, SOUND_PAN_TARGET - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, 0, 0, 1, 2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, 0, 0, ANIM_TARGET, 2 createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 3, 0, 6, 1 waitforvisualfinish - createvisualtask sub_8115A04, 2, 4, -31, 2, 0, 6, RGB(31, 31, 22) + createvisualtask AnimTask_BlendColorCycle, 2, 4, -31, 2, 0, 6, RGB(31, 31, 22) call ElectricityEffect waitforvisualfinish end @@ -2013,37 +2013,37 @@ Move_ATTRACT: createsprite gRedHeartRisingSpriteTemplate, ANIM_ATTACKER, 40, 112, 256, 90 createsprite gRedHeartRisingSpriteTemplate, ANIM_ATTACKER, 40, 200, 272, 90 delay 75 - createvisualtask sub_8115A04, 2, 4, 4, 4, 0, 10, RGB(31, 25, 27) + createvisualtask AnimTask_BlendColorCycle, 2, 4, 4, 4, 0, 10, RGB(31, 25, 27) end Move_GROWTH: - call Growth1 + call GrowthEffect waitforvisualfinish - call Growth1 + call GrowthEffect waitforvisualfinish end -Growth1: - createvisualtask sub_8115A04, 2, 2, 0, 2, 0, 8, RGB_WHITE +GrowthEffect: + createvisualtask AnimTask_BlendColorCycle, 2, 2, 0, 2, 0, 8, RGB_WHITE playsewithpan SE_W036, SOUND_PAN_ATTACKER createvisualtask AnimTask_ScaleMonAndRestore, 5, -3, -3, 16, ANIM_ATTACKER, 0 return Move_WHIRLWIND: loadspritegfx ANIM_TAG_WHIRLWIND_LINES - createsprite gUnknown_085963D4, ANIM_ATTACKER, 2, 0, -8, 1, 60, 0 - createsprite gUnknown_085963D4, ANIM_ATTACKER, 2, 0, 0, 1, 60, 1 - createsprite gUnknown_085963D4, ANIM_ATTACKER, 2, 0, 8, 1, 60, 2 - createsprite gUnknown_085963D4, ANIM_ATTACKER, 2, 0, 16, 1, 60, 3 - createsprite gUnknown_085963D4, ANIM_ATTACKER, 2, 0, 24, 1, 60, 4 - createsprite gUnknown_085963D4, ANIM_ATTACKER, 2, 0, 32, 1, 60, 0 + createsprite gWhirlwindLineSpriteTemplate, ANIM_ATTACKER, 2, 0, -8, ANIM_TARGET, 60, 0 + createsprite gWhirlwindLineSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, ANIM_TARGET, 60, 1 + createsprite gWhirlwindLineSpriteTemplate, ANIM_ATTACKER, 2, 0, 8, ANIM_TARGET, 60, 2 + createsprite gWhirlwindLineSpriteTemplate, ANIM_ATTACKER, 2, 0, 16, ANIM_TARGET, 60, 3 + createsprite gWhirlwindLineSpriteTemplate, ANIM_ATTACKER, 2, 0, 24, ANIM_TARGET, 60, 4 + createsprite gWhirlwindLineSpriteTemplate, ANIM_ATTACKER, 2, 0, 32, ANIM_TARGET, 60, 0 delay 5 loopsewithpan SE_W104, SOUND_PAN_TARGET, 10, 4 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 4, 0, 15, 1 - delay 0x1D + delay 29 createvisualtask AnimTask_TranslateMonEllipticalRespectSide, 2, ANIM_TARGET, 12, 6, 1, 5 delay 7 playsewithpan SE_W081, SOUND_PAN_TARGET - createvisualtask sub_80D5DB0, 5, 1, 8 + createvisualtask AnimTask_SlideOffScreen, 5, ANIM_TARGET, 8 waitforvisualfinish end @@ -2052,13 +2052,13 @@ Move_CONFUSE_RAY: monbg ANIM_DEF_PARTNER fadetobg BG_GHOST waitbgfadein - createvisualtask sub_8159278, 2, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 2, 0 - createvisualtask sub_8115C80, 2, 10013, 0, 6, 0, 14, 351 - createsprite gUnknown_08596D14, ANIM_TARGET, 2, 28, 0, 288 + createvisualtask SoundTask_AdjustPanningVar, 2, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 2, 0 + createvisualtask AnimTask_BlendColorCycleByTag, 2, ANIM_TAG_YELLOW_BALL, 0, 6, 0, 14, RGB(31, 10, 0) + createsprite gConfuseRayBallBounceSpriteTemplate, ANIM_TARGET, 2, 28, 0, 288 waitforvisualfinish setalpha 8, 8 playsewithpan SE_W081B, SOUND_PAN_TARGET - createsprite gUnknown_08596D2C, ANIM_TARGET, 2, 0, -16 + createsprite gConfuseRayBallSpiralSpriteTemplate, ANIM_TARGET, 2, 0, -16 waitforvisualfinish delay 0 blendoff @@ -2073,9 +2073,9 @@ Move_LOCK_ON: createsprite gLockOnMoveTargetSpriteTemplate, ANIM_ATTACKER, 40, 1 createsprite gLockOnMoveTargetSpriteTemplate, ANIM_ATTACKER, 40, 2 createsprite gLockOnMoveTargetSpriteTemplate, ANIM_ATTACKER, 40, 3 - createsprite gLockOnMoveTargetSpriteTemplate, ANIM_ATTACKER, 40, 4 + createsprite gLockOnMoveTargetSpriteTemplate, ANIM_ATTACKER, 40, 4 @ Also transitions to red target delay 120 - setarg 7, -1 + setarg 7, 0xFFFF @ Signal target to flash/disappear waitforvisualfinish end @@ -2085,7 +2085,7 @@ Move_MEAN_LOOK: playsewithpan SE_W060, SOUND_PAN_ATTACKER createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 1, 0, 16, RGB_BLACK loopsewithpan SE_W109, SOUND_PAN_TARGET, 15, 4 - waitplaysewithpan SE_W043, SOUND_PAN_TARGET, 0x55 + waitplaysewithpan SE_W043, SOUND_PAN_TARGET, 85 createsprite gMeanLookEyeSpriteTemplate, ANIM_ATTACKER, 2 delay 120 createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 2, 16, 0, RGB_BLACK @@ -2096,21 +2096,21 @@ Move_MEAN_LOOK: Move_ROCK_THROW: loadspritegfx ANIM_TAG_ROCKS - createsprite gBattleAnimSpriteTemplate_85972D8, ANIM_TARGET, 2, 6, 1, 15, 1 - createsprite gUnknown_08596B04, ANIM_TARGET, 2, 0, 1, 0, 0 + createsprite gShakeMonOrTerrainSpriteTemplate, ANIM_TARGET, 2, 6, 1, 15, 1 + createsprite gFallingRockSpriteTemplate, ANIM_TARGET, 2, 0, 1, 0, 0 playsewithpan SE_W088, SOUND_PAN_TARGET delay 6 - createsprite gUnknown_08596B04, ANIM_TARGET, 2, 19, 1, 10, 0 + createsprite gFallingRockSpriteTemplate, ANIM_TARGET, 2, 19, 1, 10, 0 playsewithpan SE_W088, SOUND_PAN_TARGET delay 6 - createsprite gUnknown_08596B04, ANIM_TARGET, 2, -23, 2, -10, 0 + createsprite gFallingRockSpriteTemplate, ANIM_TARGET, 2, -23, 2, -10, 0 playsewithpan SE_W088, SOUND_PAN_TARGET createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 0, 5, 20, 1 delay 6 - createsprite gUnknown_08596B04, ANIM_TARGET, 2, -15, 1, -10, 0 + createsprite gFallingRockSpriteTemplate, ANIM_TARGET, 2, -15, 1, -10, 0 playsewithpan SE_W088, SOUND_PAN_TARGET delay 6 - createsprite gUnknown_08596B04, ANIM_TARGET, 2, 23, 2, 10, 0 + createsprite gFallingRockSpriteTemplate, ANIM_TARGET, 2, 23, 2, 10, 0 playsewithpan SE_W088, SOUND_PAN_TARGET waitforvisualfinish end @@ -2118,50 +2118,50 @@ Move_ROCK_THROW: Move_ROCK_SLIDE: loadspritegfx ANIM_TAG_ROCKS monbg ANIM_DEF_PARTNER - createsprite gBattleAnimSpriteTemplate_85972D8, ANIM_ATTACKER, 2, 7, 1, 11, 1 - createsprite gUnknown_08596B04, ANIM_TARGET, 2, -5, 1, -5, 1 + createsprite gShakeMonOrTerrainSpriteTemplate, ANIM_ATTACKER, 2, 7, 1, 11, 1 + createsprite gFallingRockSpriteTemplate, ANIM_TARGET, 2, -5, 1, -5, 1 playsewithpan SE_W088, SOUND_PAN_TARGET delay 2 - createsprite gUnknown_08596B04, ANIM_TARGET, 2, 5, 0, 6, 1 + createsprite gFallingRockSpriteTemplate, ANIM_TARGET, 2, 5, 0, 6, 1 playsewithpan SE_W088, SOUND_PAN_TARGET delay 2 - createsprite gUnknown_08596B04, ANIM_TARGET, 2, 19, 1, 10, 1 + createsprite gFallingRockSpriteTemplate, ANIM_TARGET, 2, 19, 1, 10, 1 playsewithpan SE_W088, SOUND_PAN_TARGET delay 2 - createsprite gUnknown_08596B04, ANIM_TARGET, 2, -23, 2, -10, 1 + createsprite gFallingRockSpriteTemplate, ANIM_TARGET, 2, -23, 2, -10, 1 playsewithpan SE_W088, SOUND_PAN_TARGET createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 0, 5, 50, 1 createvisualtask AnimTask_ShakeMon, 2, ANIM_DEF_PARTNER, 0, 5, 50, 1 delay 2 - call RockSlide1 - call RockSlide1 + call RockSlideRocks + call RockSlideRocks waitforvisualfinish clearmonbg ANIM_DEF_PARTNER end -RockSlide1: - createsprite gUnknown_08596B04, ANIM_TARGET, 2, -20, 0, -10, 1 +RockSlideRocks: + createsprite gFallingRockSpriteTemplate, ANIM_TARGET, 2, -20, 0, -10, 1 playsewithpan SE_W088, SOUND_PAN_TARGET delay 2 - createsprite gUnknown_08596B04, ANIM_TARGET, 2, 28, 1, 10, 1 + createsprite gFallingRockSpriteTemplate, ANIM_TARGET, 2, 28, 1, 10, 1 playsewithpan SE_W088, SOUND_PAN_TARGET delay 2 - createsprite gUnknown_08596B04, ANIM_TARGET, 2, -10, 1, -5, 1 + createsprite gFallingRockSpriteTemplate, ANIM_TARGET, 2, -10, 1, -5, 1 playsewithpan SE_W088, SOUND_PAN_TARGET delay 2 - createsprite gUnknown_08596B04, ANIM_TARGET, 2, 10, 0, 6, 1 + createsprite gFallingRockSpriteTemplate, ANIM_TARGET, 2, 10, 0, 6, 1 playsewithpan SE_W088, SOUND_PAN_TARGET delay 2 - createsprite gUnknown_08596B04, ANIM_TARGET, 2, 24, 1, 10, 1 + createsprite gFallingRockSpriteTemplate, ANIM_TARGET, 2, 24, 1, 10, 1 playsewithpan SE_W088, SOUND_PAN_TARGET delay 2 - createsprite gUnknown_08596B04, ANIM_TARGET, 2, -32, 2, -10, 1 + createsprite gFallingRockSpriteTemplate, ANIM_TARGET, 2, -32, 2, -10, 1 playsewithpan SE_W088, SOUND_PAN_TARGET delay 2 - createsprite gUnknown_08596B04, ANIM_TARGET, 2, -20, 0, -10, 1 + createsprite gFallingRockSpriteTemplate, ANIM_TARGET, 2, -20, 0, -10, 1 playsewithpan SE_W088, SOUND_PAN_TARGET delay 2 - createsprite gUnknown_08596B04, ANIM_TARGET, 2, 30, 2, 10, 1 + createsprite gFallingRockSpriteTemplate, ANIM_TARGET, 2, 30, 2, 10, 1 playsewithpan SE_W088, SOUND_PAN_TARGET delay 2 return @@ -2176,7 +2176,7 @@ Move_THIEF: createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 6, 4 delay 6 playsewithpan SE_W233, SOUND_PAN_TARGET - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 1, 2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, ANIM_TARGET, 2 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 1, 0, 8, 1 waitforvisualfinish delay 20 @@ -2193,33 +2193,33 @@ Move_BUBBLE_BEAM: monbgprio_28 ANIM_TARGET setalpha 12, 8 delay 1 - call Bulbblebeam1 + call BulbblebeamCreateBubbles createvisualtask AnimTask_SwayMon, 5, 0, 3, 3072, 8, ANIM_TARGET - call Bulbblebeam1 - call Bulbblebeam1 + call BulbblebeamCreateBubbles + call BulbblebeamCreateBubbles waitforvisualfinish - call WaterBubbleEffect + call WaterBubblesEffectShort waitforvisualfinish clearmonbg ANIM_TARGET blendoff end -Bulbblebeam1: - createsprite gBattleAnimSpriteTemplate_8595068, ANIM_ATTACKER, 2, 18, 0, 35, 70, 0, 256, 50 +BulbblebeamCreateBubbles: + createsprite gWaterBubbleProjectileSpriteTemplate, ANIM_ATTACKER, 2, 18, 0, 35, 70, 0, 256, 50 playsewithpan SE_W145, SOUND_PAN_ATTACKER delay 3 - createsprite gBattleAnimSpriteTemplate_8595068, ANIM_ATTACKER, 2, 18, 0, 20, 40, -10, 256, 50 + createsprite gWaterBubbleProjectileSpriteTemplate, ANIM_ATTACKER, 2, 18, 0, 20, 40, -10, 256, 50 playsewithpan SE_W145, SOUND_PAN_ATTACKER delay 3 - createsprite gBattleAnimSpriteTemplate_8595068, ANIM_ATTACKER, 2, 18, 0, 10, -60, 0, 256, 50 + createsprite gWaterBubbleProjectileSpriteTemplate, ANIM_ATTACKER, 2, 18, 0, 10, -60, 0, 256, 50 playsewithpan SE_W145, SOUND_PAN_ATTACKER delay 3 - createsprite gBattleAnimSpriteTemplate_8595068, ANIM_ATTACKER, 2, 18, 0, 15, -15, 10, 256, 50 + createsprite gWaterBubbleProjectileSpriteTemplate, ANIM_ATTACKER, 2, 18, 0, 15, -15, 10, 256, 50 playsewithpan SE_W145, SOUND_PAN_ATTACKER delay 3 - createsprite gBattleAnimSpriteTemplate_8595068, ANIM_ATTACKER, 2, 18, 0, 30, 10, -10, 256, 50 + createsprite gWaterBubbleProjectileSpriteTemplate, ANIM_ATTACKER, 2, 18, 0, 30, 10, -10, 256, 50 playsewithpan SE_W145, SOUND_PAN_ATTACKER delay 3 - createsprite gBattleAnimSpriteTemplate_8595068, ANIM_ATTACKER, 2, 18, 0, 25, -30, 10, 256, 50 + createsprite gWaterBubbleProjectileSpriteTemplate, ANIM_ATTACKER, 2, 18, 0, 25, -30, 10, 256, 50 playsewithpan SE_W145, SOUND_PAN_ATTACKER delay 3 return @@ -2228,36 +2228,36 @@ Move_ICY_WIND: loadspritegfx ANIM_TAG_ICE_CRYSTALS loadspritegfx ANIM_TAG_ICE_SPIKES monbg ANIM_DEF_PARTNER - createvisualtask sub_8116620, 10, 11, 4, 0, 4, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, 11, 4, 0, 4, RGB_BLACK fadetobg BG_ICE waitbgfadeout playsewithpan SE_W196, 0 waitbgfadein waitforvisualfinish panse_1B SE_W016, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0 - call IcyWind1 + call IcyWindSwirlingSnowballs delay 5 - call IcyWind1 + call IcyWindSwirlingSnowballs playsewithpan SE_W016B, SOUND_PAN_TARGET - delay 0x37 - call IcyWindEffect2 + delay 55 + call IceSpikesEffectLong waitforvisualfinish clearmonbg ANIM_DEF_PARTNER restorebg waitbgfadeout - createvisualtask sub_8116620, 10, 11, 4, 4, 0, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, 11, 4, 4, 0, RGB_BLACK waitbgfadein end -IcyWind1: - createsprite gUnknown_08595B98, ANIM_TARGET, 40, 0, 0, 0, 0, 72, 1 +IcyWindSwirlingSnowballs: + createsprite gSwirlingSnowballSpriteTemplate, ANIM_TARGET, 40, 0, 0, 0, 0, 72, 1 delay 5 - createsprite gUnknown_08595B98, ANIM_TARGET, 40, 0, 10, 0, 10, 72, 1 + createsprite gSwirlingSnowballSpriteTemplate, ANIM_TARGET, 40, 0, 10, 0, 10, 72, 1 delay 5 - createsprite gUnknown_08595B98, ANIM_TARGET, 40, 0, -10, 0, -10, 72, 1 + createsprite gSwirlingSnowballSpriteTemplate, ANIM_TARGET, 40, 0, -10, 0, -10, 72, 1 delay 5 - createsprite gUnknown_08595B98, ANIM_TARGET, 40, 0, 15, 0, 15, 72, 1 + createsprite gSwirlingSnowballSpriteTemplate, ANIM_TARGET, 40, 0, 15, 0, 15, 72, 1 delay 5 - createsprite gUnknown_08595B98, ANIM_TARGET, 40, 0, -5, 0, -5, 72, 1 + createsprite gSwirlingSnowballSpriteTemplate, ANIM_TARGET, 40, 0, -5, 0, -5, 72, 1 return Move_SMOKESCREEN: @@ -2327,7 +2327,7 @@ Move_CONVERSION: createsprite gConversionSpriteTemplate, ANIM_ATTACKER, 2, 24, 24 delay 20 playsewithpan SE_W112, SOUND_PAN_ATTACKER - createvisualtask sub_8115D94, 2, ANIM_TAG_CONVERSION, 1, 1, 14335, 12, 0, 0 + createvisualtask AnimTask_FlashAnimTagWithColor, 2, ANIM_TAG_CONVERSION, 1, 1, RGB(31, 31, 13), 12, 0, 0 delay 6 createvisualtask AnimTask_ConversionAlphaBlend, 5 waitforvisualfinish @@ -2392,10 +2392,10 @@ Move_ROLLING_KICK: playsewithpan SE_W104, SOUND_PAN_ATTACKER waitforvisualfinish createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, 0, 20, 0, 0, 4 - createsprite gUnknown_08595EE0, ANIM_ATTACKER, 2, -24, 0, 48, 10, 160, 0 + createsprite gSlidingKickSpriteTemplate, ANIM_ATTACKER, 2, -24, 0, 48, 10, 160, 0 delay 5 playsewithpan SE_W233B, SOUND_PAN_TARGET - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, -8, 0, 1, 2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, -8, 0, ANIM_TARGET, 2 createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 5, 0, 6, 1 waitforvisualfinish createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, 0, 1, 8 @@ -2414,7 +2414,7 @@ Move_HEADBUTT: createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_ATTACKER, 2, 0, 4, 1 createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 5, 0, 6, 1 createsprite gBowMonSpriteTemplate, ANIM_ATTACKER, 2, 2 - createsprite gUnknown_085973E8, ANIM_TARGET, 3, 0, 0, 1, 1 + createsprite gFlashingHitSplatSpriteTemplate, ANIM_TARGET, 3, 0, 0, ANIM_TARGET, 1 playsewithpan SE_W233B, SOUND_PAN_TARGET waitforvisualfinish end @@ -2432,7 +2432,7 @@ Move_HORN_ATTACK: createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_ATTACKER, 2, 0, 4, 1 createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 5, 0, 6, 1 createsprite gBowMonSpriteTemplate, ANIM_ATTACKER, 2, 2 - createsprite gUnknown_085973E8, ANIM_TARGET, 3, 0, 0, 1, 1 + createsprite gFlashingHitSplatSpriteTemplate, ANIM_TARGET, 3, 0, 0, ANIM_TARGET, 1 playsewithpan SE_W030, SOUND_PAN_TARGET waitforvisualfinish end @@ -2440,7 +2440,7 @@ Move_HORN_ATTACK: Move_FURY_ATTACK: loadspritegfx ANIM_TAG_IMPACT loadspritegfx ANIM_TAG_HORN_HIT - createvisualtask sub_80D6134, 2, 4, 256, 0, 2 + createvisualtask AnimTask_RotateMonSpriteToSide, 2, 4, 256, 0, 2 choosetwoturnanim FuryAttackRight, FuryAttackLeft FuryAttackContinue: createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 5, 0, 6, 1 @@ -2450,14 +2450,14 @@ FuryAttackContinue: FuryAttackRight: createsprite gHornHitSpriteTemplate, ANIM_TARGET, 4, 8, 8, 10 waitforvisualfinish - createsprite gUnknown_085973E8, ANIM_TARGET, 3, 0, 0, 1, 1 + createsprite gFlashingHitSplatSpriteTemplate, ANIM_TARGET, 3, 0, 0, ANIM_TARGET, 1 playsewithpan SE_W030, SOUND_PAN_TARGET goto FuryAttackContinue FuryAttackLeft: createsprite gHornHitSpriteTemplate, ANIM_TARGET, 4, -8, -8, 10 waitforvisualfinish - createsprite gUnknown_085973E8, ANIM_TARGET, 3, 0, 0, 1, 1 + createsprite gFlashingHitSplatSpriteTemplate, ANIM_TARGET, 3, 0, 0, ANIM_TARGET, 1 playsewithpan SE_W030, SOUND_PAN_TARGET goto FuryAttackContinue @@ -2467,7 +2467,7 @@ Move_HORN_DRILL: jumpifcontest HornDrillInContest fadetobg BG_DRILL waitbgfadeout - createvisualtask sub_8117660, 5, -2304, 768, 1, -1 + createvisualtask AnimTask_StartSlidingBg, 5, -2304, 768, 1, -1 HornDrillContinue: waitbgfadein setalpha 12, 8 @@ -2481,51 +2481,51 @@ HornDrillContinue: playse SE_BAN createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_ATTACKER, 2, 0, 40, 1 createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_TARGET, 10, 0, 40, 1 - createsprite gUnknown_085973E8, ANIM_TARGET, 3, 0, 0, 1, 3 + createsprite gFlashingHitSplatSpriteTemplate, ANIM_TARGET, 3, 0, 0, ANIM_TARGET, 3 playsewithpan SE_W030, SOUND_PAN_TARGET delay 4 - createsprite gUnknown_085973E8, ANIM_TARGET, 3, 0, 2, 1, 3 + createsprite gFlashingHitSplatSpriteTemplate, ANIM_TARGET, 3, 0, 2, ANIM_TARGET, 3 playsewithpan SE_W030, SOUND_PAN_TARGET delay 4 - createsprite gUnknown_085973E8, ANIM_TARGET, 3, -4, 3, 1, 3 + createsprite gFlashingHitSplatSpriteTemplate, ANIM_TARGET, 3, -4, 3, ANIM_TARGET, 3 playsewithpan SE_W030, SOUND_PAN_TARGET delay 4 - createsprite gUnknown_085973E8, ANIM_TARGET, 3, -8, -5, 1, 3 + createsprite gFlashingHitSplatSpriteTemplate, ANIM_TARGET, 3, -8, -5, ANIM_TARGET, 3 playsewithpan SE_W030, SOUND_PAN_TARGET delay 4 - createsprite gUnknown_085973E8, ANIM_TARGET, 3, 4, -12, 1, 3 + createsprite gFlashingHitSplatSpriteTemplate, ANIM_TARGET, 3, 4, -12, ANIM_TARGET, 3 playsewithpan SE_W030, SOUND_PAN_TARGET delay 4 - createsprite gUnknown_085973E8, ANIM_TARGET, 3, 16, 0, 1, 3 + createsprite gFlashingHitSplatSpriteTemplate, ANIM_TARGET, 3, 16, 0, ANIM_TARGET, 3 playsewithpan SE_W030, SOUND_PAN_TARGET delay 4 - createsprite gUnknown_085973E8, ANIM_TARGET, 3, 5, 18, 1, 3 + createsprite gFlashingHitSplatSpriteTemplate, ANIM_TARGET, 3, 5, 18, ANIM_TARGET, 3 playsewithpan SE_W030, SOUND_PAN_TARGET delay 4 - createsprite gUnknown_085973E8, ANIM_TARGET, 3, -17, 12, 1, 2 + createsprite gFlashingHitSplatSpriteTemplate, ANIM_TARGET, 3, -17, 12, ANIM_TARGET, 2 playsewithpan SE_W030, SOUND_PAN_TARGET delay 4 - createsprite gUnknown_085973E8, ANIM_TARGET, 3, -21, -15, 1, 2 + createsprite gFlashingHitSplatSpriteTemplate, ANIM_TARGET, 3, -21, -15, ANIM_TARGET, 2 playsewithpan SE_W030, SOUND_PAN_TARGET delay 4 - createsprite gUnknown_085973E8, ANIM_TARGET, 3, 8, -27, 1, 2 + createsprite gFlashingHitSplatSpriteTemplate, ANIM_TARGET, 3, 8, -27, ANIM_TARGET, 2 playsewithpan SE_W030, SOUND_PAN_TARGET delay 4 - createsprite gUnknown_085973E8, ANIM_TARGET, 3, 32, 0, 1, 2 + createsprite gFlashingHitSplatSpriteTemplate, ANIM_TARGET, 3, 32, 0, ANIM_TARGET, 2 playsewithpan SE_W030, SOUND_PAN_TARGET delay 4 createsprite gBowMonSpriteTemplate, ANIM_ATTACKER, 2, 2 waitforvisualfinish restorebg waitbgfadeout - setarg 7, -1 + setarg 7, 0xFFFF waitbgfadein end HornDrillInContest: fadetobg BG_DRILL_CONTESTS waitbgfadeout - createvisualtask sub_8117660, 5, 2304, 768, 0, -1 + createvisualtask AnimTask_StartSlidingBg, 5, 2304, 768, 0, -1 goto HornDrillContinue Move_THRASH: @@ -2533,15 +2533,15 @@ Move_THRASH: loadspritegfx ANIM_TAG_HANDS_AND_FEET createvisualtask AnimTask_ThrashMoveMonHorizontal, 2 createvisualtask AnimTask_ThrashMoveMonVertical, 2 - createsprite gUnknown_08595EB0, ANIM_TARGET, 3, 1, 10, 0 + createsprite gFistFootRandomPosSpriteTemplate, ANIM_TARGET, 3, 1, 10, 0 createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_TARGET, 4, 0, 7, 1 playsewithpan SE_W004, SOUND_PAN_TARGET delay 28 - createsprite gUnknown_08595EB0, ANIM_TARGET, 3, 1, 10, 1 + createsprite gFistFootRandomPosSpriteTemplate, ANIM_TARGET, 3, 1, 10, 1 createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_TARGET, 4, 0, 7, 1 playsewithpan SE_W233B, SOUND_PAN_TARGET delay 28 - createsprite gUnknown_08595EB0, ANIM_TARGET, 3, 1, 10, 3 + createsprite gFistFootRandomPosSpriteTemplate, ANIM_TARGET, 3, 1, 10, 3 createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_TARGET, 8, 0, 16, 1 playsewithpan SE_W025B, SOUND_PAN_TARGET end @@ -2586,18 +2586,18 @@ Move_LOW_KICK: loadspritegfx ANIM_TAG_HANDS_AND_FEET loadspritegfx ANIM_TAG_IMPACT createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, 0, 20, 0, 0, 4 - createsprite gUnknown_08595EE0, ANIM_TARGET, 2, -24, 28, 40, 8, 160, 0 + createsprite gSlidingKickSpriteTemplate, ANIM_TARGET, 2, -24, 28, 40, 8, 160, 0 delay 4 - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, -8, 8, 1, 2 - createvisualtask sub_80D6134, 2, 6, 384, 1, 2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, -8, 8, ANIM_TARGET, 2 + createvisualtask AnimTask_RotateMonSpriteToSide, 2, 6, 384, 1, 2 playsewithpan SE_W233B, SOUND_PAN_TARGET waitforvisualfinish createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, 0, 1, 4 end Move_EARTHQUAKE: - createvisualtask sub_81152DC, 5, 5, 10, 50 - createvisualtask sub_81152DC, 5, 4, 10, 50 + createvisualtask AnimTask_HorizontalShake, 5, (MAX_BATTLERS_COUNT + 1), 10, 50 + createvisualtask AnimTask_HorizontalShake, 5, MAX_BATTLERS_COUNT, 10, 50 playsewithpan SE_W089, 0 delay 10 createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 1, RGB_BLACK, 14, 0x7FFF, 14 @@ -2607,44 +2607,44 @@ Move_EARTHQUAKE: Move_FISSURE: loadspritegfx ANIM_TAG_MUD_SAND - createvisualtask sub_81152DC, 3, 5, 10, 50 - createvisualtask sub_81152DC, 3, 1, 10, 50 + createvisualtask AnimTask_HorizontalShake, 3, (MAX_BATTLERS_COUNT + 1), 10, 50 + createvisualtask AnimTask_HorizontalShake, 3, ANIM_TARGET, 10, 50 playsewithpan SE_W089, SOUND_PAN_TARGET delay 8 - call Fissure1 + call FissureDirtPlumeFar delay 15 createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 1, RGB_BLACK, 14, 0x7FFF, 14 delay 15 - call Fissure2 + call FissureDirtPlumeClose delay 15 createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 1, RGB_BLACK, 14, 0x7FFF, 14 delay 15 - call Fissure1 + call FissureDirtPlumeFar delay 50 fadetobg BG_FISSURE waitbgfadeout - createvisualtask sub_8115628, 5, 1, 5, -1 + createvisualtask AnimTask_PositionFissureBgOnBattler, 5, ANIM_TARGET, 5, -1 waitbgfadein delay 40 restorebg waitbgfadeout - setarg 7, -1 + setarg 7, 0xFFFF waitbgfadein end -Fissure1: - createsprite gUnknown_085971FC, ANIM_TARGET, 2, 1, 0, 12, -48, -16, 24 - createsprite gUnknown_085971FC, ANIM_TARGET, 2, 1, 0, 16, -16, -10, 24 - createsprite gUnknown_085971FC, ANIM_TARGET, 2, 1, 1, 14, -52, -18, 24 - createsprite gUnknown_085971FC, ANIM_TARGET, 2, 1, 1, 12, -32, -16, 24 +FissureDirtPlumeFar: + createsprite gDirtPlumeSpriteTemplate, ANIM_TARGET, 2, 1, 0, 12, -48, -16, 24 + createsprite gDirtPlumeSpriteTemplate, ANIM_TARGET, 2, 1, 0, 16, -16, -10, 24 + createsprite gDirtPlumeSpriteTemplate, ANIM_TARGET, 2, 1, 1, 14, -52, -18, 24 + createsprite gDirtPlumeSpriteTemplate, ANIM_TARGET, 2, 1, 1, 12, -32, -16, 24 playsewithpan SE_W091, SOUND_PAN_TARGET return -Fissure2: - createsprite gUnknown_085971FC, ANIM_TARGET, 2, 1, 0, 12, -24, -16, 24 - createsprite gUnknown_085971FC, ANIM_TARGET, 2, 1, 0, 16, -38, -10, 24 - createsprite gUnknown_085971FC, ANIM_TARGET, 2, 1, 1, 14, -20, -18, 24 - createsprite gUnknown_085971FC, ANIM_TARGET, 2, 1, 1, 12, -36, -16, 24 +FissureDirtPlumeClose: + createsprite gDirtPlumeSpriteTemplate, ANIM_TARGET, 2, 1, 0, 12, -24, -16, 24 + createsprite gDirtPlumeSpriteTemplate, ANIM_TARGET, 2, 1, 0, 16, -38, -10, 24 + createsprite gDirtPlumeSpriteTemplate, ANIM_TARGET, 2, 1, 1, 14, -20, -18, 24 + createsprite gDirtPlumeSpriteTemplate, ANIM_TARGET, 2, 1, 1, 12, -36, -16, 24 playsewithpan SE_W091, SOUND_PAN_TARGET return @@ -2655,50 +2655,50 @@ DigEnd: DigSetUp: loadspritegfx ANIM_TAG_MUD_SAND loadspritegfx ANIM_TAG_DIRT_MOUND - createsprite gUnknown_08597214, ANIM_ATTACKER, 1, 0, 0, 180 - createsprite gUnknown_08597214, ANIM_ATTACKER, 1, 0, 1, 180 + createsprite gDirtMoundSpriteTemplate, ANIM_ATTACKER, 1, 0, 0, 180 + createsprite gDirtMoundSpriteTemplate, ANIM_ATTACKER, 1, 0, 1, 180 monbg_22 ANIM_ATTACKER delay 1 - createvisualtask sub_8114CBC, 2, 0 + createvisualtask AnimTask_DigDownMovement, 2, FALSE delay 6 - call DigSetUp1 - call DigSetUp1 - call DigSetUp1 - call DigSetUp1 - call DigSetUp1 + call DigThrowDirt + call DigThrowDirt + call DigThrowDirt + call DigThrowDirt + call DigThrowDirt waitforvisualfinish clearmonbg_23 ANIM_ATTACKER delay 1 - createvisualtask sub_8114CBC, 2, 1 + createvisualtask AnimTask_DigDownMovement, 2, TRUE goto DigEnd DigUnleash: loadspritegfx ANIM_TAG_IMPACT loadspritegfx ANIM_TAG_DIRT_MOUND - createvisualtask sub_8114F14, 2, 0 + createvisualtask AnimTask_DigUpMovement, 2, FALSE waitforvisualfinish monbg ANIM_ATTACKER - createsprite gUnknown_08597214, ANIM_ATTACKER, 1, 0, 0, 48 - createsprite gUnknown_08597214, ANIM_ATTACKER, 1, 0, 1, 48 + createsprite gDirtMoundSpriteTemplate, ANIM_ATTACKER, 1, 0, 0, 48 + createsprite gDirtMoundSpriteTemplate, ANIM_ATTACKER, 1, 0, 1, 48 delay 1 - createvisualtask sub_8114F14, 2, 1 + createvisualtask AnimTask_DigUpMovement, 2, TRUE delay 16 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, -8, 0, 1, 2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, -8, 0, ANIM_TARGET, 2 createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 5, 0, 6, 1 playsewithpan SE_W025B, SOUND_PAN_ATTACKER clearmonbg ANIM_ATTACKER goto DigEnd -DigSetUp1: - createsprite gUnknown_085971FC, ANIM_ATTACKER, 2, 0, 0, 12, 4, -16, 18 - createsprite gUnknown_085971FC, ANIM_ATTACKER, 2, 0, 0, 16, 4, -10, 18 - createsprite gUnknown_085971FC, ANIM_ATTACKER, 2, 0, 1, 14, 4, -18, 18 - createsprite gUnknown_085971FC, ANIM_ATTACKER, 2, 0, 1, 12, 4, -16, 18 +DigThrowDirt: + createsprite gDirtPlumeSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 12, 4, -16, 18 + createsprite gDirtPlumeSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 16, 4, -10, 18 + createsprite gDirtPlumeSpriteTemplate, ANIM_ATTACKER, 2, 0, 1, 14, 4, -18, 18 + createsprite gDirtPlumeSpriteTemplate, ANIM_ATTACKER, 2, 0, 1, 12, 4, -16, 18 playsewithpan SE_W091, SOUND_PAN_ATTACKER delay 32 return Move_MEDITATE: call SetPsychicBackground - createvisualtask sub_810F7D4, 2 + createvisualtask AnimTask_MeditateStretchAttacker, 2 playsewithpan SE_W029, SOUND_PAN_ATTACKER delay 16 playsewithpan SE_W036, SOUND_PAN_ATTACKER @@ -2710,7 +2710,7 @@ Move_AGILITY: monbg ANIM_ATK_PARTNER setalpha 12, 8 createvisualtask AnimTask_TranslateMonEllipticalRespectSide, 2, ANIM_ATTACKER, 24, 6, 4, 4 - createvisualtask sub_81169C0, 2, 0, 4, 7, 10 + createvisualtask AnimTask_TraceMonBlended, 2, 0, 4, 7, 10 playsewithpan SE_W104, SOUND_PAN_ATTACKER delay 12 playsewithpan SE_W104, SOUND_PAN_ATTACKER @@ -2732,11 +2732,11 @@ Move_QUICK_ATTACK: monbg ANIM_ATK_PARTNER setalpha 12, 8 createvisualtask AnimTask_TranslateMonEllipticalRespectSide, 2, ANIM_ATTACKER, 24, 6, 1, 5 - createvisualtask sub_81169C0, 2, 0, 4, 7, 3 + createvisualtask AnimTask_TraceMonBlended, 2, 0, 4, 7, 3 playsewithpan SE_W026, SOUND_PAN_ATTACKER delay 4 createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 5, 0, 6, 1 - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 4, 0, 0, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 4, 0, 0, ANIM_TARGET, 1 playsewithpan SE_W233B, SOUND_PAN_TARGET waitforvisualfinish clearmonbg ANIM_ATK_PARTNER @@ -2758,8 +2758,8 @@ Move_RAGE: waitforvisualfinish createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 4, 6 delay 4 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 1, 2 - createvisualtask sub_80D6388, 2, 1, 1, 10, 1, 0 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, ANIM_TARGET, 2 + createvisualtask AnimTask_ShakeTargetBasedOnMovePowerOrDmg, 2, TRUE, 1, 10, 1, 0 playsewithpan SE_W233B, SOUND_PAN_TARGET waitforvisualfinish clearmonbg ANIM_TARGET @@ -2767,7 +2767,7 @@ Move_RAGE: Move_TELEPORT: call SetPsychicBackground - createvisualtask sub_810F83C, 2 + createvisualtask AnimTask_Teleport, 2 playsewithpan SE_W100, SOUND_PAN_ATTACKER delay 15 call UnsetPsychicBackground @@ -2826,17 +2826,17 @@ Move_SKULL_BASH: SkullBashEnd: end SkullBashSetUp: - call SkullBashSetUp1 - call SkullBashSetUp1 + call SkullBashSetUpHeadDown + call SkullBashSetUpHeadDown waitforvisualfinish goto SkullBashEnd -SkullBashSetUp1: - createsprite gUnknown_0857FE88, ANIM_ATTACKER, 2, 0, -24, 0, 0, 10, 0 +SkullBashSetUpHeadDown: + createsprite gSlideMonToOffsetAndBackSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, -24, 0, 0, 10, 0 playsewithpan SE_W036, SOUND_PAN_ATTACKER waitforvisualfinish - createvisualtask sub_80D6134, 2, 16, 96, 0, 2 + createvisualtask AnimTask_RotateMonSpriteToSide, 2, 16, 96, 0, 2 waitforvisualfinish - createsprite gUnknown_0857FE88, ANIM_ATTACKER, 2, 0, 24, 0, 0, 10, 1 + createsprite gSlideMonToOffsetAndBackSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 24, 0, 0, 10, 1 waitforvisualfinish return SkullBashAttack: @@ -2848,7 +2848,7 @@ SkullBashAttack: createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 1, RGB_BLACK, 14, 0x7FFF, 14 createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_ATTACKER, 2, 0, 40, 1 createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_TARGET, 10, 0, 40, 1 - createsprite gUnknown_085973E8, ANIM_TARGET, 4, 0, 0, 1, 0 + createsprite gFlashingHitSplatSpriteTemplate, ANIM_TARGET, 4, 0, 0, ANIM_TARGET, 0 loopsewithpan SE_W025B, SOUND_PAN_TARGET, 8, 3 waitforvisualfinish createvisualtask AnimTask_SkullBashPosition, 2, 1 @@ -2858,7 +2858,7 @@ Move_AMNESIA: loadspritegfx ANIM_TAG_AMNESIA call SetPsychicBackground delay 8 - createsprite gUnknown_08596744, ANIM_ATTACKER, 20 + createsprite gQuestionMarkSpriteTemplate, ANIM_ATTACKER, 20 playsewithpan SE_W118, SOUND_PAN_ATTACKER delay 54 loopsewithpan SE_W118, SOUND_PAN_ATTACKER, 16, 3 @@ -2871,7 +2871,7 @@ Move_KINESIS: loadspritegfx ANIM_TAG_BENT_SPOON playsewithpan SE_W060, SOUND_PAN_ATTACKER call SetPsychicBackground - createsprite gUnknown_085966DC, ANIM_ATTACKER, 20 + createsprite gBentSpoonSpriteTemplate, ANIM_ATTACKER, 20 createsprite gKinesisZapEnergySpriteTemplate, ANIM_ATTACKER, 19, 32, -8, 0 createsprite gKinesisZapEnergySpriteTemplate, ANIM_ATTACKER, 19, 32, 16, 1 loopsewithpan SE_W109, SOUND_PAN_ATTACKER, 21, 2 @@ -2891,16 +2891,16 @@ Move_GLARE: createvisualtask AnimTask_GlareEyeDots, 5, 0 playsewithpan SE_W060B, SOUND_PAN_ATTACKER waitforvisualfinish - createvisualtask sub_8116620, 5, 1, 0, 0, 16, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 5, 1, 0, 0, 16, RGB_BLACK waitforvisualfinish createsprite gEyeSparkleSpriteTemplate, ANIM_ATTACKER, 0, -16, -8 createsprite gEyeSparkleSpriteTemplate, ANIM_ATTACKER, 0, 16, -8 createvisualtask AnimTask_ScaryFace, 5 playsewithpan SE_W043, SOUND_PAN_ATTACKER delay 2 - createvisualtask sub_810A094, 3, 20, 1, 0 + createvisualtask AnimTask_ShakeTargetInPattern, 3, 20, 1, FALSE waitforvisualfinish - createvisualtask sub_8116620, 5, 1, 0, 16, 0, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 5, 1, 0, 16, 0, RGB_BLACK end Move_BARRAGE: @@ -2908,7 +2908,7 @@ Move_BARRAGE: createvisualtask AnimTask_BarrageBall, 3 playsewithpan SE_W207, SOUND_PAN_ATTACKER delay 24 - createsprite gBattleAnimSpriteTemplate_85972D8, ANIM_ATTACKER, 2, 8, 1, 40, 1 + createsprite gShakeMonOrTerrainSpriteTemplate, ANIM_ATTACKER, 2, 8, 1, 40, 1 createvisualtask AnimTask_ShakeMon, 3, ANIM_TARGET, 0, 4, 20, 1 createvisualtask AnimTask_ShakeMon, 3, ANIM_DEF_PARTNER, 0, 4, 20, 1 loopsewithpan SE_W070, SOUND_PAN_TARGET, 8, 2 @@ -2925,34 +2925,34 @@ SkyAttackSetUp: jumpretfalse SkyAttackSetUpAgainstOpponent goto SkyAttackSetUpAgainstPartner SkyAttackSetUpAgainstOpponent: - createvisualtask sub_8116620, 10, 27, 1, 0, 12, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, 27, 1, 0, 12, RGB_BLACK waitforvisualfinish delay 12 - createvisualtask sub_8116620, 10, 2, 1, 8, 0, RGB_BLACK - createvisualtask sub_81152DC, 5, 0, 2, 16 + createvisualtask AnimTask_BlendBattleAnimPal, 10, 2, 1, 8, 0, RGB_BLACK + createvisualtask AnimTask_HorizontalShake, 5, ANIM_ATTACKER, 2, 16 loopsewithpan SE_W287, SOUND_PAN_ATTACKER, 4, 8 - createvisualtask sub_8116620, 10, 2, 1, 0, 15, RGB_WHITE + createvisualtask AnimTask_BlendBattleAnimPal, 10, 2, 1, 0, 15, RGB_WHITE delay 20 - createvisualtask sub_8116620, 10, 2, 1, 15, 0, RGB_WHITE + createvisualtask AnimTask_BlendBattleAnimPal, 10, 2, 1, 15, 0, RGB_WHITE waitforvisualfinish - createvisualtask sub_8116620, 10, 25, 1, 8, 0, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, 25, 1, 8, 0, RGB_BLACK waitforvisualfinish clearmonbg ANIM_DEF_PARTNER blendoff goto SkyAttackEnd SkyAttackSetUpAgainstPartner: - createvisualtask sub_8116664, 10, 1, 1, 0, 12, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPalExclude, 10, ANIM_TARGET, 1, 0, 12, RGB_BLACK waitforvisualfinish delay 12 - createvisualtask sub_8116620, 10, 2, 1, 8, 0, RGB_BLACK - createvisualtask sub_81152DC, 5, 0, 2, 16 + createvisualtask AnimTask_BlendBattleAnimPal, 10, 2, 1, 8, 0, RGB_BLACK + createvisualtask AnimTask_HorizontalShake, 5, ANIM_ATTACKER, 2, 16 playsewithpan SE_W287, SOUND_PAN_ATTACKER delay 8 - createvisualtask sub_8116620, 10, 2, 1, 0, 15, RGB_WHITE + createvisualtask AnimTask_BlendBattleAnimPal, 10, 2, 1, 0, 15, RGB_WHITE delay 20 - createvisualtask sub_8116620, 10, 2, 1, 15, 0, RGB_WHITE + createvisualtask AnimTask_BlendBattleAnimPal, 10, 2, 1, 15, 0, RGB_WHITE waitforvisualfinish - createvisualtask sub_8116664, 10, 4, 1, 8, 0, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPalExclude, 10, 4, 1, 8, 0, RGB_BLACK waitforvisualfinish clearmonbg ANIM_DEF_PARTNER blendoff @@ -2962,19 +2962,19 @@ SkyAttackUnleash: loadspritegfx ANIM_TAG_BIRD call SetSkyBg monbg ANIM_ATTACKER - createvisualtask sub_8116620, 10, 2, 0, 0, 16, RGB_WHITE + createvisualtask AnimTask_BlendBattleAnimPal, 10, 2, 0, 0, 16, RGB_WHITE delay 4 - createvisualtask sub_81136E8, 5, 0 + createvisualtask AnimTask_AttackerFadeToInvisible, 5, 0 waitforvisualfinish - createvisualtask sub_8159244, 5, 238, SOUND_PAN_ATTACKER - createsprite gUnknown_08596514, ANIM_TARGET, 2 + createvisualtask SoundTask_PlaySE2WithPanning, 5, SE_W327, SOUND_PAN_ATTACKER + createsprite gSkyAttackBirdSpriteTemplate, ANIM_TARGET, 2 delay 14 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 10, 0, 18, 1 - createvisualtask sub_8159210, 5, 141, SOUND_PAN_TARGET + createvisualtask SoundTask_PlaySE1WithPanning, 5, SE_W025B, SOUND_PAN_TARGET delay 20 - createvisualtask sub_81137E4, 5, 1 + createvisualtask AnimTask_AttackerFadeFromInvisible, 5, 1 delay 2 - createvisualtask sub_8116620, 10, 2, 0, 15, 0, RGB_WHITE + createvisualtask AnimTask_BlendBattleAnimPal, 10, 2, 0, 15, 0, RGB_WHITE waitforvisualfinish clearmonbg ANIM_ATTACKER call UnsetSkyBg @@ -2982,7 +2982,7 @@ SkyAttackUnleash: Move_FLASH: playsewithpan SE_W043, SOUND_PAN_ATTACKER - createvisualtask sub_8117494, 2 + createvisualtask AnimTask_Flash, 2 waitforvisualfinish end @@ -3051,7 +3051,7 @@ Move_STRUGGLE: createsprite gMovementWavesSpriteTemplate, ANIM_ATTACKER, 2, 0, 1, 2 loopsewithpan SE_W029, SOUND_PAN_ATTACKER, 12, 4 waitforvisualfinish - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 1, 2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, ANIM_TARGET, 2 createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_TARGET, 3, 0, 6, 1 playsewithpan SE_W025B, SOUND_PAN_TARGET waitforvisualfinish @@ -3062,7 +3062,7 @@ Move_STRUGGLE: Move_SKETCH: loadspritegfx ANIM_TAG_PENCIL monbg ANIM_TARGET - createvisualtask sub_8104E74, 2 + createvisualtask AnimTask_SketchDrawMon, 2 createsprite gPencilSpriteTemplate, ANIM_TARGET, 2 waitforvisualfinish clearmonbg ANIM_TARGET @@ -3075,7 +3075,7 @@ Move_NIGHTMARE: waitbgfadein jumpifcontest NightmareInContest monbg ANIM_DEF_PARTNER - createvisualtask sub_8111C50, 2 + createvisualtask AnimTask_NightmareClone, 2 createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 3, 0, 40, 1 playsewithpan SE_W171, SOUND_PAN_TARGET waitforvisualfinish @@ -3099,8 +3099,8 @@ Move_FLAIL: createvisualtask AnimTask_FlailMovement, 2, ANIM_ATTACKER loopsewithpan SE_W029, SOUND_PAN_ATTACKER, 8, 2 waitforvisualfinish - createsprite gUnknown_085973A0, ANIM_TARGET, 3, 1, 3 - createvisualtask sub_80D6388, 2, 0, 1, 30, 1, 0 + createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, ANIM_TARGET, 3 + createvisualtask AnimTask_ShakeTargetBasedOnMovePowerOrDmg, 2, FALSE, 1, 30, 1, 0 playsewithpan SE_W025B, SOUND_PAN_TARGET waitforvisualfinish clearmonbg ANIM_TARGET @@ -3112,8 +3112,8 @@ Move_SPITE: playsewithpan SE_W060, SOUND_PAN_ATTACKER waitbgfadein monbg ANIM_DEF_PARTNER - createvisualtask sub_8115A04, 2, 2, 2, 6, 0, 8, RGB_WHITE - createvisualtask sub_8111E50, 2 + createvisualtask AnimTask_BlendColorCycle, 2, 2, 2, 6, 0, 8, RGB_WHITE + createvisualtask AnimTask_SpiteTargetShadow, 2 loopsewithpan SE_W060, SOUND_PAN_TARGET, 20, 3 waitforvisualfinish restorebg @@ -3130,14 +3130,14 @@ Move_MACH_PUNCH: fadetobg BG_HIGHSPEED_OPPONENT MachPunchContinue: waitbgfadeout - createvisualtask sub_8117660, 5, -2304, 0, 1, -1 + createvisualtask AnimTask_StartSlidingBg, 5, -2304, 0, 1, -1 waitbgfadein delay 0 setalpha 9, 8 - createvisualtask sub_80A8BC4, 2, 28968, 10 + createvisualtask AnimTask_AttackerPunchWithTrace, 2, RGB(8, 9, 28), 10 playsewithpan SE_W026, SOUND_PAN_ATTACKER delay 6 - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0, 0, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0, 0, ANIM_TARGET, 1 createsprite gFistFootSpriteTemplate, ANIM_TARGET, 4, 0, 0, 8, 1, 0 playsewithpan SE_W004, SOUND_PAN_TARGET createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 3, 0, 6, 1 @@ -3146,7 +3146,7 @@ MachPunchContinue: blendoff restorebg waitbgfadeout - setarg 7, -1 + setarg 7, 0xFFFF waitbgfadein end MachPunchAgainstPlayer: @@ -3177,13 +3177,13 @@ Move_DESTINY_BOND: fadetobg BG_GHOST playsewithpan SE_W060, SOUND_PAN_ATTACKER waitbgfadein - createvisualtask sub_81123C4, 5, 0, 48 + createvisualtask AnimTask_DestinyBondWhiteShadow, 5, 0, 48 playsewithpan SE_W109, SOUND_PAN_ATTACKER delay 48 createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_ATTACKER, 2, 0, 24, 1 - createvisualtask sub_8116664, 2, 6, 1, 0, 12, RGB(29, 29, 29) + createvisualtask AnimTask_BlendBattleAnimPalExclude, 2, 6, 1, 0, 12, RGB(29, 29, 29) delay 24 - createvisualtask sub_8116664, 2, 6, 1, 12, 0, RGB(29, 29, 29) + createvisualtask AnimTask_BlendBattleAnimPalExclude, 2, 6, 1, 12, 0, RGB(29, 29, 29) playsewithpan SE_W171, SOUND_PAN_TARGET waitforvisualfinish restorebg @@ -3197,7 +3197,7 @@ Move_ENDURE: playsewithpan SE_W082, SOUND_PAN_ATTACKER call EndureEffect delay 8 - createvisualtask sub_8115A04, 2, 2, 2, 2, 0, 11, RGB_RED + createvisualtask AnimTask_BlendColorCycle, 2, 2, 2, 2, 0, 11, RGB_RED createvisualtask AnimTask_ShakeMon2, 2, ANIM_ATTACKER, 1, 0, 32, 1 call EndureEffect delay 8 @@ -3238,10 +3238,10 @@ Move_ROLLOUT: monbg ANIM_DEF_PARTNER monbgprio_28 ANIM_TARGET setalpha 12, 8 - createvisualtask sub_8110F74, 2 + createvisualtask AnimTask_Rollout, 2 waitforvisualfinish - createvisualtask sub_80D6388, 2, 0, 1, 30, 1, 0 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 4, 0, 0, 1, 2 + createvisualtask AnimTask_ShakeTargetBasedOnMovePowerOrDmg, 2, FALSE, 1, 30, 1, 0 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 4, 0, 0, ANIM_TARGET, 2 playsewithpan SE_W025B, SOUND_PAN_TARGET waitforvisualfinish clearmonbg ANIM_DEF_PARTNER @@ -3271,7 +3271,7 @@ Move_FALSE_SWIPE: delay 2 waitforvisualfinish createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 5, 0, 6, 1 - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 4, 0, 0, 1, 3 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 4, 0, 0, ANIM_TARGET, 3 playsewithpan SE_W004, SOUND_PAN_TARGET end @@ -3322,13 +3322,13 @@ Move_MAGNITUDE: MagnitudeEnd: end MagnitudeRegular: - createvisualtask sub_81152DC, 5, 5, 0, 50 - createvisualtask sub_81152DC, 5, 4, 0, 50 + createvisualtask AnimTask_HorizontalShake, 5, (MAX_BATTLERS_COUNT + 1), 0, 50 + createvisualtask AnimTask_HorizontalShake, 5, MAX_BATTLERS_COUNT, 0, 50 loopsewithpan SE_W070, SOUND_PAN_TARGET, 8, 10 goto MagnitudeEnd MagnitudeIntense: - createvisualtask sub_81152DC, 5, 5, 0, 50 - createvisualtask sub_81152DC, 5, 4, 0, 50 + createvisualtask AnimTask_HorizontalShake, 5, (MAX_BATTLERS_COUNT + 1), 0, 50 + createvisualtask AnimTask_HorizontalShake, 5, MAX_BATTLERS_COUNT, 0, 50 loopsewithpan SE_W070, SOUND_PAN_TARGET, 8, 10 delay 10 createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 1, RGB_BLACK, 14, 0x7FFF, 14 @@ -3344,8 +3344,8 @@ Move_RAPID_SPIN: createvisualtask AnimTask_RapinSpinMonElevation, 2, 0, 2, 0 loopsewithpan SE_W013B, SOUND_PAN_ATTACKER, 8, 4 waitforvisualfinish - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, 0, 0, 1, 2 - createvisualtask sub_80D6388, 2, 0, 1, 10, 1, 0 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, 0, 0, ANIM_TARGET, 2 + createvisualtask AnimTask_ShakeTargetBasedOnMovePowerOrDmg, 2, FALSE, 1, 10, 1, 0 playsewithpan SE_W003, SOUND_PAN_TARGET waitforvisualfinish delay 8 @@ -3363,7 +3363,7 @@ Move_MOONLIGHT: createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 1, 0, 16, RGB_BLACK waitforvisualfinish createsprite gMoonSpriteTemplate, ANIM_ATTACKER, 2, 120, 56 - createvisualtask sub_80A7A74, 3, 0, 16, 16, 0, 1 + createvisualtask AnimTask_AlphaFadeIn, 3, 0, 16, 16, 0, 1 playsewithpan SE_W236, 0 delay 30 createsprite gMoonlightSparkleSpriteTemplate, ANIM_ATTACKER, 40, -12, 0 @@ -3376,7 +3376,7 @@ Move_MOONLIGHT: delay 30 createsprite gMoonlightSparkleSpriteTemplate, ANIM_ATTACKER, 40, 10, 0 delay 20 - createvisualtask AnimTask_FadeScreenBlue, 2 + createvisualtask AnimTask_MoonlightEndFade, 2 waitforvisualfinish call HealingEffect waitforvisualfinish @@ -3390,26 +3390,26 @@ Move_EXTREME_SPEED: fadetobg BG_HIGHSPEED_OPPONENT ExtremeSpeedContinue: waitbgfadeout - createvisualtask sub_8117660, 5, -2304, 0, 1, -1 + createvisualtask AnimTask_StartSlidingBg, 5, -2304, 0, 1, -1 waitbgfadein - createvisualtask AnimTask_StretchAttacker, 2 + createvisualtask AnimTask_AttackerStretchAndDisappear, 2 loopsewithpan SE_W013B, SOUND_PAN_ATTACKER, 8, 3 waitforvisualfinish delay 1 - createvisualtask AnimTask_ExtremeSpeedMoveTarget, 2 + createvisualtask AnimTask_SetAttackerInvisibleWaitForSignal, 2 monbg ANIM_TARGET setalpha 12, 8 delay 18 createvisualtask AnimTask_ExtremeSpeedImpact, 2 delay 2 playsewithpan SE_W004, SOUND_PAN_TARGET - createsprite gBattleAnimSpriteTemplate_85973B8, ANIM_TARGET, 2, 1, 0, -12, 3 + createsprite gMonEdgeHitSplatSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0, -12, 3 delay 10 playsewithpan SE_W004, SOUND_PAN_TARGET - createsprite gBattleAnimSpriteTemplate_85973B8, ANIM_TARGET, 2, 1, 0, 12, 3 + createsprite gMonEdgeHitSplatSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0, 12, 3 delay 10 playsewithpan SE_W233B, SOUND_PAN_TARGET - createsprite gBattleAnimSpriteTemplate_85973B8, ANIM_TARGET, 2, 1, 0, 0, 3 + createsprite gMonEdgeHitSplatSpriteTemplate, ANIM_TARGET, 2, ANIM_TARGET, 0, 0, 3 waitforvisualfinish createvisualtask AnimTask_SpeedDust, 2 delay 10 @@ -3418,7 +3418,7 @@ ExtremeSpeedContinue: waitforvisualfinish restorebg waitbgfadeout - setarg 7, -1 + setarg 7, 0xFFFF waitbgfadein clearmonbg ANIM_TARGET blendoff @@ -3462,32 +3462,33 @@ Move_HEAT_WAVE: createvisualtask AnimTask_BlendBackground, 6, 6, RGB_RED panse_1B SE_W257, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0 delay 4 - createvisualtask sub_8109DBC, 5 + createvisualtask AnimTask_MoveHeatWaveTargets, 5 delay 12 - createsprite gBattleAnimSpriteTemplate_8596BA0, ANIM_ATTACKER, 40, 10, 2304, 96, 1 + createsprite gFlyingSandCrescentSpriteTemplate, ANIM_ATTACKER, 40, 10, 2304, 96, 1 delay 10 - createsprite gBattleAnimSpriteTemplate_8596BA0, ANIM_ATTACKER, 40, 90, 2048, 96, 1 + createsprite gFlyingSandCrescentSpriteTemplate, ANIM_ATTACKER, 40, 90, 2048, 96, 1 delay 10 - createsprite gBattleAnimSpriteTemplate_8596BA0, ANIM_ATTACKER, 40, 50, 2560, 96, 1 + createsprite gFlyingSandCrescentSpriteTemplate, ANIM_ATTACKER, 40, 50, 2560, 96, 1 delay 10 - createsprite gBattleAnimSpriteTemplate_8596BA0, ANIM_ATTACKER, 40, 20, 2304, 96, 1 + createsprite gFlyingSandCrescentSpriteTemplate, ANIM_ATTACKER, 40, 20, 2304, 96, 1 delay 10 - createsprite gBattleAnimSpriteTemplate_8596BA0, ANIM_ATTACKER, 40, 70, 1984, 96, 1 + createsprite gFlyingSandCrescentSpriteTemplate, ANIM_ATTACKER, 40, 70, 1984, 96, 1 delay 10 - createsprite gBattleAnimSpriteTemplate_8596BA0, ANIM_ATTACKER, 40, 0, 2816, 96, 1 + createsprite gFlyingSandCrescentSpriteTemplate, ANIM_ATTACKER, 40, 0, 2816, 96, 1 delay 10 - createsprite gBattleAnimSpriteTemplate_8596BA0, ANIM_ATTACKER, 40, 60, 2560, 96, 1 + createsprite gFlyingSandCrescentSpriteTemplate, ANIM_ATTACKER, 40, 60, 2560, 96, 1 end +@ Also used by Hail weather Move_HAIL: loadspritegfx ANIM_TAG_HAIL loadspritegfx ANIM_TAG_ICE_CRYSTALS - createvisualtask sub_8116620, 10, 1, 3, 0, 6, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, 1, 3, 0, 6, RGB_BLACK waitforvisualfinish - createvisualtask AnimTask_Hail1, 5 + createvisualtask AnimTask_Hail, 5 loopsewithpan SE_W258, 0, 8, 10 waitforvisualfinish - createvisualtask sub_8116620, 10, 1, 3, 6, 0, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, 1, 3, 6, 0, RGB_BLACK end Move_TORMENT: @@ -3506,9 +3507,9 @@ Move_TORMENT: Move_MEMENTO: setalpha 0, 16 delay 1 - createvisualtask sub_81143C0, 2 + createvisualtask AnimTask_InitMementoShadow, 2 delay 1 - createvisualtask sub_8113BAC, 5 + createvisualtask AnimTask_MoveAttackerMementoShadow, 5 playsewithpan SE_W060, SOUND_PAN_ATTACKER delay 48 playsewithpan SE_W060B, SOUND_PAN_ATTACKER @@ -3518,7 +3519,7 @@ Move_MEMENTO: setalpha 0, 16 delay 1 monbg_22 ANIM_TARGET - createvisualtask sub_8113E78, 5 + createvisualtask AnimTask_MoveTargetMementoShadow, 5 playsewithpan SE_W060, SOUND_PAN_TARGET waitforvisualfinish clearmonbg_23 ANIM_TARGET @@ -3567,13 +3568,13 @@ Move_CHARGE: setalpha 12, 8 createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 2, 0, 4, RGB_BLACK waitforvisualfinish - createvisualtask sub_810AAFC, 2, 0, 60, 2, 12 + createvisualtask AnimTask_ElectricChargingParticles, 2, ANIM_ATTACKER, 60, 2, 12 playsewithpan SE_W268, SOUND_PAN_ATTACKER delay 30 playsewithpan SE_W268, SOUND_PAN_ATTACKER delay 30 playsewithpan SE_W268, SOUND_PAN_ATTACKER - createsprite gUnknown_0859595C, ANIM_ATTACKER, 2, 0 + createsprite gGrowingChargeOrbSpriteTemplate, ANIM_ATTACKER, 2, 0 delay 25 playsewithpan SE_W268, SOUND_PAN_ATTACKER delay 20 @@ -3584,9 +3585,9 @@ Move_CHARGE: delay 6 loopsewithpan SE_W268, SOUND_PAN_ATTACKER, 6, 5 waitforvisualfinish - createsprite gUnknown_0859598C, ANIM_ATTACKER, 2, 0, 16, 16 + createsprite gElectricPuffSpriteTemplate, ANIM_ATTACKER, 2, 0, 16, 16 delay 2 - createsprite gUnknown_0859598C, ANIM_ATTACKER, 2, 0, -16, -16 + createsprite gElectricPuffSpriteTemplate, ANIM_ATTACKER, 2, 0, -16, -16 playsewithpan SE_W085B, SOUND_PAN_ATTACKER waitforvisualfinish createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 4, 4, 0, RGB_BLACK @@ -3655,23 +3656,23 @@ Move_SUPERPOWER: monbg ANIM_ATK_PARTNER monbgprio_28 ANIM_ATTACKER setalpha 12, 8 - createsprite gUnknown_08595FEC, ANIM_TARGET, 2, 0 + createsprite gSuperpowerOrbSpriteTemplate, ANIM_TARGET, 2, ANIM_ATTACKER playsewithpan SE_W025, SOUND_PAN_ATTACKER delay 20 - createsprite gBattleAnimSpriteTemplate_85972D8, ANIM_ATTACKER, 2, 4, 1, 180, 1 - createvisualtask sub_8159244, 5, 234, 0 + createsprite gShakeMonOrTerrainSpriteTemplate, ANIM_ATTACKER, 2, 4, 1, 180, 1 + createvisualtask SoundTask_PlaySE2WithPanning, 5, SE_W089, 0 delay 40 - createsprite gUnknown_08596004, ANIM_ATTACKER, 41, 200, 96, 1, 120 + createsprite gSuperpowerRockSpriteTemplate, ANIM_ATTACKER, 41, 200, 96, 1, 120 delay 8 - createsprite gUnknown_08596004, ANIM_ATTACKER, 41, 20, 248, 4, 112 + createsprite gSuperpowerRockSpriteTemplate, ANIM_ATTACKER, 41, 20, 248, 4, 112 delay 8 - createsprite gUnknown_08596004, ANIM_ATTACKER, 41, 130, 160, 2, 104 + createsprite gSuperpowerRockSpriteTemplate, ANIM_ATTACKER, 41, 130, 160, 2, 104 delay 8 - createsprite gUnknown_08596004, ANIM_ATTACKER, 41, 160, 192, 0, 96 + createsprite gSuperpowerRockSpriteTemplate, ANIM_ATTACKER, 41, 160, 192, 0, 96 delay 8 - createsprite gUnknown_08596004, ANIM_ATTACKER, 41, 60, 288, 3, 88 + createsprite gSuperpowerRockSpriteTemplate, ANIM_ATTACKER, 41, 60, 288, 3, 88 delay 74 - createsprite gUnknown_0859601C, ANIM_TARGET, 3, 0 + createsprite gSuperpowerFireballSpriteTemplate, ANIM_TARGET, 3, ANIM_ATTACKER playsewithpan SE_W207, SOUND_PAN_ATTACKER delay 16 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 8, 0, 16, 1 @@ -3710,18 +3711,18 @@ BrickBreakNormal: createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 3, 8 delay 4 delay 1 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, -18, -18, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, -18, -18, ANIM_TARGET, 1 playsewithpan SE_W233, SOUND_PAN_TARGET delay 20 createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 3, 8 delay 5 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 18, 18, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 18, 18, ANIM_TARGET, 1 playsewithpan SE_W233, SOUND_PAN_TARGET delay 20 createvisualtask AnimTask_WindUpLunge, 2, ANIM_ATTACKER, -24, 0, 24, 10, 24, 3 createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 2, 0, 6, RGB_BLACK delay 37 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, ANIM_TARGET, 1 createsprite gFistFootSpriteTemplate, ANIM_ATTACKER, 4, 0, 0, 10, 1, 0 playsewithpan SE_W233B, SOUND_PAN_TARGET waitforvisualfinish @@ -3734,27 +3735,27 @@ BrickBreakShatteredWall: setalpha 12, 8 createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 3, 8 delay 4 - createsprite gUnknown_08595F90, ANIM_ATTACKER, 3, 1, 0, 0, 90, 10 + createsprite gBrickBreakWallSpriteTemplate, ANIM_ATTACKER, 3, ANIM_TARGET, 0, 0, 90, 10 delay 1 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, -18, -18, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, -18, -18, ANIM_TARGET, 1 playsewithpan SE_W233, SOUND_PAN_TARGET delay 20 createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 3, 8 delay 5 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 18, 18, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 18, 18, ANIM_TARGET, 1 playsewithpan SE_W233, SOUND_PAN_TARGET delay 20 createvisualtask AnimTask_WindUpLunge, 2, ANIM_ATTACKER, -24, 0, 24, 10, 24, 3 createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 2, 0, 6, RGB_BLACK delay 37 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, ANIM_TARGET, 1 createsprite gFistFootSpriteTemplate, ANIM_ATTACKER, 4, 0, 0, 10, 1, 0 playsewithpan SE_W233B, SOUND_PAN_TARGET waitforvisualfinish - createsprite gUnknown_08595FA8, ANIM_ATTACKER, 2, 1, 0, -8, -12 - createsprite gUnknown_08595FA8, ANIM_ATTACKER, 2, 1, 1, 8, -12 - createsprite gUnknown_08595FA8, ANIM_ATTACKER, 2, 1, 2, -8, 12 - createsprite gUnknown_08595FA8, ANIM_ATTACKER, 2, 1, 3, 8, 12 + createsprite gBrickBreakWallShardSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 0, -8, -12 + createsprite gBrickBreakWallShardSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 1, 8, -12 + createsprite gBrickBreakWallShardSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 2, -8, 12 + createsprite gBrickBreakWallShardSpriteTemplate, ANIM_ATTACKER, 2, ANIM_TARGET, 3, 8, 12 playsewithpan SE_W280, SOUND_PAN_TARGET waitforvisualfinish createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 2, 6, 0, RGB_BLACK @@ -3785,12 +3786,12 @@ Move_ENDEAVOR: loopsewithpan SE_W039, SOUND_PAN_ATTACKER, 24, 2 createvisualtask AnimTask_BlendMonInAndOut, 5, ANIM_ATTACKER, RGB(31, 21, 0), 12, 1, 2 delay 6 - createvisualtask sub_80D6388, 5, 0, 1, 8, 1, 0 - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, 12, -12, 1, 2 + createvisualtask AnimTask_ShakeTargetBasedOnMovePowerOrDmg, 5, FALSE, 1, 8, 1, 0 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, 12, -12, ANIM_TARGET, 2 playsewithpan SE_W003, SOUND_PAN_TARGET delay 24 - createvisualtask sub_80D6388, 5, 0, 1, 8, 1, 0 - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, -12, 12, 1, 2 + createvisualtask AnimTask_ShakeTargetBasedOnMovePowerOrDmg, 5, FALSE, 1, 8, 1, 0 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, -12, 12, ANIM_TARGET, 2 playsewithpan SE_W004, SOUND_PAN_TARGET end @@ -3798,22 +3799,22 @@ Move_ERUPTION: loadspritegfx ANIM_TAG_WARM_ROCK createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 2, 0, 4, RGB_RED waitforvisualfinish - createvisualtask sub_8109460, 2 + createvisualtask AnimTask_EruptionLaunchRocks, 2 waitplaysewithpan SE_W153, SOUND_PAN_ATTACKER, 60 waitforvisualfinish - createvisualtask sub_8109460, 2 + createvisualtask AnimTask_EruptionLaunchRocks, 2 waitplaysewithpan SE_W153, SOUND_PAN_ATTACKER, 60 waitforvisualfinish delay 30 - createsprite gUnknown_085955E8, ANIM_ATTACKER, 40, 200, -32, 0, 100, 0 - createsprite gUnknown_085955E8, ANIM_ATTACKER, 40, 30, -32, 16, 90, 1 - createsprite gUnknown_085955E8, ANIM_ATTACKER, 40, 150, -32, 32, 60, 2 - createsprite gUnknown_085955E8, ANIM_ATTACKER, 40, 90, -32, 48, 80, 3 - createsprite gUnknown_085955E8, ANIM_ATTACKER, 40, 110, -32, 64, 50, 0 - createsprite gUnknown_085955E8, ANIM_ATTACKER, 40, 60, -32, 80, 70, 1 + createsprite gEruptionFallingRockSpriteTemplate, ANIM_ATTACKER, 40, 200, -32, 0, 100, 0 + createsprite gEruptionFallingRockSpriteTemplate, ANIM_ATTACKER, 40, 30, -32, 16, 90, 1 + createsprite gEruptionFallingRockSpriteTemplate, ANIM_ATTACKER, 40, 150, -32, 32, 60, 2 + createsprite gEruptionFallingRockSpriteTemplate, ANIM_ATTACKER, 40, 90, -32, 48, 80, 3 + createsprite gEruptionFallingRockSpriteTemplate, ANIM_ATTACKER, 40, 110, -32, 64, 50, 0 + createsprite gEruptionFallingRockSpriteTemplate, ANIM_ATTACKER, 40, 60, -32, 80, 70, 1 delay 22 - createvisualtask sub_81152DC, 5, 5, 8, 60 - createvisualtask sub_81152DC, 5, 4, 8, 60 + createvisualtask AnimTask_HorizontalShake, 5, (MAX_BATTLERS_COUNT + 1), 8, 60 + createvisualtask AnimTask_HorizontalShake, 5, MAX_BATTLERS_COUNT, 8, 60 loopsewithpan SE_W088, SOUND_PAN_TARGET, 16, 12 delay 80 createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 40, 31, 4, 4, 0, RGB_RED @@ -3822,11 +3823,11 @@ Move_ERUPTION: Move_SKILL_SWAP: loadspritegfx ANIM_TAG_BLUEGREEN_ORB call SetPsychicBackground - createvisualtask sub_810FBF0, 3, 1 + createvisualtask AnimTask_SkillSwap, 3, ANIM_TARGET createvisualtask AnimTask_BlendMonInAndOut, 5, ANIM_TARGET, RGB_WHITE, 12, 3, 1 loopsewithpan SE_W179, SOUND_PAN_ATTACKER, 24, 3 delay 16 - createvisualtask sub_810FBF0, 3, 0 + createvisualtask AnimTask_SkillSwap, 3, ANIM_ATTACKER createvisualtask AnimTask_BlendMonInAndOut, 5, ANIM_ATTACKER, RGB_WHITE, 12, 3, 1 waitforvisualfinish call UnsetPsychicBackground @@ -3837,13 +3838,13 @@ Move_IMPRISON: loadspritegfx ANIM_TAG_X_SIGN call SetPsychicBackground monbg ANIM_DEF_PARTNER - createvisualtask sub_810F940, 5 + createvisualtask AnimTask_ImprisonOrbs, 5 delay 8 loopsewithpan SE_W030, SOUND_PAN_ATTACKER, 8, 5 waitforvisualfinish delay 4 - createsprite gUnknown_085967AC, ANIM_ATTACKER, 5, 0, 40 - createvisualtask sub_81152DC, 5, 4, 1, 10 + createsprite gRedXSpriteTemplate, ANIM_ATTACKER, 5, ANIM_ATTACKER, 40 + createvisualtask AnimTask_HorizontalShake, 5, MAX_BATTLERS_COUNT, 1, 10 playsewithpan SE_W063, SOUND_PAN_ATTACKER clearmonbg ANIM_DEF_PARTNER call UnsetPsychicBackground @@ -3856,7 +3857,7 @@ Move_GRUDGE: fadetobg BG_GHOST playsewithpan SE_W060, SOUND_PAN_ATTACKER waitbgfadein - createvisualtask sub_8112C6C, 3 + createvisualtask AnimTask_GrudgeFlames, 3 loopsewithpan SE_W052, SOUND_PAN_ATTACKER, 16, 4 delay 10 delay 80 @@ -3873,13 +3874,13 @@ Move_CAMOUFLAGE: setalpha 16, 0 createvisualtask AnimTask_SetCamouflageBlend, 5, 2, 3, 0, 14 delay 16 - createvisualtask sub_81136E8, 2, 4 + createvisualtask AnimTask_AttackerFadeToInvisible, 2, 4 playsewithpan SE_W185, SOUND_PAN_ATTACKER waitforvisualfinish delay 8 createvisualtask AnimTask_SetCamouflageBlend, 5, 2, 0, 0, 0 waitforvisualfinish - createvisualtask sub_81137E4, 2, 1 + createvisualtask AnimTask_AttackerFadeFromInvisible, 2, 1 waitforvisualfinish blendoff clearmonbg ANIM_ATK_PARTNER @@ -3891,7 +3892,7 @@ Move_TAIL_GLOW: setalpha 12, 8 createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 2, 0, 4, RGB_BLACK waitforvisualfinish - createsprite gUnknown_08596AC8, ANIM_ATTACKER, 66, 0 + createsprite gTailGlowOrbSpriteTemplate, ANIM_ATTACKER, 66, ANIM_ATTACKER delay 18 loopsewithpan SE_W234, SOUND_PAN_ATTACKER, 16, 6 waitforvisualfinish @@ -3911,33 +3912,33 @@ Move_LUSTER_PURGE: monbg ANIM_ATTACKER setalpha 12, 8 playsewithpan SE_W076, SOUND_PAN_ATTACKER - createsprite gUnknown_08596898, ANIM_ATTACKER, 41, 0, 0, 0, 0 + createsprite gLusterPurgeCircleSpriteTemplate, ANIM_ATTACKER, 41, 0, 0, 0, 0 delay 20 - createvisualtask sub_8116664, 5, 5, 2, 0, 16, RGB_WHITEALPHA + createvisualtask AnimTask_BlendBattleAnimPalExclude, 5, 5, 2, 0, 16, RGB_WHITEALPHA createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_WHITE_CIRCLE_OF_LIGHT, 2, 0, 16, RGB_WHITEALPHA waitforvisualfinish createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_IMPACT, 0, 12, 12, RGB(0, 0, 23) waitforvisualfinish - createsprite gUnknown_085973A0, ANIM_TARGET, 3, 1, 2 - createvisualtask sub_8159210, 5, 215, SOUND_PAN_TARGET + createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, 1, 2 + createvisualtask SoundTask_PlaySE1WithPanning, 5, SE_W063, SOUND_PAN_TARGET delay 3 - createsprite gUnknown_085973A0, ANIM_TARGET, 3, 1, 2 - createvisualtask sub_8159210, 5, 215, SOUND_PAN_TARGET + createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, 1, 2 + createvisualtask SoundTask_PlaySE1WithPanning, 5, SE_W063, SOUND_PAN_TARGET delay 3 - createsprite gUnknown_085973A0, ANIM_TARGET, 3, 1, 2 - createvisualtask sub_8159210, 5, 215, SOUND_PAN_TARGET + createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, 1, 2 + createvisualtask SoundTask_PlaySE1WithPanning, 5, SE_W063, SOUND_PAN_TARGET delay 3 - createsprite gUnknown_085973A0, ANIM_TARGET, 3, 1, 2 - createvisualtask sub_8159210, 5, 215, SOUND_PAN_TARGET + createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, 1, 2 + createvisualtask SoundTask_PlaySE1WithPanning, 5, SE_W063, SOUND_PAN_TARGET delay 3 - createsprite gUnknown_085973A0, ANIM_TARGET, 3, 1, 2 - createvisualtask sub_8159210, 5, 215, SOUND_PAN_TARGET + createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, 1, 2 + createvisualtask SoundTask_PlaySE1WithPanning, 5, SE_W063, SOUND_PAN_TARGET delay 3 - createsprite gUnknown_085973A0, ANIM_TARGET, 3, 1, 2 - createvisualtask sub_8159210, 5, 215, SOUND_PAN_TARGET + createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, 1, 2 + createvisualtask SoundTask_PlaySE1WithPanning, 5, SE_W063, SOUND_PAN_TARGET waitforvisualfinish - createvisualtask sub_8116664, 5, 5, 2, 16, 0, RGB_WHITEALPHA - createvisualtask sub_81152DC, 5, 1, 5, 14 + createvisualtask AnimTask_BlendBattleAnimPalExclude, 5, 5, 2, 16, 0, RGB_WHITEALPHA + createvisualtask AnimTask_HorizontalShake, 5, ANIM_TARGET, 5, 14 waitforvisualfinish clearmonbg ANIM_ATTACKER blendoff @@ -3949,7 +3950,7 @@ Move_MIST_BALL: loadspritegfx ANIM_TAG_WHITE_FEATHER delay 0 playsewithpan SE_W081, SOUND_PAN_ATTACKER - createsprite gUnknown_08595C70, ANIM_TARGET, 0, 0, 0, 0, 0, 30, 0 + createsprite gMistBallSpriteTemplate, ANIM_TARGET, 0, 0, 0, 0, 0, 30, 0 waitforvisualfinish playsewithpan SE_W028, SOUND_PAN_TARGET createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 5, 0, 10, 0 @@ -3957,11 +3958,11 @@ Move_MIST_BALL: delay 0 playsewithpan SE_W114, 0 createvisualtask AnimTask_LoadMistTiles, 5 - createvisualtask sub_8116620, 10, 4, 3, 0, 16, RGB_WHITE + createvisualtask AnimTask_BlendBattleAnimPal, 10, 4, 3, 0, 16, RGB_WHITE delay 8 createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 4, 0, 70, 0 delay 70 - createvisualtask sub_8116620, 10, 4, 2, 16, 0, RGB_WHITE + createvisualtask AnimTask_BlendBattleAnimPal, 10, 4, 2, 16, 0, RGB_WHITE end Move_FEATHER_DANCE: @@ -3970,18 +3971,18 @@ Move_FEATHER_DANCE: monbgprio_29 playsewithpan SE_W080, SOUND_PAN_TARGET delay 0 - createsprite gUnknown_08596388, ANIM_TARGET, 0, 0, -16, 64, 2, 104, 11304, 32, 1 + createsprite gFallingFeatherSpriteTemplate, ANIM_TARGET, 0, 0, -16, 64, 2, 104, 11304, 32, 1 delay 6 - createsprite gUnknown_08596388, ANIM_TARGET, 0, 0, -16, 32, 2, 104, 11304, 32, 1 - createsprite gUnknown_08596388, ANIM_TARGET, 0, 0, -16, 0, 2, 104, 11304, 32, 1 + createsprite gFallingFeatherSpriteTemplate, ANIM_TARGET, 0, 0, -16, 32, 2, 104, 11304, 32, 1 + createsprite gFallingFeatherSpriteTemplate, ANIM_TARGET, 0, 0, -16, 0, 2, 104, 11304, 32, 1 delay 6 - createsprite gUnknown_08596388, ANIM_TARGET, 0, 0, -16, 224, 2, 104, 11304, 32, 1 - createsprite gUnknown_08596388, ANIM_TARGET, 0, 0, -16, 128, 2, 104, 11304, 32, 1 + createsprite gFallingFeatherSpriteTemplate, ANIM_TARGET, 0, 0, -16, 224, 2, 104, 11304, 32, 1 + createsprite gFallingFeatherSpriteTemplate, ANIM_TARGET, 0, 0, -16, 128, 2, 104, 11304, 32, 1 delay 6 - createsprite gUnknown_08596388, ANIM_TARGET, 0, 0, -16, 192, 2, 104, 11304, 32, 1 - createsprite gUnknown_08596388, ANIM_TARGET, 0, 0, -16, 160, 2, 104, 11304, 32, 1 + createsprite gFallingFeatherSpriteTemplate, ANIM_TARGET, 0, 0, -16, 192, 2, 104, 11304, 32, 1 + createsprite gFallingFeatherSpriteTemplate, ANIM_TARGET, 0, 0, -16, 160, 2, 104, 11304, 32, 1 delay 6 - createsprite gUnknown_08596388, ANIM_TARGET, 0, 0, -16, 96, 2, 104, 11304, 32, 1 + createsprite gFallingFeatherSpriteTemplate, ANIM_TARGET, 0, 0, -16, 96, 2, 104, 11304, 32, 1 waitforvisualfinish clearmonbg ANIM_DEF_PARTNER end @@ -4010,46 +4011,46 @@ Move_MUD_SPORT: loadspritegfx ANIM_TAG_MUD_SAND createvisualtask AnimTask_Splash, 2, 0, 6 delay 24 - createsprite gUnknown_085971E4, ANIM_TARGET, 2, 0, -4, -16 - createsprite gUnknown_085971E4, ANIM_TARGET, 2, 0, 4, -12 + createsprite gMudsportMudSpriteTemplate, ANIM_TARGET, 2, 0, -4, -16 + createsprite gMudsportMudSpriteTemplate, ANIM_TARGET, 2, 0, 4, -12 playsewithpan SE_W091, SOUND_PAN_ATTACKER delay 32 - createsprite gUnknown_085971E4, ANIM_TARGET, 2, 0, -3, -12 - createsprite gUnknown_085971E4, ANIM_TARGET, 2, 0, 5, -14 + createsprite gMudsportMudSpriteTemplate, ANIM_TARGET, 2, 0, -3, -12 + createsprite gMudsportMudSpriteTemplate, ANIM_TARGET, 2, 0, 5, -14 playsewithpan SE_W091, SOUND_PAN_ATTACKER delay 32 - createsprite gUnknown_085971E4, ANIM_TARGET, 2, 0, -5, -18 - createsprite gUnknown_085971E4, ANIM_TARGET, 2, 0, 3, -14 + createsprite gMudsportMudSpriteTemplate, ANIM_TARGET, 2, 0, -5, -18 + createsprite gMudsportMudSpriteTemplate, ANIM_TARGET, 2, 0, 3, -14 playsewithpan SE_W091, SOUND_PAN_ATTACKER delay 16 - createsprite gUnknown_085971E4, ANIM_TARGET, 2, 1, 220, 60 + createsprite gMudsportMudSpriteTemplate, ANIM_TARGET, 2, 1, 220, 60 waitplaysewithpan SE_W145B, 0, 15 delay 2 - createsprite gUnknown_085971E4, ANIM_TARGET, 2, 1, 60, 100 + createsprite gMudsportMudSpriteTemplate, ANIM_TARGET, 2, 1, 60, 100 waitplaysewithpan SE_W145B, 0, 25 delay 2 - createsprite gUnknown_085971E4, ANIM_TARGET, 2, 1, 140, 55 + createsprite gMudsportMudSpriteTemplate, ANIM_TARGET, 2, 1, 140, 55 waitplaysewithpan SE_W145B, 0, 14 delay 2 - createsprite gUnknown_085971E4, ANIM_TARGET, 2, 1, 180, 50 + createsprite gMudsportMudSpriteTemplate, ANIM_TARGET, 2, 1, 180, 50 waitplaysewithpan SE_W145B, 0, 10 delay 2 - createsprite gUnknown_085971E4, ANIM_TARGET, 2, 1, 20, 90 + createsprite gMudsportMudSpriteTemplate, ANIM_TARGET, 2, 1, 20, 90 waitplaysewithpan SE_W145B, 0, 22 delay 2 - createsprite gUnknown_085971E4, ANIM_TARGET, 2, 1, 90, 90 + createsprite gMudsportMudSpriteTemplate, ANIM_TARGET, 2, 1, 90, 90 waitplaysewithpan SE_W145B, 0, 22 delay 2 - createsprite gUnknown_085971E4, ANIM_TARGET, 2, 1, 160, 60 + createsprite gMudsportMudSpriteTemplate, ANIM_TARGET, 2, 1, 160, 60 waitplaysewithpan SE_W145B, 0, 15 delay 2 - createsprite gUnknown_085971E4, ANIM_TARGET, 2, 1, 30, 90 + createsprite gMudsportMudSpriteTemplate, ANIM_TARGET, 2, 1, 30, 90 waitplaysewithpan SE_W145B, 0, 22 delay 2 - createsprite gUnknown_085971E4, ANIM_TARGET, 2, 1, 120, 60 + createsprite gMudsportMudSpriteTemplate, ANIM_TARGET, 2, 1, 120, 60 waitplaysewithpan SE_W145B, 0, 15 delay 2 - createsprite gUnknown_085971E4, ANIM_TARGET, 2, 1, 200, 40 + createsprite gMudsportMudSpriteTemplate, ANIM_TARGET, 2, 1, 200, 40 waitplaysewithpan SE_W145B, 0, 10 end @@ -4083,7 +4084,7 @@ Move_NEEDLE_ARM: createsprite gNeedleArmSpikeSpriteTemplate, ANIM_TARGET, 2, 1, 0, 16, 16, 16 waitforvisualfinish createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 4, 0, 18, 1 - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0, 0, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0, 0, ANIM_TARGET, 1 createsprite gFistFootSpriteTemplate, ANIM_TARGET, 4, 0, 0, 8, 1, 0 playsewithpan SE_W233B, SOUND_PAN_TARGET createsprite gNeedleArmSpikeSpriteTemplate, ANIM_TARGET, 2, 1, 1, 0, -24, 10 @@ -4114,12 +4115,12 @@ Move_CRUSH_CLAW: createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 6, 4 delay 4 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 2, 0, 18, 1 - createsprite gBattleAnimSpriteTemplate_8597138, ANIM_TARGET, 2, -10, -10, 0 - createsprite gBattleAnimSpriteTemplate_8597138, ANIM_TARGET, 2, -10, 10, 0 + createsprite gClawSlashSpriteTemplate, ANIM_TARGET, 2, -10, -10, 0 + createsprite gClawSlashSpriteTemplate, ANIM_TARGET, 2, -10, 10, 0 playsewithpan SE_W013, SOUND_PAN_TARGET delay 12 - createsprite gBattleAnimSpriteTemplate_8597138, ANIM_TARGET, 2, 10, -10, 1 - createsprite gBattleAnimSpriteTemplate_8597138, ANIM_TARGET, 2, 10, 10, 1 + createsprite gClawSlashSpriteTemplate, ANIM_TARGET, 2, 10, -10, 1 + createsprite gClawSlashSpriteTemplate, ANIM_TARGET, 2, 10, 10, 1 playsewithpan SE_W013, SOUND_PAN_TARGET waitforvisualfinish blendoff @@ -4152,7 +4153,7 @@ Move_AROMATHERAPY: createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 0, 1, 0, 7, 0, RGB(13, 31, 12) delay 1 playsewithpan SE_W287, SOUND_PAN_ATTACKER - createvisualtask sub_815DFCC, 2, 1 + createvisualtask AnimTask_StatusClearedEffect, 2, 1 waitforvisualfinish playsewithpan SE_W234, SOUND_PAN_ATTACKER createsprite gSparklingStarsSpriteTemplate, ANIM_ATTACKER, 16, -15, 0, 0, 0, 32, 60, 1 @@ -4174,17 +4175,17 @@ Move_FAKE_TEARS: createvisualtask AnimTask_RockMonBackAndForth, 5, ANIM_ATTACKER, 2, 1 loopsewithpan SE_W039, SOUND_PAN_ATTACKER, 12, 4 delay 8 - createsprite gUnknown_085970E8, ANIM_ATTACKER, 2, 0, 0 - createsprite gUnknown_085970E8, ANIM_ATTACKER, 2, 0, 1 + createsprite gTearDropSpriteTemplate, ANIM_ATTACKER, 2, 0, 0 + createsprite gTearDropSpriteTemplate, ANIM_ATTACKER, 2, 0, 1 delay 8 - createsprite gUnknown_085970E8, ANIM_ATTACKER, 2, 0, 2 - createsprite gUnknown_085970E8, ANIM_ATTACKER, 2, 0, 3 + createsprite gTearDropSpriteTemplate, ANIM_ATTACKER, 2, 0, 2 + createsprite gTearDropSpriteTemplate, ANIM_ATTACKER, 2, 0, 3 delay 8 - createsprite gUnknown_085970E8, ANIM_ATTACKER, 2, 0, 0 - createsprite gUnknown_085970E8, ANIM_ATTACKER, 2, 0, 1 + createsprite gTearDropSpriteTemplate, ANIM_ATTACKER, 2, 0, 0 + createsprite gTearDropSpriteTemplate, ANIM_ATTACKER, 2, 0, 1 delay 8 - createsprite gUnknown_085970E8, ANIM_ATTACKER, 2, 0, 2 - createsprite gUnknown_085970E8, ANIM_ATTACKER, 2, 0, 3 + createsprite gTearDropSpriteTemplate, ANIM_ATTACKER, 2, 0, 2 + createsprite gTearDropSpriteTemplate, ANIM_ATTACKER, 2, 0, 3 waitforvisualfinish end @@ -4285,13 +4286,13 @@ Move_WATER_SPOUT: loadspritegfx ANIM_TAG_WATER_IMPACT monbg ANIM_DEF_PARTNER setalpha 12, 8 - createvisualtask sub_81080E4, 5 + createvisualtask AnimTask_WaterSpoutLaunch, 5 playsewithpan SE_W029, SOUND_PAN_ATTACKER delay 44 playsewithpan SE_W291, SOUND_PAN_ATTACKER waitforvisualfinish delay 16 - createvisualtask sub_81085C8, 5 + createvisualtask AnimTask_WaterSpoutRain, 5 playsewithpan SE_W057, SOUND_PAN_TARGET clearmonbg ANIM_DEF_PARTNER blendoff @@ -4304,10 +4305,10 @@ Move_SHADOW_PUNCH: waitbgfadein monbg ANIM_ATK_PARTNER setalpha 9, 8 - createvisualtask sub_80A8BC4, 2, 0, 13 + createvisualtask AnimTask_AttackerPunchWithTrace, 2, RGB_BLACK, 13 playsewithpan SE_W026, SOUND_PAN_ATTACKER delay 6 - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0, 0, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0, 0, ANIM_TARGET, 1 createsprite gFistFootSpriteTemplate, ANIM_TARGET, 4, 0, 0, 8, 1, 0 playsewithpan SE_W004, SOUND_PAN_TARGET createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 3, 0, 6, 1 @@ -4323,15 +4324,15 @@ Move_EXTRASENSORY: monbg ANIM_DEF_PARTNER setalpha 12, 8 createvisualtask AnimTask_BlendMonInAndOut, 5, ANIM_ATTACKER, RGB(27, 27, 0), 12, 1, 1 - createvisualtask sub_810FE14, 5, 0 + createvisualtask AnimTask_ExtrasensoryDistortion, 5, 0 playsewithpan SE_W020, SOUND_PAN_TARGET waitforvisualfinish createvisualtask AnimTask_BlendMonInAndOut, 5, ANIM_ATTACKER, RGB(27, 27, 0), 12, 1, 1 - createvisualtask sub_810FE14, 5, 1 + createvisualtask AnimTask_ExtrasensoryDistortion, 5, 1 playsewithpan SE_W020, SOUND_PAN_TARGET waitforvisualfinish - createvisualtask sub_8110034, 5, 0 - createvisualtask sub_810FE14, 5, 2 + createvisualtask AnimTask_TransparentCloneGrowAndShrink, 5, ANIM_ATTACKER + createvisualtask AnimTask_ExtrasensoryDistortion, 5, 2 playsewithpan SE_W043, SOUND_PAN_ATTACKER waitforvisualfinish blendoff @@ -4344,7 +4345,7 @@ Move_AERIAL_ACE: monbg ANIM_TARGET setalpha 12, 8 createvisualtask AnimTask_TranslateMonEllipticalRespectSide, 2, ANIM_ATTACKER, 24, 6, 1, 5 - createvisualtask sub_81169C0, 2, 0, 4, 7, 3 + createvisualtask AnimTask_TraceMonBlended, 2, 0, 4, 7, 3 createsprite gCuttingSliceSpriteTemplate, ANIM_ATTACKER, 2, 40, -32, 0 playsewithpan SE_W013B, SOUND_PAN_ATTACKER delay 5 @@ -4374,7 +4375,7 @@ Move_HOWL: createvisualtask AnimTask_DeepInhale, 2, 0 delay 12 call RoarEffect - createvisualtask sub_8158D8C, 2, 0, 3 + createvisualtask SoundTask_PlayCryHighPitch, 2, ANIM_ATTACKER, 3 waitforvisualfinish delay 30 end @@ -4412,50 +4413,50 @@ Move_VOLT_TACKLE: loadspritegfx ANIM_TAG_ELECTRICITY monbg ANIM_ATTACKER setalpha 12, 8 - createvisualtask sub_8116620, 10, 1, 0, 0, 8, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, 1, 0, 0, 8, RGB_BLACK waitforvisualfinish - createsprite gUnknown_085959A4, ANIM_ATTACKER, 1 + createsprite gVoltTackleOrbSlideSpriteTemplate, ANIM_ATTACKER, 1 playsewithpan SE_W268, SOUND_PAN_ATTACKER waitforvisualfinish clearmonbg ANIM_ATTACKER blendoff delay 8 - createvisualtask sub_810AFCC, 5, 0 + createvisualtask AnimTask_VoltTackleBolt, 5, 0 playsewithpan SE_W085, SOUND_PAN_ATTACKER waitforvisualfinish - createvisualtask sub_810AFCC, 5, 1 + createvisualtask AnimTask_VoltTackleBolt, 5, 1 playsewithpan SE_W085, SOUND_PAN_TARGET waitforvisualfinish - createvisualtask sub_810AFCC, 5, 2 + createvisualtask AnimTask_VoltTackleBolt, 5, 2 playsewithpan SE_W085, SOUND_PAN_ATTACKER waitforvisualfinish - createvisualtask sub_810AFCC, 5, 3 + createvisualtask AnimTask_VoltTackleBolt, 5, 3 playsewithpan SE_W085, SOUND_PAN_TARGET waitforvisualfinish - createvisualtask sub_810AFCC, 5, 4 + createvisualtask AnimTask_VoltTackleBolt, 5, 4 playsewithpan SE_W085, SOUND_PAN_ATTACKER delay 8 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 10, 0, 18, 1 playsewithpan SE_W120, SOUND_PAN_TARGET - createsprite gUnknown_0859598C, ANIM_ATTACKER, 2, 1, 16, 16 + createsprite gElectricPuffSpriteTemplate, ANIM_ATTACKER, 2, 1, 16, 16 delay 2 - createsprite gUnknown_0859598C, ANIM_ATTACKER, 2, 1, -16, -16 + createsprite gElectricPuffSpriteTemplate, ANIM_ATTACKER, 2, 1, -16, -16 delay 8 - createvisualtask sub_810AE5C, 5 + createvisualtask AnimTask_VoltTackleAttackerReappear, 5 waitforvisualfinish createvisualtask AnimTask_ShakeMon2, 2, ANIM_ATTACKER, 3, 0, 9, 1 playsewithpan SE_W085B, SOUND_PAN_ATTACKER - createsprite gUnknown_0859598C, ANIM_ATTACKER, 2, 0, 16, 16 + createsprite gElectricPuffSpriteTemplate, ANIM_ATTACKER, 2, 0, 16, 16 delay 2 - createsprite gUnknown_0859598C, ANIM_ATTACKER, 2, 0, -16, -16 + createsprite gElectricPuffSpriteTemplate, ANIM_ATTACKER, 2, 0, -16, -16 waitforvisualfinish - createvisualtask sub_8116620, 10, 1, 0, 8, 0, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, 1, 0, 8, 0, RGB_BLACK waitforvisualfinish end Move_WATER_SPORT: loadspritegfx ANIM_TAG_GLOWY_BLUE_ORB - createvisualtask sub_81088E4, 5 + createvisualtask AnimTask_WaterSport, 5 delay 8 playsewithpan SE_W057, SOUND_PAN_ATTACKER delay 44 @@ -4469,9 +4470,9 @@ Move_WATER_SPORT: Move_CALM_MIND: loadspritegfx ANIM_TAG_THIN_RING monbg ANIM_ATK_PARTNER - createvisualtask sub_8116664, 5, 0, 0, 0, 16, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPalExclude, 5, ANIM_ATTACKER, 0, 0, 16, RGB_BLACK waitforvisualfinish - createvisualtask sub_81177E4, 5, 1 + createvisualtask AnimTask_SetAllNonAttackersInvisiblity, 5, TRUE waitforvisualfinish createsprite gThinRingShrinkingSpriteTemplate, ANIM_ATTACKER, 40, 0, 0, 0, 0 playsewithpan SE_W048, SOUND_PAN_ATTACKER @@ -4482,9 +4483,9 @@ Move_CALM_MIND: createsprite gThinRingShrinkingSpriteTemplate, ANIM_ATTACKER, 40, 0, 0, 0, 0 playsewithpan SE_W048, SOUND_PAN_ATTACKER waitforvisualfinish - createvisualtask sub_81177E4, 5, 0 + createvisualtask AnimTask_SetAllNonAttackersInvisiblity, 5, FALSE waitforvisualfinish - createvisualtask sub_8116664, 5, 0, 0, 16, 0, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPalExclude, 5, ANIM_ATTACKER, 0, 16, 0, RGB_BLACK waitforvisualfinish clearmonbg ANIM_ATK_PARTNER end @@ -4507,7 +4508,7 @@ Move_LEAF_BLADE: setalpha 12, 8 delay 12 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 8, 0, 18, 1 - createsprite gUnknown_085973D0, ANIM_TARGET, 2, 0, 0, 1, 36 + createsprite gCrossImpactSpriteTemplate, ANIM_TARGET, 2, 0, 0, 1, 36 playsewithpan SE_W043, SOUND_PAN_TARGET waitforvisualfinish clearmonbg ANIM_TARGET @@ -4519,16 +4520,16 @@ Move_DRAGON_DANCE: monbg ANIM_ATTACKER monbgprio_28 ANIM_ATTACKER delay 1 - createvisualtask sub_81133E8, 5 + createvisualtask AnimTask_DragonDanceWaver, 5 playsewithpan SE_W100, SOUND_PAN_ATTACKER delay 8 - createvisualtask sub_80A7CB4, 5, 10249, 19456, 14, 0, 3 - createsprite gUnknown_08596F98, ANIM_ATTACKER, 2, 0 - createsprite gUnknown_08596F98, ANIM_ATTACKER, 2, 43 - createsprite gUnknown_08596F98, ANIM_ATTACKER, 2, 85 - createsprite gUnknown_08596F98, ANIM_ATTACKER, 2, 128 - createsprite gUnknown_08596F98, ANIM_ATTACKER, 2, 170 - createsprite gUnknown_08596F98, ANIM_ATTACKER, 2, 213 + createvisualtask AnimTask_BlendPalInAndOutByTag, 5, ANIM_TAG_HOLLOW_ORB, RGB(0, 0, 19), 14, 0, 3 + createsprite gDragonDanceOrbSpriteTemplate, ANIM_ATTACKER, 2, 0 + createsprite gDragonDanceOrbSpriteTemplate, ANIM_ATTACKER, 2, 43 + createsprite gDragonDanceOrbSpriteTemplate, ANIM_ATTACKER, 2, 85 + createsprite gDragonDanceOrbSpriteTemplate, ANIM_ATTACKER, 2, 128 + createsprite gDragonDanceOrbSpriteTemplate, ANIM_ATTACKER, 2, 170 + createsprite gDragonDanceOrbSpriteTemplate, ANIM_ATTACKER, 2, 213 delay 30 playsewithpan SE_W100, SOUND_PAN_ATTACKER delay 30 @@ -4547,22 +4548,22 @@ Move_SHOCK_WAVE: setalpha 12, 8 createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 2, 0, 4, RGB_BLACK waitforvisualfinish - createvisualtask sub_810AAFC, 2, 0, 20, 0, 2 + createvisualtask AnimTask_ElectricChargingParticles, 2, ANIM_ATTACKER, 20, 0, 2 playsewithpan SE_W268, SOUND_PAN_ATTACKER delay 12 - createsprite gUnknown_08595A18, ANIM_ATTACKER, 2 + createsprite gGrowingShockWaveOrbSpriteTemplate, ANIM_ATTACKER, 2 delay 30 - createvisualtask sub_810B29C, 5 + createvisualtask AnimTask_ShockWaveProgressingBolt, 5 delay 12 waitforvisualfinish - createvisualtask sub_810B55C, 5 + createvisualtask AnimTask_ShockWaveLightning, 5 playsewithpan SE_W161B, SOUND_PAN_TARGET waitforvisualfinish createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 0, 6, 18, 1 - createvisualtask sub_8116620, 5, 1, 3, 16, 0, RGB_WHITE - createvisualtask sub_8116620, 5, 4, 0, 16, 16, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 5, 1, 3, 16, 0, RGB_WHITE + createvisualtask AnimTask_BlendBattleAnimPal, 5, 4, 0, 16, 16, RGB_BLACK delay 4 - createvisualtask sub_8116620, 5, 4, 0, 0, 0, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 5, 4, 0, 0, 0, RGB_BLACK waitforvisualfinish clearmonbg ANIM_ATTACKER blendoff @@ -4579,27 +4580,27 @@ Move_BELLY_DRUM: loadspritegfx ANIM_TAG_PURPLE_HAND_OUTLINE createvisualtask AnimTask_MusicNotesRainbowBlend, 2 waitforvisualfinish - call BellyDrum1 + call BellyDrumRight createsprite gSlowFlyingMusicNotesSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 0, 0 playsewithpan SE_W187, SOUND_PAN_ATTACKER delay 15 - call BellyDrum2 + call BellyDrumLeft createsprite gSlowFlyingMusicNotesSpriteTemplate, ANIM_ATTACKER, 2, 1, 1, 1, 0 playsewithpan SE_W187, SOUND_PAN_ATTACKER delay 15 - call BellyDrum1 + call BellyDrumRight createsprite gSlowFlyingMusicNotesSpriteTemplate, ANIM_ATTACKER, 2, 0, 3, 3, 128 playsewithpan SE_W187, SOUND_PAN_ATTACKER delay 7 - call BellyDrum2 + call BellyDrumLeft createsprite gSlowFlyingMusicNotesSpriteTemplate, ANIM_ATTACKER, 2, 1, 2, 0, 128 playsewithpan SE_W187, SOUND_PAN_ATTACKER delay 7 - call BellyDrum1 + call BellyDrumRight createsprite gSlowFlyingMusicNotesSpriteTemplate, ANIM_ATTACKER, 2, 0, 1, 1, 0 playsewithpan SE_W187, SOUND_PAN_ATTACKER delay 7 - call BellyDrum2 + call BellyDrumLeft createsprite gSlowFlyingMusicNotesSpriteTemplate, ANIM_ATTACKER, 2, 1, 0, 3, 0 playsewithpan SE_W187, SOUND_PAN_ATTACKER waitforvisualfinish @@ -4607,12 +4608,12 @@ Move_BELLY_DRUM: waitforvisualfinish end -BellyDrum2: +BellyDrumLeft: createsprite gBellyDrumHandSpriteTemplate, ANIM_ATTACKER, 3, 0 createvisualtask AnimTask_ShakeMon, 2, ANIM_ATTACKER, 0, 8, 2, 1 return -BellyDrum1: +BellyDrumRight: createsprite gBellyDrumHandSpriteTemplate, ANIM_ATTACKER, 3, 1 createvisualtask AnimTask_ShakeMon, 2, ANIM_ATTACKER, 0, 8, 2, 1 return @@ -4627,13 +4628,13 @@ Move_MIND_READER: createsprite gWhiteHaloSpriteTemplate, ANIM_ATTACKER, 5 delay 40 playsewithpan SE_W043, SOUND_PAN_TARGET - createvisualtask sub_8115A04, 2, 1, 1, 2, 0, 10, RGB_BLACK - call MindReaderEffect + createvisualtask AnimTask_BlendColorCycle, 2, 1, 1, 2, 0, 10, RGB_BLACK + call MindReaderEyeSpikeEffect waitforvisualfinish clearmonbg ANIM_DEF_PARTNER end -MindReaderEffect: +MindReaderEyeSpikeEffect: createsprite gTealAlertSpriteTemplate, ANIM_ATTACKER, 4, 70, 0, 6 createsprite gTealAlertSpriteTemplate, ANIM_ATTACKER, 4, 40, 40, 6 createsprite gTealAlertSpriteTemplate, ANIM_ATTACKER, 4, 10, -60, 6 @@ -4664,29 +4665,29 @@ Move_ICE_PUNCH: loadspritegfx ANIM_TAG_IMPACT loadspritegfx ANIM_TAG_HANDS_AND_FEET createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 1, 0, 7, RGB_BLACK - createvisualtask sub_8116620, 10, 4, 2, 0, 9, RGB(12, 26, 31) + createvisualtask AnimTask_BlendBattleAnimPal, 10, 4, 2, 0, 9, RGB(12, 26, 31) delay 20 playsewithpan SE_W081, SOUND_PAN_TARGET - createsprite gUnknown_08595AE8, ANIM_ATTACKER, 2, 0 - createsprite gUnknown_08595AE8, ANIM_ATTACKER, 2, 64 - createsprite gUnknown_08595AE8, ANIM_ATTACKER, 2, 128 - createsprite gUnknown_08595AE8, ANIM_ATTACKER, 2, 192 + createsprite gIceCrystalSpiralInwardSmall, ANIM_ATTACKER, 2, 0 + createsprite gIceCrystalSpiralInwardSmall, ANIM_ATTACKER, 2, 64 + createsprite gIceCrystalSpiralInwardSmall, ANIM_ATTACKER, 2, 128 + createsprite gIceCrystalSpiralInwardSmall, ANIM_ATTACKER, 2, 192 delay 5 - createsprite gUnknown_08595AD0, ANIM_ATTACKER, 2, 32 - createsprite gUnknown_08595AD0, ANIM_ATTACKER, 2, 96 - createsprite gUnknown_08595AD0, ANIM_ATTACKER, 2, 160 - createsprite gUnknown_08595AD0, ANIM_ATTACKER, 2, 224 + createsprite gIceCrystalSpiralInwardLarge, ANIM_ATTACKER, 2, 32 + createsprite gIceCrystalSpiralInwardLarge, ANIM_ATTACKER, 2, 96 + createsprite gIceCrystalSpiralInwardLarge, ANIM_ATTACKER, 2, 160 + createsprite gIceCrystalSpiralInwardLarge, ANIM_ATTACKER, 2, 224 delay 17 createsprite gFistFootSpriteTemplate, ANIM_ATTACKER, 4, 0, -10, 8, 1, 0 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, -10, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, -10, ANIM_TARGET, 1 playsewithpan SE_W004, SOUND_PAN_TARGET delay 2 createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 0, 5, 3, 1 waitforvisualfinish delay 15 - call FreezeEffect1 + call IceCrystalEffectShort delay 5 - createvisualtask sub_8116620, 10, 4, 2, 9, 0, RGB(12, 26, 31) + createvisualtask AnimTask_BlendBattleAnimPal, 10, 4, 2, 9, 0, RGB(12, 26, 31) waitforvisualfinish createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 0, 7, 0, RGB_BLACK waitforvisualfinish @@ -4710,7 +4711,7 @@ Move_CONFUSION: call SetPsychicBackground setalpha 8, 8 createvisualtask AnimTask_ShakeMon2, 2, ANIM_ATTACKER, 1, 0, 10, 1 - createvisualtask sub_8115A04, 2, 2, 0, 2, 0, 8, RGB_WHITE + createvisualtask AnimTask_BlendColorCycle, 2, 2, 0, 2, 0, 8, RGB_WHITE waitforvisualfinish playsewithpan SE_W048, SOUND_PAN_TARGET createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 3, 0, 15, 1 @@ -4727,7 +4728,7 @@ Move_PSYCHIC: call SetPsychicBackground setalpha 8, 8 createvisualtask AnimTask_ShakeMon2, 2, ANIM_ATTACKER, 1, 0, 10, 1 - createvisualtask sub_8115A04, 2, 2, 0, 2, 0, 8, RGB(31, 23, 0) + createvisualtask AnimTask_BlendColorCycle, 2, 2, 0, 2, 0, 8, RGB(31, 23, 0) waitforvisualfinish loopsewithpan SE_W048, SOUND_PAN_TARGET, 10, 3 createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 5, 0, 15, 1 @@ -4752,7 +4753,7 @@ FutureSight: call SetPsychicBackground setalpha 8, 8 playsewithpan SE_W048, SOUND_PAN_ATTACKER - createvisualtask sub_8115A04, 2, 2, 0, 2, 0, 8, RGB_WHITE + createvisualtask AnimTask_BlendColorCycle, 2, 2, 0, 2, 0, 8, RGB_WHITE createvisualtask AnimTask_ScaleMonAndRestore, 5, -4, -4, 15, ANIM_ATTACKER, 1 waitforvisualfinish clearmonbg ANIM_ATK_PARTNER @@ -4763,57 +4764,57 @@ Move_THUNDER: loadspritegfx ANIM_TAG_LIGHTNING fadetobg BG_THUNDER waitbgfadeout - createvisualtask sub_8117660, 5, -256, 0, 1, -1 + createvisualtask AnimTask_StartSlidingBg, 5, -256, 0, 1, -1 waitbgfadein createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 2, 0, 16, RGB_BLACK delay 16 - createvisualtask sub_8115F10, 2, 257, 257, 257 + createvisualtask AnimTask_InvertScreenColor, 2, 257, 257, 257 playsewithpan SE_W086, SOUND_PAN_TARGET delay 1 - createsprite gUnknown_085956C0, ANIM_TARGET, 2, 16, -36 + createsprite gLightningSpriteTemplate, ANIM_TARGET, 2, 16, -36 delay 1 - createsprite gUnknown_085956C0, ANIM_TARGET, 2, 16, -20 + createsprite gLightningSpriteTemplate, ANIM_TARGET, 2, 16, -20 delay 1 - createsprite gUnknown_085956C0, ANIM_TARGET, 2, 16, 12 + createsprite gLightningSpriteTemplate, ANIM_TARGET, 2, 16, 12 delay 20 - createsprite gUnknown_085956C0, ANIM_TARGET, 6, -16, -32 + createsprite gLightningSpriteTemplate, ANIM_TARGET, 6, -16, -32 playsewithpan SE_W086, SOUND_PAN_TARGET delay 1 - createsprite gUnknown_085956C0, ANIM_TARGET, 6, -16, -16 + createsprite gLightningSpriteTemplate, ANIM_TARGET, 6, -16, -16 delay 1 - createsprite gUnknown_085956C0, ANIM_TARGET, 6, -16, 16 + createsprite gLightningSpriteTemplate, ANIM_TARGET, 6, -16, 16 playsewithpan SE_W086, SOUND_PAN_TARGET delay 5 - createvisualtask sub_8115F10, 2, 257, 257, 257 + createvisualtask AnimTask_InvertScreenColor, 2, 257, 257, 257 delay 1 - createsprite gUnknown_085956C0, ANIM_TARGET, 2, 24, -32 + createsprite gLightningSpriteTemplate, ANIM_TARGET, 2, 24, -32 delay 1 - createsprite gUnknown_085956C0, ANIM_TARGET, 2, 24, -16 + createsprite gLightningSpriteTemplate, ANIM_TARGET, 2, 24, -16 delay 1 - createsprite gUnknown_085956C0, ANIM_TARGET, 2, 24, 16 + createsprite gLightningSpriteTemplate, ANIM_TARGET, 2, 24, 16 delay 30 - createvisualtask sub_8115F10, 2, 257, 257, 257 + createvisualtask AnimTask_InvertScreenColor, 2, 257, 257, 257 delay 5 - createvisualtask sub_8115F10, 2, 257, 257, 257 + createvisualtask AnimTask_InvertScreenColor, 2, 257, 257, 257 delay 1 - createsprite gUnknown_085956C0, ANIM_TARGET, 2, 0, -32 + createsprite gLightningSpriteTemplate, ANIM_TARGET, 2, 0, -32 playsewithpan SE_W161B, SOUND_PAN_TARGET delay 1 - createsprite gUnknown_085956C0, ANIM_TARGET, 2, 0, -16 + createsprite gLightningSpriteTemplate, ANIM_TARGET, 2, 0, -16 delay 1 - createsprite gUnknown_085956C0, ANIM_TARGET, 2, 0, 16 + createsprite gLightningSpriteTemplate, ANIM_TARGET, 2, 0, 16 delay 10 - createvisualtask sub_8115F10, 2, 257, 257, 257 + createvisualtask AnimTask_InvertScreenColor, 2, 257, 257, 257 delay 1 - createvisualtask sub_810A094, 2, 30, 3, 1, 0 + createvisualtask AnimTask_ShakeTargetInPattern, 2, 30, 3, TRUE, 0 delay 2 - createvisualtask sub_8115F10, 2, 257, 257, 257 + createvisualtask AnimTask_InvertScreenColor, 2, 257, 257, 257 delay 1 createsprite gSimplePaletteBlendSpriteTemplate, ANIM_TARGET, 2, 1, 2, 16, 0, RGB_BLACK waitforvisualfinish restorebg waitbgfadeout - setarg 7, -1 + setarg 7, 0xFFFF waitbgfadein end @@ -4827,21 +4828,21 @@ Move_THUNDER_PUNCH: waitforvisualfinish playsewithpan SE_W004, SOUND_PAN_TARGET createsprite gFistFootSpriteTemplate, ANIM_TARGET, 4, 0, 0, 8, 1, 0 - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0, 0, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0, 0, ANIM_TARGET, 1 delay 1 - createvisualtask sub_8115F10, 2, 257, 257, 257 + createvisualtask AnimTask_InvertScreenColor, 2, 257, 257, 257 delay 1 - createsprite gUnknown_085956C0, ANIM_TARGET, 2, 0, -48 + createsprite gLightningSpriteTemplate, ANIM_TARGET, 2, 0, -48 delay 1 - createsprite gUnknown_085956C0, ANIM_ATTACKER, 2, 0, -16 + createsprite gLightningSpriteTemplate, ANIM_ATTACKER, 2, 0, -16 delay 1 - createsprite gUnknown_085956C0, ANIM_ATTACKER, 2, 0, 16 + createsprite gLightningSpriteTemplate, ANIM_ATTACKER, 2, 0, 16 delay 1 playsewithpan SE_W161B, SOUND_PAN_TARGET - createvisualtask sub_8115F10, 2, 257, 257, 257 + createvisualtask AnimTask_InvertScreenColor, 2, 257, 257, 257 delay 2 createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 0, 3, 15, 1 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 1, 2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, ANIM_TARGET, 2 delay 1 createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 2, 16, 0, RGB_BLACK delay 20 @@ -4854,56 +4855,56 @@ Move_SACRED_FIRE: loadspritegfx ANIM_TAG_FIRE loadspritegfx ANIM_TAG_FIRE_PLUME loopsewithpan SE_W221, SOUND_PAN_ATTACKER, 7, 5 - createsprite gUnknown_08595428, ANIM_ATTACKER, 2, -32, 0, 50, 5, -2, 0 + createsprite gFirePlumeSpriteTemplate, ANIM_ATTACKER, 2, -32, 0, 50, 5, -2, 0 delay 1 - createsprite gUnknown_08595428, ANIM_ATTACKER, 66, -20, -10, 50, 5, -1, -1 + createsprite gFirePlumeSpriteTemplate, ANIM_ATTACKER, 66, -20, -10, 50, 5, -1, -1 delay 1 - createsprite gUnknown_08595428, ANIM_ATTACKER, 66, 0, -16, 50, 5, 0, -1 + createsprite gFirePlumeSpriteTemplate, ANIM_ATTACKER, 66, 0, -16, 50, 5, 0, -1 delay 1 - createsprite gUnknown_08595428, ANIM_ATTACKER, 66, 20, -10, 50, 5, 1, -1 + createsprite gFirePlumeSpriteTemplate, ANIM_ATTACKER, 66, 20, -10, 50, 5, 1, -1 delay 1 - createsprite gUnknown_08595428, ANIM_ATTACKER, 2, 32, 0, 50, 5, 2, 0 + createsprite gFirePlumeSpriteTemplate, ANIM_ATTACKER, 2, 32, 0, 50, 5, 2, 0 delay 1 - createsprite gUnknown_08595428, ANIM_ATTACKER, 2, 20, 10, 50, 5, 1, 1 + createsprite gFirePlumeSpriteTemplate, ANIM_ATTACKER, 2, 20, 10, 50, 5, 1, 1 delay 1 - createvisualtask sub_8115F10, 2, 257, 257, 257 + createvisualtask AnimTask_InvertScreenColor, 2, 257, 257, 257 delay 1 - createsprite gUnknown_08595428, ANIM_ATTACKER, 2, 0, 16, 50, 5, 0, 1 + createsprite gFirePlumeSpriteTemplate, ANIM_ATTACKER, 2, 0, 16, 50, 5, 0, 1 delay 1 - createsprite gUnknown_08595428, ANIM_ATTACKER, 2, -20, 10, 50, 5, -1, 1 - createvisualtask sub_8115F10, 2, 257, 257, 257 + createsprite gFirePlumeSpriteTemplate, ANIM_ATTACKER, 2, -20, 10, 50, 5, -1, 1 + createvisualtask AnimTask_InvertScreenColor, 2, 257, 257, 257 delay 1 waitforvisualfinish playsewithpan SE_W221B, SOUND_PAN_TARGET - createsprite gUnknown_085953F8, ANIM_TARGET, 2, -16, 0, 70, 16, 0, 1 + createsprite gLargeFlameSpriteTemplate, ANIM_TARGET, 2, -16, 0, 70, 16, 0, 1 delay 10 playsewithpan SE_W221B, SOUND_PAN_TARGET - createsprite gUnknown_085953F8, ANIM_TARGET, 2, 0, 0, 70, 16, 0, 1 + createsprite gLargeFlameSpriteTemplate, ANIM_TARGET, 2, 0, 0, 70, 16, 0, 1 delay 10 playsewithpan SE_W221B, SOUND_PAN_TARGET - createsprite gUnknown_085953F8, ANIM_TARGET, 2, 16, 0, 80, 16, 0, 1 + createsprite gLargeFlameSpriteTemplate, ANIM_TARGET, 2, 16, 0, 80, 16, 0, 1 delay 1 - createvisualtask sub_8115F10, 2, 257, 257, 257 + createvisualtask AnimTask_InvertScreenColor, 2, 257, 257, 257 delay 1 waitforvisualfinish - createvisualtask sub_8115F10, 2, 257, 257, 257 + createvisualtask AnimTask_InvertScreenColor, 2, 257, 257, 257 delay 1 playsewithpan SE_W172B, SOUND_PAN_TARGET - createsprite gUnknown_08595410, ANIM_TARGET, 2, 0, 0, 30, 30, -1, 0 + createsprite gLargeFlameScatterSpriteTemplate, ANIM_TARGET, 2, 0, 0, 30, 30, -1, 0 delay 1 - createsprite gUnknown_08595410, ANIM_TARGET, 2, 0, 0, 30, 30, 0, 1 + createsprite gLargeFlameScatterSpriteTemplate, ANIM_TARGET, 2, 0, 0, 30, 30, 0, 1 delay 1 - createsprite gUnknown_08595410, ANIM_TARGET, 2, 0, 0, 30, 30, -1, -1 + createsprite gLargeFlameScatterSpriteTemplate, ANIM_TARGET, 2, 0, 0, 30, 30, -1, -1 delay 1 - createsprite gUnknown_08595410, ANIM_TARGET, 2, 0, 0, 30, 30, 2, 1 + createsprite gLargeFlameScatterSpriteTemplate, ANIM_TARGET, 2, 0, 0, 30, 30, 2, 1 delay 1 - createsprite gUnknown_08595410, ANIM_TARGET, 2, 0, 0, 30, 30, 1, -1 + createsprite gLargeFlameScatterSpriteTemplate, ANIM_TARGET, 2, 0, 0, 30, 30, 1, -1 delay 1 - createsprite gUnknown_08595410, ANIM_TARGET, 2, 0, 0, 30, 30, -1, 1 + createsprite gLargeFlameScatterSpriteTemplate, ANIM_TARGET, 2, 0, 0, 30, 30, -1, 1 delay 1 - createsprite gUnknown_08595410, ANIM_TARGET, 2, 0, 0, 30, 30, 1, -2 + createsprite gLargeFlameScatterSpriteTemplate, ANIM_TARGET, 2, 0, 0, 30, 30, 1, -2 delay 1 - createsprite gUnknown_08595410, ANIM_TARGET, 2, 0, 0, 30, 30, 3, 1 + createsprite gLargeFlameScatterSpriteTemplate, ANIM_TARGET, 2, 0, 0, 30, 30, 3, 1 waitforvisualfinish end @@ -4925,31 +4926,31 @@ Move_DRAGON_BREATH: monbg ANIM_DEF_PARTNER monbgprio_28 ANIM_TARGET loopsewithpan SE_W172, SOUND_PAN_ATTACKER, 7, 7 - createsprite gUnknown_08596EF4, ANIM_TARGET, 2, 0, 0, 0, 0, 20 + createsprite gDragonBreathFireSpriteTemplate, ANIM_TARGET, 2, 0, 0, 0, 0, 20 delay 2 - createsprite gUnknown_08596EF4, ANIM_TARGET, 2, 0, 0, 0, 0, 20 + createsprite gDragonBreathFireSpriteTemplate, ANIM_TARGET, 2, 0, 0, 0, 0, 20 delay 2 - createvisualtask sub_8116620, 10, 4, 1, 0, 9, RGB_RED - createsprite gUnknown_08596EF4, ANIM_TARGET, 2, 0, 0, 0, 0, 20 + createvisualtask AnimTask_BlendBattleAnimPal, 10, 4, 1, 0, 9, RGB_RED + createsprite gDragonBreathFireSpriteTemplate, ANIM_TARGET, 2, 0, 0, 0, 0, 20 delay 2 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 2, 0, 21, 1 - createsprite gUnknown_08596EF4, ANIM_TARGET, 2, 0, 0, 0, 0, 20 + createsprite gDragonBreathFireSpriteTemplate, ANIM_TARGET, 2, 0, 0, 0, 0, 20 delay 2 - createsprite gUnknown_08596EF4, ANIM_TARGET, 2, 0, 0, 0, 0, 20 + createsprite gDragonBreathFireSpriteTemplate, ANIM_TARGET, 2, 0, 0, 0, 0, 20 delay 2 - createsprite gUnknown_08596EF4, ANIM_TARGET, 2, 0, 0, 0, 0, 20 + createsprite gDragonBreathFireSpriteTemplate, ANIM_TARGET, 2, 0, 0, 0, 0, 20 delay 2 - createsprite gUnknown_08596EF4, ANIM_TARGET, 2, 0, 0, 0, 0, 20 + createsprite gDragonBreathFireSpriteTemplate, ANIM_TARGET, 2, 0, 0, 0, 0, 20 delay 2 - createsprite gUnknown_08596EF4, ANIM_TARGET, 2, 0, 0, 0, 0, 20 + createsprite gDragonBreathFireSpriteTemplate, ANIM_TARGET, 2, 0, 0, 0, 0, 20 delay 2 - createsprite gUnknown_08596EF4, ANIM_TARGET, 2, 0, 0, 0, 0, 20 + createsprite gDragonBreathFireSpriteTemplate, ANIM_TARGET, 2, 0, 0, 0, 0, 20 delay 2 - createsprite gUnknown_08596EF4, ANIM_TARGET, 2, 0, 0, 0, 0, 20 + createsprite gDragonBreathFireSpriteTemplate, ANIM_TARGET, 2, 0, 0, 0, 0, 20 delay 2 - createsprite gUnknown_08596EF4, ANIM_TARGET, 2, 0, 0, 0, 0, 20 + createsprite gDragonBreathFireSpriteTemplate, ANIM_TARGET, 2, 0, 0, 0, 0, 20 waitforvisualfinish - createvisualtask sub_8116620, 10, 4, 1, 9, 0, RGB_RED + createvisualtask AnimTask_BlendBattleAnimPal, 10, 4, 1, 9, 0, RGB_RED waitforvisualfinish clearmonbg ANIM_DEF_PARTNER end @@ -4959,16 +4960,16 @@ Move_ROAR: monbg ANIM_ATTACKER monbgprio_28 ANIM_ATTACKER setalpha 8, 8 - createvisualtask sub_8158E9C, 2, 0, 2 + createvisualtask SoundTask_PlayDoubleCry, 2, ANIM_ATTACKER, 2 createvisualtask AnimTask_ScaleMonAndRestore, 5, -5, -5, 10, ANIM_ATTACKER, 1 call RoarEffect delay 20 - createvisualtask sub_80D5DB0, 5, 1, 2 + createvisualtask AnimTask_SlideOffScreen, 5, ANIM_TARGET, 2 waitforvisualfinish clearmonbg ANIM_ATTACKER blendoff waitforvisualfinish - createvisualtask sub_8159078, 5 + createvisualtask SoundTask_WaitForCry, 5 waitforvisualfinish end @@ -4984,13 +4985,13 @@ RoarEffect: Move_GROWL: loadspritegfx ANIM_TAG_NOISE_LINE - createvisualtask sub_8158E9C, 2, 0, 255 + createvisualtask SoundTask_PlayDoubleCry, 2, ANIM_ATTACKER, 255 call RoarEffect delay 10 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 1, 0, 9, 1 createvisualtask AnimTask_ShakeMon2, 2, ANIM_DEF_PARTNER, 1, 0, 9, 1 waitforvisualfinish - createvisualtask sub_8159078, 5 + createvisualtask SoundTask_WaitForCry, 5 waitforvisualfinish end @@ -4998,18 +4999,18 @@ Move_SNORE: loadspritegfx ANIM_TAG_SNORE_Z monbg ANIM_ATK_PARTNER setalpha 8, 8 - call Snore1 + call SnoreEffect delay 30 - call Snore1 + call SnoreEffect waitforvisualfinish clearmonbg ANIM_ATK_PARTNER blendoff end -Snore1: +SnoreEffect: playsewithpan SE_W173, SOUND_PAN_ATTACKER createvisualtask AnimTask_ScaleMonAndRestore, 5, -7, -7, 7, ANIM_ATTACKER, 1 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 4, 0, 7, 1 - createsprite gBattleAnimSpriteTemplate_85972D8, ANIM_ATTACKER, 2, 6, 1, 14, 0, 0 + createsprite gShakeMonOrTerrainSpriteTemplate, ANIM_ATTACKER, 2, 6, 1, 14, 0, 0 createsprite gSnoreZSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, -42, -38, 24, 0, 0 createsprite gSnoreZSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 0, -42, 24, 0, 0 createsprite gSnoreZSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 42, -38, 24, 0, 0 @@ -5020,36 +5021,36 @@ Move_LIGHT_SCREEN: loadspritegfx ANIM_TAG_GREEN_LIGHT_WALL setalpha 0, 16 waitplaysewithpan SE_W115, SOUND_PAN_ATTACKER, 15 - createsprite gUnknown_08596560, ANIM_ATTACKER, 1, 40, 0, 10166 + createsprite gLightScreenWallSpriteTemplate, ANIM_ATTACKER, 1, 40, 0, ANIM_TAG_GREEN_LIGHT_WALL delay 10 - call SpecialScreenEffect + call SpecialScreenSparkle waitforvisualfinish delay 1 blendoff end -SpecialScreenEffect: - createsprite gUnknown_08596624, ANIM_ATTACKER, 2, 23, 0, 0, 1 +SpecialScreenSparkle: + createsprite gSpecialScreenSparkleSpriteTemplate, ANIM_ATTACKER, 2, 23, 0, ANIM_ATTACKER, 1 delay 6 - createsprite gUnknown_08596624, ANIM_ATTACKER, 2, 31, -8, 0, 1 + createsprite gSpecialScreenSparkleSpriteTemplate, ANIM_ATTACKER, 2, 31, -8, ANIM_ATTACKER, 1 delay 5 - createsprite gUnknown_08596624, ANIM_ATTACKER, 2, 30, 20, 0, 1 + createsprite gSpecialScreenSparkleSpriteTemplate, ANIM_ATTACKER, 2, 30, 20, ANIM_ATTACKER, 1 delay 7 - createsprite gUnknown_08596624, ANIM_ATTACKER, 2, 10, -15, 0, 1 + createsprite gSpecialScreenSparkleSpriteTemplate, ANIM_ATTACKER, 2, 10, -15, ANIM_ATTACKER, 1 delay 6 - createsprite gUnknown_08596624, ANIM_ATTACKER, 2, 20, 10, 0, 1 + createsprite gSpecialScreenSparkleSpriteTemplate, ANIM_ATTACKER, 2, 20, 10, ANIM_ATTACKER, 1 delay 6 - createsprite gUnknown_08596624, ANIM_ATTACKER, 2, 10, 18, 0, 1 + createsprite gSpecialScreenSparkleSpriteTemplate, ANIM_ATTACKER, 2, 10, 18, ANIM_ATTACKER, 1 return Move_MIRROR_COAT: loadspritegfx ANIM_TAG_SPARKLE_3 loadspritegfx ANIM_TAG_RED_LIGHT_WALL setalpha 0, 16 - createsprite gUnknown_08596590, ANIM_ATTACKER, 1, 40, 0, 10168 + createsprite gMirrorCoatWallSpriteTemplate, ANIM_ATTACKER, 1, 40, 0, ANIM_TAG_RED_LIGHT_WALL delay 10 playsewithpan SE_W115, SOUND_PAN_ATTACKER - call SpecialScreenEffect + call SpecialScreenSparkle waitforvisualfinish delay 1 blendoff @@ -5060,13 +5061,13 @@ Move_REFLECT: loadspritegfx ANIM_TAG_BLUE_LIGHT_WALL setalpha 0, 16 waitplaysewithpan SE_W115, SOUND_PAN_ATTACKER, 15 - createsprite gUnknown_08596578, ANIM_ATTACKER, 1, 40, 0, 10167 + createsprite gReflectWallSpriteTemplate, ANIM_ATTACKER, 1, 40, 0, ANIM_TAG_BLUE_LIGHT_WALL delay 20 - createsprite gUnknown_085965F4, ANIM_ATTACKER, 2, 30, 0, 0, 1 + createsprite gReflectSparkleSpriteTemplate, ANIM_ATTACKER, 2, 30, 0, ANIM_ATTACKER, 1 delay 7 - createsprite gUnknown_085965F4, ANIM_ATTACKER, 2, 19, -12, 0, 1 + createsprite gReflectSparkleSpriteTemplate, ANIM_ATTACKER, 2, 19, -12, ANIM_ATTACKER, 1 delay 7 - createsprite gUnknown_085965F4, ANIM_ATTACKER, 2, 10, 20, 0, 1 + createsprite gReflectSparkleSpriteTemplate, ANIM_ATTACKER, 2, 10, 20, ANIM_ATTACKER, 1 waitforvisualfinish delay 1 blendoff @@ -5076,7 +5077,7 @@ Move_BARRIER: loadspritegfx ANIM_TAG_GRAY_LIGHT_WALL setalpha 0, 16 waitplaysewithpan SE_W112, SOUND_PAN_ATTACKER, 15 - createsprite gUnknown_085965A8, ANIM_ATTACKER, 3, 40, 0, 10169 + createsprite gBarrierWallSpriteTemplate, ANIM_ATTACKER, 3, 40, 0, ANIM_TAG_GRAY_LIGHT_WALL waitforvisualfinish delay 1 blendoff @@ -5088,31 +5089,31 @@ Move_BUBBLE: monbg ANIM_TARGET setalpha 12, 8 delay 1 - createsprite gBattleAnimSpriteTemplate_8595068, ANIM_ATTACKER, 2, 18, 0, 15, -15, 10, 128, 100 + createsprite gWaterBubbleProjectileSpriteTemplate, ANIM_ATTACKER, 2, 18, 0, 15, -15, 10, 128, 100 playsewithpan SE_W145, SOUND_PAN_ATTACKER waitplaysewithpan SE_W145B, SOUND_PAN_TARGET, 100 delay 6 - createsprite gBattleAnimSpriteTemplate_8595068, ANIM_ATTACKER, 2, 18, 0, 35, 37, 40, 128, 100 + createsprite gWaterBubbleProjectileSpriteTemplate, ANIM_ATTACKER, 2, 18, 0, 35, 37, 40, 128, 100 playsewithpan SE_W145, SOUND_PAN_ATTACKER waitplaysewithpan SE_W145B, SOUND_PAN_TARGET, 100 delay 6 - createsprite gBattleAnimSpriteTemplate_8595068, ANIM_ATTACKER, 2, 18, 0, 10, -37, 30, 128, 100 + createsprite gWaterBubbleProjectileSpriteTemplate, ANIM_ATTACKER, 2, 18, 0, 10, -37, 30, 128, 100 playsewithpan SE_W145, SOUND_PAN_ATTACKER waitplaysewithpan SE_W145B, SOUND_PAN_TARGET, 100 delay 6 - createsprite gBattleAnimSpriteTemplate_8595068, ANIM_ATTACKER, 2, 18, 0, 30, 10, 15, 128, 100 + createsprite gWaterBubbleProjectileSpriteTemplate, ANIM_ATTACKER, 2, 18, 0, 30, 10, 15, 128, 100 playsewithpan SE_W145, SOUND_PAN_ATTACKER waitplaysewithpan SE_W145B, SOUND_PAN_TARGET, 100 delay 6 - createsprite gBattleAnimSpriteTemplate_8595068, ANIM_ATTACKER, 2, 18, 0, 20, 33, 20, 128, 100 + createsprite gWaterBubbleProjectileSpriteTemplate, ANIM_ATTACKER, 2, 18, 0, 20, 33, 20, 128, 100 playsewithpan SE_W145, SOUND_PAN_ATTACKER waitplaysewithpan SE_W145B, SOUND_PAN_TARGET, 100 delay 6 - createsprite gBattleAnimSpriteTemplate_8595068, ANIM_ATTACKER, 2, 18, 0, 25, -30, 10, 128, 100 + createsprite gWaterBubbleProjectileSpriteTemplate, ANIM_ATTACKER, 2, 18, 0, 25, -30, 10, 128, 100 playsewithpan SE_W145, SOUND_PAN_ATTACKER waitplaysewithpan SE_W145B, SOUND_PAN_TARGET, 100 waitforvisualfinish - call WaterBubbleEffect2 + call WaterBubblesEffectLong waitforvisualfinish clearmonbg ANIM_TARGET blendoff @@ -5124,24 +5125,24 @@ Move_SMOG: monbgprio_29 setalpha 12, 8 loopsewithpan SE_W054, SOUND_PAN_TARGET, 17, 10 - call Smog1 - call Smog1 - call Smog1 - call Smog1 - call Smog1 - call Smog1 - call Smog1 + call SmogCloud + call SmogCloud + call SmogCloud + call SmogCloud + call SmogCloud + call SmogCloud + call SmogCloud delay 120 loopsewithpan SE_W092, SOUND_PAN_TARGET, 18, 2 - createvisualtask sub_8115A04, 2, 4, 2, 2, 0, 12, RGB(26, 0, 26) + createvisualtask AnimTask_BlendColorCycle, 2, 4, 2, 2, 0, 12, RGB(26, 0, 26) delay 10 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 2, 0, 15, 1 waitforvisualfinish clearmonbg ANIM_DEF_PARTNER blendoff end -Smog1: - createsprite gUnknown_08595C44, ANIM_ATTACKER, 2, 0, -24, 48, 240, 1, 0 +SmogCloud: + createsprite gSmogCloudSpriteTemplate, ANIM_ATTACKER, 2, 0, -24, 48, 240, 1, 0 delay 7 return @@ -5153,17 +5154,17 @@ Move_FAINT_ATTACK: delay 0 playsewithpan SE_W185, SOUND_PAN_ATTACKER createvisualtask AnimTask_TranslateMonEllipticalRespectSide, 2, ANIM_ATTACKER, 18, 6, 1, 3 - createvisualtask sub_81136E8, 2, 1 + createvisualtask AnimTask_AttackerFadeToInvisible, 2, 1 waitforvisualfinish clearmonbg ANIM_ATTACKER invisible ANIM_ATTACKER delay 1 - createvisualtask AnimTask_ExtremeSpeedMoveTarget, 2 + createvisualtask AnimTask_SetAttackerInvisibleWaitForSignal, 2 setalpha 12, 8 monbg ANIM_TARGET delay 1 playsewithpan SE_W233B, SOUND_PAN_TARGET - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, ANIM_TARGET, 1 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 2, 0, 9, 1 waitforvisualfinish clearmonbg ANIM_TARGET @@ -5171,9 +5172,9 @@ Move_FAINT_ATTACK: delay 1 setarg 7, 0x1000 delay 32 - createvisualtask sub_8113888, 2 + createvisualtask AnimTask_InitAttackerFadeFromInvisible, 2 monbg ANIM_ATTACKER - createvisualtask sub_81137E4, 2, 1 + createvisualtask AnimTask_AttackerFadeFromInvisible, 2, 1 waitforvisualfinish clearmonbg ANIM_ATTACKER delay 1 @@ -5190,22 +5191,22 @@ Move_SAND_ATTACK: createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, 0, -10, 0, 0, 3 waitforvisualfinish createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 2 - call SandAttack1 - call SandAttack1 - call SandAttack1 - call SandAttack1 - call SandAttack1 - call SandAttack1 + call SandAttackDirt + call SandAttackDirt + call SandAttackDirt + call SandAttackDirt + call SandAttackDirt + call SandAttackDirt waitforvisualfinish clearmonbg ANIM_ATK_PARTNER blendoff end -SandAttack1: - createsprite gUnknown_085971A8, ANIM_TARGET, 2, 15, 15, 20, 0, 0 - createsprite gUnknown_085971A8, ANIM_TARGET, 2, 15, 15, 20, 10, 10 - createsprite gUnknown_085971A8, ANIM_TARGET, 2, 15, 15, 20, -10, -10 - createsprite gUnknown_085971A8, ANIM_TARGET, 2, 15, 15, 20, 20, 5 - createsprite gUnknown_085971A8, ANIM_TARGET, 2, 15, 15, 20, -20, -5 +SandAttackDirt: + createsprite gSandAttackDirtSpriteTemplate, ANIM_TARGET, 2, 15, 15, 20, 0, 0 + createsprite gSandAttackDirtSpriteTemplate, ANIM_TARGET, 2, 15, 15, 20, 10, 10 + createsprite gSandAttackDirtSpriteTemplate, ANIM_TARGET, 2, 15, 15, 20, -10, -10 + createsprite gSandAttackDirtSpriteTemplate, ANIM_TARGET, 2, 15, 15, 20, 20, 5 + createsprite gSandAttackDirtSpriteTemplate, ANIM_TARGET, 2, 15, 15, 20, -20, -5 delay 2 return @@ -5215,20 +5216,20 @@ Move_MUD_SLAP: createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, 0, -10, 0, 0, 3 waitforvisualfinish createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 2 - call MudSlap1 - call MudSlap1 - call MudSlap1 - call MudSlap1 - call MudSlap1 - call MudSlap1 + call MudSlapMud + call MudSlapMud + call MudSlapMud + call MudSlapMud + call MudSlapMud + call MudSlapMud waitforvisualfinish end -MudSlap1: - createsprite gUnknown_085971CC, ANIM_TARGET, 2, 15, 15, 20, 0, 0 - createsprite gUnknown_085971CC, ANIM_TARGET, 2, 15, 15, 20, 10, 5 - createsprite gUnknown_085971CC, ANIM_TARGET, 2, 15, 15, 20, -10, -5 - createsprite gUnknown_085971CC, ANIM_TARGET, 2, 15, 15, 20, 20, 10 - createsprite gUnknown_085971CC, ANIM_TARGET, 2, 15, 15, 20, -20, -10 +MudSlapMud: + createsprite gMudSlapMudSpriteTemplate, ANIM_TARGET, 2, 15, 15, 20, 0, 0 + createsprite gMudSlapMudSpriteTemplate, ANIM_TARGET, 2, 15, 15, 20, 10, 5 + createsprite gMudSlapMudSpriteTemplate, ANIM_TARGET, 2, 15, 15, 20, -10, -5 + createsprite gMudSlapMudSpriteTemplate, ANIM_TARGET, 2, 15, 15, 20, 20, 10 + createsprite gMudSlapMudSpriteTemplate, ANIM_TARGET, 2, 15, 15, 20, -20, -10 delay 2 return @@ -5240,25 +5241,25 @@ Move_DRAGON_RAGE: waitforvisualfinish createsprite gSlideMonToOffsetSpriteTemplate, ANIM_TARGET, 2, 0, 15, 0, 0, 4 waitforvisualfinish - createsprite gUnknown_08596F80, ANIM_TARGET, 2, 30, 15, 0, 10, 10 + createsprite gDragonRageFireSpitSpriteTemplate, ANIM_TARGET, 2, 30, 15, 0, 10, 10 waitforvisualfinish loopsewithpan SE_W172B, SOUND_PAN_TARGET, 11, 3 createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 0, 3, 25, 1 - createsprite gUnknown_08596F28, ANIM_TARGET, 66, 1, 5, 0 + createsprite gDragonRageFirePlumeSpriteTemplate, ANIM_TARGET, 66, 1, 5, 0 delay 1 - createsprite gUnknown_08596F28, ANIM_TARGET, 66, 1, -10, -15 + createsprite gDragonRageFirePlumeSpriteTemplate, ANIM_TARGET, 66, 1, -10, -15 delay 1 - createsprite gUnknown_08596F28, ANIM_TARGET, 2, 1, 0, 25 + createsprite gDragonRageFirePlumeSpriteTemplate, ANIM_TARGET, 2, 1, 0, 25 delay 1 - createsprite gUnknown_08596F28, ANIM_TARGET, 66, 1, 15, 5 + createsprite gDragonRageFirePlumeSpriteTemplate, ANIM_TARGET, 66, 1, 15, 5 delay 1 - createsprite gUnknown_08596F28, ANIM_TARGET, 66, 1, -25, 0 + createsprite gDragonRageFirePlumeSpriteTemplate, ANIM_TARGET, 66, 1, -25, 0 delay 1 - createsprite gUnknown_08596F28, ANIM_TARGET, 2, 1, 30, 30 + createsprite gDragonRageFirePlumeSpriteTemplate, ANIM_TARGET, 2, 1, 30, 30 delay 1 - createsprite gUnknown_08596F28, ANIM_TARGET, 2, 1, -27, 25 + createsprite gDragonRageFirePlumeSpriteTemplate, ANIM_TARGET, 2, 1, -27, 25 delay 1 - createsprite gUnknown_08596F28, ANIM_TARGET, 66, 1, 0, 8 + createsprite gDragonRageFirePlumeSpriteTemplate, ANIM_TARGET, 66, 1, 0, 8 waitforvisualfinish createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_TARGET, 66, 0, 0, 4 waitforvisualfinish @@ -5267,14 +5268,14 @@ Move_DRAGON_RAGE: Move_RAIN_DANCE: loadspritegfx ANIM_TAG_RAIN_DROPS playsewithpan SE_W240, SOUND_PAN_ATTACKER - createvisualtask sub_8116620, 10, 0x781, 2, 0, 4, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, 0x781, 2, 0, 4, RGB_BLACK waitforvisualfinish createvisualtask AnimTask_CreateRaindrops, 2, 0, 3, 120 createvisualtask AnimTask_CreateRaindrops, 2, 0, 3, 120 delay 120 delay 30 waitforvisualfinish - createvisualtask sub_8116620, 10, 0x781, 2, 4, 0, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, 0x781, 2, 4, 0, RGB_BLACK waitforvisualfinish end @@ -5284,10 +5285,10 @@ Move_BITE: monbg ANIM_TARGET setalpha 12, 8 playsewithpan SE_W044, SOUND_PAN_TARGET - createsprite gUnknown_08597080, ANIM_ATTACKER, 2, 0, -32, 0, 0, 819, 10 - createsprite gUnknown_08597080, ANIM_ATTACKER, 2, 0, 32, 4, 0, -819, 10 + createsprite gSharpTeethSpriteTemplate, ANIM_ATTACKER, 2, 0, -32, 0, 0, 819, 10 + createsprite gSharpTeethSpriteTemplate, ANIM_ATTACKER, 2, 0, 32, 4, 0, -819, 10 delay 10 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 1, 2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, ANIM_TARGET, 2 createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 0, 4, 7, 1 waitforvisualfinish clearmonbg ANIM_TARGET @@ -5303,17 +5304,17 @@ Move_CRUNCH: waitbgfadein setalpha 12, 8 playsewithpan SE_W044, SOUND_PAN_TARGET - createsprite gUnknown_08597080, ANIM_ATTACKER, 2, -32, -32, 1, 819, 819, 10 - createsprite gUnknown_08597080, ANIM_ATTACKER, 2, 32, 32, 5, -819, -819, 10 + createsprite gSharpTeethSpriteTemplate, ANIM_ATTACKER, 2, -32, -32, 1, 819, 819, 10 + createsprite gSharpTeethSpriteTemplate, ANIM_ATTACKER, 2, 32, 32, 5, -819, -819, 10 delay 10 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, -8, 0, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, -8, 0, ANIM_TARGET, 1 createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 0, 7, 5, 2 waitforvisualfinish playsewithpan SE_W044, SOUND_PAN_TARGET - createsprite gUnknown_08597080, ANIM_ATTACKER, 2, 32, -32, 7, -819, 819, 10 - createsprite gUnknown_08597080, ANIM_ATTACKER, 2, -32, 32, 3, 819, -819, 10 + createsprite gSharpTeethSpriteTemplate, ANIM_ATTACKER, 2, 32, -32, 7, -819, 819, 10 + createsprite gSharpTeethSpriteTemplate, ANIM_ATTACKER, 2, -32, 32, 3, 819, -819, 10 delay 10 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 8, 0, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 8, 0, ANIM_TARGET, 1 createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 0, 8, 4, 2 waitforvisualfinish clearmonbg ANIM_TARGET @@ -5329,10 +5330,10 @@ Move_CLAMP: monbg ANIM_TARGET setalpha 12, 8 playsewithpan SE_W011, SOUND_PAN_TARGET - createsprite gUnknown_08597098, ANIM_ATTACKER, 2, -32, 0, 2, 819, 0, 10 - createsprite gUnknown_08597098, ANIM_ATTACKER, 2, 32, 0, 6, -819, 0, 10 + createsprite gClampJawSpriteTemplate, ANIM_ATTACKER, 2, -32, 0, 2, 819, 0, 10 + createsprite gClampJawSpriteTemplate, ANIM_ATTACKER, 2, 32, 0, 6, -819, 0, 10 delay 10 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 1, 2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, ANIM_TARGET, 2 createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 3, 0, 5, 1 waitforvisualfinish clearmonbg ANIM_TARGET @@ -5347,29 +5348,29 @@ Move_ICE_BEAM: loadspritegfx ANIM_TAG_ICE_CRYSTALS createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 1, 0, 7, RGB_BLACK waitforvisualfinish - createsoundtask sub_8158C58, SE_W062B, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 4, 4, 0, 10 - createsprite gUnknown_08595B2C, ANIM_ATTACKER, 2, 20, 12, 0, 12, 20 - createsprite gUnknown_08595B2C, ANIM_ATTACKER, 2, 20, -12, 0, -12, 20 + createsoundtask SoundTask_LoopSEAdjustPanning, SE_W062B, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 4, 4, 0, 10 + createsprite gIceBeamOuterCrystalSpriteTemplate, ANIM_ATTACKER, 2, 20, 12, 0, 12, 20 + createsprite gIceBeamOuterCrystalSpriteTemplate, ANIM_ATTACKER, 2, 20, -12, 0, -12, 20 delay 1 - call IceBeam1 - call IceBeam1 - call IceBeam1 + call IceBeamCreateCrystals + call IceBeamCreateCrystals + call IceBeamCreateCrystals createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 4, -31, 0, 7, RGB(0, 20, 31) createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 2, 0, 25, 1 - call IceBeam1 - call IceBeam1 - call IceBeam1 - call IceBeam1 - call IceBeam1 - call IceBeam1 - call IceBeam1 - call IceBeam1 - createsprite gUnknown_08595B14, ANIM_ATTACKER, 2, 20, 0, 0, 0, 11 + call IceBeamCreateCrystals + call IceBeamCreateCrystals + call IceBeamCreateCrystals + call IceBeamCreateCrystals + call IceBeamCreateCrystals + call IceBeamCreateCrystals + call IceBeamCreateCrystals + call IceBeamCreateCrystals + createsprite gIceBeamInnerCrystalSpriteTemplate, ANIM_ATTACKER, 2, 20, 0, 0, 0, 11 delay 1 - createsprite gUnknown_08595B14, ANIM_ATTACKER, 2, 20, 0, 0, 0, 11 + createsprite gIceBeamInnerCrystalSpriteTemplate, ANIM_ATTACKER, 2, 20, 0, 0, 0, 11 waitforvisualfinish delay 20 - call FreezeEffect1 + call IceCrystalEffectShort createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 4, 5, 7, 0, RGB(0, 20, 31) waitforvisualfinish createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 0, 7, 0, RGB_BLACK @@ -5377,10 +5378,10 @@ Move_ICE_BEAM: clearmonbg ANIM_TARGET blendoff end -IceBeam1: - createsprite gUnknown_08595B2C, ANIM_ATTACKER, 2, 20, 12, 0, 12, 20 - createsprite gUnknown_08595B2C, ANIM_ATTACKER, 2, 20, -12, 0, -12, 20 - createsprite gUnknown_08595B14, ANIM_ATTACKER, 2, 20, 0, 0, 0, 11 +IceBeamCreateCrystals: + createsprite gIceBeamOuterCrystalSpriteTemplate, ANIM_ATTACKER, 2, 20, 12, 0, 12, 20 + createsprite gIceBeamOuterCrystalSpriteTemplate, ANIM_ATTACKER, 2, 20, -12, 0, -12, 20 + createsprite gIceBeamInnerCrystalSpriteTemplate, ANIM_ATTACKER, 2, 20, 0, 0, 0, 11 delay 1 return @@ -5396,33 +5397,33 @@ Move_AURORA_BEAM: waitbgfadein playsewithpan SE_W062, SOUND_PAN_ATTACKER setarg 7, 0 - createvisualtask sub_8107528, 10, 130 - call AuroraBeam1 + createvisualtask AnimTask_RotateAuroraRingColors, 10, 130 + call AuroraBeamCreateRings createvisualtask AnimTask_ShakeMon2, 5, ANIM_TARGET, 1, 0, 17, 1 - call AuroraBeam1 - call AuroraBeam1 - call AuroraBeam1 - setarg 7, -1 - createsoundtask sub_8158C58, SE_W062B, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 3, 6, 0, 10 + call AuroraBeamCreateRings + call AuroraBeamCreateRings + call AuroraBeamCreateRings + setarg 7, 0xFFFF + createsoundtask SoundTask_LoopSEAdjustPanning, SE_W062B, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 3, 6, 0, 10 createvisualtask AnimTask_ShakeMon2, 5, ANIM_TARGET, 2, 0, 40, 1 - call AuroraBeam1 - call AuroraBeam1 - call AuroraBeam1 - call AuroraBeam1 - call AuroraBeam1 - call AuroraBeam1 + call AuroraBeamCreateRings + call AuroraBeamCreateRings + call AuroraBeamCreateRings + call AuroraBeamCreateRings + call AuroraBeamCreateRings + call AuroraBeamCreateRings waitforvisualfinish restorebg waitbgfadein end -AuroraBeam1: - createsprite gUnknown_085950B4, ANIM_TARGET, 2, 20, 0, 0, 0, 17 +AuroraBeamCreateRings: + createsprite gAuroraBeamRingSpriteTemplate, ANIM_TARGET, 2, 20, 0, 0, 0, 17 delay 1 - createsprite gUnknown_085950B4, ANIM_TARGET, 2, 20, 0, 0, 0, 17 + createsprite gAuroraBeamRingSpriteTemplate, ANIM_TARGET, 2, 20, 0, 0, 0, 17 delay 1 - createsprite gUnknown_085950B4, ANIM_TARGET, 2, 20, 0, 0, 0, 17 + createsprite gAuroraBeamRingSpriteTemplate, ANIM_TARGET, 2, 20, 0, 0, 0, 17 delay 1 - createsprite gUnknown_085950B4, ANIM_TARGET, 2, 20, 0, 0, 0, 17 + createsprite gAuroraBeamRingSpriteTemplate, ANIM_TARGET, 2, 20, 0, 0, 0, 17 delay 1 return @@ -5435,14 +5436,14 @@ SolarBeamEnd: SolarBeamSetUp: monbg ANIM_ATK_PARTNER setalpha 12, 8 - createvisualtask sub_8115A04, 2, 2, 1, 4, 0, 11, RGB(31, 31, 11) + createvisualtask AnimTask_BlendColorCycle, 2, 2, 1, 4, 0, 11, RGB(31, 31, 11) playsewithpan SE_W025, SOUND_PAN_ATTACKER - call SolarBeamSetUp1 + call SolarBeamAbsorbEffect waitforvisualfinish clearmonbg ANIM_ATK_PARTNER blendoff goto SolarBeamEnd -SolarBeamSetUp1: +SolarBeamAbsorbEffect: createsprite gPowerAbsorptionOrbSpriteTemplate, ANIM_ATTACKER, 2, 40, 40, 16 delay 2 createsprite gPowerAbsorptionOrbSpriteTemplate, ANIM_ATTACKER, 2, -40, -40, 16 @@ -5480,7 +5481,7 @@ SolarBeamUnleash: delay 4 createsprite gSolarbeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 1 delay 4 - createvisualtask sub_8116620, 10, 4, 1, 0, 10, RGB(25, 31, 0) + createvisualtask AnimTask_BlendBattleAnimPal, 10, 4, 1, 0, 10, RGB(25, 31, 0) createsprite gSolarbeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 2 delay 4 createvisualtask AnimTask_ShakeMon2, 5, ANIM_TARGET, 2, 0, 65, 1 @@ -5495,7 +5496,7 @@ SolarBeamUnleash: call SolarBeamUnleash1 call SolarBeamUnleash1 waitforvisualfinish - createvisualtask sub_8116620, 10, 4, 1, 10, 0, RGB(25, 31, 0) + createvisualtask AnimTask_BlendBattleAnimPal, 10, 4, 1, 10, 0, RGB(25, 31, 0) call UnsetSolarbeamBg goto SolarBeamEnd SolarBeamUnleash1: @@ -5523,44 +5524,44 @@ Move_BLIZZARD: fadetobg BG_HIGHSPEED_OPPONENT BlizzardContinue: waitbgfadeout - createvisualtask sub_8117660, 5, -2304, 0, 1, -1 + createvisualtask AnimTask_StartSlidingBg, 5, -2304, 0, 1, -1 waitbgfadein waitforvisualfinish panse_1B SE_W059, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0 - call Blizzard1 - call Blizzard1 + call BlizzardIceCrystals + call BlizzardIceCrystals playsewithpan SE_W059B, SOUND_PAN_TARGET waitforvisualfinish - call FreezeEffect2 + call IceCrystalEffectLong waitforvisualfinish delay 20 restorebg waitbgfadeout - setarg 7, -1 + setarg 7, 0xFFFF waitbgfadein clearmonbg ANIM_DEF_PARTNER end -Blizzard1: - createsprite gUnknown_08595B98, ANIM_ATTACKER, 40, 0, -10, 0, -10, 72, 1 - createsprite gUnknown_08595BB0, ANIM_ATTACKER, 40, 0, 0, 0, 0, 80, 0, 0, 1 +BlizzardIceCrystals: + createsprite gSwirlingSnowballSpriteTemplate, ANIM_ATTACKER, 40, 0, -10, 0, -10, 72, 1 + createsprite gBlizzardIceCrystalSpriteTemplate, ANIM_ATTACKER, 40, 0, 0, 0, 0, 80, 0, 0, 1 delay 3 - createsprite gUnknown_08595B98, ANIM_ATTACKER, 40, 0, -15, 0, -15, 72, 1 - createsprite gUnknown_08595BB0, ANIM_ATTACKER, 40, 0, -10, 0, -10, 80, 0, 0, 1 + createsprite gSwirlingSnowballSpriteTemplate, ANIM_ATTACKER, 40, 0, -15, 0, -15, 72, 1 + createsprite gBlizzardIceCrystalSpriteTemplate, ANIM_ATTACKER, 40, 0, -10, 0, -10, 80, 0, 0, 1 delay 3 - createsprite gUnknown_08595B98, ANIM_ATTACKER, 40, 0, -5, 0, -5, 72, 1 - createsprite gUnknown_08595BB0, ANIM_ATTACKER, 40, 0, 10, 0, 10, 80, 0, 0, 1 + createsprite gSwirlingSnowballSpriteTemplate, ANIM_ATTACKER, 40, 0, -5, 0, -5, 72, 1 + createsprite gBlizzardIceCrystalSpriteTemplate, ANIM_ATTACKER, 40, 0, 10, 0, 10, 80, 0, 0, 1 delay 3 - createsprite gUnknown_08595B98, ANIM_ATTACKER, 40, 0, -10, 0, -10, 72, 1 - createsprite gUnknown_08595BB0, ANIM_ATTACKER, 40, 0, -20, 0, -20, 80, 0, 0, 1 + createsprite gSwirlingSnowballSpriteTemplate, ANIM_ATTACKER, 40, 0, -10, 0, -10, 72, 1 + createsprite gBlizzardIceCrystalSpriteTemplate, ANIM_ATTACKER, 40, 0, -20, 0, -20, 80, 0, 0, 1 delay 3 - createsprite gUnknown_08595B98, ANIM_ATTACKER, 40, 0, -20, 0, -20, 72, 1 - createsprite gUnknown_08595BB0, ANIM_ATTACKER, 40, 0, 15, 0, 15, 80, 0, 0, 1 + createsprite gSwirlingSnowballSpriteTemplate, ANIM_ATTACKER, 40, 0, -20, 0, -20, 72, 1 + createsprite gBlizzardIceCrystalSpriteTemplate, ANIM_ATTACKER, 40, 0, 15, 0, 15, 80, 0, 0, 1 delay 3 - createsprite gUnknown_08595B98, ANIM_ATTACKER, 40, 0, -15, 0, -15, 72, 1 - createsprite gUnknown_08595BB0, ANIM_ATTACKER, 40, 0, -20, 0, -20, 80, 0, 0, 1 + createsprite gSwirlingSnowballSpriteTemplate, ANIM_ATTACKER, 40, 0, -15, 0, -15, 72, 1 + createsprite gBlizzardIceCrystalSpriteTemplate, ANIM_ATTACKER, 40, 0, -20, 0, -20, 80, 0, 0, 1 delay 3 - createsprite gUnknown_08595B98, ANIM_ATTACKER, 40, 0, -25, 0, -25, 72, 1 - createsprite gUnknown_08595BB0, ANIM_ATTACKER, 40, 0, 20, 0, 20, 80, 0, 0, 1 + createsprite gSwirlingSnowballSpriteTemplate, ANIM_ATTACKER, 40, 0, -25, 0, -25, 72, 1 + createsprite gBlizzardIceCrystalSpriteTemplate, ANIM_ATTACKER, 40, 0, 20, 0, 20, 80, 0, 0, 1 delay 3 return BlizzardAgainstPlayer: @@ -5573,31 +5574,31 @@ Move_POWDER_SNOW: createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 1, 0, 3, RGB_BLACK waitforvisualfinish panse_1B SE_W016, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0 - call PowderSnow1 - call PowderSnow1 + call PowderSnowSnowballs + call PowderSnowSnowballs playsewithpan SE_W016B, SOUND_PAN_TARGET waitforvisualfinish waitsound - call FreezeEffect2 + call IceCrystalEffectLong waitforvisualfinish clearmonbg ANIM_DEF_PARTNER delay 20 createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 1, 3, 0, RGB_BLACK end -PowderSnow1: - createsprite gUnknown_08595BC8, ANIM_ATTACKER, 40, 0, 0, 0, 0, 56, 4, 4, 1 +PowderSnowSnowballs: + createsprite gPowderSnowSnowballSpriteTemplate, ANIM_ATTACKER, 40, 0, 0, 0, 0, 56, 4, 4, 1 delay 3 - createsprite gUnknown_08595BC8, ANIM_ATTACKER, 40, 0, -10, 0, -10, 56, 4, 4, 1 + createsprite gPowderSnowSnowballSpriteTemplate, ANIM_ATTACKER, 40, 0, -10, 0, -10, 56, 4, 4, 1 delay 3 - createsprite gUnknown_08595BC8, ANIM_ATTACKER, 40, 0, 10, 0, 10, 56, -4, 3, 1 + createsprite gPowderSnowSnowballSpriteTemplate, ANIM_ATTACKER, 40, 0, 10, 0, 10, 56, -4, 3, 1 delay 3 - createsprite gUnknown_08595BC8, ANIM_ATTACKER, 40, 0, -20, 0, -20, 56, -4, 5, 1 + createsprite gPowderSnowSnowballSpriteTemplate, ANIM_ATTACKER, 40, 0, -20, 0, -20, 56, -4, 5, 1 delay 3 - createsprite gUnknown_08595BC8, ANIM_ATTACKER, 40, 0, 15, 0, 15, 56, 4, 4, 1 + createsprite gPowderSnowSnowballSpriteTemplate, ANIM_ATTACKER, 40, 0, 15, 0, 15, 56, 4, 4, 1 delay 3 - createsprite gUnknown_08595BC8, ANIM_ATTACKER, 40, 0, -20, 0, -20, 56, 4, 4, 1 + createsprite gPowderSnowSnowballSpriteTemplate, ANIM_ATTACKER, 40, 0, -20, 0, -20, 56, 4, 4, 1 delay 3 - createsprite gUnknown_08595BC8, ANIM_ATTACKER, 40, 0, 20, 0, 20, 56, 4, 4, 1 + createsprite gPowderSnowSnowballSpriteTemplate, ANIM_ATTACKER, 40, 0, 20, 0, 20, 56, 4, 4, 1 delay 3 return @@ -5610,42 +5611,42 @@ Move_HYDRO_PUMP: createvisualtask AnimTask_ShakeMon, 5, ANIM_ATTACKER, 0, 2, 40, 1 delay 6 panse_1B SE_W056, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0 - createvisualtask sub_81076C8, 5, 100 - call HydroPump1 - call HydroPump1 - call HydroPump1 + createvisualtask AnimTask_StartSinAnimTimer, 5, 100 + call HydroPumpBeams + call HydroPumpBeams + call HydroPumpBeams createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 3, 0, 37, 1 - call HydroPump2 - call HydroPump1 - call HydroPump1 - call HydroPump2 - call HydroPump1 - call HydroPump1 - call HydroPump2 - call HydroPump1 - call HydroPump1 - call HydroPump2 - call HydroPump1 - call HydroPump1 - call HydroPump2 + call HydroPumpHitSplats + call HydroPumpBeams + call HydroPumpBeams + call HydroPumpHitSplats + call HydroPumpBeams + call HydroPumpBeams + call HydroPumpHitSplats + call HydroPumpBeams + call HydroPumpBeams + call HydroPumpHitSplats + call HydroPumpBeams + call HydroPumpBeams + call HydroPumpHitSplats delay 1 delay 1 - call HydroPump2 + call HydroPumpHitSplats waitforvisualfinish clearmonbg ANIM_DEF_PARTNER blendoff end -HydroPump1: - createsprite gUnknown_085950E4, ANIM_ATTACKER, 3, 10, 10, 0, 16 - createsprite gUnknown_085950E4, ANIM_ATTACKER, 3, 10, 10, 0, -16 +HydroPumpBeams: + createsprite gHydroPumpOrbSpriteTemplate, ANIM_ATTACKER, 3, 10, 10, 0, 16 + createsprite gHydroPumpOrbSpriteTemplate, ANIM_ATTACKER, 3, 10, 10, 0, -16 delay 1 - createsprite gUnknown_085950E4, ANIM_ATTACKER, 3, 10, 10, 0, 16 - createsprite gUnknown_085950E4, ANIM_ATTACKER, 3, 10, 10, 0, -16 + createsprite gHydroPumpOrbSpriteTemplate, ANIM_ATTACKER, 3, 10, 10, 0, 16 + createsprite gHydroPumpOrbSpriteTemplate, ANIM_ATTACKER, 3, 10, 10, 0, -16 delay 1 return -HydroPump2: - createsprite gUnknown_08597388, ANIM_ATTACKER, 4, 0, 15, 1, 1 - createsprite gUnknown_08597388, ANIM_ATTACKER, 4, 0, -15, 1, 1 +HydroPumpHitSplats : + createsprite gWaterHitSplatSpriteTemplate, ANIM_ATTACKER, 4, 0, 15, ANIM_TARGET, 1 + createsprite gWaterHitSplatSpriteTemplate, ANIM_ATTACKER, 4, 0, -15, ANIM_TARGET, 1 return Move_SIGNAL_BEAM: @@ -5655,37 +5656,37 @@ Move_SIGNAL_BEAM: createvisualtask AnimTask_ShakeMon, 5, ANIM_ATTACKER, 0, 2, 25, 1 delay 6 panse_1B SE_W062, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +1, 0 - createvisualtask sub_81076C8, 5, 100 - call SignalBeam1 - call SignalBeam1 - call SignalBeam1 - call SignalBeam1 - call SignalBeam1 - call SignalBeam1 + createvisualtask AnimTask_StartSinAnimTimer, 5, 100 + call SignalBeamOrbs + call SignalBeamOrbs + call SignalBeamOrbs + call SignalBeamOrbs + call SignalBeamOrbs + call SignalBeamOrbs createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 3, 0, 25, 1 createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 4, 8, 5, RGB_RED, 8, 961, 8 - call SignalBeam1 - call SignalBeam1 - call SignalBeam1 - call SignalBeam1 - call SignalBeam1 - call SignalBeam1 - call SignalBeam1 - call SignalBeam1 - call SignalBeam1 - call SignalBeam1 - call SignalBeam1 - call SignalBeam1 - call SignalBeam1 - call SignalBeam1 - call SignalBeam1 - call SignalBeam1 - call SignalBeam1 + call SignalBeamOrbs + call SignalBeamOrbs + call SignalBeamOrbs + call SignalBeamOrbs + call SignalBeamOrbs + call SignalBeamOrbs + call SignalBeamOrbs + call SignalBeamOrbs + call SignalBeamOrbs + call SignalBeamOrbs + call SignalBeamOrbs + call SignalBeamOrbs + call SignalBeamOrbs + call SignalBeamOrbs + call SignalBeamOrbs + call SignalBeamOrbs + call SignalBeamOrbs waitforvisualfinish end -SignalBeam1: - createsprite gUnknown_08595114, ANIM_TARGET, 3, 10, 10, 0, 16 - createsprite gUnknown_0859512C, ANIM_TARGET, 3, 10, 10, 0, -16 +SignalBeamOrbs: + createsprite gSignalBeamRedOrbSpriteTemplate, ANIM_TARGET, 3, 10, 10, 0, 16 + createsprite gSignalBeamGreenOrbSpriteTemplate, ANIM_TARGET, 3, 10, 10, 0, -16 delay 1 return @@ -5699,7 +5700,7 @@ Move_ABSORB: createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 1, 0, 4, RGB(13, 31, 12) waitforvisualfinish playsewithpan SE_W071, SOUND_PAN_TARGET - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 1, 2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, ANIM_TARGET, 2 delay 2 createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 0, 5, 5, 1 waitforvisualfinish @@ -5752,12 +5753,12 @@ Move_MEGA_DRAIN: createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 1, 0, 8, RGB(13, 31, 12) waitforvisualfinish playsewithpan SE_W071, SOUND_PAN_TARGET - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, ANIM_TARGET, 1 delay 2 createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 0, 5, 5, 1 waitforvisualfinish delay 3 - call MegaDrainEffect + call MegaDrainAbsorbEffect waitforvisualfinish delay 15 call HealingEffect @@ -5768,7 +5769,7 @@ Move_MEGA_DRAIN: blendoff end -MegaDrainEffect: +MegaDrainAbsorbEffect: playsewithpan SE_W145C, SOUND_PAN_TARGET createsprite gAbsorptionOrbSpriteTemplate, ANIM_ATTACKER, 3, 0, 5, 8, 26 createsprite gAbsorptionOrbSpriteTemplate, ANIM_ATTACKER, 3, 5, -18, -20, 35 @@ -5813,12 +5814,12 @@ Move_GIGA_DRAIN: createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 1, 0, 12, RGB(13, 31, 12) waitforvisualfinish playsewithpan SE_W071, SOUND_PAN_TARGET - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 1, 0 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, ANIM_TARGET, 0 delay 2 createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 0, 5, 5, 1 waitforvisualfinish delay 3 - call GigaDrainEffect + call GigaDrainAbsorbEffect waitforvisualfinish delay 15 call HealingEffect @@ -5829,7 +5830,7 @@ Move_GIGA_DRAIN: blendoff end -GigaDrainEffect: +GigaDrainAbsorbEffect: playsewithpan SE_W202, SOUND_PAN_TARGET createsprite gAbsorptionOrbSpriteTemplate, ANIM_ATTACKER, 3, 0, 5, 8, 26 createsprite gAbsorptionOrbSpriteTemplate, ANIM_ATTACKER, 3, 5, -18, -40, 35 @@ -5882,9 +5883,9 @@ Move_LEECH_LIFE: monbgprio_2A ANIM_TARGET setalpha 12, 8 delay 1 - createsprite gUnknown_085969C8, ANIM_ATTACKER, 2, -20, 15, 12 + createsprite gLeechLifeNeedleSpriteTemplate, ANIM_ATTACKER, 2, -20, 15, 12 waitforvisualfinish - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 1, 2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, ANIM_TARGET, 2 playsewithpan SE_W071, SOUND_PAN_TARGET delay 2 createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 0, 5, 5, 1 @@ -5904,7 +5905,7 @@ Move_LEECH_LIFE: Move_SYNTHESIS: loadspritegfx ANIM_TAG_SPARKLE_2 - createvisualtask sub_8115A04, 2, 2, 2, 2, 0, 16, RGB(27, 31, 18) + createvisualtask AnimTask_BlendColorCycle, 2, 2, 2, 2, 0, 16, RGB(27, 31, 18) playsewithpan SE_W025, SOUND_PAN_ATTACKER call GrantingStarsEffect waitforvisualfinish @@ -5918,24 +5919,24 @@ Move_SYNTHESIS: Move_TOXIC: loadspritegfx ANIM_TAG_TOXIC_BUBBLE loadspritegfx ANIM_TAG_POISON_BUBBLE - call Toxic1 - call Toxic1 + call ToxicBubbles + call ToxicBubbles waitforvisualfinish delay 15 call PoisonBubblesEffect waitforvisualfinish end -Toxic1: - createsprite gUnknown_08596134, ANIM_TARGET, 2, -24, 16, 1, 1 +ToxicBubbles: + createsprite gToxicBubbleSpriteTemplate, ANIM_TARGET, 2, -24, 16, 1, 1 playsewithpan SE_W092, SOUND_PAN_TARGET delay 15 - createsprite gUnknown_08596134, ANIM_TARGET, 2, 8, 16, 1, 1 + createsprite gToxicBubbleSpriteTemplate, ANIM_TARGET, 2, 8, 16, 1, 1 playsewithpan SE_W092, SOUND_PAN_TARGET delay 15 - createsprite gUnknown_08596134, ANIM_TARGET, 2, -8, 16, 1, 1 + createsprite gToxicBubbleSpriteTemplate, ANIM_TARGET, 2, -8, 16, 1, 1 playsewithpan SE_W092, SOUND_PAN_TARGET delay 15 - createsprite gUnknown_08596134, ANIM_TARGET, 2, 24, 16, 1, 1 + createsprite gToxicBubbleSpriteTemplate, ANIM_TARGET, 2, 24, 16, 1, 1 playsewithpan SE_W092, SOUND_PAN_TARGET delay 15 return @@ -5943,44 +5944,44 @@ Toxic1: Move_SLUDGE: loadspritegfx ANIM_TAG_POISON_BUBBLE playsewithpan SE_W145C, SOUND_PAN_ATTACKER - createsprite gUnknown_085961A8, ANIM_TARGET, 2, 20, 0, 40, 0 + createsprite gSludgeProjectileSpriteTemplate, ANIM_TARGET, 2, 20, 0, 40, 0 waitforvisualfinish createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 3, 0, 5, 1 - createvisualtask sub_8115A04, 2, 4, 1, 2, 0, 12, RGB(30, 0, 31) + createvisualtask AnimTask_BlendColorCycle, 2, 4, 1, 2, 0, 12, RGB(30, 0, 31) call PoisonBubblesEffect waitforvisualfinish end Move_SLUDGE_BOMB: loadspritegfx ANIM_TAG_POISON_BUBBLE - call SludgeBomb1 - call SludgeBomb1 - call SludgeBomb1 - call SludgeBomb1 - call SludgeBomb1 - call SludgeBomb1 - call SludgeBomb1 - call SludgeBomb1 - call SludgeBomb1 - call SludgeBomb1 + call SludgeBombProjectile + call SludgeBombProjectile + call SludgeBombProjectile + call SludgeBombProjectile + call SludgeBombProjectile + call SludgeBombProjectile + call SludgeBombProjectile + call SludgeBombProjectile + call SludgeBombProjectile + call SludgeBombProjectile createvisualtask AnimTask_ShakeMon2, 5, ANIM_TARGET, 3, 0, 15, 1 - createvisualtask sub_8115A04, 2, 4, 1, 2, 0, 12, RGB(30, 0, 31) - createsprite gUnknown_085961D8, ANIM_TARGET, 2, 42, 27, 20 - createsprite gUnknown_085961D8, ANIM_TARGET, 2, -27, 44, 20 - createsprite gUnknown_085961D8, ANIM_TARGET, 2, 39, -28, 20 - createsprite gUnknown_085961D8, ANIM_TARGET, 2, -42, -42, 20 + createvisualtask AnimTask_BlendColorCycle, 2, 4, 1, 2, 0, 12, RGB(30, 0, 31) + createsprite gSludgeBombHitParticleSpriteTemplate, ANIM_TARGET, 2, 42, 27, 20 + createsprite gSludgeBombHitParticleSpriteTemplate, ANIM_TARGET, 2, -27, 44, 20 + createsprite gSludgeBombHitParticleSpriteTemplate, ANIM_TARGET, 2, 39, -28, 20 + createsprite gSludgeBombHitParticleSpriteTemplate, ANIM_TARGET, 2, -42, -42, 20 playsewithpan SE_W091, SOUND_PAN_TARGET delay 5 - createsprite gUnknown_085961D8, ANIM_TARGET, 2, 0, 40, 20 - createsprite gUnknown_085961D8, ANIM_TARGET, 2, -8, -44, 20 - createsprite gUnknown_085961D8, ANIM_TARGET, 2, -46, -28, 20 - createsprite gUnknown_085961D8, ANIM_TARGET, 2, 46, 9, 20 + createsprite gSludgeBombHitParticleSpriteTemplate, ANIM_TARGET, 2, 0, 40, 20 + createsprite gSludgeBombHitParticleSpriteTemplate, ANIM_TARGET, 2, -8, -44, 20 + createsprite gSludgeBombHitParticleSpriteTemplate, ANIM_TARGET, 2, -46, -28, 20 + createsprite gSludgeBombHitParticleSpriteTemplate, ANIM_TARGET, 2, 46, 9, 20 playsewithpan SE_W091, SOUND_PAN_TARGET delay 5 - createsprite gUnknown_085961D8, ANIM_TARGET, 2, 42, 0, 20 - createsprite gUnknown_085961D8, ANIM_TARGET, 2, -43, -12, 20 - createsprite gUnknown_085961D8, ANIM_TARGET, 2, 16, -46, 20 - createsprite gUnknown_085961D8, ANIM_TARGET, 2, -16, 44, 20 + createsprite gSludgeBombHitParticleSpriteTemplate, ANIM_TARGET, 2, 42, 0, 20 + createsprite gSludgeBombHitParticleSpriteTemplate, ANIM_TARGET, 2, -43, -12, 20 + createsprite gSludgeBombHitParticleSpriteTemplate, ANIM_TARGET, 2, 16, -46, 20 + createsprite gSludgeBombHitParticleSpriteTemplate, ANIM_TARGET, 2, -16, 44, 20 playsewithpan SE_W091, SOUND_PAN_TARGET delay 0 waitsound @@ -5988,40 +5989,40 @@ Move_SLUDGE_BOMB: call PoisonBubblesEffect waitforvisualfinish end -SludgeBomb1: +SludgeBombProjectile: playsewithpan SE_W145C, SOUND_PAN_ATTACKER - createsprite gUnknown_085961A8, ANIM_TARGET, 2, 20, 0, 40, 0 + createsprite gSludgeProjectileSpriteTemplate, ANIM_TARGET, 2, 20, 0, 40, 0 delay 3 return Move_ACID: loadspritegfx ANIM_TAG_POISON_BUBBLE monbg ANIM_DEF_PARTNER - createsprite gUnknown_085961C0, ANIM_TARGET, 2, 20, 0, 40, 1, 0, 0 + createsprite gAcidPoisonBubbleSpriteTemplate, ANIM_TARGET, 2, 20, 0, 40, 1, 0, 0 playsewithpan SE_W145C, SOUND_PAN_ATTACKER delay 5 - createsprite gUnknown_085961C0, ANIM_TARGET, 2, 20, 0, 40, 1, 24, 0 + createsprite gAcidPoisonBubbleSpriteTemplate, ANIM_TARGET, 2, 20, 0, 40, 1, 24, 0 playsewithpan SE_W145C, SOUND_PAN_ATTACKER delay 5 - createsprite gUnknown_085961C0, ANIM_TARGET, 2, 20, 0, 40, 1, -24, 0 + createsprite gAcidPoisonBubbleSpriteTemplate, ANIM_TARGET, 2, 20, 0, 40, 1, -24, 0 playsewithpan SE_W145C, SOUND_PAN_ATTACKER delay 15 createvisualtask AnimTask_ShakeMon2, 5, ANIM_TARGET, 2, 0, 10, 1 createvisualtask AnimTask_ShakeMon2, 5, ANIM_DEF_PARTNER, 2, 0, 10, 1 - createvisualtask sub_8115A04, 2, 20, 2, 2, 0, 12, RGB(30, 0, 31) - createsprite gUnknown_0859620C, ANIM_TARGET, 2, 0, -22, 0, 15, 55 + createvisualtask AnimTask_BlendColorCycle, 2, 20, 2, 2, 0, 12, RGB(30, 0, 31) + createsprite gAcidPoisonDropletSpriteTemplate, ANIM_TARGET, 2, 0, -22, 0, 15, 55 playsewithpan SE_W145, SOUND_PAN_TARGET delay 10 - createsprite gUnknown_0859620C, ANIM_TARGET, 2, -26, -24, 0, 15, 55 + createsprite gAcidPoisonDropletSpriteTemplate, ANIM_TARGET, 2, -26, -24, 0, 15, 55 playsewithpan SE_W145, SOUND_PAN_TARGET delay 10 - createsprite gUnknown_0859620C, ANIM_TARGET, 2, 15, -27, 0, 15, 50 + createsprite gAcidPoisonDropletSpriteTemplate, ANIM_TARGET, 2, 15, -27, 0, 15, 50 playsewithpan SE_W145, SOUND_PAN_TARGET delay 10 - createsprite gUnknown_0859620C, ANIM_TARGET, 2, -15, -17, 0, 10, 45 + createsprite gAcidPoisonDropletSpriteTemplate, ANIM_TARGET, 2, -15, -17, 0, 10, 45 playsewithpan SE_W145, SOUND_PAN_TARGET delay 10 - createsprite gUnknown_0859620C, ANIM_TARGET, 2, 27, -22, 0, 15, 50 + createsprite gAcidPoisonDropletSpriteTemplate, ANIM_TARGET, 2, 27, -22, 0, 15, 50 playsewithpan SE_W145, SOUND_PAN_TARGET waitforvisualfinish clearmonbg ANIM_DEF_PARTNER @@ -6034,10 +6035,10 @@ Move_BONEMERANG: monbgprio_28 ANIM_TARGET setalpha 12, 8 playsewithpan SE_W155, SOUND_PAN_ATTACKER - createsprite gUnknown_08597178, ANIM_ATTACKER, 2 + createsprite gBonemerangSpriteTemplate, ANIM_ATTACKER, 2 delay 20 playsewithpan SE_W030, SOUND_PAN_TARGET - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, ANIM_TARGET, 1 createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 5, 0, 5, 1 delay 17 playsewithpan SE_W233, SOUND_PAN_ATTACKER @@ -6054,9 +6055,9 @@ Move_BONE_CLUB: monbgprio_28 ANIM_TARGET setalpha 12, 8 playsewithpan SE_W155, SOUND_PAN_TARGET - createsprite gUnknown_08597190, ANIM_ATTACKER, 2, -42, -25, 0, 0, 15 + createsprite gSpinningBoneSpriteTemplate, ANIM_ATTACKER, 2, -42, -25, 0, 0, 15 delay 12 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, ANIM_TARGET, 1 createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 0, 5, 5, 1 createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 7, 5, 1, RGB_BLACK, 10, 0, 0 playsewithpan SE_W233B, SOUND_PAN_TARGET @@ -6071,9 +6072,9 @@ Move_BONE_RUSH: monbg ANIM_DEF_PARTNER setalpha 12, 8 playsewithpan SE_W155, SOUND_PAN_TARGET - createsprite gUnknown_08597190, ANIM_ATTACKER, 2, -42, -25, 0, 0, 15 + createsprite gSpinningBoneSpriteTemplate, ANIM_ATTACKER, 2, -42, -25, 0, 0, 15 delay 12 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 1, 2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, ANIM_TARGET, 2 createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 0, 3, 5, 1 playsewithpan SE_W030, SOUND_PAN_TARGET waitforvisualfinish @@ -6106,7 +6107,7 @@ Move_MEGAHORN: jumpifcontest MegahornInContest fadetobg BG_DRILL waitbgfadeout - createvisualtask sub_8117660, 5, -2304, 768, 1, -1 + createvisualtask AnimTask_StartSlidingBg, 5, -2304, 768, 1, -1 MegahornContinue: waitbgfadein setalpha 12, 8 @@ -6115,10 +6116,10 @@ MegahornContinue: delay 10 createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, 0, 24, 0, 0, 6 delay 3 - createsprite gUnknown_08596974, ANIM_ATTACKER, 3, -42, 25, 0, 0, 6 + createsprite gMegahornHornSpriteTemplate, ANIM_ATTACKER, 3, -42, 25, 0, 0, 6 delay 4 playsewithpan SE_W011, SOUND_PAN_TARGET - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 1, 0 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, ANIM_TARGET, 0 createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, 1, -16, 4, 1, 4 waitforvisualfinish createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_TARGET, -4, 1, 12, 1 @@ -6132,13 +6133,13 @@ MegahornContinue: blendoff restorebg waitbgfadeout - setarg 7, -1 + setarg 7, 0xFFFF waitbgfadein end MegahornInContest: fadetobg BG_DRILL_CONTESTS waitbgfadeout - createvisualtask sub_8117660, 5, 2304, 768, 0, -1 + createvisualtask AnimTask_StartSlidingBg, 5, 2304, 768, 0, -1 goto MegahornContinue Move_GUST: @@ -6148,11 +6149,11 @@ Move_GUST: monbgprio_28 ANIM_TARGET setalpha 12, 8 playsewithpan SE_W016, SOUND_PAN_TARGET - createsprite gUnknown_08596270, ANIM_ATTACKER, 2, 0, -16 - createvisualtask sub_810DED8, 5, 1, 70 + createsprite gEllipticalGustSpriteTemplate, ANIM_ATTACKER, 2, 0, -16 + createvisualtask AnimTask_AnimateGustTornadoPalette, 5, 1, 70 waitforvisualfinish createvisualtask AnimTask_ShakeMon2, 5, ANIM_TARGET, 1, 0, 7, 1 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 1, 2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, ANIM_TARGET, 2 playsewithpan SE_W016B, SOUND_PAN_TARGET waitforvisualfinish clearmonbg ANIM_DEF_PARTNER @@ -6167,14 +6168,14 @@ Move_WING_ATTACK: setalpha 12, 8 loopsewithpan SE_W017, SOUND_PAN_ATTACKER, 20, 2 createvisualtask AnimTask_TranslateMonElliptical, 2, 0, 12, 4, 1, 4 - createvisualtask sub_810DED8, 5, 1, 70 - createsprite gBattleAnimSpriteTemplate_85962A4, ANIM_ATTACKER, 2, -25, 0, 0, 0, 20 - createsprite gBattleAnimSpriteTemplate_85962A4, ANIM_ATTACKER, 2, 25, 0, 0, 0, 20 + createvisualtask AnimTask_AnimateGustTornadoPalette, 5, 1, 70 + createsprite gGustToTargetSpriteTemplate, ANIM_ATTACKER, 2, -25, 0, 0, 0, 20 + createsprite gGustToTargetSpriteTemplate, ANIM_ATTACKER, 2, 25, 0, 0, 0, 20 delay 24 createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, 0, 24, 0, 0, 9 delay 17 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 16, 0, 1, 1 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, -16, 0, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 16, 0, ANIM_TARGET, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, -16, 0, ANIM_TARGET, 1 loopsewithpan SE_W003, SOUND_PAN_TARGET, 5, 2 waitforvisualfinish createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 11 @@ -6186,8 +6187,8 @@ Move_WING_ATTACK: Move_PECK: loadspritegfx ANIM_TAG_IMPACT playsewithpan SE_W030, SOUND_PAN_TARGET - createvisualtask sub_80D622C, 2, 3, -768, 1, 2 - createsprite gUnknown_085973E8, ANIM_TARGET, 3, -12, 0, 1, 3 + createvisualtask AnimTask_RotateMonToSideAndRestore, 2, 3, -768, ANIM_TARGET, 2 + createsprite gFlashingHitSplatSpriteTemplate, ANIM_TARGET, 3, -12, 0, ANIM_TARGET, 3 waitforvisualfinish end @@ -6198,14 +6199,14 @@ Move_AEROBLAST: call SetSkyBg monbgprio_28 ANIM_TARGET setalpha 12, 8 - call Aeroblast1 + call AeroblastBeam createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 5, 0, 50, 1 - call Aeroblast1 - call Aeroblast1 - call Aeroblast1 - call Aeroblast1 + call AeroblastBeam + call AeroblastBeam + call AeroblastBeam + call AeroblastBeam waitforvisualfinish - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 1, 0 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, ANIM_TARGET, 0 playsewithpan SE_W013, SOUND_PAN_TARGET waitforvisualfinish clearmonbg ANIM_DEF_PARTNER @@ -6213,22 +6214,22 @@ Move_AEROBLAST: delay 0 call UnsetSkyBg end -Aeroblast1: +AeroblastBeam: playsewithpan SE_W026, SOUND_PAN_ATTACKER - createsprite gUnknown_085962D4, ANIM_ATTACKER, 2, 14, -12, 0, -12, 15, 0, 0 - createsprite gUnknown_085962D4, ANIM_ATTACKER, 2, 26, 8, 12, 8, 15, 0, 0 + createsprite gAirWaveCrescentSpriteTemplate, ANIM_ATTACKER, 2, 14, -12, 0, -12, 15, 0, 0 + createsprite gAirWaveCrescentSpriteTemplate, ANIM_ATTACKER, 2, 26, 8, 12, 8, 15, 0, 0 delay 3 playsewithpan SE_W026, SOUND_PAN_ATTACKER - createsprite gUnknown_085962D4, ANIM_ATTACKER, 2, 14, -12, 0, -12, 15, 1, 0 - createsprite gUnknown_085962D4, ANIM_ATTACKER, 2, 26, 8, 12, 8, 15, 1, 0 + createsprite gAirWaveCrescentSpriteTemplate, ANIM_ATTACKER, 2, 14, -12, 0, -12, 15, 1, 0 + createsprite gAirWaveCrescentSpriteTemplate, ANIM_ATTACKER, 2, 26, 8, 12, 8, 15, 1, 0 delay 3 playsewithpan SE_W026, SOUND_PAN_ATTACKER - createsprite gUnknown_085962D4, ANIM_ATTACKER, 2, 14, -12, 0, -12, 15, 2, 0 - createsprite gUnknown_085962D4, ANIM_ATTACKER, 2, 26, 8, 12, 8, 15, 2, 0 + createsprite gAirWaveCrescentSpriteTemplate, ANIM_ATTACKER, 2, 14, -12, 0, -12, 15, 2, 0 + createsprite gAirWaveCrescentSpriteTemplate, ANIM_ATTACKER, 2, 26, 8, 12, 8, 15, 2, 0 delay 3 playsewithpan SE_W026, SOUND_PAN_ATTACKER - createsprite gUnknown_085962D4, ANIM_ATTACKER, 2, 14, -12, 0, -12, 15, 3, 0 - createsprite gUnknown_085962D4, ANIM_ATTACKER, 2, 26, 8, 12, 8, 15, 3, 0 + createsprite gAirWaveCrescentSpriteTemplate, ANIM_ATTACKER, 2, 14, -12, 0, -12, 15, 3, 0 + createsprite gAirWaveCrescentSpriteTemplate, ANIM_ATTACKER, 2, 26, 8, 12, 8, 15, 3, 0 delay 3 return @@ -6238,18 +6239,18 @@ Move_WATER_GUN: monbg ANIM_DEF_PARTNER monbgprio_28 ANIM_TARGET setalpha 12, 8 - createsprite gUnknown_08595208, ANIM_ATTACKER, 2, 20, 0, 0, 0, 40, -25 + createsprite gWaterGunProjectileSpriteTemplate, ANIM_ATTACKER, 2, 20, 0, 0, 0, 40, -25 playsewithpan SE_W145, SOUND_PAN_ATTACKER waitforvisualfinish createvisualtask AnimTask_ShakeMon2, 5, ANIM_TARGET, 1, 0, 8, 1 - createsprite gUnknown_08597388, ANIM_ATTACKER, 4, 0, 0, 1, 2 - createsprite gUnknown_08595220, ANIM_ATTACKER, 2, 0, -15, 0, 15, 55 + createsprite gWaterHitSplatSpriteTemplate, ANIM_ATTACKER, 4, 0, 0, ANIM_TARGET, 2 + createsprite gWaterGunDropletSpriteTemplate, ANIM_ATTACKER, 2, 0, -15, 0, 15, 55 playsewithpan SE_W152, SOUND_PAN_TARGET delay 10 - createsprite gUnknown_08595220, ANIM_ATTACKER, 2, 15, -20, 0, 15, 50 + createsprite gWaterGunDropletSpriteTemplate, ANIM_ATTACKER, 2, 15, -20, 0, 15, 50 playsewithpan SE_W152, SOUND_PAN_TARGET delay 10 - createsprite gUnknown_08595220, ANIM_ATTACKER, 2, -15, -10, 0, 10, 45 + createsprite gWaterGunDropletSpriteTemplate, ANIM_ATTACKER, 2, -15, -10, 0, 10, 45 playsewithpan SE_W152, SOUND_PAN_TARGET waitforvisualfinish clearmonbg ANIM_DEF_PARTNER @@ -6261,7 +6262,7 @@ Move_CRABHAMMER: loadspritegfx ANIM_TAG_WATER_IMPACT monbg ANIM_DEF_PARTNER setalpha 12, 8 - createsprite gUnknown_08597388, ANIM_ATTACKER, 4, 0, 0, 1, 0 + createsprite gWaterHitSplatSpriteTemplate, ANIM_ATTACKER, 4, 0, 0, ANIM_TARGET, 0 playsewithpan SE_W233B, SOUND_PAN_TARGET delay 1 createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 1, RGB(13, 21, 31), 10, 0, 0 @@ -6273,21 +6274,21 @@ Move_CRABHAMMER: waitforvisualfinish loopsewithpan SE_W152, SOUND_PAN_TARGET, 20, 3 createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 0, 4, 8, 1 - createsprite gUnknown_08595238, ANIM_ATTACKER, 2, 10, 10, 20, 1 + createsprite gSmallBubblePairSpriteTemplate, ANIM_ATTACKER, 2, 10, 10, 20, ANIM_TARGET delay 4 - createsprite gUnknown_08595238, ANIM_ATTACKER, 2, 20, -20, 20, 1 + createsprite gSmallBubblePairSpriteTemplate, ANIM_ATTACKER, 2, 20, -20, 20, ANIM_TARGET delay 4 - createsprite gUnknown_08595238, ANIM_ATTACKER, 2, -15, 15, 20, 1 + createsprite gSmallBubblePairSpriteTemplate, ANIM_ATTACKER, 2, -15, 15, 20, ANIM_TARGET delay 4 - createsprite gUnknown_08595238, ANIM_ATTACKER, 2, 0, 0, 20, 1 + createsprite gSmallBubblePairSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 20, ANIM_TARGET delay 4 - createsprite gUnknown_08595238, ANIM_ATTACKER, 2, -10, -20, 20, 1 + createsprite gSmallBubblePairSpriteTemplate, ANIM_ATTACKER, 2, -10, -20, 20, ANIM_TARGET delay 4 - createsprite gUnknown_08595238, ANIM_ATTACKER, 2, 16, -8, 20, 1 + createsprite gSmallBubblePairSpriteTemplate, ANIM_ATTACKER, 2, 16, -8, 20, ANIM_TARGET delay 4 - createsprite gUnknown_08595238, ANIM_ATTACKER, 2, 5, 8, 20, 1 + createsprite gSmallBubblePairSpriteTemplate, ANIM_ATTACKER, 2, 5, 8, 20, ANIM_TARGET delay 4 - createsprite gUnknown_08595238, ANIM_ATTACKER, 2, -16, 0, 20, 1 + createsprite gSmallBubblePairSpriteTemplate, ANIM_ATTACKER, 2, -16, 0, 20, ANIM_TARGET waitforvisualfinish clearmonbg ANIM_DEF_PARTNER blendoff @@ -6307,50 +6308,51 @@ Move_FLAMETHROWER: setalpha 12, 8 createvisualtask AnimTask_ShakeMon, 5, ANIM_ATTACKER, 0, 2, 46, 1 delay 6 - createvisualtask sub_81076C8, 5, 100 + createvisualtask AnimTask_StartSinAnimTimer, 5, 100 panse_1B SE_W053, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0 - call Flamethrower1 - call Flamethrower1 - call Flamethrower1 + call FlamethrowerCreateFlames + call FlamethrowerCreateFlames + call FlamethrowerCreateFlames createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 3, 0, 43, 1 - call Flamethrower1 - call Flamethrower1 - call Flamethrower1 - call Flamethrower1 - call Flamethrower1 - call Flamethrower1 - call Flamethrower1 - call Flamethrower1 + call FlamethrowerCreateFlames + call FlamethrowerCreateFlames + call FlamethrowerCreateFlames + call FlamethrowerCreateFlames + call FlamethrowerCreateFlames + call FlamethrowerCreateFlames + call FlamethrowerCreateFlames + call FlamethrowerCreateFlames waitforvisualfinish clearmonbg ANIM_DEF_PARTNER blendoff end -Flamethrower1: - createsprite gUnknown_08595158, ANIM_ATTACKER, 3, 10, 10, 0, 16 +FlamethrowerCreateFlames: + createsprite gFlamethrowerFlameSpriteTemplate, ANIM_ATTACKER, 3, 10, 10, 0, 16 delay 2 - createsprite gUnknown_08595158, ANIM_ATTACKER, 3, 10, 10, 0, 16 + createsprite gFlamethrowerFlameSpriteTemplate, ANIM_ATTACKER, 3, 10, 10, 0, 16 delay 2 return +@ Also used by Sandstorm weather Move_SANDSTORM: loadspritegfx ANIM_TAG_FLYING_DIRT playsewithpan SE_W201, 0 createvisualtask AnimTask_LoadSandstormBackground, 5, FALSE delay 16 - createsprite gBattleAnimSpriteTemplate_8596BA0, ANIM_ATTACKER, 40, 10, 2304, 96, 0 + createsprite gFlyingSandCrescentSpriteTemplate, ANIM_ATTACKER, 40, 10, 2304, 96, 0 delay 10 - createsprite gBattleAnimSpriteTemplate_8596BA0, ANIM_ATTACKER, 40, 90, 2048, 96, 0 + createsprite gFlyingSandCrescentSpriteTemplate, ANIM_ATTACKER, 40, 90, 2048, 96, 0 delay 10 - createsprite gBattleAnimSpriteTemplate_8596BA0, ANIM_ATTACKER, 40, 50, 2560, 96, 0 + createsprite gFlyingSandCrescentSpriteTemplate, ANIM_ATTACKER, 40, 50, 2560, 96, 0 delay 10 - createsprite gBattleAnimSpriteTemplate_8596BA0, ANIM_ATTACKER, 40, 20, 2304, 96, 0 + createsprite gFlyingSandCrescentSpriteTemplate, ANIM_ATTACKER, 40, 20, 2304, 96, 0 delay 10 - createsprite gBattleAnimSpriteTemplate_8596BA0, ANIM_ATTACKER, 40, 70, 1984, 96, 0 + createsprite gFlyingSandCrescentSpriteTemplate, ANIM_ATTACKER, 40, 70, 1984, 96, 0 delay 10 - createsprite gBattleAnimSpriteTemplate_8596BA0, ANIM_ATTACKER, 40, 0, 2816, 96, 0 + createsprite gFlyingSandCrescentSpriteTemplate, ANIM_ATTACKER, 40, 0, 2816, 96, 0 delay 10 - createsprite gBattleAnimSpriteTemplate_8596BA0, ANIM_ATTACKER, 40, 60, 2560, 96, 0 + createsprite gFlyingSandCrescentSpriteTemplate, ANIM_ATTACKER, 40, 60, 2560, 96, 0 end Move_WHIRLPOOL: @@ -6372,17 +6374,17 @@ Move_WHIRLPOOL: end WhirlpoolEffect: - createsprite gUnknown_08596B70, ANIM_TARGET, 2, 0, 28, 384, 50, 8, 50, 1 + createsprite gWhirlpoolSpriteTemplate, ANIM_TARGET, 2, 0, 28, 384, 50, 8, 50, ANIM_TARGET delay 2 - createsprite gUnknown_08596B70, ANIM_TARGET, 2, 0, 32, 240, 40, 11, -46, 1 + createsprite gWhirlpoolSpriteTemplate, ANIM_TARGET, 2, 0, 32, 240, 40, 11, -46, ANIM_TARGET delay 2 - createsprite gUnknown_08596B70, ANIM_TARGET, 2, 0, 33, 416, 40, 4, 42, 1 + createsprite gWhirlpoolSpriteTemplate, ANIM_TARGET, 2, 0, 33, 416, 40, 4, 42, ANIM_TARGET delay 2 - createsprite gUnknown_08596B70, ANIM_TARGET, 2, 0, 31, 288, 45, 6, -42, 1 + createsprite gWhirlpoolSpriteTemplate, ANIM_TARGET, 2, 0, 31, 288, 45, 6, -42, ANIM_TARGET delay 2 - createsprite gUnknown_08596B70, ANIM_TARGET, 2, 0, 28, 448, 45, 11, 46, 1 + createsprite gWhirlpoolSpriteTemplate, ANIM_TARGET, 2, 0, 28, 448, 45, 11, 46, ANIM_TARGET delay 2 - createsprite gUnknown_08596B70, ANIM_TARGET, 2, 0, 33, 464, 50, 10, -50, 1 + createsprite gWhirlpoolSpriteTemplate, ANIM_TARGET, 2, 0, 33, 464, 50, 10, -50, ANIM_TARGET delay 2 return @@ -6396,16 +6398,16 @@ FlyEnd: FlySetUp: playsewithpan SE_W019, SOUND_PAN_ATTACKER - createsprite gUnknown_08596340, ANIM_ATTACKER, 2, 0, 0, 13, 336 + createsprite gFlyBallUpSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 13, 336 goto FlyEnd FlyUnleash: monbg ANIM_DEF_PARTNER setalpha 12, 8 playsewithpan SE_W104, SOUND_PAN_ATTACKER - createsprite gUnknown_08596358, ANIM_ATTACKER, 2, 20 + createsprite gFlyBallAttackSpriteTemplate, ANIM_ATTACKER, 2, 20 delay 20 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 1, 0 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, ANIM_TARGET, 0 createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 6, 0, 8, 1 playsewithpan SE_W013, SOUND_PAN_TARGET waitforvisualfinish @@ -6422,17 +6424,17 @@ BounceEnd: BounceSetUp: playsewithpan SE_W100, SOUND_PAN_ATTACKER - createsprite gUnknown_08596420, ANIM_ATTACKER, 2, 0, 0 + createsprite gBounceBallShrinkSpriteTemplate, ANIM_ATTACKER, 2, 0, 0 goto BounceEnd BounceUnleash: monbg ANIM_DEF_PARTNER setalpha 12, 8 playsewithpan SE_W207, SOUND_PAN_TARGET - createsprite gUnknown_0859644C, ANIM_TARGET, 3 + createsprite gBounceBallLandSpriteTemplate, ANIM_TARGET, 3 delay 7 playsewithpan SE_W025B, SOUND_PAN_TARGET - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, 0, 0, 1, 0 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, 0, 0, ANIM_TARGET, 0 createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 0, 5, 11, 1 waitforvisualfinish clearmonbg ANIM_DEF_PARTNER @@ -6446,10 +6448,10 @@ Move_KARATE_CHOP: monbgprio_28 ANIM_TARGET setalpha 12, 8 playsewithpan SE_W104, SOUND_PAN_TARGET - createsprite gUnknown_08595E68, ANIM_ATTACKER, 2, -16, 0, 0, 0, 10, 1, 3, 0 + createsprite gKarateChopSpriteTemplate, ANIM_ATTACKER, 2, -16, 0, 0, 0, 10, 1, 3, 0 waitforvisualfinish playsewithpan SE_W004, SOUND_PAN_TARGET - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 1, 2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, ANIM_TARGET, 2 createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 4, 0, 6, 1 waitforvisualfinish clearmonbg ANIM_DEF_PARTNER @@ -6462,12 +6464,12 @@ Move_CROSS_CHOP: monbg ANIM_DEF_PARTNER setalpha 12, 8 playsewithpan SE_W025, SOUND_PAN_TARGET - createsprite gUnknown_08595EC8, ANIM_ATTACKER, 2, 0, 0, 0 - createsprite gUnknown_08595EC8, ANIM_ATTACKER, 2, 0, 0, 1 + createsprite gCrossChopHandSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 0 + createsprite gCrossChopHandSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 1 delay 40 playsewithpan SE_W013, SOUND_PAN_TARGET createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 1, RGB_WHITE, 10, 0, 10 - createsprite gUnknown_085973D0, ANIM_ATTACKER, 3, 0, 0, 1, 20 + createsprite gCrossImpactSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 1, 20 createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 7, 0, 9, 1 waitforvisualfinish clearmonbg ANIM_DEF_PARTNER @@ -6481,10 +6483,10 @@ Move_JUMP_KICK: setalpha 12, 8 createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 4, 4 delay 3 - createsprite gUnknown_08595E80, ANIM_ATTACKER, 2, -16, 8, 0, 0, 10, 1, 1, 1 + createsprite gJumpKickSpriteTemplate, ANIM_ATTACKER, 2, -16, 8, 0, 0, 10, ANIM_TARGET, 1, 1 playsewithpan SE_W026, SOUND_PAN_TARGET waitforvisualfinish - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 1, 0, 0, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 1, 0, 0, ANIM_TARGET, 1 createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 5, 0, 7, 1 playsewithpan SE_W004, SOUND_PAN_TARGET waitforvisualfinish @@ -6502,10 +6504,10 @@ Move_HI_JUMP_KICK: delay 10 createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 3 delay 2 - createsprite gUnknown_08595E80, ANIM_ATTACKER, 2, -16, 8, 0, 0, 10, 1, 1, 1 + createsprite gJumpKickSpriteTemplate, ANIM_ATTACKER, 2, -16, 8, 0, 0, 10, ANIM_TARGET, 1, 1 playsewithpan SE_W026, SOUND_PAN_TARGET waitforvisualfinish - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, ANIM_TARGET, 1 playsewithpan SE_W233B, SOUND_PAN_TARGET createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, 1, -28, 0, 0, 3 delay 3 @@ -6523,7 +6525,7 @@ Move_DOUBLE_KICK: loadspritegfx ANIM_TAG_IMPACT monbg ANIM_DEF_PARTNER setalpha 12, 8 - createsprite gUnknown_08595EB0, ANIM_ATTACKER, 3, 1, 20, 1 + createsprite gFistFootRandomPosSpriteTemplate, ANIM_ATTACKER, 3, 1, 20, 1 createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 4, 0, 6, 1 playsewithpan SE_W233B, SOUND_PAN_TARGET waitforvisualfinish @@ -6548,19 +6550,19 @@ TripleKickContinue: TripleKickLeft: createsprite gFistFootSpriteTemplate, ANIM_TARGET, 4, -16, -8, 20, 1, 1 - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, -16, -16, 1, 2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, -16, -16, ANIM_TARGET, 2 createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 4, 0, 6, 1 goto TripleKickContinue TripleKickRight: createsprite gFistFootSpriteTemplate, ANIM_TARGET, 4, 8, 8, 20, 1, 1 - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 8, 0, 1, 2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 8, 0, ANIM_TARGET, 2 createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 4, 0, 6, 1 goto TripleKickContinue TripleKickCenter: createsprite gFistFootSpriteTemplate, ANIM_TARGET, 4, 0, 0, 20, 1, 1 - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0, -8, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0, -8, ANIM_TARGET, 1 createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 6, 0, 8, 1 goto TripleKickContinue @@ -6574,7 +6576,7 @@ Move_DYNAMIC_PUNCH: setalpha 12, 8 playsewithpan SE_W233B, SOUND_PAN_TARGET createsprite gFistFootSpriteTemplate, ANIM_TARGET, 3, 0, 0, 20, 1, 0 - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, 0, 0, 1, 0 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, 0, 0, ANIM_TARGET, 0 createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 5, 0, 7, 1 delay 1 waitsound @@ -6608,18 +6610,18 @@ Move_COUNTER: waitforvisualfinish createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, 0, 20, 0, 0, 4 delay 4 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, -15, 18, 1, 0 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, -15, 18, ANIM_TARGET, 0 playsewithpan SE_W233B, SOUND_PAN_TARGET delay 1 createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 5, 0, 25, 1 createsprite gFistFootSpriteTemplate, ANIM_ATTACKER, 3, -15, 18, 8, 1, 0 delay 3 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, -4, 1, 0 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, -4, ANIM_TARGET, 0 playsewithpan SE_W233B, SOUND_PAN_TARGET delay 1 createsprite gFistFootSpriteTemplate, ANIM_ATTACKER, 3, 0, -4, 8, 1, 0 delay 3 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 15, 9, 1, 0 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 15, 9, ANIM_TARGET, 0 playsewithpan SE_W233B, SOUND_PAN_TARGET delay 1 createsprite gFistFootSpriteTemplate, ANIM_ATTACKER, 3, 15, 9, 8, 1, 0 @@ -6639,7 +6641,7 @@ Move_VITAL_THROW: waitforvisualfinish createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, 0, 20, 0, 0, 4 delay 2 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, ANIM_TARGET, 1 playsewithpan SE_W233B, SOUND_PAN_TARGET delay 1 createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, 1, -24, 0, 0, 4 @@ -6660,20 +6662,20 @@ Move_ROCK_SMASH: monbg ANIM_DEF_PARTNER setalpha 12, 8 delay 1 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, ANIM_TARGET, 1 createsprite gFistFootSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 8, 1, 0 playsewithpan SE_W233B, SOUND_PAN_TARGET createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 3, 0, 5, 1 waitforvisualfinish playsewithpan SE_W088, SOUND_PAN_TARGET - createsprite gUnknown_08596B1C, ANIM_ATTACKER, 2, 0, 0, 20, 24, 14, 2 - createsprite gUnknown_08596B1C, ANIM_ATTACKER, 2, 5, 0, -20, 24, 14, 1 - createsprite gUnknown_08596B1C, ANIM_ATTACKER, 2, 0, 5, 20, -24, 14, 2 - createsprite gUnknown_08596B1C, ANIM_ATTACKER, 2, -5, 0, -20, -24, 14, 2 - createsprite gUnknown_08596B1C, ANIM_ATTACKER, 2, 0, -5, 30, 18, 8, 2 - createsprite gUnknown_08596B1C, ANIM_ATTACKER, 2, 0, 0, 30, -18, 8, 2 - createsprite gUnknown_08596B1C, ANIM_ATTACKER, 2, 0, 0, -30, 18, 8, 2 - createsprite gUnknown_08596B1C, ANIM_ATTACKER, 2, 0, 0, -30, -18, 8, 2 + createsprite gRockFragmentSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 20, 24, 14, 2 + createsprite gRockFragmentSpriteTemplate, ANIM_ATTACKER, 2, 5, 0, -20, 24, 14, 1 + createsprite gRockFragmentSpriteTemplate, ANIM_ATTACKER, 2, 0, 5, 20, -24, 14, 2 + createsprite gRockFragmentSpriteTemplate, ANIM_ATTACKER, 2, -5, 0, -20, -24, 14, 2 + createsprite gRockFragmentSpriteTemplate, ANIM_ATTACKER, 2, 0, -5, 30, 18, 8, 2 + createsprite gRockFragmentSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 30, -18, 8, 2 + createsprite gRockFragmentSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, -30, 18, 8, 2 + createsprite gRockFragmentSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, -30, -18, 8, 2 createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 0, 3, 7, 1 waitforvisualfinish clearmonbg ANIM_DEF_PARTNER @@ -6693,46 +6695,47 @@ Move_SUBMISSION: waitplaysewithpan SE_W104, SOUND_PAN_ATTACKER, 60 waitplaysewithpan SE_W004, SOUND_PAN_TARGET, 70 waitplaysewithpan SE_W104, SOUND_PAN_ATTACKER, 80 - waitplaysewithpan SE_W004, SOUND_PAN_TARGET, 0x5A + waitplaysewithpan SE_W004, SOUND_PAN_TARGET, 90 createvisualtask AnimTask_TranslateMonElliptical, 2, 0, -18, 6, 6, 4 createvisualtask AnimTask_TranslateMonElliptical, 2, 1, 18, 6, 6, 4 - call Submission1 - call Submission1 - call Submission1 + call SubmissionHit + call SubmissionHit + call SubmissionHit waitforvisualfinish clearmonbg ANIM_DEF_PARTNER blendoff end -Submission1: - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, -12, 1, 1 +SubmissionHit: + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, -12, ANIM_TARGET, 1 delay 8 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, -12, 8, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, -12, 8, ANIM_TARGET, 1 delay 8 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 12, 0, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 12, 0, ANIM_TARGET, 1 delay 8 return +@ Also used by Sunny weather Move_SUNNY_DAY: loadspritegfx ANIM_TAG_SUNLIGHT monbg ANIM_ATK_PARTNER setalpha 13, 3 - createvisualtask sub_8116620, 10, 0x781, 1, 0, 6, RGB_WHITE + createvisualtask AnimTask_BlendBattleAnimPal, 10, 0x781, 1, 0, 6, RGB_WHITE waitforvisualfinish panse_26 SE_W080, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +1, 0 - call SunnyDay1 - call SunnyDay1 - call SunnyDay1 - call SunnyDay1 + call SunnyDayLightRay + call SunnyDayLightRay + call SunnyDayLightRay + call SunnyDayLightRay waitforvisualfinish - createvisualtask sub_8116620, 10, 0x781, 1, 6, 0, RGB_WHITE + createvisualtask AnimTask_BlendBattleAnimPal, 10, 0x781, 1, 6, 0, RGB_WHITE waitforvisualfinish clearmonbg ANIM_ATK_PARTNER blendoff end -SunnyDay1: - createsprite gUnknown_085954A0, ANIM_ATTACKER, 40 +SunnyDayLightRay: + createsprite gSunlightRaySpriteTemplate, ANIM_ATTACKER, 40 delay 6 return @@ -6741,14 +6744,14 @@ Move_COTTON_SPORE: monbg ANIM_DEF_PARTNER monbgprio_28 ANIM_TARGET loopsewithpan SE_W077, SOUND_PAN_TARGET, 18, 10 - call CottonSpore1 - call CottonSpore1 - call CottonSpore1 + call CreateCottonSpores + call CreateCottonSpores + call CreateCottonSpores waitforvisualfinish clearmonbg ANIM_DEF_PARTNER end -CottonSpore1: +CreateCottonSpores: createsprite gSporeParticleSpriteTemplate, ANIM_ATTACKER, 2, 0, -20, 85, 80, 0 delay 12 createsprite gSporeParticleSpriteTemplate, ANIM_ATTACKER, 2, 0, -10, 170, 80, 0 @@ -6763,16 +6766,16 @@ Move_SPORE: setalpha 12, 8 createvisualtask AnimTask_SporeDoubleBattle, 2 loopsewithpan SE_W077, SOUND_PAN_TARGET, 16, 11 - call Spore1 - call Spore1 - call Spore1 + call CreateSpore + call CreateSpore + call CreateSpore waitforvisualfinish delay 1 clearmonbg ANIM_DEF_PARTNER blendoff end -Spore1: +CreateSpore: createsprite gSporeParticleSpriteTemplate, ANIM_TARGET, 2, 0, -20, 85, 80, 1 delay 12 createsprite gSporeParticleSpriteTemplate, ANIM_TARGET, 2, 0, -10, 170, 80, 1 @@ -6809,7 +6812,7 @@ Move_PETAL_DANCE: createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, 0, 24, 0, 0, 5 delay 3 playsewithpan SE_W025B, SOUND_PAN_TARGET - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 1, 0 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, ANIM_TARGET, 0 createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 6, 0, 8, 1 waitforvisualfinish delay 8 @@ -6860,31 +6863,33 @@ Move_RAZOR_LEAF: end Move_NATURE_POWER: + @ No actual animation, uses the animation of a move from sNaturePowerMoves instead + Move_ANCIENT_POWER: loadspritegfx ANIM_TAG_ROCKS loadspritegfx ANIM_TAG_IMPACT monbg ANIM_DEF_PARTNER setalpha 12, 8 - createsprite gBattleAnimSpriteTemplate_85972D8, ANIM_ATTACKER, 2, 4, 1, 10, 1 - createsprite gUnknown_08596C10, ANIM_ATTACKER, 2, 20, 32, -48, 50, 2 - createsprite gUnknown_08596C10, ANIM_ATTACKER, 2, 0, 32, -38, 25, 5 - createsprite gUnknown_08596C10, ANIM_ATTACKER, 2, 32, 32, -28, 40, 3 - createsprite gUnknown_08596C10, ANIM_ATTACKER, 2, -20, 32, -48, 50, 2 - createsprite gUnknown_08596C10, ANIM_ATTACKER, 2, 20, 32, -28, 60, 1 - createsprite gUnknown_08596C10, ANIM_ATTACKER, 2, 0, 32, -28, 30, 4 + createsprite gShakeMonOrTerrainSpriteTemplate, ANIM_ATTACKER, 2, 4, 1, 10, 1 + createsprite gAncientPowerRockSpriteTemplate, ANIM_ATTACKER, 2, 20, 32, -48, 50, 2 + createsprite gAncientPowerRockSpriteTemplate, ANIM_ATTACKER, 2, 0, 32, -38, 25, 5 + createsprite gAncientPowerRockSpriteTemplate, ANIM_ATTACKER, 2, 32, 32, -28, 40, 3 + createsprite gAncientPowerRockSpriteTemplate, ANIM_ATTACKER, 2, -20, 32, -48, 50, 2 + createsprite gAncientPowerRockSpriteTemplate, ANIM_ATTACKER, 2, 20, 32, -28, 60, 1 + createsprite gAncientPowerRockSpriteTemplate, ANIM_ATTACKER, 2, 0, 32, -28, 30, 4 createvisualtask AnimTask_ShakeMon2, 2, ANIM_ATTACKER, 1, 0, 30, 1 playsewithpan SE_W082, SOUND_PAN_ATTACKER delay 10 - createsprite gUnknown_08596C10, ANIM_ATTACKER, 2, 15, 32, -48, 25, 5 - createsprite gUnknown_08596C10, ANIM_ATTACKER, 2, -10, 32, -42, 30, 4 + createsprite gAncientPowerRockSpriteTemplate, ANIM_ATTACKER, 2, 15, 32, -48, 25, 5 + createsprite gAncientPowerRockSpriteTemplate, ANIM_ATTACKER, 2, -10, 32, -42, 30, 4 delay 10 - createsprite gUnknown_08596C10, ANIM_ATTACKER, 2, 0, 32, -42, 25, 5 - createsprite gUnknown_08596C10, ANIM_ATTACKER, 2, -25, 32, -48, 30, 4 + createsprite gAncientPowerRockSpriteTemplate, ANIM_ATTACKER, 2, 0, 32, -42, 25, 5 + createsprite gAncientPowerRockSpriteTemplate, ANIM_ATTACKER, 2, -25, 32, -48, 30, 4 waitforvisualfinish createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, 0, 16, 0, 0, 4 delay 3 playsewithpan SE_W120, SOUND_PAN_TARGET - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, ANIM_TARGET, 1 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 3, 0, 6, 1 waitforvisualfinish createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 7 @@ -6915,33 +6920,33 @@ Move_MIST: monbg ANIM_ATK_PARTNER setalpha 12, 8 loopsewithpan SE_W054, SOUND_PAN_ATTACKER, 20, 15 - call Mist1 - call Mist1 - call Mist1 - call Mist1 - call Mist1 - call Mist1 - call Mist1 + call MistCloud + call MistCloud + call MistCloud + call MistCloud + call MistCloud + call MistCloud + call MistCloud delay 32 - createvisualtask sub_8115A04, 2, 10, 8, 2, 0, 14, RGB_WHITE + createvisualtask AnimTask_BlendColorCycle, 2, 10, 8, 2, 0, 14, RGB_WHITE waitforvisualfinish clearmonbg ANIM_ATK_PARTNER blendoff end -Mist1: - createsprite gUnknown_08595C2C, ANIM_ATTACKER, 2, 0, -24, 48, 240, 0, 1 +MistCloud: + createsprite gMistCloudSpriteTemplate, ANIM_ATTACKER, 2, 0, -24, 48, 240, 0, 1 delay 7 return Move_HAZE: waitforvisualfinish playsewithpan SE_W114, 0 - createvisualtask AnimTask_Haze1, 5 + createvisualtask AnimTask_HazeScrollingFog, 5 delay 30 - createvisualtask sub_8116620, 10, 0x780, 2, 0, 16, RGB_BLACK - delay 0x5A - createvisualtask sub_8116620, 10, 0x780, 1, 16, 0, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, 0x780, 2, 0, 16, RGB_BLACK + delay 90 + createvisualtask AnimTask_BlendBattleAnimPal, 10, 0x780, 1, 16, 0, RGB_BLACK end Move_FIRE_PUNCH: @@ -6950,34 +6955,34 @@ Move_FIRE_PUNCH: loadspritegfx ANIM_TAG_IMPACT monbg ANIM_DEF_PARTNER setalpha 12, 8 - createvisualtask sub_8116620, 10, 4, 2, 0, 9, RGB_RED - createsprite gUnknown_08595368, ANIM_TARGET, 1, 0 - createsprite gUnknown_08595368, ANIM_TARGET, 1, 64 - createsprite gUnknown_08595368, ANIM_TARGET, 1, 128 - createsprite gUnknown_08595368, ANIM_TARGET, 1, 196 + createvisualtask AnimTask_BlendBattleAnimPal, 10, 4, 2, 0, 9, RGB_RED + createsprite gFireSpiralInwardSpriteTemplate, ANIM_TARGET, 1, 0 + createsprite gFireSpiralInwardSpriteTemplate, ANIM_TARGET, 1, 64 + createsprite gFireSpiralInwardSpriteTemplate, ANIM_TARGET, 1, 128 + createsprite gFireSpiralInwardSpriteTemplate, ANIM_TARGET, 1, 196 playsewithpan SE_W172, SOUND_PAN_TARGET waitforvisualfinish createsprite gFistFootSpriteTemplate, ANIM_TARGET, 3, 0, 0, 8, 1, 0 - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, 0, 0, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, 0, 0, ANIM_TARGET, 1 createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 0, 3, 15, 1 - call FireMoveEffect + call FireSpreadEffect delay 4 playsewithpan SE_W007, SOUND_PAN_TARGET waitforvisualfinish - createvisualtask sub_8116620, 10, 4, 0, 9, 0, RGB_RED + createvisualtask AnimTask_BlendBattleAnimPal, 10, 4, 0, 9, 0, RGB_RED waitforvisualfinish clearmonbg ANIM_DEF_PARTNER blendoff end -FireMoveEffect: - createsprite gUnknown_08595380, ANIM_TARGET, 1, 0, 10, 192, 176, 40 - createsprite gUnknown_08595380, ANIM_TARGET, 1, 0, 10, -192, 240, 40 - createsprite gUnknown_08595380, ANIM_TARGET, 1, 0, 10, 192, -160, 40 - createsprite gUnknown_08595380, ANIM_TARGET, 1, 0, 10, -192, -112, 40 - createsprite gUnknown_08595380, ANIM_TARGET, 1, 0, 10, 160, 48, 40 - createsprite gUnknown_08595380, ANIM_TARGET, 1, 0, 10, -224, -32, 40 - createsprite gUnknown_08595380, ANIM_TARGET, 1, 0, 10, 112, -128, 40 +FireSpreadEffect: + createsprite gFireSpreadSpriteTemplate, ANIM_TARGET, 1, 0, 10, 192, 176, 40 + createsprite gFireSpreadSpriteTemplate, ANIM_TARGET, 1, 0, 10, -192, 240, 40 + createsprite gFireSpreadSpriteTemplate, ANIM_TARGET, 1, 0, 10, 192, -160, 40 + createsprite gFireSpreadSpriteTemplate, ANIM_TARGET, 1, 0, 10, -192, -112, 40 + createsprite gFireSpreadSpriteTemplate, ANIM_TARGET, 1, 0, 10, 160, 48, 40 + createsprite gFireSpreadSpriteTemplate, ANIM_TARGET, 1, 0, 10, -224, -32, 40 + createsprite gFireSpreadSpriteTemplate, ANIM_TARGET, 1, 0, 10, 112, -128, 40 return Move_LEER: @@ -7013,7 +7018,7 @@ Move_DREAM_EATER: waitforvisualfinish setalpha 12, 8 createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 0, 2, 25, 1 - call DreamEaterEffect + call DreamEaterAbsorb waitforvisualfinish delay 15 call HealingEffect @@ -7023,7 +7028,7 @@ Move_DREAM_EATER: delay 1 call UnsetPsychicBackground end -DreamEaterEffect: +DreamEaterAbsorb: playsewithpan SE_W207, SOUND_PAN_TARGET createsprite gAbsorptionOrbSpriteTemplate, ANIM_ATTACKER, 3, 0, 5, 8, 26 createsprite gAbsorptionOrbSpriteTemplate, ANIM_ATTACKER, 3, 5, -18, -40, 35 @@ -7075,25 +7080,25 @@ Move_POISON_GAS: setalpha 12, 8 delay 0 playsewithpan SE_W054, SOUND_PAN_ATTACKER - createsprite gUnknown_08595C9C, ANIM_TARGET, 0, 64, 0, 0, -32, -6, 4192, 1072, 0 + createsprite gPoisonGasCloudSpriteTemplate, ANIM_TARGET, 0, 64, 0, 0, -32, -6, 4192, 1072, 0 delay 4 playsewithpan SE_W054, SOUND_PAN_ATTACKER - createsprite gUnknown_08595C9C, ANIM_TARGET, 0, 64, 0, 0, -32, -6, 4192, 1072, 0 + createsprite gPoisonGasCloudSpriteTemplate, ANIM_TARGET, 0, 64, 0, 0, -32, -6, 4192, 1072, 0 delay 4 playsewithpan SE_W054, SOUND_PAN_ATTACKER - createsprite gUnknown_08595C9C, ANIM_TARGET, 0, 64, 0, 0, -32, -6, 4192, 1072, 0 + createsprite gPoisonGasCloudSpriteTemplate, ANIM_TARGET, 0, 64, 0, 0, -32, -6, 4192, 1072, 0 delay 4 playsewithpan SE_W054, SOUND_PAN_ATTACKER - createsprite gUnknown_08595C9C, ANIM_TARGET, 0, 64, 0, 0, -32, -6, 4192, 1072, 0 + createsprite gPoisonGasCloudSpriteTemplate, ANIM_TARGET, 0, 64, 0, 0, -32, -6, 4192, 1072, 0 delay 4 playsewithpan SE_W054, SOUND_PAN_ATTACKER - createsprite gUnknown_08595C9C, ANIM_TARGET, 0, 64, 0, 0, -32, -6, 4192, 1072, 0 + createsprite gPoisonGasCloudSpriteTemplate, ANIM_TARGET, 0, 64, 0, 0, -32, -6, 4192, 1072, 0 delay 4 playsewithpan SE_W054, SOUND_PAN_ATTACKER - createsprite gUnknown_08595C9C, ANIM_TARGET, 0, 64, 0, 0, -32, -6, 4192, 1072, 0 + createsprite gPoisonGasCloudSpriteTemplate, ANIM_TARGET, 0, 64, 0, 0, -32, -6, 4192, 1072, 0 delay 40 loopsewithpan SE_W054, SOUND_PAN_TARGET, 28, 6 - createvisualtask sub_8115A04, 2, 4, 6, 2, 0, 12, RGB(26, 0, 26) + createvisualtask AnimTask_BlendColorCycle, 2, 4, 6, 2, 0, 12, RGB(26, 0, 26) waitforvisualfinish blendoff clearmonbg ANIM_DEF_PARTNER @@ -7106,11 +7111,11 @@ Move_BIND: BindWrap: playsewithpan SE_W020, SOUND_PAN_TARGET - call BindWrap1 - call BindWrap1 + call BindWrapSqueezeTarget + call BindWrapSqueezeTarget waitforvisualfinish end -BindWrap1: +BindWrapSqueezeTarget: createvisualtask AnimTask_ScaleMonAndRestore, 5, 10, -5, 5, ANIM_TARGET, 0 delay 16 return @@ -7123,44 +7128,44 @@ Move_PSYBEAM: loadspritegfx ANIM_TAG_GOLD_RING playsewithpan SE_W060, SOUND_PAN_ATTACKER call SetPsychicBackground - createsoundtask sub_8158C58, SE_W060B, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 3, 4, 0, 15 - call Psybeam1 - call Psybeam1 + createsoundtask SoundTask_LoopSEAdjustPanning, SE_W060B, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 3, 4, 0, 15 + call PsybeamRings + call PsybeamRings createvisualtask AnimTask_SwayMon, 5, 0, 6, 2048, 4, ANIM_TARGET - createvisualtask sub_8115A04, 2, 4, 2, 2, 0, 12, RGB(31, 18, 31) - call Psybeam1 - call Psybeam1 - call Psybeam1 - call Psybeam1 - call Psybeam1 - call Psybeam1 - call Psybeam1 - call Psybeam1 - call Psybeam1 + createvisualtask AnimTask_BlendColorCycle, 2, 4, 2, 2, 0, 12, RGB(31, 18, 31) + call PsybeamRings + call PsybeamRings + call PsybeamRings + call PsybeamRings + call PsybeamRings + call PsybeamRings + call PsybeamRings + call PsybeamRings + call PsybeamRings waitforvisualfinish delay 1 call UnsetPsychicBackground end -Psybeam1: - createsprite gUnknown_0859663C, ANIM_TARGET, 2, 16, 0, 0, 0, 13, 0 +PsybeamRings: + createsprite gGoldRingSpriteTemplate, ANIM_TARGET, 2, 16, 0, 0, 0, 13, 0 delay 4 return Move_HYPNOSIS: loadspritegfx ANIM_TAG_GOLD_RING call SetPsychicBackground - call Hypnosis1 - call Hypnosis1 - call Hypnosis1 - createvisualtask sub_8115A04, 2, 4, 2, 2, 0, 12, RGB(31, 18, 31) + call HypnosisRings + call HypnosisRings + call HypnosisRings + createvisualtask AnimTask_BlendColorCycle, 2, 4, 2, 2, 0, 12, RGB(31, 18, 31) waitforvisualfinish delay 1 call UnsetPsychicBackground end -Hypnosis1: +HypnosisRings: playsewithpan SE_W048, SOUND_PAN_ATTACKER - createsprite gUnknown_0859663C, ANIM_TARGET, 2, 0, 8, 0, 8, 27, 0 - createsprite gUnknown_0859663C, ANIM_TARGET, 2, 16, -8, 0, -8, 27, 0 + createsprite gGoldRingSpriteTemplate, ANIM_TARGET, 2, 0, 8, 0, 8, 27, 0 + createsprite gGoldRingSpriteTemplate, ANIM_TARGET, 2, 16, -8, 0, -8, 27, 0 delay 6 return @@ -7168,23 +7173,23 @@ Move_PSYWAVE: loadspritegfx ANIM_TAG_BLUE_RING playsewithpan SE_W060, SOUND_PAN_ATTACKER call SetPsychicBackground - createvisualtask sub_81076C8, 5, 100 - createsoundtask sub_8158C58, SE_W100, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 2, 9, 0, 10 - call Psywave1 - call Psywave1 - createvisualtask sub_8115A04, 2, 4, 1, 4, 0, 12, RGB(31, 18, 31) - call Psywave1 - call Psywave1 - call Psywave1 - call Psywave1 + createvisualtask AnimTask_StartSinAnimTimer, 5, 100 + createsoundtask SoundTask_LoopSEAdjustPanning, SE_W100, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 2, 9, 0, 10 + call PsywaveRings + call PsywaveRings + createvisualtask AnimTask_BlendColorCycle, 2, 4, 1, 4, 0, 12, RGB(31, 18, 31) + call PsywaveRings + call PsywaveRings + call PsywaveRings + call PsywaveRings waitforvisualfinish delay 1 call UnsetPsychicBackground end -Psywave1: - createsprite gUnknown_08595170, ANIM_TARGET, 3, 10, 10, 0, 16 +PsywaveRings: + createsprite gPsywaveRingSpriteTemplate, ANIM_TARGET, 3, 10, 10, 0, 16 delay 4 - createsprite gUnknown_08595170, ANIM_TARGET, 3, 10, 10, 0, 16 + createsprite gPsywaveRingSpriteTemplate, ANIM_TARGET, 3, 10, 10, 0, 16 delay 4 return @@ -7192,15 +7197,15 @@ Move_ZAP_CANNON: loadspritegfx ANIM_TAG_BLACK_BALL_2 loadspritegfx ANIM_TAG_SPARK_2 playsewithpan SE_W086, SOUND_PAN_ATTACKER - createsprite gUnknown_08595764, ANIM_TARGET, 3, 10, 0, 0, 0, 30, 0 - createsprite gUnknown_08595790, ANIM_TARGET, 4, 10, 0, 16, 30, 0, 40, 0 - createsprite gUnknown_08595790, ANIM_TARGET, 4, 10, 0, 16, 30, 64, 40, 1 - createsprite gUnknown_08595790, ANIM_TARGET, 4, 10, 0, 16, 30, 128, 40, 0 - createsprite gUnknown_08595790, ANIM_TARGET, 4, 10, 0, 16, 30, 192, 40, 2 - createsprite gUnknown_08595790, ANIM_TARGET, 4, 10, 0, 8, 30, 32, 40, 0 - createsprite gUnknown_08595790, ANIM_TARGET, 4, 10, 0, 8, 30, 96, 40, 1 - createsprite gUnknown_08595790, ANIM_TARGET, 4, 10, 0, 8, 30, 160, 40, 0 - createsprite gUnknown_08595790, ANIM_TARGET, 4, 10, 0, 8, 30, 224, 40, 2 + createsprite gZapCannonBallSpriteTemplate, ANIM_TARGET, 3, 10, 0, 0, 0, 30, 0 + createsprite gZapCannonSparkSpriteTemplate, ANIM_TARGET, 4, 10, 0, 16, 30, 0, 40, 0 + createsprite gZapCannonSparkSpriteTemplate, ANIM_TARGET, 4, 10, 0, 16, 30, 64, 40, 1 + createsprite gZapCannonSparkSpriteTemplate, ANIM_TARGET, 4, 10, 0, 16, 30, 128, 40, 0 + createsprite gZapCannonSparkSpriteTemplate, ANIM_TARGET, 4, 10, 0, 16, 30, 192, 40, 2 + createsprite gZapCannonSparkSpriteTemplate, ANIM_TARGET, 4, 10, 0, 8, 30, 32, 40, 0 + createsprite gZapCannonSparkSpriteTemplate, ANIM_TARGET, 4, 10, 0, 8, 30, 96, 40, 1 + createsprite gZapCannonSparkSpriteTemplate, ANIM_TARGET, 4, 10, 0, 8, 30, 160, 40, 0 + createsprite gZapCannonSparkSpriteTemplate, ANIM_TARGET, 4, 10, 0, 8, 30, 224, 40, 2 waitforvisualfinish createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 4, 0, 5, 1 delay 15 @@ -7220,14 +7225,14 @@ Move_STEEL_WING: setalpha 12, 8 loopsewithpan SE_W017, SOUND_PAN_ATTACKER, 20, 2 createvisualtask AnimTask_TranslateMonElliptical, 2, 0, 12, 4, 1, 4 - createvisualtask sub_810DED8, 5, 1, 70 - createsprite gBattleAnimSpriteTemplate_85962A4, ANIM_ATTACKER, 2, -25, 0, 0, 0, 20 - createsprite gBattleAnimSpriteTemplate_85962A4, ANIM_ATTACKER, 2, 25, 0, 0, 0, 20 + createvisualtask AnimTask_AnimateGustTornadoPalette, 5, 1, 70 + createsprite gGustToTargetSpriteTemplate, ANIM_ATTACKER, 2, -25, 0, 0, 0, 20 + createsprite gGustToTargetSpriteTemplate, ANIM_ATTACKER, 2, 25, 0, 0, 0, 20 delay 24 createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, 0, 24, 0, 0, 9 delay 17 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 16, 0, 1, 1 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, -16, 0, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 16, 0, ANIM_TARGET, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, -16, 0, ANIM_TARGET, 1 playsewithpan SE_W013, SOUND_PAN_TARGET waitforvisualfinish createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 11 @@ -7245,7 +7250,7 @@ Move_IRON_TAIL: setalpha 12, 8 createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 4, 4 delay 6 - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, 0, 0, 1, 2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, 0, 0, ANIM_TARGET, 2 createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 3, 0, 6, 1 playsewithpan SE_W233B, SOUND_PAN_TARGET waitforvisualfinish @@ -7265,7 +7270,7 @@ Move_POISON_TAIL: setalpha 12, 8 createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 4, 4 delay 6 - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, 0, 0, 1, 2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, 0, 0, ANIM_TARGET, 2 createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 3, 0, 6, 1 playsewithpan SE_W233B, SOUND_PAN_TARGET waitforvisualfinish @@ -7284,16 +7289,16 @@ Move_METAL_CLAW: createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 6, 4 delay 2 playsewithpan SE_W013, SOUND_PAN_TARGET - createsprite gBattleAnimSpriteTemplate_8597138, ANIM_TARGET, 2, -10, -10, 0 - createsprite gBattleAnimSpriteTemplate_8597138, ANIM_TARGET, 2, -10, 10, 0 - createsprite gBattleAnimSpriteTemplate_85972D8, ANIM_ATTACKER, 2, -4, 1, 10, 3, 1 + createsprite gClawSlashSpriteTemplate, ANIM_TARGET, 2, -10, -10, 0 + createsprite gClawSlashSpriteTemplate, ANIM_TARGET, 2, -10, 10, 0 + createsprite gShakeMonOrTerrainSpriteTemplate, ANIM_ATTACKER, 2, -4, 1, 10, 3, 1 delay 8 createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 6, 4 delay 2 playsewithpan SE_W013, SOUND_PAN_TARGET - createsprite gBattleAnimSpriteTemplate_8597138, ANIM_TARGET, 2, 10, -10, 1 - createsprite gBattleAnimSpriteTemplate_8597138, ANIM_TARGET, 2, 10, 10, 1 - createsprite gBattleAnimSpriteTemplate_85972D8, ANIM_ATTACKER, 2, -4, 1, 10, 3, 1 + createsprite gClawSlashSpriteTemplate, ANIM_TARGET, 2, 10, -10, 1 + createsprite gClawSlashSpriteTemplate, ANIM_TARGET, 2, 10, 10, 1 + createsprite gShakeMonOrTerrainSpriteTemplate, ANIM_ATTACKER, 2, -4, 1, 10, 3, 1 waitforvisualfinish end @@ -7305,10 +7310,10 @@ Move_NIGHT_SHADE: waitbgfadein delay 10 playsewithpan SE_W043, SOUND_PAN_ATTACKER - createvisualtask sub_811188C, 5, 85 + createvisualtask AnimTask_NightShadeClone, 5, 85 delay 70 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 2, 0, 12, 1 - createvisualtask sub_8115A04, 2, 4, 0, 2, 0, 13, RGB_BLACK + createvisualtask AnimTask_BlendColorCycle, 2, 4, 0, 2, 0, 13, RGB_BLACK waitforvisualfinish clearmonbg ANIM_ATTACKER delay 1 @@ -7346,7 +7351,7 @@ Move_SHADOW_BALL: fadetobg BG_GHOST waitbgfadein delay 15 - createsoundtask sub_8158C58, SE_W054, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 5, 5, 0, 5 + createsoundtask SoundTask_LoopSEAdjustPanning, SE_W054, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 5, 5, 0, 5 createsprite gShadowBallSpriteTemplate, ANIM_TARGET, 2, 16, 16, 8 waitforvisualfinish playsewithpan SE_W028, SOUND_PAN_TARGET @@ -7360,7 +7365,7 @@ Move_LICK: loadspritegfx ANIM_TAG_LICK delay 15 playsewithpan SE_W122, SOUND_PAN_TARGET - createsprite gUnknown_08596D8C, ANIM_TARGET, 2, 0, 0 + createsprite gLickSpriteTemplate, ANIM_TARGET, 2, 0, 0 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 1, 0, 16, 1 waitforvisualfinish end @@ -7370,7 +7375,7 @@ Move_FOCUS_ENERGY: playsewithpan SE_W082, SOUND_PAN_ATTACKER call EndureEffect delay 8 - createvisualtask sub_8115A04, 2, 2, 2, 2, 0, 11, RGB_WHITE + createvisualtask AnimTask_BlendColorCycle, 2, 2, 2, 2, 0, 11, RGB_WHITE createvisualtask AnimTask_ShakeMon2, 2, ANIM_ATTACKER, 1, 0, 32, 1 call EndureEffect delay 8 @@ -7383,7 +7388,7 @@ Move_BIDE: end BideSetUp: loopsewithpan SE_W036, SOUND_PAN_ATTACKER, 9, 2 - createvisualtask sub_8115A04, 2, 2, 2, 2, 0, 11, RGB_RED + createvisualtask AnimTask_BlendColorCycle, 2, 2, 2, 2, 0, 11, RGB_RED createvisualtask AnimTask_ShakeMon2, 2, ANIM_ATTACKER, 1, 0, 32, 1 waitforvisualfinish end @@ -7393,7 +7398,7 @@ BideUnleash: monbg ANIM_DEF_PARTNER setalpha 12, 8 loopsewithpan SE_W036, SOUND_PAN_ATTACKER, 9, 2 - createvisualtask sub_8116620, 10, 2, 2, 0, 11, RGB_RED + createvisualtask AnimTask_BlendBattleAnimPal, 10, 2, 2, 0, 11, RGB_RED createvisualtask AnimTask_ShakeMon2, 2, ANIM_ATTACKER, 1, 0, 32, 1 waitforvisualfinish createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, 0, 24, 0, 0, 4 @@ -7401,18 +7406,18 @@ BideUnleash: createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_ATTACKER, 2, 0, 12, 1 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 3, 0, 16, 1 playsewithpan SE_W004, SOUND_PAN_TARGET - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 1, 18, -8, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 1, 18, -8, ANIM_TARGET, 1 delay 5 playsewithpan SE_W004, SOUND_PAN_TARGET - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 1, -18, 8, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 1, -18, 8, ANIM_TARGET, 1 delay 5 playsewithpan SE_W004, SOUND_PAN_TARGET - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 1, -8, -5, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 1, -8, -5, ANIM_TARGET, 1 waitforvisualfinish delay 5 createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 7 waitforvisualfinish - createvisualtask sub_8116620, 10, 2, 2, 11, 0, RGB_RED + createvisualtask AnimTask_BlendBattleAnimPal, 10, 2, 2, 11, 0, RGB_RED waitforvisualfinish clearmonbg ANIM_DEF_PARTNER blendoff @@ -7426,31 +7431,31 @@ Move_STRING_SHOT: createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 5, 1, 2, 0, 9, RGB_BLACK waitforvisualfinish loopsewithpan SE_W081, SOUND_PAN_ATTACKER, 9, 6 - call StringShot1 - call StringShot1 - call StringShot1 - call StringShot1 - call StringShot1 - call StringShot1 - call StringShot1 - call StringShot1 - call StringShot1 - call StringShot1 - call StringShot1 - call StringShot1 - call StringShot1 - call StringShot1 - call StringShot1 - call StringShot1 - call StringShot1 - call StringShot1 + call StringShotThread + call StringShotThread + call StringShotThread + call StringShotThread + call StringShotThread + call StringShotThread + call StringShotThread + call StringShotThread + call StringShotThread + call StringShotThread + call StringShotThread + call StringShotThread + call StringShotThread + call StringShotThread + call StringShotThread + call StringShotThread + call StringShotThread + call StringShotThread waitforvisualfinish playsewithpan SE_W081B, SOUND_PAN_TARGET - createsprite gUnknown_085969F8, ANIM_TARGET, 2, 0, 10 + createsprite gStringWrapSpriteTemplate, ANIM_TARGET, 2, 0, 10 delay 4 - createsprite gUnknown_085969F8, ANIM_TARGET, 2, 0, -2 + createsprite gStringWrapSpriteTemplate, ANIM_TARGET, 2, 0, -2 delay 4 - createsprite gUnknown_085969F8, ANIM_TARGET, 2, 0, 22 + createsprite gStringWrapSpriteTemplate, ANIM_TARGET, 2, 0, 22 waitforvisualfinish clearmonbg ANIM_DEF_PARTNER delay 1 @@ -7458,7 +7463,7 @@ Move_STRING_SHOT: createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 5, 1, 2, 9, 0, RGB_BLACK end -StringShot1: +StringShotThread: createsprite gWebThreadSpriteTemplate, ANIM_TARGET, 2, 20, 0, 512, 20, 1 delay 1 return @@ -7472,20 +7477,20 @@ Move_SPIDER_WEB: waitforvisualfinish monbgprio_28 ANIM_TARGET loopsewithpan SE_W081, SOUND_PAN_ATTACKER, 9, 6 - call SpiderWeb1 - call SpiderWeb1 - call SpiderWeb1 - call SpiderWeb1 - call SpiderWeb1 - call SpiderWeb1 - call SpiderWeb1 - call SpiderWeb1 - call SpiderWeb1 - call SpiderWeb1 - call SpiderWeb1 - call SpiderWeb1 - call SpiderWeb1 - call SpiderWeb1 + call SpiderWebThread + call SpiderWebThread + call SpiderWebThread + call SpiderWebThread + call SpiderWebThread + call SpiderWebThread + call SpiderWebThread + call SpiderWebThread + call SpiderWebThread + call SpiderWebThread + call SpiderWebThread + call SpiderWebThread + call SpiderWebThread + call SpiderWebThread waitforvisualfinish playsewithpan SE_W081B, SOUND_PAN_TARGET createsprite gSpiderWebSpriteTemplate, ANIM_ATTACKER, 2 @@ -7495,14 +7500,14 @@ Move_SPIDER_WEB: createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 5, 1, 2, 9, 0, RGB_BLACK end -SpiderWeb1: +SpiderWebThread: createsprite gWebThreadSpriteTemplate, ANIM_TARGET, 2, 20, 0, 512, 20, 0 delay 1 return Move_RAZOR_WIND: choosetwoturnanim RazorWindSetUp, RazorWindUnleash -RazorWindContinue: +RazorWindEnd: waitforvisualfinish end @@ -7514,7 +7519,7 @@ RazorWindSetUp: createsprite gRazorWindTornadoSpriteTemplate, ANIM_ATTACKER, 2, 32, 0, 16, 16, 170, 7, 40 waitforvisualfinish playsewithpan SE_W016B, SOUND_PAN_ATTACKER - goto RazorWindContinue + goto RazorWindEnd RazorWindUnleash: loadspritegfx ANIM_TAG_AIR_WAVE_2 @@ -7522,13 +7527,13 @@ RazorWindUnleash: monbg ANIM_TARGET setalpha 12, 8 playsewithpan SE_W013B, SOUND_PAN_ATTACKER - createsprite gUnknown_085962D4, ANIM_ATTACKER, 2, 14, 8, 0, 0, 22, 2, 1 + createsprite gAirWaveCrescentSpriteTemplate, ANIM_ATTACKER, 2, 14, 8, 0, 0, 22, 2, 1 delay 2 playsewithpan SE_W013B, SOUND_PAN_ATTACKER - createsprite gUnknown_085962D4, ANIM_ATTACKER, 2, 14, -8, 16, 14, 22, 1, 1 + createsprite gAirWaveCrescentSpriteTemplate, ANIM_ATTACKER, 2, 14, -8, 16, 14, 22, 1, 1 delay 2 playsewithpan SE_W013B, SOUND_PAN_ATTACKER - createsprite gUnknown_085962D4, ANIM_ATTACKER, 2, 14, 12, -16, -14, 22, 0, 1 + createsprite gAirWaveCrescentSpriteTemplate, ANIM_ATTACKER, 2, 14, 12, -16, -14, 22, 0, 1 delay 17 playsewithpan SE_W013, SOUND_PAN_TARGET createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 2, 0, 10, 1 @@ -7536,7 +7541,7 @@ RazorWindUnleash: waitforvisualfinish clearmonbg ANIM_TARGET blendoff - goto RazorWindContinue + goto RazorWindEnd Move_DISABLE: loadspritegfx ANIM_TAG_SPARKLE_4 @@ -7544,7 +7549,7 @@ Move_DISABLE: monbgprio_28 ANIM_TARGET setalpha 8, 8 playsewithpan SE_W197, SOUND_PAN_ATTACKER - createsprite gUnknown_0853EE84, ANIM_ATTACKER, 13, 24, -16 + createsprite gSpinningSparkleSpriteTemplate, ANIM_ATTACKER, 13, 24, -16 waitforvisualfinish createvisualtask AnimTask_GrowAndGreyscale, 5 loopsewithpan SE_W020, SOUND_PAN_TARGET, 15, 4 @@ -7560,10 +7565,10 @@ Move_RECOVER: monbg ANIM_ATK_PARTNER setalpha 12, 8 loopsewithpan SE_W025, SOUND_PAN_ATTACKER, 13, 3 - createvisualtask sub_8115A04, 2, 2, 0, 6, 0, 11, RGB(31, 31, 11) - call Recover1 - call Recover1 - call Recover1 + createvisualtask AnimTask_BlendColorCycle, 2, 2, 0, 6, 0, 11, RGB(31, 31, 11) + call RecoverAbsorbEffect + call RecoverAbsorbEffect + call RecoverAbsorbEffect waitforvisualfinish clearmonbg ANIM_ATK_PARTNER blendoff @@ -7572,7 +7577,7 @@ Move_RECOVER: waitforvisualfinish end -Recover1: +RecoverAbsorbEffect: createsprite gPowerAbsorptionOrbSpriteTemplate, ANIM_ATTACKER, 2, 40, -10, 13 delay 3 createsprite gPowerAbsorptionOrbSpriteTemplate, ANIM_ATTACKER, 2, -35, -10, 13 @@ -7595,14 +7600,14 @@ Move_MIMIC: monbg_22 ANIM_DEF_PARTNER monbgprio_29 panse_1B SE_W107, SOUND_PAN_TARGET, SOUND_PAN_ATTACKER, -3, 0 - createvisualtask sub_80FF458, 5, 128, 24 + createvisualtask AnimTask_ShrinkTargetCopy, 5, 128, 24 delay 15 createsprite gMimicOrbSpriteTemplate, ANIM_TARGET, 2, -12, 24 delay 10 - setarg 7, -1 + setarg 7, 0xFFFF waitforvisualfinish playsewithpan SE_W036, SOUND_PAN_ATTACKER - createvisualtask sub_8115A04, 2, 2, 0, 2, 0, 11, RGB_WHITE + createvisualtask AnimTask_BlendColorCycle, 2, 2, 0, 2, 0, 11, RGB_WHITE waitforvisualfinish clearmonbg_23 ANIM_DEF_PARTNER blendoff @@ -7621,7 +7626,7 @@ Move_CONSTRICT: createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 3, 0, 6, 1 delay 20 playsewithpan SE_W020, SOUND_PAN_TARGET - setarg 7, -1 + setarg 7, 0xFFFF waitforvisualfinish end @@ -7631,29 +7636,29 @@ CurseGhost: loadspritegfx ANIM_TAG_NAIL loadspritegfx ANIM_TAG_GHOSTLY_SPIRIT monbg ANIM_ATK_PARTNER - createvisualtask sub_8112758, 5 + createvisualtask AnimTask_CurseStretchingBlackBg, 5 waitforvisualfinish delay 20 - createsprite gUnknown_08596DD0, ANIM_ATTACKER, 2 + createsprite gCurseNailSpriteTemplate, ANIM_ATTACKER, 2 delay 60 - call CurseGhost1 + call CurseGhostShakeFromNail delay 41 - call CurseGhost1 + call CurseGhostShakeFromNail delay 41 - call CurseGhost1 + call CurseGhostShakeFromNail waitforvisualfinish clearmonbg ANIM_ATK_PARTNER delay 1 monbg ANIM_DEF_PARTNER playsewithpan SE_W171, SOUND_PAN_TARGET - createsprite gBattleAnimSpriteTemplate_8596DE8, ANIM_TARGET, 2 + createsprite gCurseGhostSpriteTemplate, ANIM_TARGET, 2 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 2, 0, 14, 1 waitforvisualfinish createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 1, 16, 0, RGB_BLACK waitforvisualfinish clearmonbg ANIM_DEF_PARTNER end -CurseGhost1: +CurseGhostShakeFromNail: createvisualtask AnimTask_ShakeMon2, 2, ANIM_ATTACKER, 4, 0, 10, 0 playsewithpan SE_W020, SOUND_PAN_ATTACKER return @@ -7666,8 +7671,8 @@ CurseStats: end CurseStats1: playsewithpan SE_W082, SOUND_PAN_ATTACKER - createvisualtask sub_8116B14, 5 - createvisualtask sub_8115A04, 5, 2, 4, 2, 0, 10, RGB_RED + createvisualtask AnimTask_DrawFallingWhiteLinesOnAttacker, 5 + createvisualtask AnimTask_BlendColorCycle, 5, 2, 4, 2, 0, 10, RGB_RED return Move_SOFT_BOILED: @@ -7687,7 +7692,7 @@ Move_SOFT_BOILED: delay 8 createsprite gThinRingExpandingSpriteTemplate, ANIM_ATTACKER, 3, 31, 16, 0, 1 delay 60 - setarg 7, -1 + setarg 7, 0xFFFF waitforvisualfinish clearmonbg ANIM_ATK_PARTNER call HealingEffect2 @@ -7697,30 +7702,30 @@ Move_HEAL_BELL: loadspritegfx ANIM_TAG_BELL loadspritegfx ANIM_TAG_MUSIC_NOTES_2 loadspritegfx ANIM_TAG_THIN_RING - createvisualtask sub_8116620, 10, 10, 0, 0, 10, RGB_WHITE + createvisualtask AnimTask_BlendBattleAnimPal, 10, 10, 0, 0, 10, RGB_WHITE waitforvisualfinish - createvisualtask sub_8105CB4, 5 + createvisualtask AnimTask_LoadMusicNotesPals, 5 createsprite gBellSpriteTemplate, ANIM_ATTACKER, 2, 0, -24, 0, 1 delay 12 createsprite gHealBellMusicNoteSpriteTemplate, ANIM_ATTACKER, 40, 0, -24, 48, -18, 35, 0, 0 createsprite gHealBellMusicNoteSpriteTemplate, ANIM_ATTACKER, 40, 0, -24, -48, 20, 30, 1, 1 createsprite gHealBellMusicNoteSpriteTemplate, ANIM_ATTACKER, 40, 0, -24, -38, -29, 30, 2, 2 createsprite gHealBellMusicNoteSpriteTemplate, ANIM_ATTACKER, 40, 0, -24, 36, 18, 30, 3, 3 - call HealBell1 - delay 0x21 + call HealBellRing + delay 33 createsprite gHealBellMusicNoteSpriteTemplate, ANIM_ATTACKER, 40, 0, -24, 19, 26, 35, 4, 4 createsprite gHealBellMusicNoteSpriteTemplate, ANIM_ATTACKER, 40, 0, -24, -34, -12, 30, 5, 5 createsprite gHealBellMusicNoteSpriteTemplate, ANIM_ATTACKER, 40, 0, -24, 41, -20, 34, 6, 2 createsprite gHealBellMusicNoteSpriteTemplate, ANIM_ATTACKER, 40, 0, -24, -15, 26, 32, 7, 0 - call HealBell1 - delay 0x21 + call HealBellRing + delay 33 createsprite gHealBellMusicNoteSpriteTemplate, ANIM_ATTACKER, 40, 0, -24, -48, 18, 31, 0, 2 createsprite gHealBellMusicNoteSpriteTemplate, ANIM_ATTACKER, 40, 0, -24, 48, -20, 30, 2, 5 createsprite gHealBellMusicNoteSpriteTemplate, ANIM_ATTACKER, 40, 0, -24, 38, 29, 33, 4, 3 createsprite gHealBellMusicNoteSpriteTemplate, ANIM_ATTACKER, 40, 0, -24, -36, -18, 30, 6, 1 - call HealBell1 + call HealBellRing waitforvisualfinish - createvisualtask sub_8105D60, 5 + createvisualtask AnimTask_FreeMusicNotesPals, 5 waitforvisualfinish unloadspritegfx ANIM_TAG_BELL unloadspritegfx ANIM_TAG_MUSIC_NOTES_2 @@ -7734,13 +7739,13 @@ Move_HEAL_BELL: unloadspritegfx ANIM_TAG_SPARKLE_2 loadspritegfx ANIM_TAG_THIN_RING playsewithpan SE_REAPOKE, SOUND_PAN_ATTACKER - createvisualtask sub_8116664, 10, 4, 3, 10, 0, RGB(12, 24, 30) - createvisualtask sub_8116620, 10, 10, 3, 10, 0, RGB_WHITE + createvisualtask AnimTask_BlendBattleAnimPalExclude, 10, 4, 3, 10, 0, RGB(12, 24, 30) + createvisualtask AnimTask_BlendBattleAnimPal, 10, 10, 3, 10, 0, RGB_WHITE createsprite gBlendThinRingExpandingSpriteTemplate, ANIM_ATTACKER, 16, 0, 0, 0, 1 end -HealBell1: - createvisualtask sub_8116664, 10, 4, 3, 8, 0, RGB(12, 24, 30) - createvisualtask sub_8116620, 10, 10, 3, 2, 10, RGB_WHITE +HealBellRing: + createvisualtask AnimTask_BlendBattleAnimPalExclude, 10, 4, 3, 8, 0, RGB(12, 24, 30) + createvisualtask AnimTask_BlendBattleAnimPal, 10, 10, 3, 2, 10, RGB_WHITE createsprite gThinRingExpandingSpriteTemplate, ANIM_ATTACKER, 40, 0, -24, 0, 1 playsewithpan SE_W215, SOUND_PAN_ATTACKER return @@ -7751,7 +7756,7 @@ Move_FAKE_OUT: waitforvisualfinish playsewithpan SE_W166, SOUND_PAN_TARGET createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 4, 0, 5, 1 - createvisualtask sub_8106020, 3 + createvisualtask AnimTask_StretchTargetUp, 3 waitforvisualfinish createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 16, 0, RGB_WHITE end @@ -7768,7 +7773,7 @@ Move_SCARY_FACE: createsprite gEyeSparkleSpriteTemplate, ANIM_ATTACKER, 0, -16, -8 createsprite gEyeSparkleSpriteTemplate, ANIM_ATTACKER, 0, 16, -8 waitforvisualfinish - createvisualtask sub_810A094, 3, 20, 1, 0 + createvisualtask AnimTask_ShakeTargetInPattern, 3, 20, 1, FALSE playsewithpan SE_W081B, SOUND_PAN_TARGET createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 27, 3, 16, 0, RGB_BLACK waitforvisualfinish @@ -7914,7 +7919,7 @@ PresentHeal: Move_BATON_PASS: loadspritegfx ANIM_TAG_POKEBALL playsewithpan SE_W226, SOUND_PAN_ATTACKER - createvisualtask sub_8115A04, 2, 31, 1, 2, 0, 11, RGB(31, 22, 30) + createvisualtask AnimTask_BlendColorCycle, 2, 31, 1, 2, 0, 11, RGB(31, 22, 30) createsprite gBatonPassPokeballSpriteTemplate, ANIM_ATTACKER, 2 end @@ -8019,44 +8024,44 @@ Move_TRI_ATTACK: delay 20 playsewithpan SE_W161, SOUND_PAN_ATTACKER delay 20 - createsoundtask sub_8158C58, SE_W161, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 5, 6, 0, 7 + createsoundtask SoundTask_LoopSEAdjustPanning, SE_W161, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 5, 6, 0, 7 waitforvisualfinish createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 2, 0, 16, RGB_BLACK delay 16 loadspritegfx ANIM_TAG_FIRE - createsprite gUnknown_08595410, ANIM_TARGET, 2, 0, 0, 30, 30, -1, 0 + createsprite gLargeFlameScatterSpriteTemplate, ANIM_TARGET, 2, 0, 0, 30, 30, -1, 0 playsewithpan SE_W172B, SOUND_PAN_TARGET - createsprite gUnknown_08595410, ANIM_TARGET, 2, 0, 0, 30, 30, 0, 1 + createsprite gLargeFlameScatterSpriteTemplate, ANIM_TARGET, 2, 0, 0, 30, 30, 0, 1 delay 1 - createsprite gUnknown_08595410, ANIM_TARGET, 2, 0, 0, 30, 30, -1, -1 + createsprite gLargeFlameScatterSpriteTemplate, ANIM_TARGET, 2, 0, 0, 30, 30, -1, -1 delay 1 - createsprite gUnknown_08595410, ANIM_TARGET, 2, 0, 0, 30, 30, 2, 1 + createsprite gLargeFlameScatterSpriteTemplate, ANIM_TARGET, 2, 0, 0, 30, 30, 2, 1 delay 1 - createsprite gUnknown_08595410, ANIM_TARGET, 2, 0, 0, 30, 30, 1, -1 + createsprite gLargeFlameScatterSpriteTemplate, ANIM_TARGET, 2, 0, 0, 30, 30, 1, -1 delay 1 - createsprite gUnknown_08595410, ANIM_TARGET, 2, 0, 0, 30, 30, -1, 1 + createsprite gLargeFlameScatterSpriteTemplate, ANIM_TARGET, 2, 0, 0, 30, 30, -1, 1 delay 1 - createsprite gUnknown_08595410, ANIM_TARGET, 2, 0, 0, 30, 30, 1, -2 + createsprite gLargeFlameScatterSpriteTemplate, ANIM_TARGET, 2, 0, 0, 30, 30, 1, -2 delay 1 - createsprite gUnknown_08595410, ANIM_TARGET, 2, 0, 0, 30, 30, 3, 1 + createsprite gLargeFlameScatterSpriteTemplate, ANIM_TARGET, 2, 0, 0, 30, 30, 3, 1 delay 2 - createvisualtask sub_810A094, 2, 20, 3, 1, 1 + createvisualtask AnimTask_ShakeTargetInPattern, 2, 20, 3, TRUE, 1 waitforvisualfinish loadspritegfx ANIM_TAG_LIGHTNING - createvisualtask sub_8115F10, 2, 257, 257, 257 + createvisualtask AnimTask_InvertScreenColor, 2, 257, 257, 257 playsewithpan SE_W161B, SOUND_PAN_TARGET - createsprite gUnknown_085956C0, ANIM_TARGET, 2, 0, -48 + createsprite gLightningSpriteTemplate, ANIM_TARGET, 2, 0, -48 delay 1 - createsprite gUnknown_085956C0, ANIM_TARGET, 2, 0, -16 + createsprite gLightningSpriteTemplate, ANIM_TARGET, 2, 0, -16 delay 1 - createsprite gUnknown_085956C0, ANIM_TARGET, 2, 0, 16 + createsprite gLightningSpriteTemplate, ANIM_TARGET, 2, 0, 16 delay 20 - createvisualtask sub_810A094, 2, 20, 3, 1, 0 + createvisualtask AnimTask_ShakeTargetInPattern, 2, 20, 3, TRUE, 0 delay 2 - createvisualtask sub_8115F10, 2, 257, 257, 257 + createvisualtask AnimTask_InvertScreenColor, 2, 257, 257, 257 waitforvisualfinish loadspritegfx ANIM_TAG_ICE_CRYSTALS - call FreezeEffect1 + call IceCrystalEffectShort createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 2, 16, 0, RGB_BLACK waitforvisualfinish end @@ -8068,26 +8073,26 @@ Move_WILL_O_WISP: monbgprio_2A ANIM_TARGET playsewithpan SE_W052, SOUND_PAN_ATTACKER waitplaysewithpan SE_W052, SOUND_PAN_ATTACKER, 10 - createvisualtask sub_8159278, 2, SOUND_PAN_ATTACKER, SOUND_PAN_ATTACKER, 1, 0 - createsprite gUnknown_0859563C, ANIM_ATTACKER, 2, 0, 0, 0 + createvisualtask SoundTask_AdjustPanningVar, 2, SOUND_PAN_ATTACKER, SOUND_PAN_ATTACKER, 1, 0 + createsprite gWillOWispOrbSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 0 delay 3 - createsprite gUnknown_0859563C, ANIM_ATTACKER, 3, 0, 0, 1 + createsprite gWillOWispOrbSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 1 delay 3 - createsprite gUnknown_0859563C, ANIM_ATTACKER, 4, 0, 0, 2 + createsprite gWillOWispOrbSpriteTemplate, ANIM_ATTACKER, 4, 0, 0, 2 delay 3 - createsprite gUnknown_0859563C, ANIM_ATTACKER, 4, 0, 0, 3 + createsprite gWillOWispOrbSpriteTemplate, ANIM_ATTACKER, 4, 0, 0, 3 delay 40 - createvisualtask sub_8159278, 2, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 2, 0 + createvisualtask SoundTask_AdjustPanningVar, 2, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 2, 0 waitforvisualfinish monbgprio_29 playsewithpan SE_W172B, SOUND_PAN_TARGET createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 4, 0, 13, 1 - createsprite gUnknown_0859566C, ANIM_ATTACKER, 2, 0 - createsprite gUnknown_0859566C, ANIM_ATTACKER, 2, 42 - createsprite gUnknown_0859566C, ANIM_ATTACKER, 2, 84 - createsprite gUnknown_0859566C, ANIM_ATTACKER, 2, 126 - createsprite gUnknown_0859566C, ANIM_ATTACKER, 2, 168 - createsprite gUnknown_0859566C, ANIM_ATTACKER, 2, 210 + createsprite gWillOWispFireSpriteTemplate, ANIM_ATTACKER, 2, 0 + createsprite gWillOWispFireSpriteTemplate, ANIM_ATTACKER, 2, 42 + createsprite gWillOWispFireSpriteTemplate, ANIM_ATTACKER, 2, 84 + createsprite gWillOWispFireSpriteTemplate, ANIM_ATTACKER, 2, 126 + createsprite gWillOWispFireSpriteTemplate, ANIM_ATTACKER, 2, 168 + createsprite gWillOWispFireSpriteTemplate, ANIM_ATTACKER, 2, 210 waitforvisualfinish clearmonbg ANIM_DEF_PARTNER end @@ -8096,7 +8101,7 @@ Move_ENCORE: loadspritegfx ANIM_TAG_SPOTLIGHT loadspritegfx ANIM_TAG_TAG_HAND createvisualtask AnimTask_CreateSpotlight, 2 - createvisualtask sub_8116960, 2, 248, 3, 0, 10, 0 + createvisualtask AnimTask_HardwarePaletteFade, 2, 248, 3, 0, 10, 0 waitforvisualfinish createsprite gSpotlightSpriteTemplate, ANIM_TARGET, 2, 0, -8 createsprite gClappingHandSpriteTemplate, ANIM_ATTACKER, 2, -2, 0, 0, 0, 9 @@ -8104,10 +8109,10 @@ Move_ENCORE: createsprite gClappingHand2SpriteTemplate, ANIM_ATTACKER, 3, -2, 0, 0, 0, 9 createsprite gClappingHand2SpriteTemplate, ANIM_ATTACKER, 3, 2, 0, 1, 0, 9 delay 16 - createvisualtask sub_8159244, 5, 223, SOUND_PAN_TARGET + createvisualtask SoundTask_PlaySE2WithPanning, 5, SE_W227B, SOUND_PAN_TARGET createvisualtask AnimTask_SwayMon, 5, 1, 8, 1536, 5, ANIM_TARGET waitforvisualfinish - createvisualtask sub_8116960, 2, 248, 3, 10, 0, 1 + createvisualtask AnimTask_HardwarePaletteFade, 2, 248, 3, 10, 0, 1 waitforvisualfinish createvisualtask AnimTask_RemoveSpotlight, 2 end @@ -8119,8 +8124,8 @@ Move_TRICK: createsprite gTrickBagSpriteTemplate, ANIM_ATTACKER, 2, -40, 208 delay 16 playsewithpan SE_W166, 0 - createvisualtask sub_8106020, 3 - createvisualtask sub_81060B0, 3 + createvisualtask AnimTask_StretchTargetUp, 3 + createvisualtask AnimTask_StretchAttackerUp, 3 delay 30 playsewithpan SE_W104, 0 delay 24 @@ -8159,14 +8164,14 @@ Move_WISH: Move_STOCKPILE: loadspritegfx ANIM_TAG_GRAY_ORB playsewithpan SE_W025, SOUND_PAN_ATTACKER - createvisualtask sub_8115A04, 2, 2, 8, 1, 0, 12, RGB_WHITE + createvisualtask AnimTask_BlendColorCycle, 2, 2, 8, 1, 0, 12, RGB_WHITE createvisualtask AnimTask_StockpileDeformMon, 5 - call Stockpile1 - call Stockpile1 + call StockpileAbsorb + call StockpileAbsorb waitforvisualfinish createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 2, 0, 12, 0, RGB_WHITE end -Stockpile1: +StockpileAbsorb: createsprite gStockpileAbsorptionOrbSpriteTemplate, ANIM_ATTACKER, 2, 55, 55, 13 delay 1 createsprite gStockpileAbsorptionOrbSpriteTemplate, ANIM_ATTACKER, 2, -55, -55, 13 @@ -8207,12 +8212,12 @@ Move_SPIT_UP: jumpifmoveturn 3, SpitUpStrongest SpitUpContinue: delay 5 - createvisualtask sub_80D6388, 2, 0, 1, 8, 1, 0 + createvisualtask AnimTask_ShakeTargetBasedOnMovePowerOrDmg, 2, FALSE, 1, 8, 1, 0 playsewithpan SE_W003, SOUND_PAN_TARGET - createsprite gUnknown_085973E8, ANIM_TARGET, 3, -12, 10, 1, 1 + createsprite gFlashingHitSplatSpriteTemplate, ANIM_TARGET, 3, -12, 10, ANIM_TARGET, 1 delay 5 playsewithpan SE_W003, SOUND_PAN_TARGET - createsprite gUnknown_085973E8, ANIM_TARGET, 3, 12, -10, 1, 1 + createsprite gFlashingHitSplatSpriteTemplate, ANIM_TARGET, 3, 12, -10, ANIM_TARGET, 1 waitforvisualfinish end SpitUpStrong: @@ -8282,29 +8287,29 @@ Move_MORNING_SUN: loadspritegfx ANIM_TAG_BLUE_STAR createvisualtask AnimTask_MorningSunLightBeam, 5 delay 8 - createvisualtask sub_8116620, 10, 0x781, 8, 0, 12, RGB_WHITE + createvisualtask AnimTask_BlendBattleAnimPal, 10, 0x781, 8, 0, 12, RGB_WHITE delay 14 - call MorningSun1 - call MorningSun1 - call MorningSun1 - call MorningSun1 - call MorningSun1 - call MorningSun1 - call MorningSun1 - call MorningSun1 - call MorningSun1 - call MorningSun1 - call MorningSun1 - call MorningSun1 - call MorningSun1 - call MorningSun1 - call MorningSun1 - createvisualtask sub_8116620, 10, 0x781, 3, 12, 0, RGB_WHITE + call MorningSunStar + call MorningSunStar + call MorningSunStar + call MorningSunStar + call MorningSunStar + call MorningSunStar + call MorningSunStar + call MorningSunStar + call MorningSunStar + call MorningSunStar + call MorningSunStar + call MorningSunStar + call MorningSunStar + call MorningSunStar + call MorningSunStar + createvisualtask AnimTask_BlendBattleAnimPal, 10, 0x781, 3, 12, 0, RGB_WHITE waitforvisualfinish waitsound call HealingEffect end -MorningSun1: +MorningSunStar: createsprite gGreenStarSpriteTemplate, ANIM_ATTACKER, 2, 30, 640 delay 5 return @@ -8318,7 +8323,7 @@ Move_SWEET_SCENT: call SweetScentEffect createsprite gSweetScentPetalSpriteTemplate, ANIM_ATTACKER, 2, 55, 0 setpan SOUND_PAN_TARGET - createvisualtask sub_8115A04, 2, 20, 1, 5, 5, 13, RGB(31, 21, 21) + createvisualtask AnimTask_BlendColorCycle, 2, 20, 1, 5, 5, 13, RGB(31, 21, 21) call SweetScentEffect waitforvisualfinish end @@ -8356,42 +8361,42 @@ Move_HYPER_BEAM: createvisualtask AnimTask_ShakeMon2, 2, ANIM_ATTACKER, 1, 0, 4, 1 waitforvisualfinish delay 30 - createsoundtask sub_8158C58, SE_W063B, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 1, 15, 0, 5 + createsoundtask SoundTask_LoopSEAdjustPanning, SE_W063B, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 1, 15, 0, 5 createvisualtask AnimTask_ShakeMon, 2, ANIM_ATTACKER, 0, 4, 50, 1 - createvisualtask sub_8115D94, 2, ANIM_TAG_ORBS, 1, 12, 31, 16, 0, 0 - call HyperBeam1 - call HyperBeam1 - call HyperBeam1 - call HyperBeam1 - call HyperBeam1 + createvisualtask AnimTask_FlashAnimTagWithColor, 2, ANIM_TAG_ORBS, 1, 12, RGB(31, 0, 0), 16, 0, 0 + call HyperBeamOrbs + call HyperBeamOrbs + call HyperBeamOrbs + call HyperBeamOrbs + call HyperBeamOrbs createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 4, 0, 50, 1 - createvisualtask sub_8116620, 10, 4, 2, 0, 11, RGB(25, 25, 25) - call HyperBeam1 - call HyperBeam1 - call HyperBeam1 - call HyperBeam1 - call HyperBeam1 - call HyperBeam1 - call HyperBeam1 - call HyperBeam1 - call HyperBeam1 - call HyperBeam1 - call HyperBeam1 - call HyperBeam1 - call HyperBeam1 - call HyperBeam1 - call HyperBeam1 - call HyperBeam1 - call HyperBeam1 - call HyperBeam1 - call HyperBeam1 - call HyperBeam1 - call HyperBeam1 - createvisualtask sub_8116620, 10, 4, 2, 11, 0, RGB(25, 25, 25) + createvisualtask AnimTask_BlendBattleAnimPal, 10, 4, 2, 0, 11, RGB(25, 25, 25) + call HyperBeamOrbs + call HyperBeamOrbs + call HyperBeamOrbs + call HyperBeamOrbs + call HyperBeamOrbs + call HyperBeamOrbs + call HyperBeamOrbs + call HyperBeamOrbs + call HyperBeamOrbs + call HyperBeamOrbs + call HyperBeamOrbs + call HyperBeamOrbs + call HyperBeamOrbs + call HyperBeamOrbs + call HyperBeamOrbs + call HyperBeamOrbs + call HyperBeamOrbs + call HyperBeamOrbs + call HyperBeamOrbs + call HyperBeamOrbs + call HyperBeamOrbs + createvisualtask AnimTask_BlendBattleAnimPal, 10, 4, 2, 11, 0, RGB(25, 25, 25) waitforvisualfinish createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 4, 16, 0, RGB_BLACK end -HyperBeam1: +HyperBeamOrbs: createsprite gHyperBeamOrbSpriteTemplate, ANIM_TARGET, 2 createsprite gHyperBeamOrbSpriteTemplate, ANIM_TARGET, 2 delay 1 @@ -8400,9 +8405,9 @@ HyperBeam1: Move_FLATTER: loadspritegfx ANIM_TAG_SPOTLIGHT loadspritegfx ANIM_TAG_CONFETTI - createvisualtask sub_8159244, 5, 223, SOUND_PAN_TARGET + createvisualtask SoundTask_PlaySE2WithPanning, 5, SE_W227B, SOUND_PAN_TARGET createvisualtask AnimTask_CreateSpotlight, 2 - createvisualtask sub_8116960, 2, 248, 3, 0, 10, 0 + createvisualtask AnimTask_HardwarePaletteFade, 2, 248, 3, 0, 10, 0 waitforvisualfinish createsprite gFlatterSpotlightSpriteTemplate, ANIM_TARGET, 2, 0, -8, 80 delay 0 @@ -8410,7 +8415,7 @@ Move_FLATTER: delay 10 createsprite gVerticalDipSpriteTemplate, ANIM_ATTACKER, 2, 5, 2, ANIM_TARGET delay 0 - createvisualtask sub_8159210, 5, 229, SOUND_PAN_ATTACKER + createvisualtask SoundTask_PlaySE1WithPanning, 5, SE_W260, SOUND_PAN_ATTACKER call CreateFlatterConfetti call CreateFlatterConfetti call CreateFlatterConfetti @@ -8431,9 +8436,9 @@ Move_FLATTER: call CreateFlatterConfetti call CreateFlatterConfetti delay 5 - createvisualtask sub_8159210, 5, 229, SOUND_PAN_TARGET + createvisualtask SoundTask_PlaySE1WithPanning, 5, SE_W260, SOUND_PAN_TARGET waitforvisualfinish - createvisualtask sub_8116960, 2, 248, 3, 10, 0, 1 + createvisualtask AnimTask_HardwarePaletteFade, 2, 248, 3, 10, 0, 1 waitforvisualfinish createvisualtask AnimTask_RemoveSpotlight, 2 end @@ -8444,7 +8449,7 @@ CreateFlatterConfetti: Move_ROLE_PLAY: monbg ANIM_ATK_PARTNER - createvisualtask sub_8116620, 10, 4, 2, 0, 16, RGB_WHITE + createvisualtask AnimTask_BlendBattleAnimPal, 10, 4, 2, 0, 16, RGB_WHITE createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 2, 0, 10, RGB_BLACK waitforvisualfinish playsewithpan SE_W161, SOUND_PAN_ATTACKER @@ -8452,7 +8457,7 @@ Move_ROLE_PLAY: createvisualtask AnimTask_RolePlaySilhouette, 2 waitforvisualfinish clearmonbg ANIM_ATK_PARTNER - createvisualtask sub_8116620, 10, 4, 2, 16, 0, RGB_WHITE + createvisualtask AnimTask_BlendBattleAnimPal, 10, 4, 2, 16, 0, RGB_WHITE delay 8 createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 2, 10, 0, RGB_BLACK end @@ -8461,7 +8466,7 @@ Move_REFRESH: loadspritegfx ANIM_TAG_THIN_RING loadspritegfx ANIM_TAG_SPARKLE_2 playsewithpan SE_W287, SOUND_PAN_ATTACKER - createvisualtask sub_815DFCC, 2, 0 + createvisualtask AnimTask_StatusClearedEffect, 2, 0 waitforvisualfinish playsewithpan SE_W234, SOUND_PAN_ATTACKER call GrantingStarsEffect @@ -8478,15 +8483,15 @@ Move_BLAZE_KICK: monbg ANIM_TARGET setalpha 12, 8 playsewithpan SE_W172, SOUND_PAN_TARGET - createsprite gUnknown_08595F14, ANIM_TARGET, 3, 0, 0, 1, 30 - createvisualtask sub_8116620, 10, 4, 2, 0, 7, RGB_WHITE + createsprite gSpinningHandOrFootSpriteTemplate, ANIM_TARGET, 3, 0, 0, 1, 30 + createvisualtask AnimTask_BlendBattleAnimPal, 10, 4, 2, 0, 7, RGB_WHITE delay 30 playsewithpan SE_W007, SOUND_PAN_TARGET - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, 0, 0, 1, 0 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, 0, 0, ANIM_TARGET, 0 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 3, 0, 14, 1 - createvisualtask sub_8116620, 10, 4, 2, 0, 0, RGB_WHITE + createvisualtask AnimTask_BlendBattleAnimPal, 10, 4, 2, 0, 0, RGB_WHITE createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 3, 1, RGB_BLACK, 8, 0, 0 - call FireMoveEffect + call FireSpreadEffect waitforvisualfinish clearmonbg ANIM_TARGET blendoff @@ -8494,11 +8499,11 @@ Move_BLAZE_KICK: Move_HYPER_VOICE: loadspritegfx ANIM_TAG_THIN_RING - createvisualtask sub_81590B8, 5, 0 + createvisualtask SoundTask_PlayCryWithEcho, 5, 0 call HyperVoiceEffect waitforvisualfinish delay 8 - createvisualtask sub_81590B8, 5, 1 + createvisualtask SoundTask_PlayCryWithEcho, 5, 1 call HyperVoiceEffect waitforvisualfinish end @@ -8508,8 +8513,8 @@ HyperVoiceEffect: createsprite gHyperVoiceRingSpriteTemplate, ANIM_ATTACKER, 0, 45, 0, 0, 0, 0, 0, 1 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 1, 0, 6, 1 createvisualtask AnimTask_ShakeMon2, 2, ANIM_DEF_PARTNER, 1, 0, 6, 1 - createvisualtask sub_81162A4, 2, 1, 0, 6, 1 - createvisualtask sub_8159078, 5 + createvisualtask AnimTask_ShakeBattleTerrain, 2, 1, 0, 6, 1 + createvisualtask SoundTask_WaitForCry, 5 return Move_SAND_TOMB: @@ -8517,26 +8522,26 @@ Move_SAND_TOMB: createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 0, 4, 2, 0, 7, RGB(19, 17, 0) createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 0, 2, 43, 1 playsewithpan SE_W328, SOUND_PAN_TARGET - call SandTombEffect - call SandTombEffect - call SandTombEffect + call SandTombSwirlingDirt + call SandTombSwirlingDirt + call SandTombSwirlingDirt delay 22 createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 0, 4, 2, 7, 0, RGB(19, 17, 0) waitforvisualfinish end -SandTombEffect: - createsprite gUnknown_08596B34, ANIM_TARGET, 2, 0, 32, 528, 30, 10, 50, 1 +SandTombSwirlingDirt: + createsprite gSwirlingDirtSpriteTemplate, ANIM_TARGET, 2, 0, 32, 528, 30, 10, 50, ANIM_TARGET delay 2 - createsprite gUnknown_08596B34, ANIM_TARGET, 2, 0, 36, 480, 20, 13, -46, 1 + createsprite gSwirlingDirtSpriteTemplate, ANIM_TARGET, 2, 0, 36, 480, 20, 13, -46, ANIM_TARGET delay 2 - createsprite gUnknown_08596B34, ANIM_TARGET, 2, 0, 37, 576, 20, 5, 42, 1 + createsprite gSwirlingDirtSpriteTemplate, ANIM_TARGET, 2, 0, 37, 576, 20, 5, 42, ANIM_TARGET delay 2 - createsprite gUnknown_08596B34, ANIM_TARGET, 2, 0, 35, 400, 25, 8, -42, 1 + createsprite gSwirlingDirtSpriteTemplate, ANIM_TARGET, 2, 0, 35, 400, 25, 8, -42, ANIM_TARGET delay 2 - createsprite gUnknown_08596B34, ANIM_TARGET, 2, 0, 32, 512, 25, 13, 46, 1 + createsprite gSwirlingDirtSpriteTemplate, ANIM_TARGET, 2, 0, 32, 512, 25, 13, 46, ANIM_TARGET delay 2 - createsprite gUnknown_08596B34, ANIM_TARGET, 2, 0, 37, 464, 30, 12, -50, 1 + createsprite gSwirlingDirtSpriteTemplate, ANIM_TARGET, 2, 0, 37, 464, 30, 12, -50, ANIM_TARGET delay 2 return @@ -8549,7 +8554,7 @@ Move_SHEER_COLD: monbg ANIM_DEF_PARTNER monbgprio_28 ANIM_TARGET setalpha 12, 8 - createvisualtask sub_80A9EF4, 2 + createvisualtask AnimTask_FrozenIceCube, 2 waitplaysewithpan SE_W258, SOUND_PAN_TARGET, 17 waitforvisualfinish clearmonbg ANIM_DEF_PARTNER @@ -8563,14 +8568,14 @@ Move_ARM_THRUST: loadspritegfx ANIM_TAG_IMPACT monbgprio_28 ANIM_TARGET setalpha 12, 8 - createvisualtask sub_80D6134, 5, 8, 5, 0, 0 + createvisualtask AnimTask_RotateMonSpriteToSide, 5, 8, 5, 0, 0 delay 6 createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 4, 3 delay 4 playsewithpan SE_W207, SOUND_PAN_TARGET - createsprite gUnknown_08596034, ANIM_TARGET, 2, 10, -8, 14, 3 + createsprite gArmThrustHandSpriteTemplate, ANIM_TARGET, 2, 10, -8, 14, 3 waitforvisualfinish - createvisualtask sub_80D6134, 5, 8, 5, 0, 1 + createvisualtask AnimTask_RotateMonSpriteToSide, 5, 8, 5, 0, 1 playsewithpan SE_W003, SOUND_PAN_TARGET choosetwoturnanim ArmThrustRight, ArmThrustLeft ArmThrustContinue: @@ -8579,10 +8584,10 @@ ArmThrustContinue: blendoff end ArmThrustRight: - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, 8, 0, 1, 2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, 8, 0, ANIM_TARGET, 2 goto ArmThrustContinue ArmThrustLeft: - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, -8, 0, 1, 2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, -8, 0, ANIM_TARGET, 2 goto ArmThrustContinue Move_MUDDY_WATER: @@ -8620,62 +8625,60 @@ Move_DRAGON_CLAW: loadspritegfx ANIM_TAG_SMALL_EMBER loadspritegfx ANIM_TAG_CLAW_SLASH playsewithpan SE_W221B, SOUND_PAN_ATTACKER - createvisualtask sub_8116620, 10, 2, 4, 0, 8, RGB(31, 19, 0) + createvisualtask AnimTask_BlendBattleAnimPal, 10, 2, 4, 0, 8, RGB(31, 19, 0) createvisualtask AnimTask_ShakeMon, 5, ANIM_ATTACKER, 0, 2, 15, 1 - call DragonClawEffect - call DragonClawEffect + call DragonClawFireSpiral + call DragonClawFireSpiral createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 6, 4 - createsprite gUnknown_08596B88, ANIM_ATTACKER, 2, 0, 28, 528, 30, 13, 50, 0 + createsprite gFireSpinSpriteTemplate, ANIM_ATTACKER, 2, 0, 28, 528, 30, 13, 50, ANIM_ATTACKER delay 2 - createvisualtask sub_8159210, 5, 136, SOUND_PAN_TARGET - createsprite gBattleAnimSpriteTemplate_8597138, ANIM_TARGET, 2, -10, -10, 0 - createsprite gBattleAnimSpriteTemplate_8597138, ANIM_TARGET, 2, -10, 10, 0 - createsprite gBattleAnimSpriteTemplate_85972D8, ANIM_ATTACKER, 2, -4, 1, 10, 3, 1 - createsprite gUnknown_08596B88, ANIM_ATTACKER, 2, 0, 32, 480, 20, 16, -46, 0 + createvisualtask SoundTask_PlaySE1WithPanning, 5, SE_W013, SOUND_PAN_TARGET + createsprite gClawSlashSpriteTemplate, ANIM_TARGET, 2, -10, -10, 0 + createsprite gClawSlashSpriteTemplate, ANIM_TARGET, 2, -10, 10, 0 + createsprite gShakeMonOrTerrainSpriteTemplate, ANIM_ATTACKER, 2, -4, 1, 10, 3, 1 + createsprite gFireSpinSpriteTemplate, ANIM_ATTACKER, 2, 0, 32, 480, 20, 16, -46, ANIM_ATTACKER delay 2 - createsprite gUnknown_08596B88, ANIM_ATTACKER, 2, 0, 33, 576, 20, 8, 42, 0 + createsprite gFireSpinSpriteTemplate, ANIM_ATTACKER, 2, 0, 33, 576, 20, 8, 42, ANIM_ATTACKER delay 2 - createsprite gUnknown_08596B88, ANIM_ATTACKER, 2, 0, 31, 400, 25, 11, -42, 0 + createsprite gFireSpinSpriteTemplate, ANIM_ATTACKER, 2, 0, 31, 400, 25, 11, -42, ANIM_ATTACKER delay 2 createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 6, 4 - createsprite gUnknown_08596B88, ANIM_ATTACKER, 2, 0, 28, 512, 25, 16, 46, 0 + createsprite gFireSpinSpriteTemplate, ANIM_ATTACKER, 2, 0, 28, 512, 25, 16, 46, ANIM_ATTACKER delay 2 - createvisualtask sub_8159210, 5, 136, SOUND_PAN_TARGET - createsprite gBattleAnimSpriteTemplate_8597138, ANIM_TARGET, 2, 10, -10, 1 - createsprite gBattleAnimSpriteTemplate_8597138, ANIM_TARGET, 2, 10, 10, 1 - createsprite gBattleAnimSpriteTemplate_85972D8, ANIM_ATTACKER, 2, -4, 1, 10, 3, 1 - createsprite gUnknown_08596B88, ANIM_ATTACKER, 2, 0, 33, 464, 30, 15, -50, 0 + createvisualtask SoundTask_PlaySE1WithPanning, 5, SE_W013, SOUND_PAN_TARGET + createsprite gClawSlashSpriteTemplate, ANIM_TARGET, 2, 10, -10, 1 + createsprite gClawSlashSpriteTemplate, ANIM_TARGET, 2, 10, 10, 1 + createsprite gShakeMonOrTerrainSpriteTemplate, ANIM_ATTACKER, 2, -4, 1, 10, 3, 1 + createsprite gFireSpinSpriteTemplate, ANIM_ATTACKER, 2, 0, 33, 464, 30, 15, -50, ANIM_ATTACKER delay 2 - createsprite gUnknown_08596B88, ANIM_ATTACKER, 2, 0, 28, 528, 30, 13, 50, 0 + createsprite gFireSpinSpriteTemplate, ANIM_ATTACKER, 2, 0, 28, 528, 30, 13, 50, ANIM_ATTACKER delay 2 - createsprite gUnknown_08596B88, ANIM_ATTACKER, 2, 0, 32, 480, 20, 16, -46, 0 + createsprite gFireSpinSpriteTemplate, ANIM_ATTACKER, 2, 0, 32, 480, 20, 16, -46, ANIM_ATTACKER delay 2 - createsprite gUnknown_08596B88, ANIM_ATTACKER, 2, 0, 33, 576, 20, 8, 42, 0 + createsprite gFireSpinSpriteTemplate, ANIM_ATTACKER, 2, 0, 33, 576, 20, 8, 42, ANIM_ATTACKER delay 2 - createsprite gUnknown_08596B88, ANIM_ATTACKER, 2, 0, 31, 400, 25, 11, -42, 0 + createsprite gFireSpinSpriteTemplate, ANIM_ATTACKER, 2, 0, 31, 400, 25, 11, -42, ANIM_ATTACKER delay 2 - createsprite gUnknown_08596B88, ANIM_ATTACKER, 2, 0, 28, 512, 25, 16, 46, 0 + createsprite gFireSpinSpriteTemplate, ANIM_ATTACKER, 2, 0, 28, 512, 25, 16, 46, ANIM_ATTACKER delay 2 - createsprite gUnknown_08596B88, ANIM_ATTACKER, 2, 0, 33, 464, 30, 15, -50, 0 - createvisualtask sub_8116620, 10, 2, 4, 8, 0, RGB(31, 19, 0) + createsprite gFireSpinSpriteTemplate, ANIM_ATTACKER, 2, 0, 33, 464, 30, 15, -50, ANIM_ATTACKER + createvisualtask AnimTask_BlendBattleAnimPal, 10, 2, 4, 8, 0, RGB(31, 19, 0) waitforvisualfinish end -DragonClawEffect: - createsprite gUnknown_08596B88, ANIM_ATTACKER, 2, 0, 28, 528, 30, 13, 50, 0 +DragonClawFireSpiral: + createsprite gFireSpinSpriteTemplate, ANIM_ATTACKER, 2, 0, 28, 528, 30, 13, 50, ANIM_ATTACKER delay 2 - createsprite gUnknown_08596B88, ANIM_ATTACKER, 2, 0, 32, 480, 20, 16, -46, 0 + createsprite gFireSpinSpriteTemplate, ANIM_ATTACKER, 2, 0, 32, 480, 20, 16, -46, ANIM_ATTACKER delay 2 - createsprite gUnknown_08596B88, ANIM_ATTACKER, 2, 0, 33, 576, 20, 8, 42, 0 + createsprite gFireSpinSpriteTemplate, ANIM_ATTACKER, 2, 0, 33, 576, 20, 8, 42, ANIM_ATTACKER delay 2 - createsprite gUnknown_08596B88, ANIM_ATTACKER, 2, 0, 31, 400, 25, 11, -42, 0 + createsprite gFireSpinSpriteTemplate, ANIM_ATTACKER, 2, 0, 31, 400, 25, 11, -42, ANIM_ATTACKER delay 2 - createsprite gUnknown_08596B88, ANIM_ATTACKER, 2, 0, 28, 512, 25, 16, 46, 0 + createsprite gFireSpinSpriteTemplate, ANIM_ATTACKER, 2, 0, 28, 512, 25, 16, 46, ANIM_ATTACKER delay 2 - createsprite gUnknown_08596B88, ANIM_ATTACKER, 2, 0, 33, 464, 30, 15, -50, 0 + createsprite gFireSpinSpriteTemplate, ANIM_ATTACKER, 2, 0, 33, 464, 30, 15, -50, ANIM_ATTACKER delay 2 return - -End: end Move_MUD_SHOT: @@ -8685,28 +8688,28 @@ Move_MUD_SHOT: setalpha 12, 8 createvisualtask AnimTask_ShakeMon, 5, ANIM_ATTACKER, 0, 2, 46, 1 delay 6 - createvisualtask sub_81076C8, 5, 100 + createvisualtask AnimTask_StartSinAnimTimer, 5, 100 panse_1B SE_W250, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +1, 0 - call MudShot1 - call MudShot1 - call MudShot1 + call MudShotOrbs + call MudShotOrbs + call MudShotOrbs createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 3, 0, 43, 1 - call MudShot1 - call MudShot1 - call MudShot1 - call MudShot1 - call MudShot1 - call MudShot1 - call MudShot1 - call MudShot1 + call MudShotOrbs + call MudShotOrbs + call MudShotOrbs + call MudShotOrbs + call MudShotOrbs + call MudShotOrbs + call MudShotOrbs + call MudShotOrbs waitforvisualfinish clearmonbg ANIM_DEF_PARTNER blendoff end -MudShot1: - createsprite gUnknown_085950FC, ANIM_ATTACKER, 3, 10, 10, 0, 16 +MudShotOrbs: + createsprite gMudShotOrbSpriteTemplate, ANIM_ATTACKER, 3, 10, 10, 0, 16 delay 2 - createsprite gUnknown_085950FC, ANIM_ATTACKER, 3, 10, 10, 0, 16 + createsprite gMudShotOrbSpriteTemplate, ANIM_ATTACKER, 3, 10, 10, 0, 16 delay 2 return @@ -8722,11 +8725,11 @@ Move_METEOR_MASH: delay 10 createsprite gMeteorMashStarSpriteTemplate, ANIM_TARGET, 3, -112, -64, 8, 32, 30 delay 40 - createsprite gUnknown_08595F14, ANIM_TARGET, 3, 0, 0, 0, 30 + createsprite gSpinningHandOrFootSpriteTemplate, ANIM_TARGET, 3, 0, 0, 0, 30 createsprite gMeteorMashStarSpriteTemplate, ANIM_TARGET, 3, -80, -64, 40, 32, 30 delay 20 playsewithpan SE_W233B, SOUND_PAN_TARGET - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0, 0, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0, 0, ANIM_TARGET, 1 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 5, 0, 20, 1 waitforvisualfinish delay 10 @@ -8740,24 +8743,24 @@ Move_REVENGE: monbg ANIM_TARGET setalpha 12, 8 playsewithpan SE_W036, SOUND_PAN_ATTACKER - createsprite gUnknown_08596088, ANIM_ATTACKER, 2, 10, -10 + createsprite gRevengeSmallScratchSpriteTemplate, ANIM_ATTACKER, 2, 10, -10 waitforvisualfinish - createvisualtask sub_8115A04, 2, 2, 0, 4, 2, 8, RGB_RED + createvisualtask AnimTask_BlendColorCycle, 2, 2, 0, 4, 2, 8, RGB_RED waitforvisualfinish unloadspritegfx ANIM_TAG_PURPLE_SCRATCH loadspritegfx ANIM_TAG_PURPLE_SWIPE createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 6, 4 delay 4 playsewithpan SE_W207, SOUND_PAN_TARGET - createsprite gUnknown_085960D0, ANIM_TARGET, 2, 10, -10 + createsprite gRevengeBigScratchSpriteTemplate, ANIM_TARGET, 2, 10, -10 waitforvisualfinish unloadspritegfx ANIM_TAG_PURPLE_SWIPE loadspritegfx ANIM_TAG_IMPACT createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 3, 0, 10, 1 - createsprite gUnknown_08597400, ANIM_TARGET, 3, -10, -8, 1, 1, 8 + createsprite gPersistHitSplatSpriteTemplate, ANIM_TARGET, 3, -10, -8, ANIM_TARGET, 1, 8 playsewithpan SE_W233B, SOUND_PAN_TARGET delay 8 - createsprite gUnknown_08597400, ANIM_TARGET, 3, 10, 8, 1, 1, 8 + createsprite gPersistHitSplatSpriteTemplate, ANIM_TARGET, 3, 10, 8, ANIM_TARGET, 1, 8 playsewithpan SE_W025B, SOUND_PAN_TARGET waitforvisualfinish clearmonbg ANIM_TARGET @@ -8772,7 +8775,7 @@ Move_POISON_FANG: delay 10 createvisualtask AnimTask_ShakeMon, 3, ANIM_TARGET, 3, 0, 10, 1 waitforvisualfinish - createvisualtask sub_8115A04, 2, 4, 0, 4, 0, 12, RGB(26, 0, 26) + createvisualtask AnimTask_BlendColorCycle, 2, 4, 0, 4, 0, 12, RGB(26, 0, 26) call PoisonBubblesEffect waitforvisualfinish end @@ -8817,23 +8820,23 @@ Move_FRENZY_PLANT: createsprite gFrenzyPlantRootSpriteTemplate, ANIM_ATTACKER, 2, 85, -16, -6, 0, 2, 75 playsewithpan SE_W010, SOUND_PAN_TARGET delay 5 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, -10, -10, 1, 3 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, -10, -10, ANIM_TARGET, 3 playsewithpan SE_W003, SOUND_PAN_TARGET createvisualtask AnimTask_ShakeMon, 3, ANIM_TARGET, 8, 0, 20, 1 delay 3 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 10, 8, 1, 3 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 10, 8, ANIM_TARGET, 3 playsewithpan SE_W003, SOUND_PAN_TARGET delay 3 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 10, -3, 1, 2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 10, -3, ANIM_TARGET, 2 playsewithpan SE_W003, SOUND_PAN_TARGET delay 3 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, -3, 1, 1, 2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, -3, 1, ANIM_TARGET, 2 playsewithpan SE_W003, SOUND_PAN_TARGET delay 2 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, -10, 1, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, -10, 1, ANIM_TARGET, 1 playsewithpan SE_W003, SOUND_PAN_TARGET delay 2 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 10, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 10, ANIM_TARGET, 1 playsewithpan SE_W003, SOUND_PAN_TARGET waitforvisualfinish createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 0, 1, 2, 5, 0, RGB_BLACK @@ -8847,16 +8850,16 @@ Move_METAL_SOUND: monbg ANIM_DEF_PARTNER monbgprio_2A ANIM_TARGET createvisualtask AnimTask_ShakeMon2, 2, ANIM_ATTACKER, 2, 0, 8, 1 - call MetalSound1 - call MetalSound1 - call MetalSound1 - call MetalSound1 + call MetalSoundRings + call MetalSoundRings + call MetalSoundRings + call MetalSoundRings waitforvisualfinish clearmonbg ANIM_DEF_PARTNER delay 0 waitforvisualfinish end -MetalSound1: +MetalSoundRings: panse_1B SE_W103, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0 createsprite gMetalSoundSpriteTemplate, ANIM_TARGET, 2, 16, 0, 0, 0, 30, 0 delay 2 @@ -8881,18 +8884,18 @@ FocusPunchContinue: monbg ANIM_DEF_PARTNER setalpha 12, 8 playsewithpan SE_W207, SOUND_PAN_TARGET - createsprite gUnknown_08596104, ANIM_TARGET, 2 + createsprite gFocusPunchFistSpriteTemplate, ANIM_TARGET, 2 delay 10 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, -10, -8, 1, 0 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, -10, -8, ANIM_TARGET, 0 createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 8, 0, 24, 1 delay 8 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 10, 2, 1, 0 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 10, 2, ANIM_TARGET, 0 playsewithpan SE_W233B, SOUND_PAN_TARGET delay 8 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 10, -6, 1, 0 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 10, -6, ANIM_TARGET, 0 playsewithpan SE_W233B, SOUND_PAN_TARGET delay 8 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 8, 1, 0 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 8, ANIM_TARGET, 0 playsewithpan SE_W025B, SOUND_PAN_TARGET waitforvisualfinish restorebg @@ -8927,147 +8930,147 @@ ReturnContinue: end ReturnWeak: createsprite gVerticalDipSpriteTemplate, ANIM_ATTACKER, 2, 16, 1, ANIM_ATTACKER - createvisualtask sub_8159244, 5, 167, SOUND_PAN_ATTACKER + createvisualtask SoundTask_PlaySE2WithPanning, 5, SE_W039, SOUND_PAN_ATTACKER waitforvisualfinish createsprite gVerticalDipSpriteTemplate, ANIM_ATTACKER, 2, 16, 1, ANIM_ATTACKER - createvisualtask sub_8159244, 5, 167, SOUND_PAN_ATTACKER + createvisualtask SoundTask_PlaySE2WithPanning, 5, SE_W039, SOUND_PAN_ATTACKER delay 5 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, -10, -8, 1, 2 - createvisualtask sub_8159210, 5, 139, SOUND_PAN_TARGET + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, -10, -8, ANIM_TARGET, 2 + createvisualtask SoundTask_PlaySE1WithPanning, 5, SE_W004, SOUND_PAN_TARGET goto ReturnContinue ReturnMedium: createsprite gVerticalDipSpriteTemplate, ANIM_ATTACKER, 2, 6, 1, ANIM_ATTACKER - createvisualtask sub_8159244, 5, 167, SOUND_PAN_ATTACKER + createvisualtask SoundTask_PlaySE2WithPanning, 5, SE_W039, SOUND_PAN_ATTACKER waitforvisualfinish createsprite gVerticalDipSpriteTemplate, ANIM_ATTACKER, 2, 6, 1, ANIM_ATTACKER - createvisualtask sub_8159244, 5, 167, SOUND_PAN_ATTACKER + createvisualtask SoundTask_PlaySE2WithPanning, 5, SE_W039, SOUND_PAN_ATTACKER waitforvisualfinish delay 11 createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 5, 4 delay 6 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 1, 2 - createvisualtask sub_8159210, 5, 141, SOUND_PAN_TARGET + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, ANIM_TARGET, 2 + createvisualtask SoundTask_PlaySE1WithPanning, 5, SE_W025B, SOUND_PAN_TARGET goto ReturnContinue ReturnStrong: createsprite gVerticalDipSpriteTemplate, ANIM_ATTACKER, 2, 6, 1, ANIM_ATTACKER - createvisualtask sub_8159244, 5, 167, SOUND_PAN_ATTACKER + createvisualtask SoundTask_PlaySE2WithPanning, 5, SE_W039, SOUND_PAN_ATTACKER waitforvisualfinish createsprite gVerticalDipSpriteTemplate, ANIM_ATTACKER, 2, 6, 1, ANIM_ATTACKER - createvisualtask sub_8159244, 5, 167, SOUND_PAN_ATTACKER + createvisualtask SoundTask_PlaySE2WithPanning, 5, SE_W039, SOUND_PAN_ATTACKER waitforvisualfinish createsprite gVerticalDipSpriteTemplate, ANIM_ATTACKER, 2, 6, 1, ANIM_ATTACKER - createvisualtask sub_8159244, 5, 167, SOUND_PAN_ATTACKER + createvisualtask SoundTask_PlaySE2WithPanning, 5, SE_W039, SOUND_PAN_ATTACKER waitforvisualfinish createsprite gVerticalDipSpriteTemplate, ANIM_ATTACKER, 2, 6, 1, ANIM_ATTACKER - createvisualtask sub_8159244, 5, 167, SOUND_PAN_ATTACKER + createvisualtask SoundTask_PlaySE2WithPanning, 5, SE_W039, SOUND_PAN_ATTACKER waitforvisualfinish - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, -10, -8, 1, 2 - createvisualtask sub_8159210, 5, 123, SOUND_PAN_TARGET + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, -10, -8, ANIM_TARGET, 2 + createvisualtask SoundTask_PlaySE1WithPanning, 5, SE_W233B, SOUND_PAN_TARGET createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 6, 0, 8, 1 delay 8 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 10, 10, 1, 2 - createvisualtask sub_8159210, 5, 123, SOUND_PAN_TARGET + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 10, 10, ANIM_TARGET, 2 + createvisualtask SoundTask_PlaySE1WithPanning, 5, SE_W233B, SOUND_PAN_TARGET createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 6, 0, 8, 1 delay 8 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 3, -5, 1, 2 - createvisualtask sub_8159210, 5, 123, SOUND_PAN_TARGET + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 3, -5, ANIM_TARGET, 2 + createvisualtask SoundTask_PlaySE1WithPanning, 5, SE_W233B, SOUND_PAN_TARGET createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 6, 0, 8, 1 delay 8 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, -5, 3, 1, 2 - createvisualtask sub_8159210, 5, 123, SOUND_PAN_TARGET + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, -5, 3, ANIM_TARGET, 2 + createvisualtask SoundTask_PlaySE1WithPanning, 5, SE_W233B, SOUND_PAN_TARGET createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 6, 0, 8, 1 goto ReturnContinue ReturnStrongest: createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 0, 0, 6, RGB_BLACK waitforvisualfinish createsprite gVerticalDipSpriteTemplate, ANIM_ATTACKER, 2, 16, 1, ANIM_ATTACKER - createvisualtask sub_8159244, 5, 167, SOUND_PAN_ATTACKER + createvisualtask SoundTask_PlaySE2WithPanning, 5, SE_W039, SOUND_PAN_ATTACKER delay 8 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 3, -5, 1, 2 - createvisualtask sub_8159210, 5, 123, SOUND_PAN_TARGET + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 3, -5, ANIM_TARGET, 2 + createvisualtask SoundTask_PlaySE1WithPanning, 5, SE_W233B, SOUND_PAN_TARGET waitforvisualfinish createsprite gVerticalDipSpriteTemplate, ANIM_ATTACKER, 2, 12, 1, ANIM_ATTACKER - createvisualtask sub_8159244, 5, 167, SOUND_PAN_ATTACKER + createvisualtask SoundTask_PlaySE2WithPanning, 5, SE_W039, SOUND_PAN_ATTACKER delay 5 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, -10, -8, 1, 2 - createvisualtask sub_8159210, 5, 123, SOUND_PAN_TARGET + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, -10, -8, ANIM_TARGET, 2 + createvisualtask SoundTask_PlaySE1WithPanning, 5, SE_W233B, SOUND_PAN_TARGET createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 6, 0, 8, 1 waitforvisualfinish delay 4 createsprite gVerticalDipSpriteTemplate, ANIM_ATTACKER, 2, 8, 1, ANIM_ATTACKER - createvisualtask sub_8159244, 5, 167, SOUND_PAN_ATTACKER + createvisualtask SoundTask_PlaySE2WithPanning, 5, SE_W039, SOUND_PAN_ATTACKER delay 5 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, -10, -8, 1, 2 - createvisualtask sub_8159210, 5, 123, SOUND_PAN_TARGET + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, -10, -8, ANIM_TARGET, 2 + createvisualtask SoundTask_PlaySE1WithPanning, 5, SE_W233B, SOUND_PAN_TARGET createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 6, 0, 8, 1 waitforvisualfinish delay 2 - createvisualtask sub_81169C0, 2, 0, 4, 5, 1 + createvisualtask AnimTask_TraceMonBlended, 2, 0, 4, 5, 1 createsprite gVerticalDipSpriteTemplate, ANIM_ATTACKER, 2, 4, 1, ANIM_ATTACKER - createvisualtask sub_8159244, 5, 167, SOUND_PAN_ATTACKER - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, -10, -8, 1, 2 - createvisualtask sub_8159210, 5, 123, SOUND_PAN_TARGET + createvisualtask SoundTask_PlaySE2WithPanning, 5, SE_W039, SOUND_PAN_ATTACKER + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, -10, -8, ANIM_TARGET, 2 + createvisualtask SoundTask_PlaySE1WithPanning, 5, SE_W233B, SOUND_PAN_TARGET createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 6, 0, 8, 1 - createvisualtask sub_81169C0, 2, 0, 4, 5, 1 + createvisualtask AnimTask_TraceMonBlended, 2, 0, 4, 5, 1 waitforvisualfinish createsprite gVerticalDipSpriteTemplate, ANIM_ATTACKER, 2, 4, 2, ANIM_ATTACKER - createvisualtask sub_8159244, 5, 167, SOUND_PAN_ATTACKER + createvisualtask SoundTask_PlaySE2WithPanning, 5, SE_W039, SOUND_PAN_ATTACKER delay 5 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, -10, -8, 1, 2 - createvisualtask sub_8159210, 5, 123, SOUND_PAN_TARGET + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, -10, -8, ANIM_TARGET, 2 + createvisualtask SoundTask_PlaySE1WithPanning, 5, SE_W233B, SOUND_PAN_TARGET createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 6, 0, 8, 1 - createvisualtask sub_81169C0, 2, 0, 4, 5, 1 + createvisualtask AnimTask_TraceMonBlended, 2, 0, 4, 5, 1 waitforvisualfinish - call ReturnStrongest1 - call ReturnStrongest1 - call ReturnStrongest1 - call ReturnStrongest1 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, -10, -8, 1, 0 - createvisualtask sub_8159210, 5, 141, SOUND_PAN_TARGET + call ReturnStrongestHit + call ReturnStrongestHit + call ReturnStrongestHit + call ReturnStrongestHit + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, -10, -8, ANIM_TARGET, 0 + createvisualtask SoundTask_PlaySE1WithPanning, 5, SE_W025B, SOUND_PAN_TARGET createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 8, 0, 24, 1 delay 6 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 10, 10, 1, 0 - createvisualtask sub_8159210, 5, 141, SOUND_PAN_TARGET + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 10, 10, ANIM_TARGET, 0 + createvisualtask SoundTask_PlaySE1WithPanning, 5, SE_W025B, SOUND_PAN_TARGET delay 6 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 3, -5, 1, 0 - createvisualtask sub_8159210, 5, 141, SOUND_PAN_TARGET + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 3, -5, ANIM_TARGET, 0 + createvisualtask SoundTask_PlaySE1WithPanning, 5, SE_W025B, SOUND_PAN_TARGET delay 6 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, -5, 3, 1, 0 - createvisualtask sub_8159210, 5, 141, SOUND_PAN_TARGET + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, -5, 3, ANIM_TARGET, 0 + createvisualtask SoundTask_PlaySE1WithPanning, 5, SE_W025B, SOUND_PAN_TARGET waitforvisualfinish createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 0, 6, 0, RGB_BLACK goto ReturnContinue -ReturnStrongest1: +ReturnStrongestHit: createsprite gVerticalDipSpriteTemplate, ANIM_ATTACKER, 2, 4, 3, ANIM_ATTACKER - createvisualtask sub_8159244, 5, 167, SOUND_PAN_ATTACKER - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 1, 2 - createvisualtask sub_8159210, 5, 123, SOUND_PAN_TARGET + createvisualtask SoundTask_PlaySE2WithPanning, 5, SE_W039, SOUND_PAN_ATTACKER + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, ANIM_TARGET, 2 + createvisualtask SoundTask_PlaySE1WithPanning, 5, SE_W233B, SOUND_PAN_TARGET createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 6, 0, 8, 1 - createvisualtask sub_81169C0, 2, 0, 4, 5, 1 + createvisualtask AnimTask_TraceMonBlended, 2, 0, 4, 5, 1 waitforvisualfinish return Move_COSMIC_POWER: loadspritegfx ANIM_TAG_SPARKLE_2 - createvisualtask sub_8159244, 5, 243, 0 + createvisualtask SoundTask_PlaySE2WithPanning, 5, SE_W322, 0 playsewithpan SE_W322, 0 - createvisualtask sub_8117610, 2, 0, 0, 15, 0 + createvisualtask AnimTask_BlendNonAttackerPalettes, 2, 0, 0, 15, RGB_BLACK waitforvisualfinish fadetobg BG_COSMIC waitbgfadeout - createvisualtask sub_8117660, 2, 0, 128, 0, -1 + createvisualtask AnimTask_StartSlidingBg, 2, 0, 128, 0, -1 waitbgfadein delay 70 - createvisualtask sub_8159210, 5, 228, SOUND_PAN_ATTACKER + createvisualtask SoundTask_PlaySE1WithPanning, 5, SE_W234, SOUND_PAN_ATTACKER createsprite gGrantingStarsSpriteTemplate, ANIM_ATTACKER, 2, -15, 0, 0, 0, 32, 60 delay 8 createsprite gGrantingStarsSpriteTemplate, ANIM_ATTACKER, 2, 12, -5, 0, 0, 32, 60 delay 40 - createvisualtask sub_8117610, 2, 0, 15, 0, 0 + createvisualtask AnimTask_BlendNonAttackerPalettes, 2, 0, 15, 0, RGB_BLACK waitforvisualfinish restorebg waitbgfadeout - setarg 7, -1 + setarg 7, 0xFFFF waitbgfadein waitforvisualfinish end @@ -9078,40 +9081,40 @@ Move_BLAST_BURN: monbg ANIM_DEF_PARTNER setalpha 12, 8 playsewithpan SE_W221, SOUND_PAN_ATTACKER - createsprite gUnknown_08595428, ANIM_ATTACKER, 2, -32, 0, 24, 0, 0, 0 - createsprite gUnknown_08595428, ANIM_ATTACKER, 2, -20, -10, 24, 0, 0, 0 - createsprite gUnknown_08595428, ANIM_ATTACKER, 66, 0, -16, 24, 0, 0, 0 - createsprite gUnknown_08595428, ANIM_ATTACKER, 66, 20, -10, 24, 0, 0, 0 - createsprite gUnknown_08595428, ANIM_ATTACKER, 66, 32, 0, 24, 0, 0, 0 - createsprite gUnknown_08595428, ANIM_ATTACKER, 66, 20, 10, 24, 0, 0, 0 - createsprite gUnknown_08595428, ANIM_ATTACKER, 2, 0, 16, 24, 0, 0, 0 - createsprite gUnknown_08595428, ANIM_ATTACKER, 2, -20, 10, 24, 0, 0, 0 + createsprite gFirePlumeSpriteTemplate, ANIM_ATTACKER, 2, -32, 0, 24, 0, 0, 0 + createsprite gFirePlumeSpriteTemplate, ANIM_ATTACKER, 2, -20, -10, 24, 0, 0, 0 + createsprite gFirePlumeSpriteTemplate, ANIM_ATTACKER, 66, 0, -16, 24, 0, 0, 0 + createsprite gFirePlumeSpriteTemplate, ANIM_ATTACKER, 66, 20, -10, 24, 0, 0, 0 + createsprite gFirePlumeSpriteTemplate, ANIM_ATTACKER, 66, 32, 0, 24, 0, 0, 0 + createsprite gFirePlumeSpriteTemplate, ANIM_ATTACKER, 66, 20, 10, 24, 0, 0, 0 + createsprite gFirePlumeSpriteTemplate, ANIM_ATTACKER, 2, 0, 16, 24, 0, 0, 0 + createsprite gFirePlumeSpriteTemplate, ANIM_ATTACKER, 2, -20, 10, 24, 0, 0, 0 delay 25 playsewithpan SE_W172B, SOUND_PAN_ATTACKER - createsprite gUnknown_08595428, ANIM_ATTACKER, 2, -64, 0, 24, 0, 0, 0 - createsprite gUnknown_08595428, ANIM_ATTACKER, 6, -40, -20, 24, 0, 0, 0 - createsprite gUnknown_08595428, ANIM_ATTACKER, 70, 0, -32, 24, 0, 0, 0 - createsprite gUnknown_08595428, ANIM_ATTACKER, 70, 40, -20, 24, 0, 0, 0 + createsprite gFirePlumeSpriteTemplate, ANIM_ATTACKER, 2, -64, 0, 24, 0, 0, 0 + createsprite gFirePlumeSpriteTemplate, ANIM_ATTACKER, 6, -40, -20, 24, 0, 0, 0 + createsprite gFirePlumeSpriteTemplate, ANIM_ATTACKER, 70, 0, -32, 24, 0, 0, 0 + createsprite gFirePlumeSpriteTemplate, ANIM_ATTACKER, 70, 40, -20, 24, 0, 0, 0 createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 6, 0, 8, 1 - createsprite gUnknown_08595428, ANIM_ATTACKER, 66, 64, 0, 24, 0, 0, 0 - createsprite gUnknown_08595428, ANIM_ATTACKER, 66, 40, 20, 24, 0, 0, 0 - createsprite gUnknown_08595428, ANIM_ATTACKER, 2, 0, 32, 24, 0, 0, 0 - createsprite gUnknown_08595428, ANIM_ATTACKER, 2, -40, 20, 24, 0, 0, 0 - createvisualtask sub_8115F10, 2, 257, 257, 257 + createsprite gFirePlumeSpriteTemplate, ANIM_ATTACKER, 66, 64, 0, 24, 0, 0, 0 + createsprite gFirePlumeSpriteTemplate, ANIM_ATTACKER, 66, 40, 20, 24, 0, 0, 0 + createsprite gFirePlumeSpriteTemplate, ANIM_ATTACKER, 2, 0, 32, 24, 0, 0, 0 + createsprite gFirePlumeSpriteTemplate, ANIM_ATTACKER, 2, -40, 20, 24, 0, 0, 0 + createvisualtask AnimTask_InvertScreenColor, 2, 257, 257, 257 delay 25 playsewithpan SE_W172B, SOUND_PAN_ATTACKER - createsprite gUnknown_08595428, ANIM_ATTACKER, 2, -96, 0, 24, 0, 0, 0 - createsprite gUnknown_08595428, ANIM_ATTACKER, 6, -60, -30, 24, 0, 0, 0 - createsprite gUnknown_08595428, ANIM_ATTACKER, 70, 0, -48, 24, 0, 0, 0 - createsprite gUnknown_08595428, ANIM_ATTACKER, 70, 60, -30, 24, 0, 0, 0 - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, -4, 3, 1, 0 + createsprite gFirePlumeSpriteTemplate, ANIM_ATTACKER, 2, -96, 0, 24, 0, 0, 0 + createsprite gFirePlumeSpriteTemplate, ANIM_ATTACKER, 6, -60, -30, 24, 0, 0, 0 + createsprite gFirePlumeSpriteTemplate, ANIM_ATTACKER, 70, 0, -48, 24, 0, 0, 0 + createsprite gFirePlumeSpriteTemplate, ANIM_ATTACKER, 70, 60, -30, 24, 0, 0, 0 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, -4, 3, ANIM_TARGET, 0 createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 12, 0, 20, 1 - createvisualtask sub_81162A4, 2, 2, 0, 10, 1 - createsprite gUnknown_08595428, ANIM_ATTACKER, 66, 96, 0, 24, 0, 0, 0 - createsprite gUnknown_08595428, ANIM_ATTACKER, 66, 60, 30, 24, 0, 0, 0 - createsprite gUnknown_08595428, ANIM_ATTACKER, 2, 0, 48, 24, 0, 0, 0 - createsprite gUnknown_08595428, ANIM_ATTACKER, 2, -60, 30, 24, 0, 0, 0 - createvisualtask sub_8115F10, 2, 257, 257, 257 + createvisualtask AnimTask_ShakeBattleTerrain, 2, 2, 0, 10, 1 + createsprite gFirePlumeSpriteTemplate, ANIM_ATTACKER, 66, 96, 0, 24, 0, 0, 0 + createsprite gFirePlumeSpriteTemplate, ANIM_ATTACKER, 66, 60, 30, 24, 0, 0, 0 + createsprite gFirePlumeSpriteTemplate, ANIM_ATTACKER, 2, 0, 48, 24, 0, 0, 0 + createsprite gFirePlumeSpriteTemplate, ANIM_ATTACKER, 2, -60, 30, 24, 0, 0, 0 + createvisualtask AnimTask_InvertScreenColor, 2, 257, 257, 257 waitforvisualfinish clearmonbg ANIM_DEF_PARTNER blendoff @@ -9120,32 +9123,32 @@ Move_BLAST_BURN: Move_ROCK_TOMB: loadspritegfx ANIM_TAG_X_SIGN loadspritegfx ANIM_TAG_ROCKS - createvisualtask sub_81162A4, 2, 2, 0, 10, 1 + createvisualtask AnimTask_ShakeBattleTerrain, 2, 2, 0, 10, 1 waitforvisualfinish - createsprite gUnknown_08596C58, ANIM_TARGET, 2, 20, 12, 64, 114, 0 + createsprite gRockTombRockSpriteTemplate, ANIM_TARGET, 2, 20, 12, 64, 114, 0 delay 8 - createvisualtask sub_81162A4, 2, 0, 2, 3, 1 + createvisualtask AnimTask_ShakeBattleTerrain, 2, 0, 2, 3, 1 playsewithpan SE_W070, SOUND_PAN_TARGET delay 8 - createsprite gUnknown_08596C58, ANIM_TARGET, 2, -20, 12, 64, 98, 0 + createsprite gRockTombRockSpriteTemplate, ANIM_TARGET, 2, -20, 12, 64, 98, 0 delay 8 - createvisualtask sub_81162A4, 2, 0, 2, 3, 1 + createvisualtask AnimTask_ShakeBattleTerrain, 2, 0, 2, 3, 1 playsewithpan SE_W070, SOUND_PAN_TARGET delay 8 - createsprite gUnknown_08596C58, ANIM_TARGET, 66, 3, 6, 64, 82, 0 + createsprite gRockTombRockSpriteTemplate, ANIM_TARGET, 66, 3, 6, 64, 82, 0 delay 8 - createvisualtask sub_81162A4, 2, 0, 2, 3, 1 + createvisualtask AnimTask_ShakeBattleTerrain, 2, 0, 2, 3, 1 playsewithpan SE_W070, SOUND_PAN_TARGET delay 8 - createsprite gUnknown_08596C58, ANIM_TARGET, 2, -3, 13, 64, 66, 0 + createsprite gRockTombRockSpriteTemplate, ANIM_TARGET, 2, -3, 13, 64, 66, 0 delay 8 - createvisualtask sub_81162A4, 2, 0, 2, 3, 1 + createvisualtask AnimTask_ShakeBattleTerrain, 2, 0, 2, 3, 1 playsewithpan SE_W070, SOUND_PAN_TARGET delay 24 playsewithpan SE_W063, SOUND_PAN_TARGET - createsprite gUnknown_085967AC, ANIM_TARGET, 5, 1, 50 + createsprite gRedXSpriteTemplate, ANIM_TARGET, 5, ANIM_TARGET, 50 createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 3, 0, 20, 1 - createvisualtask sub_81162A4, 2, 2, 0, 10, 1 + createvisualtask AnimTask_ShakeBattleTerrain, 2, 2, 0, 10, 1 waitforvisualfinish end @@ -9157,15 +9160,15 @@ Move_SILVER_WIND: monbg ANIM_DEF_PARTNER monbgprio_29 delay 0 - createvisualtask sub_8116664, 10, 1, 0, 0, 4, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPalExclude, 10, ANIM_TARGET, 0, 0, 4, RGB_BLACK createvisualtask AnimTask_GetTargetSide, 2 jumprettrue SilverWindOnPlayer fadetobg BG_BUG_OPPONENT waitbgfadeout - createvisualtask sub_8117660, 5, 1536, 0, 0, -1 + createvisualtask AnimTask_StartSlidingBg, 5, 1536, 0, 0, -1 SilverWindContinue: delay 0 - createvisualtask sub_8116620, 10, 1, 0, 4, 4, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, 1, 0, 4, 4, RGB_BLACK waitbgfadein createsprite gSilverWindBigSparkSpriteTemplate, ANIM_TARGET, 66, -32, 16, 0, 6, 2, 3, 1 createsprite gSilverWindBigSparkSpriteTemplate, ANIM_TARGET, 66, -8, 18, 64, 3, 2, 2, 1 @@ -9196,14 +9199,14 @@ SilverWindContinue: delay 0 restorebg waitbgfadeout - createvisualtask sub_8116664, 10, 1, 0, 4, 0, RGB_BLACK - setarg 7, -1 + createvisualtask AnimTask_BlendBattleAnimPalExclude, 10, ANIM_TARGET, 0, 4, 0, RGB_BLACK + setarg 7, 0xFFFF waitbgfadein end SilverWindOnPlayer: fadetobg BG_BUG_PLAYER waitbgfadeout - createvisualtask sub_8117660, 5, -1536, 0, 0, -1 + createvisualtask AnimTask_StartSlidingBg, 5, -1536, 0, 0, -1 goto SilverWindContinue Move_SNATCH: @@ -9218,19 +9221,19 @@ Move_DIVE: DiveSetUp: loadspritegfx ANIM_TAG_ROUND_SHADOW playsewithpan SE_W029, SOUND_PAN_ATTACKER - createsprite gUnknown_08596490, ANIM_ATTACKER, 2, 0, 0, 13, 336 + createsprite gDiveBallSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 13, 336 waitforvisualfinish playsewithpan SE_W291, SOUND_PAN_ATTACKER - createsprite gUnknown_085964CC, ANIM_ATTACKER, 3, 0 - call DiveSetUp1 - call DiveSetUp1 - call DiveSetUp1 - call DiveSetUp1 - call DiveSetUp1 + createsprite gDiveWaterSplashSpriteTemplate, ANIM_ATTACKER, 3, 0 + call DiveSetUpWaterDroplets + call DiveSetUpWaterDroplets + call DiveSetUpWaterDroplets + call DiveSetUpWaterDroplets + call DiveSetUpWaterDroplets end -DiveSetUp1: - createsprite gUnknown_085964E4, ANIM_ATTACKER, 5, 0, 0 - createsprite gUnknown_085964E4, ANIM_ATTACKER, 5, 1, 0 +DiveSetUpWaterDroplets: + createsprite gSprayWaterDropletSpriteTemplate, ANIM_ATTACKER, 5, 0, 0 + createsprite gSprayWaterDropletSpriteTemplate, ANIM_ATTACKER, 5, 1, 0 return DiveAttack: loadspritegfx ANIM_TAG_WATER_IMPACT @@ -9238,22 +9241,22 @@ DiveAttack: monbg ANIM_DEF_PARTNER setalpha 12, 8 playsewithpan SE_W153, SOUND_PAN_TARGET - createsprite gUnknown_085964CC, ANIM_TARGET, 3, 1 - call DiveAttack1 - call DiveAttack1 - call DiveAttack1 - call DiveAttack1 - call DiveAttack1 + createsprite gDiveWaterSplashSpriteTemplate, ANIM_TARGET, 3, 1 + call DiveAttackWaterDroplets + call DiveAttackWaterDroplets + call DiveAttackWaterDroplets + call DiveAttackWaterDroplets + call DiveAttackWaterDroplets delay 12 - call UnderWaterAttack1 + call RisingWaterHitEffect waitforvisualfinish visible ANIM_ATTACKER clearmonbg ANIM_DEF_PARTNER blendoff end -DiveAttack1: - createsprite gUnknown_085964E4, ANIM_TARGET, 5, 0, 1 - createsprite gUnknown_085964E4, ANIM_TARGET, 5, 1, 1 +DiveAttackWaterDroplets: + createsprite gSprayWaterDropletSpriteTemplate, ANIM_TARGET, 5, 0, 1 + createsprite gSprayWaterDropletSpriteTemplate, ANIM_TARGET, 5, 1, 1 return Move_ROCK_BLAST: @@ -9262,15 +9265,15 @@ Move_ROCK_BLAST: createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 4, 6 delay 3 playsewithpan SE_W207, SOUND_PAN_ATTACKER - createsprite gUnknown_08596C98, ANIM_TARGET, 2, 16, 0, 0, 0, 25, 257 + createsprite gRockBlastRockSpriteTemplate, ANIM_TARGET, 2, 16, 0, 0, 0, 25, 257 waitforvisualfinish - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0, 0, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0, 0, ANIM_TARGET, 1 playsewithpan SE_W088, SOUND_PAN_TARGET - createsprite gUnknown_08596B1C, ANIM_TARGET, 2, 0, 0, 20, 24, 14, 2 + createsprite gRockFragmentSpriteTemplate, ANIM_TARGET, 2, 0, 0, 20, 24, 14, 2 createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 3, 0, 5, 1 - createsprite gUnknown_08596B1C, ANIM_TARGET, 2, 5, 0, -20, 24, 14, 1 - createsprite gUnknown_08596B1C, ANIM_TARGET, 2, 0, 5, 20, -24, 14, 2 - createsprite gUnknown_08596B1C, ANIM_TARGET, 2, -5, 0, -20, -24, 14, 2 + createsprite gRockFragmentSpriteTemplate, ANIM_TARGET, 2, 5, 0, -20, 24, 14, 1 + createsprite gRockFragmentSpriteTemplate, ANIM_TARGET, 2, 0, 5, 20, -24, 14, 2 + createsprite gRockFragmentSpriteTemplate, ANIM_TARGET, 2, -5, 0, -20, -24, 14, 2 waitforvisualfinish end @@ -9281,65 +9284,65 @@ Move_OVERHEAT: setalpha 12, 18 createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 1, 0, 5, RGB(28, 0, 0) waitforvisualfinish - createvisualtask sub_8117C44, 5 + createvisualtask AnimTask_AllocBackupPalBuffer, 5 waitforvisualfinish - createvisualtask sub_8117CA0, 5, 0, 1 + createvisualtask AnimTask_CopyPalUnfadedToBackup, 5, 0, 1 delay 1 - createvisualtask sub_8117DD8, 5, 0 + createvisualtask AnimTask_CopyPalFadedToUnfaded, 5, 0 delay 1 playsewithpan SE_W082, SOUND_PAN_ATTACKER - createvisualtask sub_8117CA0, 5, 1, 0 + createvisualtask AnimTask_CopyPalUnfadedToBackup, 5, 1, 0 delay 1 createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 2, 1, 0, 13, RGB(28, 0, 0) createvisualtask AnimTask_ShakeMon, 5, ANIM_ATTACKER, 2, 0, 15, 1 waitforvisualfinish playsewithpan SE_W172B, SOUND_PAN_ATTACKER - createsprite gUnknown_08596FB0, ANIM_ATTACKER, 2, 1, 0, 30, 25, -20 - createsprite gUnknown_08596FB0, ANIM_ATTACKER, 2, 1, 32, 30, 25, -20 - createsprite gUnknown_08596FB0, ANIM_ATTACKER, 2, 1, 64, 30, 25, -20 - createsprite gUnknown_08596FB0, ANIM_ATTACKER, 2, 1, 96, 30, 25, -20 - createsprite gUnknown_08596FB0, ANIM_ATTACKER, 2, 1, 128, 30, 25, -20 - createsprite gUnknown_08596FB0, ANIM_ATTACKER, 66, 1, 160, 30, 25, -20 - createsprite gUnknown_08596FB0, ANIM_ATTACKER, 66, 1, 192, 30, 25, -20 - createsprite gUnknown_08596FB0, ANIM_ATTACKER, 66, 1, 224, 30, 25, -20 + createsprite gOverheatFlameSpriteTemplate, ANIM_ATTACKER, 2, 1, 0, 30, 25, -20 + createsprite gOverheatFlameSpriteTemplate, ANIM_ATTACKER, 2, 1, 32, 30, 25, -20 + createsprite gOverheatFlameSpriteTemplate, ANIM_ATTACKER, 2, 1, 64, 30, 25, -20 + createsprite gOverheatFlameSpriteTemplate, ANIM_ATTACKER, 2, 1, 96, 30, 25, -20 + createsprite gOverheatFlameSpriteTemplate, ANIM_ATTACKER, 2, 1, 128, 30, 25, -20 + createsprite gOverheatFlameSpriteTemplate, ANIM_ATTACKER, 66, 1, 160, 30, 25, -20 + createsprite gOverheatFlameSpriteTemplate, ANIM_ATTACKER, 66, 1, 192, 30, 25, -20 + createsprite gOverheatFlameSpriteTemplate, ANIM_ATTACKER, 66, 1, 224, 30, 25, -20 delay 5 - createsprite gUnknown_08596FB0, ANIM_ATTACKER, 2, 1, 0, 30, 25, 0 - createsprite gUnknown_08596FB0, ANIM_ATTACKER, 2, 1, 32, 30, 25, 0 - createsprite gUnknown_08596FB0, ANIM_ATTACKER, 2, 1, 64, 30, 25, 0 - createsprite gUnknown_08596FB0, ANIM_ATTACKER, 2, 1, 96, 30, 25, 0 - createsprite gUnknown_08596FB0, ANIM_ATTACKER, 2, 1, 128, 30, 25, 0 - createsprite gUnknown_08596FB0, ANIM_ATTACKER, 66, 1, 160, 30, 25, 0 - createsprite gUnknown_08596FB0, ANIM_ATTACKER, 66, 1, 192, 30, 25, 0 - createsprite gUnknown_08596FB0, ANIM_ATTACKER, 66, 1, 224, 30, 25, 0 + createsprite gOverheatFlameSpriteTemplate, ANIM_ATTACKER, 2, 1, 0, 30, 25, 0 + createsprite gOverheatFlameSpriteTemplate, ANIM_ATTACKER, 2, 1, 32, 30, 25, 0 + createsprite gOverheatFlameSpriteTemplate, ANIM_ATTACKER, 2, 1, 64, 30, 25, 0 + createsprite gOverheatFlameSpriteTemplate, ANIM_ATTACKER, 2, 1, 96, 30, 25, 0 + createsprite gOverheatFlameSpriteTemplate, ANIM_ATTACKER, 2, 1, 128, 30, 25, 0 + createsprite gOverheatFlameSpriteTemplate, ANIM_ATTACKER, 66, 1, 160, 30, 25, 0 + createsprite gOverheatFlameSpriteTemplate, ANIM_ATTACKER, 66, 1, 192, 30, 25, 0 + createsprite gOverheatFlameSpriteTemplate, ANIM_ATTACKER, 66, 1, 224, 30, 25, 0 delay 5 - createsprite gUnknown_08596FB0, ANIM_ATTACKER, 2, 1, 0, 30, 25, 10 - createsprite gUnknown_08596FB0, ANIM_ATTACKER, 2, 1, 32, 30, 25, 10 - createsprite gUnknown_08596FB0, ANIM_ATTACKER, 2, 1, 64, 30, 25, 10 - createsprite gUnknown_08596FB0, ANIM_ATTACKER, 2, 1, 96, 30, 25, 10 - createsprite gUnknown_08596FB0, ANIM_ATTACKER, 2, 1, 128, 30, 25, 10 - createsprite gUnknown_08596FB0, ANIM_ATTACKER, 66, 1, 160, 30, 25, 10 - createsprite gUnknown_08596FB0, ANIM_ATTACKER, 66, 1, 192, 30, 25, 10 - createsprite gUnknown_08596FB0, ANIM_ATTACKER, 66, 1, 224, 30, 25, 10 + createsprite gOverheatFlameSpriteTemplate, ANIM_ATTACKER, 2, 1, 0, 30, 25, 10 + createsprite gOverheatFlameSpriteTemplate, ANIM_ATTACKER, 2, 1, 32, 30, 25, 10 + createsprite gOverheatFlameSpriteTemplate, ANIM_ATTACKER, 2, 1, 64, 30, 25, 10 + createsprite gOverheatFlameSpriteTemplate, ANIM_ATTACKER, 2, 1, 96, 30, 25, 10 + createsprite gOverheatFlameSpriteTemplate, ANIM_ATTACKER, 2, 1, 128, 30, 25, 10 + createsprite gOverheatFlameSpriteTemplate, ANIM_ATTACKER, 66, 1, 160, 30, 25, 10 + createsprite gOverheatFlameSpriteTemplate, ANIM_ATTACKER, 66, 1, 192, 30, 25, 10 + createsprite gOverheatFlameSpriteTemplate, ANIM_ATTACKER, 66, 1, 224, 30, 25, 10 delay 5 waitforvisualfinish - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, -5, 3, 1, 0 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, -5, 3, ANIM_TARGET, 0 playsewithpan SE_W007, SOUND_PAN_TARGET createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 10, 0, 25, 1 delay 6 - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 8, -5, 1, 0 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 8, -5, ANIM_TARGET, 0 playsewithpan SE_W007, SOUND_PAN_TARGET delay 8 - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 10, 10, 1, 0 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 10, 10, ANIM_TARGET, 0 playsewithpan SE_W007, SOUND_PAN_TARGET delay 8 - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0, 0, 1, 0 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0, 0, ANIM_TARGET, 0 playsewithpan SE_W007, SOUND_PAN_TARGET - createvisualtask sub_8117DD8, 5, 1 + createvisualtask AnimTask_CopyPalFadedToUnfaded, 5, 1 delay 1 createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 2, -1, 0, 13, RGB(18, 18, 18) createvisualtask AnimTask_ShakeMon, 5, ANIM_ATTACKER, 3, 0, 15, 1 waitforvisualfinish - createvisualtask sub_8117D3C, 5, 0, 1 + createvisualtask AnimTask_CopyPalUnfadedFromBackup, 5, 0, 1 delay 1 createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 1, 5, 0, RGB(28, 0, 0) waitforvisualfinish @@ -9347,11 +9350,11 @@ Move_OVERHEAT: blendoff waitforvisualfinish delay 15 - createvisualtask sub_8117D3C, 5, 1, 0 + createvisualtask AnimTask_CopyPalUnfadedFromBackup, 5, 1, 0 delay 1 createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 2, 0, 13, 0, RGB(18, 18, 18) waitforvisualfinish - createvisualtask sub_8117C70, 5 + createvisualtask AnimTask_FreeBackupPalBuffer, 5 waitforvisualfinish end @@ -9361,40 +9364,40 @@ Move_HYDRO_CANNON: monbg ANIM_DEF_PARTNER setalpha 12, 8 playsewithpan SE_W057, SOUND_PAN_ATTACKER - createsprite gUnknown_085951C0, ANIM_TARGET, 2 + createsprite gHydroCannonChargeSpriteTemplate, ANIM_TARGET, 2 delay 10 - createvisualtask sub_8115F10, 2, 257, 257, 257 + createvisualtask AnimTask_InvertScreenColor, 2, 257, 257, 257 delay 30 panse_1B SE_W056, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0 - call HydroCannon1 + call HydroCannonBeam createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 10, 0, 40, 1 - createsprite gUnknown_08597388, ANIM_TARGET, 2, 0, 0, 1, 0 - call HydroCannon1 - createsprite gUnknown_08597388, ANIM_TARGET, 2, 0, 0, 1, 0 - call HydroCannon1 - createsprite gUnknown_08597388, ANIM_TARGET, 2, 0, 0, 1, 0 - call HydroCannon1 - createsprite gUnknown_08597388, ANIM_TARGET, 2, 0, 0, 1, 0 - call HydroCannon1 - createsprite gUnknown_08597388, ANIM_TARGET, 2, 0, 0, 1, 0 - call HydroCannon1 - createsprite gUnknown_08597388, ANIM_TARGET, 2, 0, 0, 1, 0 + createsprite gWaterHitSplatSpriteTemplate, ANIM_TARGET, 2, 0, 0, ANIM_TARGET, 0 + call HydroCannonBeam + createsprite gWaterHitSplatSpriteTemplate, ANIM_TARGET, 2, 0, 0, ANIM_TARGET, 0 + call HydroCannonBeam + createsprite gWaterHitSplatSpriteTemplate, ANIM_TARGET, 2, 0, 0, ANIM_TARGET, 0 + call HydroCannonBeam + createsprite gWaterHitSplatSpriteTemplate, ANIM_TARGET, 2, 0, 0, ANIM_TARGET, 0 + call HydroCannonBeam + createsprite gWaterHitSplatSpriteTemplate, ANIM_TARGET, 2, 0, 0, ANIM_TARGET, 0 + call HydroCannonBeam + createsprite gWaterHitSplatSpriteTemplate, ANIM_TARGET, 2, 0, 0, ANIM_TARGET, 0 waitforvisualfinish - createvisualtask sub_8115F10, 2, 257, 257, 257 + createvisualtask AnimTask_InvertScreenColor, 2, 257, 257, 257 waitforvisualfinish clearmonbg ANIM_DEF_PARTNER blendoff end -HydroCannon1: - createsprite gUnknown_085951D8, ANIM_TARGET, 2, 10, -10, 0, 0, 15, 257 +HydroCannonBeam: + createsprite gHydroCannonBeamSpriteTemplate, ANIM_TARGET, 2, 10, -10, 0, 0, 15, 257 delay 1 - createsprite gUnknown_085951D8, ANIM_TARGET, 2, 10, -10, 0, 0, 15, 257 + createsprite gHydroCannonBeamSpriteTemplate, ANIM_TARGET, 2, 10, -10, 0, 0, 15, 257 delay 1 - createsprite gUnknown_085951D8, ANIM_TARGET, 2, 10, -10, 0, 0, 15, 257 + createsprite gHydroCannonBeamSpriteTemplate, ANIM_TARGET, 2, 10, -10, 0, 0, 15, 257 delay 1 - createsprite gUnknown_085951D8, ANIM_TARGET, 2, 10, -10, 0, 0, 15, 257 + createsprite gHydroCannonBeamSpriteTemplate, ANIM_TARGET, 2, 10, -10, 0, 0, 15, 257 delay 1 - createsprite gUnknown_085951D8, ANIM_TARGET, 2, 10, -10, 0, 0, 15, 257 + createsprite gHydroCannonBeamSpriteTemplate, ANIM_TARGET, 2, 10, -10, 0, 0, 15, 257 return Move_ASTONISH: @@ -9402,11 +9405,11 @@ Move_ASTONISH: playsewithpan SE_W227, SOUND_PAN_ATTACKER createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 4, 6 delay 25 - createsprite gUnknown_085964E4, ANIM_TARGET, 5, 0, 1 + createsprite gSprayWaterDropletSpriteTemplate, ANIM_TARGET, 5, 0, 1 playsewithpan SE_W166, SOUND_PAN_TARGET - createsprite gUnknown_085964E4, ANIM_TARGET, 5, 1, 1 + createsprite gSprayWaterDropletSpriteTemplate, ANIM_TARGET, 5, 1, 1 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 4, 0, 5, 1 - createvisualtask sub_8106020, 3 + createvisualtask AnimTask_StretchTargetUp, 3 waitforvisualfinish end @@ -9421,11 +9424,11 @@ Move_SEISMIC_TOSS: delay 1 fadetobg BG_IN_AIR waitbgfadeout - createvisualtask sub_811152C, 3 + createvisualtask AnimTask_MoveSeismicTossBg, 3 playsewithpan SE_W327, 0 waitbgfadein waitforvisualfinish - createvisualtask sub_8111590, 3 + createvisualtask AnimTask_SeismicTossBgAccelerateDownAtEnd, 3 jumpreteq 0, SeismicTossWeak jumpreteq 1, SeismicTossMedium jumpreteq 2, SeismicTossStrong @@ -9438,50 +9441,50 @@ SeismicTossContinue: blendoff end SeismicTossWeak: - call SeismicToss1 + call SeismicTossRockScatter1 delay 16 - call SeismicToss2 + call SeismicTossRockScatter2 goto SeismicTossContinue SeismicTossMedium: - call SeismicToss1 + call SeismicTossRockScatter1 delay 14 - call SeismicToss2 + call SeismicTossRockScatter2 delay 14 - call SeismicToss1 + call SeismicTossRockScatter1 goto SeismicTossContinue SeismicTossStrong: - call SeismicToss2 + call SeismicTossRockScatter2 delay 10 - call SeismicToss1 + call SeismicTossRockScatter1 delay 10 - call SeismicToss2 + call SeismicTossRockScatter2 delay 10 - call SeismicToss1 + call SeismicTossRockScatter1 goto SeismicTossContinue -SeismicToss1: - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, -10, -8, 1, 1 +SeismicTossRockScatter1: + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, -10, -8, ANIM_TARGET, 1 playsewithpan SE_W070, SOUND_PAN_TARGET createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 0, 3, 5, 1 - createsprite gUnknown_08596CB0, ANIM_TARGET, 2, -12, 27, 2, 3 - createsprite gUnknown_08596CB0, ANIM_TARGET, 2, 8, 28, 3, 4 - createsprite gUnknown_08596CB0, ANIM_TARGET, 2, -4, 30, 2, 3 - createsprite gUnknown_08596CB0, ANIM_TARGET, 2, 12, 25, 4, 4 + createsprite gRockScatterSpriteTemplate, ANIM_TARGET, 2, -12, 27, 2, 3 + createsprite gRockScatterSpriteTemplate, ANIM_TARGET, 2, 8, 28, 3, 4 + createsprite gRockScatterSpriteTemplate, ANIM_TARGET, 2, -4, 30, 2, 3 + createsprite gRockScatterSpriteTemplate, ANIM_TARGET, 2, 12, 25, 4, 4 return -SeismicToss2: - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 10, -8, 1, 1 +SeismicTossRockScatter2: + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 10, -8, ANIM_TARGET, 1 playsewithpan SE_W088, SOUND_PAN_TARGET createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 0, 3, 5, 1 - createsprite gUnknown_08596CB0, ANIM_TARGET, 2, -12, 32, 3, 4 - createsprite gUnknown_08596CB0, ANIM_TARGET, 2, 8, 31, 2, 2 - createsprite gUnknown_08596CB0, ANIM_TARGET, 2, -4, 28, 2, 3 - createsprite gUnknown_08596CB0, ANIM_TARGET, 2, 12, 30, 4, 3 + createsprite gRockScatterSpriteTemplate, ANIM_TARGET, 2, -12, 32, 3, 4 + createsprite gRockScatterSpriteTemplate, ANIM_TARGET, 2, 8, 31, 2, 2 + createsprite gRockScatterSpriteTemplate, ANIM_TARGET, 2, -4, 28, 2, 3 + createsprite gRockScatterSpriteTemplate, ANIM_TARGET, 2, 12, 30, 4, 3 return Move_MAGIC_COAT: loadspritegfx ANIM_TAG_ORANGE_LIGHT_WALL setalpha 0, 16 waitplaysewithpan SE_W112, SOUND_PAN_ATTACKER, 15 - createsprite gUnknown_085965C0, ANIM_ATTACKER, 3, 40, 0, 10170 + createsprite gMagicCoatWallSpriteTemplate, ANIM_ATTACKER, 3, 40, 0, ANIM_TAG_ORANGE_LIGHT_WALL waitforvisualfinish delay 1 blendoff @@ -9495,11 +9498,11 @@ Move_WATER_PULSE: playsewithpan SE_W145C, SOUND_PAN_ATTACKER createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 0, 0, 7, RGB(0, 25, 28) delay 10 - createsprite gUnknown_085952F8, ANIM_ATTACKER, 66, 100, 100, 8, 1, 20, 40, 0 - createsprite gUnknown_085952F8, ANIM_ATTACKER, 66, 20, 100, 16, 2, 10, 35, 1 - createsprite gUnknown_085952F8, ANIM_ATTACKER, 66, 200, 80, 8, 1, 40, 20, 0 - createsprite gUnknown_085952F8, ANIM_ATTACKER, 66, 80, 60, 10, 3, 20, 50, 0 - createsprite gUnknown_085952F8, ANIM_ATTACKER, 66, 140, 100, 16, 1, 20, 30, 1 + createsprite gWaterPulseBubbleSpriteTemplate, ANIM_ATTACKER, 66, 100, 100, 8, 1, 20, 40, 0 + createsprite gWaterPulseBubbleSpriteTemplate, ANIM_ATTACKER, 66, 20, 100, 16, 2, 10, 35, 1 + createsprite gWaterPulseBubbleSpriteTemplate, ANIM_ATTACKER, 66, 200, 80, 8, 1, 40, 20, 0 + createsprite gWaterPulseBubbleSpriteTemplate, ANIM_ATTACKER, 66, 80, 60, 10, 3, 20, 50, 0 + createsprite gWaterPulseBubbleSpriteTemplate, ANIM_ATTACKER, 66, 140, 100, 16, 1, 20, 30, 1 playsewithpan SE_W145C, SOUND_PAN_TARGET waitforvisualfinish playsewithpan SE_W202, SOUND_PAN_ATTACKER @@ -9526,14 +9529,14 @@ Move_PSYCHO_BOOST: createvisualtask AnimTask_FadeScreenToWhite, 5 waitbgfadein delay 6 - createvisualtask sub_8115A04, 2, 1, 2, 8, 0, 10, RGB_BLACK + createvisualtask AnimTask_BlendColorCycle, 2, 1, 2, 8, 0, 10, RGB_BLACK delay 0 monbgprio_28 ANIM_ATTACKER setalpha 8, 8 delay 10 createvisualtask AnimTask_ShakeMon, 2, ANIM_ATTACKER, 3, 0, 240, 0 loopsewithpan SE_W060B, SOUND_PAN_ATTACKER, 14, 10 - createsprite gUnknown_08596920, ANIM_ATTACKER, 2 + createsprite gPsychoBoostOrbSpriteTemplate, ANIM_ATTACKER, 2 delay 110 loopsewithpan SE_W060B, SOUND_PAN_ATTACKER, 7, 10 waitforvisualfinish @@ -9554,7 +9557,7 @@ Move_KNOCK_OFF: createsprite gKnockOffStrikeSpriteTemplate, ANIM_TARGET, 2, -16, -16 delay 8 createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 5, 1, RGB_WHITE, 10, 0, 0 - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0, 0, 1, 2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0, 0, ANIM_TARGET, 2 playsewithpan SE_W004, SOUND_PAN_TARGET createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, 1, -12, 10, 0, 3 createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 5 @@ -9567,10 +9570,10 @@ Move_KNOCK_OFF: end Move_DOOM_DESIRE: - createvisualtask sub_8114960, 2 + createvisualtask GetIsDoomDesireHitTurn, 2 delay 1 monbg ANIM_ATK_PARTNER - createvisualtask AnimTask_SetGreyscaleOrOriginalPal, 5, ANIM_TARGET, 0 + createvisualtask AnimTask_SetGreyscaleOrOriginalPal, 5, ANIM_TARGET, FALSE createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 1, 0, 4, RGB_BLACK waitforvisualfinish setalpha 8, 8 @@ -9578,7 +9581,7 @@ Move_DOOM_DESIRE: createvisualtask AnimTask_ScaleMonAndRestore, 5, -4, -4, 15, ANIM_ATTACKER, 1 waitforvisualfinish delay 20 - createvisualtask AnimTask_SetGreyscaleOrOriginalPal, 5, ANIM_TARGET, 1 + createvisualtask AnimTask_SetGreyscaleOrOriginalPal, 5, ANIM_TARGET, TRUE createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 1, 4, 0, RGB_BLACK waitforvisualfinish clearmonbg ANIM_ATK_PARTNER @@ -9592,7 +9595,7 @@ Move_SKY_UPPERCUT: fadetobg BG_IN_AIR waitbgfadeout playsewithpan SE_W327, SOUND_PAN_ATTACKER - createvisualtask sub_810DABC, 5, 55 + createvisualtask AnimTask_MoveSkyUppercutBg, 5, 55 waitbgfadein setalpha 12, 8 delay 38 @@ -9600,20 +9603,20 @@ Move_SKY_UPPERCUT: delay 4 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 4, 0, 6, 1 playsewithpan SE_W233B, SOUND_PAN_TARGET - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, -28, 28, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, -28, 28, ANIM_TARGET, 1 delay 1 playsewithpan SE_W233B, SOUND_PAN_TARGET - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, -15, 8, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, -15, 8, ANIM_TARGET, 1 playsewithpan SE_W233B, SOUND_PAN_TARGET delay 1 playsewithpan SE_W233B, SOUND_PAN_TARGET - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, -5, -12, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, -5, -12, ANIM_TARGET, 1 delay 1 playsewithpan SE_W233B, SOUND_PAN_TARGET - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0, -32, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 0, -32, ANIM_TARGET, 1 delay 1 playsewithpan SE_W233B, SOUND_PAN_TARGET - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 5, -52, 1, 1 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 5, -52, ANIM_TARGET, 1 createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, 1, -26, 16, 1, 4 delay 4 createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_TARGET, 0, 3, 6, 1 @@ -9625,21 +9628,21 @@ Move_SKY_UPPERCUT: blendoff restorebg waitbgfadeout - setarg 7, -1 + setarg 7, 0xFFFF waitbgfadein end Move_SECRET_POWER: createvisualtask AnimTask_GetBattleTerrain, 5 - jumpargeq 0, BATTLE_TERRAIN_GRASS, Move_NEEDLE_ARM + jumpargeq 0, BATTLE_TERRAIN_GRASS, Move_NEEDLE_ARM jumpargeq 0, BATTLE_TERRAIN_LONG_GRASS, Move_MAGICAL_LEAF - jumpargeq 0, BATTLE_TERRAIN_SAND, Move_MUD_SHOT + jumpargeq 0, BATTLE_TERRAIN_SAND, Move_MUD_SHOT jumpargeq 0, BATTLE_TERRAIN_UNDERWATER, Move_WATERFALL - jumpargeq 0, BATTLE_TERRAIN_WATER, Move_SURF - jumpargeq 0, BATTLE_TERRAIN_POND, Move_BUBBLE_BEAM - jumpargeq 0, BATTLE_TERRAIN_MOUNTAIN, Move_ROCK_THROW - jumpargeq 0, BATTLE_TERRAIN_CAVE, Move_BITE - jumpargeq 0, BATTLE_TERRAIN_BUILDING, Move_STRENGTH + jumpargeq 0, BATTLE_TERRAIN_WATER, Move_SURF + jumpargeq 0, BATTLE_TERRAIN_POND, Move_BUBBLE_BEAM + jumpargeq 0, BATTLE_TERRAIN_MOUNTAIN, Move_ROCK_THROW + jumpargeq 0, BATTLE_TERRAIN_CAVE, Move_BITE + jumpargeq 0, BATTLE_TERRAIN_BUILDING, Move_STRENGTH goto Move_SLAM Move_TWISTER: @@ -9649,39 +9652,39 @@ Move_TWISTER: monbg ANIM_DEF_PARTNER monbgprio_28 ANIM_TARGET playsewithpan SE_W239, SOUND_PAN_TARGET - createsprite gTwisterLeafParticleSpriteTemplate, ANIM_TARGET, 2, 120, 70, 5, 70, 30 + createsprite gTwisterLeafSpriteTemplate, ANIM_TARGET, 2, 120, 70, 5, 70, 30 delay 1 - createsprite gTwisterLeafParticleSpriteTemplate, ANIM_TARGET, 2, 115, 55, 6, 60, 25 + createsprite gTwisterLeafSpriteTemplate, ANIM_TARGET, 2, 115, 55, 6, 60, 25 delay 1 - createsprite gTwisterLeafParticleSpriteTemplate, ANIM_TARGET, 2, 115, 60, 7, 60, 30 - createsprite gTwisterLeafParticleSpriteTemplate, ANIM_TARGET, 2, 115, 55, 10, 60, 30 + createsprite gTwisterLeafSpriteTemplate, ANIM_TARGET, 2, 115, 60, 7, 60, 30 + createsprite gTwisterLeafSpriteTemplate, ANIM_TARGET, 2, 115, 55, 10, 60, 30 delay 3 - createsprite gUnknown_08596CC8, ANIM_TARGET, 2, 100, 50, 4, 50, 26 + createsprite gTwisterRockSpriteTemplate, ANIM_TARGET, 2, 100, 50, 4, 50, 26 delay 1 - createsprite gTwisterLeafParticleSpriteTemplate, ANIM_TARGET, 2, 105, 25, 8, 60, 20 + createsprite gTwisterLeafSpriteTemplate, ANIM_TARGET, 2, 105, 25, 8, 60, 20 delay 1 - createsprite gTwisterLeafParticleSpriteTemplate, ANIM_TARGET, 2, 115, 40, 10, 48, 30 + createsprite gTwisterLeafSpriteTemplate, ANIM_TARGET, 2, 115, 40, 10, 48, 30 delay 3 - createsprite gUnknown_08596CC8, ANIM_TARGET, 2, 120, 30, 6, 45, 25 - createsprite gTwisterLeafParticleSpriteTemplate, ANIM_TARGET, 2, 115, 35, 10, 60, 30 + createsprite gTwisterRockSpriteTemplate, ANIM_TARGET, 2, 120, 30, 6, 45, 25 + createsprite gTwisterLeafSpriteTemplate, ANIM_TARGET, 2, 115, 35, 10, 60, 30 delay 3 - createsprite gUnknown_08596CC8, ANIM_TARGET, 2, 105, 20, 8, 40, 0 + createsprite gTwisterRockSpriteTemplate, ANIM_TARGET, 2, 105, 20, 8, 40, 0 delay 3 - createsprite gTwisterLeafParticleSpriteTemplate, ANIM_TARGET, 2, 20, 255, 15, 32, 0 - createsprite gTwisterLeafParticleSpriteTemplate, ANIM_TARGET, 2, 110, 10, 8, 32, 20 + createsprite gTwisterLeafSpriteTemplate, ANIM_TARGET, 2, 20, 255, 15, 32, 0 + createsprite gTwisterLeafSpriteTemplate, ANIM_TARGET, 2, 110, 10, 8, 32, 20 waitforvisualfinish - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, -32, -16, 1, 3 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, -32, -16, ANIM_TARGET, 3 playsewithpan SE_W004, SOUND_PAN_TARGET createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_TARGET, 3, 0, 12, 1 createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_DEF_PARTNER, 3, 0, 12, 1 delay 4 - createsprite gUnknown_085973A0, ANIM_TARGET, 3, 1, 3 + createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, 1, 3 playsewithpan SE_W004, SOUND_PAN_TARGET delay 4 - createsprite gUnknown_085973A0, ANIM_TARGET, 3, 1, 3 + createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, 1, 3 playsewithpan SE_W004, SOUND_PAN_TARGET delay 4 - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 32, 20, 1, 3 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 32, 20, ANIM_TARGET, 3 playsewithpan SE_W004, SOUND_PAN_TARGET waitforvisualfinish clearmonbg ANIM_DEF_PARTNER @@ -9696,7 +9699,7 @@ Move_MAGICAL_LEAF: setalpha 12, 8 delay 1 loopsewithpan SE_W077, SOUND_PAN_ATTACKER, 10, 5 - createvisualtask sub_81007C4, 5 + createvisualtask AnimTask_CycleMagicalLeafPal, 5 createsprite gRazorLeafParticleSpriteTemplate, ANIM_ATTACKER, 2, -3, -2, 10 delay 2 createsprite gRazorLeafParticleSpriteTemplate, ANIM_ATTACKER, 2, -1, -1, 15 @@ -9722,11 +9725,11 @@ Move_MAGICAL_LEAF: createsprite gRazorLeafCutterSpriteTemplate, ANIM_TARGET, 3, 20, -10, 20, 0, 32, -20, 0 delay 30 playsewithpan SE_W013, SOUND_PAN_TARGET - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 4, -10, -4, 1, 2 - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 4, 10, 4, 1, 2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 4, -10, -4, ANIM_TARGET, 2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 4, 10, 4, ANIM_TARGET, 2 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 2, 0, 8, 1 delay 20 - setarg 7, -1 + setarg 7, 0xFFFF waitforvisualfinish clearmonbg ANIM_DEF_PARTNER blendoff @@ -9735,21 +9738,21 @@ Move_MAGICAL_LEAF: Move_ICE_BALL: loadspritegfx ANIM_TAG_ICE_CHUNK loadspritegfx ANIM_TAG_ICE_CRYSTALS - createvisualtask AnimTask_GetRolloutCounter, 5, 0 + createvisualtask AnimTask_GetIceBallCounter, 5, 0 jumpargeq 0, 4, IceBallSetIceBg IceBallContinue: playsewithpan SE_W196, SOUND_PAN_ATTACKER - createsprite gUnknown_08595DE4, ANIM_TARGET, 2, 15, 0, -12, -16, 30, -40 + createsprite gIceBallChunkSpriteTemplate, ANIM_TARGET, 2, 15, 0, -12, -16, 30, -40 delay 28 playsewithpan SE_W280, SOUND_PAN_TARGET - createvisualtask AnimTask_GetRolloutCounter, 5, 0 + createvisualtask AnimTask_GetIceBallCounter, 5, 0 jumpargeq 0, 0, IceBallWeakest jumpargeq 0, 1, IceBallWeak jumpargeq 0, 2, IceBallMediun jumpargeq 0, 3, IceBallStrong jumpargeq 0, 4, IceBallStrongest IceBallContinue2: - createvisualtask AnimTask_GetRolloutCounter, 5, 0 + createvisualtask AnimTask_GetIceBallCounter, 5, 0 jumpargeq 0, 4, IceBallUnsetIceBg IceBallEnd: end @@ -9763,63 +9766,63 @@ IceBallUnsetIceBg: waitbgfadein goto IceBallEnd IceBallWeakest: - createvisualtask sub_80D6388, 2, 0, 1, 8, 1, 0 - call IceBall1 - call IceBall1 - call IceBall1 - call IceBall1 - call IceBall1 + createvisualtask AnimTask_ShakeTargetBasedOnMovePowerOrDmg, 2, FALSE, 1, 8, 1, 0 + call IceBallImpactShard + call IceBallImpactShard + call IceBallImpactShard + call IceBallImpactShard + call IceBallImpactShard goto IceBallContinue2 IceBallWeak: - createvisualtask sub_80D6388, 2, 0, 1, 10, 1, 0 - call IceBall1 - call IceBall1 - call IceBall1 - call IceBall1 - call IceBall1 - call IceBall1 - call IceBall1 + createvisualtask AnimTask_ShakeTargetBasedOnMovePowerOrDmg, 2, FALSE, 1, 10, 1, 0 + call IceBallImpactShard + call IceBallImpactShard + call IceBallImpactShard + call IceBallImpactShard + call IceBallImpactShard + call IceBallImpactShard + call IceBallImpactShard goto IceBallContinue2 IceBallMediun: - createvisualtask sub_80D6388, 2, 0, 1, 14, 1, 0 - call IceBall1 - call IceBall1 - call IceBall1 - call IceBall1 - call IceBall1 - call IceBall1 - call IceBall1 - call IceBall1 - call IceBall1 + createvisualtask AnimTask_ShakeTargetBasedOnMovePowerOrDmg, 2, FALSE, 1, 14, 1, 0 + call IceBallImpactShard + call IceBallImpactShard + call IceBallImpactShard + call IceBallImpactShard + call IceBallImpactShard + call IceBallImpactShard + call IceBallImpactShard + call IceBallImpactShard + call IceBallImpactShard goto IceBallContinue2 IceBallStrong: - createvisualtask sub_80D6388, 2, 0, 1, 18, 1, 0 - call IceBall1 - call IceBall1 - call IceBall1 - call IceBall1 - call IceBall1 - call IceBall1 - call IceBall1 - call IceBall1 - call IceBall1 - call IceBall1 + createvisualtask AnimTask_ShakeTargetBasedOnMovePowerOrDmg, 2, FALSE, 1, 18, 1, 0 + call IceBallImpactShard + call IceBallImpactShard + call IceBallImpactShard + call IceBallImpactShard + call IceBallImpactShard + call IceBallImpactShard + call IceBallImpactShard + call IceBallImpactShard + call IceBallImpactShard + call IceBallImpactShard goto IceBallContinue2 IceBallStrongest: - createvisualtask sub_80D6388, 2, 0, 1, 30, 1, 0 - call IceBall1 - call IceBall1 - call IceBall1 - call IceBall1 - call IceBall1 - call IceBall1 - call IceBall1 - call IceBall1 - call IceBall1 - call IceBall1 + createvisualtask AnimTask_ShakeTargetBasedOnMovePowerOrDmg, 2, FALSE, 1, 30, 1, 0 + call IceBallImpactShard + call IceBallImpactShard + call IceBallImpactShard + call IceBallImpactShard + call IceBallImpactShard + call IceBallImpactShard + call IceBallImpactShard + call IceBallImpactShard + call IceBallImpactShard + call IceBallImpactShard goto IceBallContinue2 -IceBall1: - createsprite gUnknown_08595DFC, ANIM_TARGET, 4, -12, -16 +IceBallImpactShard: + createsprite gIceBallImpactShardSpriteTemplate, ANIM_TARGET, 4, -12, -16 return Move_WEATHER_BALL: @@ -9827,7 +9830,7 @@ Move_WEATHER_BALL: createsprite gVerticalDipSpriteTemplate, ANIM_ATTACKER, 2, 8, 1, ANIM_ATTACKER delay 8 playsewithpan SE_W207, SOUND_PAN_ATTACKER - createsprite gUnknown_0853EE38, ANIM_ATTACKER, 2 + createsprite gWeatherBallUpSpriteTemplate, ANIM_ATTACKER, 2 waitforvisualfinish delay 15 playsewithpan SE_W197, 0 @@ -9842,22 +9845,22 @@ Move_WEATHER_BALL: jumpreteq ANIM_WEATHER_HAIL, WeatherBallIce WeatherBallNormal: loadspritegfx ANIM_TAG_IMPACT - createsprite gUnknown_0853EE50, ANIM_TARGET, 2, -30, -100, 25, 1, 0, 0 + createsprite gWeatherBallNormalDownSpriteTemplate, ANIM_TARGET, 2, -30, -100, 25, 1, 0, 0 waitforvisualfinish playsewithpan SE_W025B, SOUND_PAN_TARGET - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 4, -10, 0, 1, 2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 4, -10, 0, ANIM_TARGET, 2 createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 0, 3, 8, 1 waitforvisualfinish end WeatherBallFire: loadspritegfx ANIM_TAG_SMALL_EMBER - createsprite gUnknown_0859559C, ANIM_TARGET, 2, -30, -100, 25, 1, 40, 10 + createsprite gWeatherBallFireDownSpriteTemplate, ANIM_TARGET, 2, -30, -100, 25, 1, 40, 10 playsewithpan SE_W172, SOUND_PAN_TARGET delay 10 - createsprite gUnknown_0859559C, ANIM_TARGET, 2, -30, -100, 25, 1, -40, 20 + createsprite gWeatherBallFireDownSpriteTemplate, ANIM_TARGET, 2, -30, -100, 25, 1, -40, 20 playsewithpan SE_W172, SOUND_PAN_TARGET delay 10 - createsprite gUnknown_0859559C, ANIM_TARGET, 2, -30, -100, 25, 1, 0, 0 + createsprite gWeatherBallFireDownSpriteTemplate, ANIM_TARGET, 2, -30, -100, 25, 1, 0, 0 playsewithpan SE_W172, SOUND_PAN_TARGET waitforvisualfinish playsewithpan SE_W172B, SOUND_PAN_TARGET @@ -9866,13 +9869,13 @@ WeatherBallFire: end WeatherBallWater: loadspritegfx ANIM_TAG_SMALL_BUBBLES - createsprite gUnknown_08595328, ANIM_TARGET, 2, -30, -100, 25, 1, 50, 10 + createsprite gWeatherBallWaterDownSpriteTemplate, ANIM_TARGET, 2, -30, -100, 25, 1, 50, 10 playsewithpan SE_W152, SOUND_PAN_TARGET delay 8 - createsprite gUnknown_08595328, ANIM_TARGET, 2, -30, -100, 25, 1, -20, 20 + createsprite gWeatherBallWaterDownSpriteTemplate, ANIM_TARGET, 2, -30, -100, 25, 1, -20, 20 playsewithpan SE_W152, SOUND_PAN_TARGET delay 13 - createsprite gUnknown_08595328, ANIM_TARGET, 2, -30, -100, 25, 1, 0, 0 + createsprite gWeatherBallWaterDownSpriteTemplate, ANIM_TARGET, 2, -30, -100, 25, 1, 0, 0 playsewithpan SE_W152, SOUND_PAN_TARGET waitforvisualfinish createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 0, 3, 8, 1 @@ -9881,38 +9884,38 @@ WeatherBallWater: end WeatherBallSandstorm: loadspritegfx ANIM_TAG_ROCKS - createsprite gUnknown_08596CE0, ANIM_TARGET, 2, -30, -100, 25, 1, 30, 0 + createsprite gWeatherBallRockDownSpriteTemplate, ANIM_TARGET, 2, -30, -100, 25, 1, 30, 0 playsewithpan SE_W088, SOUND_PAN_TARGET delay 5 - createsprite gUnknown_08596CE0, ANIM_TARGET, 2, -30, -100, 25, 1, -40, 20 + createsprite gWeatherBallRockDownSpriteTemplate, ANIM_TARGET, 2, -30, -100, 25, 1, -40, 20 playsewithpan SE_W088, SOUND_PAN_TARGET delay 14 - createsprite gUnknown_08596CE0, ANIM_TARGET, 2, -30, -100, 25, 1, 0, 0 + createsprite gWeatherBallRockDownSpriteTemplate, ANIM_TARGET, 2, -30, -100, 25, 1, 0, 0 playsewithpan SE_W088, SOUND_PAN_TARGET waitforvisualfinish playsewithpan SE_W070, SOUND_PAN_TARGET - createsprite gUnknown_08596CB0, ANIM_TARGET, 2, -12, 27, 2, 3 - createsprite gUnknown_08596CB0, ANIM_TARGET, 2, 8, 28, 3, 4 - createsprite gUnknown_08596CB0, ANIM_TARGET, 2, -4, 30, 2, 3 - createsprite gUnknown_08596CB0, ANIM_TARGET, 2, 12, 25, 4, 4 + createsprite gRockScatterSpriteTemplate, ANIM_TARGET, 2, -12, 27, 2, 3 + createsprite gRockScatterSpriteTemplate, ANIM_TARGET, 2, 8, 28, 3, 4 + createsprite gRockScatterSpriteTemplate, ANIM_TARGET, 2, -4, 30, 2, 3 + createsprite gRockScatterSpriteTemplate, ANIM_TARGET, 2, 12, 25, 4, 4 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 2, 0, 8, 1 waitforvisualfinish end WeatherBallIce: loadspritegfx ANIM_TAG_HAIL loadspritegfx ANIM_TAG_ICE_CRYSTALS - createsprite gUnknown_08595D44, ANIM_TARGET, 2, -30, -100, 25, 25, -40, 20 + createsprite gWeatherBallIceDownSpriteTemplate, ANIM_TARGET, 2, -30, -100, 25, 25, -40, 20 playsewithpan SE_W258, SOUND_PAN_TARGET delay 10 - createsprite gUnknown_08595D44, ANIM_TARGET, 2, -30, -100, 25, 25, 40, 0 + createsprite gWeatherBallIceDownSpriteTemplate, ANIM_TARGET, 2, -30, -100, 25, 25, 40, 0 playsewithpan SE_W258, SOUND_PAN_TARGET delay 10 - createsprite gUnknown_08595D44, ANIM_TARGET, 2, -30, -100, 25, 25, 0, 0 + createsprite gWeatherBallIceDownSpriteTemplate, ANIM_TARGET, 2, -30, -100, 25, 25, 0, 0 playsewithpan SE_W258, SOUND_PAN_TARGET waitforvisualfinish createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 2, 0, 8, 1 playsewithpan SE_W196, SOUND_PAN_TARGET - call FreezeEffect1 + call IceCrystalEffectShort waitforvisualfinish end @@ -9921,109 +9924,109 @@ Move_COUNT: monbg ANIM_TARGET setalpha 12, 8 playsewithpan SE_W003, SOUND_PAN_TARGET - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 1, 2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, ANIM_TARGET, 2 createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 3, 0, 6, 1 waitforvisualfinish clearmonbg ANIM_TARGET blendoff end -FreezeEffect1: - createsprite gUnknown_08595B68, ANIM_TARGET, 2, -10, -10, 0 +IceCrystalEffectShort: + createsprite gIceCrystalHitLargeSpriteTemplate, ANIM_TARGET, 2, -10, -10, 0 playsewithpan SE_W196, SOUND_PAN_TARGET delay 4 - createsprite gUnknown_08595B80, ANIM_TARGET, 2, 10, 20, 0 + createsprite gIceCrystalHitSmallSpriteTemplate, ANIM_TARGET, 2, 10, 20, 0 playsewithpan SE_W196, SOUND_PAN_TARGET delay 4 - createsprite gUnknown_08595B68, ANIM_TARGET, 2, -5, 10, 0 + createsprite gIceCrystalHitLargeSpriteTemplate, ANIM_TARGET, 2, -5, 10, 0 playsewithpan SE_W196, SOUND_PAN_TARGET delay 4 - createsprite gUnknown_08595B80, ANIM_TARGET, 2, 17, -12, 0 + createsprite gIceCrystalHitSmallSpriteTemplate, ANIM_TARGET, 2, 17, -12, 0 playsewithpan SE_W196, SOUND_PAN_TARGET delay 4 - createsprite gUnknown_08595B80, ANIM_TARGET, 2, -15, 15, 0 + createsprite gIceCrystalHitSmallSpriteTemplate, ANIM_TARGET, 2, -15, 15, 0 playsewithpan SE_W196, SOUND_PAN_TARGET delay 4 - createsprite gUnknown_08595B80, ANIM_TARGET, 2, 0, 0, 0 + createsprite gIceCrystalHitSmallSpriteTemplate, ANIM_TARGET, 2, 0, 0, 0 playsewithpan SE_W196, SOUND_PAN_TARGET delay 4 - createsprite gUnknown_08595B68, ANIM_TARGET, 2, 20, 2, 0 + createsprite gIceCrystalHitLargeSpriteTemplate, ANIM_TARGET, 2, 20, 2, 0 playsewithpan SE_W196, SOUND_PAN_TARGET return -FreezeEffect2: - createsprite gUnknown_08595B68, ANIM_TARGET, 2, -10, -10, 1 +IceCrystalEffectLong: + createsprite gIceCrystalHitLargeSpriteTemplate, ANIM_TARGET, 2, -10, -10, 1 playsewithpan SE_W196, SOUND_PAN_TARGET delay 4 - createsprite gUnknown_08595B80, ANIM_TARGET, 2, 10, 20, 1 + createsprite gIceCrystalHitSmallSpriteTemplate, ANIM_TARGET, 2, 10, 20, 1 playsewithpan SE_W196, SOUND_PAN_TARGET delay 4 - createsprite gUnknown_08595B68, ANIM_TARGET, 2, -29, 0, 1 + createsprite gIceCrystalHitLargeSpriteTemplate, ANIM_TARGET, 2, -29, 0, 1 playsewithpan SE_W196, SOUND_PAN_TARGET delay 4 - createsprite gUnknown_08595B80, ANIM_TARGET, 2, 29, -20, 1 + createsprite gIceCrystalHitSmallSpriteTemplate, ANIM_TARGET, 2, 29, -20, 1 playsewithpan SE_W196, SOUND_PAN_TARGET delay 4 - createsprite gUnknown_08595B68, ANIM_TARGET, 2, -5, 10, 1 + createsprite gIceCrystalHitLargeSpriteTemplate, ANIM_TARGET, 2, -5, 10, 1 playsewithpan SE_W196, SOUND_PAN_TARGET delay 4 - createsprite gUnknown_08595B80, ANIM_TARGET, 2, 17, -12, 1 + createsprite gIceCrystalHitSmallSpriteTemplate, ANIM_TARGET, 2, 17, -12, 1 playsewithpan SE_W196, SOUND_PAN_TARGET delay 4 - createsprite gUnknown_08595B68, ANIM_TARGET, 2, -20, 0, 1 + createsprite gIceCrystalHitLargeSpriteTemplate, ANIM_TARGET, 2, -20, 0, 1 playsewithpan SE_W196, SOUND_PAN_TARGET delay 4 - createsprite gUnknown_08595B80, ANIM_TARGET, 2, -15, 15, 1 + createsprite gIceCrystalHitSmallSpriteTemplate, ANIM_TARGET, 2, -15, 15, 1 playsewithpan SE_W196, SOUND_PAN_TARGET delay 4 - createsprite gUnknown_08595B80, ANIM_TARGET, 2, 26, -5, 1 + createsprite gIceCrystalHitSmallSpriteTemplate, ANIM_TARGET, 2, 26, -5, 1 playsewithpan SE_W196, SOUND_PAN_TARGET delay 4 - createsprite gUnknown_08595B80, ANIM_TARGET, 2, 0, 0, 1 + createsprite gIceCrystalHitSmallSpriteTemplate, ANIM_TARGET, 2, 0, 0, 1 playsewithpan SE_W196, SOUND_PAN_TARGET delay 4 - createsprite gUnknown_08595B68, ANIM_TARGET, 2, 20, 2, 1 + createsprite gIceCrystalHitLargeSpriteTemplate, ANIM_TARGET, 2, 20, 2, 1 playsewithpan SE_W196, SOUND_PAN_TARGET return -IcyWindEffect1: @ Unused +IceSpikesEffectShort: @ Unused loopsewithpan SE_W196, SOUND_PAN_TARGET, 6, 4 - createsprite gUnknown_08595C04, ANIM_TARGET, 2, 0, 24, 0 + createsprite gIceGroundSpikeSpriteTemplate, ANIM_TARGET, 2, 0, 24, 0 delay 4 - createsprite gUnknown_08595C04, ANIM_TARGET, 2, 8, 24, 0 - createsprite gUnknown_08595C04, ANIM_TARGET, 2, -8, 24, 0 + createsprite gIceGroundSpikeSpriteTemplate, ANIM_TARGET, 2, 8, 24, 0 + createsprite gIceGroundSpikeSpriteTemplate, ANIM_TARGET, 2, -8, 24, 0 delay 4 - createsprite gUnknown_08595C04, ANIM_TARGET, 2, 16, 24, 0 - createsprite gUnknown_08595C04, ANIM_TARGET, 2, -16, 24, 0 + createsprite gIceGroundSpikeSpriteTemplate, ANIM_TARGET, 2, 16, 24, 0 + createsprite gIceGroundSpikeSpriteTemplate, ANIM_TARGET, 2, -16, 24, 0 delay 4 - createsprite gUnknown_08595C04, ANIM_TARGET, 2, 24, 24, 0 - createsprite gUnknown_08595C04, ANIM_TARGET, 2, -24, 24, 0 + createsprite gIceGroundSpikeSpriteTemplate, ANIM_TARGET, 2, 24, 24, 0 + createsprite gIceGroundSpikeSpriteTemplate, ANIM_TARGET, 2, -24, 24, 0 delay 4 - createsprite gUnknown_08595C04, ANIM_TARGET, 2, 32, 24, 0 - createsprite gUnknown_08595C04, ANIM_TARGET, 2, -32, 24, 0 + createsprite gIceGroundSpikeSpriteTemplate, ANIM_TARGET, 2, 32, 24, 0 + createsprite gIceGroundSpikeSpriteTemplate, ANIM_TARGET, 2, -32, 24, 0 return -IcyWindEffect2: +IceSpikesEffectLong: loopsewithpan SE_W196, SOUND_PAN_TARGET, 6, 4 - createsprite gUnknown_08595C04, ANIM_TARGET, 2, 0, 24, 1 + createsprite gIceGroundSpikeSpriteTemplate, ANIM_TARGET, 2, 0, 24, 1 delay 4 - createsprite gUnknown_08595C04, ANIM_TARGET, 2, 8, 24, 1 - createsprite gUnknown_08595C04, ANIM_TARGET, 2, -8, 24, 1 + createsprite gIceGroundSpikeSpriteTemplate, ANIM_TARGET, 2, 8, 24, 1 + createsprite gIceGroundSpikeSpriteTemplate, ANIM_TARGET, 2, -8, 24, 1 delay 4 - createsprite gUnknown_08595C04, ANIM_TARGET, 2, 16, 24, 1 - createsprite gUnknown_08595C04, ANIM_TARGET, 2, -16, 24, 1 + createsprite gIceGroundSpikeSpriteTemplate, ANIM_TARGET, 2, 16, 24, 1 + createsprite gIceGroundSpikeSpriteTemplate, ANIM_TARGET, 2, -16, 24, 1 delay 4 - createsprite gUnknown_08595C04, ANIM_TARGET, 2, 24, 24, 1 - createsprite gUnknown_08595C04, ANIM_TARGET, 2, -24, 24, 1 + createsprite gIceGroundSpikeSpriteTemplate, ANIM_TARGET, 2, 24, 24, 1 + createsprite gIceGroundSpikeSpriteTemplate, ANIM_TARGET, 2, -24, 24, 1 delay 4 - createsprite gUnknown_08595C04, ANIM_TARGET, 2, 32, 24, 1 - createsprite gUnknown_08595C04, ANIM_TARGET, 2, -32, 24, 1 + createsprite gIceGroundSpikeSpriteTemplate, ANIM_TARGET, 2, 32, 24, 1 + createsprite gIceGroundSpikeSpriteTemplate, ANIM_TARGET, 2, -32, 24, 1 delay 4 - createsprite gUnknown_08595C04, ANIM_TARGET, 2, 40, 24, 1 - createsprite gUnknown_08595C04, ANIM_TARGET, 2, -40, 24, 1 + createsprite gIceGroundSpikeSpriteTemplate, ANIM_TARGET, 2, 40, 24, 1 + createsprite gIceGroundSpikeSpriteTemplate, ANIM_TARGET, 2, -40, 24, 1 delay 4 - createsprite gUnknown_08595C04, ANIM_TARGET, 2, 48, 24, 1 - createsprite gUnknown_08595C04, ANIM_TARGET, 2, -48, 24, 1 + createsprite gIceGroundSpikeSpriteTemplate, ANIM_TARGET, 2, 48, 24, 1 + createsprite gIceGroundSpikeSpriteTemplate, ANIM_TARGET, 2, -48, 24, 1 return GrantingStarsEffect: @@ -10077,7 +10080,7 @@ PoisonBubblesEffect: playsewithpan SE_W092, SOUND_PAN_TARGET return -WaterBubbleEffect: +WaterBubblesEffectShort: createsprite gWaterBubbleSpriteTemplate, ANIM_ATTACKER, 2, 10, 10, 0 playsewithpan SE_W145C, SOUND_PAN_TARGET delay 6 @@ -10097,7 +10100,7 @@ WaterBubbleEffect: playsewithpan SE_W145C, SOUND_PAN_TARGET return -WaterBubbleEffect2: +WaterBubblesEffectLong: createsprite gWaterBubbleSpriteTemplate, ANIM_ATTACKER, 2, 10, 10, 1 playsewithpan SE_W145C, SOUND_PAN_TARGET delay 6 @@ -10161,7 +10164,7 @@ SetPsychicBackground: UnsetPsychicBackground: restorebg waitbgfadeout - setarg 7, -1 + setarg 7, 0xFFFF waitbgfadein return @@ -10169,20 +10172,20 @@ SetSkyBg: jumpifcontest SetSkyBgContest fadetobg BG_SKY waitbgfadeout - createvisualtask sub_8117660, 5, -2304, 768, 1, -1 + createvisualtask AnimTask_StartSlidingBg, 5, -2304, 768, 1, -1 SetSkyBgContinue: waitbgfadein return SetSkyBgContest: fadetobg BG_SKY_CONTESTS waitbgfadeout - createvisualtask sub_8117660, 5, 2304, 768, 0, -1 + createvisualtask AnimTask_StartSlidingBg, 5, 2304, 768, 0, -1 goto SetSkyBgContinue UnsetSkyBg: restorebg waitbgfadeout - setarg 7, -1 + setarg 7, 0xFFFF waitbgfadein return @@ -10213,7 +10216,7 @@ UnsetSolarbeamBg: Status_Poison: loopsewithpan SE_W092, SOUND_PAN_TARGET, 13, 6 createvisualtask AnimTask_ShakeMon2, 2, ANIM_ATTACKER, 1, 0, 18, 2 - createvisualtask sub_8115A04, 2, 2, 2, 2, 0, 12, RGB(30, 0, 31) + createvisualtask AnimTask_BlendColorCycle, 2, 2, 2, 2, 0, 12, RGB(30, 0, 31) end Status_Confusion: @@ -10224,13 +10227,13 @@ Status_Confusion: Status_Burn: loadspritegfx ANIM_TAG_SMALL_EMBER playsewithpan SE_W172, SOUND_PAN_TARGET - call Burn1 - call Burn1 - call Burn1 + call BurnFlame + call BurnFlame + call BurnFlame waitforvisualfinish end -Burn1: - createsprite gUnknown_08595504, ANIM_TARGET, 2, -24, 24, 24, 24, 20, 1, 1 +BurnFlame: + createsprite gBurnFlameSpriteTemplate, ANIM_TARGET, 2, -24, 24, 24, 24, 20, 1, 1 delay 4 return @@ -10266,7 +10269,7 @@ Status_Freeze: monbg ANIM_DEF_PARTNER monbgprio_28 ANIM_TARGET waitplaysewithpan SE_W258, SOUND_PAN_TARGET, 17 - createvisualtask sub_80A9EF4, 2 + createvisualtask AnimTask_FrozenIceCube, 2 waitforvisualfinish clearmonbg ANIM_DEF_PARTNER end @@ -10275,7 +10278,7 @@ Status_Curse: loadspritegfx ANIM_TAG_GHOSTLY_SPIRIT monbg ANIM_DEF_PARTNER playsewithpan SE_W171, SOUND_PAN_TARGET - createsprite gBattleAnimSpriteTemplate_8596DE8, ANIM_TARGET, 2 + createsprite gCurseGhostSpriteTemplate, ANIM_TARGET, 2 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 2, 0, 14, 1 waitforvisualfinish clearmonbg ANIM_DEF_PARTNER @@ -10285,7 +10288,7 @@ Status_Nightmare: loadspritegfx ANIM_TAG_DEVIL monbg ANIM_DEF_PARTNER playsewithpan SE_W171, SOUND_PAN_TARGET - createsprite gBattleAnimSpriteTemplate_8596E00, ANIM_TARGET, 2 + createsprite gNightmareDevilSpriteTemplate, ANIM_TARGET, 2 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 2, 0, 14, 1 waitforvisualfinish clearmonbg ANIM_DEF_PARTNER @@ -10293,9 +10296,9 @@ Status_Nightmare: General_CastformChange: createvisualtask AnimTask_IsMonInvisible, 2 - jumpreteq 1, AnimScript_82D7ECA - goto AnimScript_82D7EB2 -AnimScript_82D7EB2: + jumpreteq 1, CastformChangeSkipAnim + goto CastformChangeContinue +CastformChangeContinue: monbg ANIM_ATTACKER playsewithpan SE_W100, SOUND_PAN_ATTACKER waitplaysewithpan SE_W107, SOUND_PAN_ATTACKER, 48 @@ -10303,8 +10306,8 @@ AnimScript_82D7EB2: waitforvisualfinish clearmonbg ANIM_ATTACKER end -AnimScript_82D7ECA: - createvisualtask AnimTask_CastformGfxChange, 2, 1 +CastformChangeSkipAnim: + createvisualtask AnimTask_CastformGfxDataChange, 2, 1 end General_StatsChange: @@ -10314,15 +10317,15 @@ General_StatsChange: General_SubstituteFade: monbg ANIM_ATTACKER - createvisualtask sub_8172D98, 5 - createvisualtask sub_8116620, 10, 2, 0, 0, 16, RGB_WHITE + createvisualtask AnimTask_SubstituteFadeToInvisible, 5 + createvisualtask AnimTask_BlendBattleAnimPal, 10, 2, 0, 0, 16, RGB_WHITE waitforvisualfinish delay 1 clearmonbg ANIM_ATTACKER delay 2 blendoff - createvisualtask sub_8116620, 10, 2, 0, 0, 0, RGB_WHITE - createvisualtask sub_8172BF0, 2, 1 + createvisualtask AnimTask_BlendBattleAnimPal, 10, 2, 0, 0, 0, RGB_WHITE + createvisualtask AnimTask_SwapMonSpriteToFromSubstitute, 2, TRUE end General_SubstituteAppear: @@ -10330,7 +10333,7 @@ General_SubstituteAppear: end General_PokeblockThrow: - createvisualtask sub_817345C, 2, 0 + createvisualtask AnimTask_SetAttackerTargetLeftPos, 2, 0 createvisualtask AnimTask_LoadPokeblockGfx, 2 delay 0 waitplaysewithpan SE_W026, SOUND_PAN_ATTACKER, 22 @@ -10350,8 +10353,8 @@ General_ItemKnockoff: General_TurnTrap: createvisualtask AnimTask_GetTrappedMoveAnimId, 5 jumpargeq 0, TRAP_ANIM_FIRE_SPIN, Status_FireSpin - jumpargeq 0, TRAP_ANIM_WHIRLPOOL, Status_Whrilpool - jumpargeq 0, TRAP_ANIM_CLAMP, Status_Clamp + jumpargeq 0, TRAP_ANIM_WHIRLPOOL, Status_Whirlpool + jumpargeq 0, TRAP_ANIM_CLAMP, Status_Clamp jumpargeq 0, TRAP_ANIM_SAND_TOMB, Status_SandTomb goto Status_BindWrap Status_BindWrap: @@ -10363,10 +10366,11 @@ Status_BindWrap: delay 3 createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 2, 0, 8, 1 delay 20 - setarg 7, -1 + setarg 7, 0xFFFF playsewithpan SE_W020, SOUND_PAN_TARGET waitforvisualfinish end + Status_FireSpin: loadspritegfx ANIM_TAG_SMALL_EMBER playsewithpan SE_W221B, SOUND_PAN_TARGET @@ -10376,7 +10380,8 @@ Status_FireSpin: waitforvisualfinish stopsound end -Status_Whrilpool: + +Status_Whirlpool: loadspritegfx ANIM_TAG_WATER_ORB monbg ANIM_DEF_PARTNER monbgprio_28 ANIM_TARGET @@ -10393,47 +10398,49 @@ Status_Whrilpool: stopsound clearmonbg ANIM_DEF_PARTNER end + Status_Clamp: loadspritegfx ANIM_TAG_CLAMP loadspritegfx ANIM_TAG_IMPACT monbg ANIM_TARGET setalpha 12, 8 playsewithpan SE_W011, SOUND_PAN_TARGET - createsprite gUnknown_08597098, ANIM_ATTACKER, 2, -32, 0, 2, 819, 0, 10 - createsprite gUnknown_08597098, ANIM_ATTACKER, 2, 32, 0, 6, -819, 0, 10 + createsprite gClampJawSpriteTemplate, ANIM_ATTACKER, 2, -32, 0, 2, 819, 0, 10 + createsprite gClampJawSpriteTemplate, ANIM_ATTACKER, 2, 32, 0, 6, -819, 0, 10 delay 10 - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 1, 2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, ANIM_TARGET, 2 createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 3, 0, 5, 1 waitforvisualfinish clearmonbg ANIM_TARGET blendoff waitforvisualfinish end + Status_SandTomb: loadspritegfx ANIM_TAG_MUD_SAND createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 0, 4, 2, 0, 7, RGB(19, 17, 0) createvisualtask AnimTask_ShakeMon, 5, ANIM_TARGET, 0, 2, 30, 1 playsewithpan SE_W328, SOUND_PAN_TARGET - call SandTombEffect - call SandTombEffect + call SandTombSwirlingDirt + call SandTombSwirlingDirt delay 22 createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 0, 4, 2, 7, 0, RGB(19, 17, 0) waitforvisualfinish stopsound end -General_ItemEffect: +General_HeldItemEffect: loadspritegfx ANIM_TAG_THIN_RING loadspritegfx ANIM_TAG_SPARKLE_2 delay 0 playsewithpan SE_W036, SOUND_PAN_ATTACKER - createvisualtask sub_80D622C, 2, 16, 128, 0, 2 + createvisualtask AnimTask_RotateMonToSideAndRestore, 2, 16, 128, ANIM_ATTACKER, 2 waitforvisualfinish playsewithpan SE_W036, SOUND_PAN_ATTACKER - createvisualtask sub_80D622C, 2, 16, 128, 0, 2 + createvisualtask AnimTask_RotateMonToSideAndRestore, 2, 16, 128, ANIM_ATTACKER, 2 waitforvisualfinish playsewithpan SE_W036, SOUND_PAN_ATTACKER - createvisualtask sub_80D622C, 2, 16, 128, 0, 2 + createvisualtask AnimTask_RotateMonToSideAndRestore, 2, 16, 128, ANIM_ATTACKER, 2 waitforvisualfinish playsewithpan SE_W234, SOUND_PAN_ATTACKER call GrantingStarsEffect @@ -10462,7 +10469,7 @@ General_SmokeballEscape: createsprite gSmokeBallEscapeCloudSpriteTemplate, ANIM_ATTACKER, 124, 2, 14, -20, 30 delay 4 playsewithpan SE_BOWA2, SOUND_PAN_TARGET - createvisualtask sub_81136E8, 2, 2 + createvisualtask AnimTask_AttackerFadeToInvisible, 2, 2 createsprite gSmokeBallEscapeCloudSpriteTemplate, ANIM_ATTACKER, 123, 3, 4, 4, 30 delay 14 playsewithpan SE_BOWA2, SOUND_PAN_TARGET @@ -10482,10 +10489,10 @@ General_SmokeballEscape: blendoff end -General_HangedOn: +General_FocusBand: createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 0, 2, 7, 0, 9, RGB_RED playsewithpan SE_W082, SOUND_PAN_ATTACKER - createvisualtask sub_815DB90, 5, 30, 128, 0, 1, 2, 0, 1 + createvisualtask AnimTask_SlideMonForFocusBand, 5, 30, 128, 0, 1, 2, 0, 1 waitforvisualfinish createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 0, 2, 4, 9, 0, RGB_RED waitforvisualfinish @@ -10496,13 +10503,13 @@ General_HangedOn: General_Rain: loadspritegfx ANIM_TAG_RAIN_DROPS playsewithpan SE_W240, SOUND_PAN_ATTACKER - createvisualtask sub_8116620, 10, 0x781, 2, 0, 4, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, 0x781, 2, 0, 4, RGB_BLACK waitforvisualfinish createvisualtask AnimTask_CreateRaindrops, 2, 0, 3, 60 createvisualtask AnimTask_CreateRaindrops, 2, 0, 3, 60 delay 50 waitforvisualfinish - createvisualtask sub_8116620, 10, 0x781, 2, 4, 0, RGB_BLACK + createvisualtask AnimTask_BlendBattleAnimPal, 10, 0x781, 2, 4, 0, RGB_BLACK waitforvisualfinish end @@ -10525,7 +10532,7 @@ General_MonHit: monbg ANIM_TARGET setalpha 12, 8 playsewithpan SE_W003, SOUND_PAN_TARGET - createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 1, 2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, ANIM_TARGET, 2 createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 3, 0, 6, 1 waitforvisualfinish clearmonbg ANIM_TARGET @@ -10534,16 +10541,16 @@ General_MonHit: General_ItemSteal: loadspritegfx ANIM_TAG_ITEM_BAG - createvisualtask sub_8117F30, 2 - createvisualtask AnimTask_TargetToEffectBattler, 2 + createvisualtask AnimTask_SetAnimAttackerAndTargetForEffectAtk, 2 + createvisualtask AnimTask_SetTargetToEffectBattler, 2 @ Redundant with above delay 1 createsprite gItemStealSpriteTemplate, ANIM_ATTACKER, 2, 0, -5, 10, 2, -1 end General_SnatchMove: loadspritegfx ANIM_TAG_ITEM_BAG - createvisualtask sub_8117E94, 2 - call AnimScript_82D85A3 + createvisualtask AnimTask_SetAnimAttackerAndTargetForEffectTgt, 2 + call SnatchMoveTrySwapFromSubstitute delay 1 createvisualtask AnimTask_SwayMon, 2, 0, 5, 5120, 4, ANIM_TARGET waitforvisualfinish @@ -10552,7 +10559,7 @@ General_SnatchMove: goto SnatchPartnerMonMove SnatchMoveContinue: waitforvisualfinish - call AnimScript_82D85C3 + call SnatchMoveTrySwapToSubstitute end SnatchOpposingMonMove: playsewithpan SE_W104, SOUND_PAN_ATTACKER @@ -10564,7 +10571,7 @@ SnatchPartnerMonMove: goto SnatchMoveContinue General_FutureSightHit: - createvisualtask sub_8117F10, 2 + createvisualtask AnimTask_SetAnimTargetToBattlerTarget, 2 monbg ANIM_DEF_PARTNER playsewithpan SE_W060, SOUND_PAN_ATTACKER call SetPsychicBackground @@ -10584,7 +10591,7 @@ General_FutureSightHit: end General_DoomDesireHit: - createvisualtask sub_8117F10, 2 + createvisualtask AnimTask_SetAnimTargetToBattlerTarget, 2 loadspritegfx ANIM_TAG_EXPLOSION createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 0, 16, RGB_WHITE waitforvisualfinish @@ -10622,7 +10629,7 @@ General_FocusPunchSetUp: playsewithpan SE_W082, SOUND_PAN_ATTACKER call EndureEffect delay 8 - createvisualtask sub_8115A04, 2, 2, 2, 2, 0, 11, RGB_RED + createvisualtask AnimTask_BlendColorCycle, 2, 2, 2, 2, 0, 11, RGB_RED createvisualtask AnimTask_ShakeMon2, 2, ANIM_ATTACKER, 1, 0, 32, 1 call EndureEffect delay 8 @@ -10663,59 +10670,60 @@ General_WishHeal: createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 10, 0, RGB_BLACK end -AnimScript_82D85A3: +SnatchMoveTrySwapFromSubstitute: createvisualtask AnimTask_IsAttackerBehindSubstitute, 2 - jumprettrue AnimScript_82D85B4 -AnimScript_82D85B2: + jumprettrue SnatchMoveSwapSubstituteForMon +SnatchMoveTrySwapFromSubstituteEnd: waitforvisualfinish return -AnimScript_82D85B4: - createvisualtask sub_8172BF0, 2, 1 +SnatchMoveSwapSubstituteForMon: + createvisualtask AnimTask_SwapMonSpriteToFromSubstitute, 2, TRUE waitforvisualfinish - goto AnimScript_82D85B2 + goto SnatchMoveTrySwapFromSubstituteEnd -AnimScript_82D85C3: +SnatchMoveTrySwapToSubstitute: createvisualtask AnimTask_IsAttackerBehindSubstitute, 2 - jumprettrue AnimScript_82D85D4 -AnimScript_82D85D2: + jumprettrue SnatchMoveSwapMonForSubstitute +SnatchMoveTrySwapToSubstituteEnd: waitforvisualfinish return -AnimScript_82D85D4: - createvisualtask sub_8172BF0, 2, 0 +SnatchMoveSwapMonForSubstitute: + createvisualtask AnimTask_SwapMonSpriteToFromSubstitute, 2, FALSE waitforvisualfinish - goto AnimScript_82D85D2 + goto SnatchMoveTrySwapToSubstituteEnd +@ Healthbox blue flash effect on level up Special_LevelUp: playsewithpan SE_EXPMAX, 0 - createvisualtask sub_8170920, 2 + createvisualtask AnimTask_LoadHealthboxPalsForLevelUp, 2 delay 0 - createvisualtask sub_8170A0C, 5, 0, 0 + createvisualtask AnimTask_FlashHealthboxOnLevelUp, 5, 0, 0 waitforvisualfinish - createvisualtask sub_81709EC, 2 + createvisualtask AnimTask_FreeHealthboxPalsForLevelUp, 2 end Special_SwitchOutPlayerMon: - createvisualtask sub_8170BB0, 2 + createvisualtask AnimTask_SwitchOutBallEffect, 2 delay 10 - createvisualtask sub_8170B04, 2 + createvisualtask AnimTask_SwitchOutShrinkMon, 2 end Special_SwitchOutOpponentMon: - createvisualtask sub_8170BB0, 2 + createvisualtask AnimTask_SwitchOutBallEffect, 2 delay 10 - createvisualtask sub_8170B04, 2 + createvisualtask AnimTask_SwitchOutShrinkMon, 2 end Special_BallThrow: - createvisualtask sub_8170CFC, 2 + createvisualtask AnimTask_LoadBallGfx, 2 delay 0 playsewithpan SE_NAGERU, 0 - createvisualtask sub_8170E04, 2 + createvisualtask AnimTask_ThrowBall, 2 createvisualtask AnimTask_IsBallBlockedByTrainer, 2 jumpreteq -1, BallThrowTrainerBlock BallThrowEnd: waitforvisualfinish - createvisualtask sub_8170D24, 2 + createvisualtask AnimTask_FreeBallGfx, 2 end BallThrowTrainerBlock: loadspritegfx ANIM_TAG_IMPACT @@ -10724,24 +10732,24 @@ BallThrowTrainerBlock: setalpha 12, 8 delay 0 playsewithpan SE_W003, SOUND_PAN_TARGET - createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, -4, -20, 1, 2 + createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, -4, -20, ANIM_TARGET, 2 waitforvisualfinish clearmonbg ANIM_DEF_PARTNER blendoff goto BallThrowEnd Special_SafariBallThrow: - createvisualtask sub_8170CFC, 2 + createvisualtask AnimTask_LoadBallGfx, 2 delay 0 - createvisualtask sub_8170F2C, 2 + createvisualtask AnimTask_ThrowBallSpecial, 2 waitforvisualfinish - createvisualtask sub_8170D24, 2 + createvisualtask AnimTask_FreeBallGfx, 2 end Special_SubstituteToMon: - createvisualtask sub_8172BF0, 2, 1 + createvisualtask AnimTask_SwapMonSpriteToFromSubstitute, 2, TRUE end Special_MonToSubstitute: - createvisualtask sub_8172BF0, 2, 0 + createvisualtask AnimTask_SwapMonSpriteToFromSubstitute, 2, FALSE end diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 24a266de6..f2f82ee50 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -4275,7 +4275,7 @@ BattleScript_BerryCurePrlzEnd2:: end2 BattleScript_BerryCureParRet:: - playanimation BS_SCRIPTING, B_ANIM_ITEM_EFFECT, NULL + playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT, NULL printstring STRINGID_PKMNSITEMCUREDPARALYSIS waitmessage 0x40 updatestatusicon BS_SCRIPTING @@ -4287,7 +4287,7 @@ BattleScript_BerryCurePsnEnd2:: end2 BattleScript_BerryCurePsnRet:: - playanimation BS_SCRIPTING, B_ANIM_ITEM_EFFECT, NULL + playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT, NULL printstring STRINGID_PKMNSITEMCUREDPOISON waitmessage 0x40 updatestatusicon BS_SCRIPTING @@ -4299,7 +4299,7 @@ BattleScript_BerryCureBrnEnd2:: end2 BattleScript_BerryCureBrnRet:: - playanimation BS_SCRIPTING, B_ANIM_ITEM_EFFECT, NULL + playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT, NULL printstring STRINGID_PKMNSITEMHEALEDBURN waitmessage 0x40 updatestatusicon BS_SCRIPTING @@ -4311,7 +4311,7 @@ BattleScript_BerryCureFrzEnd2:: end2 BattleScript_BerryCureFrzRet:: - playanimation BS_SCRIPTING, B_ANIM_ITEM_EFFECT, NULL + playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT, NULL printstring STRINGID_PKMNSITEMDEFROSTEDIT waitmessage 0x40 updatestatusicon BS_SCRIPTING @@ -4323,7 +4323,7 @@ BattleScript_BerryCureSlpEnd2:: end2 BattleScript_BerryCureSlpRet:: - playanimation BS_SCRIPTING, B_ANIM_ITEM_EFFECT, NULL + playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT, NULL printstring STRINGID_PKMNSITEMWOKEIT waitmessage 0x40 updatestatusicon BS_SCRIPTING @@ -4335,7 +4335,7 @@ BattleScript_BerryCureConfusionEnd2:: end2 BattleScript_BerryCureConfusionRet:: - playanimation BS_SCRIPTING, B_ANIM_ITEM_EFFECT, NULL + playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT, NULL printstring STRINGID_PKMNSITEMSNAPPEDOUT waitmessage 0x40 removeitem BS_SCRIPTING @@ -4346,7 +4346,7 @@ BattleScript_BerryCureChosenStatusEnd2:: end2 BattleScript_BerryCureChosenStatusRet:: - playanimation BS_SCRIPTING, B_ANIM_ITEM_EFFECT, NULL + playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT, NULL printfromtable gBerryEffectStringIds waitmessage 0x40 updatestatusicon BS_SCRIPTING @@ -4358,14 +4358,14 @@ BattleScript_WhiteHerbEnd2:: end2 BattleScript_WhiteHerbRet:: - playanimation BS_SCRIPTING, B_ANIM_ITEM_EFFECT, NULL + playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT, NULL printstring STRINGID_PKMNSITEMRESTOREDSTATUS waitmessage 0x40 removeitem BS_SCRIPTING return BattleScript_ItemHealHP_RemoveItem:: - playanimation BS_ATTACKER, B_ANIM_ITEM_EFFECT, NULL + playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT, NULL printstring STRINGID_PKMNSITEMRESTOREDHEALTH waitmessage 0x40 orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE @@ -4375,7 +4375,7 @@ BattleScript_ItemHealHP_RemoveItem:: end2 BattleScript_BerryPPHealEnd2:: - playanimation BS_ATTACKER, B_ANIM_ITEM_EFFECT, NULL + playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT, NULL printstring STRINGID_PKMNSITEMRESTOREDPP waitmessage 0x40 removeitem BS_ATTACKER @@ -4386,7 +4386,7 @@ BattleScript_ItemHealHP_End2:: end2 BattleScript_ItemHealHP_Ret:: - playanimation BS_ATTACKER, B_ANIM_ITEM_EFFECT, NULL + playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT, NULL printstring STRINGID_PKMNSITEMRESTOREDHPALITTLE waitmessage 0x40 orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE @@ -4398,14 +4398,14 @@ BattleScript_SelectingNotAllowedMoveChoiceItem:: printselectionstring STRINGID_ITEMALLOWSONLYYMOVE endselectionscript -BattleScript_HangedOnMsg:: - playanimation BS_TARGET, B_ANIM_HANGED_ON, NULL +BattleScript_FocusBandActivates:: + playanimation BS_TARGET, B_ANIM_FOCUS_BAND, NULL printstring STRINGID_PKMNHUNGONWITHX waitmessage 0x40 return BattleScript_BerryConfuseHealEnd2:: - playanimation BS_ATTACKER, B_ANIM_ITEM_EFFECT, NULL + playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT, NULL printstring STRINGID_PKMNSITEMRESTOREDHEALTH waitmessage 0x40 orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE @@ -4419,7 +4419,7 @@ BattleScript_BerryConfuseHealEnd2:: end2 BattleScript_BerryStatRaiseEnd2:: - playanimation BS_ATTACKER, B_ANIM_ITEM_EFFECT, NULL + playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT, NULL statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_82DB85B BattleScript_82DB85B:: setbyte cMULTISTRING_CHOOSER, 0x4 @@ -4428,7 +4428,7 @@ BattleScript_82DB85B:: end2 BattleScript_BerryFocusEnergyEnd2:: - playanimation BS_ATTACKER, B_ANIM_ITEM_EFFECT, NULL + playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT, NULL printstring STRINGID_PKMNUSEDXTOGETPUMPED waitmessage 0x40 removeitem BS_ATTACKER diff --git a/graphics/unknown/unknown_D963A4.bin b/graphics/battle_anims/backgrounds/water_contest.bin similarity index 100% rename from graphics/unknown/unknown_D963A4.bin rename to graphics/battle_anims/backgrounds/water_contest.bin diff --git a/graphics/unknown/unknown_D95E00.bin b/graphics/battle_anims/backgrounds/water_opponent.bin similarity index 100% rename from graphics/unknown/unknown_D95E00.bin rename to graphics/battle_anims/backgrounds/water_opponent.bin diff --git a/graphics/unknown/unknown_D960D0.bin b/graphics/battle_anims/backgrounds/water_player.bin similarity index 100% rename from graphics/unknown/unknown_D960D0.bin rename to graphics/battle_anims/backgrounds/water_player.bin diff --git a/graphics/battle_anims/masks/morning_sun.bin b/graphics/battle_anims/masks/light_beam.bin similarity index 100% rename from graphics/battle_anims/masks/morning_sun.bin rename to graphics/battle_anims/masks/light_beam.bin diff --git a/graphics/battle_anims/masks/morning_sun.png b/graphics/battle_anims/masks/light_beam.png similarity index 100% rename from graphics/battle_anims/masks/morning_sun.png rename to graphics/battle_anims/masks/light_beam.png diff --git a/graphics/pokemon/question_mark/back.png b/graphics/pokemon/question_mark/back.png deleted file mode 100644 index 14eb6e139..000000000 Binary files a/graphics/pokemon/question_mark/back.png and /dev/null differ diff --git a/graphics/pokemon/circled_question_mark/anim_front.png b/graphics/pokemon/question_mark/circled/anim_front.png similarity index 100% rename from graphics/pokemon/circled_question_mark/anim_front.png rename to graphics/pokemon/question_mark/circled/anim_front.png diff --git a/graphics/pokemon/circled_question_mark/back.png b/graphics/pokemon/question_mark/circled/back.png similarity index 100% rename from graphics/pokemon/circled_question_mark/back.png rename to graphics/pokemon/question_mark/circled/back.png diff --git a/graphics/pokemon/circled_question_mark/front.png b/graphics/pokemon/question_mark/circled/front.png similarity index 100% rename from graphics/pokemon/circled_question_mark/front.png rename to graphics/pokemon/question_mark/circled/front.png diff --git a/graphics/pokemon/circled_question_mark/normal.pal b/graphics/pokemon/question_mark/circled/normal.pal similarity index 100% rename from graphics/pokemon/circled_question_mark/normal.pal rename to graphics/pokemon/question_mark/circled/normal.pal diff --git a/graphics/pokemon/circled_question_mark/shiny.pal b/graphics/pokemon/question_mark/circled/shiny.pal similarity index 100% rename from graphics/pokemon/circled_question_mark/shiny.pal rename to graphics/pokemon/question_mark/circled/shiny.pal diff --git a/graphics/pokemon/double_question_mark/anim_front.png b/graphics/pokemon/question_mark/double/anim_front.png similarity index 100% rename from graphics/pokemon/double_question_mark/anim_front.png rename to graphics/pokemon/question_mark/double/anim_front.png diff --git a/graphics/pokemon/double_question_mark/back.png b/graphics/pokemon/question_mark/double/back.png similarity index 100% rename from graphics/pokemon/double_question_mark/back.png rename to graphics/pokemon/question_mark/double/back.png diff --git a/graphics/pokemon/double_question_mark/front.png b/graphics/pokemon/question_mark/double/front.png similarity index 100% rename from graphics/pokemon/double_question_mark/front.png rename to graphics/pokemon/question_mark/double/front.png diff --git a/graphics/pokemon/double_question_mark/normal.pal b/graphics/pokemon/question_mark/double/normal.pal similarity index 100% rename from graphics/pokemon/double_question_mark/normal.pal rename to graphics/pokemon/question_mark/double/normal.pal diff --git a/graphics/pokemon/double_question_mark/shiny.pal b/graphics/pokemon/question_mark/double/shiny.pal similarity index 100% rename from graphics/pokemon/double_question_mark/shiny.pal rename to graphics/pokemon/question_mark/double/shiny.pal diff --git a/graphics/pokemon/question_mark/front.png b/graphics/pokemon/question_mark/front.png deleted file mode 100644 index f23b08476..000000000 Binary files a/graphics/pokemon/question_mark/front.png and /dev/null differ diff --git a/graphics/pokemon/question_mark/normal.pal b/graphics/pokemon/question_mark/normal.pal deleted file mode 100644 index 67be6bbf4..000000000 --- a/graphics/pokemon/question_mark/normal.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -0 255 0 -255 255 255 -0 0 0 -255 255 255 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 diff --git a/graphics/pokemon/question_mark/shiny.pal b/graphics/pokemon/question_mark/shiny.pal deleted file mode 100644 index 67be6bbf4..000000000 --- a/graphics/pokemon/question_mark/shiny.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -0 255 0 -255 255 255 -0 0 0 -255 255 255 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 diff --git a/graphics/pokemon/unown/anim_front_a.png b/graphics/pokemon/unown/a/anim_front.png similarity index 100% rename from graphics/pokemon/unown/anim_front_a.png rename to graphics/pokemon/unown/a/anim_front.png diff --git a/graphics/pokemon/unown/back_a.png b/graphics/pokemon/unown/a/back.png similarity index 100% rename from graphics/pokemon/unown/back_a.png rename to graphics/pokemon/unown/a/back.png diff --git a/graphics/pokemon/unown/front_a.png b/graphics/pokemon/unown/a/front.png similarity index 100% rename from graphics/pokemon/unown/front_a.png rename to graphics/pokemon/unown/a/front.png diff --git a/graphics/pokemon/unown/icon_a.png b/graphics/pokemon/unown/a/icon.png similarity index 100% rename from graphics/pokemon/unown/icon_a.png rename to graphics/pokemon/unown/a/icon.png diff --git a/graphics/pokemon/unown/anim_front_b.png b/graphics/pokemon/unown/b/anim_front.png similarity index 100% rename from graphics/pokemon/unown/anim_front_b.png rename to graphics/pokemon/unown/b/anim_front.png diff --git a/graphics/pokemon/unown/back_b.png b/graphics/pokemon/unown/b/back.png similarity index 100% rename from graphics/pokemon/unown/back_b.png rename to graphics/pokemon/unown/b/back.png diff --git a/graphics/pokemon/unown/front_b.png b/graphics/pokemon/unown/b/front.png similarity index 100% rename from graphics/pokemon/unown/front_b.png rename to graphics/pokemon/unown/b/front.png diff --git a/graphics/pokemon/unown/icon_b.png b/graphics/pokemon/unown/b/icon.png similarity index 100% rename from graphics/pokemon/unown/icon_b.png rename to graphics/pokemon/unown/b/icon.png diff --git a/graphics/pokemon/unown/anim_front_c.png b/graphics/pokemon/unown/c/anim_front.png similarity index 100% rename from graphics/pokemon/unown/anim_front_c.png rename to graphics/pokemon/unown/c/anim_front.png diff --git a/graphics/pokemon/unown/back_c.png b/graphics/pokemon/unown/c/back.png similarity index 100% rename from graphics/pokemon/unown/back_c.png rename to graphics/pokemon/unown/c/back.png diff --git a/graphics/pokemon/unown/front_c.png b/graphics/pokemon/unown/c/front.png similarity index 100% rename from graphics/pokemon/unown/front_c.png rename to graphics/pokemon/unown/c/front.png diff --git a/graphics/pokemon/unown/icon_c.png b/graphics/pokemon/unown/c/icon.png similarity index 100% rename from graphics/pokemon/unown/icon_c.png rename to graphics/pokemon/unown/c/icon.png diff --git a/graphics/pokemon/unown/anim_front_d.png b/graphics/pokemon/unown/d/anim_front.png similarity index 100% rename from graphics/pokemon/unown/anim_front_d.png rename to graphics/pokemon/unown/d/anim_front.png diff --git a/graphics/pokemon/unown/back_d.png b/graphics/pokemon/unown/d/back.png similarity index 100% rename from graphics/pokemon/unown/back_d.png rename to graphics/pokemon/unown/d/back.png diff --git a/graphics/pokemon/unown/front_d.png b/graphics/pokemon/unown/d/front.png similarity index 100% rename from graphics/pokemon/unown/front_d.png rename to graphics/pokemon/unown/d/front.png diff --git a/graphics/pokemon/unown/icon_d.png b/graphics/pokemon/unown/d/icon.png similarity index 100% rename from graphics/pokemon/unown/icon_d.png rename to graphics/pokemon/unown/d/icon.png diff --git a/graphics/pokemon/unown/anim_front_e.png b/graphics/pokemon/unown/e/anim_front.png similarity index 100% rename from graphics/pokemon/unown/anim_front_e.png rename to graphics/pokemon/unown/e/anim_front.png diff --git a/graphics/pokemon/unown/back_e.png b/graphics/pokemon/unown/e/back.png similarity index 100% rename from graphics/pokemon/unown/back_e.png rename to graphics/pokemon/unown/e/back.png diff --git a/graphics/pokemon/unown/front_e.png b/graphics/pokemon/unown/e/front.png similarity index 100% rename from graphics/pokemon/unown/front_e.png rename to graphics/pokemon/unown/e/front.png diff --git a/graphics/pokemon/unown/icon_e.png b/graphics/pokemon/unown/e/icon.png similarity index 100% rename from graphics/pokemon/unown/icon_e.png rename to graphics/pokemon/unown/e/icon.png diff --git a/graphics/pokemon/unown/anim_front_exclamation_mark.png b/graphics/pokemon/unown/exclamation_mark/anim_front.png similarity index 100% rename from graphics/pokemon/unown/anim_front_exclamation_mark.png rename to graphics/pokemon/unown/exclamation_mark/anim_front.png diff --git a/graphics/pokemon/unown/back_exclamation_mark.png b/graphics/pokemon/unown/exclamation_mark/back.png similarity index 100% rename from graphics/pokemon/unown/back_exclamation_mark.png rename to graphics/pokemon/unown/exclamation_mark/back.png diff --git a/graphics/pokemon/unown/front_exclamation_mark.png b/graphics/pokemon/unown/exclamation_mark/front.png similarity index 100% rename from graphics/pokemon/unown/front_exclamation_mark.png rename to graphics/pokemon/unown/exclamation_mark/front.png diff --git a/graphics/pokemon/unown/icon_exclamation_mark.png b/graphics/pokemon/unown/exclamation_mark/icon.png similarity index 100% rename from graphics/pokemon/unown/icon_exclamation_mark.png rename to graphics/pokemon/unown/exclamation_mark/icon.png diff --git a/graphics/pokemon/unown/anim_front_f.png b/graphics/pokemon/unown/f/anim_front.png similarity index 100% rename from graphics/pokemon/unown/anim_front_f.png rename to graphics/pokemon/unown/f/anim_front.png diff --git a/graphics/pokemon/unown/back_f.png b/graphics/pokemon/unown/f/back.png similarity index 100% rename from graphics/pokemon/unown/back_f.png rename to graphics/pokemon/unown/f/back.png diff --git a/graphics/pokemon/unown/front_f.png b/graphics/pokemon/unown/f/front.png similarity index 100% rename from graphics/pokemon/unown/front_f.png rename to graphics/pokemon/unown/f/front.png diff --git a/graphics/pokemon/unown/icon_f.png b/graphics/pokemon/unown/f/icon.png similarity index 100% rename from graphics/pokemon/unown/icon_f.png rename to graphics/pokemon/unown/f/icon.png diff --git a/graphics/pokemon/unown/anim_front_g.png b/graphics/pokemon/unown/g/anim_front.png similarity index 100% rename from graphics/pokemon/unown/anim_front_g.png rename to graphics/pokemon/unown/g/anim_front.png diff --git a/graphics/pokemon/unown/back_g.png b/graphics/pokemon/unown/g/back.png similarity index 100% rename from graphics/pokemon/unown/back_g.png rename to graphics/pokemon/unown/g/back.png diff --git a/graphics/pokemon/unown/front_g.png b/graphics/pokemon/unown/g/front.png similarity index 100% rename from graphics/pokemon/unown/front_g.png rename to graphics/pokemon/unown/g/front.png diff --git a/graphics/pokemon/unown/icon_g.png b/graphics/pokemon/unown/g/icon.png similarity index 100% rename from graphics/pokemon/unown/icon_g.png rename to graphics/pokemon/unown/g/icon.png diff --git a/graphics/pokemon/unown/anim_front_h.png b/graphics/pokemon/unown/h/anim_front.png similarity index 100% rename from graphics/pokemon/unown/anim_front_h.png rename to graphics/pokemon/unown/h/anim_front.png diff --git a/graphics/pokemon/unown/back_h.png b/graphics/pokemon/unown/h/back.png similarity index 100% rename from graphics/pokemon/unown/back_h.png rename to graphics/pokemon/unown/h/back.png diff --git a/graphics/pokemon/unown/front_h.png b/graphics/pokemon/unown/h/front.png similarity index 100% rename from graphics/pokemon/unown/front_h.png rename to graphics/pokemon/unown/h/front.png diff --git a/graphics/pokemon/unown/icon_h.png b/graphics/pokemon/unown/h/icon.png similarity index 100% rename from graphics/pokemon/unown/icon_h.png rename to graphics/pokemon/unown/h/icon.png diff --git a/graphics/pokemon/unown/anim_front_i.png b/graphics/pokemon/unown/i/anim_front.png similarity index 100% rename from graphics/pokemon/unown/anim_front_i.png rename to graphics/pokemon/unown/i/anim_front.png diff --git a/graphics/pokemon/unown/back_i.png b/graphics/pokemon/unown/i/back.png similarity index 100% rename from graphics/pokemon/unown/back_i.png rename to graphics/pokemon/unown/i/back.png diff --git a/graphics/pokemon/unown/front_i.png b/graphics/pokemon/unown/i/front.png similarity index 100% rename from graphics/pokemon/unown/front_i.png rename to graphics/pokemon/unown/i/front.png diff --git a/graphics/pokemon/unown/icon_i.png b/graphics/pokemon/unown/i/icon.png similarity index 100% rename from graphics/pokemon/unown/icon_i.png rename to graphics/pokemon/unown/i/icon.png diff --git a/graphics/pokemon/unown/anim_front_j.png b/graphics/pokemon/unown/j/anim_front.png similarity index 100% rename from graphics/pokemon/unown/anim_front_j.png rename to graphics/pokemon/unown/j/anim_front.png diff --git a/graphics/pokemon/unown/back_j.png b/graphics/pokemon/unown/j/back.png similarity index 100% rename from graphics/pokemon/unown/back_j.png rename to graphics/pokemon/unown/j/back.png diff --git a/graphics/pokemon/unown/front_j.png b/graphics/pokemon/unown/j/front.png similarity index 100% rename from graphics/pokemon/unown/front_j.png rename to graphics/pokemon/unown/j/front.png diff --git a/graphics/pokemon/unown/icon_j.png b/graphics/pokemon/unown/j/icon.png similarity index 100% rename from graphics/pokemon/unown/icon_j.png rename to graphics/pokemon/unown/j/icon.png diff --git a/graphics/pokemon/unown/anim_front_k.png b/graphics/pokemon/unown/k/anim_front.png similarity index 100% rename from graphics/pokemon/unown/anim_front_k.png rename to graphics/pokemon/unown/k/anim_front.png diff --git a/graphics/pokemon/unown/back_k.png b/graphics/pokemon/unown/k/back.png similarity index 100% rename from graphics/pokemon/unown/back_k.png rename to graphics/pokemon/unown/k/back.png diff --git a/graphics/pokemon/unown/front_k.png b/graphics/pokemon/unown/k/front.png similarity index 100% rename from graphics/pokemon/unown/front_k.png rename to graphics/pokemon/unown/k/front.png diff --git a/graphics/pokemon/unown/icon_k.png b/graphics/pokemon/unown/k/icon.png similarity index 100% rename from graphics/pokemon/unown/icon_k.png rename to graphics/pokemon/unown/k/icon.png diff --git a/graphics/pokemon/unown/anim_front_l.png b/graphics/pokemon/unown/l/anim_front.png similarity index 100% rename from graphics/pokemon/unown/anim_front_l.png rename to graphics/pokemon/unown/l/anim_front.png diff --git a/graphics/pokemon/unown/back_l.png b/graphics/pokemon/unown/l/back.png similarity index 100% rename from graphics/pokemon/unown/back_l.png rename to graphics/pokemon/unown/l/back.png diff --git a/graphics/pokemon/unown/front_l.png b/graphics/pokemon/unown/l/front.png similarity index 100% rename from graphics/pokemon/unown/front_l.png rename to graphics/pokemon/unown/l/front.png diff --git a/graphics/pokemon/unown/icon_l.png b/graphics/pokemon/unown/l/icon.png similarity index 100% rename from graphics/pokemon/unown/icon_l.png rename to graphics/pokemon/unown/l/icon.png diff --git a/graphics/pokemon/unown/anim_front_m.png b/graphics/pokemon/unown/m/anim_front.png similarity index 100% rename from graphics/pokemon/unown/anim_front_m.png rename to graphics/pokemon/unown/m/anim_front.png diff --git a/graphics/pokemon/unown/back_m.png b/graphics/pokemon/unown/m/back.png similarity index 100% rename from graphics/pokemon/unown/back_m.png rename to graphics/pokemon/unown/m/back.png diff --git a/graphics/pokemon/unown/front_m.png b/graphics/pokemon/unown/m/front.png similarity index 100% rename from graphics/pokemon/unown/front_m.png rename to graphics/pokemon/unown/m/front.png diff --git a/graphics/pokemon/unown/icon_m.png b/graphics/pokemon/unown/m/icon.png similarity index 100% rename from graphics/pokemon/unown/icon_m.png rename to graphics/pokemon/unown/m/icon.png diff --git a/graphics/pokemon/unown/anim_front_n.png b/graphics/pokemon/unown/n/anim_front.png similarity index 100% rename from graphics/pokemon/unown/anim_front_n.png rename to graphics/pokemon/unown/n/anim_front.png diff --git a/graphics/pokemon/unown/back_n.png b/graphics/pokemon/unown/n/back.png similarity index 100% rename from graphics/pokemon/unown/back_n.png rename to graphics/pokemon/unown/n/back.png diff --git a/graphics/pokemon/unown/front_n.png b/graphics/pokemon/unown/n/front.png similarity index 100% rename from graphics/pokemon/unown/front_n.png rename to graphics/pokemon/unown/n/front.png diff --git a/graphics/pokemon/unown/icon_n.png b/graphics/pokemon/unown/n/icon.png similarity index 100% rename from graphics/pokemon/unown/icon_n.png rename to graphics/pokemon/unown/n/icon.png diff --git a/graphics/pokemon/unown/anim_front_o.png b/graphics/pokemon/unown/o/anim_front.png similarity index 100% rename from graphics/pokemon/unown/anim_front_o.png rename to graphics/pokemon/unown/o/anim_front.png diff --git a/graphics/pokemon/unown/back_o.png b/graphics/pokemon/unown/o/back.png similarity index 100% rename from graphics/pokemon/unown/back_o.png rename to graphics/pokemon/unown/o/back.png diff --git a/graphics/pokemon/unown/front_o.png b/graphics/pokemon/unown/o/front.png similarity index 100% rename from graphics/pokemon/unown/front_o.png rename to graphics/pokemon/unown/o/front.png diff --git a/graphics/pokemon/unown/icon_o.png b/graphics/pokemon/unown/o/icon.png similarity index 100% rename from graphics/pokemon/unown/icon_o.png rename to graphics/pokemon/unown/o/icon.png diff --git a/graphics/pokemon/unown/anim_front_p.png b/graphics/pokemon/unown/p/anim_front.png similarity index 100% rename from graphics/pokemon/unown/anim_front_p.png rename to graphics/pokemon/unown/p/anim_front.png diff --git a/graphics/pokemon/unown/back_p.png b/graphics/pokemon/unown/p/back.png similarity index 100% rename from graphics/pokemon/unown/back_p.png rename to graphics/pokemon/unown/p/back.png diff --git a/graphics/pokemon/unown/front_p.png b/graphics/pokemon/unown/p/front.png similarity index 100% rename from graphics/pokemon/unown/front_p.png rename to graphics/pokemon/unown/p/front.png diff --git a/graphics/pokemon/unown/icon_p.png b/graphics/pokemon/unown/p/icon.png similarity index 100% rename from graphics/pokemon/unown/icon_p.png rename to graphics/pokemon/unown/p/icon.png diff --git a/graphics/pokemon/unown/anim_front_q.png b/graphics/pokemon/unown/q/anim_front.png similarity index 100% rename from graphics/pokemon/unown/anim_front_q.png rename to graphics/pokemon/unown/q/anim_front.png diff --git a/graphics/pokemon/unown/back_q.png b/graphics/pokemon/unown/q/back.png similarity index 100% rename from graphics/pokemon/unown/back_q.png rename to graphics/pokemon/unown/q/back.png diff --git a/graphics/pokemon/unown/front_q.png b/graphics/pokemon/unown/q/front.png similarity index 100% rename from graphics/pokemon/unown/front_q.png rename to graphics/pokemon/unown/q/front.png diff --git a/graphics/pokemon/unown/icon_q.png b/graphics/pokemon/unown/q/icon.png similarity index 100% rename from graphics/pokemon/unown/icon_q.png rename to graphics/pokemon/unown/q/icon.png diff --git a/graphics/pokemon/unown/anim_front_question_mark.png b/graphics/pokemon/unown/question_mark/anim_front.png similarity index 100% rename from graphics/pokemon/unown/anim_front_question_mark.png rename to graphics/pokemon/unown/question_mark/anim_front.png diff --git a/graphics/pokemon/unown/back_question_mark.png b/graphics/pokemon/unown/question_mark/back.png similarity index 100% rename from graphics/pokemon/unown/back_question_mark.png rename to graphics/pokemon/unown/question_mark/back.png diff --git a/graphics/pokemon/unown/front_question_mark.png b/graphics/pokemon/unown/question_mark/front.png similarity index 100% rename from graphics/pokemon/unown/front_question_mark.png rename to graphics/pokemon/unown/question_mark/front.png diff --git a/graphics/pokemon/unown/icon_question_mark.png b/graphics/pokemon/unown/question_mark/icon.png similarity index 100% rename from graphics/pokemon/unown/icon_question_mark.png rename to graphics/pokemon/unown/question_mark/icon.png diff --git a/graphics/pokemon/unown/anim_front_r.png b/graphics/pokemon/unown/r/anim_front.png similarity index 100% rename from graphics/pokemon/unown/anim_front_r.png rename to graphics/pokemon/unown/r/anim_front.png diff --git a/graphics/pokemon/unown/back_r.png b/graphics/pokemon/unown/r/back.png similarity index 100% rename from graphics/pokemon/unown/back_r.png rename to graphics/pokemon/unown/r/back.png diff --git a/graphics/pokemon/unown/front_r.png b/graphics/pokemon/unown/r/front.png similarity index 100% rename from graphics/pokemon/unown/front_r.png rename to graphics/pokemon/unown/r/front.png diff --git a/graphics/pokemon/unown/icon_r.png b/graphics/pokemon/unown/r/icon.png similarity index 100% rename from graphics/pokemon/unown/icon_r.png rename to graphics/pokemon/unown/r/icon.png diff --git a/graphics/pokemon/unown/anim_front_s.png b/graphics/pokemon/unown/s/anim_front.png similarity index 100% rename from graphics/pokemon/unown/anim_front_s.png rename to graphics/pokemon/unown/s/anim_front.png diff --git a/graphics/pokemon/unown/back_s.png b/graphics/pokemon/unown/s/back.png similarity index 100% rename from graphics/pokemon/unown/back_s.png rename to graphics/pokemon/unown/s/back.png diff --git a/graphics/pokemon/unown/front_s.png b/graphics/pokemon/unown/s/front.png similarity index 100% rename from graphics/pokemon/unown/front_s.png rename to graphics/pokemon/unown/s/front.png diff --git a/graphics/pokemon/unown/icon_s.png b/graphics/pokemon/unown/s/icon.png similarity index 100% rename from graphics/pokemon/unown/icon_s.png rename to graphics/pokemon/unown/s/icon.png diff --git a/graphics/pokemon/unown/anim_front_t.png b/graphics/pokemon/unown/t/anim_front.png similarity index 100% rename from graphics/pokemon/unown/anim_front_t.png rename to graphics/pokemon/unown/t/anim_front.png diff --git a/graphics/pokemon/unown/back_t.png b/graphics/pokemon/unown/t/back.png similarity index 100% rename from graphics/pokemon/unown/back_t.png rename to graphics/pokemon/unown/t/back.png diff --git a/graphics/pokemon/unown/front_t.png b/graphics/pokemon/unown/t/front.png similarity index 100% rename from graphics/pokemon/unown/front_t.png rename to graphics/pokemon/unown/t/front.png diff --git a/graphics/pokemon/unown/icon_t.png b/graphics/pokemon/unown/t/icon.png similarity index 100% rename from graphics/pokemon/unown/icon_t.png rename to graphics/pokemon/unown/t/icon.png diff --git a/graphics/pokemon/unown/anim_front_u.png b/graphics/pokemon/unown/u/anim_front.png similarity index 100% rename from graphics/pokemon/unown/anim_front_u.png rename to graphics/pokemon/unown/u/anim_front.png diff --git a/graphics/pokemon/unown/back_u.png b/graphics/pokemon/unown/u/back.png similarity index 100% rename from graphics/pokemon/unown/back_u.png rename to graphics/pokemon/unown/u/back.png diff --git a/graphics/pokemon/unown/front_u.png b/graphics/pokemon/unown/u/front.png similarity index 100% rename from graphics/pokemon/unown/front_u.png rename to graphics/pokemon/unown/u/front.png diff --git a/graphics/pokemon/unown/icon_u.png b/graphics/pokemon/unown/u/icon.png similarity index 100% rename from graphics/pokemon/unown/icon_u.png rename to graphics/pokemon/unown/u/icon.png diff --git a/graphics/pokemon/unown/anim_front_v.png b/graphics/pokemon/unown/v/anim_front.png similarity index 100% rename from graphics/pokemon/unown/anim_front_v.png rename to graphics/pokemon/unown/v/anim_front.png diff --git a/graphics/pokemon/unown/back_v.png b/graphics/pokemon/unown/v/back.png similarity index 100% rename from graphics/pokemon/unown/back_v.png rename to graphics/pokemon/unown/v/back.png diff --git a/graphics/pokemon/unown/front_v.png b/graphics/pokemon/unown/v/front.png similarity index 100% rename from graphics/pokemon/unown/front_v.png rename to graphics/pokemon/unown/v/front.png diff --git a/graphics/pokemon/unown/icon_v.png b/graphics/pokemon/unown/v/icon.png similarity index 100% rename from graphics/pokemon/unown/icon_v.png rename to graphics/pokemon/unown/v/icon.png diff --git a/graphics/pokemon/unown/anim_front_w.png b/graphics/pokemon/unown/w/anim_front.png similarity index 100% rename from graphics/pokemon/unown/anim_front_w.png rename to graphics/pokemon/unown/w/anim_front.png diff --git a/graphics/pokemon/unown/back_w.png b/graphics/pokemon/unown/w/back.png similarity index 100% rename from graphics/pokemon/unown/back_w.png rename to graphics/pokemon/unown/w/back.png diff --git a/graphics/pokemon/unown/front_w.png b/graphics/pokemon/unown/w/front.png similarity index 100% rename from graphics/pokemon/unown/front_w.png rename to graphics/pokemon/unown/w/front.png diff --git a/graphics/pokemon/unown/icon_w.png b/graphics/pokemon/unown/w/icon.png similarity index 100% rename from graphics/pokemon/unown/icon_w.png rename to graphics/pokemon/unown/w/icon.png diff --git a/graphics/pokemon/unown/anim_front_x.png b/graphics/pokemon/unown/x/anim_front.png similarity index 100% rename from graphics/pokemon/unown/anim_front_x.png rename to graphics/pokemon/unown/x/anim_front.png diff --git a/graphics/pokemon/unown/back_x.png b/graphics/pokemon/unown/x/back.png similarity index 100% rename from graphics/pokemon/unown/back_x.png rename to graphics/pokemon/unown/x/back.png diff --git a/graphics/pokemon/unown/front_x.png b/graphics/pokemon/unown/x/front.png similarity index 100% rename from graphics/pokemon/unown/front_x.png rename to graphics/pokemon/unown/x/front.png diff --git a/graphics/pokemon/unown/icon_x.png b/graphics/pokemon/unown/x/icon.png similarity index 100% rename from graphics/pokemon/unown/icon_x.png rename to graphics/pokemon/unown/x/icon.png diff --git a/graphics/pokemon/unown/anim_front_y.png b/graphics/pokemon/unown/y/anim_front.png similarity index 100% rename from graphics/pokemon/unown/anim_front_y.png rename to graphics/pokemon/unown/y/anim_front.png diff --git a/graphics/pokemon/unown/back_y.png b/graphics/pokemon/unown/y/back.png similarity index 100% rename from graphics/pokemon/unown/back_y.png rename to graphics/pokemon/unown/y/back.png diff --git a/graphics/pokemon/unown/front_y.png b/graphics/pokemon/unown/y/front.png similarity index 100% rename from graphics/pokemon/unown/front_y.png rename to graphics/pokemon/unown/y/front.png diff --git a/graphics/pokemon/unown/icon_y.png b/graphics/pokemon/unown/y/icon.png similarity index 100% rename from graphics/pokemon/unown/icon_y.png rename to graphics/pokemon/unown/y/icon.png diff --git a/graphics/pokemon/unown/anim_front_z.png b/graphics/pokemon/unown/z/anim_front.png similarity index 100% rename from graphics/pokemon/unown/anim_front_z.png rename to graphics/pokemon/unown/z/anim_front.png diff --git a/graphics/pokemon/unown/back_z.png b/graphics/pokemon/unown/z/back.png similarity index 100% rename from graphics/pokemon/unown/back_z.png rename to graphics/pokemon/unown/z/back.png diff --git a/graphics/pokemon/unown/front_z.png b/graphics/pokemon/unown/z/front.png similarity index 100% rename from graphics/pokemon/unown/front_z.png rename to graphics/pokemon/unown/z/front.png diff --git a/graphics/pokemon/unown/icon_z.png b/graphics/pokemon/unown/z/icon.png similarity index 100% rename from graphics/pokemon/unown/icon_z.png rename to graphics/pokemon/unown/z/icon.png diff --git a/include/battle.h b/include/battle.h index f8c685fb0..b377dc23c 100644 --- a/include/battle.h +++ b/include/battle.h @@ -590,7 +590,7 @@ struct MonSpritesGfx u8 field_F4[0x80]; u8 *barFontGfx; void *field_178; - u16 *field_17C; + u16 *buffer; }; // All battle variables are declared in battle_main.c diff --git a/include/battle_anim.h b/include/battle_anim.h index c3019a5cf..18727cc73 100644 --- a/include/battle_anim.h +++ b/include/battle_anim.h @@ -49,7 +49,7 @@ extern u8 gAnimMoveTurn; extern u8 gBattleAnimAttacker; extern u8 gBattleAnimTarget; extern u16 gAnimBattlerSpecies[MAX_BATTLERS_COUNT]; -extern u8 gUnknown_02038440; +extern u8 gAnimCustomPanning; void ClearBattleAnimationVars(void); void DoMoveAnim(u16 move); @@ -67,18 +67,19 @@ s16 CalculatePanIncrement(s16 sourcePan, s16 targetPan, s16 incrementPan); void sub_80A4720(u16 a, u16 *b, u32 c, u8 d); void sub_80A477C(bool8); -// battle_intro.s +// battle_intro.c void SetAnimBgAttribute(u8 bgId, u8 attributeId, u8 value); void sub_8118FBC(int bgId, u8 arg1, u8 arg2, u8 battlerPosition, u8 arg4, u8 *arg5, u16 *arg6, u16 arg7); void HandleIntroSlide(u8 terrainId); int GetAnimBgAttribute(u8 bgId, u8 attributeId); -// battle_anim_mons.s +// battle_anim_mons.c void TranslateSpriteInEllipseOverDuration(struct Sprite *sprite); void sub_80A8AEC(struct Sprite *sprite); void sub_80A8A6C(struct Sprite *sprite); -void sub_80A8E30(struct Sprite *sprite); -void sub_80A8B64(struct Sprite *sprite); +void AnimWeatherBallUp(struct Sprite *sprite); +void AnimWeatherBallDown(struct Sprite *sprite); +void AnimSpinningSparkle(struct Sprite *sprite); void SetAverageBattlerPositions(u8 battlerId, bool8 respectMonPicOffsets, s16 *x, s16 *y); void DestroySpriteAndMatrix(struct Sprite *sprite); void TranslateSpriteLinearFixedPoint(struct Sprite *sprite); @@ -88,7 +89,6 @@ void StartAnimLinearTranslation(struct Sprite *sprite); void InitAnimArcTranslation(struct Sprite *sprite); bool8 AnimTranslateLinear(struct Sprite *sprite); void TranslateAnimSpriteToTargetMonLocation(struct Sprite *sprite); -void sub_80A8EE4(struct Sprite *sprite); u8 GetBattlerSpriteCoord2(u8 battlerId, u8 attributeId); void sub_80A6FD4(struct Sprite *sprite); u16 ArcTan2Neg(s16 a, s16 b); @@ -101,7 +101,7 @@ void SetAnimSpriteInitialXOffset(struct Sprite *sprite, s16 a2); s16 GetBattlerSpriteCoordAttr(u8 battlerId, u8 a2); u8 GetBattlerYCoordWithElevation(u8 battlerId); void WaitAnimForDuration(struct Sprite *sprite); -void AnimSnoreZ(struct Sprite *sprite); +void AnimTravelDiagonally(struct Sprite *sprite); void InitAnimLinearTranslation(struct Sprite *sprite); void sub_80A6F98(struct Sprite *sprite); u8 GetBattlerSpriteBGPriority(u8 battlerId); @@ -125,7 +125,7 @@ u8 sub_80A77AC(u8 a1); s16 CloneBattlerSpriteWithBlend(u8); void obj_delete_but_dont_free_vram(struct Sprite*); u8 sub_80A89C8(int, u8, int); -void sub_80A6D60(struct BattleAnimBgData*, const void*, u32); +void AnimLoadCompressedBgTilemapHandleContest(struct BattleAnimBgData*, const void*, u32); void AnimLoadCompressedBgGfx(u32, const u32*, u32); void sub_80A6DAC(bool8); void TranslateSpriteInGrowingCircleOverDuration(struct Sprite *); @@ -133,7 +133,6 @@ void sub_80A653C(struct Sprite *); void SetBattlerSpriteYOffsetFromYScale(u8 spriteId); void sub_80A805C(struct Task *task, u8 a2, s16 a3, s16 a4, s16 a5, s16 a6, u16 a7); u8 sub_80A80C8(struct Task *task); -void sub_80A8EE4(struct Sprite *); void DestroyAnimSpriteAndDisableBlend(struct Sprite *); void AnimLoadCompressedBgTilemap(u32 bgId, const void *src); void InitAnimFastLinearTranslationWithSpeed(struct Sprite *sprite); @@ -144,7 +143,7 @@ void TranslateSpriteLinear(struct Sprite *sprite); void AnimSpriteOnMonPos(struct Sprite *sprite); void sub_80A7000(struct Sprite *sprite); void TranslateSpriteInCircleOverDuration(struct Sprite *sprite); -void SetGreyscaleOrOriginalPalette(u16 a1, bool8 a2); +void SetGreyscaleOrOriginalPalette(u16 palNum, bool8 restoreOriginal); void PrepareAffineAnimInTaskData(struct Task *task, u8 spriteId, const union AffineAnimCmd *affineAnimCmds); bool8 RunAffineAnimFromTaskData(struct Task *task); void AnimThrowProjectile(struct Sprite *sprite); @@ -158,6 +157,8 @@ void SetBattlerSpriteYOffsetFromOtherYScale(u8 spriteId, u8 otherSpriteId); u8 GetBattlerSide(u8 battler); u8 GetBattlerPosition(u8 battler); u8 GetBattlerAtPosition(u8 position); +void sub_80A64EC(struct Sprite *sprite); +void sub_80A718C(struct Sprite *sprite); enum { @@ -192,11 +193,7 @@ void SetSpritePrimaryCoordsFromSecondaryCoords(struct Sprite *sprite); u8 GetBattlerSpriteDefault_Y(u8 battlerId); u8 GetSubstituteSpriteDefault_Y(u8 battlerId); -// battle_anim_80A64EC.c -void sub_80A64EC(struct Sprite *sprite); -void sub_80A718C(struct Sprite *sprite); - -// battle_anim_status_effects.s +// battle_anim_status_effects.c #define STAT_ANIM_PLUS1 15 #define STAT_ANIM_PLUS2 39 #define STAT_ANIM_MINUS1 22 @@ -207,8 +204,8 @@ void sub_80A718C(struct Sprite *sprite); #define STAT_ANIM_MULTIPLE_MINUS2 58 void LaunchStatusAnimation(u8 battlerId, u8 statusAnimId); -// ground.c -void sub_81152DC(u8 taskId); +// battle_anim_ground.c +void AnimTask_HorizontalShake(u8 taskId); // battle_anim_special.c void sub_8172EF0(u8 battler, struct Pokemon *mon); @@ -216,21 +213,22 @@ u8 ItemIdToBallId(u16 itemId); u8 AnimateBallOpenParticles(u8 x, u8 y, u8 priority, u8 subpriority, u8 ballId); u8 LaunchBallFadeMonTask(bool8 unFadeLater, u8 battlerId, u32 selectedPalettes, u8 ballId); -// battle_anim_utility_funcs.s +// battle_anim_utility_funcs.c void sub_8116EB4(u8); void sub_8117854(u8 taskId, int unused, u16 arg2, u8 battler1, u8 arg4, u8 arg5, u8 arg6, u8 arg7, const u32 *arg8, const u32 *arg9, const u32 *palette); // battle_anim_effects_1.c void SetSpriteNextToMonHead(u8 battler, struct Sprite* sprite); void AnimMoveTwisterParticle(struct Sprite* sprite); +void AnimParticleBurst(struct Sprite *); -// water.c +// battle_anim_water.c void AnimWaterPulseRing(struct Sprite *sprite); -// flying.c -void sub_810E2C8(struct Sprite *sprite); +// battle_anim_flying.c +void DestroyAnimSpriteAfterTimer(struct Sprite *sprite); -// smokescreen.c +// battle_anim_smokescreen.c u8 SmokescreenImpact(s16 x, s16 y, u8 a3); u32 UnpackSelectedBattleAnimPalettes(s16); @@ -285,4 +283,14 @@ extern const struct OamData gOamData_AffineOff_ObjBlend_16x32; extern const struct CompressedSpriteSheet gBattleAnimPicTable[]; extern const struct CompressedSpritePalette gBattleAnimPaletteTable[]; +extern const struct SpriteTemplate gWaterHitSplatSpriteTemplate; + +extern const union AnimCmd *const gAnims_WaterMudOrb[]; +extern const union AnimCmd *const gAnims_BasicFire[]; +extern const union AffineAnimCmd *const gGrowingRingAffineAnimTable[]; +extern const union AffineAnimCmd *const gAffineAnims_Droplet[]; +extern const union AnimCmd *const gAnims_SmallBubblePair[]; +extern const union AnimCmd *const gAnims_WaterBubble[]; +extern const union AffineAnimCmd *const gAffineAnims_Bite[]; + #endif // GUARD_BATTLE_ANIM_H diff --git a/include/battle_scripts.h b/include/battle_scripts.h index cac3a7652..75abaae3c 100644 --- a/include/battle_scripts.h +++ b/include/battle_scripts.h @@ -199,7 +199,7 @@ extern const u8 BattleScript_BerryPPHealEnd2[]; extern const u8 BattleScript_ItemHealHP_End2[]; extern const u8 BattleScript_ItemHealHP_Ret[]; extern const u8 BattleScript_SelectingNotAllowedMoveChoiceItem[]; -extern const u8 BattleScript_HangedOnMsg[]; +extern const u8 BattleScript_FocusBandActivates[]; extern const u8 BattleScript_BerryConfuseHealEnd2[]; extern const u8 BattleScript_BerryStatRaiseEnd2[]; extern const u8 BattleScript_BerryFocusEnergyEnd2[]; diff --git a/include/constants/battle_anim.h b/include/constants/battle_anim.h index 0fe231cdc..dfdd9f912 100644 --- a/include/constants/battle_anim.h +++ b/include/constants/battle_anim.h @@ -354,9 +354,9 @@ #define B_ANIM_POKEBLOCK_THROW 0x4 #define B_ANIM_ITEM_KNOCKOFF 0x5 #define B_ANIM_TURN_TRAP 0x6 -#define B_ANIM_ITEM_EFFECT 0x7 +#define B_ANIM_HELD_ITEM_EFFECT 0x7 #define B_ANIM_SMOKEBALL_ESCAPE 0x8 -#define B_ANIM_HANGED_ON 0x9 +#define B_ANIM_FOCUS_BAND 0x9 #define B_ANIM_RAIN_CONTINUES 0xA #define B_ANIM_SUN_CONTINUES 0xB #define B_ANIM_SANDSTORM_CONTINUES 0xC @@ -392,8 +392,8 @@ #define B_ANIM_STATUS_NIGHTMARE 0x8 #define B_ANIM_STATUS_WRAPPED 0x9 // does not actually exist -// Most tasks return a value to gBattleAnimArgs[7]. -#define ARG_RET_ID 0x7 +// Tasks with return values often assign them to gBattleAnimArgs[7]. +#define ARG_RET_ID 7 // Trapping Wrap-like moves end turn animation. #define TRAP_ANIM_BIND 0 diff --git a/include/graphics.h b/include/graphics.h index b5d8a1db5..1efe5fde9 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -6807,15 +6807,15 @@ extern const u32 gBattleAnimSpritePal_ThoughtBubble[]; extern const u32 gBattleAnimSpritePal_MagentaHeart[]; extern const u32 gBattleAnimSpritePal_ElectricOrbs[]; extern const u32 gBattleAnimSpritePal_MovementWaves[]; -extern const u32 gUnknown_08C249D0[]; -extern const u32 gUnknown_08C249F8[]; +extern const u32 gBattleAnimBgPalette_ScaryFace[]; +extern const u32 gBattleAnimBgImage_ScaryFace[]; extern const u32 gBattleAnimSpritePal_RedHeart[]; extern const u32 gBattleAnimSpritePal_RedOrb[]; extern const u32 gBattleAnimSpritePal_EyeSparkle[]; extern const u32 gBattleAnimSpritePal_PinkHeart[]; -extern const u32 gUnknown_08C232E0; -extern const u32 gUnknown_08C23D50; -extern const u32 gUnknown_08C23D78; +extern const u32 gBattleAnimBgImage_Attract; +extern const u32 gBattleAnimBgPalette_Attract; +extern const u32 gBattleAnimBgTilemap_Attract; extern const u32 gBattleAnimSpritePal_Angel[]; extern const u32 gBattleAnimSpritePal_Devil[]; extern const u32 gBattleAnimSpritePal_Swipe[]; @@ -6920,9 +6920,9 @@ extern const u32 gBattleAnimBgTilemap_Drill[]; extern const u32 gBattleAnimBgTilemap_DrillContests[]; extern const u32 gBattleAnimBgTilemap_HighspeedOpponent[]; extern const u32 gBattleAnimBgTilemap_HighspeedPlayer[]; -extern const u32 gUnknown_08C2A634[]; -extern const u32 gUnknown_08C2A6D4[]; -extern const u32 gUnknown_08C2A6EC[]; +extern const u32 gBattleAnimMaskImage_LightBeam[]; +extern const u32 gBattleAnimMaskPalette_LightBeam[]; +extern const u32 gBattleAnimMaskTilemap_LightBeam[]; extern const u32 gBattleAnimBgTilemap_Thunder[]; extern const u32 gBattleAnimBgTilemap_GuillotineOpponent[]; extern const u32 gBattleAnimBgTilemap_GuillotinePlayer[]; @@ -6969,9 +6969,9 @@ extern const u32 gContestJudgeGfx[]; extern const u32 gContestJudgeSymbolsGfx[]; extern const u32 gContest3Pal[]; -extern const u32 gUnknown_08D95E00[]; -extern const u32 gUnknown_08D960D0[]; -extern const u32 gUnknown_08D963A4[]; +extern const u32 gBattleAnimBgTilemap_SurfOpponent[]; +extern const u32 gBattleAnimBgTilemap_SurfPlayer[]; +extern const u32 gBattleAnimBgTilemap_SurfContest[]; extern const u32 gBattleAnimBgImage_Surf[]; extern const u32 gBattleAnimBgPalette_Surf[]; extern const u32 gBattleAnimBackgroundImageMuddyWater_Pal[]; @@ -7046,8 +7046,8 @@ extern const u16 gUnknown_08DCF210[]; extern const u16 gUnknown_08DCF230[]; extern const u16 gUnknown_08DCF190[]; -extern const u32 gUnknown_08D8D410[]; -extern const u32 gUnknown_08D8D58C[]; +extern const u32 gBattleAnimBgTilemap_Sandstorm[]; +extern const u32 gBattleAnimBgImage_Sandstorm[]; // Pokedex Area Screen extern const u32 gPokedexAreaScreenAreaUnknown_Gfx[]; diff --git a/include/random.h b/include/random.h index 79a9d71dc..6bf61de6c 100644 --- a/include/random.h +++ b/include/random.h @@ -11,6 +11,11 @@ u16 Random2(void); //Returns a 32-bit pseudorandom number #define Random32() (Random() | (Random() << 16)) +// The number 1103515245 comes from the example implementation of rand and srand +// in the ISO C standard. +#define ISO_RANDOMIZE1(val)(1103515245 * (val) + 24691) +#define ISO_RANDOMIZE2(val)(1103515245 * (val) + 12345) + //Sets the initial seed value of the pseudorandom number generator void SeedRng(u16 seed); void SeedRng2(u16 seed); diff --git a/ld_script.txt b/ld_script.txt index b1fd4a1a3..cb96c476a 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -93,7 +93,7 @@ SECTIONS { src/daycare.o(.text); src/egg_hatch.o(.text); src/battle_interface.o(.text); - src/smokescreen.o(.text); + src/battle_anim_smokescreen.o(.text); src/pokeball.o(.text); src/load_save.o(.text); src/trade.o(.text); @@ -173,21 +173,21 @@ SECTIONS { src/item_use.o(.text); src/battle_anim_effects_1.o(.text); src/battle_anim_effects_2.o(.text); - src/water.o(.text); - src/fire.o(.text); - src/electric.o(.text); - src/ice.o(.text); - src/fight.o(.text); - src/poison.o(.text); - src/flying.o(.text); - src/psychic.o(.text); - src/bug.o(.text); - src/rock.o(.text); - src/ghost.o(.text); - src/dragon.o(.text); - src/dark.o(.text); - src/ground.o(.text); - src/normal.o(.text); + src/battle_anim_water.o(.text); + src/battle_anim_fire.o(.text); + src/battle_anim_electric.o(.text); + src/battle_anim_ice.o(.text); + src/battle_anim_fight.o(.text); + src/battle_anim_poison.o(.text); + src/battle_anim_flying.o(.text); + src/battle_anim_psychic.o(.text); + src/battle_anim_bug.o(.text); + src/battle_anim_rock.o(.text); + src/battle_anim_ghost.o(.text); + src/battle_anim_dragon.o(.text); + src/battle_anim_dark.o(.text); + src/battle_anim_ground.o(.text); + src/battle_anim_normal.o(.text); src/battle_anim_utility_funcs.o(.text); src/battle_intro.o(.text); src/bike.o(.text); @@ -464,7 +464,7 @@ SECTIONS { src/battle_util.o(.rodata); src/battle_script_commands.o(.rodata); src/battle_controller_player.o(.rodata); - src/smokescreen.o(.rodata); + src/battle_anim_smokescreen.o(.rodata); src/battle_controller_opponent.o(.rodata); src/battle_ai_switch_items.o(.rodata); src/battle_controller_link_opponent.o(.rodata); @@ -544,21 +544,21 @@ SECTIONS { src/item_use.o(.rodata); src/battle_anim_effects_1.o(.rodata); src/battle_anim_effects_2.o(.rodata); - src/water.o(.rodata); - src/fire.o(.rodata); - src/electric.o(.rodata); - src/ice.o(.rodata); - src/fight.o(.rodata); - src/poison.o(.rodata); - src/flying.o(.rodata); - src/psychic.o(.rodata); - src/bug.o(.rodata); - src/rock.o(.rodata); - src/ghost.o(.rodata); - src/dragon.o(.rodata); - src/dark.o(.rodata); - src/ground.o(.rodata); - src/normal.o(.rodata); + src/battle_anim_water.o(.rodata); + src/battle_anim_fire.o(.rodata); + src/battle_anim_electric.o(.rodata); + src/battle_anim_ice.o(.rodata); + src/battle_anim_fight.o(.rodata); + src/battle_anim_poison.o(.rodata); + src/battle_anim_flying.o(.rodata); + src/battle_anim_psychic.o(.rodata); + src/battle_anim_bug.o(.rodata); + src/battle_anim_rock.o(.rodata); + src/battle_anim_ghost.o(.rodata); + src/battle_anim_dragon.o(.rodata); + src/battle_anim_dark.o(.rodata); + src/battle_anim_ground.o(.rodata); + src/battle_anim_normal.o(.rodata); src/battle_anim_utility_funcs.o(.rodata); src/battle_intro.o(.rodata); src/bike.o(.rodata); diff --git a/src/battle_anim.c b/src/battle_anim.c index becc12d56..32a917cb4 100644 --- a/src/battle_anim.c +++ b/src/battle_anim.c @@ -112,7 +112,7 @@ EWRAM_DATA static u16 sAnimMoveIndex = 0; // Set but unused. EWRAM_DATA u8 gBattleAnimAttacker = 0; EWRAM_DATA u8 gBattleAnimTarget = 0; EWRAM_DATA u16 gAnimBattlerSpecies[MAX_BATTLERS_COUNT] = {0}; -EWRAM_DATA u8 gUnknown_02038440 = 0; +EWRAM_DATA u8 gAnimCustomPanning = 0; const struct OamData gOamData_AffineOff_ObjNormal_8x8 = { @@ -1821,7 +1821,7 @@ void ClearBattleAnimationVars(void) sAnimMoveIndex = 0; gBattleAnimAttacker = 0; gBattleAnimTarget = 0; - gUnknown_02038440 = 0; + gAnimCustomPanning = 0; } void DoMoveAnim(u16 move) @@ -2715,7 +2715,8 @@ static void ScriptCmd_goto(void) sBattleAnimScriptPtr = T2_READ_PTR(sBattleAnimScriptPtr); } -// Uses of this function that rely on a TRUE return are expecting inBattle to not be ticked as defined in contest behavior. As a result, if misused, this function cannot reliably discern between field and contest status and could result in undefined behavior. +// Uses of this function that rely on a TRUE return are expecting inBattle to not be ticked as defined in contest behavior. +// As a result, if misused, this function cannot reliably discern between field and contest status and could result in undefined behavior. bool8 IsContest(void) { if (!gMain.inBattle) diff --git a/src/bug.c b/src/battle_anim_bug.c similarity index 77% rename from src/bug.c rename to src/battle_anim_bug.c index 207000fb8..ea3df8098 100644 --- a/src/bug.c +++ b/src/battle_anim_bug.c @@ -4,90 +4,90 @@ #include "trig.h" #include "constants/rgb.h" -void sub_8110368(struct Sprite *); -void sub_8110438(struct Sprite *); -void AnimTranslateWebThread(struct Sprite *); -void sub_81105B4(struct Sprite *); -void sub_811067C(struct Sprite *); -void AnimTranslateStinger(struct Sprite *); -void AnimMissileArc(struct Sprite *); -void sub_8110994(struct Sprite *); -static void sub_811057C(struct Sprite *); -static void sub_8110630(struct Sprite *); -static void sub_81106A4(struct Sprite *); -static void sub_8110700(struct Sprite *); -static void AnimMissileArcStep(struct Sprite *); +static void AnimMegahornHorn(struct Sprite *); +static void AnimLeechLifeNeedle(struct Sprite *); +static void AnimTranslateWebThread(struct Sprite *); +static void AnimTranslateWebThread_Step(struct Sprite *); +static void AnimStringWrap(struct Sprite *); +static void AnimStringWrap_Step(struct Sprite *); +static void AnimSpiderWeb(struct Sprite *); +static void AnimSpiderWeb_Step(struct Sprite *); +static void AnimSpiderWeb_End(struct Sprite *); +static void AnimTranslateStinger(struct Sprite *); +static void AnimMissileArc(struct Sprite *); +static void AnimMissileArc_Step(struct Sprite *); +static void AnimTailGlowOrb(struct Sprite *); -const union AffineAnimCmd gUnknown_08596938[] = +static const union AffineAnimCmd sAffineAnim_MegahornHorn_0[] = { AFFINEANIMCMD_FRAME(0x100, 0x100, 30, 0), AFFINEANIMCMD_END, }; -const union AffineAnimCmd gUnknown_08596948[] = +static const union AffineAnimCmd sAffineAnim_MegahornHorn_1[] = { AFFINEANIMCMD_FRAME(0x100, 0x100, -99, 0), AFFINEANIMCMD_END, }; -const union AffineAnimCmd gUnknown_08596958[] = +static const union AffineAnimCmd sAffineAnim_MegahornHorn_2[] = { AFFINEANIMCMD_FRAME(0x100, 0x100, 94, 0), AFFINEANIMCMD_END, }; -const union AffineAnimCmd *const gUnknown_08596968[] = +static const union AffineAnimCmd *const sAffineAnims_MegahornHorn[] = { - gUnknown_08596938, - gUnknown_08596948, - gUnknown_08596958, + sAffineAnim_MegahornHorn_0, + sAffineAnim_MegahornHorn_1, + sAffineAnim_MegahornHorn_2, }; -const struct SpriteTemplate gUnknown_08596974 = +const struct SpriteTemplate gMegahornHornSpriteTemplate = { .tileTag = ANIM_TAG_HORN_HIT_2, .paletteTag = ANIM_TAG_HORN_HIT_2, .oam = &gOamData_AffineDouble_ObjNormal_32x16, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_08596968, - .callback = sub_8110368, + .affineAnims = sAffineAnims_MegahornHorn, + .callback = AnimMegahornHorn, }; -const union AffineAnimCmd gUnknown_0859698C[] = +static const union AffineAnimCmd sAffineAnim_LeechLifeNeedle_0[] = { AFFINEANIMCMD_FRAME(0x0, 0x0, -33, 1), AFFINEANIMCMD_END, }; -const union AffineAnimCmd gUnknown_0859699C[] = +static const union AffineAnimCmd sAffineAnim_LeechLifeNeedle_1[] = { AFFINEANIMCMD_FRAME(0x0, 0x0, 96, 1), AFFINEANIMCMD_END, }; -const union AffineAnimCmd gUnknown_085969AC[] = +static const union AffineAnimCmd sAffineAnim_LeechLifeNeedle_2[] = { AFFINEANIMCMD_FRAME(0x0, 0x0, -96, 1), AFFINEANIMCMD_END, }; -const union AffineAnimCmd *const gUnknown_085969BC[] = +static const union AffineAnimCmd *const sAffineAnims_LeechLifeNeedle[] = { - gUnknown_0859698C, - gUnknown_0859699C, - gUnknown_085969AC, + sAffineAnim_LeechLifeNeedle_0, + sAffineAnim_LeechLifeNeedle_1, + sAffineAnim_LeechLifeNeedle_2, }; -const struct SpriteTemplate gUnknown_085969C8 = +const struct SpriteTemplate gLeechLifeNeedleSpriteTemplate = { .tileTag = ANIM_TAG_NEEDLE, .paletteTag = ANIM_TAG_NEEDLE, .oam = &gOamData_AffineNormal_ObjNormal_16x16, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_085969BC, - .callback = sub_8110438, + .affineAnims = sAffineAnims_LeechLifeNeedle, + .callback = AnimLeechLifeNeedle, }; const struct SpriteTemplate gWebThreadSpriteTemplate = @@ -101,7 +101,7 @@ const struct SpriteTemplate gWebThreadSpriteTemplate = .callback = AnimTranslateWebThread, }; -const struct SpriteTemplate gUnknown_085969F8 = +const struct SpriteTemplate gStringWrapSpriteTemplate = { .tileTag = ANIM_TAG_STRING, .paletteTag = ANIM_TAG_STRING, @@ -109,19 +109,19 @@ const struct SpriteTemplate gUnknown_085969F8 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_81105B4, + .callback = AnimStringWrap, }; -const union AffineAnimCmd gUnknown_08596A10[] = +static const union AffineAnimCmd sAffineAnim_SpiderWeb[] = { AFFINEANIMCMD_FRAME(0x10, 0x10, 0, 0), AFFINEANIMCMD_FRAME(0x6, 0x6, 0, 1), AFFINEANIMCMD_JUMP(1), }; -const union AffineAnimCmd *const gUnknown_08596A28[] = +static const union AffineAnimCmd *const sAffineAnims_SpiderWeb[] = { - gUnknown_08596A10, + sAffineAnim_SpiderWeb, }; const struct SpriteTemplate gSpiderWebSpriteTemplate = @@ -131,8 +131,8 @@ const struct SpriteTemplate gSpiderWebSpriteTemplate = .oam = &gOamData_AffineDouble_ObjBlend_64x64, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_08596A28, - .callback = sub_811067C, + .affineAnims = sAffineAnims_SpiderWeb, + .callback = AnimSpiderWeb, }; const struct SpriteTemplate gLinearStingerSpriteTemplate = @@ -168,7 +168,7 @@ const struct SpriteTemplate gIcicleSpearSpriteTemplate = .callback = AnimMissileArc, }; -const union AffineAnimCmd gUnknown_08596A8C[] = +static const union AffineAnimCmd sAffineAnim_TailGlowOrb[] = { AFFINEANIMCMD_FRAME(0x10, 0x10, 0, 0), AFFINEANIMCMD_FRAME(0x8, 0x8, 0, 18), @@ -179,23 +179,23 @@ const union AffineAnimCmd gUnknown_08596A8C[] = AFFINEANIMCMD_END, }; -const union AffineAnimCmd *const gUnknown_08596AC4[] = +static const union AffineAnimCmd *const sAffineAnims_TailGlowOrb[] = { - gUnknown_08596A8C, + sAffineAnim_TailGlowOrb, }; -const struct SpriteTemplate gUnknown_08596AC8 = +const struct SpriteTemplate gTailGlowOrbSpriteTemplate = { .tileTag = ANIM_TAG_CIRCLE_OF_LIGHT, .paletteTag = ANIM_TAG_CIRCLE_OF_LIGHT, .oam = &gOamData_AffineNormal_ObjBlend_64x64, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_08596AC4, - .callback = sub_8110994, + .affineAnims = sAffineAnims_TailGlowOrb, + .callback = AnimTailGlowOrb, }; -void sub_8110368(struct Sprite *sprite) +static void AnimMegahornHorn(struct Sprite *sprite) { if (IsContest()) { @@ -223,7 +223,7 @@ void sub_8110368(struct Sprite *sprite) StoreSpriteCallbackInData6(sprite, DestroyAnimSprite); } -void sub_8110438(struct Sprite *sprite) +static void AnimLeechLifeNeedle(struct Sprite *sprite) { if (IsContest()) { @@ -254,7 +254,7 @@ void sub_8110438(struct Sprite *sprite) // arg 2: controls the left-to-right movement // arg 3: amplitude // arg 4: if targets both opponents -void AnimTranslateWebThread(struct Sprite *sprite) +static void AnimTranslateWebThread(struct Sprite *sprite) { if (IsContest()) gBattleAnimArgs[2] /= 2; @@ -276,10 +276,10 @@ void AnimTranslateWebThread(struct Sprite *sprite) sub_80A6FD4(sprite); sprite->data[5] = gBattleAnimArgs[3]; - sprite->callback = sub_811057C; + sprite->callback = AnimTranslateWebThread_Step; } -static void sub_811057C(struct Sprite *sprite) +static void AnimTranslateWebThread_Step(struct Sprite *sprite) { if (AnimTranslateLinear(sprite)) { @@ -291,7 +291,8 @@ static void sub_811057C(struct Sprite *sprite) sprite->data[6] = (sprite->data[6] + 13) & 0xFF; } -void sub_81105B4(struct Sprite *sprite) +// Second stage of String Shot +static void AnimStringWrap(struct Sprite *sprite) { SetAverageBattlerPositions(gBattleAnimTarget, 0, &sprite->pos1.x, &sprite->pos1.y); if (GetBattlerSide(gBattleAnimAttacker)) @@ -303,10 +304,10 @@ void sub_81105B4(struct Sprite *sprite) if (!GetBattlerSide(gBattleAnimTarget)) sprite->pos1.y += 8; - sprite->callback = sub_8110630; + sprite->callback = AnimStringWrap_Step; } -static void sub_8110630(struct Sprite *sprite) +static void AnimStringWrap_Step(struct Sprite *sprite) { if (++sprite->data[0] == 3) { @@ -320,16 +321,16 @@ static void sub_8110630(struct Sprite *sprite) } } -void sub_811067C(struct Sprite *sprite) +static void AnimSpiderWeb(struct Sprite *sprite) { SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT2_ALL | BLDCNT_EFFECT_BLEND); SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(16, 0)); sprite->data[0] = 16; - sprite->callback = sub_81106A4; + sprite->callback = AnimSpiderWeb_Step; } -static void sub_81106A4(struct Sprite *sprite) +static void AnimSpiderWeb_Step(struct Sprite *sprite) { if (sprite->data[2] < 20) { @@ -343,12 +344,12 @@ static void sub_81106A4(struct Sprite *sprite) if (sprite->data[0] == 0) { sprite->invisible = TRUE; - sprite->callback = sub_8110700; + sprite->callback = AnimSpiderWeb_End; } } } -static void sub_8110700(struct Sprite *sprite) +static void AnimSpiderWeb_End(struct Sprite *sprite) { SetGpuReg(REG_OFFSET_BLDCNT, 0); SetGpuReg(REG_OFFSET_BLDALPHA, 0); @@ -362,7 +363,7 @@ static void sub_8110700(struct Sprite *sprite) // arg 2: target x pixel offset // arg 3: target y pixel offset // arg 4: duration -void AnimTranslateStinger(struct Sprite *sprite) +static void AnimTranslateStinger(struct Sprite *sprite) { s16 lVarX, lVarY; u16 rot; @@ -419,7 +420,7 @@ void AnimTranslateStinger(struct Sprite *sprite) // arg 3: target y pixel offset // arg 4: duration // arg 5: wave amplitude -void AnimMissileArc(struct Sprite *sprite) +static void AnimMissileArc(struct Sprite *sprite) { InitSpritePosToAnimAttacker(sprite, 1); @@ -432,11 +433,11 @@ void AnimMissileArc(struct Sprite *sprite) sprite->data[5] = gBattleAnimArgs[5]; InitAnimArcTranslation(sprite); - sprite->callback = AnimMissileArcStep; + sprite->callback = AnimMissileArc_Step; sprite->invisible = TRUE; } -static void AnimMissileArcStep(struct Sprite *sprite) +static void AnimMissileArc_Step(struct Sprite *sprite) { sprite->invisible = FALSE; @@ -473,9 +474,9 @@ static void AnimMissileArcStep(struct Sprite *sprite) } } -void sub_8110994(struct Sprite *sprite) +static void AnimTailGlowOrb(struct Sprite *sprite) { - if (gBattleAnimArgs[0] == 0) + if (gBattleAnimArgs[0] == ANIM_ATTACKER) { sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2); sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3) + 18; diff --git a/src/dark.c b/src/battle_anim_dark.c similarity index 86% rename from src/dark.c rename to src/battle_anim_dark.c index 63a893b67..dc3e8c83c 100644 --- a/src/dark.c +++ b/src/battle_anim_dark.c @@ -9,22 +9,23 @@ #include "util.h" #include "constants/rgb.h" -void sub_81138D4(struct Sprite *); -void sub_81139DC(struct Sprite *); -void sub_8113A90(struct Sprite *); -void sub_81144BC(struct Sprite *); -static void sub_811375C(u8); -static void sub_811381C(u8); +static void sub_81138D4(struct Sprite *); +static void AnimBite(struct Sprite *); +static void AnimTearDrop(struct Sprite *); +static void AnimClawSlash(struct Sprite *); +static void AnimTask_AttackerFadeToInvisible_Step(u8); +static void AnimTask_AttackerFadeFromInvisible_Step(u8); static void sub_8113950(struct Sprite *); -static void sub_8113A18(struct Sprite *); -static void sub_8113A58(struct Sprite *); -static void sub_8113B90(struct Sprite *); -static void sub_8113D60(u8); -static void sub_81140C8(u8); +static void AnimBite_Step1(struct Sprite *); +static void AnimBite_Step2(struct Sprite *); +static void AnimTearDrop_Step(struct Sprite *); +static void AnimTask_MoveAttackerMementoShadow_Step(u8); +static void AnimTask_MoveTargetMementoShadow_Step(u8); static void sub_8114244(struct Task *); static void sub_8114374(u8); -static void sub_8114748(u8); +static void AnimTask_MetallicShine_Step(u8); +// Unused const struct SpriteTemplate gUnknown_08596FC8 = { .tileTag = ANIM_TAG_TIED_BAG, @@ -36,120 +37,120 @@ const struct SpriteTemplate gUnknown_08596FC8 = .callback = sub_81138D4, }; -const union AffineAnimCmd gUnknown_08596FE0[] = +static const union AffineAnimCmd sAffineAnim_Bite_0[] = { AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 1), AFFINEANIMCMD_END, }; -const union AffineAnimCmd gUnknown_08596FF0[] = +static const union AffineAnimCmd sAffineAnim_Bite_1[] = { AFFINEANIMCMD_FRAME(0x0, 0x0, 32, 1), AFFINEANIMCMD_END, }; -const union AffineAnimCmd gUnknown_08597000[] = +static const union AffineAnimCmd sAffineAnim_Bite_2[] = { AFFINEANIMCMD_FRAME(0x0, 0x0, 64, 1), AFFINEANIMCMD_END, }; -const union AffineAnimCmd gUnknown_08597010[] = +static const union AffineAnimCmd sAffineAnim_Bite_3[] = { AFFINEANIMCMD_FRAME(0x0, 0x0, 96, 1), AFFINEANIMCMD_END, }; -const union AffineAnimCmd gUnknown_08597020[] = +static const union AffineAnimCmd sAffineAnim_Bite_4[] = { AFFINEANIMCMD_FRAME(0x0, 0x0, -128, 1), AFFINEANIMCMD_END, }; -const union AffineAnimCmd gUnknown_08597030[] = +static const union AffineAnimCmd sAffineAnim_Bite_5[] = { AFFINEANIMCMD_FRAME(0x0, 0x0, -96, 1), AFFINEANIMCMD_END, }; -const union AffineAnimCmd gUnknown_08597040[] = +static const union AffineAnimCmd sAffineAnim_Bite_6[] = { AFFINEANIMCMD_FRAME(0x0, 0x0, -64, 1), AFFINEANIMCMD_END, }; -const union AffineAnimCmd gUnknown_08597050[] = +static const union AffineAnimCmd sAffineAnim_Bite_7[] = { AFFINEANIMCMD_FRAME(0x0, 0x0, -32, 1), AFFINEANIMCMD_END, }; -const union AffineAnimCmd *const gUnknown_08597060[] = +const union AffineAnimCmd *const gAffineAnims_Bite[] = { - gUnknown_08596FE0, - gUnknown_08596FF0, - gUnknown_08597000, - gUnknown_08597010, - gUnknown_08597020, - gUnknown_08597030, - gUnknown_08597040, - gUnknown_08597050, + sAffineAnim_Bite_0, + sAffineAnim_Bite_1, + sAffineAnim_Bite_2, + sAffineAnim_Bite_3, + sAffineAnim_Bite_4, + sAffineAnim_Bite_5, + sAffineAnim_Bite_6, + sAffineAnim_Bite_7, }; -const struct SpriteTemplate gUnknown_08597080 = +const struct SpriteTemplate gSharpTeethSpriteTemplate = { .tileTag = ANIM_TAG_SHARP_TEETH, .paletteTag = ANIM_TAG_SHARP_TEETH, .oam = &gOamData_AffineNormal_ObjBlend_64x64, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_08597060, - .callback = sub_81139DC, + .affineAnims = gAffineAnims_Bite, + .callback = AnimBite, }; -const struct SpriteTemplate gUnknown_08597098 = +const struct SpriteTemplate gClampJawSpriteTemplate = { .tileTag = ANIM_TAG_CLAMP, .paletteTag = ANIM_TAG_CLAMP, .oam = &gOamData_AffineNormal_ObjBlend_64x64, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_08597060, - .callback = sub_81139DC, + .affineAnims = gAffineAnims_Bite, + .callback = AnimBite, }; -const union AffineAnimCmd gUnknown_085970B0[] = +static const union AffineAnimCmd sAffineAnim_TearDrop_0[] = { AFFINEANIMCMD_FRAME(0xC0, 0xC0, 80, 0), AFFINEANIMCMD_FRAME(0x0, 0x0, -2, 8), AFFINEANIMCMD_END, }; -const union AffineAnimCmd gUnknown_085970C8[] = +static const union AffineAnimCmd sAffineAnim_TearDrop_1[] = { AFFINEANIMCMD_FRAME(0xC0, 0xC0, -80, 0), AFFINEANIMCMD_FRAME(0x0, 0x0, 2, 8), AFFINEANIMCMD_END, }; -const union AffineAnimCmd *const gUnknown_085970E0[] = +static const union AffineAnimCmd *const sAffineAnims_TearDrop[] = { - gUnknown_085970B0, - gUnknown_085970C8, + sAffineAnim_TearDrop_0, + sAffineAnim_TearDrop_1, }; -const struct SpriteTemplate gUnknown_085970E8 = +const struct SpriteTemplate gTearDropSpriteTemplate = { .tileTag = ANIM_TAG_SMALL_BUBBLES, .paletteTag = ANIM_TAG_SMALL_BUBBLES, .oam = &gOamData_AffineNormal_ObjNormal_16x16, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_085970E0, - .callback = sub_8113A90, + .affineAnims = sAffineAnims_TearDrop, + .callback = AnimTearDrop, }; -const union AnimCmd gUnknown_08597100[] = +static const union AnimCmd sAnim_ClawSlash_0[] = { ANIMCMD_FRAME(0, 4), ANIMCMD_FRAME(16, 4), @@ -159,7 +160,7 @@ const union AnimCmd gUnknown_08597100[] = ANIMCMD_END, }; -const union AnimCmd gUnknown_08597118[] = +static const union AnimCmd sAnim_ClawSlash_1[] = { ANIMCMD_FRAME(0, 4, .hFlip = TRUE), ANIMCMD_FRAME(16, 4, .hFlip = TRUE), @@ -169,24 +170,24 @@ const union AnimCmd gUnknown_08597118[] = ANIMCMD_END, }; -const union AnimCmd *const gUnknown_08597130[] = +static const union AnimCmd *const sAnims_ClawSlash[] = { - gUnknown_08597100, - gUnknown_08597118, + sAnim_ClawSlash_0, + sAnim_ClawSlash_1, }; -const struct SpriteTemplate gBattleAnimSpriteTemplate_8597138 = +const struct SpriteTemplate gClawSlashSpriteTemplate = { .tileTag = ANIM_TAG_CLAW_SLASH, .paletteTag = ANIM_TAG_CLAW_SLASH, .oam = &gOamData_AffineOff_ObjNormal_32x32, - .anims = gUnknown_08597130, + .anims = sAnims_ClawSlash, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_81144BC, + .callback = AnimClawSlash, }; -void sub_81136E8(u8 taskId) +void AnimTask_AttackerFadeToInvisible(u8 taskId) { int battler; gTasks[taskId].data[0] = gBattleAnimArgs[0]; @@ -198,10 +199,10 @@ void sub_81136E8(u8 taskId) else SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT2_ALL | BLDCNT_EFFECT_BLEND | BLDCNT_TGT1_BG2); - gTasks[taskId].func = sub_811375C; + gTasks[taskId].func = AnimTask_AttackerFadeToInvisible_Step; } -static void sub_811375C(u8 taskId) +static void AnimTask_AttackerFadeToInvisible_Step(u8 taskId) { u8 blendA = gTasks[taskId].data[1] >> 8; u8 blendB = gTasks[taskId].data[1]; @@ -214,7 +215,7 @@ static void sub_811375C(u8 taskId) gTasks[taskId].data[2] = 0; if (blendA == 16) { - gSprites[gBattlerSpriteIds[gBattleAnimAttacker]].invisible = 1; + gSprites[gBattlerSpriteIds[gBattleAnimAttacker]].invisible = TRUE; DestroyAnimVisualTask(taskId); } } @@ -224,15 +225,15 @@ static void sub_811375C(u8 taskId) } } -void sub_81137E4(u8 taskId) +void AnimTask_AttackerFadeFromInvisible(u8 taskId) { gTasks[taskId].data[0] = gBattleAnimArgs[0]; gTasks[taskId].data[1] = BLDALPHA_BLEND(0, 16); - gTasks[taskId].func = sub_811381C; + gTasks[taskId].func = AnimTask_AttackerFadeFromInvisible_Step; SetGpuReg(REG_OFFSET_BLDALPHA, gTasks[taskId].data[1]); } -static void sub_811381C(u8 taskId) +static void AnimTask_AttackerFadeFromInvisible_Step(u8 taskId) { u8 blendA = gTasks[taskId].data[1] >> 8; u8 blendB = gTasks[taskId].data[1]; @@ -256,7 +257,7 @@ static void sub_811381C(u8 taskId) } } -void sub_8113888(u8 taskId) +void AnimTask_InitAttackerFadeFromInvisible(u8 taskId) { SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(0, 16)); if (GetBattlerSpriteBGPriorityRank(gBattleAnimAttacker) == 1) @@ -267,7 +268,7 @@ void sub_8113888(u8 taskId) DestroyAnimVisualTask(taskId); } -void sub_81138D4(struct Sprite *sprite) +static void sub_81138D4(struct Sprite *sprite) { sprite->data[1] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2); sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); @@ -310,7 +311,8 @@ static void sub_8113950(struct Sprite *sprite) DestroyAnimSprite(sprite); } -void sub_81139DC(struct Sprite *sprite) +// Move sprite inward for Bite/Crunch and Clamp +static void AnimBite(struct Sprite *sprite) { sprite->pos1.x += gBattleAnimArgs[0]; sprite->pos1.y += gBattleAnimArgs[1]; @@ -318,20 +320,20 @@ void sub_81139DC(struct Sprite *sprite) sprite->data[0] = gBattleAnimArgs[3]; sprite->data[1] = gBattleAnimArgs[4]; sprite->data[2] = gBattleAnimArgs[5]; - sprite->callback = sub_8113A18; + sprite->callback = AnimBite_Step1; } -static void sub_8113A18(struct Sprite *sprite) +static void AnimBite_Step1(struct Sprite *sprite) { sprite->data[4] += sprite->data[0]; sprite->data[5] += sprite->data[1]; sprite->pos2.x = sprite->data[4] >> 8; sprite->pos2.y = sprite->data[5] >> 8; if (++sprite->data[3] == sprite->data[2]) - sprite->callback = sub_8113A58; + sprite->callback = AnimBite_Step2; } -static void sub_8113A58(struct Sprite *sprite) +static void AnimBite_Step2(struct Sprite *sprite) { sprite->data[4] -= sprite->data[0]; sprite->data[5] -= sprite->data[1]; @@ -341,12 +343,13 @@ static void sub_8113A58(struct Sprite *sprite) DestroySpriteAndMatrix(sprite); } -void sub_8113A90(struct Sprite *sprite) +// Launches a tear drop away from the battler. Used by Fake Tears +static void AnimTearDrop(struct Sprite *sprite) { u8 battler; s8 xOffset; - if (gBattleAnimArgs[0] == 0) + if (gBattleAnimArgs[0] == ANIM_ATTACKER) battler = gBattleAnimAttacker; else battler = gBattleAnimTarget; @@ -384,16 +387,16 @@ void sub_8113A90(struct Sprite *sprite) sprite->data[5] = -12; InitAnimArcTranslation(sprite); - sprite->callback = sub_8113B90; + sprite->callback = AnimTearDrop_Step; } -static void sub_8113B90(struct Sprite *sprite) +static void AnimTearDrop_Step(struct Sprite *sprite) { if (TranslateAnimHorizontalArc(sprite)) DestroySpriteAndMatrix(sprite); } -void sub_8113BAC(u8 taskId) +void AnimTask_MoveAttackerMementoShadow(u8 taskId) { struct ScanlineEffectParams scanlineParams; struct BattleAnimBgData animBg; @@ -461,10 +464,10 @@ void sub_8113BAC(u8 taskId) gBattle_WIN0H = (task->data[14] << 8) | task->data[15]; gBattle_WIN0V = 160; - task->func = sub_8113D60; + task->func = AnimTask_MoveAttackerMementoShadow_Step; } -static void sub_8113D60(u8 taskId) +static void AnimTask_MoveAttackerMementoShadow_Step(u8 taskId) { struct Task *task = &gTasks[taskId]; @@ -522,7 +525,7 @@ static void sub_8113D60(u8 taskId) } } -void sub_8113E78(u8 taskId) +void AnimTask_MoveTargetMementoShadow(u8 taskId) { struct BattleAnimBgData animBg; struct ScanlineEffectParams scanlineParams; @@ -625,12 +628,12 @@ void sub_8113E78(u8 taskId) task->data[1] = 0; task->data[2] = 0; SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(12, 8)); - task->func = sub_81140C8; + task->func = AnimTask_MoveTargetMementoShadow_Step; break; } } -static void sub_81140C8(u8 taskId) +static void AnimTask_MoveTargetMementoShadow_Step(u8 taskId) { u8 pos; u16 i; @@ -768,16 +771,16 @@ static void sub_8114374(u8 priority) } } -void sub_81143C0(u8 taskId) +void AnimTask_InitMementoShadow(u8 taskId) { u8 toBG2 = GetBattlerSpriteBGPriorityRank(gBattleAnimAttacker) ^ 1 ? 1 : 0; MoveBattlerSpriteToBG(gBattleAnimAttacker, toBG2, TRUE); - gSprites[gBattlerSpriteIds[gBattleAnimAttacker]].invisible = 0; + gSprites[gBattlerSpriteIds[gBattleAnimAttacker]].invisible = FALSE; if (IsBattlerSpriteVisible(BATTLE_PARTNER(gBattleAnimAttacker))) { MoveBattlerSpriteToBG(gBattleAnimAttacker ^ 2, toBG2 ^ 1, TRUE); - gSprites[gBattlerSpriteIds[gBattleAnimAttacker ^ 2]].invisible = 0; + gSprites[gBattlerSpriteIds[gBattleAnimAttacker ^ 2]].invisible = FALSE; } DestroyAnimVisualTask(taskId); @@ -794,7 +797,8 @@ void sub_8114470(u8 taskId) DestroyAnimVisualTask(taskId); } -void sub_81144BC(struct Sprite *sprite) +// Animates a deep slash from a claw. Used by Metal Claw, Dragon Claw, and Crush Claw +static void AnimClawSlash(struct Sprite *sprite) { sprite->pos1.x += gBattleAnimArgs[0]; sprite->pos1.y += gBattleAnimArgs[1]; @@ -877,10 +881,10 @@ void AnimTask_MetallicShine(u8 taskId) gTasks[taskId].data[2] = gBattleAnimArgs[1]; gTasks[taskId].data[3] = gBattleAnimArgs[2]; gTasks[taskId].data[6] = priorityChanged; - gTasks[taskId].func = sub_8114748; + gTasks[taskId].func = AnimTask_MetallicShine_Step; } -static void sub_8114748(u8 taskId) +static void AnimTask_MetallicShine_Step(u8 taskId) { struct BattleAnimBgData animBg; u16 paletteNum; @@ -898,7 +902,7 @@ static void sub_8114748(u8 taskId) spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER); paletteNum = 16 + gSprites[spriteId].oam.paletteNum; if (gTasks[taskId].data[1] == 0) - SetGreyscaleOrOriginalPalette(paletteNum, 1); + SetGreyscaleOrOriginalPalette(paletteNum, TRUE); DestroySprite(&gSprites[gTasks[taskId].data[0]]); sub_80A6B30(&animBg); @@ -925,7 +929,7 @@ static void sub_8114748(u8 taskId) // Changes battler's palette to either greyscale or original. // arg0: which battler -// arg1: 0 grayscale, 1 original +// arg1: FALSE grayscale, TRUE original void AnimTask_SetGreyscaleOrOriginalPal(u8 taskId) { u8 spriteId; @@ -935,10 +939,10 @@ void AnimTask_SetGreyscaleOrOriginalPal(u8 taskId) switch (gBattleAnimArgs[0]) { - case 0: - case 1: - case 2: - case 3: + case ANIM_ATTACKER: + case ANIM_TARGET: + case ANIM_ATK_PARTNER: + case ANIM_DEF_PARTNER: spriteId = GetAnimBattlerSpriteId(gBattleAnimArgs[0]); break; case 4: @@ -977,13 +981,13 @@ void AnimTask_SetGreyscaleOrOriginalPal(u8 taskId) DestroyAnimVisualTask(taskId); } -void sub_8114960(u8 taskId) +void GetIsDoomDesireHitTurn(u8 taskId) { if (gAnimMoveTurn < 2) - gBattleAnimArgs[7] = 0; + gBattleAnimArgs[ARG_RET_ID] = FALSE; if (gAnimMoveTurn == 2) - gBattleAnimArgs[7] = 1; + gBattleAnimArgs[ARG_RET_ID] = TRUE; DestroyAnimVisualTask(taskId); } diff --git a/src/dragon.c b/src/battle_anim_dragon.c similarity index 74% rename from src/dragon.c rename to src/battle_anim_dragon.c index fa91156d4..1d426cac7 100644 --- a/src/dragon.c +++ b/src/battle_anim_dragon.c @@ -5,19 +5,19 @@ #include "trig.h" #include "constants/rgb.h" -void sub_8113064(struct Sprite *); -void sub_81131B4(struct Sprite *); -void sub_8113224(struct Sprite *); -void sub_8113250(struct Sprite *); -void sub_81135EC(struct Sprite *); -static void sub_81132E0(struct Sprite *); -static void sub_81134B8(u8); +static void AnimOutrageFlame(struct Sprite *); +static void AnimDragonRageFirePlume(struct Sprite *); +static void AnimDragonFireToTarget(struct Sprite *); +static void AnimDragonDanceOrb(struct Sprite *); +static void AnimDragonDanceOrb_Step(struct Sprite *); +static void AnimOverheatFlame(struct Sprite *); +static void AnimOverheatFlame_Step(struct Sprite *); +static void AnimTask_DragonDanceWaver_Step(u8); static void sub_8113574(struct Task *); -static void sub_811369C(struct Sprite *); EWRAM_DATA static u16 gUnknown_0203A100[7] = {0}; -const union AnimCmd gUnknown_08596E60[] = +static const union AnimCmd gUnknown_08596E60[] = { ANIMCMD_FRAME(0, 4), ANIMCMD_FRAME(16, 4), @@ -27,12 +27,12 @@ const union AnimCmd gUnknown_08596E60[] = ANIMCMD_JUMP(0), }; -const union AnimCmd *const gUnknown_08596E78[] = +static const union AnimCmd *const gUnknown_08596E78[] = { gUnknown_08596E60, }; -const struct SpriteTemplate gBattleAnimSpriteTemplate_8596E7C = +const struct SpriteTemplate gOutrageFlameSpriteTemplate = { .tileTag = ANIM_TAG_SMALL_EMBER, .paletteTag = ANIM_TAG_SMALL_EMBER, @@ -40,10 +40,10 @@ const struct SpriteTemplate gBattleAnimSpriteTemplate_8596E7C = .anims = gUnknown_08596E78, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_8113064, + .callback = AnimOutrageFlame, }; -const union AnimCmd gUnknown_08596E94[] = +static const union AnimCmd sAnim_DragonBreathFire_0[] = { ANIMCMD_FRAME(16, 3), ANIMCMD_FRAME(32, 3), @@ -51,7 +51,7 @@ const union AnimCmd gUnknown_08596E94[] = ANIMCMD_JUMP(0), }; -const union AnimCmd gUnknown_08596EA4[] = +static const union AnimCmd sAnim_DragonBreathFire_1[] = { ANIMCMD_FRAME(16, 3, .vFlip = TRUE, .hFlip = TRUE), ANIMCMD_FRAME(32, 3, .vFlip = TRUE, .hFlip = TRUE), @@ -59,44 +59,44 @@ const union AnimCmd gUnknown_08596EA4[] = ANIMCMD_JUMP(0), }; -const union AnimCmd *const gUnknown_08596EB4[] = +static const union AnimCmd *const sAnims_DragonBreathFire[] = { - gUnknown_08596E94, - gUnknown_08596EA4, + sAnim_DragonBreathFire_0, + sAnim_DragonBreathFire_1, }; -const union AffineAnimCmd gUnknown_08596EBC[] = +static const union AffineAnimCmd sAffineAnim_DragonBreathFire_0[] = { AFFINEANIMCMD_FRAME(0x50, 0x50, 127, 0), AFFINEANIMCMD_FRAME(0xD, 0xD, 0, 100), AFFINEANIMCMD_END, }; -const union AffineAnimCmd gUnknown_08596ED4[] = +static const union AffineAnimCmd sAffineAnim_DragonBreathFire_1[] = { AFFINEANIMCMD_FRAME(0x50, 0x50, 0, 0), AFFINEANIMCMD_FRAME(0xD, 0xD, 0, 100), AFFINEANIMCMD_END, }; -const union AffineAnimCmd *const gUnknown_08596EEC[] = +static const union AffineAnimCmd *const sAffineAnims_DragonBreathFire[] = { - gUnknown_08596EBC, - gUnknown_08596ED4, + sAffineAnim_DragonBreathFire_0, + sAffineAnim_DragonBreathFire_1, }; -const struct SpriteTemplate gUnknown_08596EF4 = +const struct SpriteTemplate gDragonBreathFireSpriteTemplate = { .tileTag = ANIM_TAG_SMALL_EMBER, .paletteTag = ANIM_TAG_SMALL_EMBER, .oam = &gOamData_AffineDouble_ObjNormal_32x32, - .anims = gUnknown_08596EB4, + .anims = sAnims_DragonBreathFire, .images = NULL, - .affineAnims = gUnknown_08596EEC, - .callback = sub_8113224, + .affineAnims = sAffineAnims_DragonBreathFire, + .callback = AnimDragonFireToTarget, }; -const union AnimCmd gUnknown_08596F0C[] = +static const union AnimCmd sAnim_DragonRageFirePlume[] = { ANIMCMD_FRAME(0, 5), ANIMCMD_FRAME(16, 5), @@ -106,23 +106,23 @@ const union AnimCmd gUnknown_08596F0C[] = ANIMCMD_END, }; -const union AnimCmd *const gUnknown_08596F24[] = +static const union AnimCmd *const sAnims_DragonRageFirePlume[] = { - gUnknown_08596F0C, + sAnim_DragonRageFirePlume, }; -const struct SpriteTemplate gUnknown_08596F28 = +const struct SpriteTemplate gDragonRageFirePlumeSpriteTemplate = { .tileTag = ANIM_TAG_FIRE_PLUME, .paletteTag = ANIM_TAG_FIRE_PLUME, .oam = &gOamData_AffineOff_ObjNormal_32x32, - .anims = gUnknown_08596F24, + .anims = sAnims_DragonRageFirePlume, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_81131B4, + .callback = AnimDragonRageFirePlume, }; -const union AnimCmd gUnknown_08596F40[] = +static const union AnimCmd sAnim_DragonRageFire[] = { ANIMCMD_FRAME(16, 3), ANIMCMD_FRAME(32, 3), @@ -130,42 +130,42 @@ const union AnimCmd gUnknown_08596F40[] = ANIMCMD_JUMP(0), }; -const union AnimCmd *const gUnknown_08596F50[] = +static const union AnimCmd *const sAnims_DragonRageFire[] = { - gUnknown_08596F40, - gUnknown_08596F40, + sAnim_DragonRageFire, + sAnim_DragonRageFire, }; -const union AffineAnimCmd gUnknown_08596F58[] = +static const union AffineAnimCmd sAffineAnim_DragonRageFire_0[] = { AFFINEANIMCMD_FRAME(0x64, 0x64, 127, 1), AFFINEANIMCMD_END, }; -const union AffineAnimCmd gUnknown_08596F68[] = +static const union AffineAnimCmd sAffineAnim_DragonRageFire_1[] = { AFFINEANIMCMD_FRAME(0x64, 0x64, 0, 1), AFFINEANIMCMD_END, }; -const union AffineAnimCmd *const gUnknown_08596F78[] = +static const union AffineAnimCmd *const sAffineAnims_DragonRageFire[] = { - gUnknown_08596F58, - gUnknown_08596F68, + sAffineAnim_DragonRageFire_0, + sAffineAnim_DragonRageFire_1, }; -const struct SpriteTemplate gUnknown_08596F80 = +const struct SpriteTemplate gDragonRageFireSpitSpriteTemplate = { .tileTag = ANIM_TAG_SMALL_EMBER, .paletteTag = ANIM_TAG_SMALL_EMBER, .oam = &gOamData_AffineDouble_ObjNormal_32x32, - .anims = gUnknown_08596F50, + .anims = sAnims_DragonRageFire, .images = NULL, - .affineAnims = gUnknown_08596F78, - .callback = sub_8113224, + .affineAnims = sAffineAnims_DragonRageFire, + .callback = AnimDragonFireToTarget, }; -const struct SpriteTemplate gUnknown_08596F98 = +const struct SpriteTemplate gDragonDanceOrbSpriteTemplate = { .tileTag = ANIM_TAG_HOLLOW_ORB, .paletteTag = ANIM_TAG_HOLLOW_ORB, @@ -173,10 +173,10 @@ const struct SpriteTemplate gUnknown_08596F98 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_8113250, + .callback = AnimDragonDanceOrb, }; -const struct SpriteTemplate gUnknown_08596FB0 = +const struct SpriteTemplate gOverheatFlameSpriteTemplate = { .tileTag = ANIM_TAG_SMALL_EMBER, .paletteTag = ANIM_TAG_SMALL_EMBER, @@ -184,10 +184,10 @@ const struct SpriteTemplate gUnknown_08596FB0 = .anims = gUnknown_08596E78, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_81135EC, + .callback = AnimOverheatFlame, }; -void sub_8113064(struct Sprite *sprite) +static void AnimOutrageFlame(struct Sprite *sprite) { sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2); sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3); @@ -207,7 +207,7 @@ void sub_8113064(struct Sprite *sprite) sprite->data[1] = gBattleAnimArgs[3]; sprite->data[3] = gBattleAnimArgs[4]; sprite->data[5] = gBattleAnimArgs[5]; - sprite->invisible = 1; + sprite->invisible = TRUE; StoreSpriteCallbackInData6(sprite, DestroySpriteAndMatrix); sprite->callback = TranslateSpriteLinearAndFlicker; } @@ -238,7 +238,7 @@ static void sub_8113100(struct Sprite *sprite) StoreSpriteCallbackInData6(sprite, DestroySpriteAndMatrix); } -void sub_81131B4(struct Sprite *sprite) +static void AnimDragonRageFirePlume(struct Sprite *sprite) { if (gBattleAnimArgs[0] == 0) { @@ -257,7 +257,8 @@ void sub_81131B4(struct Sprite *sprite) StoreSpriteCallbackInData6(sprite, DestroySpriteAndMatrix); } -void sub_8113224(struct Sprite *sprite) +// For Dragon Breath and Dragon Rage +static void AnimDragonFireToTarget(struct Sprite *sprite) { if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER) StartSpriteAffineAnim(sprite, 1); @@ -265,7 +266,7 @@ void sub_8113224(struct Sprite *sprite) sub_8113100(sprite); } -void sub_8113250(struct Sprite *sprite) +static void AnimDragonDanceOrb(struct Sprite *sprite) { u16 r5; u16 r0; @@ -282,10 +283,10 @@ void sub_8113250(struct Sprite *sprite) sprite->data[7] = r0 / 2; sprite->pos2.x = Cos(sprite->data[6], sprite->data[7]); sprite->pos2.y = Sin(sprite->data[6], sprite->data[7]); - sprite->callback = sub_81132E0; + sprite->callback = AnimDragonDanceOrb_Step; } -static void sub_81132E0(struct Sprite *sprite) +static void AnimDragonDanceOrb_Step(struct Sprite *sprite) { switch (sprite->data[0]) { @@ -323,7 +324,9 @@ static void sub_81132E0(struct Sprite *sprite) } } -void sub_81133E8(u8 taskId) +// Wavers the attacker back and forth. Progressing vertical wave of scanline shifts +// Used by Dragon Dance +void AnimTask_DragonDanceWaver(u8 taskId) { struct ScanlineEffectParams sp; struct Task *task = &gTasks[taskId]; @@ -356,10 +359,10 @@ void sub_81133E8(u8 taskId) } ScanlineEffect_SetParams(sp); - task->func = sub_81134B8; + task->func = AnimTask_DragonDanceWaver_Step; } -static void sub_81134B8(u8 taskId) +static void AnimTask_DragonDanceWaver_Step(u8 taskId) { struct Task *task = &gTasks[taskId]; switch (task->data[0]) @@ -410,7 +413,7 @@ static void sub_8113574(struct Task *task) task->data[5] = (task->data[5] + 9) & 0xFF; } -void sub_81135EC(struct Sprite *sprite) +static void AnimOverheatFlame(struct Sprite *sprite) { int r6 = (gBattleAnimArgs[2] * 3) / 5; int i; @@ -421,12 +424,12 @@ void sub_81135EC(struct Sprite *sprite) sprite->pos1.x += sprite->data[1] * gBattleAnimArgs[0]; sprite->pos1.y += sprite->data[2] * gBattleAnimArgs[0]; sprite->data[3] = gBattleAnimArgs[3]; - sprite->callback = sub_811369C; + sprite->callback = AnimOverheatFlame_Step; for (i = 0; i < 7; i++) gUnknown_0203A100[i] = sprite->data[i]; } -static void sub_811369C(struct Sprite *sprite) +static void AnimOverheatFlame_Step(struct Sprite *sprite) { sprite->data[4] += sprite->data[1]; sprite->data[5] += sprite->data[2]; diff --git a/src/battle_anim_effects_1.c b/src/battle_anim_effects_1.c index 1efb29ecd..516c58e55 100644 --- a/src/battle_anim_effects_1.c +++ b/src/battle_anim_effects_1.c @@ -18,137 +18,139 @@ EWRAM_DATA s16 gUnknown_0203A0F8[4] = {0}; -void AnimMovePowderParticle(struct Sprite *); -void AnimPowerAbsorptionOrb(struct Sprite *); -void AnimSolarbeamBigOrb(struct Sprite *); -void AnimSolarbeamSmallOrb(struct Sprite *); -void AnimAbsorptionOrb(struct Sprite *); -void AnimHyperBeamOrb(struct Sprite *); -void AnimSporeParticle(struct Sprite *); -void AnimPetalDanceBigFlower(struct Sprite *); -void AnimPetalDanceSmallFlower(struct Sprite *); -void AnimRazorLeafParticle(struct Sprite *); -void AnimLeechSeed(struct Sprite *); -void AnimTranslateLinearSingleSineWave(struct Sprite *); -void AnimMoveTwisterParticle(struct Sprite *); -void AnimConstrictBinding(struct Sprite *); -void AnimMimicOrb(struct Sprite *); -void AnimIngrainRoot(struct Sprite *); -void AnimFrenzyPlantRoot(struct Sprite *); -void AnimIngrainOrb(struct Sprite *); -void AnimPresent(struct Sprite *); -void AnimKnockOffItem(struct Sprite *); -void AnimPresentHealParticle(struct Sprite *); -void AnimItemSteal(struct Sprite *); -void AnimTrickBag(struct Sprite *); -void AnimFlyingParticle(struct Sprite *); -void AnimNeedleArmSpike(struct Sprite *); -void sub_81009F8(struct Sprite *); -void AnimWhipHit(struct Sprite *); -void sub_8100A94(struct Sprite *); -void AnimCuttingSlice(struct Sprite *); -void AnimAirCutterSlice(struct Sprite *); -void sub_8100E1C(struct Sprite *); -void AnimProtect(struct Sprite *); -void AnimMilkBottle(struct Sprite *); -void AnimGrantingStars(struct Sprite *); -void AnimSparkingStars(struct Sprite *); -void sub_8101440(struct Sprite *); -void AnimSleepLetterZ(struct Sprite *); -void AnimLockOnTarget(struct Sprite *); -void AnimLockOnMoveTarget(struct Sprite *); -void AnimBowMon(struct Sprite *); -void sub_8101B90(struct Sprite *); -void AnimSlashSlice(struct Sprite *); -void AnimFalseSwipeSlice(struct Sprite *); -void AnimFalseSwipePositionedSlice(struct Sprite *); -void AnimEndureEnergy(struct Sprite *); -void AnimSharpenSphere(struct Sprite *); -void AnimConversion(struct Sprite *); -void AnimConversion2(struct Sprite *); -void AnimMoon(struct Sprite *); -void AnimMoonlightSparkle(struct Sprite *); -void AnimHornHit(struct Sprite *); -void AnimSuperFang(struct Sprite *); -void AnimWavyMusicNotes(struct Sprite *); -void AnimFlyingMusicNotes(struct Sprite *); -void AnimBellyDrumHand(struct Sprite *); -void AnimSlowFlyingMusicNotes(struct Sprite *); -void AnimThoughtBubble(struct Sprite *); -void AnimMetronomeFinger(struct Sprite *); -void AnimFollowMeFinger(struct Sprite *); -void AnimTauntFinger(struct Sprite *); -static void AnimMovePowderParticleStep(struct Sprite *); -static void AnimSolarbeamSmallOrbStep(struct Sprite *); -static void AnimAbsorptionOrbStep(struct Sprite *); -static void AnimHyperBeamOrbStep(struct Sprite *); -static void AnimLeechSeedStep(struct Sprite *); +static void AnimMovePowderParticle(struct Sprite *); +static void AnimMovePowderParticle_Step(struct Sprite *); +static void AnimPowerAbsorptionOrb(struct Sprite *); +static void AnimSolarbeamBigOrb(struct Sprite *); +static void AnimSolarbeamSmallOrb(struct Sprite *); +static void AnimSolarbeamSmallOrb_Step(struct Sprite *); +static void AnimAbsorptionOrb(struct Sprite *); +static void AnimAbsorptionOrb_Step(struct Sprite *); +static void AnimHyperBeamOrb(struct Sprite *); +static void AnimHyperBeamOrb_Step(struct Sprite *); +static void AnimSporeParticle(struct Sprite *); +static void AnimSporeParticle_Step(struct Sprite *); +static void AnimPetalDanceBigFlower(struct Sprite *); +static void AnimPetalDanceBigFlower_Step(struct Sprite *); +static void AnimPetalDanceSmallFlower(struct Sprite *); +static void AnimPetalDanceSmallFlower_Step(struct Sprite *); +static void AnimRazorLeafParticle(struct Sprite *); +static void AnimRazorLeafParticle_Step1(struct Sprite *); +static void AnimRazorLeafParticle_Step2(struct Sprite *); +static void AnimLeechSeed(struct Sprite *); +static void AnimLeechSeed_Step(struct Sprite *); static void AnimLeechSeedSprouts(struct Sprite *); -static void AnimSporeParticleStep(struct Sprite *); -static void AnimPetalDanceBigFlowerStep(struct Sprite *); -static void AnimPetalDanceSmallFlowerStep(struct Sprite *); -static void AnimRazorLeafParticleStep1(struct Sprite *); -static void AnimRazorLeafParticleStep2(struct Sprite *); -static void AnimTranslateLinearSingleSineWaveStep(struct Sprite *); -static void AnimMoveTwisterParticleStep(struct Sprite *); -static void AnimConstrictBindingStep1(struct Sprite *); -static void AnimConstrictBindingStep2(struct Sprite *); -static void AnimTask_DuplicateAndShrinkToPosStep1(u8); -static void AnimTask_DuplicateAndShrinkToPosStep2(u8); -static void AnimItemStealStep3(struct Sprite *); +static void AnimTranslateLinearSingleSineWave(struct Sprite *); +static void AnimTranslateLinearSingleSineWave_Step(struct Sprite *); +static void AnimConstrictBinding(struct Sprite *); +static void AnimConstrictBinding_Step1(struct Sprite *); +static void AnimConstrictBinding_Step2(struct Sprite *); +static void AnimMimicOrb(struct Sprite *); +static void AnimIngrainRoot(struct Sprite *); +static void AnimFrenzyPlantRoot(struct Sprite *); static void AnimRootFlickerOut(struct Sprite *); -static void AnimTrickBagStep1(struct Sprite *); -static void AnimTrickBagStep2(struct Sprite *); -static void AnimTrickBagStep3(struct Sprite *); -static void AnimTask_LeafBladeStep(u8); -static s16 LeafBladeGetPosFactor(struct Sprite *); -static void AnimTask_LeafBladeStep2(struct Task *, u8); -static void AnimTask_LeafBladeStep2_Callback(struct Sprite *); -static void AnimFlyingParticleStep(struct Sprite *); -static void AnimNeedleArmSpikeStep(struct Sprite *); -static void AnimSliceStep(struct Sprite *); +static void AnimIngrainOrb(struct Sprite *); +static void AnimPresent(struct Sprite *); +static void AnimKnockOffItem(struct Sprite *); +static void AnimPresentHealParticle(struct Sprite *); +static void AnimItemSteal(struct Sprite *); +static void AnimItemSteal_Step1(struct Sprite *); +static void AnimItemSteal_Step2(struct Sprite *); +static void AnimItemSteal_Step3(struct Sprite *); +static void AnimTrickBag(struct Sprite *); +static void AnimTrickBag_Step1(struct Sprite *); +static void AnimTrickBag_Step2(struct Sprite *); +static void AnimTrickBag_Step3(struct Sprite *); +static void AnimFlyingParticle(struct Sprite *); +static void AnimFlyingParticle_Step(struct Sprite *); +static void AnimNeedleArmSpike(struct Sprite *); +static void AnimNeedleArmSpike_Step(struct Sprite *); +static void sub_81009F8(struct Sprite *); +static void AnimWhipHit(struct Sprite *); +static void sub_8100A94(struct Sprite *); +static void AnimCuttingSlice(struct Sprite *); +static void AnimAirCutterSlice(struct Sprite *); +static void AnimSlice_Step(struct Sprite *); +static void sub_8100E1C(struct Sprite *); static void sub_8100E80(struct Sprite *); -static void AnimProtectStep(struct Sprite *); -static void AnimMilkBottleStep1(struct Sprite *); -static void AnimMilkBottleStep2(struct Sprite *, int, int); +static void AnimProtect(struct Sprite *); +static void AnimProtect_Step(struct Sprite *); +static void AnimMilkBottle(struct Sprite *); +static void AnimMilkBottle_Step1(struct Sprite *); +static void AnimMilkBottle_Step2(struct Sprite *, int, int); +static void AnimGrantingStars(struct Sprite *); +static void AnimSparkingStars(struct Sprite *); +static void sub_8101440(struct Sprite *); static void sub_81014A0(struct Sprite *); -static void AnimSleepLetterZStep(struct Sprite *); -static void AnimLockOnTargetStep1(struct Sprite *); -static void AnimLockOnTargetStep2(struct Sprite *); -static void AnimLockOnTargetStep3(struct Sprite *); -static void AnimLockOnTargetStep4(struct Sprite *); -static void AnimLockOnTargetStep5(struct Sprite *); -static void AnimLockOnTargetStep6(struct Sprite *); -static void AnimBowMonStep1(struct Sprite *); -static void AnimBowMonStep1_Callback(struct Sprite *); -static void AnimBowMonStep2(struct Sprite *); -static void AnimBowMonStep3(struct Sprite *); -static void AnimBowMonStep4(struct Sprite *); -static void AnimBowMonStep3_Callback(struct Sprite *); +static void AnimSleepLetterZ(struct Sprite *); +static void AnimSleepLetterZ_Step(struct Sprite *); +static void AnimLockOnTarget(struct Sprite *); +static void AnimLockOnTarget_Step1(struct Sprite *); +static void AnimLockOnTarget_Step2(struct Sprite *); +static void AnimLockOnTarget_Step3(struct Sprite *); +static void AnimLockOnTarget_Step4(struct Sprite *); +static void AnimLockOnTarget_Step5(struct Sprite *); +static void AnimLockOnTarget_Step6(struct Sprite *); +static void AnimLockOnMoveTarget(struct Sprite *); +static void AnimBowMon(struct Sprite *); +static void AnimBowMon_Step1(struct Sprite *); +static void AnimBowMon_Step1_Callback(struct Sprite *); +static void AnimBowMon_Step2(struct Sprite *); +static void AnimBowMon_Step3(struct Sprite *); +static void AnimBowMon_Step4(struct Sprite *); +static void AnimBowMon_Step3_Callback(struct Sprite *); +static void sub_8101B90(struct Sprite *); static void sub_8101BA0(struct Sprite *); +static void AnimSlashSlice(struct Sprite *); +static void AnimFalseSwipeSlice(struct Sprite *); +static void AnimFalseSwipeSlice_Step1(struct Sprite *); +static void AnimFalseSwipeSlice_Step2(struct Sprite *); +static void AnimFalseSwipeSlice_Step3(struct Sprite *); +static void AnimFalseSwipePositionedSlice(struct Sprite *); +static void AnimEndureEnergy(struct Sprite *); +static void AnimEndureEnergy_Step(struct Sprite *); +static void AnimSharpenSphere(struct Sprite *); +static void AnimSharpenSphere_Step(struct Sprite *); +static void AnimConversion(struct Sprite *); +static void AnimConversion2(struct Sprite *); +static void AnimConversion2_Step(struct Sprite *); +static void AnimMoon(struct Sprite *); +static void AnimMoon_Step(struct Sprite *); +static void AnimMoonlightSparkle(struct Sprite *); +static void AnimMoonlightSparkle_Step(struct Sprite *); +static void AnimHornHit(struct Sprite *); +static void AnimHornHit_Step(struct Sprite *); +static void AnimSuperFang(struct Sprite *); +static void AnimWavyMusicNotes(struct Sprite *); +static void AnimWavyMusicNotes_Step(struct Sprite *); +static void AnimWavyMusicNotesGetNextPos(s16, s16, s16 *, s16 *, s8); +static void AnimFlyingMusicNotes(struct Sprite *); +static void AnimFlyingMusicNotes_Step(struct Sprite *); +static void AnimBellyDrumHand(struct Sprite *); +static void AnimSlowFlyingMusicNotes(struct Sprite *); +static void AnimSlowFlyingMusicNotes_Step(struct Sprite *); +static void AnimThoughtBubble(struct Sprite *); +static void AnimThoughtBubble_Step(struct Sprite *); +static void AnimMetronomeFinger(struct Sprite *); +static void AnimMetronomeFinger_Step(struct Sprite *); +static void AnimFollowMeFinger(struct Sprite *); +static void AnimFollowMeFinger_Step1(struct Sprite *); +static void AnimFollowMeFinger_Step2(struct Sprite *); +static void AnimTauntFinger(struct Sprite *); +static void AnimTauntFinger_Step1(struct Sprite *); +static void AnimTauntFinger_Step2(struct Sprite *); +static void AnimMoveTwisterParticle_Step(struct Sprite *); +static void AnimTask_MoonlightEndFade_Step(u8 taskId); +static void AnimTask_LeafBlade_Step(u8); +static void AnimTask_DuplicateAndShrinkToPos_Step1(u8); +static void AnimTask_DuplicateAndShrinkToPos_Step2(u8); +static s16 LeafBladeGetPosFactor(struct Sprite *); +static void AnimTask_LeafBlade_Step2(struct Task *, u8); +static void AnimTask_LeafBlade_Step2_Callback(struct Sprite *); static void AnimTask_SkullBashPositionSet(u8); static void AnimTask_SkullBashPositionReset(u8); -static void AnimFalseSwipeSliceStep1(struct Sprite *); -static void AnimFalseSwipeSliceStep2(struct Sprite *); -static void AnimFalseSwipeSliceStep3(struct Sprite *); -static void AnimEndureEnergyStep(struct Sprite *); -static void AnimSharpenSphereStep(struct Sprite *); -static void AnimConversion2Step(struct Sprite *); -static void AnimMoonStep(struct Sprite *); -static void AnimMoonlightSparkleStep(struct Sprite *); -static void AnimHornHitStep(struct Sprite *); -static void AnimTask_DoubleTeamStep(u8); -static void AnimTask_DoubleTeamCallback(struct Sprite *); -static void AnimWavyMusicNotesGetNextPos(s16, s16, s16 *, s16 *, s8); -static void AnimWavyMusicNotesStep(struct Sprite *); -static void AnimFlyingMusicNotesStep(struct Sprite *); -static void AnimSlowFlyingMusicNotesStep(struct Sprite *); -static void AnimThoughtBubbleStep(struct Sprite *); -static void AnimMetronomeFingerStep(struct Sprite *); -static void AnimFollowMeFingerStep1(struct Sprite *); -static void AnimFollowMeFingerStep2(struct Sprite *); -static void AnimTauntFingerStep1(struct Sprite *); -static void AnimTauntFingerStep2(struct Sprite *); +static void AnimTask_DoubleTeam_Step(u8); +static void AnimDoubleTeam(struct Sprite *); const union AnimCmd gPowderParticlesAnimCmds[] = { @@ -513,7 +515,7 @@ const struct SpriteTemplate gRazorLeafParticleSpriteTemplate = .callback = AnimRazorLeafParticle, }; -const struct SpriteTemplate gTwisterLeafParticleSpriteTemplate = +const struct SpriteTemplate gTwisterLeafSpriteTemplate = { .tileTag = ANIM_TAG_LEAF, .paletteTag = ANIM_TAG_LEAF, @@ -1328,7 +1330,7 @@ const struct SpriteTemplate gUnknown_08592AC4 = .callback = sub_8100E1C, }; -const struct SpriteTemplate gUnknown_08592ADC = +const struct SpriteTemplate gProtectSpriteTemplate = { .tileTag = ANIM_TAG_PROTECT, .paletteTag = ANIM_TAG_PROTECT, @@ -2189,7 +2191,7 @@ const struct SpriteTemplate gTauntFingerSpriteTemplate = // arg 3: vertical movement speed (sub-pixel value) // arg 4: wave amplitude // arg 5: wave speed -void AnimMovePowderParticle(struct Sprite* sprite) +static void AnimMovePowderParticle(struct Sprite* sprite) { sprite->pos1.x += gBattleAnimArgs[0]; sprite->pos1.y += gBattleAnimArgs[1]; @@ -2206,10 +2208,10 @@ void AnimMovePowderParticle(struct Sprite* sprite) } sprite->data[4] = gBattleAnimArgs[5]; - sprite->callback = AnimMovePowderParticleStep; + sprite->callback = AnimMovePowderParticle_Step; } -static void AnimMovePowderParticleStep(struct Sprite* sprite) +static void AnimMovePowderParticle_Step(struct Sprite* sprite) { if (sprite->data[0] > 0) { @@ -2229,7 +2231,7 @@ static void AnimMovePowderParticleStep(struct Sprite* sprite) // arg 0: initial x pixel offset // arg 1: initial y pixel offset // arg 2: duration -void AnimPowerAbsorptionOrb(struct Sprite* sprite) +static void AnimPowerAbsorptionOrb(struct Sprite* sprite) { InitSpritePosToAnimAttacker(sprite, TRUE); sprite->data[0] = gBattleAnimArgs[2]; @@ -2244,7 +2246,7 @@ void AnimPowerAbsorptionOrb(struct Sprite* sprite) // arg 1: initial y pixel offset // arg 2: duration // arg 3: sprite anim number -void AnimSolarbeamBigOrb(struct Sprite* sprite) +static void AnimSolarbeamBigOrb(struct Sprite* sprite) { InitSpritePosToAnimAttacker(sprite, TRUE); StartSpriteAnim(sprite, gBattleAnimArgs[3]); @@ -2261,7 +2263,7 @@ void AnimSolarbeamBigOrb(struct Sprite* sprite) // arg 1: initial y pixel offset // arg 2: duration // arg 3: initial wave offset -void AnimSolarbeamSmallOrb(struct Sprite* sprite) +static void AnimSolarbeamSmallOrb(struct Sprite* sprite) { InitSpritePosToAnimAttacker(sprite, TRUE); sprite->data[0] = gBattleAnimArgs[2]; @@ -2271,11 +2273,11 @@ void AnimSolarbeamSmallOrb(struct Sprite* sprite) sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET); InitAnimLinearTranslation(sprite); sprite->data[5] = gBattleAnimArgs[3]; - sprite->callback = AnimSolarbeamSmallOrbStep; + sprite->callback = AnimSolarbeamSmallOrb_Step; sprite->callback(sprite); } -static void AnimSolarbeamSmallOrbStep(struct Sprite* sprite) +static void AnimSolarbeamSmallOrb_Step(struct Sprite* sprite) { if (AnimTranslateLinear(sprite)) { @@ -2319,7 +2321,7 @@ void AnimTask_CreateSmallSolarbeamOrbs(u8 taskId) // arg 1: initial y pixel offset // arg 2: wave amplitude // arg 3: wave period (lower means faster wave) -void AnimAbsorptionOrb(struct Sprite* sprite) +static void AnimAbsorptionOrb(struct Sprite* sprite) { InitSpritePosToAnimTarget(sprite, TRUE); sprite->data[0] = gBattleAnimArgs[3]; @@ -2327,10 +2329,10 @@ void AnimAbsorptionOrb(struct Sprite* sprite) sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET); sprite->data[5] = gBattleAnimArgs[2]; InitAnimArcTranslation(sprite); - sprite->callback = AnimAbsorptionOrbStep; + sprite->callback = AnimAbsorptionOrb_Step; } -static void AnimAbsorptionOrbStep(struct Sprite* sprite) +static void AnimAbsorptionOrb_Step(struct Sprite* sprite) { if (TranslateAnimHorizontalArc(sprite)) DestroyAnimSprite(sprite); @@ -2338,7 +2340,7 @@ static void AnimAbsorptionOrbStep(struct Sprite* sprite) // Moves an orb in a wave-like fashion towards the target mon. The wave's // properties and the sprite anim are randomly determined. -void AnimHyperBeamOrb(struct Sprite* sprite) +static void AnimHyperBeamOrb(struct Sprite* sprite) { u16 speed; u16 animNum = Random2(); @@ -2360,11 +2362,11 @@ void AnimHyperBeamOrb(struct Sprite* sprite) InitAnimFastLinearTranslationWithSpeed(sprite); sprite->data[5] = Random2() & 0xFF; sprite->data[6] = sprite->subpriority; - sprite->callback = AnimHyperBeamOrbStep; + sprite->callback = AnimHyperBeamOrb_Step; sprite->callback(sprite); } -static void AnimHyperBeamOrbStep(struct Sprite* sprite) +static void AnimHyperBeamOrb_Step(struct Sprite* sprite) { if (AnimFastTranslateLinear(sprite)) { @@ -2391,7 +2393,7 @@ static void AnimHyperBeamOrbStep(struct Sprite* sprite) // arg 3: target y pixel offset // arg 4: duration // arg 5: wave amplitude -void AnimLeechSeed(struct Sprite* sprite) +static void AnimLeechSeed(struct Sprite* sprite) { InitSpritePosToAnimAttacker(sprite, TRUE); if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER) @@ -2402,14 +2404,14 @@ void AnimLeechSeed(struct Sprite* sprite) sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y) + gBattleAnimArgs[3]; sprite->data[5] = gBattleAnimArgs[5]; InitAnimArcTranslation(sprite); - sprite->callback = AnimLeechSeedStep; + sprite->callback = AnimLeechSeed_Step; } -static void AnimLeechSeedStep(struct Sprite* sprite) +static void AnimLeechSeed_Step(struct Sprite* sprite) { if (TranslateAnimHorizontalArc(sprite)) { - sprite->invisible = 1; + sprite->invisible = TRUE; sprite->data[0] = 10; sprite->callback = WaitAnimForDuration; StoreSpriteCallbackInData6(sprite, AnimLeechSeedSprouts); @@ -2418,7 +2420,7 @@ static void AnimLeechSeedStep(struct Sprite* sprite) static void AnimLeechSeedSprouts(struct Sprite* sprite) { - sprite->invisible = 0; + sprite->invisible = FALSE; StartSpriteAnim(sprite, 1); sprite->data[0] = 60; sprite->callback = WaitAnimForDuration; @@ -2433,7 +2435,7 @@ static void AnimLeechSeedSprouts(struct Sprite* sprite) // arg 2: initial wave offset // arg 3: duration // arg 4: blend (0 = off, 1 = on) -void AnimSporeParticle(struct Sprite* sprite) +static void AnimSporeParticle(struct Sprite* sprite) { InitSpritePosToAnimTarget(sprite, TRUE); StartSpriteAnim(sprite, gBattleAnimArgs[4]); @@ -2442,11 +2444,11 @@ void AnimSporeParticle(struct Sprite* sprite) sprite->data[0] = gBattleAnimArgs[3]; sprite->data[1] = gBattleAnimArgs[2]; - sprite->callback = AnimSporeParticleStep; + sprite->callback = AnimSporeParticle_Step; sprite->callback(sprite); } -static void AnimSporeParticleStep(struct Sprite* sprite) +static void AnimSporeParticle_Step(struct Sprite* sprite) { sprite->pos2.x = Sin(sprite->data[1], 32); sprite->pos2.y = Cos(sprite->data[1], -3) + ((sprite->data[2] += 24) >> 8); @@ -2495,7 +2497,7 @@ void AnimTask_SporeDoubleBattle(u8 taskId) // arg 1: initial y pixel offset // arg 2: target y pixel offset // arg 3: duration -void AnimPetalDanceBigFlower(struct Sprite* sprite) +static void AnimPetalDanceBigFlower(struct Sprite* sprite) { InitSpritePosToAnimAttacker(sprite, FALSE); sprite->data[0] = gBattleAnimArgs[3]; @@ -2505,11 +2507,11 @@ void AnimPetalDanceBigFlower(struct Sprite* sprite) sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET) + gBattleAnimArgs[2]; InitAnimLinearTranslation(sprite); sprite->data[5] = 0x40; - sprite->callback = AnimPetalDanceBigFlowerStep; + sprite->callback = AnimPetalDanceBigFlower_Step; sprite->callback(sprite); } -static void AnimPetalDanceBigFlowerStep(struct Sprite* sprite) +static void AnimPetalDanceBigFlower_Step(struct Sprite* sprite) { if (!AnimTranslateLinear(sprite)) { @@ -2533,7 +2535,7 @@ static void AnimPetalDanceBigFlowerStep(struct Sprite* sprite) // arg 1: initial y pixel offset // arg 2: target y pixel offset // arg 3: duration -void AnimPetalDanceSmallFlower(struct Sprite* sprite) +static void AnimPetalDanceSmallFlower(struct Sprite* sprite) { InitSpritePosToAnimAttacker(sprite, TRUE); sprite->data[0] = gBattleAnimArgs[3]; @@ -2543,11 +2545,11 @@ void AnimPetalDanceSmallFlower(struct Sprite* sprite) sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimAttacker, 3) + gBattleAnimArgs[2]; InitAnimLinearTranslation(sprite); sprite->data[5] = 0x40; - sprite->callback = AnimPetalDanceSmallFlowerStep; + sprite->callback = AnimPetalDanceSmallFlower_Step; sprite->callback(sprite); } -static void AnimPetalDanceSmallFlowerStep(struct Sprite* sprite) +static void AnimPetalDanceSmallFlower_Step(struct Sprite* sprite) { if (!AnimTranslateLinear(sprite)) { @@ -2568,17 +2570,17 @@ static void AnimPetalDanceSmallFlowerStep(struct Sprite* sprite) // arg 0: upward x delta per frame // arg 1: upward y delta per frame // arg 2: upward duration -void AnimRazorLeafParticle(struct Sprite* sprite) +static void AnimRazorLeafParticle(struct Sprite* sprite) { sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET); sprite->data[0] = gBattleAnimArgs[0]; sprite->data[1] = gBattleAnimArgs[1]; sprite->data[2] = gBattleAnimArgs[2]; - sprite->callback = AnimRazorLeafParticleStep1; + sprite->callback = AnimRazorLeafParticle_Step1; } -static void AnimRazorLeafParticleStep1(struct Sprite* sprite) +static void AnimRazorLeafParticle_Step1(struct Sprite* sprite) { if (!sprite->data[2]) { @@ -2594,7 +2596,7 @@ static void AnimRazorLeafParticleStep1(struct Sprite* sprite) sprite->data[1] = 0; sprite->data[2] = 0; } - sprite->callback = AnimRazorLeafParticleStep2; + sprite->callback = AnimRazorLeafParticle_Step2; } else { @@ -2604,7 +2606,7 @@ static void AnimRazorLeafParticleStep1(struct Sprite* sprite) } } -static void AnimRazorLeafParticleStep2(struct Sprite* sprite) +static void AnimRazorLeafParticle_Step2(struct Sprite* sprite) { if (GetBattlerSide(gBattleAnimAttacker)) sprite->pos2.x = -Sin(sprite->data[0], 25); @@ -2631,7 +2633,7 @@ static void AnimRazorLeafParticleStep2(struct Sprite* sprite) // arg 4: translation duration // arg 5: wave amplitude // arg 6: target between double battle opponents (boolean) -void AnimTranslateLinearSingleSineWave(struct Sprite* sprite) +static void AnimTranslateLinearSingleSineWave(struct Sprite* sprite) { InitSpritePosToAnimAttacker(sprite, TRUE); if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER) @@ -2657,10 +2659,10 @@ void AnimTranslateLinearSingleSineWave(struct Sprite* sprite) else sprite->data[0] = 0; - sprite->callback = AnimTranslateLinearSingleSineWaveStep; + sprite->callback = AnimTranslateLinearSingleSineWave_Step; } -static void AnimTranslateLinearSingleSineWaveStep(struct Sprite* sprite) +static void AnimTranslateLinearSingleSineWave_Step(struct Sprite* sprite) { bool8 destroy = FALSE; s16 a = sprite->data[0]; @@ -2709,10 +2711,10 @@ void AnimMoveTwisterParticle(struct Sprite* sprite) sprite->data[2] = gBattleAnimArgs[2]; sprite->data[3] = gBattleAnimArgs[3]; sprite->data[4] = gBattleAnimArgs[4]; - sprite->callback = AnimMoveTwisterParticleStep; + sprite->callback = AnimMoveTwisterParticle_Step; } -static void AnimMoveTwisterParticleStep(struct Sprite* sprite) +static void AnimMoveTwisterParticle_Step(struct Sprite* sprite) { if (sprite->data[1] == 0xFF) { @@ -2745,17 +2747,17 @@ static void AnimMoveTwisterParticleStep(struct Sprite* sprite) // arg 1: initial y pixel offset // arg 2: affine anim num // arg 3: num squeezes -void AnimConstrictBinding(struct Sprite* sprite) +static void AnimConstrictBinding(struct Sprite* sprite) { InitSpritePosToAnimTarget(sprite, FALSE); sprite->affineAnimPaused = 1; StartSpriteAffineAnim(sprite, gBattleAnimArgs[2]); sprite->data[6] = gBattleAnimArgs[2]; sprite->data[7] = gBattleAnimArgs[3]; - sprite->callback = AnimConstrictBindingStep1; + sprite->callback = AnimConstrictBinding_Step1; } -static void AnimConstrictBindingStep1(struct Sprite* sprite) +static void AnimConstrictBinding_Step1(struct Sprite* sprite) { u8 spriteId; @@ -2764,11 +2766,11 @@ static void AnimConstrictBindingStep1(struct Sprite* sprite) sprite->affineAnimPaused = 0; spriteId = GetAnimBattlerSpriteId(ANIM_TARGET); sprite->data[0] = 0x100; - sprite->callback = AnimConstrictBindingStep2; + sprite->callback = AnimConstrictBinding_Step2; } } -static void AnimConstrictBindingStep2(struct Sprite* sprite) +static void AnimConstrictBinding_Step2(struct Sprite* sprite) { u8 spriteId = GetAnimBattlerSpriteId(ANIM_TARGET); if (!sprite->data[2]) @@ -2791,7 +2793,7 @@ static void AnimConstrictBindingStep2(struct Sprite* sprite) } } -void sub_80FF458(u8 taskId) +void AnimTask_ShrinkTargetCopy(u8 taskId) { u8 spriteId = GetAnimBattlerSpriteId(ANIM_TARGET); if (gSprites[spriteId].invisible) @@ -2809,11 +2811,11 @@ void sub_80FF458(u8 taskId) gTasks[taskId].data[0] = gBattleAnimArgs[0]; gTasks[taskId].data[1] = gBattleAnimArgs[1]; gTasks[taskId].data[11] = 0x100; - gTasks[taskId].func = AnimTask_DuplicateAndShrinkToPosStep1; + gTasks[taskId].func = AnimTask_DuplicateAndShrinkToPos_Step1; } } -static void AnimTask_DuplicateAndShrinkToPosStep1(u8 taskId) +static void AnimTask_DuplicateAndShrinkToPos_Step1(u8 taskId) { u8 spriteId = GetAnimBattlerSpriteId(ANIM_TARGET); gTasks[taskId].data[10] += gTasks[taskId].data[0]; @@ -2827,11 +2829,11 @@ static void AnimTask_DuplicateAndShrinkToPosStep1(u8 taskId) if (--gTasks[taskId].data[1] == 0) { gTasks[taskId].data[0] = 0; - gTasks[taskId].func = AnimTask_DuplicateAndShrinkToPosStep2; + gTasks[taskId].func = AnimTask_DuplicateAndShrinkToPos_Step2; } } -static void AnimTask_DuplicateAndShrinkToPosStep2(u8 taskId) +static void AnimTask_DuplicateAndShrinkToPos_Step2(u8 taskId) { if ((u16)gBattleAnimArgs[7] == 0xFFFF) { @@ -2862,7 +2864,7 @@ static void AnimTask_DuplicateAndShrinkToPosStep2(u8 taskId) // Moves an orb from the target mon to the attacking mon. // arg 0: initial x pixel offset // arg 1: initial y pixel offset -void AnimMimicOrb(struct Sprite* sprite) +static void AnimMimicOrb(struct Sprite* sprite) { switch (sprite->data[0]) { @@ -2872,11 +2874,11 @@ void AnimMimicOrb(struct Sprite* sprite) sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X) + gBattleAnimArgs[0]; sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y) + gBattleAnimArgs[1]; - sprite->invisible = 1; + sprite->invisible = TRUE; sprite->data[0]++; break; case 1: - sprite->invisible = 0; + sprite->invisible = FALSE; if (sprite->affineAnimEnded) { ChangeSpriteAffineAnim(sprite, 1); @@ -2896,7 +2898,7 @@ void AnimMimicOrb(struct Sprite* sprite) // arg 2: sprite subpriority offset // arg 3: sprite anim num // arg 4: duration -void AnimIngrainRoot(struct Sprite* sprite) +static void AnimIngrainRoot(struct Sprite* sprite) { if (!sprite->data[0]) { @@ -2921,7 +2923,7 @@ void AnimIngrainRoot(struct Sprite* sprite) // arg 3: sprite subpriority offset // arg 4: sprite anum num // arg 5: duration -void AnimFrenzyPlantRoot(struct Sprite *sprite) +static void AnimFrenzyPlantRoot(struct Sprite *sprite) { s16 attackerX = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); s16 attackerY = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET); @@ -2959,7 +2961,7 @@ static void AnimRootFlickerOut(struct Sprite* sprite) // arg 2: horizontal velocity // arg 3: wave amplitude // arg 4: duration -void AnimIngrainOrb(struct Sprite* sprite) +static void AnimIngrainOrb(struct Sprite* sprite) { if (!sprite->data[0]) { @@ -3018,7 +3020,7 @@ bool8 moveAlongLinearPath(struct Sprite* sprite) return FALSE; } -void AnimItemStealStep2(struct Sprite* sprite) +static void AnimItemSteal_Step2(struct Sprite* sprite) { if (sprite->data[0] == 10) StartSpriteAffineAnim(sprite, 1); @@ -3028,7 +3030,7 @@ void AnimItemStealStep2(struct Sprite* sprite) DestroyAnimSprite(sprite); } -static void AnimItemStealStep1(struct Sprite* sprite) +static void AnimItemSteal_Step1(struct Sprite* sprite) { sprite->data[0] += sprite->data[3] * 128 / sprite->data[4]; if (sprite->data[0] >= 128) @@ -3042,11 +3044,11 @@ static void AnimItemStealStep1(struct Sprite* sprite) { sprite->pos2.y = 0; sprite->data[0] = 0; - sprite->callback = AnimItemStealStep2; + sprite->callback = AnimItemSteal_Step2; } } -void AnimPresent(struct Sprite* sprite) +static void AnimPresent(struct Sprite* sprite) { s16 targetX; s16 targetY; @@ -3069,7 +3071,7 @@ void AnimPresent(struct Sprite* sprite) } sprite->data[4] = 60; - sprite->callback = AnimItemStealStep1; + sprite->callback = AnimItemSteal_Step1; } static void sub_80FFB90(struct Sprite* sprite) @@ -3092,7 +3094,7 @@ static void sub_80FFB90(struct Sprite* sprite) } } -void AnimKnockOffItem(struct Sprite* sprite) +static void AnimKnockOffItem(struct Sprite* sprite) { s16 targetY = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y); if (GetBattlerSide(gBattleAnimTarget) == B_SIDE_PLAYER) @@ -3102,7 +3104,7 @@ void AnimKnockOffItem(struct Sprite* sprite) sub_80FF9B8(sprite, 40); sprite->data[3] = 3; sprite->data[4] = 60; - sprite->callback = AnimItemStealStep1; + sprite->callback = AnimItemSteal_Step1; } else { @@ -3123,7 +3125,7 @@ void AnimKnockOffItem(struct Sprite* sprite) // arg 1: initial y pixel offset // arg 2: vertical velocity // arg 3: unused -void AnimPresentHealParticle(struct Sprite* sprite) +static void AnimPresentHealParticle(struct Sprite* sprite) { if (!sprite->data[0]) { @@ -3137,7 +3139,7 @@ void AnimPresentHealParticle(struct Sprite* sprite) DestroyAnimSprite(sprite); } -void AnimItemSteal(struct Sprite* sprite) +static void AnimItemSteal(struct Sprite* sprite) { s16 attackerX; s16 attackerY; @@ -3160,10 +3162,10 @@ void AnimItemSteal(struct Sprite* sprite) } sprite->data[4] = 60; - sprite->callback = AnimItemStealStep3; + sprite->callback = AnimItemSteal_Step3; } -static void AnimItemStealStep3(struct Sprite* sprite) +static void AnimItemSteal_Step3(struct Sprite* sprite) { int zero; sprite->data[0] += ((sprite->data[3] * 128) / sprite->data[4]); @@ -3182,7 +3184,7 @@ static void AnimItemStealStep3(struct Sprite* sprite) { sprite->pos2.y = 0; sprite->data[0] = 0; - sprite->callback = AnimItemStealStep2; + sprite->callback = AnimItemSteal_Step2; PlaySE12WithPanning(SE_W145B, BattleAnimAdjustPanning(-64)); } } @@ -3190,7 +3192,7 @@ static void AnimItemStealStep3(struct Sprite* sprite) // Moves a bag in a circular motion. // arg 0: y position // arg 1: initial wave offset -void AnimTrickBag(struct Sprite* sprite) +static void AnimTrickBag(struct Sprite* sprite) { int a; int b; @@ -3219,7 +3221,7 @@ void AnimTrickBag(struct Sprite* sprite) sprite->data[4] = 20; sprite->pos2.x = Cos(sprite->data[1], 60); sprite->pos2.y = Sin(sprite->data[1], 20); - sprite->callback = AnimTrickBagStep1; + sprite->callback = AnimTrickBag_Step1; if (sprite->data[1] > 0 && sprite->data[1] < 192) sprite->subpriority = 31; else @@ -3227,7 +3229,7 @@ void AnimTrickBag(struct Sprite* sprite) } } -static void AnimTrickBagStep1(struct Sprite* sprite) +static void AnimTrickBag_Step1(struct Sprite* sprite) { switch (sprite->data[3]) { @@ -3251,20 +3253,20 @@ static void AnimTrickBagStep1(struct Sprite* sprite) { sprite->data[0] = 0; sprite->data[2] = 0; - sprite->callback = AnimTrickBagStep2; + sprite->callback = AnimTrickBag_Step2; } break; } } -static void AnimTrickBagStep2(struct Sprite* sprite) +static void AnimTrickBag_Step2(struct Sprite* sprite) { if (sprite->data[2] == gTrickBagCoordinates[sprite->data[0]][1]) { if (gTrickBagCoordinates[sprite->data[0]][2] == 127) { sprite->data[0] = 0; - sprite->callback = AnimTrickBagStep3; + sprite->callback = AnimTrickBag_Step3; } sprite->data[2] = 0; @@ -3287,7 +3289,7 @@ static void AnimTrickBagStep2(struct Sprite* sprite) } } -static void AnimTrickBagStep3(struct Sprite* sprite) +static void AnimTrickBag_Step3(struct Sprite* sprite) { if (sprite->data[0] > 20) DestroyAnimSprite(sprite); @@ -3319,10 +3321,10 @@ void AnimTask_LeafBlade(u8 taskId) gSprites[task->data[2]].data[4] = task->data[7] + (task->data[11] / 2 + 10) * task->data[5]; gSprites[task->data[2]].data[5] = LeafBladeGetPosFactor(&gSprites[task->data[2]]); InitAnimArcTranslation(&gSprites[task->data[2]]); - task->func = AnimTask_LeafBladeStep; + task->func = AnimTask_LeafBlade_Step; } -static void AnimTask_LeafBladeStep(u8 taskId) +static void AnimTask_LeafBlade_Step(u8 taskId) { struct Task* task = &gTasks[taskId]; struct Sprite* sprite = &gSprites[task->data[2]]; @@ -3330,7 +3332,7 @@ static void AnimTask_LeafBladeStep(u8 taskId) switch (a) { case 4: - AnimTask_LeafBladeStep2(task, taskId); + AnimTask_LeafBlade_Step2(task, taskId); if (TranslateAnimHorizontalArc(sprite)) { task->data[15] = 5; @@ -3338,7 +3340,7 @@ static void AnimTask_LeafBladeStep(u8 taskId) } break; case 8: - AnimTask_LeafBladeStep2(task, taskId); + AnimTask_LeafBlade_Step2(task, taskId); if (TranslateAnimHorizontalArc(sprite)) { task->data[15] = 9; @@ -3346,7 +3348,7 @@ static void AnimTask_LeafBladeStep(u8 taskId) } break; case 0: - AnimTask_LeafBladeStep2(task, taskId); + AnimTask_LeafBlade_Step2(task, taskId); if (TranslateAnimHorizontalArc(sprite)) { task->data[15] = 1; @@ -3372,7 +3374,7 @@ static void AnimTask_LeafBladeStep(u8 taskId) task->data[0]++; break; case 2: - AnimTask_LeafBladeStep2(task, taskId); + AnimTask_LeafBlade_Step2(task, taskId); if (TranslateAnimHorizontalArc(sprite)) { task->data[15] = 3; @@ -3415,7 +3417,7 @@ static void AnimTask_LeafBladeStep(u8 taskId) task->data[0]++; break; case 6: - AnimTask_LeafBladeStep2(task, taskId); + AnimTask_LeafBlade_Step2(task, taskId); if (TranslateAnimHorizontalArc(sprite)) { task->data[15] = 7; @@ -3458,7 +3460,7 @@ static void AnimTask_LeafBladeStep(u8 taskId) task->data[0]++; break; case 10: - AnimTask_LeafBladeStep2(task, taskId); + AnimTask_LeafBlade_Step2(task, taskId); if (TranslateAnimHorizontalArc(sprite)) { task->data[15] = 11; @@ -3486,7 +3488,7 @@ static void AnimTask_LeafBladeStep(u8 taskId) break; } case 12: - AnimTask_LeafBladeStep2(task, taskId); + AnimTask_LeafBlade_Step2(task, taskId); if (TranslateAnimHorizontalArc(sprite)) { DestroySprite(sprite); @@ -3516,7 +3518,7 @@ static s16 LeafBladeGetPosFactor(struct Sprite* sprite) return var; } -static void AnimTask_LeafBladeStep2(struct Task* task, u8 taskId) +static void AnimTask_LeafBlade_Step2(struct Task* task, u8 taskId) { task->data[14]++; if (task->data[14] > 0) @@ -3537,12 +3539,12 @@ static void AnimTask_LeafBladeStep2(struct Task* task, u8 taskId) gTasks[taskId].data[13]++; StartSpriteAnim(&gSprites[spriteId], task->data[3]); gSprites[spriteId].subpriority = task->data[4]; - gSprites[spriteId].callback = AnimTask_LeafBladeStep2_Callback; + gSprites[spriteId].callback = AnimTask_LeafBlade_Step2_Callback; } } } -static void AnimTask_LeafBladeStep2_Callback(struct Sprite* sprite) +static void AnimTask_LeafBlade_Step2_Callback(struct Sprite* sprite) { sprite->data[0]++; if (sprite->data[0] > 1) @@ -3558,7 +3560,7 @@ static void AnimTask_LeafBladeStep2_Callback(struct Sprite* sprite) } } -void AnimFlyingParticle(struct Sprite* sprite) +static void AnimFlyingParticle(struct Sprite* sprite) { u8 battler; if (!gBattleAnimArgs[6]) @@ -3603,10 +3605,10 @@ void AnimFlyingParticle(struct Sprite* sprite) break; } - sprite->callback = AnimFlyingParticleStep; + sprite->callback = AnimFlyingParticle_Step; } -static void AnimFlyingParticleStep(struct Sprite* sprite) +static void AnimFlyingParticle_Step(struct Sprite* sprite) { int a = sprite->data[7]; sprite->data[7]++; @@ -3627,7 +3629,7 @@ static void AnimFlyingParticleStep(struct Sprite* sprite) DestroySpriteAndMatrix(sprite); } -void sub_81007C4(u8 taskId) +void AnimTask_CycleMagicalLeafPal(u8 taskId) { struct Task* task = &gTasks[taskId]; switch (task->data[0]) @@ -3657,7 +3659,7 @@ void sub_81007C4(u8 taskId) DestroyAnimVisualTask(taskId); } -void AnimNeedleArmSpike(struct Sprite* sprite) +static void AnimNeedleArmSpike(struct Sprite* sprite) { u8 a; u8 b; @@ -3709,11 +3711,11 @@ void AnimNeedleArmSpike(struct Sprite* sprite) c -= 0x8000; TrySetSpriteRotScale(sprite, 0, 0x100, 0x100, c); - sprite->callback = AnimNeedleArmSpikeStep; + sprite->callback = AnimNeedleArmSpike_Step; } } -static void AnimNeedleArmSpikeStep(struct Sprite* sprite) +static void AnimNeedleArmSpike_Step(struct Sprite* sprite) { if (sprite->data[0]) { @@ -3735,7 +3737,7 @@ static void sub_81009DC(struct Sprite* sprite) DestroyAnimSprite(sprite); } -void sub_81009F8(struct Sprite* sprite) +static void sub_81009F8(struct Sprite* sprite) { if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER) { @@ -3752,7 +3754,7 @@ void sub_81009F8(struct Sprite* sprite) StoreSpriteCallbackInData6(sprite, DestroyAnimSprite); } -void AnimWhipHit(struct Sprite* sprite) +static void AnimWhipHit(struct Sprite* sprite) { if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_PLAYER) StartSpriteAnim(sprite, 1); @@ -3762,7 +3764,7 @@ void AnimWhipHit(struct Sprite* sprite) sprite->pos1.y += gBattleAnimArgs[1]; } -void sub_8100A94(struct Sprite* sprite) +static void sub_8100A94(struct Sprite* sprite) { sprite->pos1.x += gBattleAnimArgs[0]; sprite->pos1.y += gBattleAnimArgs[1]; @@ -3780,14 +3782,14 @@ void sub_8100A94(struct Sprite* sprite) // arg 0: initial x pixel offset // arg 1: initial y pixel offset // arg 2: slice direction; 0 = right-to-left, 1 = left-to-right -void AnimCuttingSlice(struct Sprite* sprite) +static void AnimCuttingSlice(struct Sprite* sprite) { sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimTarget, 0); sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimTarget, 1); if (GetBattlerSide(gBattleAnimTarget) == B_SIDE_PLAYER) sprite->pos1.y += 8; - sprite->callback = AnimSliceStep; + sprite->callback = AnimSlice_Step; if (gBattleAnimArgs[2] == 0) { sprite->pos1.x += gBattleAnimArgs[0]; @@ -3806,7 +3808,7 @@ void AnimCuttingSlice(struct Sprite* sprite) sprite->data[1] = -sprite->data[1]; } -void AnimAirCutterSlice(struct Sprite* sprite) +static void AnimAirCutterSlice(struct Sprite* sprite) { u8 a; u8 b; @@ -3837,7 +3839,7 @@ void AnimAirCutterSlice(struct Sprite* sprite) if (GetBattlerSide(gBattleAnimTarget) == B_SIDE_PLAYER) sprite->pos1.y += 8; - sprite->callback = AnimSliceStep; + sprite->callback = AnimSlice_Step; if (gBattleAnimArgs[2] == 0) { sprite->pos1.x += gBattleAnimArgs[0]; @@ -3856,7 +3858,7 @@ void AnimAirCutterSlice(struct Sprite* sprite) sprite->data[1] = -sprite->data[1]; } -static void AnimSliceStep(struct Sprite* sprite) +static void AnimSlice_Step(struct Sprite* sprite) { sprite->data[3] += sprite->data[1]; sprite->data[4] += sprite->data[2]; @@ -3883,15 +3885,15 @@ void unref_sub_8100D38(struct Sprite* sprite) { if (sprite->data[3] & 1) { - sprite->invisible = 0; - gSprites[sprite->data[0]].invisible = 0; - gSprites[sprite->data[1]].invisible = 0; + sprite->invisible = FALSE; + gSprites[sprite->data[0]].invisible = FALSE; + gSprites[sprite->data[1]].invisible = FALSE; } else { - sprite->invisible = 1; - gSprites[sprite->data[0]].invisible = 1; - gSprites[sprite->data[1]].invisible = 1; + sprite->invisible = TRUE; + gSprites[sprite->data[0]].invisible = TRUE; + gSprites[sprite->data[1]].invisible = TRUE; } sprite->data[2] = 0; @@ -3910,7 +3912,7 @@ void unref_sub_8100D38(struct Sprite* sprite) } } -void sub_8100E1C(struct Sprite* sprite) +static void sub_8100E1C(struct Sprite* sprite) { sprite->data[0] = gBattleAnimArgs[2]; if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER) @@ -3943,7 +3945,7 @@ static void sub_8100E80(struct Sprite* sprite) DestroyAnimSprite(sprite); } -void AnimProtect(struct Sprite* sprite) +static void AnimProtect(struct Sprite* sprite) { if (IsContest()) gBattleAnimArgs[1] += 8; @@ -3960,10 +3962,10 @@ void AnimProtect(struct Sprite* sprite) sprite->data[7] = 16; SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT2_ALL | BLDCNT_EFFECT_BLEND); SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(16 - sprite->data[7], sprite->data[7])); - sprite->callback = AnimProtectStep; + sprite->callback = AnimProtect_Step; } -static void AnimProtectStep(struct Sprite *sprite) +static void AnimProtect_Step(struct Sprite *sprite) { int a; int i; @@ -4000,13 +4002,13 @@ static void AnimProtectStep(struct Sprite *sprite) SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(16 - sprite->data[7], sprite->data[7])); if (sprite->data[7] == 16) { - sprite->invisible = 1; + sprite->invisible = TRUE; sprite->callback = DestroyAnimSpriteAndDisableBlend; } } } -void AnimMilkBottle(struct Sprite* sprite) +static void AnimMilkBottle(struct Sprite* sprite) { sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimTarget, 2); sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimTarget, 3) + 0xFFE8; @@ -4019,10 +4021,10 @@ void AnimMilkBottle(struct Sprite* sprite) sprite->data[7] = 16; SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT2_ALL | BLDCNT_EFFECT_BLEND); SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(sprite->data[6], sprite->data[7])); - sprite->callback = AnimMilkBottleStep1; + sprite->callback = AnimMilkBottle_Step1; } -static void AnimMilkBottleStep1(struct Sprite* sprite) +static void AnimMilkBottle_Step1(struct Sprite* sprite) { switch (sprite->data[0]) { @@ -4055,7 +4057,7 @@ static void AnimMilkBottleStep1(struct Sprite* sprite) } break; case 2: - AnimMilkBottleStep2(sprite, 16, 4); + AnimMilkBottle_Step2(sprite, 16, 4); if (++sprite->data[1] > 2) { sprite->data[1] = 0; @@ -4084,7 +4086,7 @@ static void AnimMilkBottleStep1(struct Sprite* sprite) } break; case 3: - sprite->invisible = 1; + sprite->invisible = TRUE; sprite->data[0]++; break; case 4: @@ -4095,7 +4097,7 @@ static void AnimMilkBottleStep1(struct Sprite* sprite) } } -static void AnimMilkBottleStep2(struct Sprite* sprite, int unk1, int unk2) +static void AnimMilkBottle_Step2(struct Sprite* sprite, int unk1, int unk2) { if (sprite->data[3] <= 11) sprite->data[4] += 2; @@ -4116,7 +4118,7 @@ static void AnimMilkBottleStep2(struct Sprite* sprite, int unk1, int unk2) sprite->data[3] = 0; } -void AnimGrantingStars(struct Sprite* sprite) +static void AnimGrantingStars(struct Sprite* sprite) { if (!gBattleAnimArgs[2]) SetSpriteCoordsToAnimAttackerCoords(sprite); @@ -4130,7 +4132,7 @@ void AnimGrantingStars(struct Sprite* sprite) sprite->callback = TranslateSpriteLinearFixedPoint; } -void AnimSparkingStars(struct Sprite* sprite) +static void AnimSparkingStars(struct Sprite* sprite) { u8 battler; if (!gBattleAnimArgs[2]) @@ -4167,7 +4169,7 @@ void AnimSparkingStars(struct Sprite* sprite) sprite->callback = TranslateSpriteLinearFixedPoint; } -void sub_8101440(struct Sprite* sprite) +static void sub_8101440(struct Sprite* sprite) { SetSpriteCoordsToAnimAttackerCoords(sprite); if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_PLAYER) @@ -4198,7 +4200,7 @@ static void sub_81014A0(struct Sprite* sprite) DestroyAnimSprite(sprite); } -void AnimSleepLetterZ(struct Sprite* sprite) +static void AnimSleepLetterZ(struct Sprite* sprite) { SetSpriteCoordsToAnimAttackerCoords(sprite); if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_PLAYER) @@ -4215,10 +4217,10 @@ void AnimSleepLetterZ(struct Sprite* sprite) StartSpriteAffineAnim(sprite, 1); } - sprite->callback = AnimSleepLetterZStep; + sprite->callback = AnimSleepLetterZ_Step; } -static void AnimSleepLetterZStep(struct Sprite* sprite) +static void AnimSleepLetterZ_Step(struct Sprite* sprite) { sprite->pos2.y = -(sprite->data[0] / 0x28); sprite->pos2.x = sprite->data[4] / 10; @@ -4228,23 +4230,23 @@ static void AnimSleepLetterZStep(struct Sprite* sprite) DestroySpriteAndMatrix(sprite); } -void AnimLockOnTarget(struct Sprite* sprite) +static void AnimLockOnTarget(struct Sprite* sprite) { sprite->pos1.x -= 32; sprite->pos1.y -= 32; sprite->data[0] = 20; sprite->callback = WaitAnimForDuration; - StoreSpriteCallbackInData6(sprite, AnimLockOnTargetStep1); + StoreSpriteCallbackInData6(sprite, AnimLockOnTarget_Step1); } -static void AnimLockOnTargetStep1(struct Sprite* sprite) +static void AnimLockOnTarget_Step1(struct Sprite* sprite) { switch (sprite->data[5] & 1) { case 0: sprite->data[0] = 1; sprite->callback = WaitAnimForDuration; - StoreSpriteCallbackInData6(sprite, AnimLockOnTargetStep1); + StoreSpriteCallbackInData6(sprite, AnimLockOnTarget_Step1); break; case 1: sprite->pos1.x += sprite->pos2.x; @@ -4255,7 +4257,7 @@ static void AnimLockOnTargetStep1(struct Sprite* sprite) sprite->data[2] = sprite->pos1.x + gInclineMonCoordTable[sprite->data[5] >> 8][0]; sprite->data[4] = sprite->pos1.y + gInclineMonCoordTable[sprite->data[5] >> 8][1]; sprite->callback = StartAnimLinearTranslation; - StoreSpriteCallbackInData6(sprite, AnimLockOnTargetStep2); + StoreSpriteCallbackInData6(sprite, AnimLockOnTarget_Step2); sprite->data[5] += 0x100; PlaySE12WithPanning(SE_W199, BattleAnimAdjustPanning(63)); break; @@ -4264,21 +4266,21 @@ static void AnimLockOnTargetStep1(struct Sprite* sprite) sprite->data[5] ^= 1; } -static void AnimLockOnTargetStep2(struct Sprite* sprite) +static void AnimLockOnTarget_Step2(struct Sprite* sprite) { if ((sprite->data[5] >> 8) == 4) { sprite->data[0] = 10; sprite->callback = WaitAnimForDuration; - StoreSpriteCallbackInData6(sprite, AnimLockOnTargetStep3); + StoreSpriteCallbackInData6(sprite, AnimLockOnTarget_Step3); } else { - sprite->callback = AnimLockOnTargetStep1; + sprite->callback = AnimLockOnTarget_Step1; } } -static void AnimLockOnTargetStep3(struct Sprite* sprite) +static void AnimLockOnTarget_Step3(struct Sprite* sprite) { s16 a; s16 b; @@ -4288,7 +4290,7 @@ static void AnimLockOnTargetStep3(struct Sprite* sprite) sprite->data[1] = 0; sprite->data[2] = 0; sprite->callback = WaitAnimForDuration; - StoreSpriteCallbackInData6(sprite, AnimLockOnTargetStep4); + StoreSpriteCallbackInData6(sprite, AnimLockOnTarget_Step4); } else { @@ -4320,11 +4322,11 @@ static void AnimLockOnTargetStep3(struct Sprite* sprite) sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, 2) + a; sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3) + b; sprite->callback = StartAnimLinearTranslation; - StoreSpriteCallbackInData6(sprite, AnimLockOnTargetStep5); + StoreSpriteCallbackInData6(sprite, AnimLockOnTarget_Step5); } } -static void AnimLockOnTargetStep4(struct Sprite* sprite) +static void AnimLockOnTarget_Step4(struct Sprite* sprite) { if (sprite->data[2] == 0) { @@ -4347,21 +4349,21 @@ static void AnimLockOnTargetStep4(struct Sprite* sprite) } else if (sprite->data[1] == 0) { - sprite->callback = AnimLockOnTargetStep5; + sprite->callback = AnimLockOnTarget_Step5; } } -static void AnimLockOnTargetStep5(struct Sprite* sprite) +static void AnimLockOnTarget_Step5(struct Sprite* sprite) { if ((u16)gBattleAnimArgs[7] == 0xFFFF) { sprite->data[1] = 0; sprite->data[0] = 0; - sprite->callback = AnimLockOnTargetStep6; + sprite->callback = AnimLockOnTarget_Step6; } } -static void AnimLockOnTargetStep6(struct Sprite* sprite) +static void AnimLockOnTarget_Step6(struct Sprite* sprite) { if (sprite->data[0] % 3 == 0) { @@ -4374,7 +4376,7 @@ static void AnimLockOnTargetStep6(struct Sprite* sprite) DestroyAnimSprite(sprite); } -void AnimLockOnMoveTarget(struct Sprite* sprite) +static void AnimLockOnMoveTarget(struct Sprite* sprite) { sprite->oam.affineParam = gBattleAnimArgs[0]; if ((s16)sprite->oam.affineParam == 1) @@ -4406,38 +4408,38 @@ void AnimLockOnMoveTarget(struct Sprite* sprite) sprite->callback(sprite); } -void AnimBowMon(struct Sprite* sprite) +static void AnimBowMon(struct Sprite* sprite) { - sprite->invisible = 1; + sprite->invisible = TRUE; sprite->data[0] = 0; switch (gBattleAnimArgs[0]) { case 0: - sprite->callback = AnimBowMonStep1; + sprite->callback = AnimBowMon_Step1; break; case 1: - sprite->callback = AnimBowMonStep2; + sprite->callback = AnimBowMon_Step2; break; case 2: - sprite->callback = AnimBowMonStep3; + sprite->callback = AnimBowMon_Step3; break; default: - sprite->callback = AnimBowMonStep4; + sprite->callback = AnimBowMon_Step4; break; } } -static void AnimBowMonStep1(struct Sprite* sprite) +static void AnimBowMon_Step1(struct Sprite* sprite) { sprite->data[0] = 6; sprite->data[1] = (GetBattlerSide(gBattleAnimAttacker)) ? 2 : -2; sprite->data[2] = 0; sprite->data[3] = gBattlerSpriteIds[gBattleAnimAttacker]; - StoreSpriteCallbackInData6(sprite, AnimBowMonStep1_Callback); + StoreSpriteCallbackInData6(sprite, AnimBowMon_Step1_Callback); sprite->callback = TranslateMonSpriteLinear; } -static void AnimBowMonStep1_Callback(struct Sprite* sprite) +static void AnimBowMon_Step1_Callback(struct Sprite* sprite) { if (sprite->data[0] == 0) { @@ -4453,30 +4455,30 @@ static void AnimBowMonStep1_Callback(struct Sprite* sprite) if (++sprite->data[0] > 3) { sprite->data[0] = 0; - sprite->callback = AnimBowMonStep4; + sprite->callback = AnimBowMon_Step4; } } -static void AnimBowMonStep2(struct Sprite* sprite) +static void AnimBowMon_Step2(struct Sprite* sprite) { sprite->data[0] = 4; sprite->data[1] = (GetBattlerSide(gBattleAnimAttacker)) ? -3 : 3; sprite->data[2] = 0; sprite->data[3] = gBattlerSpriteIds[gBattleAnimAttacker]; - StoreSpriteCallbackInData6(sprite, AnimBowMonStep4); + StoreSpriteCallbackInData6(sprite, AnimBowMon_Step4); sprite->callback = TranslateMonSpriteLinear; } -static void AnimBowMonStep3(struct Sprite* sprite) +static void AnimBowMon_Step3(struct Sprite* sprite) { if (++sprite->data[0] > 8) { sprite->data[0] = 0; - sprite->callback = AnimBowMonStep3_Callback; + sprite->callback = AnimBowMon_Step3_Callback; } } -static void AnimBowMonStep3_Callback(struct Sprite* sprite) +static void AnimBowMon_Step3_Callback(struct Sprite* sprite) { if (sprite->data[0] == 0) { @@ -4500,16 +4502,16 @@ static void AnimBowMonStep3_Callback(struct Sprite* sprite) if (++sprite->data[0] > 2) { ResetSpriteRotScale(sprite->data[3]); - sprite->callback = AnimBowMonStep4; + sprite->callback = AnimBowMon_Step4; } } -static void AnimBowMonStep4(struct Sprite* sprite) +static void AnimBowMon_Step4(struct Sprite* sprite) { DestroyAnimSprite(sprite); } -void sub_8101B90(struct Sprite *sprite) +static void sub_8101B90(struct Sprite *sprite) { sprite->data[0] = 0; sprite->callback = sub_8101BA0; @@ -4698,7 +4700,7 @@ static void AnimTask_SkullBashPositionReset(u8 taskId) } } -void AnimSlashSlice(struct Sprite* sprite) +static void AnimSlashSlice(struct Sprite* sprite) { if (gBattleAnimArgs[0] == 0) { @@ -4713,48 +4715,48 @@ void AnimSlashSlice(struct Sprite* sprite) sprite->data[0] = 0; sprite->data[1] = 0; - StoreSpriteCallbackInData6(sprite, AnimFalseSwipeSliceStep3); + StoreSpriteCallbackInData6(sprite, AnimFalseSwipeSlice_Step3); sprite->callback = RunStoredCallbackWhenAnimEnds; } -void AnimFalseSwipeSlice(struct Sprite* sprite) +static void AnimFalseSwipeSlice(struct Sprite* sprite) { sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimTarget, 2) + 0xFFD0; sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimTarget, 3); - StoreSpriteCallbackInData6(sprite, AnimFalseSwipeSliceStep1); + StoreSpriteCallbackInData6(sprite, AnimFalseSwipeSlice_Step1); sprite->callback = RunStoredCallbackWhenAnimEnds; } -void AnimFalseSwipePositionedSlice(struct Sprite* sprite) +static void AnimFalseSwipePositionedSlice(struct Sprite* sprite) { sprite->pos1.x = sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimTarget, 2) + 0xFFD0 + gBattleAnimArgs[0]; sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimTarget, 3); StartSpriteAnim(sprite, 1); sprite->data[0] = 0; sprite->data[1] = 0; - sprite->callback = AnimFalseSwipeSliceStep3; + sprite->callback = AnimFalseSwipeSlice_Step3; } -static void AnimFalseSwipeSliceStep1(struct Sprite* sprite) +static void AnimFalseSwipeSlice_Step1(struct Sprite* sprite) { if (++sprite->data[0] > 8) { sprite->data[0] = 12; sprite->data[1] = 8; sprite->data[2] = 0; - StoreSpriteCallbackInData6(sprite, AnimFalseSwipeSliceStep2); + StoreSpriteCallbackInData6(sprite, AnimFalseSwipeSlice_Step2); sprite->callback = TranslateSpriteLinear; } } -static void AnimFalseSwipeSliceStep2(struct Sprite* sprite) +static void AnimFalseSwipeSlice_Step2(struct Sprite* sprite) { sprite->data[0] = 0; sprite->data[1] = 0; - sprite->callback = AnimFalseSwipeSliceStep3; + sprite->callback = AnimFalseSwipeSlice_Step3; } -static void AnimFalseSwipeSliceStep3(struct Sprite* sprite) +static void AnimFalseSwipeSlice_Step3(struct Sprite* sprite) { if (++sprite->data[0] > 1) { @@ -4765,7 +4767,7 @@ static void AnimFalseSwipeSliceStep3(struct Sprite* sprite) } } -void AnimEndureEnergy(struct Sprite* sprite) +static void AnimEndureEnergy(struct Sprite* sprite) { if (gBattleAnimArgs[0] == 0) { @@ -4780,10 +4782,10 @@ void AnimEndureEnergy(struct Sprite* sprite) sprite->data[0] = 0; sprite->data[1] = gBattleAnimArgs[3]; - sprite->callback = AnimEndureEnergyStep; + sprite->callback = AnimEndureEnergy_Step; } -static void AnimEndureEnergyStep(struct Sprite* sprite) +static void AnimEndureEnergy_Step(struct Sprite* sprite) { if (++sprite->data[0] > sprite->data[1]) { @@ -4796,7 +4798,7 @@ static void AnimEndureEnergyStep(struct Sprite* sprite) DestroyAnimSprite(sprite); } -void AnimSharpenSphere(struct Sprite* sprite) +static void AnimSharpenSphere(struct Sprite* sprite) { sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2); sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3) - 12; @@ -4806,10 +4808,10 @@ void AnimSharpenSphere(struct Sprite* sprite) sprite->data[3] = 0; sprite->data[4] = 0; sprite->data[5] = BattleAnimAdjustPanning(-64); - sprite->callback = AnimSharpenSphereStep; + sprite->callback = AnimSharpenSphere_Step; } -static void AnimSharpenSphereStep(struct Sprite* sprite) +static void AnimSharpenSphere_Step(struct Sprite* sprite) { if (++sprite->data[0] >= sprite->data[1]) { @@ -4833,7 +4835,7 @@ static void AnimSharpenSphereStep(struct Sprite* sprite) DestroyAnimSprite(sprite); } -void AnimConversion(struct Sprite* sprite) +static void AnimConversion(struct Sprite* sprite) { if (sprite->data[0] == 0) { @@ -4873,15 +4875,15 @@ void AnimTask_ConversionAlphaBlend(u8 taskId) } } -void AnimConversion2(struct Sprite* sprite) +static void AnimConversion2(struct Sprite* sprite) { InitSpritePosToAnimTarget(sprite, FALSE); sprite->animPaused = 1; sprite->data[0] = gBattleAnimArgs[2]; - sprite->callback = AnimConversion2Step; + sprite->callback = AnimConversion2_Step; } -static void AnimConversion2Step(struct Sprite* sprite) +static void AnimConversion2_Step(struct Sprite* sprite) { if (sprite->data[0]) { @@ -4934,7 +4936,7 @@ void unref_sub_81024A8(u8 taskId) DestroyAnimVisualTask(taskId); } -void AnimMoon(struct Sprite* sprite) +static void AnimMoon(struct Sprite* sprite) { if (IsContest()) { @@ -4950,16 +4952,16 @@ void AnimMoon(struct Sprite* sprite) sprite->oam.shape = SPRITE_SHAPE(64x64); sprite->oam.size = SPRITE_SIZE(64x64); sprite->data[0] = 0; - sprite->callback = AnimMoonStep; + sprite->callback = AnimMoon_Step; } -static void AnimMoonStep(struct Sprite* sprite) +static void AnimMoon_Step(struct Sprite* sprite) { if (sprite->data[0]) DestroyAnimSprite(sprite); } -void AnimMoonlightSparkle(struct Sprite* sprite) +static void AnimMoonlightSparkle(struct Sprite* sprite) { sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2) + gBattleAnimArgs[0]; sprite->pos1.y = gBattleAnimArgs[1]; @@ -4968,10 +4970,10 @@ void AnimMoonlightSparkle(struct Sprite* sprite) sprite->data[2] = 0; sprite->data[3] = 0; sprite->data[4] = 1; - sprite->callback = AnimMoonlightSparkleStep; + sprite->callback = AnimMoonlightSparkle_Step; } -static void AnimMoonlightSparkleStep(struct Sprite* sprite) +static void AnimMoonlightSparkle_Step(struct Sprite* sprite) { if (++sprite->data[1] > 1) { @@ -4987,10 +4989,7 @@ static void AnimMoonlightSparkleStep(struct Sprite* sprite) DestroyAnimSprite(sprite); } -void AnimTask_FadeScreenBlueStep(u8); - - -void AnimTask_FadeScreenBlue(u8 taskId) +void AnimTask_MoonlightEndFade(u8 taskId) { int a = sub_80A75AC(1, 0, 0, 0, 0, 0, 0) & 0xFFFF; int b; @@ -5013,11 +5012,11 @@ void AnimTask_FadeScreenBlue(u8 taskId) b = b | (0x10000 << IndexOfSpritePaletteTag(ANIM_TAG_MOON)); d = IndexOfSpritePaletteTag(ANIM_TAG_GREEN_SPARKLE); BeginNormalPaletteFade((0x10000 << d) | b, 0, 0, 16, RGB(27, 29, 31)); - gTasks[taskId].func = AnimTask_FadeScreenBlueStep; + gTasks[taskId].func = AnimTask_MoonlightEndFade_Step; gTasks[taskId].func(taskId); } -void AnimTask_FadeScreenBlueStep(u8 taskId) +static void AnimTask_MoonlightEndFade_Step(u8 taskId) { struct Task* task = &gTasks[taskId]; switch (task->data[0]) @@ -5095,7 +5094,7 @@ void AnimTask_FadeScreenBlueStep(u8 taskId) } } -void AnimHornHit(struct Sprite* sprite) +static void AnimHornHit(struct Sprite* sprite) { if (gBattleAnimArgs[2] < 2) gBattleAnimArgs[2] = 2; @@ -5139,10 +5138,10 @@ void AnimHornHit(struct Sprite* sprite) sprite->oam.matrixNum = (ST_OAM_HFLIP | ST_OAM_VFLIP); } - sprite->callback = AnimHornHitStep; + sprite->callback = AnimHornHit_Step; } -static void AnimHornHitStep(struct Sprite* sprite) +static void AnimHornHit_Step(struct Sprite* sprite) { sprite->data[2] += sprite->data[3]; sprite->data[4] += sprite->data[5]; @@ -5181,19 +5180,19 @@ void AnimTask_DoubleTeam(u8 taskId) gSprites[obj].data[0] = 0; gSprites[obj].data[1] = i << 7; gSprites[obj].data[2] = taskId; - gSprites[obj].callback = AnimTask_DoubleTeamCallback; + gSprites[obj].callback = AnimDoubleTeam; task->data[3]++; i++; } - task->func = AnimTask_DoubleTeamStep; + task->func = AnimTask_DoubleTeam_Step; if (GetBattlerSpriteBGPriorityRank(gBattleAnimAttacker) == 1) ClearGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_BG1_ON); else ClearGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_BG2_ON); } -static void AnimTask_DoubleTeamStep(u8 taskId) +static void AnimTask_DoubleTeam_Step(u8 taskId) { struct Task* task = &gTasks[taskId]; if (!task->data[3]) @@ -5208,7 +5207,7 @@ static void AnimTask_DoubleTeamStep(u8 taskId) } } -static void AnimTask_DoubleTeamCallback(struct Sprite* sprite) +static void AnimDoubleTeam(struct Sprite* sprite) { if (++sprite->data[3] > 1) { @@ -5230,7 +5229,7 @@ static void AnimTask_DoubleTeamCallback(struct Sprite* sprite) } } -void AnimSuperFang(struct Sprite* sprite) +static void AnimSuperFang(struct Sprite* sprite) { StoreSpriteCallbackInData6(sprite, DestroyAnimSprite); sprite->callback = RunStoredCallbackWhenAnimEnds; @@ -5273,7 +5272,7 @@ void AnimTask_MusicNotesClearRainbowBlend(u8 taskId) DestroyAnimVisualTask(taskId); } -void AnimWavyMusicNotes(struct Sprite* sprite) +static void AnimWavyMusicNotes(struct Sprite* sprite) { u8 index; u8 a; @@ -5300,7 +5299,7 @@ void AnimWavyMusicNotes(struct Sprite* sprite) sprite->data[4] = sprite->pos1.x << 4; sprite->data[5] = sprite->pos1.y << 4; AnimWavyMusicNotesGetNextPos(a - sprite->pos1.x, b - sprite->pos1.y, &sprite->data[6], &sprite->data[7], 40); - sprite->callback = AnimWavyMusicNotesStep; + sprite->callback = AnimWavyMusicNotes_Step; } static void AnimWavyMusicNotesGetNextPos(s16 a, s16 b, s16* c, s16* d, s8 e) @@ -5319,7 +5318,7 @@ static void AnimWavyMusicNotesGetNextPos(s16 a, s16 b, s16* c, s16* d, s8 e) *d = (b << 8) / g; } -static void AnimWavyMusicNotesStep(struct Sprite* sprite) +static void AnimWavyMusicNotes_Step(struct Sprite* sprite) { s16 y, yDelta; u8 index; @@ -5352,7 +5351,7 @@ static void AnimWavyMusicNotesStep(struct Sprite* sprite) } } -void AnimFlyingMusicNotes(struct Sprite* sprite) +static void AnimFlyingMusicNotes(struct Sprite* sprite) { if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_OPPONENT) gBattleAnimArgs[1] *= -1; @@ -5366,10 +5365,10 @@ void AnimFlyingMusicNotes(struct Sprite* sprite) sprite->data[5] = sprite->pos1.y << 4; sprite->data[6] = (gBattleAnimArgs[1] << 4) / 5; sprite->data[7] = (gBattleAnimArgs[2] << 7) / 5; - sprite->callback = AnimFlyingMusicNotesStep; + sprite->callback = AnimFlyingMusicNotes_Step; } -static void AnimFlyingMusicNotesStep(struct Sprite* sprite) +static void AnimFlyingMusicNotes_Step(struct Sprite* sprite) { sprite->data[4] += sprite->data[6]; sprite->data[5] += sprite->data[7]; @@ -5388,7 +5387,7 @@ static void AnimFlyingMusicNotesStep(struct Sprite* sprite) DestroySpriteAndMatrix(sprite); } -void AnimBellyDrumHand(struct Sprite* sprite) +static void AnimBellyDrumHand(struct Sprite* sprite) { s16 a; if (gBattleAnimArgs[0] == 1) @@ -5427,10 +5426,10 @@ void AnimSlowFlyingMusicNotes(struct Sprite* sprite) sprite->data[4] = sprite->data[3] - 40; InitAnimLinearTranslation(sprite); sprite->data[5] = gBattleAnimArgs[3]; - sprite->callback = AnimSlowFlyingMusicNotesStep; + sprite->callback = AnimSlowFlyingMusicNotes_Step; } -static void AnimSlowFlyingMusicNotesStep(struct Sprite* sprite) +static void AnimSlowFlyingMusicNotes_Step(struct Sprite* sprite) { if (AnimTranslateLinear(sprite) == 0) { @@ -5459,7 +5458,7 @@ void SetSpriteNextToMonHead(u8 battler, struct Sprite* sprite) sprite->pos1.y = GetBattlerSpriteCoord(battler, 3) - (s16)GetBattlerSpriteCoordAttr(battler, BATTLER_COORD_ATTR_HEIGHT) / 4; } -void AnimThoughtBubble(struct Sprite* sprite) +static void AnimThoughtBubble(struct Sprite* sprite) { u8 a; u8 battler; @@ -5473,11 +5472,11 @@ void AnimThoughtBubble(struct Sprite* sprite) sprite->data[0] = gBattleAnimArgs[1]; sprite->data[1] = a + 2; StartSpriteAnim(sprite, a); - StoreSpriteCallbackInData6(sprite, AnimThoughtBubbleStep); + StoreSpriteCallbackInData6(sprite, AnimThoughtBubble_Step); sprite->callback = RunStoredCallbackWhenAnimEnds; } -static void AnimThoughtBubbleStep(struct Sprite* sprite) +static void AnimThoughtBubble_Step(struct Sprite* sprite) { if (--sprite->data[0] == 0) { @@ -5487,7 +5486,7 @@ static void AnimThoughtBubbleStep(struct Sprite* sprite) } } -void AnimMetronomeFinger(struct Sprite* sprite) +static void AnimMetronomeFinger(struct Sprite* sprite) { u8 battler; if (gBattleAnimArgs[0] == 0) @@ -5497,11 +5496,11 @@ void AnimMetronomeFinger(struct Sprite* sprite) SetSpriteNextToMonHead(battler, sprite); sprite->data[0] = 0; - StoreSpriteCallbackInData6(sprite, AnimMetronomeFingerStep); + StoreSpriteCallbackInData6(sprite, AnimMetronomeFinger_Step); sprite->callback = RunStoredCallbackWhenAffineAnimEnds; } -static void AnimMetronomeFingerStep(struct Sprite* sprite) +static void AnimMetronomeFinger_Step(struct Sprite* sprite) { if (++sprite->data[0] > 16) { @@ -5511,7 +5510,7 @@ static void AnimMetronomeFingerStep(struct Sprite* sprite) } } -void AnimFollowMeFinger(struct Sprite* sprite) +static void AnimFollowMeFinger(struct Sprite* sprite) { u8 battler; if (gBattleAnimArgs[0] == 0) @@ -5529,17 +5528,17 @@ void AnimFollowMeFinger(struct Sprite* sprite) sprite->data[2] = sprite->subpriority; sprite->data[3] = sprite->subpriority + 4; sprite->data[4] = 0; - StoreSpriteCallbackInData6(sprite, AnimFollowMeFingerStep1); + StoreSpriteCallbackInData6(sprite, AnimFollowMeFinger_Step1); sprite->callback = RunStoredCallbackWhenAffineAnimEnds; } -static void AnimFollowMeFingerStep1(struct Sprite* sprite) +static void AnimFollowMeFinger_Step1(struct Sprite* sprite) { if (++sprite->data[4] > 12) - sprite->callback = AnimFollowMeFingerStep2; + sprite->callback = AnimFollowMeFinger_Step2; } -static void AnimFollowMeFingerStep2(struct Sprite* sprite) +static void AnimFollowMeFinger_Step2(struct Sprite* sprite) { s16 x1, x2; @@ -5549,7 +5548,7 @@ static void AnimFollowMeFingerStep2(struct Sprite* sprite) if (--sprite->data[0] == 0) { sprite->pos2.x = 0; - sprite->callback = AnimMetronomeFingerStep; + sprite->callback = AnimMetronomeFinger_Step; return; } else @@ -5569,7 +5568,7 @@ static void AnimFollowMeFingerStep2(struct Sprite* sprite) sprite->pos2.x = (x1 >> 3) + (x2 >> 1); } -void AnimTauntFinger(struct Sprite* sprite) +static void AnimTauntFinger(struct Sprite* sprite) { u8 battler; if (gBattleAnimArgs[0] == 0) @@ -5589,21 +5588,21 @@ void AnimTauntFinger(struct Sprite* sprite) sprite->data[0] = 3; } - sprite->callback = AnimTauntFingerStep1; + sprite->callback = AnimTauntFinger_Step1; } -static void AnimTauntFingerStep1(struct Sprite* sprite) +static void AnimTauntFinger_Step1(struct Sprite* sprite) { if (++sprite->data[1] > 10) { sprite->data[1] = 0; StartSpriteAnim(sprite, sprite->data[0]); - StoreSpriteCallbackInData6(sprite, AnimTauntFingerStep2); + StoreSpriteCallbackInData6(sprite, AnimTauntFinger_Step2); sprite->callback = RunStoredCallbackWhenAnimEnds; } } -static void AnimTauntFingerStep2(struct Sprite* sprite) +static void AnimTauntFinger_Step2(struct Sprite* sprite) { if (++sprite->data[1] > 5) DestroyAnimSprite(sprite); diff --git a/src/battle_anim_effects_2.c b/src/battle_anim_effects_2.c index dcbcced39..cf85e697a 100755 --- a/src/battle_anim_effects_2.c +++ b/src/battle_anim_effects_2.c @@ -16,70 +16,43 @@ #include "constants/rgb.h" #include "constants/songs.h" -void sub_8103448(struct Sprite *); -void sub_8103498(struct Sprite *); -void sub_810358C(struct Sprite *); -void sub_8103620(struct Sprite *); -void Anim_KinesisZapEnergy(struct Sprite *); -void Anim_SwordsDanceBlade(struct Sprite *); -void AnimSonicBoomProjectile(struct Sprite *); -void AnimAirWaveProjectile(struct Sprite *); -void sub_8103FE8(struct Sprite *); -void AnimCoinThrow(struct Sprite *); -void AnimFallingCoin(struct Sprite *); -void AnimBulletSeed(struct Sprite *); -void AnimRazorWindTornado(struct Sprite *); -void AnimViceGripPincer(struct Sprite *); -void AnimGuillotinePincer(struct Sprite *); -void AnimBreathPuff(struct Sprite *); -void AnimAngerMark(struct Sprite *); -void AnimPencil(struct Sprite *); -void AnimBlendThinRing(struct Sprite *); -void AnimHyperVoiceRing(struct Sprite *); -void AnimUproarRing(struct Sprite *); -void AnimSoftBoiledEgg(struct Sprite *); -void AnimSpeedDust(struct Sprite *); -void AnimHealBellMusicNote(struct Sprite *); -void AnimMagentaHeart(struct Sprite *); -void AnimRedHeartProjectile(struct Sprite *); -void AnimParticuleBurst(struct Sprite *); -void AnimRedHeartRising(struct Sprite *); -void AnimOrbitFast(struct Sprite *); -void AnimOrbitScatter(struct Sprite *); -void AnimSpitUpOrb(struct Sprite *); -void AnimEyeSparkle(struct Sprite *); -void AnimAngel(struct Sprite *); -void AnimPinkHeart(struct Sprite *); -void AnimDevil(struct Sprite *); -void AnimFurySwipes(struct Sprite *); -void AnimMovmentWaves(struct Sprite *); -void AnimJaggedMusicNote(struct Sprite *); -void AnimPerishSongMusicNote2(struct Sprite *); -void AnimPerishSongMusicNote(struct Sprite *); -void AnimGuardRing(struct Sprite *); +static void sub_8103448(struct Sprite *); +static void sub_8103498(struct Sprite *); static void sub_81034D8(struct Sprite *); +static void sub_810358C(struct Sprite *); +static void sub_8103620(struct Sprite *); static void sub_8103658(struct Sprite *); static void sub_8103680(struct Sprite *); -static void AnimTask_WithdrawStep(u8); -static void AnimSwordsDanceBladeStep(struct Sprite *); +static void AnimKinesisZapEnergy(struct Sprite *); +static void AnimSwordsDanceBlade(struct Sprite *); +static void AnimSwordsDanceBlade_Step(struct Sprite *); +static void AnimSonicBoomProjectile(struct Sprite *); +static void AnimAirWaveProjectile(struct Sprite *); +static void AnimAirWaveProjectile_Step1(struct Sprite *sprite); +static void AnimAirWaveProjectile_Step2(struct Sprite *sprite); +static void sub_8103FE8(struct Sprite *); static void sub_8104018(struct Sprite *); +static void AnimCoinThrow(struct Sprite *); +static void AnimFallingCoin(struct Sprite *); static void AnimFallingCoin_Step(struct Sprite *); +static void AnimBulletSeed(struct Sprite *); static void AnimBulletSeed_Step1(struct Sprite *); static void AnimBulletSeed_Step2(struct Sprite *); -static void AnimViceGripPincerStep(struct Sprite *); -static void AnimGuillotinePincerStep1(struct Sprite *); -static void AnimGuillotinePincerStep2(struct Sprite *); -static void AnimGuillotinePincerStep3(struct Sprite *); -static void AnimTask_GrowAndGreyscaleStep(u8); -static void AnimTask_MinimizeStep1(u8); -static void CreateMinimizeSprite(struct Task *, u8); -static void ClonedMinizeSprite_Step(struct Sprite *); -static void AnimTask_SplashStep(u8); -static void AnimTask_GrowAndShrinkStep(u8); -static void ThrashMoveMonStep(u8); -static void ThrashMoveMon(u8); -static void AnimTask_SketchDrawMon(u8); +static void AnimRazorWindTornado(struct Sprite *); +static void AnimViceGripPincer(struct Sprite *); +static void AnimViceGripPincer_Step(struct Sprite *); +static void AnimGuillotinePincer(struct Sprite *); +static void AnimGuillotinePincer_Step1(struct Sprite *); +static void AnimGuillotinePincer_Step2(struct Sprite *); +static void AnimGuillotinePincer_Step3(struct Sprite *); +static void AnimBreathPuff(struct Sprite *); +static void AnimAngerMark(struct Sprite *); +static void AnimPencil(struct Sprite *); static void AnimPencil_Step(struct Sprite *); +static void AnimBlendThinRing(struct Sprite *); +static void AnimHyperVoiceRing(struct Sprite *); +static void AnimUproarRing(struct Sprite *); +static void AnimSoftBoiledEgg(struct Sprite *); static void AnimSoftBoiledEgg_Step1(struct Sprite *); static void AnimSoftBoiledEgg_Step2(struct Sprite *); static void AnimSoftBoiledEgg_Step3(struct Sprite *); @@ -87,23 +60,53 @@ static void AnimSoftBoiledEgg_Step3_Callback1(struct Sprite *); static void AnimSoftBoiledEgg_Step3_Callback2(struct Sprite *); static void AnimSoftBoiledEgg_Step4(struct Sprite *); static void AnimSoftBoiledEgg_Step4_Callback(struct Sprite *); -static void StretchAttacker_Step(u8); -static void ExtremeSpeedImpact_Step(u8); -static void ExtremeSpeedMonReappear_Step(u8); -static void SpeedDust_Step1(u8); -static void FakeOutStep1(u8); -static void FakeOutStep2(u8); +static void AnimSpeedDust(struct Sprite *); +static void AnimHealBellMusicNote(struct Sprite *); +static void AnimMagentaHeart(struct Sprite *); +static void AnimRedHeartProjectile(struct Sprite *); static void AnimRedHeartProjectile_Step(struct Sprite *); +static void AnimRedHeartRising(struct Sprite *); static void AnimRedHeartRising_Step(struct Sprite *); -static void HeartsBackground_Step(u8); -static void ScaryFace_Step(u8); -static void AnimOrbitFastStep(struct Sprite *); -static void AnimOrbitScatterStep(struct Sprite *); +static void AnimOrbitFast(struct Sprite *); +static void AnimOrbitFast_Step(struct Sprite *); +static void AnimOrbitScatter(struct Sprite *); +static void AnimOrbitScatter_Step(struct Sprite *); +static void AnimSpitUpOrb(struct Sprite *); +static void AnimSpitUpOrb_Step(struct Sprite *sprite); +static void AnimEyeSparkle(struct Sprite *); +static void AnimEyeSparkle_Step(struct Sprite *sprite); +static void AnimAngel(struct Sprite *); +static void AnimPinkHeart(struct Sprite *); +static void AnimDevil(struct Sprite *); +static void AnimFurySwipes(struct Sprite *); +static void AnimMovmentWaves(struct Sprite *); static void AnimMovmentWaves_Step(struct Sprite *); -static void UproarDistortion_Step(u8); +static void AnimJaggedMusicNote(struct Sprite *); static void AnimJaggedMusicNote_Step(struct Sprite *); +static void AnimPerishSongMusicNote2(struct Sprite *); +static void AnimPerishSongMusicNote(struct Sprite *); static void AnimPerishSongMusicNote_Step1(struct Sprite *); static void AnimPerishSongMusicNote_Step2(struct Sprite *); +static void AnimGuardRing(struct Sprite *); +static void AnimTask_Withdraw_Step(u8); +static void AnimTask_GrowAndGreyscale_Step(u8); +static void AnimTask_Minimize_Step(u8); +static void CreateMinimizeSprite(struct Task *, u8); +static void ClonedMinizeSprite_Step(struct Sprite *); +static void AnimTask_Splash_Step(u8); +static void AnimTask_GrowAndShrink_Step(u8); +static void AnimTask_ThrashMoveMonHorizontal_Step(u8); +static void AnimTask_ThrashMoveMonVertical_Step(u8); +static void AnimTask_SketchDrawMon_Step(u8); +static void AnimTask_AttackerStretchAndDisappear_Step(u8); +static void AnimTask_ExtremeSpeedImpact_Step(u8); +static void AnimTask_ExtremeSpeedMonReappear_Step(u8); +static void AnimTask_SpeedDust_Step(u8); +static void AnimTask_FakeOut_Step1(u8); +static void AnimTask_FakeOut_Step2(u8); +static void AnimTask_HeartsBackground_Step(u8); +static void AnimTask_ScaryFace_Step(u8); +static void AnimTask_UproarDistortion_Step(u8); // Unused const struct SpriteTemplate gUnknown_08593264 = @@ -123,6 +126,7 @@ const union AnimCmd gUnknown_0859327C[] = ANIMCMD_END, }; +// Unused const union AnimCmd *const gUnknown_08593284[] = { gUnknown_0859327C, @@ -152,7 +156,6 @@ const struct SpriteTemplate gUnknown_085932A0 = .callback = sub_810358C, }; -extern const union AffineAnimCmd *const gUnknown_08597060[]; // Unused const struct SpriteTemplate gUnknown_085932B8 = { @@ -161,7 +164,7 @@ const struct SpriteTemplate gUnknown_085932B8 = .oam = &gOamData_AffineNormal_ObjBlend_64x64, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_08597060, + .affineAnims = gAffineAnims_Bite, .callback = sub_8103620, }; @@ -229,7 +232,7 @@ const struct SpriteTemplate gKinesisZapEnergySpriteTemplate = .anims = gKinesisZapEnergyAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = Anim_KinesisZapEnergy, + .callback = AnimKinesisZapEnergy, }; const union AffineAnimCmd gSwordsDanceBladeAffineAnimCmds[] = @@ -253,7 +256,7 @@ const struct SpriteTemplate gSwordsDanceBladeSpriteTemplate = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gSwordsDanceBladeAffineAnimTable, - .callback = Anim_SwordsDanceBlade, + .callback = AnimSwordsDanceBlade, }; const struct SpriteTemplate gSonicBoomSpriteTemplate = @@ -307,7 +310,7 @@ const union AffineAnimCmd *const gWaterPulseRingAffineAnimTable[] = gWaterPulseRingAffineAnimCmds, }; -const struct SpriteTemplate gSupersonicWaveSpriteTemplate = +const struct SpriteTemplate gSupersonicRingSpriteTemplate = { .tileTag = ANIM_TAG_GOLD_RING, .paletteTag = ANIM_TAG_GOLD_RING, @@ -318,7 +321,7 @@ const struct SpriteTemplate gSupersonicWaveSpriteTemplate = .callback = TranslateAnimSpriteToTargetMonLocation, }; -const struct SpriteTemplate gScreechWaveSpriteTemplate = +const struct SpriteTemplate gScreechRingSpriteTemplate = { .tileTag = ANIM_TAG_PURPLE_RING, .paletteTag = ANIM_TAG_PURPLE_RING, @@ -632,7 +635,7 @@ const struct SpriteTemplate gSnoreZSpriteTemplate = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = AnimSnoreZ, + .callback = AnimTravelDiagonally, }; const union AnimCmd gExplosionAnimCmds[] = @@ -877,7 +880,9 @@ const struct SpriteTemplate gBellSpriteTemplate = .callback = AnimSpriteOnMonPos, }; -const u16 gMusicNotePaletteTagsTable[] = +#define NUM_MUSIC_NOTE_PAL_TAGS 3 + +static const u16 sMusicNotePaletteTagsTable[NUM_MUSIC_NOTE_PAL_TAGS] = { ANIM_TAG_MUSIC_NOTES_2, ANIM_SPRITES_START - 1, @@ -906,7 +911,7 @@ const struct SpriteTemplate gMagentaHeartSpriteTemplate = .callback = AnimMagentaHeart, }; -const union AffineAnimCmd gUnknown_08593988[] = +static const union AffineAnimCmd sAffineAnims_StretchBattlerUp[] = { AFFINEANIMCMD_FRAME(0x000A, 0xFFF3, 0x00, 0x0A), AFFINEANIMCMD_FRAME(0xFFF6, 0x000D, 0x00, 0x0A), @@ -932,7 +937,7 @@ const struct SpriteTemplate gRedHeartBurstSpriteTemplate = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = AnimParticuleBurst, + .callback = AnimParticleBurst, }; const struct SpriteTemplate gRedHeartRisingSpriteTemplate = @@ -1161,7 +1166,7 @@ const struct SpriteTemplate gMovementWavesSpriteTemplate = .callback = AnimMovmentWaves, }; -const union AffineAnimCmd gUnknown_08593B98[] = +static const union AffineAnimCmd sAffineAnims_UproarDistortion[] = { AFFINEANIMCMD_FRAME(-12, 8, 0, 4), AFFINEANIMCMD_FRAME(20, -20, 0, 4), @@ -1257,7 +1262,7 @@ const struct SpriteTemplate gGuardRingSpriteTemplate = .callback = AnimGuardRing, }; -void sub_8103448(struct Sprite *sprite) +static void sub_8103448(struct Sprite *sprite) { SetSpriteCoordsToAnimAttackerCoords(sprite); SetAnimSpriteInitialXOffset(sprite, gBattleAnimArgs[0]); @@ -1271,7 +1276,7 @@ void sub_8103448(struct Sprite *sprite) sprite->callback(sprite); } -void sub_8103498(struct Sprite *sprite) +static void sub_8103498(struct Sprite *sprite) { u8 battler; if (gBattleAnimArgs[0] == 0) @@ -1321,7 +1326,7 @@ static void sub_810353C(struct Sprite *sprite) sprite->data[0]--; } -void sub_810358C(struct Sprite *sprite) +static void sub_810358C(struct Sprite *sprite) { u8 spriteId; sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2); @@ -1337,10 +1342,10 @@ void sub_810358C(struct Sprite *sprite) sprite->data[1] = gBattleAnimArgs[3]; sprite->data[2] = spriteId; sprite->callback = sub_810353C; - sprite->invisible = 1; + sprite->invisible = TRUE; } -void sub_8103620(struct Sprite *sprite) +static void sub_8103620(struct Sprite *sprite) { InitSpritePosToAnimAttacker(sprite, TRUE); sprite->data[0] = gBattleAnimArgs[2]; @@ -1372,10 +1377,10 @@ static void sub_8103680(struct Sprite *sprite) void AnimTask_Withdraw(u8 taskId) { PrepareBattlerSpriteForRotScale(gBattlerSpriteIds[gBattleAnimAttacker], ST_OAM_OBJ_NORMAL); - gTasks[taskId].func = AnimTask_WithdrawStep; + gTasks[taskId].func = AnimTask_Withdraw_Step; } -static void AnimTask_WithdrawStep(u8 taskId) +static void AnimTask_Withdraw_Step(u8 taskId) { u8 spriteId = gBattlerSpriteIds[gBattleAnimAttacker]; s16 rotation; @@ -1424,7 +1429,7 @@ static void AnimTask_WithdrawStep(u8 taskId) // arg 0: x pixel offset // arg 1: y pixel offset // arg 2: vertical flip -void Anim_KinesisZapEnergy(struct Sprite *sprite) +static void AnimKinesisZapEnergy(struct Sprite *sprite) { SetSpriteCoordsToAnimAttackerCoords(sprite); if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER) @@ -1452,14 +1457,14 @@ void Anim_KinesisZapEnergy(struct Sprite *sprite) // Animates a sword that rises into the air after a brief pause. // arg 0: x pixel offset // arg 1: y pixel offset -void Anim_SwordsDanceBlade(struct Sprite *sprite) +static void AnimSwordsDanceBlade(struct Sprite *sprite) { InitSpritePosToAnimAttacker(sprite, FALSE); sprite->callback = RunStoredCallbackWhenAffineAnimEnds; - StoreSpriteCallbackInData6(sprite, AnimSwordsDanceBladeStep); + StoreSpriteCallbackInData6(sprite, AnimSwordsDanceBlade_Step); } -static void AnimSwordsDanceBladeStep(struct Sprite *sprite) +static void AnimSwordsDanceBlade_Step(struct Sprite *sprite) { sprite->data[0] = 6; sprite->data[2] = sprite->pos1.x; @@ -1475,7 +1480,7 @@ static void AnimSwordsDanceBladeStep(struct Sprite *sprite) // arg 2: target x pixel offset // arg 3: target y pixel offset // arg 4: duration -void AnimSonicBoomProjectile(struct Sprite *sprite) +static void AnimSonicBoomProjectile(struct Sprite *sprite) { s16 targetXPos; s16 targetYPos; @@ -1550,7 +1555,7 @@ static void AnimAirWaveProjectile_Step1(struct Sprite *sprite) } } -void AnimAirWaveProjectile(struct Sprite *sprite) +static void AnimAirWaveProjectile(struct Sprite *sprite) { s16 a; s16 b; @@ -1733,7 +1738,7 @@ void AnimTask_AirCutterProjectile(u8 taskId) gTasks[taskId].func = AirCutterProjectileStep1; } -void sub_8103FE8(struct Sprite *sprite) +static void sub_8103FE8(struct Sprite *sprite) { InitSpritePosToAnimAttacker(sprite, FALSE); sprite->data[0] = 0x100 + (IndexOfSpritePaletteTag(gUnknown_085934A0.paletteTag) << 4); @@ -1760,7 +1765,7 @@ static void sub_8104018(struct Sprite *sprite) } } -void AnimCoinThrow(struct Sprite *sprite) +static void AnimCoinThrow(struct Sprite *sprite) { s16 r6; s16 r7; @@ -1783,7 +1788,7 @@ void AnimCoinThrow(struct Sprite *sprite) StoreSpriteCallbackInData6(sprite, DestroyAnimSprite); } -void AnimFallingCoin(struct Sprite *sprite) +static void AnimFallingCoin(struct Sprite *sprite) { sprite->data[2] = -16; sprite->pos1.y += 8; @@ -1808,7 +1813,7 @@ static void AnimFallingCoin_Step(struct Sprite *sprite) } } -void AnimBulletSeed(struct Sprite *sprite) +static void AnimBulletSeed(struct Sprite *sprite) { InitSpritePosToAnimAttacker(sprite, TRUE); sprite->data[0] = 20; @@ -1867,7 +1872,7 @@ static void AnimBulletSeed_Step2(struct Sprite *sprite) // arg 4: initial wave offset // arg 5: wave period (higher means faster wave) // arg 6: duration -void AnimRazorWindTornado(struct Sprite *sprite) +static void AnimRazorWindTornado(struct Sprite *sprite) { InitSpritePosToAnimAttacker(sprite, FALSE); if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_PLAYER) @@ -1885,7 +1890,7 @@ void AnimRazorWindTornado(struct Sprite *sprite) // Animates a single pincer line that extends towards the center of the target mon. // arg 0: invert -void AnimViceGripPincer(struct Sprite *sprite) +static void AnimViceGripPincer(struct Sprite *sprite) { s16 startXOffset = 32; s16 startYOffset = -32; @@ -1906,10 +1911,10 @@ void AnimViceGripPincer(struct Sprite *sprite) sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2) + endXOffset; sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET) + endYOffset; sprite->callback = StartAnimLinearTranslation; - StoreSpriteCallbackInData6(sprite, AnimViceGripPincerStep); + StoreSpriteCallbackInData6(sprite, AnimViceGripPincer_Step); } -static void AnimViceGripPincerStep(struct Sprite *sprite) +static void AnimViceGripPincer_Step(struct Sprite *sprite) { if (sprite->animEnded) DestroyAnimSprite(sprite); @@ -1917,7 +1922,7 @@ static void AnimViceGripPincerStep(struct Sprite *sprite) // Animates a single pincer line that extends towards the center of the target mon, and then back out. // arg 0: animation id -void AnimGuillotinePincer(struct Sprite *sprite) +static void AnimGuillotinePincer(struct Sprite *sprite) { s16 startXOffset = 32; s16 startYOffset = -32; @@ -1942,10 +1947,10 @@ void AnimGuillotinePincer(struct Sprite *sprite) InitAnimLinearTranslation(sprite); sprite->data[5] = gBattleAnimArgs[0]; sprite->data[6] = sprite->data[0]; - sprite->callback = AnimGuillotinePincerStep1; + sprite->callback = AnimGuillotinePincer_Step1; } -static void AnimGuillotinePincerStep1(struct Sprite *sprite) +static void AnimGuillotinePincer_Step1(struct Sprite *sprite) { if (AnimTranslateLinear(sprite) && sprite->animEnded) { @@ -1960,11 +1965,11 @@ static void AnimGuillotinePincerStep1(struct Sprite *sprite) sprite->data[2] ^= 1; sprite->data[4] = 0; sprite->data[3] = 0; - sprite->callback = AnimGuillotinePincerStep2; + sprite->callback = AnimGuillotinePincer_Step2; } } -static void AnimGuillotinePincerStep2(struct Sprite *sprite) +static void AnimGuillotinePincer_Step2(struct Sprite *sprite) { if (sprite->data[3]) { @@ -1981,11 +1986,11 @@ static void AnimGuillotinePincerStep2(struct Sprite *sprite) sprite->data[3] = 0; sprite->animPaused = 0; StartSpriteAnim(sprite, sprite->data[5] ^ 1); - sprite->callback = AnimGuillotinePincerStep3; + sprite->callback = AnimGuillotinePincer_Step3; } } -static void AnimGuillotinePincerStep3(struct Sprite *sprite) +static void AnimGuillotinePincer_Step3(struct Sprite *sprite) { if (AnimTranslateLinear(sprite)) DestroyAnimSprite(sprite); @@ -2001,10 +2006,10 @@ void AnimTask_GrowAndGreyscale(u8 taskId) SetSpriteRotScale(spriteId, 0xD0, 0xD0, 0); SetGreyscaleOrOriginalPalette(gSprites[spriteId].oam.paletteNum + 16, FALSE); gTasks[taskId].data[0] = 80; - gTasks[taskId].func = AnimTask_GrowAndGreyscaleStep; + gTasks[taskId].func = AnimTask_GrowAndGreyscale_Step; } -static void AnimTask_GrowAndGreyscaleStep(u8 taskId) +static void AnimTask_GrowAndGreyscale_Step(u8 taskId) { if (--gTasks[taskId].data[0] == -1) { @@ -2031,10 +2036,10 @@ void AnimTask_Minimize(u8 taskId) task->data[5] = 0; task->data[6] = 0; task->data[7] = GetBattlerSpriteSubpriority(gBattleAnimAttacker); - task->func = AnimTask_MinimizeStep1; + task->func = AnimTask_Minimize_Step; } -static void AnimTask_MinimizeStep1(u8 taskId) +static void AnimTask_Minimize_Step(u8 taskId) { struct Task* task = &gTasks[taskId]; switch (task->data[1]) @@ -2159,11 +2164,11 @@ void AnimTask_Splash(u8 taskId) task->data[3] = 0; task->data[4] = 0; PrepareAffineAnimInTaskData(task, spriteId, gSplashEffectAffineAnimCmds); - task->func = AnimTask_SplashStep; + task->func = AnimTask_Splash_Step; } } -static void AnimTask_SplashStep(u8 taskId) +static void AnimTask_Splash_Step(u8 taskId) { struct Task* task = &gTasks[taskId]; switch (task->data[1]) @@ -2222,10 +2227,10 @@ void AnimTask_GrowAndShrink(u8 taskId) struct Task* task = &gTasks[taskId]; u8 spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER); PrepareAffineAnimInTaskData(task, spriteId, gGrowAndShrinkAffineAnimCmds); - task->func = AnimTask_GrowAndShrinkStep; + task->func = AnimTask_GrowAndShrink_Step; } -static void AnimTask_GrowAndShrinkStep(u8 taskId) +static void AnimTask_GrowAndShrink_Step(u8 taskId) { struct Task* task = &gTasks[taskId]; if (!RunAffineAnimFromTaskData(task)) @@ -2235,7 +2240,7 @@ static void AnimTask_GrowAndShrinkStep(u8 taskId) // Animates a little puff of the mon's breath. // Used by MOVE_SWAGGER and MOVE_BULK_UP // No args. -void AnimBreathPuff(struct Sprite *sprite) +static void AnimBreathPuff(struct Sprite *sprite) { if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_PLAYER) { @@ -2263,7 +2268,7 @@ void AnimBreathPuff(struct Sprite *sprite) // arg 0: target mon (0 = attacker, 1 = target) // arg 1: x pixel offset // arg 2: y pixel offset -void AnimAngerMark(struct Sprite *sprite) +static void AnimAngerMark(struct Sprite *sprite) { u8 battler; if (!gBattleAnimArgs[0]) @@ -2291,10 +2296,10 @@ void AnimTask_ThrashMoveMonHorizontal(u8 taskId) task->data[0] = spriteId; task->data[1] = 0; PrepareAffineAnimInTaskData(task, spriteId, gThrashMoveMonAffineAnimCmds); - task->func = ThrashMoveMonStep; + task->func = AnimTask_ThrashMoveMonHorizontal_Step; } -static void ThrashMoveMonStep(u8 taskId) +static void AnimTask_ThrashMoveMonHorizontal_Step(u8 taskId) { struct Task* task = &gTasks[taskId]; if (!RunAffineAnimFromTaskData(task)) @@ -2318,10 +2323,10 @@ void AnimTask_ThrashMoveMonVertical(u8 taskId) if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_OPPONENT) task->data[2] *= -1; - task->func = ThrashMoveMon; + task->func = AnimTask_ThrashMoveMonVertical_Step; } -static void ThrashMoveMon(u8 taskId) +static void AnimTask_ThrashMoveMonVertical_Step(u8 taskId) { struct Task* task = &gTasks[taskId]; if (++task->data[7] > 2) @@ -2372,7 +2377,7 @@ static void ThrashMoveMon(u8 taskId) } } -void sub_8104E74(u8 taskId) +void AnimTask_SketchDrawMon(u8 taskId) { struct Task* task = &gTasks[taskId]; struct ScanlineEffectParams params; @@ -2410,10 +2415,10 @@ void sub_8104E74(u8 taskId) params.initState = 1; params.unused9 = 0; ScanlineEffect_SetParams(params); - task->func = AnimTask_SketchDrawMon; + task->func = AnimTask_SketchDrawMon_Step; } -static void AnimTask_SketchDrawMon(u8 taskId) +static void AnimTask_SketchDrawMon_Step(u8 taskId) { struct Task* task = &gTasks[taskId]; @@ -2460,7 +2465,7 @@ static void AnimTask_SketchDrawMon(u8 taskId) } } -void AnimPencil(struct Sprite *sprite) +static void AnimPencil(struct Sprite *sprite) { sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimTarget, 0) - 16; sprite->pos1.y = GetBattlerYCoordWithElevation(gBattleAnimTarget) + 16; @@ -2486,7 +2491,7 @@ static void AnimPencil_Step(struct Sprite *sprite) } if (++sprite->data[1] > 16) { - sprite->invisible = 0; + sprite->invisible = FALSE; sprite->data[0]++; } break; @@ -2526,14 +2531,14 @@ static void AnimPencil_Step(struct Sprite *sprite) } if (++sprite->data[1] > 16) { - sprite->invisible = 0; + sprite->invisible = FALSE; DestroyAnimSprite(sprite); } break; } } -void AnimBlendThinRing(struct Sprite *sprite) +static void AnimBlendThinRing(struct Sprite *sprite) { u8 battler = 0; u16 sp0 = 0; @@ -2573,7 +2578,7 @@ void sub_8105284(struct Sprite *sprite) } } -void AnimHyperVoiceRing(struct Sprite *sprite) +static void AnimHyperVoiceRing(struct Sprite *sprite) { u16 r9 = 0; u16 r6 = 0; @@ -2658,7 +2663,7 @@ void AnimHyperVoiceRing(struct Sprite *sprite) sprite->callback(sprite); } -void AnimUproarRing(struct Sprite *sprite) +static void AnimUproarRing(struct Sprite *sprite) { u8 index = IndexOfSpritePaletteTag(ANIM_TAG_THIN_RING); if (index != 0xFF) @@ -2671,7 +2676,7 @@ void AnimUproarRing(struct Sprite *sprite) sprite->callback(sprite); } -void AnimSoftBoiledEgg(struct Sprite *sprite) +static void AnimSoftBoiledEgg(struct Sprite *sprite) { s16 r1; InitSpritePosToAnimAttacker(sprite, FALSE); @@ -2758,7 +2763,7 @@ static void AnimSoftBoiledEgg_Step4(struct Sprite *sprite) { if ((u16)gBattleAnimArgs[7] == 0xFFFF) { - sprite->invisible = 1; + sprite->invisible = TRUE; if (sprite->data[7] == 0) sprite->callback = AnimSoftBoiledEgg_Step4_Callback; else @@ -2773,22 +2778,23 @@ static void AnimSoftBoiledEgg_Step4_Callback(struct Sprite *sprite) DestroyAnimSprite(sprite); } -void AnimTask_StretchAttacker(u8 taskId) +// Used by Extremespeed +void AnimTask_AttackerStretchAndDisappear(u8 taskId) { struct Task* task = &gTasks[taskId]; u8 spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER); task->data[0] = spriteId; PrepareAffineAnimInTaskData(task, spriteId, gStretchAttackerAffineAnimCmds); - task->func = StretchAttacker_Step; + task->func = AnimTask_AttackerStretchAndDisappear_Step; } -static void StretchAttacker_Step(u8 taskId) +static void AnimTask_AttackerStretchAndDisappear_Step(u8 taskId) { struct Task* task = &gTasks[taskId]; if (!RunAffineAnimFromTaskData(task)) { gSprites[task->data[0]].pos2.y = 0; - gSprites[task->data[0]].invisible = 1; + gSprites[task->data[0]].invisible = TRUE; DestroyAnimVisualTask(taskId); } } @@ -2813,10 +2819,10 @@ void AnimTask_ExtremeSpeedImpact(u8 taskId) } task->data[15] = GetAnimBattlerSpriteId(ANIM_TARGET); - task->func = ExtremeSpeedImpact_Step; + task->func = AnimTask_ExtremeSpeedImpact_Step; } -static void ExtremeSpeedImpact_Step(u8 taskId) +static void AnimTask_ExtremeSpeedImpact_Step(u8 taskId) { struct Task* task = &gTasks[taskId]; @@ -2873,19 +2879,19 @@ void AnimTask_ExtremeSpeedMonReappear(u8 taskId) task->data[13] = 14; task->data[14] = 2; task->data[15] = GetAnimBattlerSpriteId(ANIM_ATTACKER); - task->func = ExtremeSpeedMonReappear_Step; + task->func = AnimTask_ExtremeSpeedMonReappear_Step; } -static void ExtremeSpeedMonReappear_Step(u8 taskId) +static void AnimTask_ExtremeSpeedMonReappear_Step(u8 taskId) { struct Task* task = &gTasks[taskId]; if (task->data[0] == 0 && ++task->data[1] > task->data[4]) { task->data[1] = 0; if (++task->data[2] & 1) - gSprites[task->data[15]].invisible = 0; + gSprites[task->data[15]].invisible = FALSE; else - gSprites[task->data[15]].invisible = 1; + gSprites[task->data[15]].invisible = TRUE; if (++task->data[3] >= task->data[13]) { @@ -2897,7 +2903,7 @@ static void ExtremeSpeedMonReappear_Step(u8 taskId) } else { - gSprites[task->data[15]].invisible = 0; + gSprites[task->data[15]].invisible = FALSE; DestroyAnimVisualTask(taskId); } } @@ -2919,10 +2925,10 @@ void AnimTask_SpeedDust(u8 taskId) task->data[13] = 0; task->data[14] = GetBattlerSpriteCoord(gBattleAnimAttacker, ANIM_ATTACKER); task->data[15] = GetBattlerSpriteCoord(gBattleAnimAttacker, ANIM_TARGET); - task->func = SpeedDust_Step1; + task->func = AnimTask_SpeedDust_Step; } -static void SpeedDust_Step1(u8 taskId) +static void AnimTask_SpeedDust_Step(u8 taskId) { struct Task* task = &gTasks[taskId]; switch (task->data[8]) @@ -2988,7 +2994,7 @@ static void SpeedDust_Step1(u8 taskId) } } -void AnimSpeedDust(struct Sprite *sprite) +static void AnimSpeedDust(struct Sprite *sprite) { sprite->invisible = gTasks[sprite->data[0]].data[5]; if (sprite->animEnded) @@ -2998,29 +3004,29 @@ void AnimSpeedDust(struct Sprite *sprite) } } -void sub_8105CB4(u8 taskId) +void AnimTask_LoadMusicNotesPals(u8 taskId) { int i; - u8 paletteNums[3]; + u8 paletteNums[NUM_MUSIC_NOTE_PAL_TAGS]; paletteNums[0] = IndexOfSpritePaletteTag(ANIM_TAG_MUSIC_NOTES_2); - for (i = 1; i < 3; i++) + for (i = 1; i < NUM_MUSIC_NOTE_PAL_TAGS; i++) paletteNums[i] = AllocSpritePalette(ANIM_SPRITES_START - i); - gMonSpritesGfxPtr->field_17C = AllocZeroed(0x2000); - LZDecompressWram(gBattleAnimSpritePal_MusicNotes2, gMonSpritesGfxPtr->field_17C); - for (i = 0; i < 3; i++) - LoadPalette(&gMonSpritesGfxPtr->field_17C[i * 32], (u16)((paletteNums[i] << 4) + 0x100), 32); + gMonSpritesGfxPtr->buffer = AllocZeroed(0x2000); + LZDecompressWram(gBattleAnimSpritePal_MusicNotes2, gMonSpritesGfxPtr->buffer); + for (i = 0; i < NUM_MUSIC_NOTE_PAL_TAGS; i++) + LoadPalette(&gMonSpritesGfxPtr->buffer[i * 32], (u16)((paletteNums[i] << 4) + 0x100), 32); - FREE_AND_SET_NULL(gMonSpritesGfxPtr->field_17C); + FREE_AND_SET_NULL(gMonSpritesGfxPtr->buffer); DestroyAnimVisualTask(taskId); } -void sub_8105D60(u8 taskId) +void AnimTask_FreeMusicNotesPals(u8 taskId) { int i; - for (i = 0; i < 3; i++) - FreeSpritePaletteByTag(gMusicNotePaletteTagsTable[i]); + for (i = 0; i < NUM_MUSIC_NOTE_PAL_TAGS; i++) + FreeSpritePaletteByTag(sMusicNotePaletteTagsTable[i]); DestroyAnimVisualTask(taskId); } @@ -3031,10 +3037,10 @@ static void SetMusicNotePalette(struct Sprite *sprite, u8 a, u8 b) tile = (b & 1); tile = ((-tile | tile) >> 31) & 32; sprite->oam.tileNum += tile + (a << 2); - sprite->oam.paletteNum = IndexOfSpritePaletteTag(gMusicNotePaletteTagsTable[b >> 1]); + sprite->oam.paletteNum = IndexOfSpritePaletteTag(sMusicNotePaletteTagsTable[b >> 1]); } -void AnimHealBellMusicNote(struct Sprite *sprite) +static void AnimHealBellMusicNote(struct Sprite *sprite) { InitSpritePosToAnimAttacker(sprite, FALSE); if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER) @@ -3048,7 +3054,7 @@ void AnimHealBellMusicNote(struct Sprite *sprite) SetMusicNotePalette(sprite, gBattleAnimArgs[5], gBattleAnimArgs[6]); } -void AnimMagentaHeart(struct Sprite *sprite) +static void AnimMagentaHeart(struct Sprite *sprite) { if (++sprite->data[0] == 1) InitSpritePosToAnimAttacker(sprite, FALSE); @@ -3076,17 +3082,17 @@ void AnimTask_FakeOut(u8 taskId) SetGpuReg(REG_OFFSET_BLDY, 0x10); gTasks[taskId].data[0] = win0v; gTasks[taskId].data[1] = win0h; - gTasks[taskId].func = FakeOutStep1; + gTasks[taskId].func = AnimTask_FakeOut_Step1; } -static void FakeOutStep1(u8 taskId) +static void AnimTask_FakeOut_Step1(u8 taskId) { gTasks[taskId].data[0] += 13; gTasks[taskId].data[1] -= 13; if (gTasks[taskId].data[0] >= gTasks[taskId].data[1]) { gBattle_WIN0H = 0; - gTasks[taskId].func = FakeOutStep2; + gTasks[taskId].func = AnimTask_FakeOut_Step2; } else { @@ -3094,7 +3100,7 @@ static void FakeOutStep1(u8 taskId) } } -static void FakeOutStep2(u8 taskId) +static void AnimTask_FakeOut_Step2(u8 taskId) { if (++gTasks[taskId].data[10] == 5) { @@ -3114,12 +3120,12 @@ static void FakeOutStep2(u8 taskId) } } -void sub_8106020(u8 taskId) +void AnimTask_StretchTargetUp(u8 taskId) { u8 spriteId = GetAnimBattlerSpriteId(ANIM_TARGET); if (++gTasks[taskId].data[0] == 1) { - PrepareAffineAnimInTaskData(&gTasks[taskId], GetAnimBattlerSpriteId(1), gUnknown_08593988); + PrepareAffineAnimInTaskData(&gTasks[taskId], GetAnimBattlerSpriteId(ANIM_TARGET), sAffineAnims_StretchBattlerUp); gSprites[spriteId].pos2.x = 4; } else @@ -3134,12 +3140,12 @@ void sub_8106020(u8 taskId) } } -void sub_81060B0(u8 taskId) +void AnimTask_StretchAttackerUp(u8 taskId) { u8 spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER); if (++gTasks[taskId].data[0] == 1) { - PrepareAffineAnimInTaskData(&gTasks[taskId], GetAnimBattlerSpriteId(0), gUnknown_08593988); + PrepareAffineAnimInTaskData(&gTasks[taskId], GetAnimBattlerSpriteId(ANIM_ATTACKER), sAffineAnims_StretchBattlerUp); gSprites[spriteId].pos2.x = 4; } else @@ -3154,7 +3160,7 @@ void sub_81060B0(u8 taskId) } } -void AnimRedHeartProjectile(struct Sprite *sprite) +static void AnimRedHeartProjectile(struct Sprite *sprite) { InitSpritePosToAnimAttacker(sprite, TRUE); sprite->data[0] = 95; @@ -3179,7 +3185,7 @@ static void AnimRedHeartProjectile_Step(struct Sprite *sprite) } } -void AnimParticuleBurst(struct Sprite *sprite) +void AnimParticleBurst(struct Sprite *sprite) { if (sprite->data[0] == 0) { @@ -3201,7 +3207,7 @@ void AnimParticuleBurst(struct Sprite *sprite) } } -void AnimRedHeartRising(struct Sprite *sprite) +static void AnimRedHeartRising(struct Sprite *sprite) { sprite->pos1.x = gBattleAnimArgs[0]; sprite->pos1.y = 160; @@ -3243,13 +3249,13 @@ void AnimTask_HeartsBackground(u8 taskId) SetGpuReg(REG_OFFSET_BG1HOFS, gBattle_BG1_X); SetGpuReg(REG_OFFSET_BG1VOFS, gBattle_BG1_Y); sub_80A6B30(&animBg); - AnimLoadCompressedBgGfx(animBg.bgId, &gUnknown_08C232E0, animBg.tilesOffset); - sub_80A6D60(&animBg, &gUnknown_08C23D78, 0); - LoadCompressedPalette(&gUnknown_08C23D50, animBg.paletteId * 16, 32); - gTasks[taskId].func = HeartsBackground_Step; + AnimLoadCompressedBgGfx(animBg.bgId, &gBattleAnimBgImage_Attract, animBg.tilesOffset); + AnimLoadCompressedBgTilemapHandleContest(&animBg, &gBattleAnimBgTilemap_Attract, 0); + LoadCompressedPalette(&gBattleAnimBgPalette_Attract, animBg.paletteId * 16, 32); + gTasks[taskId].func = AnimTask_HeartsBackground_Step; } -static void HeartsBackground_Step(u8 taskId) +static void AnimTask_HeartsBackground_Step(u8 taskId) { struct BattleAnimBgData animBg; @@ -3322,18 +3328,18 @@ void AnimTask_ScaryFace(u8 taskId) SetGpuReg(REG_OFFSET_BG1VOFS, gBattle_BG1_Y); sub_80A6B30(&animBg); if (IsContest()) - sub_80A6D60(&animBg, &gBattleAnimBgTilemap_ScaryFaceContest, 0); + AnimLoadCompressedBgTilemapHandleContest(&animBg, &gBattleAnimBgTilemap_ScaryFaceContest, 0); else if (GetBattlerSide(gBattleAnimTarget) == B_SIDE_OPPONENT) - sub_80A6D60(&animBg, &gBattleAnimBgTilemap_ScaryFacePlayer, 0); + AnimLoadCompressedBgTilemapHandleContest(&animBg, &gBattleAnimBgTilemap_ScaryFacePlayer, 0); else - sub_80A6D60(&animBg, &gBattleAnimBgTilemap_ScaryFaceOpponent, 0); + AnimLoadCompressedBgTilemapHandleContest(&animBg, &gBattleAnimBgTilemap_ScaryFaceOpponent, 0); - AnimLoadCompressedBgGfx(animBg.bgId, gUnknown_08C249F8, animBg.tilesOffset); - LoadCompressedPalette(gUnknown_08C249D0, animBg.paletteId * 16, 32); - gTasks[taskId].func = ScaryFace_Step; + AnimLoadCompressedBgGfx(animBg.bgId, gBattleAnimBgImage_ScaryFace, animBg.tilesOffset); + LoadCompressedPalette(gBattleAnimBgPalette_ScaryFace, animBg.paletteId * 16, 32); + gTasks[taskId].func = AnimTask_ScaryFace_Step; } -static void ScaryFace_Step(u8 taskId) +static void AnimTask_ScaryFace_Step(u8 taskId) { struct BattleAnimBgData animBg; @@ -3394,7 +3400,7 @@ static void ScaryFace_Step(u8 taskId) // Used by MOVE_HIDDEN_POWER // arg 0: duration // arg 1: initial wave offset -void AnimOrbitFast(struct Sprite *sprite) +static void AnimOrbitFast(struct Sprite *sprite) { sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2); sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3); @@ -3402,11 +3408,11 @@ void AnimOrbitFast(struct Sprite *sprite) sprite->data[0] = gBattleAnimArgs[0]; sprite->data[1] = gBattleAnimArgs[1]; sprite->data[7] = GetBattlerSpriteSubpriority(gBattleAnimAttacker); - sprite->callback = AnimOrbitFastStep; + sprite->callback = AnimOrbitFast_Step; sprite->callback(sprite); } -static void AnimOrbitFastStep(struct Sprite *sprite) +static void AnimOrbitFast_Step(struct Sprite *sprite) { if (sprite->data[1] >= 64 && sprite->data[1] <= 191) sprite->subpriority = sprite->data[7] + 1; @@ -3445,16 +3451,16 @@ static void AnimOrbitFastStep(struct Sprite *sprite) // Moves orbs away from the mon, based on where they are in their orbit. // Used in MOVE_HIDDEN_POWER. // arg 0: initial wave offset -void AnimOrbitScatter(struct Sprite *sprite) +static void AnimOrbitScatter(struct Sprite *sprite) { sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2); sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3); sprite->data[0] = Sin(gBattleAnimArgs[0], 10); sprite->data[1] = Cos(gBattleAnimArgs[0], 7); - sprite->callback = AnimOrbitScatterStep; + sprite->callback = AnimOrbitScatter_Step; } -static void AnimOrbitScatterStep(struct Sprite *sprite) +static void AnimOrbitScatter_Step(struct Sprite *sprite) { sprite->pos2.x += sprite->data[0]; sprite->pos2.y += sprite->data[1]; @@ -3470,7 +3476,7 @@ static void AnimSpitUpOrb_Step(struct Sprite *sprite) DestroyAnimSprite(sprite); } -void AnimSpitUpOrb(struct Sprite *sprite) +static void AnimSpitUpOrb(struct Sprite *sprite) { sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2); sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3); @@ -3480,19 +3486,19 @@ void AnimSpitUpOrb(struct Sprite *sprite) sprite->callback = AnimSpitUpOrb_Step; } -static void sub_810699C(struct Sprite *sprite) +static void AnimEyeSparkle_Step(struct Sprite *sprite) { if (sprite->animEnded) DestroyAnimSprite(sprite); } -void AnimEyeSparkle(struct Sprite *sprite) +static void AnimEyeSparkle(struct Sprite *sprite) { InitSpritePosToAnimAttacker(sprite, TRUE); - sprite->callback = sub_810699C; + sprite->callback = AnimEyeSparkle_Step; } -void AnimAngel(struct Sprite *sprite) +static void AnimAngel(struct Sprite *sprite) { s16 var0; if (!sprite->data[0]) @@ -3530,7 +3536,7 @@ static void sub_8106A64(struct Sprite *sprite) DestroyAnimSprite(sprite); } -void AnimPinkHeart(struct Sprite *sprite) +static void AnimPinkHeart(struct Sprite *sprite) { if (sprite->data[0] == 0) { @@ -3556,7 +3562,7 @@ void AnimPinkHeart(struct Sprite *sprite) } } -void AnimDevil(struct Sprite *sprite) +static void AnimDevil(struct Sprite *sprite) { if (sprite->data[3] == 0) { @@ -3585,7 +3591,7 @@ void AnimDevil(struct Sprite *sprite) DestroyAnimSprite(sprite); } -void AnimFurySwipes(struct Sprite *sprite) +static void AnimFurySwipes(struct Sprite *sprite) { if (sprite->data[0] == 0) { @@ -3600,7 +3606,7 @@ void AnimFurySwipes(struct Sprite *sprite) } } -void AnimMovmentWaves(struct Sprite *sprite) +static void AnimMovmentWaves(struct Sprite *sprite) { if (!gBattleAnimArgs[2]) { @@ -3646,17 +3652,17 @@ void AnimTask_UproarDistortion(u8 taskId) { u8 spriteId = GetAnimBattlerSpriteId(gBattleAnimArgs[0]); - PrepareAffineAnimInTaskData(&gTasks[taskId], spriteId, gUnknown_08593B98); - gTasks[taskId].func = UproarDistortion_Step; + PrepareAffineAnimInTaskData(&gTasks[taskId], spriteId, sAffineAnims_UproarDistortion); + gTasks[taskId].func = AnimTask_UproarDistortion_Step; } -static void UproarDistortion_Step(u8 taskId) +static void AnimTask_UproarDistortion_Step(u8 taskId) { if (!RunAffineAnimFromTaskData(&gTasks[taskId])) DestroyAnimVisualTask(taskId); } -void AnimJaggedMusicNote(struct Sprite *sprite) +static void AnimJaggedMusicNote(struct Sprite *sprite) { int var1; u8 battler = !gBattleAnimArgs[0] ? gBattleAnimAttacker : gBattleAnimTarget; @@ -3694,12 +3700,12 @@ static void AnimJaggedMusicNote_Step(struct Sprite *sprite) DestroyAnimSprite(sprite); } -void AnimPerishSongMusicNote2(struct Sprite *sprite) +static void AnimPerishSongMusicNote2(struct Sprite *sprite) { if (!sprite->data[0]) { sprite->data[1] = 120 - gBattleAnimArgs[0]; - sprite->invisible = 1; + sprite->invisible = TRUE; } if (++sprite->data[0] == sprite->data[1]) @@ -3709,7 +3715,7 @@ void AnimPerishSongMusicNote2(struct Sprite *sprite) DestroyAnimSprite(sprite); } -void AnimPerishSongMusicNote(struct Sprite *sprite) +static void AnimPerishSongMusicNote(struct Sprite *sprite) { int index; int var2; @@ -3786,7 +3792,7 @@ static void AnimPerishSongMusicNote_Step2(struct Sprite *sprite) } } -void AnimGuardRing(struct Sprite *sprite) +static void AnimGuardRing(struct Sprite *sprite) { if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE) && IsBattlerSpriteVisible(BATTLE_PARTNER(gBattleAnimAttacker))) { @@ -3811,12 +3817,12 @@ void AnimGuardRing(struct Sprite *sprite) void AnimTask_IsFuryCutterHitRight(u8 taskId) { - gBattleAnimArgs[7] = gAnimDisableStructPtr->furyCutterCounter & 1; + gBattleAnimArgs[ARG_RET_ID] = gAnimDisableStructPtr->furyCutterCounter & 1; DestroyAnimVisualTask(taskId); } void AnimTask_GetFuryCutterHitCount(u8 taskId) { - gBattleAnimArgs[7] = gAnimDisableStructPtr->furyCutterCounter; + gBattleAnimArgs[ARG_RET_ID] = gAnimDisableStructPtr->furyCutterCounter; DestroyAnimVisualTask(taskId); } diff --git a/src/battle_anim_effects_3.c b/src/battle_anim_effects_3.c index 1778ce881..fd68bbd37 100755 --- a/src/battle_anim_effects_3.c +++ b/src/battle_anim_effects_3.c @@ -26,100 +26,101 @@ extern const struct SpriteTemplate gThoughtBubbleSpriteTemplate; -void AnimBlackSmoke(struct Sprite *); -void AnimWhiteHalo(struct Sprite *); -void AnimTealAlert(struct Sprite *); -void AnimMeanLookEye(struct Sprite *); -void AnimSpikes(struct Sprite *); -void AnimLeer(struct Sprite *); -void AnimLetterZ(struct Sprite *); -void AnimFang(struct Sprite *); -void AnimSpotlight(struct Sprite *); -void AnimClappingHand(struct Sprite *); -void AnimClappingHand2(struct Sprite *); -void AnimRapidSpin(struct Sprite *); -void AnimTriAttackTriangle(struct Sprite *); -void AnimBatonPassPokeball(struct Sprite *); -void AnimWishStar(struct Sprite *); -void AnimMiniTwinklingStar(struct Sprite *); -void AnimSwallowBlueOrb(struct Sprite *); -void AnimGreenStar(struct Sprite *); -void AnimWeakFrustrationAngerMark(struct Sprite *); -void AnimSweetScentPetal(struct Sprite *); -void AnimPainSplitProjectile(struct Sprite *); -void AnimFlatterConfetti(struct Sprite *); -void AnimFlatterSpotlight(struct Sprite *); -void AnimReversalOrb(struct Sprite *); -void AnimYawnCloud(struct Sprite *); -void AnimSmokeBallEscapeCloud(struct Sprite *); -void AnimFacadeSweatDrop(struct Sprite *); -void AnimRoarNoiseLine(struct Sprite *); -void AnimGlareEyeDot(struct Sprite *); -void AnimAssistPawprint(struct Sprite *); -void AnimSmellingSaltsHand(struct Sprite *); -void AnimSmellingSaltExclamation(struct Sprite *); -void AnimHelpingHandClap(struct Sprite *); -void AnimForesightMagnifyingGlass(struct Sprite *); -void AnimMeteorMashStar(struct Sprite *); -void AnimBlockX(struct Sprite *); -void sub_815FE80(struct Sprite *); -void AnimParticuleBurst(struct Sprite *); -void AnimKnockOffStrike(struct Sprite *); -void AnimRecycle(struct Sprite *); -static void AnimBlackSmokeStep(struct Sprite *); +static void AnimBlackSmoke(struct Sprite *); +static void AnimBlackSmoke_Step(struct Sprite *); +static void AnimWhiteHalo(struct Sprite *); static void AnimWhiteHalo_Step1(struct Sprite *); static void AnimWhiteHalo_Step2(struct Sprite *); +static void AnimTealAlert(struct Sprite *); +static void AnimMeanLookEye(struct Sprite *); static void AnimMeanLookEye_Step1(struct Sprite *); static void AnimMeanLookEye_Step2(struct Sprite *); static void AnimMeanLookEye_Step3(struct Sprite *); static void AnimMeanLookEye_Step4(struct Sprite *); -static void SetPsychicBackground_Step(u8); -static void FadeScreenToWhite_Step(u8); +static void AnimSpikes(struct Sprite *); static void AnimSpikes_Step1(struct Sprite *); static void AnimSpikes_Step2(struct Sprite *); +static void AnimLeer(struct Sprite *); +static void AnimLetterZ(struct Sprite *); +static void AnimFang(struct Sprite *); +static void AnimSpotlight(struct Sprite *); static void AnimSpotlight_Step1(struct Sprite *); static void AnimSpotlight_Step2(struct Sprite *); +static void AnimClappingHand(struct Sprite *); static void AnimClappingHand_Step(struct Sprite *); +static void AnimClappingHand2(struct Sprite *); +static void AnimRapidSpin(struct Sprite *); static void AnimRapidSpin_Step(struct Sprite *); -static void RapinSpinMonElevation_Step(u8); -static void TormentAttacker_Step(u8); -static void TormentAttacker_Callback(struct Sprite *); +static void AnimTriAttackTriangle(struct Sprite *); +static void AnimBatonPassPokeball(struct Sprite *); +static void AnimWishStar(struct Sprite *); static void AnimWishStar_Step(struct Sprite *); +static void AnimMiniTwinklingStar(struct Sprite *); static void AnimMiniTwinklingStar_Step(struct Sprite *); +static void AnimSwallowBlueOrb(struct Sprite *); +static void AnimGreenStar(struct Sprite *); static void AnimGreenStar_Step1(struct Sprite *); static void AnimGreenStar_Step2(struct Sprite *); static void AnimGreenStar_Callback(struct Sprite *); -static void AnimTask_RockMonBackAndForthStep(u8); -static void AnimSweetScentPetalStep(struct Sprite *); -static void AnimTask_FlailMovementStep(u8); -static void AnimFlatterConfettiStep(struct Sprite *); -static void AnimFlatterSpotlightStep(struct Sprite *); -static void AnimReversalOrbStep(struct Sprite *); -static void AnimTask_RolePlaySilhouetteStep1(u8); -static void AnimTask_RolePlaySilhouetteStep2(u8); -static void AnimTask_AcidArmorStep(u8); -static void AnimTask_DeepInhaleStep(u8); -static void AnimYawnCloudStep(struct Sprite *); -static void AnimTask_SquishAndSweatDropletsStep(u8); -static void CreateSweatDroplets(u8, bool8); -static void AnimTask_FacadeColorBlendStep(u8); -static void AnimRoarNoiseLineStep(struct Sprite *); -static void AnimTask_GlareEyeDotsStep(u8); -static void GetGlareEyeDotCoords(s16, s16, s16, s16, u8, u8, s16 *, s16 *); -static void AnimTask_BarrageBallStep(u8); +static void AnimWeakFrustrationAngerMark(struct Sprite *); +static void AnimSweetScentPetal(struct Sprite *); +static void AnimSweetScentPetal_Step(struct Sprite *); +static void AnimPainSplitProjectile(struct Sprite *); +static void AnimFlatterConfetti(struct Sprite *); +static void AnimFlatterConfetti_Step(struct Sprite *); +static void AnimFlatterSpotlight(struct Sprite *); +static void AnimFlatterSpotlight_Step(struct Sprite *); +static void AnimReversalOrb(struct Sprite *); +static void AnimReversalOrb_Step(struct Sprite *); +static void AnimYawnCloud(struct Sprite *); +static void AnimYawnCloud_Step(struct Sprite *); +static void AnimSmokeBallEscapeCloud(struct Sprite *); +static void AnimFacadeSweatDrop(struct Sprite *); +static void AnimRoarNoiseLine(struct Sprite *); +static void AnimRoarNoiseLine_Step(struct Sprite *); +static void AnimGlareEyeDot(struct Sprite *); +static void AnimAssistPawprint(struct Sprite *); +static void AnimSmellingSaltsHand(struct Sprite *); static void AnimSmellingSaltsHand_Step(struct Sprite *); -static void AnimTask_SmellingSaltsSquishStep(u8); -static void AnimSmellingSaltExclamationStep(struct Sprite *); -static void AnimHelpingHandClapStep(struct Sprite *); -static void AnimTask_HelpingHandAttackerMovementStep(u8); -static void AnimForesightMagnifyingGlassStep(struct Sprite *); +static void AnimSmellingSaltExclamation(struct Sprite *); +static void AnimSmellingSaltExclamation_Step(struct Sprite *); +static void AnimHelpingHandClap(struct Sprite *); +static void AnimHelpingHandClap_Step(struct Sprite *); +static void AnimForesightMagnifyingGlass(struct Sprite *); +static void AnimForesightMagnifyingGlass_Step(struct Sprite *); +static void AnimMeteorMashStar(struct Sprite *); +static void AnimMeteorMashStar_Step(struct Sprite *sprite); +static void AnimBlockX(struct Sprite *); +static void AnimBlockX_Step(struct Sprite *); +static void sub_815FE80(struct Sprite *); +static void AnimKnockOffStrike(struct Sprite *); +static void AnimKnockOffStrike_Step(struct Sprite *sprite); +static void AnimRecycle(struct Sprite *); +static void AnimRecycle_Step(struct Sprite *); +static void SetPsychicBackground_Step(u8); +static void FadeScreenToWhite_Step(u8); +static void RapinSpinMonElevation_Step(u8); +static void TormentAttacker_Step(u8); +static void TormentAttacker_Callback(struct Sprite *); +static void AnimTask_RockMonBackAndForth_Step(u8); +static void AnimTask_FlailMovement_Step(u8); +static void AnimTask_RolePlaySilhouette_Step1(u8); +static void AnimTask_RolePlaySilhouette_Step2(u8); +static void AnimTask_AcidArmor_Step(u8); +static void AnimTask_DeepInhale_Step(u8); +static void AnimTask_SquishAndSweatDroplets_Step(u8); +static void CreateSweatDroplets(u8, bool8); +static void AnimTask_FacadeColorBlend_Step(u8); +static void AnimTask_GlareEyeDots_Step(u8); +static void GetGlareEyeDotCoords(s16, s16, s16, s16, u8, u8, s16 *, s16 *); +static void AnimTask_BarrageBall_Step(u8); +static void AnimTask_SmellingSaltsSquish_Step(u8); +static void AnimTask_HelpingHandAttackerMovement_Step(u8); static void AnimTask_MonToSubstituteDoll(u8); -static void AnimBlockXStep(struct Sprite *); static void AnimTask_OdorSleuthMovementWaitFinish(u8); static void MoveOdorSleuthClone(struct Sprite *); -static void AnimTask_TeeterDanceMovementStep(u8); -static void AnimRecycleStep(struct Sprite *); -static void AnimTask_SlackOffSquishStep(u8); +static void AnimTask_TeeterDanceMovement_Step(u8); +static void AnimTask_SlackOffSquish_Step(u8); const union AnimCmd gScratchAnimCmds[] = { @@ -1079,7 +1080,7 @@ const struct SpriteTemplate gUnknown_085CE8F4 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = AnimParticuleBurst, + .callback = AnimParticleBurst, }; const struct SpriteTemplate gBlockXSpriteTemplate = @@ -1179,7 +1180,7 @@ const union AffineAnimCmd gSlackOffSquishAffineAnimCmds[] = AFFINEANIMCMD_END, }; -void AnimBlackSmoke(struct Sprite *sprite) +static void AnimBlackSmoke(struct Sprite *sprite) { sprite->pos1.x += gBattleAnimArgs[0]; sprite->pos1.y += gBattleAnimArgs[1]; @@ -1190,10 +1191,10 @@ void AnimBlackSmoke(struct Sprite *sprite) sprite->data[0] = -gBattleAnimArgs[2]; sprite->data[1] = gBattleAnimArgs[4]; - sprite->callback = AnimBlackSmokeStep; + sprite->callback = AnimBlackSmoke_Step; } -static void AnimBlackSmokeStep(struct Sprite *sprite) +static void AnimBlackSmoke_Step(struct Sprite *sprite) { if (sprite->data[1] > 0) { @@ -1217,7 +1218,7 @@ void AnimTask_SmokescreenImpact(u8 taskId) DestroyAnimVisualTask(taskId); } -void AnimWhiteHalo(struct Sprite *sprite) +static void AnimWhiteHalo(struct Sprite *sprite) { sprite->data[0] = 90; sprite->callback = WaitAnimForDuration; @@ -1232,7 +1233,7 @@ static void AnimWhiteHalo_Step1(struct Sprite *sprite) SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(sprite->data[1], 16 - sprite->data[1])); if (--sprite->data[1] < 0) { - sprite->invisible = 1; + sprite->invisible = TRUE; sprite->callback = AnimWhiteHalo_Step2; } } @@ -1244,7 +1245,7 @@ static void AnimWhiteHalo_Step2(struct Sprite *sprite) DestroyAnimSprite(sprite); } -void AnimTealAlert(struct Sprite *sprite) +static void AnimTealAlert(struct Sprite *sprite) { u16 rotation; u8 x = GetBattlerSpriteCoord(gBattleAnimTarget, 2); @@ -1266,7 +1267,7 @@ void AnimTealAlert(struct Sprite *sprite) StoreSpriteCallbackInData6(sprite, DestroyAnimSprite); } -void AnimMeanLookEye(struct Sprite *sprite) +static void AnimMeanLookEye(struct Sprite *sprite) { SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT2_ALL | BLDCNT_EFFECT_BLEND); SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(0, 16)); @@ -1292,7 +1293,7 @@ static void AnimMeanLookEye_Step1(struct Sprite *sprite) SetGpuReg(REG_OFFSET_BLDALPHA, 0); StartSpriteAffineAnim(sprite, 1); sprite->data[2] = 0; - sprite->invisible = 1; + sprite->invisible = TRUE; sprite->affineAnimPaused = 1; sprite->callback = AnimMeanLookEye_Step2; } @@ -1302,7 +1303,7 @@ static void AnimMeanLookEye_Step2(struct Sprite *sprite) { if (sprite->data[2]++ > 9) { - sprite->invisible = 0; + sprite->invisible = FALSE; sprite->affineAnimPaused = 0; if (sprite->affineAnimEnded) sprite->callback = AnimMeanLookEye_Step3; @@ -1359,7 +1360,7 @@ static void AnimMeanLookEye_Step4(struct Sprite *sprite) } if (sprite->data[0] == 0) - sprite->invisible = 1; + sprite->invisible = TRUE; if (sprite->data[0] < 0) { @@ -1426,7 +1427,7 @@ static void FadeScreenToWhite_Step(u8 taskId) DestroyTask(taskId); } -void AnimSpikes(struct Sprite *sprite) +static void AnimSpikes(struct Sprite *sprite) { u16 x; u16 y; @@ -1466,7 +1467,7 @@ static void AnimSpikes_Step2(struct Sprite *sprite) DestroyAnimSprite(sprite); } -void AnimLeer(struct Sprite *sprite) +static void AnimLeer(struct Sprite *sprite) { SetSpriteCoordsToAnimAttackerCoords(sprite); SetAnimSpriteInitialXOffset(sprite, gBattleAnimArgs[0]); @@ -1475,7 +1476,7 @@ void AnimLeer(struct Sprite *sprite) StoreSpriteCallbackInData6(sprite, DestroyAnimSprite); } -void AnimLetterZ(struct Sprite *sprite) +static void AnimLetterZ(struct Sprite *sprite) { int var0; if (sprite->data[0] == 0) @@ -1513,7 +1514,7 @@ void AnimLetterZ(struct Sprite *sprite) DestroyAnimSprite(sprite); } -void AnimFang(struct Sprite *sprite) +static void AnimFang(struct Sprite *sprite) { if (sprite->animEnded) DestroyAnimSprite(sprite); @@ -1522,9 +1523,9 @@ void AnimFang(struct Sprite *sprite) void AnimTask_IsTargetPlayerSide(u8 taskId) { if (GetBattlerSide(gBattleAnimTarget) == B_SIDE_OPPONENT) - gBattleAnimArgs[7] = 0; + gBattleAnimArgs[ARG_RET_ID] = FALSE; else - gBattleAnimArgs[7] = 1; + gBattleAnimArgs[ARG_RET_ID] = TRUE; DestroyAnimVisualTask(taskId); } @@ -1532,14 +1533,14 @@ void AnimTask_IsTargetPlayerSide(u8 taskId) void AnimTask_IsHealingMove(u8 taskId) { if (gAnimMoveDmg > 0) - gBattleAnimArgs[7] = 0; + gBattleAnimArgs[ARG_RET_ID] = FALSE; else - gBattleAnimArgs[7] = 1; + gBattleAnimArgs[ARG_RET_ID] = TRUE; DestroyAnimVisualTask(taskId); } -void AnimSpotlight(struct Sprite *sprite) +static void AnimSpotlight(struct Sprite *sprite) { SetGpuReg(REG_OFFSET_WINOUT, WINOUT_WIN01_BG_ALL | WINOUT_WIN01_OBJ | WINOUT_WIN01_CLR | WINOUT_WINOBJ_BG_ALL | WINOUT_WINOBJ_OBJ); SetGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_OBJWIN_ON); @@ -1551,7 +1552,7 @@ void AnimSpotlight(struct Sprite *sprite) InitSpritePosToAnimTarget(sprite, FALSE); sprite->oam.objMode = ST_OAM_OBJ_WINDOW; - sprite->invisible = 1; + sprite->invisible = TRUE; sprite->callback = AnimSpotlight_Step1; } @@ -1560,7 +1561,7 @@ static void AnimSpotlight_Step1(struct Sprite *sprite) switch (sprite->data[0]) { case 0: - sprite->invisible = 0; + sprite->invisible = FALSE; if (sprite->affineAnimEnded) sprite->data[0]++; break; @@ -1590,7 +1591,7 @@ static void AnimSpotlight_Step1(struct Sprite *sprite) case 5: if (sprite->affineAnimEnded) { - sprite->invisible = 1; + sprite->invisible = TRUE; sprite->callback = AnimSpotlight_Step2; } break; @@ -1604,7 +1605,7 @@ static void AnimSpotlight_Step2(struct Sprite *sprite) DestroyAnimSprite(sprite); } -void AnimClappingHand(struct Sprite *sprite) +static void AnimClappingHand(struct Sprite *sprite) { if (gBattleAnimArgs[3] == 0) { @@ -1665,7 +1666,7 @@ static void AnimClappingHand_Step(struct Sprite *sprite) DestroyAnimSprite(sprite); } -void AnimClappingHand2(struct Sprite *sprite) +static void AnimClappingHand2(struct Sprite *sprite) { sprite->oam.objMode = ST_OAM_OBJ_WINDOW; sprite->data[3] = 255; @@ -1706,7 +1707,7 @@ void AnimTask_RemoveSpotlight(u8 taskId) DestroyAnimVisualTask(taskId); } -void AnimRapidSpin(struct Sprite *sprite) +static void AnimRapidSpin(struct Sprite *sprite) { if (gBattleAnimArgs[0] == 0) { @@ -2013,7 +2014,7 @@ static void TormentAttacker_Callback(struct Sprite *sprite) } } -void AnimTriAttackTriangle(struct Sprite *sprite) +static void AnimTriAttackTriangle(struct Sprite *sprite) { if (sprite->data[0] == 0) InitSpritePosToAnimAttacker(sprite, FALSE); @@ -2022,13 +2023,13 @@ void AnimTriAttackTriangle(struct Sprite *sprite) { u16 var = sprite->data[0]; if ((var & 1) == 0) - sprite->invisible = 1; + sprite->invisible = TRUE; else - sprite->invisible = 0; + sprite->invisible = FALSE; } if (sprite->data[0] > 30) - sprite->invisible = 0; + sprite->invisible = FALSE; if (sprite->data[0] == 61) { @@ -2059,7 +2060,7 @@ void AnimTask_DefenseCurlDeformMon(u8 taskId) } } -void AnimBatonPassPokeball(struct Sprite *sprite) +static void AnimBatonPassPokeball(struct Sprite *sprite) { u8 spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER); @@ -2089,7 +2090,7 @@ void AnimBatonPassPokeball(struct Sprite *sprite) if (++sprite->data[3] == 9) { sprite->data[3] = 0; - gSprites[spriteId].invisible = 1; + gSprites[spriteId].invisible = TRUE; ResetSpriteRotScale(spriteId); sprite->data[0]++; } @@ -2102,7 +2103,7 @@ void AnimBatonPassPokeball(struct Sprite *sprite) } } -void AnimWishStar(struct Sprite *sprite) +static void AnimWishStar(struct Sprite *sprite) { if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER) sprite->pos1.x = -16; @@ -2140,7 +2141,7 @@ static void AnimWishStar_Step(struct Sprite *sprite) DestroyAnimSprite(sprite); } -void AnimMiniTwinklingStar(struct Sprite *sprite) +static void AnimMiniTwinklingStar(struct Sprite *sprite) { u8 rand; s8 y; @@ -2172,11 +2173,11 @@ static void AnimMiniTwinklingStar_Step(struct Sprite *sprite) else { if (sprite->data[1] == 2) - sprite->invisible = 0; + sprite->invisible = FALSE; if (sprite->data[1] == 3) { - sprite->invisible = 1; + sprite->invisible = TRUE; sprite->data[1] = -1; } @@ -2215,7 +2216,7 @@ void AnimTask_SpitUpDeformMon(u8 taskId) } } -void AnimSwallowBlueOrb(struct Sprite *sprite) +static void AnimSwallowBlueOrb(struct Sprite *sprite) { switch (sprite->data[0]) { @@ -2363,11 +2364,11 @@ void AnimTask_TransformMon(u8 taskId) void AnimTask_IsMonInvisible(u8 taskId) { - gBattleAnimArgs[7] = gSprites[gBattlerSpriteIds[gBattleAnimAttacker]].invisible; + gBattleAnimArgs[ARG_RET_ID] = gSprites[gBattlerSpriteIds[gBattleAnimAttacker]].invisible; DestroyAnimVisualTask(taskId); } -void AnimTask_CastformGfxChange(u8 taskId) +void AnimTask_CastformGfxDataChange(u8 taskId) { HandleSpeciesGfxDataChange(gBattleAnimAttacker, gBattleAnimTarget, TRUE); DestroyAnimVisualTask(taskId); @@ -2388,7 +2389,7 @@ void AnimTask_MorningSunLightBeam(u8 taskId) SetAnimBgAttribute(1, BG_ANIM_CHAR_BASE_BLOCK, 1); sub_80A6B30(&animBg); - sub_80A6D60(&animBg, &gUnknown_08C2A6EC, 0); + AnimLoadCompressedBgTilemapHandleContest(&animBg, &gBattleAnimMaskTilemap_LightBeam, 0); if (IsContest()) { gBattle_BG1_X = -56; @@ -2404,8 +2405,8 @@ void AnimTask_MorningSunLightBeam(u8 taskId) gBattle_BG1_Y = 0; } - AnimLoadCompressedBgGfx(animBg.bgId, gUnknown_08C2A634, animBg.tilesOffset); - LoadCompressedPalette(gUnknown_08C2A6D4, animBg.paletteId * 16, 32); + AnimLoadCompressedBgGfx(animBg.bgId, gBattleAnimMaskImage_LightBeam, animBg.tilesOffset); + LoadCompressedPalette(gBattleAnimMaskPalette_LightBeam, animBg.paletteId * 16, 32); gTasks[taskId].data[10] = gBattle_BG1_X; gTasks[taskId].data[11] = gBattle_BG1_Y; @@ -2465,7 +2466,7 @@ void AnimTask_MorningSunLightBeam(u8 taskId) } } -void AnimGreenStar(struct Sprite *sprite) +static void AnimGreenStar(struct Sprite *sprite) { s16 xOffset; u8 spriteId1; @@ -2492,8 +2493,8 @@ void AnimGreenStar(struct Sprite *sprite) gSprites[spriteId2].data[2] = gBattleAnimArgs[1]; gSprites[spriteId1].data[7] = -1; gSprites[spriteId2].data[7] = -1; - gSprites[spriteId1].invisible = 1; - gSprites[spriteId2].invisible = 1; + gSprites[spriteId1].invisible = TRUE; + gSprites[spriteId2].invisible = TRUE; gSprites[spriteId1].callback = AnimGreenStar_Callback; gSprites[spriteId2].callback = AnimGreenStar_Callback; @@ -2510,19 +2511,19 @@ static void AnimGreenStar_Step1(struct Sprite *sprite) sprite->data[3] &= 0xFF; if (sprite->data[4] == 0 && sprite->pos2.y < -8) { - gSprites[sprite->data[6]].invisible = 0; + gSprites[sprite->data[6]].invisible = FALSE; sprite->data[4]++; } if (sprite->data[4] == 1 && sprite->pos2.y < -16) { - gSprites[sprite->data[7]].invisible = 0; + gSprites[sprite->data[7]].invisible = FALSE; sprite->data[4]++; } if (--sprite->data[1] == -1) { - sprite->invisible = 1; + sprite->invisible = TRUE; sprite->callback = AnimGreenStar_Step2; } } @@ -2548,7 +2549,7 @@ static void AnimGreenStar_Callback(struct Sprite *sprite) sprite->data[3] &= 0xFF; if (--sprite->data[1] == -1) { - sprite->invisible = 1; + sprite->invisible = TRUE; sprite->callback = SpriteCallbackDummy; } } @@ -2569,7 +2570,7 @@ void AnimTask_DoomDesireLightBeam(u8 taskId) SetAnimBgAttribute(1, BG_ANIM_CHAR_BASE_BLOCK, 1); sub_80A6B30(&animBg); - sub_80A6D60(&animBg, &gUnknown_08C2A6EC, 0); + AnimLoadCompressedBgTilemapHandleContest(&animBg, &gBattleAnimMaskTilemap_LightBeam, 0); if (IsContest()) { gBattle_BG1_X = -56; @@ -2600,8 +2601,8 @@ void AnimTask_DoomDesireLightBeam(u8 taskId) gBattle_BG1_Y = 0; } - AnimLoadCompressedBgGfx(animBg.bgId, gUnknown_08C2A634, animBg.tilesOffset); - LoadCompressedPalette(gUnknown_08C2A6D4, animBg.paletteId * 16, 32); + AnimLoadCompressedBgGfx(animBg.bgId, gBattleAnimMaskImage_LightBeam, animBg.tilesOffset); + LoadCompressedPalette(gBattleAnimMaskPalette_LightBeam, animBg.paletteId * 16, 32); gTasks[taskId].data[10] = gBattle_BG1_X; gTasks[taskId].data[11] = gBattle_BG1_Y; gTasks[taskId].data[0]++; @@ -2673,7 +2674,7 @@ void AnimTask_StrongFrustrationGrowAndShrink(u8 taskId) // Animates an anger mark near the mon's head. // arg 0: initial x pixel offset // arg 1: initial y pixel offset -void AnimWeakFrustrationAngerMark(struct Sprite *sprite) +static void AnimWeakFrustrationAngerMark(struct Sprite *sprite) { if (sprite->data[0] == 0) { @@ -2737,10 +2738,10 @@ void AnimTask_RockMonBackAndForth(u8 taskId) } PrepareBattlerSpriteForRotScale(task->data[15], ST_OAM_OBJ_NORMAL); - task->func = AnimTask_RockMonBackAndForthStep; + task->func = AnimTask_RockMonBackAndForth_Step; } -static void AnimTask_RockMonBackAndForthStep(u8 taskId) +static void AnimTask_RockMonBackAndForth_Step(u8 taskId) { struct Task *task = &gTasks[taskId]; @@ -2798,7 +2799,7 @@ static void AnimTask_RockMonBackAndForthStep(u8 taskId) // arg 0: initial y pixel offset // arg 1: sprite anim num // arg 2: unused -void AnimSweetScentPetal(struct Sprite *sprite) +static void AnimSweetScentPetal(struct Sprite *sprite) { if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_PLAYER) { @@ -2813,10 +2814,10 @@ void AnimSweetScentPetal(struct Sprite *sprite) sprite->data[2] = gBattleAnimArgs[2]; StartSpriteAnim(sprite, gBattleAnimArgs[1]); - sprite->callback = AnimSweetScentPetalStep; + sprite->callback = AnimSweetScentPetal_Step; } -static void AnimSweetScentPetalStep(struct Sprite *sprite) +static void AnimSweetScentPetal_Step(struct Sprite *sprite) { sprite->data[0] += 3; if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_PLAYER) @@ -2857,10 +2858,10 @@ void AnimTask_FlailMovement(u8 taskId) task->data[15] = GetAnimBattlerSpriteId(gBattleAnimArgs[0]); PrepareBattlerSpriteForRotScale(task->data[15], ST_OAM_OBJ_NORMAL); - task->func = AnimTask_FlailMovementStep; + task->func = AnimTask_FlailMovement_Step; } -static void AnimTask_FlailMovementStep(u8 taskId) +static void AnimTask_FlailMovement_Step(u8 taskId) { int temp; struct Task *task = &gTasks[taskId]; @@ -2935,7 +2936,7 @@ static void AnimTask_FlailMovementStep(u8 taskId) // arg 0: initial x pixel offset // arg 1: initial y pixel offset // arg 2: which battler -void AnimPainSplitProjectile(struct Sprite *sprite) +static void AnimPainSplitProjectile(struct Sprite *sprite) { if (!sprite->data[0]) { @@ -3031,7 +3032,7 @@ void AnimTask_PainSplitMovement(u8 taskId) // Move a piece of confetti in a slightly-random speed across the screen. // arg 0: which battler the confetti starts from -void AnimFlatterConfetti(struct Sprite *sprite) +static void AnimFlatterConfetti(struct Sprite *sprite) { u8 tileOffset; int rand1; @@ -3059,10 +3060,10 @@ void AnimFlatterConfetti(struct Sprite *sprite) sprite->pos1.x = 248; sprite->pos1.y = 104; - sprite->callback = AnimFlatterConfettiStep; + sprite->callback = AnimFlatterConfetti_Step; } -static void AnimFlatterConfettiStep(struct Sprite *sprite) +static void AnimFlatterConfetti_Step(struct Sprite *sprite) { if (sprite->data[2] == 0) { @@ -3088,7 +3089,7 @@ static void AnimFlatterConfettiStep(struct Sprite *sprite) // arg 0: initial x pixel offset // arg 1: initial y pixel offset // arg 2: duration of fully-opened spotlight -void AnimFlatterSpotlight(struct Sprite *sprite) +static void AnimFlatterSpotlight(struct Sprite *sprite) { SetGpuReg(REG_OFFSET_WINOUT, WINOUT_WIN01_BG_ALL | WINOUT_WIN01_OBJ | WINOUT_WIN01_CLR | WINOUT_WINOBJ_BG_ALL | WINOUT_WINOBJ_OBJ); SetGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_OBJWIN_ON); @@ -3100,16 +3101,16 @@ void AnimFlatterSpotlight(struct Sprite *sprite) sprite->data[0] = gBattleAnimArgs[2]; InitSpritePosToAnimTarget(sprite, FALSE); sprite->oam.objMode = ST_OAM_OBJ_WINDOW; - sprite->invisible = 1; - sprite->callback = AnimFlatterSpotlightStep; + sprite->invisible = TRUE; + sprite->callback = AnimFlatterSpotlight_Step; } -static void AnimFlatterSpotlightStep(struct Sprite *sprite) +static void AnimFlatterSpotlight_Step(struct Sprite *sprite) { switch (sprite->data[1]) { case 0: - sprite->invisible = 0; + sprite->invisible = FALSE; if (sprite->affineAnimEnded) sprite->data[1]++; break; @@ -3123,7 +3124,7 @@ static void AnimFlatterSpotlightStep(struct Sprite *sprite) case 2: if (sprite->affineAnimEnded) { - sprite->invisible = 1; + sprite->invisible = TRUE; sprite->data[1]++; } break; @@ -3138,17 +3139,17 @@ static void AnimFlatterSpotlightStep(struct Sprite *sprite) // Spins an orb around the attacking mon, while its path radius grows and shrinks. // arg 0: duration // arg 1: initial wave offset -void AnimReversalOrb(struct Sprite *sprite) +static void AnimReversalOrb(struct Sprite *sprite) { sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET); sprite->data[0] = gBattleAnimArgs[0]; sprite->data[1] = gBattleAnimArgs[1]; - sprite->callback = AnimReversalOrbStep; + sprite->callback = AnimReversalOrb_Step; sprite->callback(sprite); } -static void AnimReversalOrbStep(struct Sprite *sprite) +static void AnimReversalOrb_Step(struct Sprite *sprite) { sprite->pos2.x = Sin(sprite->data[1], sprite->data[2] >> 8); sprite->pos2.y = Cos(sprite->data[1], sprite->data[3] >> 8); @@ -3258,10 +3259,10 @@ void AnimTask_RolePlaySilhouette(u8 taskId) SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(gTasks[taskId].data[1], 16 - gTasks[taskId].data[1])); gTasks[taskId].data[0] = spriteId; - gTasks[taskId].func = AnimTask_RolePlaySilhouetteStep1; + gTasks[taskId].func = AnimTask_RolePlaySilhouette_Step1; } -static void AnimTask_RolePlaySilhouetteStep1(u8 taskId) +static void AnimTask_RolePlaySilhouette_Step1(u8 taskId) { if (gTasks[taskId].data[10]++ > 1) { @@ -3272,12 +3273,12 @@ static void AnimTask_RolePlaySilhouetteStep1(u8 taskId) { gTasks[taskId].data[10] = 256; gTasks[taskId].data[11] = 256; - gTasks[taskId].func = AnimTask_RolePlaySilhouetteStep2; + gTasks[taskId].func = AnimTask_RolePlaySilhouette_Step2; } } } -static void AnimTask_RolePlaySilhouetteStep2(u8 taskId) +static void AnimTask_RolePlaySilhouette_Step2(u8 taskId) { u8 spriteId = gTasks[taskId].data[0]; gTasks[taskId].data[10] -= 16; @@ -3353,10 +3354,10 @@ void AnimTask_AcidArmor(u8 taskId) scanlineParams.initState = 1; scanlineParams.unused9 = 0; ScanlineEffect_SetParams(scanlineParams); - task->func = AnimTask_AcidArmorStep; + task->func = AnimTask_AcidArmor_Step; } -static void AnimTask_AcidArmorStep(u8 taskId) +static void AnimTask_AcidArmor_Step(u8 taskId) { struct Task *task; s16 var1; @@ -3478,10 +3479,10 @@ void AnimTask_DeepInhale(u8 taskId) task->data[0] = 0; task->data[15] = GetAnimBattlerSpriteId(gBattleAnimArgs[0]); PrepareAffineAnimInTaskData(&gTasks[taskId], task->data[15], gDeepInhaleAffineAnimCmds); - task->func = AnimTask_DeepInhaleStep; + task->func = AnimTask_DeepInhale_Step; } -static void AnimTask_DeepInhaleStep(u8 taskId) +static void AnimTask_DeepInhale_Step(u8 taskId) { u16 var0; @@ -3530,7 +3531,7 @@ static void UpdateYawnCloudPosition(struct Sprite *sprite) // Drifts a cloud in a wavy path towards the target mon. // arg 0: which affine anim -void AnimYawnCloud(struct Sprite *sprite) +static void AnimYawnCloud(struct Sprite *sprite) { s16 destX = sprite->pos1.x; s16 destY = sprite->pos1.y; @@ -3539,10 +3540,10 @@ void AnimYawnCloud(struct Sprite *sprite) StartSpriteAffineAnim(sprite, gBattleAnimArgs[0]); InitYawnCloudPosition(sprite, sprite->pos1.x, sprite->pos1.y, destX, destY, 64); sprite->data[0] = 0; - sprite->callback = AnimYawnCloudStep; + sprite->callback = AnimYawnCloud_Step; } -static void AnimYawnCloudStep(struct Sprite *sprite) +static void AnimYawnCloud_Step(struct Sprite *sprite) { int index; @@ -3567,8 +3568,8 @@ static void AnimYawnCloudStep(struct Sprite *sprite) // arg 0: ? // arg 1: initial x pixel offset // arg 2: initial y pixel offset -// arg 3: ? -void AnimSmokeBallEscapeCloud(struct Sprite *sprite) +// arg 3: time until destroyed +static void AnimSmokeBallEscapeCloud(struct Sprite *sprite) { sprite->data[0] = gBattleAnimArgs[3]; StartSpriteAffineAnim(sprite, gBattleAnimArgs[0]); @@ -3577,7 +3578,7 @@ void AnimSmokeBallEscapeCloud(struct Sprite *sprite) sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2) + gBattleAnimArgs[1]; sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET) + gBattleAnimArgs[2]; - sprite->callback = sub_810E2C8; + sprite->callback = DestroyAnimSpriteAfterTimer; } static void sub_815D8D8(u8 taskId) @@ -3683,7 +3684,7 @@ static void sub_815DA20(u8 taskId) } } -void sub_815DB90(u8 taskId) +void AnimTask_SlideMonForFocusBand(u8 taskId) { gTasks[taskId].data[15] = gBattlerSpriteIds[gBattleAnimAttacker]; gTasks[taskId].data[14] = gBattleAnimArgs[0]; @@ -3742,10 +3743,10 @@ void AnimTask_SquishAndSweatDroplets(u8 taskId) task->data[6] = GetBattlerSpriteSubpriority(battler); task->data[15] = GetAnimBattlerSpriteId(gBattleAnimArgs[0]); PrepareAffineAnimInTaskData(task, task->data[15], gFacadeSquishAffineAnimCmds); - task->func = AnimTask_SquishAndSweatDropletsStep; + task->func = AnimTask_SquishAndSweatDroplets_Step; } -static void AnimTask_SquishAndSweatDropletsStep(u8 taskId) +static void AnimTask_SquishAndSweatDroplets_Step(u8 taskId) { struct Task *task = &gTasks[taskId]; @@ -3821,7 +3822,7 @@ static void CreateSweatDroplets(u8 taskId, bool8 arg1) } } -void AnimFacadeSweatDrop(struct Sprite *sprite) +static void AnimFacadeSweatDrop(struct Sprite *sprite) { sprite->pos1.x += sprite->data[1]; sprite->pos1.y += sprite->data[2]; @@ -3843,10 +3844,10 @@ void AnimTask_FacadeColorBlend(u8 taskId) gTasks[taskId].data[1] = gBattleAnimArgs[1]; spriteId = GetAnimBattlerSpriteId(gBattleAnimArgs[0]); gTasks[taskId].data[2] = 0x100 + gSprites[spriteId].oam.paletteNum * 16; - gTasks[taskId].func = AnimTask_FacadeColorBlendStep; + gTasks[taskId].func = AnimTask_FacadeColorBlend_Step; } -static void AnimTask_FacadeColorBlendStep(u8 taskId) +static void AnimTask_FacadeColorBlend_Step(u8 taskId) { if (gTasks[taskId].data[1]) { @@ -3863,7 +3864,8 @@ static void AnimTask_FacadeColorBlendStep(u8 taskId) } } -void sub_815DFCC(u8 taskId) +// The sliding circle effect used by Refresh and Aromatherapy +void AnimTask_StatusClearedEffect(u8 taskId) { sub_8117854( taskId, @@ -3883,7 +3885,7 @@ void sub_815DFCC(u8 taskId) // arg 0: initial x pixel offset // arg 1: initial y pixel offset // arg 2: which direction (0 = upward, 1 = downward, 2 = horizontal) -void AnimRoarNoiseLine(struct Sprite *sprite) +static void AnimRoarNoiseLine(struct Sprite *sprite) { if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_OPPONENT) gBattleAnimArgs[0] = -gBattleAnimArgs[0]; @@ -3913,10 +3915,10 @@ void AnimRoarNoiseLine(struct Sprite *sprite) sprite->hFlip = 1; } - sprite->callback = AnimRoarNoiseLineStep; + sprite->callback = AnimRoarNoiseLine_Step; } -static void AnimRoarNoiseLineStep(struct Sprite *sprite) +static void AnimRoarNoiseLine_Step(struct Sprite *sprite) { sprite->data[6] += sprite->data[0]; sprite->data[7] += sprite->data[1]; @@ -3953,10 +3955,10 @@ void AnimTask_GlareEyeDots(u8 taskId) task->data[12] = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET) - GetBattlerSpriteCoordAttr(gBattleAnimAttacker, BATTLER_COORD_ATTR_HEIGHT) / 4; task->data[13] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2); task->data[14] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET); - task->func = AnimTask_GlareEyeDotsStep; + task->func = AnimTask_GlareEyeDots_Step; } -static void AnimTask_GlareEyeDotsStep(u8 taskId) +static void AnimTask_GlareEyeDots_Step(u8 taskId) { u8 i; s16 x, y; @@ -4050,7 +4052,7 @@ static void GetGlareEyeDotCoords(s16 arg0, s16 arg1, s16 arg2, s16 arg3, u8 arg4 *y = y2 >> 8; } -void AnimGlareEyeDot(struct Sprite *sprite) +static void AnimGlareEyeDot(struct Sprite *sprite) { if (++sprite->data[0] > 36) { @@ -4065,7 +4067,7 @@ void AnimGlareEyeDot(struct Sprite *sprite) // arg 2: destination x position // arg 3: destination y position // arg 4: duration -void AnimAssistPawprint(struct Sprite *sprite) +static void AnimAssistPawprint(struct Sprite *sprite) { sprite->pos1.x = gBattleAnimArgs[0]; sprite->pos1.y = gBattleAnimArgs[1]; @@ -4097,7 +4099,7 @@ void AnimTask_BarrageBall(u8 taskId) if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_OPPONENT) StartSpriteAffineAnim(&gSprites[task->data[15]], 1); - task->func = AnimTask_BarrageBallStep; + task->func = AnimTask_BarrageBall_Step; } else { @@ -4105,7 +4107,7 @@ void AnimTask_BarrageBall(u8 taskId) } } -static void AnimTask_BarrageBallStep(u8 taskId) +static void AnimTask_BarrageBall_Step(u8 taskId) { struct Task *task = &gTasks[taskId]; @@ -4152,7 +4154,7 @@ static void AnimTask_BarrageBallStep(u8 taskId) // arg 0: which battler // arg 1: horizontal flip // arg 2: num squishes -void AnimSmellingSaltsHand(struct Sprite *sprite) +static void AnimSmellingSaltsHand(struct Sprite *sprite) { u8 battler; @@ -4238,11 +4240,11 @@ void AnimTask_SmellingSaltsSquish(u8 taskId) gTasks[taskId].data[0] = gBattleAnimArgs[1]; gTasks[taskId].data[15] = GetAnimBattlerSpriteId(gBattleAnimArgs[0]); PrepareAffineAnimInTaskData(&gTasks[taskId], gTasks[taskId].data[15], gSmellingSaltsSquishAffineAnimCmds); - gTasks[taskId].func = AnimTask_SmellingSaltsSquishStep; + gTasks[taskId].func = AnimTask_SmellingSaltsSquish_Step; } } -static void AnimTask_SmellingSaltsSquishStep(u8 taskId) +static void AnimTask_SmellingSaltsSquish_Step(u8 taskId) { struct Task *task = &gTasks[taskId]; @@ -4275,7 +4277,7 @@ static void AnimTask_SmellingSaltsSquishStep(u8 taskId) // arg 0: which mon // arg 1: blink delay // arg 2: number of blinks -void AnimSmellingSaltExclamation(struct Sprite *sprite) +static void AnimSmellingSaltExclamation(struct Sprite *sprite) { if (gBattleAnimArgs[0] == ANIM_ATTACKER) { @@ -4295,10 +4297,10 @@ void AnimSmellingSaltExclamation(struct Sprite *sprite) sprite->data[1] = gBattleAnimArgs[1]; sprite->data[2] = 0; sprite->data[3] = gBattleAnimArgs[2]; - sprite->callback = AnimSmellingSaltExclamationStep; + sprite->callback = AnimSmellingSaltExclamation_Step; } -static void AnimSmellingSaltExclamationStep(struct Sprite *sprite) +static void AnimSmellingSaltExclamation_Step(struct Sprite *sprite) { if (++sprite->data[0] >= sprite->data[1]) { @@ -4313,7 +4315,7 @@ static void AnimSmellingSaltExclamationStep(struct Sprite *sprite) // Claps a hand several times. // arg 0: which hand // arg 1: -void AnimHelpingHandClap(struct Sprite *sprite) +static void AnimHelpingHandClap(struct Sprite *sprite) { if (gBattleAnimArgs[0] == 0) { @@ -4328,10 +4330,10 @@ void AnimHelpingHandClap(struct Sprite *sprite) } sprite->pos1.y = 56; - sprite->callback = AnimHelpingHandClapStep; + sprite->callback = AnimHelpingHandClap_Step; } -static void AnimHelpingHandClapStep(struct Sprite *sprite) +static void AnimHelpingHandClap_Step(struct Sprite *sprite) { switch (sprite->data[0]) { @@ -4445,10 +4447,10 @@ void AnimTask_HelpingHandAttackerMovement(u8 taskId) task->data[14] = 1; } - task->func = AnimTask_HelpingHandAttackerMovementStep; + task->func = AnimTask_HelpingHandAttackerMovement_Step; } -static void AnimTask_HelpingHandAttackerMovementStep(u8 taskId) +static void AnimTask_HelpingHandAttackerMovement_Step(u8 taskId) { struct Task *task = &gTasks[taskId]; @@ -4532,7 +4534,7 @@ static void AnimTask_HelpingHandAttackerMovementStep(u8 taskId) // Moves a magnifying glass around in straight lines. // arg 0: magnifying glass target mon -void AnimForesightMagnifyingGlass(struct Sprite *sprite) +static void AnimForesightMagnifyingGlass(struct Sprite *sprite) { if (gBattleAnimArgs[0] == ANIM_ATTACKER) { @@ -4549,10 +4551,10 @@ void AnimForesightMagnifyingGlass(struct Sprite *sprite) sprite->oam.priority = GetBattlerSpriteBGPriority(sprite->data[7]); sprite->oam.objMode = ST_OAM_OBJ_BLEND; - sprite->callback = AnimForesightMagnifyingGlassStep; + sprite->callback = AnimForesightMagnifyingGlass_Step; } -static void AnimForesightMagnifyingGlassStep(struct Sprite *sprite) +static void AnimForesightMagnifyingGlass_Step(struct Sprite *sprite) { u16 x, y; @@ -4644,7 +4646,7 @@ static void AnimForesightMagnifyingGlassStep(struct Sprite *sprite) SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(sprite->data[1], sprite->data[2])); if (++sprite->data[0] == 32) { - sprite->invisible = 1; + sprite->invisible = TRUE; sprite->data[5]++; } break; @@ -4654,7 +4656,7 @@ static void AnimForesightMagnifyingGlassStep(struct Sprite *sprite) } } -static void AnimMeteorMashStarStep(struct Sprite *sprite) +static void AnimMeteorMashStar_Step(struct Sprite *sprite) { sprite->pos2.x = ((sprite->data[2] - sprite->data[0]) * sprite->data[5]) / sprite->data[4]; sprite->pos2.y = ((sprite->data[3] - sprite->data[1]) * sprite->data[5]) / sprite->data[4]; @@ -4678,7 +4680,7 @@ static void AnimMeteorMashStarStep(struct Sprite *sprite) // arg 2: destination x pixel offset // arg 3: destination y pixel offset // arg 4: duration -void AnimMeteorMashStar(struct Sprite *sprite) +static void AnimMeteorMashStar(struct Sprite *sprite) { s16 y = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2); // unused local variable s16 x = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET); // unused local variable @@ -4699,7 +4701,7 @@ void AnimMeteorMashStar(struct Sprite *sprite) sprite->data[4] = gBattleAnimArgs[4]; sprite->pos1.x = sprite->data[0]; sprite->pos1.y = sprite->data[1]; - sprite->callback = AnimMeteorMashStarStep; + sprite->callback = AnimMeteorMashStar_Step; } void AnimTask_MonToSubstitute(u8 taskId) @@ -4723,7 +4725,7 @@ void AnimTask_MonToSubstitute(u8 taskId) { gTasks[taskId].data[3] = 0; ResetSpriteRotScale(spriteId); - gSprites[spriteId].invisible = 1; + gSprites[spriteId].invisible = TRUE; gTasks[taskId].data[0]++; } } @@ -4752,7 +4754,7 @@ static void AnimTask_MonToSubstituteDoll(u8 taskId) case 0: gSprites[spriteId].pos2.y = -200; gSprites[spriteId].pos2.x = 200; - gSprites[spriteId].invisible = 0; + gSprites[spriteId].invisible = FALSE; gTasks[taskId].data[10] = 0; gTasks[taskId].data[0]++; break; @@ -4798,7 +4800,7 @@ static void AnimTask_MonToSubstituteDoll(u8 taskId) // Moves down an X that flickers and disappears. // No args. -void AnimBlockX(struct Sprite *sprite) +static void AnimBlockX(struct Sprite *sprite) { s16 y; @@ -4815,10 +4817,10 @@ void AnimBlockX(struct Sprite *sprite) sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimTarget, 3); sprite->pos2.y = y; - sprite->callback = AnimBlockXStep; + sprite->callback = AnimBlockX_Step; } -static void AnimBlockXStep(struct Sprite *sprite) +static void AnimBlockX_Step(struct Sprite *sprite) { switch (sprite->data[0]) { @@ -4922,13 +4924,13 @@ void AnimTask_OdorSleuthMovement(u8 taskId) if (!gBattleSpritesDataPtr->battlerData[gBattleAnimTarget].invisible) { - gSprites[spriteId2].invisible = 0; - gSprites[spriteId1].invisible = 1; + gSprites[spriteId2].invisible = FALSE; + gSprites[spriteId1].invisible = TRUE; } else { - gSprites[spriteId2].invisible = 1; - gSprites[spriteId1].invisible = 1; + gSprites[spriteId2].invisible = TRUE; + gSprites[spriteId1].invisible = TRUE; } gSprites[spriteId2].oam.objMode = ST_OAM_OBJ_NORMAL; @@ -4983,15 +4985,15 @@ static void MoveOdorSleuthClone(struct Sprite *sprite) void AnimTask_GetReturnPowerLevel(u8 taskId) { - gBattleAnimArgs[7] = 0; + gBattleAnimArgs[ARG_RET_ID] = 0; if (gAnimFriendship < 60) - gBattleAnimArgs[7] = 0; + gBattleAnimArgs[ARG_RET_ID] = 0; if (gAnimFriendship > 60 && gAnimFriendship < 92) - gBattleAnimArgs[7] = 1; + gBattleAnimArgs[ARG_RET_ID] = 1; if (gAnimFriendship > 91 && gAnimFriendship < 201) - gBattleAnimArgs[7] = 2; + gBattleAnimArgs[ARG_RET_ID] = 2; if (gAnimFriendship > 200) - gBattleAnimArgs[7] = 3; + gBattleAnimArgs[ARG_RET_ID] = 3; DestroyAnimVisualTask(taskId); } @@ -5143,7 +5145,7 @@ void AnimTask_SnatchOpposingMonMove(u8 taskId) } } -void sub_815FE80(struct Sprite *sprite) +static void sub_815FE80(struct Sprite *sprite) { switch (sprite->data[7]) { @@ -5154,13 +5156,13 @@ void sub_815FE80(struct Sprite *sprite) sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y) + 16; sprite->data[0] = -32; sprite->data[7]++; - sprite->invisible = 0; + sprite->invisible = FALSE; if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_OPPONENT && !IsContest()) sprite->subpriority = gSprites[GetAnimBattlerSpriteId(ANIM_TARGET)].subpriority - 1; } else { - sprite->invisible = 1; + sprite->invisible = TRUE; } break; case 1: @@ -5260,10 +5262,10 @@ void AnimTask_TeeterDanceMovement(u8 taskId) task->data[11] = 0; task->data[10] = 1; task->data[12] = 0; - task->func = AnimTask_TeeterDanceMovementStep; + task->func = AnimTask_TeeterDanceMovement_Step; } -static void AnimTask_TeeterDanceMovementStep(u8 taskId) +static void AnimTask_TeeterDanceMovement_Step(u8 taskId) { struct Task *task = &gTasks[taskId]; switch (task->data[0]) @@ -5297,7 +5299,7 @@ static void AnimTask_TeeterDanceMovementStep(u8 taskId) } } -static void AnimKnockOffStrikeStep(struct Sprite *sprite) +static void AnimKnockOffStrike_Step(struct Sprite *sprite) { // These two cases are identical. if (GetBattlerSide(gBattleAnimTarget) == B_SIDE_PLAYER) @@ -5322,7 +5324,7 @@ static void AnimKnockOffStrikeStep(struct Sprite *sprite) // Animates a strike that swipes downard at the target mon. // arg 0: initial x pixel offset // arg 1: initial y pixel offset -void AnimKnockOffStrike(struct Sprite *sprite) +static void AnimKnockOffStrike(struct Sprite *sprite) { if (GetBattlerSide(gBattleAnimTarget) == B_SIDE_PLAYER) { @@ -5340,12 +5342,12 @@ void AnimKnockOffStrike(struct Sprite *sprite) sprite->pos1.y += gBattleAnimArgs[1]; } - sprite->callback = AnimKnockOffStrikeStep; + sprite->callback = AnimKnockOffStrike_Step; } // Gradually fades a rotating recyle arrow sprite in and back out. // No args. -void AnimRecycle(struct Sprite *sprite) +static void AnimRecycle(struct Sprite *sprite) { sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); sprite->pos1.y = GetBattlerSpriteCoordAttr(gBattleAnimAttacker, BATTLER_COORD_ATTR_TOP); @@ -5354,11 +5356,11 @@ void AnimRecycle(struct Sprite *sprite) sprite->data[6] = 0; sprite->data[7] = 16; - sprite->callback = AnimRecycleStep; + sprite->callback = AnimRecycle_Step; SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(sprite->data[6], sprite->data[7])); } -static void AnimRecycleStep(struct Sprite *sprite) +static void AnimRecycle_Step(struct Sprite *sprite) { switch (sprite->data[2]) { @@ -5420,15 +5422,15 @@ static void AnimRecycleStep(struct Sprite *sprite) void AnimTask_GetWeather(u8 taskId) { - gBattleAnimArgs[7] = ANIM_WEATHER_NONE; + gBattleAnimArgs[ARG_RET_ID] = ANIM_WEATHER_NONE; if (gWeatherMoveAnim & WEATHER_SUN_ANY) - gBattleAnimArgs[7] = ANIM_WEATHER_SUN; + gBattleAnimArgs[ARG_RET_ID] = ANIM_WEATHER_SUN; else if (gWeatherMoveAnim & WEATHER_RAIN_ANY) - gBattleAnimArgs[7] = ANIM_WEATHER_RAIN; + gBattleAnimArgs[ARG_RET_ID] = ANIM_WEATHER_RAIN; else if (gWeatherMoveAnim & WEATHER_SANDSTORM_ANY) - gBattleAnimArgs[7] = ANIM_WEATHER_SANDSTORM; + gBattleAnimArgs[ARG_RET_ID] = ANIM_WEATHER_SANDSTORM; else if (gWeatherMoveAnim & WEATHER_HAIL_ANY) - gBattleAnimArgs[7] = ANIM_WEATHER_HAIL; + gBattleAnimArgs[ARG_RET_ID] = ANIM_WEATHER_HAIL; DestroyAnimVisualTask(taskId); } @@ -5441,10 +5443,10 @@ void AnimTask_SlackOffSquish(u8 taskId) task->data[0] = 0; task->data[15] = GetAnimBattlerSpriteId(gBattleAnimArgs[0]); PrepareAffineAnimInTaskData(task, task->data[15], gSlackOffSquishAffineAnimCmds); - task->func = AnimTask_SlackOffSquishStep; + task->func = AnimTask_SlackOffSquish_Step; } -static void AnimTask_SlackOffSquishStep(u8 taskId) +static void AnimTask_SlackOffSquish_Step(u8 taskId) { struct Task *task = &gTasks[taskId]; diff --git a/src/electric.c b/src/battle_anim_electric.c similarity index 73% rename from src/electric.c rename to src/battle_anim_electric.c index 3344db7bf..c153dbc10 100644 --- a/src/electric.c +++ b/src/battle_anim_electric.c @@ -5,39 +5,39 @@ #include "constants/songs.h" #include "sound.h" -static void sub_810A1A8(struct Sprite *); -static void sub_810A1F8(struct Sprite *); +static void AnimLightning(struct Sprite *); +static void AnimLightning_Step(struct Sprite *); static void sub_810A214(struct Sprite *); static void sub_810A258(struct Sprite *); static void sub_810A274(struct Sprite *); -static void sub_810A308(struct Sprite *); -static void sub_810A46C(struct Sprite *); -static void sub_810A4F4(struct Sprite *); -static void sub_810A56C(struct Sprite *); -static void sub_810A5BC(struct Sprite *); -static void sub_810A628(struct Sprite *); -static void sub_810A6EC(struct Sprite *); -static void sub_810A75C(struct Sprite *); -static void sub_810A834(u8 taskId); -static void sub_810A9DC(struct Sprite *); -static void sub_810AA2C(struct Sprite *); -static void sub_810AAB0(struct Sprite *); -static void sub_810AB78(u8 taskId); -static void sub_810AC8C(struct Sprite *); -static void sub_810ACC0(struct Sprite *); -static void sub_810ACD8(struct Sprite *); -static void sub_810AD30(struct Sprite *); -static void sub_810AD98(struct Sprite *); -static void sub_810ADF8(struct Sprite *); +static void AnimSparkElectricity(struct Sprite *); +static void AnimZapCannonSpark(struct Sprite *); +static void AnimZapCannonSpark_Step(struct Sprite *); +static void AnimThunderboltOrb(struct Sprite *); +static void AnimThunderboltOrb_Step(struct Sprite *); +static void AnimSparkElectricityFlashing(struct Sprite *); +static void AnimSparkElectricityFlashing_Step(struct Sprite *); +static void AnimElectricity(struct Sprite *); +static void AnimTask_ElectricBolt_Step(u8 taskId); +static void AnimElectricBoltSegment(struct Sprite *); +static void AnimThunderWave(struct Sprite *); +static void AnimThunderWave_Step(struct Sprite *); +static void AnimTask_ElectricChargingParticles_Step(u8 taskId); +static void AnimElectricChargingParticles(struct Sprite *); +static void AnimElectricChargingParticles_Step(struct Sprite *); +static void AnimGrowingChargeOrb(struct Sprite *); +static void AnimElectricPuff(struct Sprite *); +static void AnimVoltTackleOrbSlide(struct Sprite *); +static void AnimVoltTackleOrbSlide_Step(struct Sprite *); static bool8 sub_810B154(struct Task *task, u8 taskId); -static void sub_810B1F0(struct Sprite *); -static void sub_810B23C(struct Sprite *); +static void AnimVoltTackleBolt(struct Sprite *); +static void AnimGrowingShockWaveOrb(struct Sprite *); static bool8 sub_810B430(struct Task *task, u8 taskId); -static void sub_810B51C(struct Sprite *); +static void AnimShockWaveProgressingBolt(struct Sprite *); static bool8 sub_810B614(struct Task *task, u8 taskId); static void sub_810B684(struct Sprite *sprite); -const union AnimCmd gUnknown_085956A4[] = +static const union AnimCmd sAnim_Lightning[] = { ANIMCMD_FRAME(0, 5), ANIMCMD_FRAME(16, 5), @@ -47,23 +47,23 @@ const union AnimCmd gUnknown_085956A4[] = ANIMCMD_END, }; -const union AnimCmd *const gUnknown_085956BC[] = +static const union AnimCmd *const sAnims_Lightning[] = { - gUnknown_085956A4, + sAnim_Lightning, }; -const struct SpriteTemplate gUnknown_085956C0 = +const struct SpriteTemplate gLightningSpriteTemplate = { .tileTag = ANIM_TAG_LIGHTNING, .paletteTag = ANIM_TAG_LIGHTNING, .oam = &gOamData_AffineOff_ObjNormal_32x32, - .anims = gUnknown_085956BC, + .anims = sAnims_Lightning, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_810A1A8, + .callback = AnimLightning, }; -const union AffineAnimCmd gUnknown_085956D8[] = +static const union AffineAnimCmd gUnknown_085956D8[] = { AFFINEANIMCMD_FRAME(0x100, 0x100, 0, 0), AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 20), @@ -71,11 +71,12 @@ const union AffineAnimCmd gUnknown_085956D8[] = AFFINEANIMCMD_END, }; -const union AffineAnimCmd *const gUnknown_085956F8[] = +static const union AffineAnimCmd *const gUnknown_085956F8[] = { gUnknown_085956D8, }; +// Unused const struct SpriteTemplate gUnknown_085956FC = { .tileTag = ANIM_TAG_HANDS_AND_FEET, @@ -87,7 +88,7 @@ const struct SpriteTemplate gUnknown_085956FC = .callback = sub_810A214, }; -const union AnimCmd gUnknown_08595714[] = +static const union AnimCmd gUnknown_08595714[] = { ANIMCMD_FRAME(0, 5), ANIMCMD_FRAME(16, 5), @@ -98,11 +99,12 @@ const union AnimCmd gUnknown_08595714[] = ANIMCMD_JUMP(0), }; -const union AnimCmd *const gUnknown_08595730[] = +static const union AnimCmd *const gUnknown_08595730[] = { gUnknown_08595714, }; +// Unused const struct SpriteTemplate gUnknown_08595734 = { .tileTag = ANIM_TAG_SHOCK, @@ -114,7 +116,7 @@ const struct SpriteTemplate gUnknown_08595734 = .callback = sub_810A274, }; -const struct SpriteTemplate gBattleAnimSpriteTemplate_859574C = +const struct SpriteTemplate gSparkElectricitySpriteTemplate = { .tileTag = ANIM_TAG_SPARK_2, .paletteTag = ANIM_TAG_SPARK_2, @@ -122,10 +124,10 @@ const struct SpriteTemplate gBattleAnimSpriteTemplate_859574C = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_810A308, + .callback = AnimSparkElectricity, }; -const struct SpriteTemplate gUnknown_08595764 = +const struct SpriteTemplate gZapCannonBallSpriteTemplate = { .tileTag = ANIM_TAG_BLACK_BALL_2, .paletteTag = ANIM_TAG_BLACK_BALL_2, @@ -136,29 +138,29 @@ const struct SpriteTemplate gUnknown_08595764 = .callback = TranslateAnimSpriteToTargetMonLocation, }; -const union AffineAnimCmd gUnknown_0859577C[] = +static const union AffineAnimCmd sAffineAnim_FlashingSpark[] = { AFFINEANIMCMD_FRAME(0x0, 0x0, 20, 1), AFFINEANIMCMD_JUMP(0), }; -const union AffineAnimCmd *const gUnknown_0859578C[] = +static const union AffineAnimCmd *const sAffineAnims_FlashingSpark[] = { - gUnknown_0859577C, + sAffineAnim_FlashingSpark, }; -const struct SpriteTemplate gUnknown_08595790 = +const struct SpriteTemplate gZapCannonSparkSpriteTemplate = { .tileTag = ANIM_TAG_SPARK_2, .paletteTag = ANIM_TAG_SPARK_2, .oam = &gOamData_AffineNormal_ObjNormal_16x16, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_0859578C, - .callback = sub_810A46C, + .affineAnims = sAffineAnims_FlashingSpark, + .callback = AnimZapCannonSpark, }; -const union AnimCmd gUnknown_085957A8[] = +static const union AnimCmd sAnim_ThunderboltOrb[] = { ANIMCMD_FRAME(0, 6), ANIMCMD_FRAME(16, 6), @@ -166,12 +168,12 @@ const union AnimCmd gUnknown_085957A8[] = ANIMCMD_JUMP(0), }; -const union AnimCmd *const gUnknown_085957B8[] = +static const union AnimCmd *const sAnims_ThunderboltOrb[] = { - gUnknown_085957A8, + sAnim_ThunderboltOrb, }; -const union AffineAnimCmd gUnknown_085957BC[] = +static const union AffineAnimCmd sAffineAnim_ThunderboltOrb[] = { AFFINEANIMCMD_FRAME(0xE8, 0xE8, 0, 0), AFFINEANIMCMD_FRAME(0xFFF8, 0xFFF8, 0, 10), @@ -179,31 +181,31 @@ const union AffineAnimCmd gUnknown_085957BC[] = AFFINEANIMCMD_JUMP(1), }; -const union AffineAnimCmd *const gUnknown_085957DC[] = +static const union AffineAnimCmd *const sAffineAnims_ThunderboltOrb[] = { - gUnknown_085957BC, + sAffineAnim_ThunderboltOrb, }; -const struct SpriteTemplate gBattleAnimSpriteTemplate_85957E0 = +const struct SpriteTemplate gThunderboltOrbSpriteTemplate = { .tileTag = ANIM_TAG_SHOCK_3, .paletteTag = ANIM_TAG_SHOCK_3, .oam = &gOamData_AffineNormal_ObjNormal_32x32, - .anims = gUnknown_085957B8, + .anims = sAnims_ThunderboltOrb, .images = NULL, - .affineAnims = gUnknown_085957DC, - .callback = sub_810A5BC, + .affineAnims = sAffineAnims_ThunderboltOrb, + .callback = AnimThunderboltOrb, }; -const struct SpriteTemplate gBattleAnimSpriteTemplate_85957F8 = +const struct SpriteTemplate gSparkElectricityFlashingSpriteTemplate = { .tileTag = ANIM_TAG_SPARK_2, .paletteTag = ANIM_TAG_SPARK_2, .oam = &gOamData_AffineNormal_ObjNormal_16x16, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_0859578C, - .callback = sub_810A628, + .affineAnims = sAffineAnims_FlashingSpark, + .callback = AnimSparkElectricityFlashing, }; const struct SpriteTemplate gElectricitySpriteTemplate = @@ -214,10 +216,10 @@ const struct SpriteTemplate gElectricitySpriteTemplate = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_810A75C, + .callback = AnimElectricity, }; -const struct SpriteTemplate gUnknown_08595828 = +const struct SpriteTemplate gElectricBoltSegmentSpriteTemplate = { .tileTag = ANIM_TAG_SPARK, .paletteTag = ANIM_TAG_SPARK, @@ -225,10 +227,10 @@ const struct SpriteTemplate gUnknown_08595828 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_810A9DC, + .callback = AnimElectricBoltSegment, }; -const struct SpriteTemplate gUnknown_08595840 = +const struct SpriteTemplate gThunderWaveSpriteTemplate = { .tileTag = ANIM_TAG_SPARK_H, .paletteTag = ANIM_TAG_SPARK_H, @@ -236,10 +238,10 @@ const struct SpriteTemplate gUnknown_08595840 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_810AA2C, + .callback = AnimThunderWave, }; -const s8 gUnknown_08595858[][2] = +static const s8 sElectricChargingParticleCoordOffsets[][2] = { { 58, -60}, {-56, -36}, @@ -259,7 +261,7 @@ const s8 gUnknown_08595858[][2] = { 48, 48}, }; -const union AnimCmd gUnknown_08595878[] = +static const union AnimCmd sAnim_ElectricChargingParticles_0[] = { ANIMCMD_FRAME(3, 1), ANIMCMD_FRAME(2, 1), @@ -268,7 +270,7 @@ const union AnimCmd gUnknown_08595878[] = ANIMCMD_END, }; -const union AnimCmd gUnknown_0859588C[] = +static const union AnimCmd sAnim_ElectricChargingParticles_1[] = { ANIMCMD_FRAME(0, 5), ANIMCMD_FRAME(1, 5), @@ -277,24 +279,24 @@ const union AnimCmd gUnknown_0859588C[] = ANIMCMD_END, }; -const union AnimCmd *const gUnknown_085958A0[] = +static const union AnimCmd *const sAnims_ElectricChargingParticles[] = { - gUnknown_08595878, - gUnknown_0859588C, + sAnim_ElectricChargingParticles_0, + sAnim_ElectricChargingParticles_1, }; -const struct SpriteTemplate gUnknown_085958A8 = +const struct SpriteTemplate gElectricChargingParticlesSpriteTemplate = { .tileTag = ANIM_TAG_ELECTRIC_ORBS, .paletteTag = ANIM_TAG_ELECTRIC_ORBS, .oam = &gOamData_AffineOff_ObjNormal_8x8, - .anims = gUnknown_085958A0, + .anims = sAnims_ElectricChargingParticles, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCallbackDummy, }; -const union AffineAnimCmd gUnknown_085958C0[] = +static const union AffineAnimCmd sAffineAnim_GrowingElectricOrb_0[] = { AFFINEANIMCMD_FRAME(0x10, 0x10, 0, 0), AFFINEANIMCMD_FRAME(0x4, 0x4, 0, 60), @@ -306,7 +308,7 @@ const union AffineAnimCmd gUnknown_085958C0[] = AFFINEANIMCMD_END, }; -const union AffineAnimCmd gUnknown_08595900[] = +static const union AffineAnimCmd sAffineAnim_GrowingElectricOrb_1[] = { AFFINEANIMCMD_FRAME(0x10, 0x10, 0, 0), AFFINEANIMCMD_FRAME(0x8, 0x8, 0, 30), @@ -316,7 +318,7 @@ const union AffineAnimCmd gUnknown_08595900[] = AFFINEANIMCMD_JUMP(3), }; -const union AffineAnimCmd gUnknown_08595930[] = +static const union AffineAnimCmd sAffineAnim_GrowingElectricOrb_2[] = { AFFINEANIMCMD_FRAME(0x10, 0x10, 0, 0), AFFINEANIMCMD_FRAME(0x8, 0x8, 0, 30), @@ -324,25 +326,25 @@ const union AffineAnimCmd gUnknown_08595930[] = AFFINEANIMCMD_END, }; -const union AffineAnimCmd *const gUnknown_08595950[] = +static const union AffineAnimCmd *const sAffineAnims_GrowingElectricOrb[] = { - gUnknown_085958C0, - gUnknown_08595900, - gUnknown_08595930, + sAffineAnim_GrowingElectricOrb_0, + sAffineAnim_GrowingElectricOrb_1, + sAffineAnim_GrowingElectricOrb_2, }; -const struct SpriteTemplate gUnknown_0859595C = +const struct SpriteTemplate gGrowingChargeOrbSpriteTemplate = { .tileTag = ANIM_TAG_CIRCLE_OF_LIGHT, .paletteTag = ANIM_TAG_CIRCLE_OF_LIGHT, .oam = &gOamData_AffineNormal_ObjBlend_64x64, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_08595950, - .callback = sub_810ACD8, + .affineAnims = sAffineAnims_GrowingElectricOrb, + .callback = AnimGrowingChargeOrb, }; -const union AnimCmd gUnknown_08595974[] = +static const union AnimCmd sAnim_ElectricPuff[] = { ANIMCMD_FRAME(0, 3), ANIMCMD_FRAME(16, 3), @@ -351,99 +353,99 @@ const union AnimCmd gUnknown_08595974[] = ANIMCMD_END, }; -const union AnimCmd *const gUnknown_08595988[] = +static const union AnimCmd *const sAnims_ElectricPuff[] = { - gUnknown_08595974, + sAnim_ElectricPuff, }; -const struct SpriteTemplate gUnknown_0859598C = +const struct SpriteTemplate gElectricPuffSpriteTemplate = { .tileTag = ANIM_TAG_ELECTRICITY, .paletteTag = ANIM_TAG_ELECTRICITY, .oam = &gOamData_AffineOff_ObjNormal_32x32, - .anims = gUnknown_08595988, + .anims = sAnims_ElectricPuff, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_810AD30, + .callback = AnimElectricPuff, }; -const struct SpriteTemplate gUnknown_085959A4 = +const struct SpriteTemplate gVoltTackleOrbSlideSpriteTemplate = { .tileTag = ANIM_TAG_CIRCLE_OF_LIGHT, .paletteTag = ANIM_TAG_CIRCLE_OF_LIGHT, .oam = &gOamData_AffineNormal_ObjBlend_64x64, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_08595950, - .callback = sub_810AD98, + .affineAnims = sAffineAnims_GrowingElectricOrb, + .callback = AnimVoltTackleOrbSlide, }; -const union AnimCmd gUnknown_085959BC[] = +static const union AnimCmd sAnim_VoltTackleBolt_0[] = { ANIMCMD_FRAME(0, 3), ANIMCMD_END, }; -const union AnimCmd gUnknown_085959C4[] = +static const union AnimCmd sAnim_VoltTackleBolt_1[] = { ANIMCMD_FRAME(2, 3), ANIMCMD_END, }; -const union AnimCmd gUnknown_085959CC[] = +static const union AnimCmd sAnim_VoltTackleBolt_2[] = { ANIMCMD_FRAME(4, 3), ANIMCMD_END, }; -const union AnimCmd gUnknown_085959D4[] = +static const union AnimCmd sAnim_VoltTackleBolt_3[] = { ANIMCMD_FRAME(6, 3), ANIMCMD_END, }; -const union AnimCmd *const gUnknown_085959DC[] = +static const union AnimCmd *const sAnims_VoltTackleBolt[] = { - gUnknown_085959BC, - gUnknown_085959C4, - gUnknown_085959CC, - gUnknown_085959D4, + sAnim_VoltTackleBolt_0, + sAnim_VoltTackleBolt_1, + sAnim_VoltTackleBolt_2, + sAnim_VoltTackleBolt_3, }; -const union AffineAnimCmd gUnknown_085959EC[] = +static const union AffineAnimCmd sAffineAnim_VoltTackleBolt[] = { AFFINEANIMCMD_FRAME(0x100, 0x100, 64, 0), AFFINEANIMCMD_END, }; -const union AffineAnimCmd *const gUnknown_085959FC[] = +static const union AffineAnimCmd *const sAffineAnims_VoltTackleBolt[] = { - gUnknown_085959EC, + sAffineAnim_VoltTackleBolt, }; -const struct SpriteTemplate gUnknown_08595A00 = +const struct SpriteTemplate gVoltTackleBoltSpriteTemplate = { .tileTag = ANIM_TAG_SPARK, .paletteTag = ANIM_TAG_SPARK, .oam = &gOamData_AffineDouble_ObjNormal_8x16, - .anims = gUnknown_085959DC, + .anims = sAnims_VoltTackleBolt, .images = NULL, - .affineAnims = gUnknown_085959FC, - .callback = sub_810B1F0, + .affineAnims = sAffineAnims_VoltTackleBolt, + .callback = AnimVoltTackleBolt, }; -const struct SpriteTemplate gUnknown_08595A18 = +const struct SpriteTemplate gGrowingShockWaveOrbSpriteTemplate = { .tileTag = ANIM_TAG_CIRCLE_OF_LIGHT, .paletteTag = ANIM_TAG_CIRCLE_OF_LIGHT, .oam = &gOamData_AffineNormal_ObjBlend_64x64, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_08595950, - .callback = sub_810B23C, + .affineAnims = sAffineAnims_GrowingElectricOrb, + .callback = AnimGrowingShockWaveOrb, }; -const struct SpriteTemplate gUnknown_08595A30 = +const struct SpriteTemplate gShockWaveProgressingBoltSpriteTemplate = { .tileTag = ANIM_TAG_SPARK, .paletteTag = ANIM_TAG_SPARK, @@ -451,10 +453,10 @@ const struct SpriteTemplate gUnknown_08595A30 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_810B51C, + .callback = AnimShockWaveProgressingBolt, }; -static void sub_810A1A8(struct Sprite *sprite) +static void AnimLightning(struct Sprite *sprite) { if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER) sprite->pos1.x -= gBattleAnimArgs[0]; @@ -462,10 +464,10 @@ static void sub_810A1A8(struct Sprite *sprite) sprite->pos1.x += gBattleAnimArgs[0]; sprite->pos1.y += gBattleAnimArgs[1]; - sprite->callback = sub_810A1F8; + sprite->callback = AnimLightning_Step; } -static void sub_810A1F8(struct Sprite *sprite) +static void AnimLightning_Step(struct Sprite *sprite) { if (sprite->animEnded) DestroyAnimSprite(sprite); @@ -510,7 +512,7 @@ static void sub_810A274(struct Sprite *sprite) sprite->callback = TranslateSpriteInCircleOverDuration; } -static void sub_810A308(struct Sprite *sprite) +static void AnimSparkElectricity(struct Sprite *sprite) { u8 battler; u32 matrixNum; @@ -518,20 +520,20 @@ static void sub_810A308(struct Sprite *sprite) switch (gBattleAnimArgs[4]) { - case 0: + case ANIM_ATTACKER: battler = gBattleAnimAttacker; break; - case 1: + case ANIM_TARGET: default: battler = gBattleAnimTarget; break; - case 2: + case ANIM_ATK_PARTNER: if (!IsBattlerSpriteVisible(BATTLE_PARTNER(gBattleAnimAttacker))) battler = gBattleAnimAttacker; else battler = BATTLE_PARTNER(gBattleAnimAttacker); break; - case 3: + case ANIM_DEF_PARTNER: if (IsBattlerSpriteVisible(BATTLE_PARTNER(gBattleAnimAttacker))) battler = BATTLE_PARTNER(gBattleAnimTarget); else @@ -564,10 +566,10 @@ static void sub_810A308(struct Sprite *sprite) gOamMatrices[matrixNum].c = -sineVal; sprite->data[0] = gBattleAnimArgs[3]; - sprite->callback = sub_810E2C8; + sprite->callback = DestroyAnimSpriteAfterTimer; } -static void sub_810A46C(struct Sprite *sprite) +static void AnimZapCannonSpark(struct Sprite *sprite) { InitSpritePosToAnimAttacker(sprite, 1); sprite->data[0] = gBattleAnimArgs[3]; @@ -580,11 +582,11 @@ static void sub_810A46C(struct Sprite *sprite) sprite->data[6] = gBattleAnimArgs[5]; sprite->data[7] = gBattleAnimArgs[4]; sprite->oam.tileNum += gBattleAnimArgs[6] * 4; - sprite->callback = sub_810A4F4; - sub_810A4F4(sprite); + sprite->callback = AnimZapCannonSpark_Step; + AnimZapCannonSpark_Step(sprite); } -static void sub_810A4F4(struct Sprite *sprite) +static void AnimZapCannonSpark_Step(struct Sprite *sprite) { if (!AnimTranslateLinear(sprite)) { @@ -598,7 +600,7 @@ static void sub_810A4F4(struct Sprite *sprite) DestroyAnimSprite(sprite); } -static void sub_810A56C(struct Sprite *sprite) +static void AnimThunderboltOrb_Step(struct Sprite *sprite) { if (--sprite->data[5] == -1) { @@ -609,7 +611,7 @@ static void sub_810A56C(struct Sprite *sprite) DestroyAnimSprite(sprite); } -static void sub_810A5BC(struct Sprite *sprite) +static void AnimThunderboltOrb(struct Sprite *sprite) { if (IsContest() || GetBattlerSide(gBattleAnimTarget) == B_SIDE_PLAYER) gBattleAnimArgs[1] = -gBattleAnimArgs[1]; @@ -619,10 +621,10 @@ static void sub_810A5BC(struct Sprite *sprite) sprite->data[3] = gBattleAnimArgs[0]; sprite->data[4] = gBattleAnimArgs[3]; sprite->data[5] = gBattleAnimArgs[3]; - sprite->callback = sub_810A56C; + sprite->callback = AnimThunderboltOrb_Step; } -static void sub_810A628(struct Sprite *sprite) +static void AnimSparkElectricityFlashing(struct Sprite *sprite) { u8 battler; @@ -644,24 +646,25 @@ static void sub_810A628(struct Sprite *sprite) sprite->data[7] = gBattleAnimArgs[4]; sprite->oam.tileNum += gBattleAnimArgs[6] * 4; - sprite->callback = sub_810A6EC; + sprite->callback = AnimSparkElectricityFlashing_Step; sprite->callback(sprite); } -static void sub_810A6EC(struct Sprite *sprite) +static void AnimSparkElectricityFlashing_Step(struct Sprite *sprite) { sprite->pos2.x = Sin(sprite->data[7], sprite->data[5]); sprite->pos2.y = Cos(sprite->data[7], sprite->data[5]); sprite->data[7] = (sprite->data[7] + sprite->data[6]) & 0xFF; if (sprite->data[7] % sprite->data[4] == 0) - sprite->invisible ^= 1; + sprite->invisible ^= TRUE; if (sprite->data[0]-- <= 0) DestroyAnimSprite(sprite); } -static void sub_810A75C(struct Sprite *sprite) +// Electricity arcs around the target. Used for Paralysis and various electric move hits +static void AnimElectricity(struct Sprite *sprite) { InitSpritePosToAnimTarget(sprite, FALSE); sprite->oam.tileNum += gBattleAnimArgs[3] * 4; @@ -676,15 +679,16 @@ static void sub_810A75C(struct Sprite *sprite) StoreSpriteCallbackInData6(sprite, DestroyAnimSprite); } -void sub_810A7DC(u8 taskId) +// The vertical falling thunder bolt used in Thunder Wave/Shock/Bolt +void AnimTask_ElectricBolt(u8 taskId) { gTasks[taskId].data[0] = GetBattlerSpriteCoord(gBattleAnimTarget, 0) + gBattleAnimArgs[0]; gTasks[taskId].data[1] = GetBattlerSpriteCoord(gBattleAnimTarget, 1) + gBattleAnimArgs[1]; gTasks[taskId].data[2] = gBattleAnimArgs[2]; - gTasks[taskId].func = sub_810A834; + gTasks[taskId].func = AnimTask_ElectricBolt_Step; } -static void sub_810A834(u8 taskId) +static void AnimTask_ElectricBolt_Step(u8 taskId) { u16 r8; u16 r2; @@ -712,30 +716,30 @@ static void sub_810A834(u8 taskId) { case 0: r12 *= 1; - spriteId = CreateSprite(&gUnknown_08595828, x, y + r12, 2); + spriteId = CreateSprite(&gElectricBoltSegmentSpriteTemplate, x, y + r12, 2); r7++; break; case 2: r12 *= 2; r8 += r2; - spriteId = CreateSprite(&gUnknown_08595828, x, y + r12, 2); + spriteId = CreateSprite(&gElectricBoltSegmentSpriteTemplate, x, y + r12, 2); r7++; break; case 4: r12 *= 3; r8 += r2 * 2; - spriteId = CreateSprite(&gUnknown_08595828, x, y + r12, 2); + spriteId = CreateSprite(&gElectricBoltSegmentSpriteTemplate, x, y + r12, 2); r7++; break; case 6: r12 *= 4; r8 += r2 * 3; - spriteId = CreateSprite(&gUnknown_08595828, x, y + r12, 2); + spriteId = CreateSprite(&gElectricBoltSegmentSpriteTemplate, x, y + r12, 2); r7++; break; case 8: r12 *= 5; - spriteId = CreateSprite(&gUnknown_08595828, x, y + r12, 2); + spriteId = CreateSprite(&gElectricBoltSegmentSpriteTemplate, x, y + r12, 2); r7++; break; case 10: @@ -753,7 +757,7 @@ static void sub_810A834(u8 taskId) gTasks[taskId].data[10]++; } -static void sub_810A9DC(struct Sprite *sprite) +static void AnimElectricBoltSegment(struct Sprite *sprite) { if (!sprite->data[0]) { @@ -769,20 +773,21 @@ static void sub_810A9DC(struct Sprite *sprite) DestroySprite(sprite); } -static void sub_810AA2C(struct Sprite *sprite) +// The horizontal bands of electricity used in Thunder Wave +static void AnimThunderWave(struct Sprite *sprite) { u8 spriteId; sprite->pos1.x += gBattleAnimArgs[0]; sprite->pos1.y += gBattleAnimArgs[1]; - spriteId = CreateSprite(&gUnknown_08595840, sprite->pos1.x + 32, sprite->pos1.y, sprite->subpriority); + spriteId = CreateSprite(&gThunderWaveSpriteTemplate, sprite->pos1.x + 32, sprite->pos1.y, sprite->subpriority); gSprites[spriteId].oam.tileNum += 8; gAnimVisualTaskCount++; - gSprites[spriteId].callback = sub_810AAB0; - sprite->callback = sub_810AAB0; + gSprites[spriteId].callback = AnimThunderWave_Step; + sprite->callback = AnimThunderWave_Step; } -static void sub_810AAB0(struct Sprite *sprite) +static void AnimThunderWave_Step(struct Sprite *sprite) { if (++sprite->data[0] == 3) { @@ -794,11 +799,12 @@ static void sub_810AAB0(struct Sprite *sprite) DestroyAnimSprite(sprite); } -void sub_810AAFC(u8 taskId) +// Animates small electric orbs moving from around the battler inward. For Charge/Shock Wave +void AnimTask_ElectricChargingParticles(u8 taskId) { struct Task *task = &gTasks[taskId]; - if (!gBattleAnimArgs[0]) + if (gBattleAnimArgs[0] == ANIM_ATTACKER) { task->data[14] = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); task->data[15] = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET); @@ -817,10 +823,10 @@ void sub_810AAFC(u8 taskId) task->data[11] = gBattleAnimArgs[3]; task->data[12] = 0; task->data[13] = gBattleAnimArgs[2]; - task->func = sub_810AB78; + task->func = AnimTask_ElectricChargingParticles_Step; } -void sub_810AB78(u8 taskId) +static void AnimTask_ElectricChargingParticles_Step(u8 taskId) { struct Task *task = &gTasks[taskId]; @@ -830,12 +836,12 @@ void sub_810AB78(u8 taskId) { u8 spriteId; task->data[12] = 0; - spriteId = CreateSprite(&gUnknown_085958A8, task->data[14], task->data[15], 2); + spriteId = CreateSprite(&gElectricChargingParticlesSpriteTemplate, task->data[14], task->data[15], 2); if (spriteId != MAX_SPRITES) { struct Sprite *sprite = &gSprites[spriteId]; - sprite->pos1.x += gUnknown_08595858[task->data[9]][0]; - sprite->pos1.y += gUnknown_08595858[task->data[9]][1]; + sprite->pos1.x += sElectricChargingParticleCoordOffsets[task->data[9]][0]; + sprite->pos1.y += sElectricChargingParticleCoordOffsets[task->data[9]][1]; sprite->data[0] = 40 - task->data[8] * 5; sprite->data[1] = sprite->pos1.x; @@ -845,7 +851,7 @@ void sub_810AB78(u8 taskId) sprite->data[5] = taskId; InitAnimLinearTranslation(sprite); - StoreSpriteCallbackInData6(sprite, sub_810ACC0); + StoreSpriteCallbackInData6(sprite, AnimElectricChargingParticles); sprite->callback = RunStoredCallbackWhenAnimEnds; if (++task->data[9] > 15) @@ -867,7 +873,7 @@ void sub_810AB78(u8 taskId) DestroyAnimVisualTask(taskId); } -static void sub_810AC8C(struct Sprite *sprite) +static void AnimElectricChargingParticles_Step(struct Sprite *sprite) { if (AnimTranslateLinear(sprite)) { @@ -876,15 +882,15 @@ static void sub_810AC8C(struct Sprite *sprite) } } -static void sub_810ACC0(struct Sprite *sprite) +static void AnimElectricChargingParticles(struct Sprite *sprite) { StartSpriteAnim(sprite, 1); - sprite->callback = sub_810AC8C; + sprite->callback = AnimElectricChargingParticles_Step; } -static void sub_810ACD8(struct Sprite *sprite) +static void AnimGrowingChargeOrb(struct Sprite *sprite) { - if (!gBattleAnimArgs[0]) + if (gBattleAnimArgs[0] == ANIM_ATTACKER) { sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET); @@ -899,9 +905,10 @@ static void sub_810ACD8(struct Sprite *sprite) sprite->callback = RunStoredCallbackWhenAffineAnimEnds; } -static void sub_810AD30(struct Sprite *sprite) +// The quick electric burst at the end of Charge / during the Volt Tackle hit +static void AnimElectricPuff(struct Sprite *sprite) { - if (!gBattleAnimArgs[0]) + if (gBattleAnimArgs[0] == ANIM_ATTACKER) { sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET); @@ -918,21 +925,22 @@ static void sub_810AD30(struct Sprite *sprite) sprite->callback = RunStoredCallbackWhenAnimEnds; } -static void sub_810AD98(struct Sprite *sprite) +// Creates an orb of electricity that grows then slides off-screen. The attacker slides with it +static void AnimVoltTackleOrbSlide(struct Sprite *sprite) { StartSpriteAffineAnim(sprite, 1); sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET); - sprite->data[6] = GetAnimBattlerSpriteId(0); + sprite->data[6] = GetAnimBattlerSpriteId(ANIM_ATTACKER); sprite->data[7] = 16; if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_OPPONENT) sprite->data[7] *= -1; - sprite->callback = sub_810ADF8; + sprite->callback = AnimVoltTackleOrbSlide_Step; } -static void sub_810ADF8(struct Sprite *sprite) +static void AnimVoltTackleOrbSlide_Step(struct Sprite *sprite) { switch (sprite->data[0]) { @@ -948,14 +956,14 @@ static void sub_810ADF8(struct Sprite *sprite) } } -void sub_810AE5C(u8 taskId) +void AnimTask_VoltTackleAttackerReappear(u8 taskId) { struct Task *task = &gTasks[taskId]; switch (task->data[0]) { case 0: - task->data[15] = GetAnimBattlerSpriteId(0); + task->data[15] = GetAnimBattlerSpriteId(ANIM_ATTACKER); task->data[14] = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_PLAYER) { @@ -998,12 +1006,13 @@ void sub_810AE5C(u8 taskId) } break; case 3: - gSprites[task->data[15]].invisible = 0; + gSprites[task->data[15]].invisible = FALSE; DestroyAnimVisualTask(taskId); } } -void sub_810AFCC(u8 taskId) +// The horizontal bolts of electricity for Volt Tackle +void AnimTask_VoltTackleBolt(u8 taskId) { struct Task *task = &gTasks[taskId]; @@ -1079,7 +1088,7 @@ void sub_810AFCC(u8 taskId) static bool8 sub_810B154(struct Task *task, u8 taskId) { - u8 spriteId = CreateSprite(&gUnknown_08595A00, task->data[3], task->data[5], 35); + u8 spriteId = CreateSprite(&gVoltTackleBoltSpriteTemplate, task->data[3], task->data[5], 35); if (spriteId != MAX_SPRITES) { gSprites[spriteId].data[6] = taskId; @@ -1107,7 +1116,7 @@ static bool8 sub_810B154(struct Task *task, u8 taskId) } } -static void sub_810B1F0(struct Sprite *sprite) +static void AnimVoltTackleBolt(struct Sprite *sprite) { if (++sprite->data[0] > 12) { @@ -1117,7 +1126,7 @@ static void sub_810B1F0(struct Sprite *sprite) } } -static void sub_810B23C(struct Sprite *sprite) +static void AnimGrowingShockWaveOrb(struct Sprite *sprite) { switch (sprite->data[0]) { @@ -1134,7 +1143,8 @@ static void sub_810B23C(struct Sprite *sprite) } } -void sub_810B29C(u8 taskId) +// Thin bolt of electricity that moves up and down toward the target. Used by Shock Wave +void AnimTask_ShockWaveProgressingBolt(u8 taskId) { struct Task *task = &gTasks[taskId]; @@ -1214,7 +1224,7 @@ void sub_810B29C(u8 taskId) static bool8 sub_810B430(struct Task *task, u8 taskId) { - u8 spriteId = CreateSprite(&gUnknown_08595A30, task->data[6], task->data[7], 35); + u8 spriteId = CreateSprite(&gShockWaveProgressingBoltSpriteTemplate, task->data[6], task->data[7], 35); if (spriteId != MAX_SPRITES) { gSprites[spriteId].oam.tileNum += task->data[4]; @@ -1249,7 +1259,8 @@ static bool8 sub_810B430(struct Task *task, u8 taskId) } } -static void sub_810B51C(struct Sprite *sprite) +// Just runs timer for sprite. See AnimTask_ShockWaveProgressingBolt +static void AnimShockWaveProgressingBolt(struct Sprite *sprite) { if (++sprite->data[0] > 12) { @@ -1258,7 +1269,7 @@ static void sub_810B51C(struct Sprite *sprite) } } -void sub_810B55C(u8 taskId) +void AnimTask_ShockWaveLightning(u8 taskId) { struct Task *task = &gTasks[taskId]; @@ -1293,7 +1304,7 @@ void sub_810B55C(u8 taskId) bool8 sub_810B614(struct Task *task, u8 taskId) { - u8 spriteId = CreateSprite(&gUnknown_085956C0, task->data[13], task->data[14], task->data[12]); + u8 spriteId = CreateSprite(&gLightningSpriteTemplate, task->data[13], task->data[14], task->data[12]); if (spriteId != MAX_SPRITES) { diff --git a/src/fight.c b/src/battle_anim_fight.c similarity index 71% rename from src/fight.c rename to src/battle_anim_fight.c index 0c4b5a3fa..5211860e0 100644 --- a/src/fight.c +++ b/src/battle_anim_fight.c @@ -6,38 +6,40 @@ #include "trig.h" #include "constants/rgb.h" -void unc_080B08A0(struct Sprite *); -void sub_810CE68(struct Sprite *); -void sub_810CEB4(struct Sprite *); -void AnimBasicFistOrFoot(struct Sprite *); -void sub_810CF30(struct Sprite *); -void sub_810D10C(struct Sprite *); -void sub_810D1B4(struct Sprite *); -void AnimSpinningKickOrPunch(struct Sprite *); -void AnimStompFoot(struct Sprite *); -void sub_810D37C(struct Sprite *); -void sub_810D40C(struct Sprite *); -void sub_810D4F4(struct Sprite *); -void sub_810D608(struct Sprite *); -void sub_810D714(struct Sprite *); -void sub_810D874(struct Sprite *); -void sub_810D984(struct Sprite *); -void sub_810DA10(struct Sprite *); -void sub_810DA7C(struct Sprite *); -static void sub_810D0B8(struct Sprite *); -static void sub_810D164(struct Sprite *); -static void sub_810D240(struct Sprite *); +static void unc_080B08A0(struct Sprite *); +static void AnimSlideHandOrFootToTarget(struct Sprite *); +static void AnimJumpKick(struct Sprite *); +static void AnimBasicFistOrFoot(struct Sprite *); +static void AnimFistOrFootRandomPos(struct Sprite *); +static void AnimFistOrFootRandomPos_Step(struct Sprite *); +static void AnimCrossChopHand(struct Sprite *); +static void AnimCrossChopHand_Step(struct Sprite *); +static void AnimSlidingKick(struct Sprite *); +static void AnimSlidingKick_Step(struct Sprite *); +static void AnimSpinningKickOrPunch(struct Sprite *); +static void AnimStompFoot(struct Sprite *); +static void AnimStompFoot_Step(struct Sprite *); +static void AnimStompFoot_End(struct Sprite *); +static void AnimDizzyPunchDuck(struct Sprite *); +static void AnimBrickBreakWall(struct Sprite *); +static void AnimBrickBreakWall_Step(struct Sprite *); +static void AnimBrickBreakWallShard(struct Sprite *); +static void AnimBrickBreakWallShard_Step(struct Sprite *); +static void AnimSuperpowerOrb(struct Sprite *); +static void AnimSuperpowerOrb_Step(struct Sprite *); +static void AnimSuperpowerRock(struct Sprite *); +static void AnimSuperpowerRock_Step1(struct Sprite *); +static void AnimSuperpowerRock_Step2(struct Sprite *); +static void AnimSuperpowerFireball(struct Sprite *); +static void AnimArmThrustHit(struct Sprite *); +static void AnimArmThrustHit_Step(struct Sprite *sprite); +static void AnimRevengeScratch(struct Sprite *); +static void AnimFocusPunchFist(struct Sprite *); static void AnimSpinningKickOrPunchFinish(struct Sprite *); -static void AnimStompFootStep(struct Sprite *); -static void AnimStompFootEnd(struct Sprite *); -static void sub_810D47C(struct Sprite *); -static void sub_810D5DC(struct Sprite *); -static void sub_810D6A8(struct Sprite *); -static void sub_810D770(struct Sprite *); -static void sub_810D830(struct Sprite *); extern struct SpriteTemplate gBasicHitSplatSpriteTemplate; +// Unused const struct SpriteTemplate gUnknown_08595E14 = { .tileTag = ANIM_TAG_HUMANOID_FOOT, @@ -49,73 +51,73 @@ const struct SpriteTemplate gUnknown_08595E14 = .callback = unc_080B08A0, }; -const union AnimCmd gUnknown_08595E2C[] = +static const union AnimCmd sAnim_HandOrFoot[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -const union AnimCmd gUnknown_08595E34[] = +static const union AnimCmd sAnim_SlidingKick_0[] = { ANIMCMD_FRAME(16, 1), ANIMCMD_END, }; -const union AnimCmd gUnknown_08595E3C[] = +static const union AnimCmd sAnim_SlidingKick_1[] = { ANIMCMD_FRAME(32, 1), ANIMCMD_END, }; -const union AnimCmd gUnknown_08595E44[] = +static const union AnimCmd sAnim_CrossChopHand_0[] = { ANIMCMD_FRAME(48, 1), ANIMCMD_END, }; -const union AnimCmd gUnknown_08595E4C[] = +static const union AnimCmd sAnim_CrossChopHand_1[] = { ANIMCMD_FRAME(48, 1, .hFlip = TRUE), ANIMCMD_END, }; -const union AnimCmd *const gUnknown_08595E54[] = +static const union AnimCmd *const sAnims_HandOrFoot[] = { - gUnknown_08595E2C, + sAnim_HandOrFoot, }; -const union AnimCmd *const gUnknown_08595E58[] = +static const union AnimCmd *const sAnims_SlidingKick[] = { - gUnknown_08595E34, - gUnknown_08595E3C, + sAnim_SlidingKick_0, + sAnim_SlidingKick_1, }; -const union AnimCmd *const gUnknown_08595E60[] = +static const union AnimCmd *const sAnims_CrossChopHand[] = { - gUnknown_08595E44, - gUnknown_08595E4C, + sAnim_CrossChopHand_0, + sAnim_CrossChopHand_1, }; -const struct SpriteTemplate gUnknown_08595E68 = +const struct SpriteTemplate gKarateChopSpriteTemplate = { .tileTag = ANIM_TAG_HANDS_AND_FEET, .paletteTag = ANIM_TAG_HANDS_AND_FEET, .oam = &gOamData_AffineOff_ObjNormal_32x32, - .anims = gUnknown_08595E54, + .anims = sAnims_HandOrFoot, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_810CE68, + .callback = AnimSlideHandOrFootToTarget, }; -const struct SpriteTemplate gUnknown_08595E80 = +const struct SpriteTemplate gJumpKickSpriteTemplate = { .tileTag = ANIM_TAG_HANDS_AND_FEET, .paletteTag = ANIM_TAG_HANDS_AND_FEET, .oam = &gOamData_AffineOff_ObjNormal_32x32, - .anims = gUnknown_08595E54, + .anims = sAnims_HandOrFoot, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_810CEB4, + .callback = AnimJumpKick, }; const struct SpriteTemplate gFistFootSpriteTemplate = @@ -123,78 +125,79 @@ const struct SpriteTemplate gFistFootSpriteTemplate = .tileTag = ANIM_TAG_HANDS_AND_FEET, .paletteTag = ANIM_TAG_HANDS_AND_FEET, .oam = &gOamData_AffineOff_ObjNormal_32x32, - .anims = gUnknown_08595E54, + .anims = sAnims_HandOrFoot, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, .callback = AnimBasicFistOrFoot, }; -const struct SpriteTemplate gUnknown_08595EB0 = +const struct SpriteTemplate gFistFootRandomPosSpriteTemplate = { .tileTag = ANIM_TAG_HANDS_AND_FEET, .paletteTag = ANIM_TAG_HANDS_AND_FEET, .oam = &gOamData_AffineOff_ObjNormal_32x32, - .anims = gUnknown_08595E54, + .anims = sAnims_HandOrFoot, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_810CF30, + .callback = AnimFistOrFootRandomPos, }; -const struct SpriteTemplate gUnknown_08595EC8 = +const struct SpriteTemplate gCrossChopHandSpriteTemplate = { .tileTag = ANIM_TAG_HANDS_AND_FEET, .paletteTag = ANIM_TAG_HANDS_AND_FEET, .oam = &gOamData_AffineOff_ObjNormal_32x32, - .anims = gUnknown_08595E60, + .anims = sAnims_CrossChopHand, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_810D10C, + .callback = AnimCrossChopHand, }; -const struct SpriteTemplate gUnknown_08595EE0 = +const struct SpriteTemplate gSlidingKickSpriteTemplate = { .tileTag = ANIM_TAG_HANDS_AND_FEET, .paletteTag = ANIM_TAG_HANDS_AND_FEET, .oam = &gOamData_AffineOff_ObjNormal_32x32, - .anims = gUnknown_08595E58, + .anims = sAnims_SlidingKick, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_810D1B4, + .callback = AnimSlidingKick, }; -const union AffineAnimCmd gUnknown_08595EF8[] = +static const union AffineAnimCmd sAffineAnim_SpinningHandOrFoot[] = { AFFINEANIMCMD_FRAME(0x100, 0x100, 0, 0), AFFINEANIMCMD_FRAME(0xFFF8, 0xFFF8, 20, 1), AFFINEANIMCMD_JUMP(1), }; -const union AffineAnimCmd *const gUnknown_08595F10[] = +static const union AffineAnimCmd *const sAffineAnims_SpinningHandOrFoot[] = { - gUnknown_08595EF8, + sAffineAnim_SpinningHandOrFoot, }; -const struct SpriteTemplate gUnknown_08595F14 = +// Blaze Kick / Meteor Mash +const struct SpriteTemplate gSpinningHandOrFootSpriteTemplate = { .tileTag = ANIM_TAG_HANDS_AND_FEET, .paletteTag = ANIM_TAG_HANDS_AND_FEET, .oam = &gOamData_AffineDouble_ObjNormal_32x32, - .anims = gUnknown_08595E54, + .anims = sAnims_HandOrFoot, .images = NULL, - .affineAnims = gUnknown_08595F10, + .affineAnims = sAffineAnims_SpinningHandOrFoot, .callback = AnimSpinningKickOrPunch, }; -const union AffineAnimCmd gUnknown_08595F2C[] = +static const union AffineAnimCmd sAffineAnim_MegaPunchKick[] = { AFFINEANIMCMD_FRAME(0x100, 0x100, 0, 0), AFFINEANIMCMD_FRAME(0xFFFC, 0xFFFC, 20, 1), AFFINEANIMCMD_JUMP(1), }; -const union AffineAnimCmd *const gUnknown_08595F44[] = +static const union AffineAnimCmd *const sAffineAnims_MegaPunchKick[] = { - gUnknown_08595F2C, + sAffineAnim_MegaPunchKick, }; const struct SpriteTemplate gMegaPunchKickSpriteTemplate = @@ -202,24 +205,24 @@ const struct SpriteTemplate gMegaPunchKickSpriteTemplate = .tileTag = ANIM_TAG_HANDS_AND_FEET, .paletteTag = ANIM_TAG_HANDS_AND_FEET, .oam = &gOamData_AffineDouble_ObjNormal_32x32, - .anims = gUnknown_08595E54, + .anims = sAnims_HandOrFoot, .images = NULL, - .affineAnims = gUnknown_08595F44, + .affineAnims = sAffineAnims_MegaPunchKick, .callback = AnimSpinningKickOrPunch, }; -const struct SpriteTemplate gUnknown_08595F60 = +const struct SpriteTemplate gStompFootSpriteTemplate = { .tileTag = ANIM_TAG_HANDS_AND_FEET, .paletteTag = ANIM_TAG_HANDS_AND_FEET, .oam = &gOamData_AffineOff_ObjNormal_32x32, - .anims = gUnknown_08595E58, + .anims = sAnims_SlidingKick, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, .callback = AnimStompFoot, }; -const struct SpriteTemplate gUnknown_08595F78 = +const struct SpriteTemplate gDizzyPunchDuckSpriteTemplate = { .tileTag = ANIM_TAG_DUCK, .paletteTag = ANIM_TAG_DUCK, @@ -227,10 +230,10 @@ const struct SpriteTemplate gUnknown_08595F78 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_810D37C, + .callback = AnimDizzyPunchDuck, }; -const struct SpriteTemplate gUnknown_08595F90 = +const struct SpriteTemplate gBrickBreakWallSpriteTemplate = { .tileTag = ANIM_TAG_BLUE_LIGHT_WALL, .paletteTag = ANIM_TAG_BLUE_LIGHT_WALL, @@ -238,10 +241,10 @@ const struct SpriteTemplate gUnknown_08595F90 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_810D40C, + .callback = AnimBrickBreakWall, }; -const struct SpriteTemplate gUnknown_08595FA8 = +const struct SpriteTemplate gBrickBreakWallShardSpriteTemplate = { .tileTag = ANIM_TAG_TORN_METAL, .paletteTag = ANIM_TAG_TORN_METAL, @@ -249,10 +252,10 @@ const struct SpriteTemplate gUnknown_08595FA8 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_810D4F4, + .callback = AnimBrickBreakWallShard, }; -const union AffineAnimCmd gUnknown_08595FC0[] = +static const union AffineAnimCmd sAffineAnim_SuperpowerOrb[] = { AFFINEANIMCMD_FRAME(0x20, 0x20, 0, 0), AFFINEANIMCMD_FRAME(0x4, 0x4, 0, 64), @@ -261,23 +264,23 @@ const union AffineAnimCmd gUnknown_08595FC0[] = AFFINEANIMCMD_JUMP(2), }; -const union AffineAnimCmd *const gUnknown_08595FE8[] = +static const union AffineAnimCmd *const sAffineAnims_SuperpowerOrb[] = { - gUnknown_08595FC0, + sAffineAnim_SuperpowerOrb, }; -const struct SpriteTemplate gUnknown_08595FEC = +const struct SpriteTemplate gSuperpowerOrbSpriteTemplate = { .tileTag = ANIM_TAG_CIRCLE_OF_LIGHT, .paletteTag = ANIM_TAG_CIRCLE_OF_LIGHT, .oam = &gOamData_AffineDouble_ObjBlend_64x64, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_08595FE8, - .callback = sub_810D608, + .affineAnims = sAffineAnims_SuperpowerOrb, + .callback = AnimSuperpowerOrb, }; -const struct SpriteTemplate gUnknown_08596004 = +const struct SpriteTemplate gSuperpowerRockSpriteTemplate = { .tileTag = ANIM_TAG_FLAT_ROCK, .paletteTag = ANIM_TAG_FLAT_ROCK, @@ -285,10 +288,10 @@ const struct SpriteTemplate gUnknown_08596004 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_810D714, + .callback = AnimSuperpowerRock, }; -const struct SpriteTemplate gUnknown_0859601C = +const struct SpriteTemplate gSuperpowerFireballSpriteTemplate = { .tileTag = ANIM_TAG_METEOR, .paletteTag = ANIM_TAG_METEOR, @@ -296,21 +299,21 @@ const struct SpriteTemplate gUnknown_0859601C = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_810D874, + .callback = AnimSuperpowerFireball, }; -const struct SpriteTemplate gUnknown_08596034 = +const struct SpriteTemplate gArmThrustHandSpriteTemplate = { .tileTag = ANIM_TAG_HANDS_AND_FEET, .paletteTag = ANIM_TAG_HANDS_AND_FEET, .oam = &gOamData_AffineOff_ObjNormal_32x32, - .anims = gUnknown_08595E54, + .anims = sAnims_HandOrFoot, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_810D984, + .callback = AnimArmThrustHit, }; -const union AnimCmd gUnknown_0859604C[] = +static const union AnimCmd sAnim_RevengeSmallScratch_0[] = { ANIMCMD_FRAME(0, 4), ANIMCMD_FRAME(16, 4), @@ -318,7 +321,7 @@ const union AnimCmd gUnknown_0859604C[] = ANIMCMD_END, }; -const union AnimCmd gUnknown_0859605C[] = +static const union AnimCmd sAnim_RevengeSmallScratch_1[] = { ANIMCMD_FRAME(0, 4, .vFlip = TRUE), ANIMCMD_FRAME(16, 4, .vFlip = TRUE), @@ -326,7 +329,7 @@ const union AnimCmd gUnknown_0859605C[] = ANIMCMD_END, }; -const union AnimCmd gUnknown_0859606C[] = +static const union AnimCmd sAnim_RevengeSmallScratch_2[] = { ANIMCMD_FRAME(0, 4, .hFlip = TRUE), ANIMCMD_FRAME(16, 4, .hFlip = TRUE), @@ -334,87 +337,87 @@ const union AnimCmd gUnknown_0859606C[] = ANIMCMD_END, }; -const union AnimCmd *const gUnknown_0859607C[] = +static const union AnimCmd *const sAnims_RevengeSmallScratch[] = { - gUnknown_0859604C, - gUnknown_0859605C, - gUnknown_0859606C, + sAnim_RevengeSmallScratch_0, + sAnim_RevengeSmallScratch_1, + sAnim_RevengeSmallScratch_2, }; -const struct SpriteTemplate gUnknown_08596088 = +const struct SpriteTemplate gRevengeSmallScratchSpriteTemplate = { .tileTag = ANIM_TAG_PURPLE_SCRATCH, .paletteTag = ANIM_TAG_PURPLE_SCRATCH, .oam = &gOamData_AffineOff_ObjNormal_32x32, - .anims = gUnknown_0859607C, + .anims = sAnims_RevengeSmallScratch, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_810DA10, + .callback = AnimRevengeScratch, }; -const union AnimCmd gUnknown_085960A0[] = +static const union AnimCmd sAnim_RevengeBigScratch_0[] = { ANIMCMD_FRAME(0, 6), ANIMCMD_FRAME(64, 6), ANIMCMD_END, }; -const union AnimCmd gUnknown_085960AC[] = +static const union AnimCmd sAnim_RevengeBigScratch_1[] = { ANIMCMD_FRAME(0, 6, .vFlip = TRUE, .hFlip = TRUE), ANIMCMD_FRAME(64, 6, .vFlip = TRUE, .hFlip = TRUE), ANIMCMD_END, }; -const union AnimCmd gUnknown_085960B8[] = +static const union AnimCmd sAnim_RevengeBigScratch_2[] = { ANIMCMD_FRAME(0, 6, .hFlip = TRUE), ANIMCMD_FRAME(64, 6, .hFlip = TRUE), ANIMCMD_END, }; -const union AnimCmd *const gUnknown_085960C4[] = +static const union AnimCmd *const sAnims_RevengeBigScratch[] = { - gUnknown_085960A0, - gUnknown_085960AC, - gUnknown_085960B8, + sAnim_RevengeBigScratch_0, + sAnim_RevengeBigScratch_1, + sAnim_RevengeBigScratch_2, }; -const struct SpriteTemplate gUnknown_085960D0 = +const struct SpriteTemplate gRevengeBigScratchSpriteTemplate = { .tileTag = ANIM_TAG_PURPLE_SWIPE, .paletteTag = ANIM_TAG_PURPLE_SWIPE, .oam = &gOamData_AffineOff_ObjNormal_64x64, - .anims = gUnknown_085960C4, + .anims = sAnims_RevengeBigScratch, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_810DA10, + .callback = AnimRevengeScratch, }; -const union AffineAnimCmd gUnknown_085960E8[] = +static const union AffineAnimCmd sAffineAnim_FocusPunchFist[] = { AFFINEANIMCMD_FRAME(0x200, 0x200, 0, 0), AFFINEANIMCMD_FRAME(0xFFE0, 0xFFE0, 0, 8), AFFINEANIMCMD_END, }; -const union AffineAnimCmd *const gUnknown_08596100[] = +static const union AffineAnimCmd *const sAffineAnims_FocusPunchFist[] = { - gUnknown_085960E8, + sAffineAnim_FocusPunchFist, }; -const struct SpriteTemplate gUnknown_08596104 = +const struct SpriteTemplate gFocusPunchFistSpriteTemplate = { .tileTag = ANIM_TAG_HANDS_AND_FEET, .paletteTag = ANIM_TAG_HANDS_AND_FEET, .oam = &gOamData_AffineDouble_ObjNormal_32x32, - .anims = gUnknown_08595E54, + .anims = sAnims_HandOrFoot, .images = NULL, - .affineAnims = gUnknown_08596100, - .callback = sub_810DA7C, + .affineAnims = sAffineAnims_FocusPunchFist, + .callback = AnimFocusPunchFist, }; -void unc_080B08A0(struct Sprite *sprite) +static void unc_080B08A0(struct Sprite *sprite) { SetAnimSpriteInitialXOffset(sprite, gBattleAnimArgs[0]); sprite->pos1.y += gBattleAnimArgs[1]; @@ -423,7 +426,7 @@ void unc_080B08A0(struct Sprite *sprite) StoreSpriteCallbackInData6(sprite, DestroyAnimSprite); } -void sub_810CE68(struct Sprite *sprite) +static void AnimSlideHandOrFootToTarget(struct Sprite *sprite) { if (gBattleAnimArgs[7] == 1 && GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER) { @@ -433,10 +436,10 @@ void sub_810CE68(struct Sprite *sprite) StartSpriteAnim(sprite, gBattleAnimArgs[6]); gBattleAnimArgs[6] = 0; - AnimSnoreZ(sprite); + AnimTravelDiagonally(sprite); } -void sub_810CEB4(struct Sprite *sprite) +static void AnimJumpKick(struct Sprite *sprite) { if (IsContest()) { @@ -444,7 +447,7 @@ void sub_810CEB4(struct Sprite *sprite) gBattleAnimArgs[3] = -gBattleAnimArgs[3]; } - sub_810CE68(sprite); + AnimSlideHandOrFootToTarget(sprite); } // Displays a basic fist or foot sprite for a given duration. @@ -454,7 +457,7 @@ void sub_810CEB4(struct Sprite *sprite) // arg 2: duration // arg 3: ? (todo: related to initial pixel offsets) // arg 4: anim num -void AnimBasicFistOrFoot(struct Sprite *sprite) +static void AnimBasicFistOrFoot(struct Sprite *sprite) { StartSpriteAnim(sprite, gBattleAnimArgs[4]); @@ -468,7 +471,7 @@ void AnimBasicFistOrFoot(struct Sprite *sprite) StoreSpriteCallbackInData6(sprite, DestroyAnimSprite); } -void sub_810CF30(struct Sprite *sprite) +static void AnimFistOrFootRandomPos(struct Sprite *sprite) { u8 battler; s16 xMod, yMod; @@ -511,10 +514,10 @@ void sub_810CF30(struct Sprite *sprite) gSprites[sprite->data[7]].callback = SpriteCallbackDummy; } - sprite->callback = sub_810D0B8; + sprite->callback = AnimFistOrFootRandomPos_Step; } -static void sub_810D0B8(struct Sprite *sprite) +static void AnimFistOrFootRandomPos_Step(struct Sprite *sprite) { if (sprite->data[0] == 0) { @@ -532,7 +535,7 @@ static void sub_810D0B8(struct Sprite *sprite) } } -void sub_810D10C(struct Sprite *sprite) +static void AnimCrossChopHand(struct Sprite *sprite) { InitSpritePosToAnimTarget(sprite, TRUE); sprite->data[0] = 30; @@ -549,10 +552,10 @@ void sub_810D10C(struct Sprite *sprite) sprite->data[4] = sprite->pos1.y - 20; sprite->callback = StartAnimLinearTranslation; - StoreSpriteCallbackInData6(sprite, sub_810D164); + StoreSpriteCallbackInData6(sprite, AnimCrossChopHand_Step); } -static void sub_810D164(struct Sprite *sprite) +static void AnimCrossChopHand_Step(struct Sprite *sprite) { if (++sprite->data[5] == 11) { @@ -569,7 +572,8 @@ static void sub_810D164(struct Sprite *sprite) } } -void sub_810D1B4(struct Sprite *sprite) +// Rolling Kick / Low Kick +static void AnimSlidingKick(struct Sprite *sprite) { if (BATTLE_PARTNER(gBattleAnimAttacker) == gBattleAnimTarget && GetBattlerPosition(gBattleAnimTarget) < B_POSITION_PLAYER_RIGHT) gBattleAnimArgs[0] *= -1; @@ -591,10 +595,10 @@ void sub_810D1B4(struct Sprite *sprite) sprite->data[6] = gBattleAnimArgs[4]; sprite->data[7] = 0; - sprite->callback = sub_810D240; + sprite->callback = AnimSlidingKick_Step; } -static void sub_810D240(struct Sprite *sprite) +static void AnimSlidingKick_Step(struct Sprite *sprite) { if (!AnimTranslateLinear(sprite)) { @@ -613,7 +617,7 @@ static void sub_810D240(struct Sprite *sprite) // arg 1: initial y pixel offset // arg 2: anim num // arg 3: spin duration -void AnimSpinningKickOrPunch(struct Sprite *sprite) +static void AnimSpinningKickOrPunch(struct Sprite *sprite) { InitSpritePosToAnimTarget(sprite, TRUE); StartSpriteAnim(sprite, gBattleAnimArgs[2]); @@ -637,15 +641,15 @@ static void AnimSpinningKickOrPunchFinish(struct Sprite *sprite) // arg 0: initial x pixel offset // arg 1: initial y pixel offset // arg 2: initial wait duration -void AnimStompFoot(struct Sprite *sprite) +static void AnimStompFoot(struct Sprite *sprite) { InitSpritePosToAnimTarget(sprite, TRUE); sprite->data[0] = gBattleAnimArgs[2]; - sprite->callback = AnimStompFootStep; + sprite->callback = AnimStompFoot_Step; } -static void AnimStompFootStep(struct Sprite *sprite) +static void AnimStompFoot_Step(struct Sprite *sprite) { if (--sprite->data[0] == -1) { @@ -654,11 +658,11 @@ static void AnimStompFootStep(struct Sprite *sprite) sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3); sprite->callback = StartAnimLinearTranslation; - StoreSpriteCallbackInData6(sprite, AnimStompFootEnd); + StoreSpriteCallbackInData6(sprite, AnimStompFoot_End); } } -static void AnimStompFootEnd(struct Sprite *sprite) +static void AnimStompFoot_End(struct Sprite *sprite) { sprite->data[0] = 15; @@ -666,7 +670,7 @@ static void AnimStompFootEnd(struct Sprite *sprite) StoreSpriteCallbackInData6(sprite, DestroyAnimSprite); } -void sub_810D37C(struct Sprite *sprite) +static void AnimDizzyPunchDuck(struct Sprite *sprite) { if (sprite->data[0] == 0) { @@ -690,9 +694,10 @@ void sub_810D37C(struct Sprite *sprite) } } -void sub_810D40C(struct Sprite *sprite) +// The wall that appears when Brick Break is going to shatter the target's defensive wall +static void AnimBrickBreakWall(struct Sprite *sprite) { - if (gBattleAnimArgs[0] == 0) + if (gBattleAnimArgs[0] == ANIM_ATTACKER) { sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 0); sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 1); @@ -710,10 +715,10 @@ void sub_810D40C(struct Sprite *sprite) sprite->data[1] = gBattleAnimArgs[3]; sprite->data[2] = gBattleAnimArgs[4]; sprite->data[3] = 0; - sprite->callback = sub_810D47C; + sprite->callback = AnimBrickBreakWall_Step; } -static void sub_810D47C(struct Sprite *sprite) +static void AnimBrickBreakWall_Step(struct Sprite *sprite) { switch (sprite->data[0]) { @@ -743,9 +748,10 @@ static void sub_810D47C(struct Sprite *sprite) } } -void sub_810D4F4(struct Sprite *sprite) +// Piece of shattered defensive wall flies off. Used by Brick Break when the target has a defensive wall +static void AnimBrickBreakWallShard(struct Sprite *sprite) { - if (gBattleAnimArgs[0] == 0) + if (gBattleAnimArgs[0] == ANIM_ATTACKER) { sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 0) + gBattleAnimArgs[2]; sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 1) + gBattleAnimArgs[3]; @@ -782,10 +788,10 @@ void sub_810D4F4(struct Sprite *sprite) return; } - sprite->callback = sub_810D5DC; + sprite->callback = AnimBrickBreakWallShard_Step; } -static void sub_810D5DC(struct Sprite *sprite) +static void AnimBrickBreakWallShard_Step(struct Sprite *sprite) { sprite->pos1.x += sprite->data[6]; sprite->pos1.y += sprite->data[7]; @@ -794,9 +800,9 @@ static void sub_810D5DC(struct Sprite *sprite) DestroyAnimSprite(sprite); } -void sub_810D608(struct Sprite *sprite) +static void AnimSuperpowerOrb(struct Sprite *sprite) { - if (gBattleAnimArgs[0] == 0) + if (gBattleAnimArgs[0] == ANIM_ATTACKER) { sprite->pos1.x = GetBattlerSpriteCoord(gBattlerAttacker, 2); sprite->pos1.y = GetBattlerSpriteCoord(gBattlerAttacker, 3); @@ -812,10 +818,10 @@ void sub_810D608(struct Sprite *sprite) sprite->data[0] = 0; sprite->data[1] = 12; sprite->data[2] = 8; - sprite->callback = sub_810D6A8; + sprite->callback = AnimSuperpowerOrb_Step; } -static void sub_810D6A8(struct Sprite *sprite) +static void AnimSuperpowerOrb_Step(struct Sprite *sprite) { if (++sprite->data[0] == 180) { @@ -833,7 +839,8 @@ static void sub_810D6A8(struct Sprite *sprite) } } -void sub_810D714(struct Sprite *sprite) +// Floating rock that flies off to hit the target. Used by Superpower +static void AnimSuperpowerRock(struct Sprite *sprite) { sprite->pos1.x = gBattleAnimArgs[0]; sprite->pos1.y = 120; @@ -844,10 +851,10 @@ void sub_810D714(struct Sprite *sprite) sprite->data[6] = gBattleAnimArgs[1]; sprite->oam.tileNum += gBattleAnimArgs[2] * 4; - sprite->callback = sub_810D770; + sprite->callback = AnimSuperpowerRock_Step1; } -static void sub_810D770(struct Sprite *sprite) +static void AnimSuperpowerRock_Step1(struct Sprite *sprite) { void *var0; @@ -876,11 +883,11 @@ static void sub_810D770(struct Sprite *sprite) sprite->data[2] = sprite->pos1.x << 4; sprite->data[3] = sprite->pos1.y << 4; - sprite->callback = sub_810D830; + sprite->callback = AnimSuperpowerRock_Step2; } } -static void sub_810D830(struct Sprite *sprite) +static void AnimSuperpowerRock_Step2(struct Sprite *sprite) { u16 edgeX; @@ -894,11 +901,11 @@ static void sub_810D830(struct Sprite *sprite) DestroyAnimSprite(sprite); } -void sub_810D874(struct Sprite *sprite) +static void AnimSuperpowerFireball(struct Sprite *sprite) { u8 battler; - if (gBattleAnimArgs[0] == 0) + if (gBattleAnimArgs[0] == ANIM_ATTACKER) { sprite->pos1.x = GetBattlerSpriteCoord(gBattlerAttacker, 2); sprite->pos1.y = GetBattlerSpriteCoord(gBattlerAttacker, 3); @@ -927,7 +934,7 @@ void sub_810D874(struct Sprite *sprite) sprite->callback = sub_80A6F98; } -static void sub_810D960(struct Sprite *sprite) +static void AnimArmThrustHit_Step(struct Sprite *sprite) { if (sprite->data[0] == sprite->data[4]) DestroyAnimSprite(sprite); @@ -935,7 +942,7 @@ static void sub_810D960(struct Sprite *sprite) sprite->data[0]++; } -void sub_810D984(struct Sprite *sprite) +static void AnimArmThrustHit(struct Sprite *sprite) { u8 turn; @@ -959,12 +966,12 @@ void sub_810D984(struct Sprite *sprite) StartSpriteAnim(sprite, sprite->data[1]); sprite->pos2.x = sprite->data[2]; sprite->pos2.y = sprite->data[3]; - sprite->callback = sub_810D960; + sprite->callback = AnimArmThrustHit_Step; } -void sub_810DA10(struct Sprite *sprite) +static void AnimRevengeScratch(struct Sprite *sprite) { - if (gBattleAnimArgs[2] == 0) + if (gBattleAnimArgs[2] == ANIM_ATTACKER) InitSpritePosToAnimAttacker(sprite, 0); else InitSpritePosToAnimTarget(sprite, FALSE); @@ -982,7 +989,8 @@ void sub_810DA10(struct Sprite *sprite) StoreSpriteCallbackInData6(sprite, DestroyAnimSprite); } -void sub_810DA7C(struct Sprite *sprite) +// Fist shrinks toward target and shakes +static void AnimFocusPunchFist(struct Sprite *sprite) { if (sprite->affineAnimEnded) { @@ -993,7 +1001,7 @@ void sub_810DA7C(struct Sprite *sprite) } } -void sub_810DABC(u8 taskId) +void AnimTask_MoveSkyUppercutBg(u8 taskId) { struct Task *task = &gTasks[taskId]; diff --git a/src/fire.c b/src/battle_anim_fire.c similarity index 73% rename from src/fire.c rename to src/battle_anim_fire.c index 2a12c26cc..f02ecae19 100644 --- a/src/fire.c +++ b/src/battle_anim_fire.c @@ -7,39 +7,39 @@ #include "task.h" #include "trig.h" -static void sub_8108EC8(struct Sprite *); -static void sub_8108F08(struct Sprite *); -static void sub_8108F4C(struct Sprite *); -static void sub_8108FBC(struct Sprite *); +static void AnimFireSpiralInward(struct Sprite *); +static void AnimFireSpread(struct Sprite *); +static void AnimFirePlume(struct Sprite *); +static void AnimLargeFlame(struct Sprite *); static void sub_8109028(struct Sprite *); static void sub_8109064(struct Sprite *); static void sub_81090D8(struct Sprite *); -static void sub_810916C(struct Sprite *); +static void AnimSunlight(struct Sprite *); static void AnimEmberFlare(struct Sprite *); -static void sub_8109200(struct Sprite *); +static void AnimBurnFlame(struct Sprite *); static void AnimFireRing(struct Sprite *); -static void AnimFireRingStep1(struct Sprite *); -static void AnimFireRingStep2(struct Sprite *); -static void AnimFireRingStep3(struct Sprite *); +static void AnimFireRing_Step1(struct Sprite *); +static void AnimFireRing_Step2(struct Sprite *); +static void AnimFireRing_Step3(struct Sprite *); static void UpdateFireRingCircleOffset(struct Sprite *); static void AnimFireCross(struct Sprite *); -static void sub_81093A4(struct Sprite *); -static void sub_81093E4(struct Sprite *); -static void sub_810940C(struct Sprite *); -static void sub_81094D0(u8 taskId); -static void sub_81097B4(u8 spriteId, u8 taskId, u8 a3); -static void sub_81098EC(struct Sprite *); -static u16 sub_8109930(u8 spriteId); -static void sub_8109984(struct Sprite *sprite, s16 x, s16 y); -static void sub_81099A0(struct Sprite *); -static void sub_8109A10(struct Sprite *); -static void sub_8109A64(struct Sprite *); -static void sub_8109AFC(struct Sprite *); -static void sub_8109C4C(struct Sprite *); -static void sub_8109CB0(struct Sprite *); -static void sub_8109E2C(u8 taskId); +static void AnimFireSpiralOutward(struct Sprite *); +static void AnimFireSpiralOutward_Step1(struct Sprite *); +static void AnimFireSpiralOutward_Step2(struct Sprite *); +static void AnimTask_EruptionLaunchRocks_Step(u8 taskId); +static void CreateEruptionLaunchRocks(u8 spriteId, u8 taskId, u8 a3); +static void AnimEruptionLaunchRock(struct Sprite *); +static u16 GetEruptionLaunchRockInitialYPos(u8 spriteId); +static void InitEruptionLaunchRockCoordData(struct Sprite *sprite, s16 x, s16 y); +static void UpdateEruptionLaunchRockPos(struct Sprite *); +static void AnimEruptionFallingRock(struct Sprite *); +static void AnimEruptionFallingRock_Step(struct Sprite *); +static void AnimWillOWispOrb(struct Sprite *); +static void AnimWillOWispOrb_Step(struct Sprite *); +static void AnimWillOWispFire(struct Sprite *); +static void AnimTask_MoveHeatWaveTargets_Step(u8 taskId); -const union AnimCmd gUnknown_08595340[] = +static const union AnimCmd sAnim_FireSpiralSpread_0[] = { ANIMCMD_FRAME(16, 4), ANIMCMD_FRAME(32, 4), @@ -47,7 +47,7 @@ const union AnimCmd gUnknown_08595340[] = ANIMCMD_JUMP(0), }; -const union AnimCmd gUnknown_08595350[] = +static const union AnimCmd sAnim_FireSpiralSpread_1[] = { ANIMCMD_FRAME(16, 4, .vFlip = TRUE, .hFlip = TRUE), ANIMCMD_FRAME(32, 4, .vFlip = TRUE, .hFlip = TRUE), @@ -55,35 +55,35 @@ const union AnimCmd gUnknown_08595350[] = ANIMCMD_JUMP(0), }; -const union AnimCmd *const gUnknown_08595360[] = +static const union AnimCmd *const sAnims_FireSpiralSpread[] = { - gUnknown_08595340, - gUnknown_08595350, + sAnim_FireSpiralSpread_0, + sAnim_FireSpiralSpread_1, }; -const struct SpriteTemplate gUnknown_08595368 = +const struct SpriteTemplate gFireSpiralInwardSpriteTemplate = { .tileTag = ANIM_TAG_SMALL_EMBER, .paletteTag = ANIM_TAG_SMALL_EMBER, .oam = &gOamData_AffineOff_ObjNormal_32x32, - .anims = gUnknown_08595360, + .anims = sAnims_FireSpiralSpread, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_8108EC8, + .callback = AnimFireSpiralInward, }; -const struct SpriteTemplate gUnknown_08595380 = +const struct SpriteTemplate gFireSpreadSpriteTemplate = { .tileTag = ANIM_TAG_SMALL_EMBER, .paletteTag = ANIM_TAG_SMALL_EMBER, .oam = &gOamData_AffineOff_ObjNormal_32x32, - .anims = gUnknown_08595360, + .anims = sAnims_FireSpiralSpread, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_8108F08, + .callback = AnimFireSpread, }; -const union AnimCmd gUnknown_08595398[] = +static const union AnimCmd sAnim_LargeFlame[] = { ANIMCMD_FRAME(0, 3), ANIMCMD_FRAME(16, 3), @@ -96,12 +96,12 @@ const union AnimCmd gUnknown_08595398[] = ANIMCMD_JUMP(0), }; -const union AnimCmd *const gUnknown_085953BC[] = +static const union AnimCmd *const sAnims_LargeFlame[] = { - gUnknown_08595398, + sAnim_LargeFlame, }; -const union AnimCmd gUnknown_085953C0[] = +static const union AnimCmd sAnim_FirePlume[] = { ANIMCMD_FRAME(0, 5), ANIMCMD_FRAME(16, 5), @@ -111,68 +111,69 @@ const union AnimCmd gUnknown_085953C0[] = ANIMCMD_JUMP(0), }; -const union AnimCmd *const gUnknown_085953D8[] = +static const union AnimCmd *const sAnims_FirePlume[] = { - gUnknown_085953C0, + sAnim_FirePlume, }; -const union AffineAnimCmd gUnknown_085953DC[] = +static const union AffineAnimCmd sAffineAnim_LargeFlame[] = { AFFINEANIMCMD_FRAME(0x32, 0x100, 0, 0), AFFINEANIMCMD_FRAME(0x20, 0x0, 0, 7), AFFINEANIMCMD_END, }; -const union AffineAnimCmd *const gUnknown_085953F4[] = +static const union AffineAnimCmd *const sAffineAnims_LargeFlame[] = { - gUnknown_085953DC, + sAffineAnim_LargeFlame, }; -const struct SpriteTemplate gUnknown_085953F8 = +const struct SpriteTemplate gLargeFlameSpriteTemplate = { .tileTag = ANIM_TAG_FIRE, .paletteTag = ANIM_TAG_FIRE, .oam = &gOamData_AffineNormal_ObjNormal_32x32, - .anims = gUnknown_085953BC, + .anims = sAnims_LargeFlame, .images = NULL, - .affineAnims = gUnknown_085953F4, - .callback = sub_8108FBC, + .affineAnims = sAffineAnims_LargeFlame, + .callback = AnimLargeFlame, }; -const struct SpriteTemplate gUnknown_08595410 = +const struct SpriteTemplate gLargeFlameScatterSpriteTemplate = { .tileTag = ANIM_TAG_FIRE, .paletteTag = ANIM_TAG_FIRE, .oam = &gOamData_AffineOff_ObjNormal_32x32, - .anims = gUnknown_085953BC, + .anims = sAnims_LargeFlame, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_8108FBC, + .callback = AnimLargeFlame, }; -const struct SpriteTemplate gUnknown_08595428 = +const struct SpriteTemplate gFirePlumeSpriteTemplate = { .tileTag = ANIM_TAG_FIRE_PLUME, .paletteTag = ANIM_TAG_FIRE_PLUME, .oam = &gOamData_AffineOff_ObjNormal_32x32, - .anims = gUnknown_085953D8, + .anims = sAnims_FirePlume, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_8108F4C, + .callback = AnimFirePlume, }; +// Unused const struct SpriteTemplate gUnknown_08595440 = { .tileTag = ANIM_TAG_SMALL_EMBER, .paletteTag = ANIM_TAG_SMALL_EMBER, .oam = &gOamData_AffineOff_ObjNormal_32x32, - .anims = gUnknown_085953D8, + .anims = sAnims_FirePlume, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_8108F4C, + .callback = AnimFirePlume, }; -const union AnimCmd gUnknown_08595458[] = +static const union AnimCmd gUnknown_08595458[] = { ANIMCMD_FRAME(16, 6), ANIMCMD_FRAME(32, 6), @@ -180,11 +181,12 @@ const union AnimCmd gUnknown_08595458[] = ANIMCMD_JUMP(0), }; -const union AnimCmd *const gUnknown_08595468[] = +static const union AnimCmd *const gUnknown_08595468[] = { gUnknown_08595458, }; +// Unused const struct SpriteTemplate gUnknown_0859546C = { .tileTag = ANIM_TAG_SMALL_EMBER, @@ -196,30 +198,30 @@ const struct SpriteTemplate gUnknown_0859546C = .callback = sub_8109064, }; -const union AffineAnimCmd gUnknown_08595484[] = +static const union AffineAnimCmd sAffineAnim_SunlightRay[] = { AFFINEANIMCMD_FRAME(0x50, 0x50, 0, 0), AFFINEANIMCMD_FRAME(0x2, 0x2, 10, 1), AFFINEANIMCMD_JUMP(1), }; -const union AffineAnimCmd *const gUnknown_0859549C[] = +static const union AffineAnimCmd *const sAffineAnims_SunlightRay[] = { - gUnknown_08595484, + sAffineAnim_SunlightRay, }; -const struct SpriteTemplate gUnknown_085954A0 = +const struct SpriteTemplate gSunlightRaySpriteTemplate = { .tileTag = ANIM_TAG_SUNLIGHT, .paletteTag = ANIM_TAG_SUNLIGHT, .oam = &gOamData_AffineNormal_ObjBlend_32x32, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_0859549C, - .callback = sub_810916C, + .affineAnims = sAffineAnims_SunlightRay, + .callback = AnimSunlight, }; -const union AnimCmd gUnknown_085954B8[] = +static const union AnimCmd sAnim_BasicFire[] = { ANIMCMD_FRAME(0, 4), ANIMCMD_FRAME(16, 4), @@ -229,9 +231,9 @@ const union AnimCmd gUnknown_085954B8[] = ANIMCMD_JUMP(0), }; -const union AnimCmd *const gUnknown_085954D0[] = +const union AnimCmd *const gAnims_BasicFire[] = { - gUnknown_085954B8, + sAnim_BasicFire, }; const struct SpriteTemplate gEmberSpriteTemplate = @@ -250,98 +252,99 @@ const struct SpriteTemplate gEmberFlareSpriteTemplate = .tileTag = ANIM_TAG_SMALL_EMBER, .paletteTag = ANIM_TAG_SMALL_EMBER, .oam = &gOamData_AffineOff_ObjNormal_32x32, - .anims = gUnknown_085954D0, + .anims = gAnims_BasicFire, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, .callback = AnimEmberFlare, }; -const struct SpriteTemplate gUnknown_08595504 = +const struct SpriteTemplate gBurnFlameSpriteTemplate = { .tileTag = ANIM_TAG_SMALL_EMBER, .paletteTag = ANIM_TAG_SMALL_EMBER, .oam = &gOamData_AffineOff_ObjNormal_32x32, - .anims = gUnknown_085954D0, + .anims = gAnims_BasicFire, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_8109200, + .callback = AnimBurnFlame, }; -const struct SpriteTemplate gUnknown_0859551C = +const struct SpriteTemplate gFireBlastRingSpriteTemplate = { .tileTag = ANIM_TAG_SMALL_EMBER, .paletteTag = ANIM_TAG_SMALL_EMBER, .oam = &gOamData_AffineOff_ObjNormal_32x32, - .anims = gUnknown_085954D0, + .anims = gAnims_BasicFire, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, .callback = AnimFireRing, }; -const union AnimCmd gUnknown_08595534[] = +static const union AnimCmd sAnim_FireBlastCross[] = { ANIMCMD_FRAME(32, 6), ANIMCMD_FRAME(48, 6), ANIMCMD_JUMP(0), }; -const union AnimCmd *const gUnknown_08595540[] = +static const union AnimCmd *const sAnims_FireBlastCross[] = { - gUnknown_08595534, + sAnim_FireBlastCross, }; -const union AffineAnimCmd gUnknown_08595544[] = +static const union AffineAnimCmd gUnknown_08595544[] = { AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 1), AFFINEANIMCMD_END, }; -const union AffineAnimCmd gUnknown_08595554[] = +static const union AffineAnimCmd gUnknown_08595554[] = { AFFINEANIMCMD_FRAME(0xA0, 0xA0, 0, 0), AFFINEANIMCMD_END, }; -const union AffineAnimCmd *const gUnknown_08595564[] = +// Unused +static const union AffineAnimCmd *const gUnknown_08595564[] = { gUnknown_08595544, gUnknown_08595554, }; -const struct SpriteTemplate gUnknown_0859556C = +const struct SpriteTemplate gFireBlastCrossSpriteTemplate = { .tileTag = ANIM_TAG_SMALL_EMBER, .paletteTag = ANIM_TAG_SMALL_EMBER, .oam = &gOamData_AffineOff_ObjNormal_32x32, - .anims = gUnknown_08595540, + .anims = sAnims_FireBlastCross, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, .callback = AnimFireCross, }; -const struct SpriteTemplate gBattleAnimSpriteTemplate_8595584 = +const struct SpriteTemplate gFireSpiralOutwardSpriteTemplate = { .tileTag = ANIM_TAG_SMALL_EMBER, .paletteTag = ANIM_TAG_SMALL_EMBER, .oam = &gOamData_AffineOff_ObjNormal_32x32, - .anims = gUnknown_085954D0, + .anims = gAnims_BasicFire, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_81093A4, + .callback = AnimFireSpiralOutward, }; -const struct SpriteTemplate gUnknown_0859559C = +const struct SpriteTemplate gWeatherBallFireDownSpriteTemplate = { .tileTag = ANIM_TAG_SMALL_EMBER, .paletteTag = ANIM_TAG_SMALL_EMBER, .oam = &gOamData_AffineOff_ObjNormal_32x32, - .anims = gUnknown_085954D0, + .anims = gAnims_BasicFire, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_80A8EE4, + .callback = AnimWeatherBallDown, }; -const struct SpriteTemplate gUnknown_085955B4 = +const struct SpriteTemplate gEruptionLaunchRockSpriteTemplate = { .tileTag = ANIM_TAG_WARM_ROCK, .paletteTag = ANIM_TAG_WARM_ROCK, @@ -349,11 +352,10 @@ const struct SpriteTemplate gUnknown_085955B4 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_81098EC, + .callback = AnimEruptionLaunchRock, }; -// gHeatedRockCoords -const s16 gUnknown_085955CC[][2] = +static const s16 sEruptionLaunchRockCoords[][2] = { {-2, -5}, {-1, -1}, @@ -364,7 +366,7 @@ const s16 gUnknown_085955CC[][2] = { 4, -7}, }; -const struct SpriteTemplate gUnknown_085955E8 = +const struct SpriteTemplate gEruptionFallingRockSpriteTemplate = { .tileTag = ANIM_TAG_WARM_ROCK, .paletteTag = ANIM_TAG_WARM_ROCK, @@ -372,10 +374,10 @@ const struct SpriteTemplate gUnknown_085955E8 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_8109A10, + .callback = AnimEruptionFallingRock, }; -const union AnimCmd gUnknown_08595600[] = +static const union AnimCmd sAnim_WillOWispOrb_0[] = { ANIMCMD_FRAME(0, 5), ANIMCMD_FRAME(4, 5), @@ -384,44 +386,44 @@ const union AnimCmd gUnknown_08595600[] = ANIMCMD_JUMP(0), }; -const union AnimCmd gUnknown_08595614[] = +static const union AnimCmd sAnim_WillOWispOrb_1[] = { ANIMCMD_FRAME(16, 5), ANIMCMD_END, }; -const union AnimCmd gUnknown_0859561C[] = +static const union AnimCmd sAnim_WillOWispOrb_2[] = { ANIMCMD_FRAME(20, 5), ANIMCMD_END, }; -const union AnimCmd gUnknown_08595624[] = +static const union AnimCmd sAnim_WillOWispOrb_3[] = { ANIMCMD_FRAME(20, 5), ANIMCMD_END, }; -const union AnimCmd *const gUnknown_0859562C[] = +static const union AnimCmd *const sAnims_WillOWispOrb[] = { - gUnknown_08595600, - gUnknown_08595614, - gUnknown_0859561C, - gUnknown_08595624, + sAnim_WillOWispOrb_0, + sAnim_WillOWispOrb_1, + sAnim_WillOWispOrb_2, + sAnim_WillOWispOrb_3, }; -const struct SpriteTemplate gUnknown_0859563C = +const struct SpriteTemplate gWillOWispOrbSpriteTemplate = { .tileTag = ANIM_TAG_WISP_ORB, .paletteTag = ANIM_TAG_WISP_ORB, .oam = &gOamData_AffineOff_ObjNormal_16x16, - .anims = gUnknown_0859562C, + .anims = sAnims_WillOWispOrb, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_8109AFC, + .callback = AnimWillOWispOrb, }; -const union AnimCmd gUnknown_08595654[] = +static const union AnimCmd sAnim_WillOWispFire[] = { ANIMCMD_FRAME(0, 5), ANIMCMD_FRAME(16, 5), @@ -430,33 +432,37 @@ const union AnimCmd gUnknown_08595654[] = ANIMCMD_JUMP(0), }; -const union AnimCmd *const gUnknown_08595668[] = +static const union AnimCmd *const sAnims_WillOWispFire[] = { - gUnknown_08595654, + sAnim_WillOWispFire, }; -const struct SpriteTemplate gUnknown_0859566C = +const struct SpriteTemplate gWillOWispFireSpriteTemplate = { .tileTag = ANIM_TAG_WISP_FIRE, .paletteTag = ANIM_TAG_WISP_FIRE, .oam = &gOamData_AffineOff_ObjNormal_32x32, - .anims = gUnknown_08595668, + .anims = sAnims_WillOWispFire, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_8109CB0, + .callback = AnimWillOWispFire, }; -const s8 gUnknown_08595684[16] = +// Directions for shaking up/down or left/right in AnimTask_ShakeTargetInPattern +// Only first 10 values are ever accessed. +// First pattern results in larger shakes, second results in faster oscillation +static const s8 sShakeDirsPattern0[16] = { -1, -1, 0, 1, 1, 0, 0, -1, -1, 1, 1, 0, 0, -1, 0, 1, }; -const s8 gUnknown_08595694[16] = +static const s8 sShakeDirsPattern1[16] = { -1, 0, 1, 0, -1, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, 1, }; -static void sub_8108EC8(struct Sprite *sprite) +// For the first stage of Fire Punch +static void AnimFireSpiralInward(struct Sprite *sprite) { sprite->data[0] = gBattleAnimArgs[0]; sprite->data[1] = 0x3C; @@ -470,7 +476,8 @@ static void sub_8108EC8(struct Sprite *sprite) sprite->callback(sprite); } -static void sub_8108F08(struct Sprite *sprite) +// For the impact spread of fire sprites for moves like Blaze Kick or Fire Punch +static void AnimFireSpread(struct Sprite *sprite) { SetAnimSpriteInitialXOffset(sprite, gBattleAnimArgs[0]); @@ -483,7 +490,7 @@ static void sub_8108F08(struct Sprite *sprite) StoreSpriteCallbackInData6(sprite, DestroyAnimSprite); } -static void sub_8108F4C(struct Sprite *sprite) +static void AnimFirePlume(struct Sprite *sprite) { SetSpriteCoordsToAnimAttackerCoords(sprite); @@ -507,7 +514,7 @@ static void sub_8108F4C(struct Sprite *sprite) sprite->callback = sub_8109028; } -static void sub_8108FBC(struct Sprite *sprite) +static void AnimLargeFlame(struct Sprite *sprite) { if (GetBattlerSide(gBattleAnimAttacker)) { @@ -592,8 +599,8 @@ static void sub_81090D8(struct Sprite *sprite) } } -//sunlight -static void sub_810916C(struct Sprite *sprite) +// Sunlight from Sunny Day / sunny weather +static void AnimSunlight(struct Sprite *sprite) { sprite->pos1.x = 0; sprite->pos1.y = 0; @@ -622,16 +629,16 @@ static void AnimEmberFlare(struct Sprite *sprite) || gBattleAnimAttacker == GetBattlerAtPosition(B_POSITION_OPPONENT_RIGHT))) gBattleAnimArgs[2] = -gBattleAnimArgs[2]; - sprite->callback = AnimSnoreZ; + sprite->callback = AnimTravelDiagonally; sprite->callback(sprite); } -static void sub_8109200(struct Sprite *sprite) +static void AnimBurnFlame(struct Sprite *sprite) { gBattleAnimArgs[0] = -gBattleAnimArgs[0]; gBattleAnimArgs[2] = -gBattleAnimArgs[2]; - sprite->callback = AnimSnoreZ; + sprite->callback = AnimTravelDiagonally; } // Animates the a fire sprite in the first-half of the MOVE_FIRE_BLAST @@ -649,10 +656,10 @@ void AnimFireRing(struct Sprite *sprite) sprite->data[7] = gBattleAnimArgs[2]; sprite->data[0] = 0; - sprite->callback = AnimFireRingStep1; + sprite->callback = AnimFireRing_Step1; } -static void AnimFireRingStep1(struct Sprite *sprite) +static void AnimFireRing_Step1(struct Sprite *sprite) { UpdateFireRingCircleOffset(sprite); @@ -666,11 +673,11 @@ static void AnimFireRingStep1(struct Sprite *sprite) InitAnimLinearTranslation(sprite); - sprite->callback = AnimFireRingStep2; + sprite->callback = AnimFireRing_Step2; } } -static void AnimFireRingStep2(struct Sprite *sprite) +static void AnimFireRing_Step2(struct Sprite *sprite) { if (AnimTranslateLinear(sprite)) { @@ -681,7 +688,7 @@ static void AnimFireRingStep2(struct Sprite *sprite) sprite->pos2.y = 0; sprite->pos2.x = 0; - sprite->callback = AnimFireRingStep3; + sprite->callback = AnimFireRing_Step3; sprite->callback(sprite); } else @@ -693,7 +700,7 @@ static void AnimFireRingStep2(struct Sprite *sprite) } } -static void AnimFireRingStep3(struct Sprite *sprite) +static void AnimFireRing_Step3(struct Sprite *sprite) { UpdateFireRingCircleOffset(sprite); @@ -729,7 +736,7 @@ static void AnimFireCross(struct Sprite *sprite) sprite->callback = TranslateSpriteLinear; } -static void sub_81093A4(struct Sprite *sprite) +static void AnimFireSpiralOutward(struct Sprite *sprite) { InitSpritePosToAnimAttacker(sprite, 1); @@ -739,21 +746,21 @@ static void sub_81093A4(struct Sprite *sprite) sprite->invisible = TRUE; sprite->callback = WaitAnimForDuration; - StoreSpriteCallbackInData6(sprite, sub_81093E4); + StoreSpriteCallbackInData6(sprite, AnimFireSpiralOutward_Step1); } -static void sub_81093E4(struct Sprite *sprite) +static void AnimFireSpiralOutward_Step1(struct Sprite *sprite) { sprite->invisible = FALSE; sprite->data[0] = sprite->data[1]; sprite->data[1] = 0; - sprite->callback = sub_810940C; + sprite->callback = AnimFireSpiralOutward_Step2; sprite->callback(sprite); } -static void sub_810940C(struct Sprite *sprite) +static void AnimFireSpiralOutward_Step2(struct Sprite *sprite) { sprite->pos2.x = Sin(sprite->data[1], sprite->data[2] >> 8); sprite->pos2.y = Cos(sprite->data[1], sprite->data[2] >> 8); @@ -765,11 +772,12 @@ static void sub_810940C(struct Sprite *sprite) DestroyAnimSprite(sprite); } -void sub_8109460(u8 taskId) // initialize animation task for Move_ERUPTION? +// Animates first stage of Eruption where the attacker squishes and launches rocks away from themself +void AnimTask_EruptionLaunchRocks(u8 taskId) { struct Task *task = &gTasks[taskId]; - task->data[15] = GetAnimBattlerSpriteId(0); + task->data[15] = GetAnimBattlerSpriteId(ANIM_ATTACKER); task->data[0] = 0; task->data[1] = 0; @@ -781,10 +789,10 @@ void sub_8109460(u8 taskId) // initialize animation task for Move_ERUPTION? PrepareBattlerSpriteForRotScale(task->data[15], ST_OAM_OBJ_NORMAL); - task->func = sub_81094D0; + task->func = AnimTask_EruptionLaunchRocks_Step; } -static void sub_81094D0(u8 taskId) // animate Move_ERUPTION? +static void AnimTask_EruptionLaunchRocks_Step(u8 taskId) // animate Move_ERUPTION? { struct Task *task = &gTasks[taskId]; @@ -840,7 +848,7 @@ static void sub_81094D0(u8 taskId) // animate Move_ERUPTION? case 3: if (!sub_80A80C8(task)) { - sub_81097B4(task->data[15], taskId, 6); + CreateEruptionLaunchRocks(task->data[15], taskId, 6); task->data[0]++; } @@ -895,12 +903,12 @@ static void sub_81094D0(u8 taskId) // animate Move_ERUPTION? } } -static void sub_81097B4(u8 spriteId, u8 taskId, u8 a3) +static void CreateEruptionLaunchRocks(u8 spriteId, u8 taskId, u8 a3) { u16 i, j; s8 sign; - u16 y = sub_8109930(spriteId); + u16 y = GetEruptionLaunchRockInitialYPos(spriteId); u16 x = gSprites[spriteId].pos1.x; if(!GetBattlerSide(gBattleAnimAttacker)) @@ -916,7 +924,7 @@ static void sub_81097B4(u8 spriteId, u8 taskId, u8 a3) for (i = 0, j = 0; i <= 6; i++) { - u8 spriteId = CreateSprite(&gUnknown_085955B4, x, y, 2); + u8 spriteId = CreateSprite(&gEruptionLaunchRockSpriteTemplate, x, y, 2); if (spriteId != 0x40) { @@ -924,8 +932,8 @@ static void sub_81097B4(u8 spriteId, u8 taskId, u8 a3) if (++j >= 5) j = 0; - //gHeatedRockCoords - sub_8109984(&gSprites[spriteId], gUnknown_085955CC[i][0] * sign, gUnknown_085955CC[i][1]); + + InitEruptionLaunchRockCoordData(&gSprites[spriteId], sEruptionLaunchRockCoords[i][0] * sign, sEruptionLaunchRockCoords[i][1]); gSprites[spriteId].data[6] = taskId; gSprites[spriteId].data[7] = a3; @@ -934,9 +942,9 @@ static void sub_81097B4(u8 spriteId, u8 taskId, u8 a3) } } -static void sub_81098EC(struct Sprite *sprite) +static void AnimEruptionLaunchRock(struct Sprite *sprite) { - sub_81099A0(sprite); + UpdateEruptionLaunchRockPos(sprite); if (sprite->invisible) { @@ -945,23 +953,23 @@ static void sub_81098EC(struct Sprite *sprite) } } -static u16 sub_8109930(u8 spriteId) +static u16 GetEruptionLaunchRockInitialYPos(u8 spriteId) { - u16 var1 = gSprites[spriteId].pos1.y + gSprites[spriteId].pos2.y + gSprites[spriteId].centerToCornerVecY; + u16 y = gSprites[spriteId].pos1.y + gSprites[spriteId].pos2.y + gSprites[spriteId].centerToCornerVecY; if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_PLAYER) { - var1 = ((var1 << 16) + 0x4A0000) >> 16; + y = ((y << 16) + 0x4A0000) >> 16; } else { - var1 = ((var1 << 16) + 0x2C0000) >> 16; + y = ((y << 16) + 0x2C0000) >> 16; } - return var1; + return y; } -static void sub_8109984(struct Sprite *sprite, s16 x, s16 y) +static void InitEruptionLaunchRockCoordData(struct Sprite *sprite, s16 x, s16 y) { sprite->data[0] = 0; sprite->data[1] = 0; @@ -971,7 +979,7 @@ static void sub_8109984(struct Sprite *sprite, s16 x, s16 y) sprite->data[5] = y * 8; } -static void sub_81099A0(struct Sprite *sprite) +static void UpdateEruptionLaunchRockPos(struct Sprite *sprite) { int var1; if (++sprite->data[0] > 2) @@ -991,7 +999,7 @@ static void sub_81099A0(struct Sprite *sprite) sprite->invisible = TRUE; } -static void sub_8109A10(struct Sprite *sprite) +static void AnimEruptionFallingRock(struct Sprite *sprite) { sprite->pos1.x = gBattleAnimArgs[0]; sprite->pos1.y = gBattleAnimArgs[1]; @@ -1003,10 +1011,10 @@ static void sub_8109A10(struct Sprite *sprite) sprite->data[7] = gBattleAnimArgs[3]; sprite->oam.tileNum += gBattleAnimArgs[4] * 16; - sprite->callback = sub_8109A64; + sprite->callback = AnimEruptionFallingRock_Step; } -static void sub_8109A64(struct Sprite *sprite) +static void AnimEruptionFallingRock_Step(struct Sprite *sprite) { switch (sprite->data[0]) { @@ -1049,8 +1057,7 @@ static void sub_8109A64(struct Sprite *sprite) } } -//wisp orb -static void sub_8109AFC(struct Sprite *sprite) +static void AnimWillOWispOrb(struct Sprite *sprite) { switch (sprite->data[0]) { @@ -1109,13 +1116,13 @@ static void sub_8109AFC(struct Sprite *sprite) sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3); sub_80A6FD4(sprite); - sprite->callback = sub_8109C4C; + sprite->callback = AnimWillOWispOrb_Step; } break; } } -static void sub_8109C4C(struct Sprite *sprite) +static void AnimWillOWispOrb_Step(struct Sprite *sprite) { s16 initialData5; s16 newData5; @@ -1129,7 +1136,7 @@ static void sub_8109C4C(struct Sprite *sprite) if ((initialData5 == 0 || initialData5 > 196) && newData5 > 0 && sprite->data[7] == 0) { - PlaySE12WithPanning(SE_W172, gUnknown_02038440); + PlaySE12WithPanning(SE_W172, gAnimCustomPanning); } } else @@ -1138,8 +1145,7 @@ static void sub_8109C4C(struct Sprite *sprite) } } -//wisp fire -void sub_8109CB0(struct Sprite *sprite) +static void AnimWillOWispFire(struct Sprite *sprite) { if (!sprite->data[0]) { @@ -1177,19 +1183,19 @@ void sub_8109CB0(struct Sprite *sprite) DestroyAnimSprite(sprite); } -void sub_8109DBC(u8 taskId) +void AnimTask_MoveHeatWaveTargets(u8 taskId) { struct Task *task = &gTasks[taskId]; task->data[12] = !GetBattlerSide(gBattleAnimAttacker) ? 1 : -1; task->data[13] = IsBattlerSpriteVisible(gBattleAnimTarget ^ 2) + 1; - task->data[14] = GetAnimBattlerSpriteId(1); - task->data[15] = GetAnimBattlerSpriteId(3); + task->data[14] = GetAnimBattlerSpriteId(ANIM_TARGET); + task->data[15] = GetAnimBattlerSpriteId(ANIM_DEF_PARTNER); - task->func = sub_8109E2C; + task->func = AnimTask_MoveHeatWaveTargets_Step; } -static void sub_8109E2C(u8 taskId) +static void AnimTask_MoveHeatWaveTargets_Step(u8 taskId) { struct Task *task = &gTasks[taskId]; @@ -1287,33 +1293,40 @@ void AnimTask_BlendBackground(u8 taskId) DestroyAnimVisualTask(taskId); } -void sub_810A094(u8 taskId) +#define tShakeNum data[0] +#define tMaxShakes data[1] +#define tShakeOffset data[2] // Never read, gBattleAnimArgs[1] is used directly instead +#define tVertical data[3] +#define tPatternId data[4] + +// Shakes target horizontally or vertically tMaxShakes times, following a set pattern of alternations +void AnimTask_ShakeTargetInPattern(u8 taskId) { - s8 unk; + s8 dir; u8 spriteId; - if (gTasks[taskId].data[0] == 0) + if (gTasks[taskId].tShakeNum == 0) { - gTasks[taskId].data[1] = gBattleAnimArgs[0]; - gTasks[taskId].data[2] = gBattleAnimArgs[1]; - gTasks[taskId].data[3] = gBattleAnimArgs[2]; - gTasks[taskId].data[4] = gBattleAnimArgs[3]; + gTasks[taskId].tMaxShakes = gBattleAnimArgs[0]; + gTasks[taskId].tShakeOffset = gBattleAnimArgs[1]; + gTasks[taskId].tVertical = gBattleAnimArgs[2]; + gTasks[taskId].tPatternId = gBattleAnimArgs[3]; } - gTasks[taskId].data[0]++; + gTasks[taskId].tShakeNum++; spriteId = gBattlerSpriteIds[gBattleAnimTarget]; - if (!gTasks[taskId].data[4]) - unk = gUnknown_08595684[gTasks[taskId].data[0] % 10]; + if (gTasks[taskId].tPatternId == 0) + dir = sShakeDirsPattern0[gTasks[taskId].tShakeNum % 10]; else - unk = gUnknown_08595694[gTasks[taskId].data[0] % 10]; + dir = sShakeDirsPattern1[gTasks[taskId].tShakeNum % 10]; - if (gTasks[taskId].data[3] == 1) - gSprites[spriteId].pos2.y = gBattleAnimArgs[1] * unk < 0 ? -(gBattleAnimArgs[1] * unk) : gBattleAnimArgs[1] * unk; + if (gTasks[taskId].tVertical == TRUE) + gSprites[spriteId].pos2.y = gBattleAnimArgs[1] * dir < 0 ? -(gBattleAnimArgs[1] * dir) : gBattleAnimArgs[1] * dir; else - gSprites[spriteId].pos2.x = gBattleAnimArgs[1] * unk; + gSprites[spriteId].pos2.x = gBattleAnimArgs[1] * dir; - if (gTasks[taskId].data[0] == gTasks[taskId].data[1]) + if (gTasks[taskId].tShakeNum == gTasks[taskId].tMaxShakes) { gSprites[spriteId].pos2.x = 0; gSprites[spriteId].pos2.y = 0; diff --git a/src/flying.c b/src/battle_anim_flying.c similarity index 77% rename from src/flying.c rename to src/battle_anim_flying.c index 774018f0f..5179c1364 100644 --- a/src/flying.c +++ b/src/battle_anim_flying.c @@ -6,39 +6,38 @@ #include "constants/rgb.h" #include "random.h" -extern const struct SpriteTemplate gUnknown_085973E8; +extern const struct SpriteTemplate gFlashingHitSplatSpriteTemplate; -void sub_810DE70(struct Sprite *); -void sub_810DFA8(struct Sprite *); -void sub_810E044(struct Sprite *); -void sub_810E13C(struct Sprite *); -void sub_810E1C8(struct Sprite *); -void sub_810E314(struct Sprite *); -void sub_810E520(struct Sprite *); -void sub_810EB40(struct Sprite *); -void sub_810EA4C(struct Sprite *); -void sub_810EAA0(struct Sprite *); -void sub_810EC34(struct Sprite *); -void sub_810EC94(struct Sprite *); -void sub_810ED28(struct Sprite *); -void sub_810ED70(struct Sprite *); -void sub_810EDD0(struct Sprite *); -void sub_810EE14(struct Sprite *); -void sub_810EEF8(struct Sprite *); -void sub_810EFA8(struct Sprite *); -void sub_810F004(struct Sprite *); -void sub_810F018(struct Sprite *); -void sub_810F084(struct Sprite *); -void sub_810F140(struct Sprite *); - -static void sub_810DE98(struct Sprite *); -static void sub_810DF18(u8); -static void sub_810E028(struct Sprite *); -static void sub_810E184(struct Sprite *); -static void sub_810E24C(struct Sprite *); +static void AnimEllipticalGust(struct Sprite *); +static void AnimEllipticalGust_Step(struct Sprite *); +static void AnimGustToTarget(struct Sprite *); +static void AnimGustToTarget_Step(struct Sprite *); +static void AnimAirWaveCrescent(struct Sprite *); +static void AnimFlyBallUp(struct Sprite *); +static void AnimFlyBallUp_Step(struct Sprite *); +static void AnimFlyBallAttack(struct Sprite *); +static void AnimFlyBallAttack_Step(struct Sprite *); +static void AnimFallingFeather(struct Sprite *); +static void sub_810E520(struct Sprite *); +static void sub_810EB40(struct Sprite *); +static void sub_810EA4C(struct Sprite *); +static void AnimWhirlwindLine(struct Sprite *); +static void AnimBounceBallShrink(struct Sprite *); +static void AnimBounceBallLand(struct Sprite *); +static void AnimDiveBall(struct Sprite *); +static void AnimDiveBall_Step1(struct Sprite *); +static void AnimDiveBall_Step2(struct Sprite *); +static void AnimDiveWaterSplash(struct Sprite *); +static void AnimSprayWaterDroplet(struct Sprite *); +static void AnimSprayWaterDroplet_Step(struct Sprite *); +static void sub_810F004(struct Sprite *); +static void sub_810F018(struct Sprite *); +static void AnimSkyAttackBird(struct Sprite *); +static void AnimSkyAttackBird_Step(struct Sprite *); +static void AnimTask_AnimateGustTornadoPalette_Step(u8); -const struct SpriteTemplate gUnknown_08596270 = +const struct SpriteTemplate gEllipticalGustSpriteTemplate = { .tileTag = ANIM_TAG_GUST, .paletteTag = ANIM_TAG_GUST, @@ -46,33 +45,33 @@ const struct SpriteTemplate gUnknown_08596270 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_810DE70, + .callback = AnimEllipticalGust, }; -const union AffineAnimCmd gUnknown_08596288[] = +static const union AffineAnimCmd sAffineAnim_GustToTarget[] = { AFFINEANIMCMD_FRAME(0x10, 0x100, 0, 0), AFFINEANIMCMD_FRAME(0xA, 0x0, 0, 24), AFFINEANIMCMD_END, }; -const union AffineAnimCmd *const gUnknown_085962A0[] = +static const union AffineAnimCmd *const sAffineAnims_GustToTarget[] = { - gUnknown_08596288, + sAffineAnim_GustToTarget, }; -const struct SpriteTemplate gBattleAnimSpriteTemplate_85962A4 = +const struct SpriteTemplate gGustToTargetSpriteTemplate = { .tileTag = ANIM_TAG_GUST, .paletteTag = ANIM_TAG_GUST, .oam = &gOamData_AffineNormal_ObjNormal_32x64, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_085962A0, - .callback = sub_810DFA8, + .affineAnims = sAffineAnims_GustToTarget, + .callback = AnimGustToTarget, }; -const union AnimCmd gUnknown_085962BC[] = +static const union AnimCmd sAffineAnim_AirWaveCrescent[] = { ANIMCMD_FRAME(0, 3), ANIMCMD_FRAME(0, 3, .hFlip = TRUE), @@ -81,23 +80,23 @@ const union AnimCmd gUnknown_085962BC[] = ANIMCMD_JUMP(0), }; -const union AnimCmd *const gUnknown_085962D0[] = +static const union AnimCmd *const sAffineAnims_AirWaveCrescent[] = { - gUnknown_085962BC, + sAffineAnim_AirWaveCrescent, }; -const struct SpriteTemplate gUnknown_085962D4 = +const struct SpriteTemplate gAirWaveCrescentSpriteTemplate = { .tileTag = ANIM_TAG_AIR_WAVE_2, .paletteTag = ANIM_TAG_AIR_WAVE_2, .oam = &gOamData_AffineOff_ObjNormal_32x16, - .anims = gUnknown_085962D0, + .anims = sAffineAnims_AirWaveCrescent, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_810E044, + .callback = AnimAirWaveCrescent, }; -const union AffineAnimCmd gUnknown_085962EC[] = +static const union AffineAnimCmd sAffineAnim_FlyBallUp[] = { AFFINEANIMCMD_FRAME(0x10, 0x100, 0, 0), AFFINEANIMCMD_FRAME(0x28, 0x0, 0, 6), @@ -106,78 +105,78 @@ const union AffineAnimCmd gUnknown_085962EC[] = AFFINEANIMCMD_END, }; -const union AffineAnimCmd *const gUnknown_08596314[] = +static const union AffineAnimCmd *const sAffineAnims_FlyBallUp[] = { - gUnknown_085962EC, + sAffineAnim_FlyBallUp, }; -const union AffineAnimCmd gUnknown_08596318[] = +static const union AffineAnimCmd sAffineAnim_FlyBallAttack_0[] = { AFFINEANIMCMD_FRAME(0x0, 0x0, 50, 1), AFFINEANIMCMD_END, }; -const union AffineAnimCmd gUnknown_08596328[] = +static const union AffineAnimCmd sAffineAnim_FlyBallAttack_1[] = { AFFINEANIMCMD_FRAME(0x0, 0x0, -40, 1), AFFINEANIMCMD_END, }; -const union AffineAnimCmd *const gUnknown_08596338[] = +static const union AffineAnimCmd *const sAffineAnims_FlyBallAttack[] = { - gUnknown_08596318, - gUnknown_08596328, + sAffineAnim_FlyBallAttack_0, + sAffineAnim_FlyBallAttack_1, }; -const struct SpriteTemplate gUnknown_08596340 = +const struct SpriteTemplate gFlyBallUpSpriteTemplate = { .tileTag = ANIM_TAG_ROUND_SHADOW, .paletteTag = ANIM_TAG_ROUND_SHADOW, .oam = &gOamData_AffineDouble_ObjNormal_64x64, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_08596314, - .callback = sub_810E13C, + .affineAnims = sAffineAnims_FlyBallUp, + .callback = AnimFlyBallUp, }; -const struct SpriteTemplate gUnknown_08596358 = +const struct SpriteTemplate gFlyBallAttackSpriteTemplate = { .tileTag = ANIM_TAG_ROUND_SHADOW, .paletteTag = ANIM_TAG_ROUND_SHADOW, .oam = &gOamData_AffineNormal_ObjNormal_64x64, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_08596338, - .callback = sub_810E1C8, + .affineAnims = sAffineAnims_FlyBallAttack, + .callback = AnimFlyBallAttack, }; -const union AnimCmd gUnknown_08596370[] = +static const union AnimCmd sAnim_FallingFeather_0[] = { ANIMCMD_FRAME(0, 0), ANIMCMD_END, }; -const union AnimCmd gUnknown_08596378[] = +static const union AnimCmd sAnim_FallingFeather_1[] = { ANIMCMD_FRAME(16, 0, .hFlip = TRUE), ANIMCMD_END, }; -const union AnimCmd *const gUnknown_08596380[] = +static const union AnimCmd *const sAnims_FallingFeather[] = { - gUnknown_08596370, - gUnknown_08596378, + sAnim_FallingFeather_0, + sAnim_FallingFeather_1, }; -const struct SpriteTemplate gUnknown_08596388 = +const struct SpriteTemplate gFallingFeatherSpriteTemplate = { .tileTag = ANIM_TAG_WHITE_FEATHER, .paletteTag = ANIM_TAG_WHITE_FEATHER, .oam = &gOamData_AffineNormal_ObjNormal_32x32, - .anims = gUnknown_08596380, + .anims = sAnims_FallingFeather, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_810E314, + .callback = AnimFallingFeather, }; const struct SpriteTemplate gUnknown_085963A0 = @@ -191,7 +190,7 @@ const struct SpriteTemplate gUnknown_085963A0 = .callback = sub_810EA4C, }; -const union AnimCmd gUnknown_085963B8[] = +static const union AnimCmd sAnim_WhirlwindLines[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_FRAME(8, 1), @@ -201,23 +200,23 @@ const union AnimCmd gUnknown_085963B8[] = ANIMCMD_END, }; -const union AnimCmd *const gUnknown_085963D0[] = +static const union AnimCmd *const sAnims_WhirlwindLines[] = { - gUnknown_085963B8, + sAnim_WhirlwindLines, }; -const struct SpriteTemplate gUnknown_085963D4 = +const struct SpriteTemplate gWhirlwindLineSpriteTemplate = { .tileTag = ANIM_TAG_WHIRLWIND_LINES, .paletteTag = ANIM_TAG_WHIRLWIND_LINES, .oam = &gOamData_AffineOff_ObjNormal_32x16, - .anims = gUnknown_085963D0, + .anims = sAnims_WhirlwindLines, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_810EAA0, + .callback = AnimWhirlwindLine, }; -const union AffineAnimCmd gUnknown_085963EC[] = +static const union AffineAnimCmd sAffineAnim_BounceBallShrink[] = { AFFINEANIMCMD_FRAME(0x10, 0x100, 0, 0), AFFINEANIMCMD_FRAME(0x28, 0x0, 0, 6), @@ -227,45 +226,45 @@ const union AffineAnimCmd gUnknown_085963EC[] = AFFINEANIMCMD_END, }; -const union AffineAnimCmd *const gUnknown_0859641C[] = +static const union AffineAnimCmd *const sAffineAnims_BounceBallShrink[] = { - gUnknown_085963EC, + sAffineAnim_BounceBallShrink, }; -const struct SpriteTemplate gUnknown_08596420 = +const struct SpriteTemplate gBounceBallShrinkSpriteTemplate = { .tileTag = ANIM_TAG_ROUND_SHADOW, .paletteTag = ANIM_TAG_ROUND_SHADOW, .oam = &gOamData_AffineDouble_ObjNormal_64x64, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_0859641C, - .callback = sub_810EC34, + .affineAnims = sAffineAnims_BounceBallShrink, + .callback = AnimBounceBallShrink, }; -const union AffineAnimCmd gUnknown_08596438[] = +static const union AffineAnimCmd sAffineAnim_BounceBallLand[] = { AFFINEANIMCMD_FRAME(0xA0, 0x100, 0, 0), AFFINEANIMCMD_END, }; -const union AffineAnimCmd *const gUnknown_08596448[] = +static const union AffineAnimCmd *const sAffineAnims_BounceBallLand[] = { - gUnknown_08596438, + sAffineAnim_BounceBallLand, }; -const struct SpriteTemplate gUnknown_0859644C = +const struct SpriteTemplate gBounceBallLandSpriteTemplate = { .tileTag = ANIM_TAG_ROUND_SHADOW, .paletteTag = ANIM_TAG_ROUND_SHADOW, .oam = &gOamData_AffineDouble_ObjNormal_64x64, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_08596448, - .callback = sub_810EC94, + .affineAnims = sAffineAnims_BounceBallLand, + .callback = AnimBounceBallLand, }; -const union AffineAnimCmd gUnknown_08596464[] = +static const union AffineAnimCmd sAffineAnim_DiveBall[] = { AFFINEANIMCMD_FRAME(0x10, 0x100, 0, 0), AFFINEANIMCMD_FRAME(0x28, 0x0, 0, 6), @@ -274,23 +273,23 @@ const union AffineAnimCmd gUnknown_08596464[] = AFFINEANIMCMD_END, }; -const union AffineAnimCmd *const gUnknown_0859648C[] = +static const union AffineAnimCmd *const sAffineAnims_DiveBall[] = { - gUnknown_08596464, + sAffineAnim_DiveBall, }; -const struct SpriteTemplate gUnknown_08596490 = +const struct SpriteTemplate gDiveBallSpriteTemplate = { .tileTag = ANIM_TAG_ROUND_SHADOW, .paletteTag = ANIM_TAG_ROUND_SHADOW, .oam = &gOamData_AffineDouble_ObjNormal_64x64, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_0859648C, - .callback = sub_810ED28, + .affineAnims = sAffineAnims_DiveBall, + .callback = AnimDiveBall, }; -const union AffineAnimCmd gUnknown_085964A8[] = +static const union AffineAnimCmd gUnknown_085964A8[] = { AFFINEANIMCMD_FRAME(0x100, 0x0, 0, 0), AFFINEANIMCMD_FRAME(0x0, 0x20, 0, 12), @@ -298,12 +297,13 @@ const union AffineAnimCmd gUnknown_085964A8[] = AFFINEANIMCMD_END, }; -const union AffineAnimCmd *const gUnknown_085964C8[] = +// Unused +static const union AffineAnimCmd *const gUnknown_085964C8[] = { gUnknown_085964A8, }; -const struct SpriteTemplate gUnknown_085964CC = +const struct SpriteTemplate gDiveWaterSplashSpriteTemplate = { .tileTag = ANIM_TAG_SPLASH, .paletteTag = ANIM_TAG_SPLASH, @@ -311,10 +311,10 @@ const struct SpriteTemplate gUnknown_085964CC = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_810EE14, + .callback = AnimDiveWaterSplash, }; -const struct SpriteTemplate gUnknown_085964E4 = +const struct SpriteTemplate gSprayWaterDropletSpriteTemplate = { .tileTag = ANIM_TAG_SWEAT_BEAD, .paletteTag = ANIM_TAG_SWEAT_BEAD, @@ -322,7 +322,7 @@ const struct SpriteTemplate gUnknown_085964E4 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_810EEF8, + .callback = AnimSprayWaterDroplet, }; const struct SpriteTemplate gUnknown_085964FC = @@ -336,7 +336,7 @@ const struct SpriteTemplate gUnknown_085964FC = .callback = sub_810F004, }; -const struct SpriteTemplate gUnknown_08596514 = +const struct SpriteTemplate gSkyAttackBirdSpriteTemplate = { .tileTag = ANIM_TAG_BIRD, .paletteTag = ANIM_TAG_BIRD, @@ -344,20 +344,20 @@ const struct SpriteTemplate gUnknown_08596514 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_810F084, + .callback = AnimSkyAttackBird, }; -void sub_810DE70(struct Sprite *sprite) +static void AnimEllipticalGust(struct Sprite *sprite) { InitSpritePosToAnimTarget(sprite, FALSE); sprite->pos1.y += 20; sprite->data[1] = 191; - sprite->callback = sub_810DE98; + sprite->callback = AnimEllipticalGust_Step; sprite->callback(sprite); } -static void sub_810DE98(struct Sprite *sprite) +static void AnimEllipticalGust_Step(struct Sprite *sprite) { sprite->pos2.x = Sin(sprite->data[1], 32); sprite->pos2.y = Cos(sprite->data[1], 8); @@ -367,15 +367,16 @@ static void sub_810DE98(struct Sprite *sprite) DestroyAnimSprite(sprite); } -void sub_810DED8(u8 taskId) +// Animates the palette on the gust tornado to make it look like its spinning +void AnimTask_AnimateGustTornadoPalette(u8 taskId) { gTasks[taskId].data[0] = gBattleAnimArgs[1]; gTasks[taskId].data[1] = gBattleAnimArgs[0]; gTasks[taskId].data[2] = IndexOfSpritePaletteTag(ANIM_TAG_GUST); - gTasks[taskId].func = sub_810DF18; + gTasks[taskId].func = AnimTask_AnimateGustTornadoPalette_Step; } -static void sub_810DF18(u8 taskId) +static void AnimTask_AnimateGustTornadoPalette_Step(u8 taskId) { u8 data2; u16 temp; @@ -402,7 +403,7 @@ static void sub_810DF18(u8 taskId) DestroyAnimVisualTask(taskId); } -void sub_810DFA8(struct Sprite *sprite) +static void AnimGustToTarget(struct Sprite *sprite) { InitSpritePosToAnimAttacker(sprite, TRUE); if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER) @@ -415,16 +416,16 @@ void sub_810DFA8(struct Sprite *sprite) sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET) + gBattleAnimArgs[3]; InitAnimLinearTranslation(sprite); sprite->callback = RunStoredCallbackWhenAffineAnimEnds; - StoreSpriteCallbackInData6(sprite, sub_810E028); + StoreSpriteCallbackInData6(sprite, AnimGustToTarget_Step); } -static void sub_810E028(struct Sprite *sprite) +static void AnimGustToTarget_Step(struct Sprite *sprite) { if (AnimTranslateLinear(sprite)) DestroyAnimSprite(sprite); } -void sub_810E044(struct Sprite *sprite) +static void AnimAirWaveCrescent(struct Sprite *sprite) { if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER) { @@ -464,16 +465,16 @@ void sub_810E044(struct Sprite *sprite) SeekSpriteAnim(sprite, gBattleAnimArgs[5]); } -void sub_810E13C(struct Sprite *sprite) +static void AnimFlyBallUp(struct Sprite *sprite) { InitSpritePosToAnimAttacker(sprite, TRUE); sprite->data[0] = gBattleAnimArgs[2]; sprite->data[1] = gBattleAnimArgs[3]; - sprite->callback = sub_810E184; - gSprites[GetAnimBattlerSpriteId(ANIM_ATTACKER)].invisible = 1; + sprite->callback = AnimFlyBallUp_Step; + gSprites[GetAnimBattlerSpriteId(ANIM_ATTACKER)].invisible = TRUE; } -static void sub_810E184(struct Sprite *sprite) +static void AnimFlyBallUp_Step(struct Sprite *sprite) { if (sprite->data[0] > 0) { @@ -489,7 +490,7 @@ static void sub_810E184(struct Sprite *sprite) DestroyAnimSprite(sprite); } -void sub_810E1C8(struct Sprite *sprite) +static void AnimFlyBallAttack(struct Sprite *sprite) { if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER) { @@ -510,10 +511,10 @@ void sub_810E1C8(struct Sprite *sprite) sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET); InitAnimLinearTranslation(sprite); - sprite->callback = sub_810E24C; + sprite->callback = AnimFlyBallAttack_Step; } -static void sub_810E24C(struct Sprite *sprite) +static void AnimFlyBallAttack_Step(struct Sprite *sprite) { sprite->data[0] = 1; AnimTranslateLinear(sprite); @@ -528,12 +529,12 @@ static void sub_810E24C(struct Sprite *sprite) || sprite->pos1.x + sprite->pos2.x > 272 || sprite->pos1.y + sprite->pos2.y > 160) { - gSprites[GetAnimBattlerSpriteId(ANIM_ATTACKER)].invisible = 0; + gSprites[GetAnimBattlerSpriteId(ANIM_ATTACKER)].invisible = FALSE; DestroyAnimSprite(sprite); } } -void sub_810E2C8(struct Sprite *sprite) +void DestroyAnimSpriteAfterTimer(struct Sprite *sprite) { if (sprite->data[0]-- <= 0) { @@ -566,7 +567,7 @@ struct FeatherDanceData u16 unkE_1:15; }; -void sub_810E314(struct Sprite *sprite) +static void AnimFallingFeather(struct Sprite *sprite) { u8 battler, matrixNum, sinIndex; s16 spriteCoord, sinVal; @@ -652,7 +653,7 @@ void sub_810E314(struct Sprite *sprite) sprite->callback = sub_810E520; } -void sub_810E520(struct Sprite *sprite) +static void sub_810E520(struct Sprite *sprite) { u8 matrixNum, sinIndex; s16 sinVal = 0; @@ -898,12 +899,12 @@ void sub_810E520(struct Sprite *sprite) if (sprite->pos1.y + sprite->pos2.y >= data->unkE_1) { sprite->data[0] = 0; - sprite->callback = sub_810E2C8; + sprite->callback = DestroyAnimSpriteAfterTimer; } } } -void sub_810EA4C(struct Sprite *sprite) +static void sub_810EA4C(struct Sprite *sprite) { sprite->oam.priority = GetBattlerSpriteBGPriority(gBattleAnimTarget); sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2); @@ -911,18 +912,18 @@ void sub_810EA4C(struct Sprite *sprite) sprite->callback = TranslateAnimSpriteToTargetMonLocation; } -void sub_810EAA0(struct Sprite * sprite) +static void AnimWhirlwindLine(struct Sprite * sprite) { u16 arg; u8 mult; - if (!gBattleAnimArgs[2]) + if (gBattleAnimArgs[2] == ANIM_ATTACKER) InitSpritePosToAnimAttacker(sprite, 0); else InitSpritePosToAnimTarget(sprite, FALSE); - if ((!gBattleAnimArgs[2] && !GetBattlerSide(gBattleAnimAttacker)) - || (gBattleAnimArgs[2] == 1 && !GetBattlerSide(gBattleAnimTarget))) + if ((gBattleAnimArgs[2] == ANIM_ATTACKER && !GetBattlerSide(gBattleAnimAttacker)) + || (gBattleAnimArgs[2] == ANIM_TARGET && !GetBattlerSide(gBattleAnimTarget))) { sprite->pos1.x += 8; } @@ -939,7 +940,7 @@ void sub_810EAA0(struct Sprite * sprite) sprite->callback = sub_810EB40; } -void sub_810EB40(struct Sprite *sprite) +static void sub_810EB40(struct Sprite *sprite) { sprite->pos2.x += sprite->data[1] >> 8; @@ -954,7 +955,7 @@ void sub_810EB40(struct Sprite *sprite) DestroyAnimSprite(sprite); } -void sub_810EB88(u8 task) +void AnimTask_DrillPeckHitSplats(u8 task) { if (!(gTasks[task].data[0] % 32)) { @@ -965,7 +966,7 @@ void sub_810EB88(u8 task) gBattleAnimArgs[2] = 1; gBattleAnimArgs[3] = 3; - CreateSpriteAndAnimate(&gUnknown_085973E8, + CreateSpriteAndAnimate(&gFlashingHitSplatSpriteTemplate, GetBattlerSpriteCoord(gBattleAnimTarget, 2), GetBattlerSpriteCoord(gBattleAnimTarget, 3), 3); @@ -977,13 +978,13 @@ void sub_810EB88(u8 task) DestroyAnimVisualTask(task); } -void sub_810EC34(struct Sprite *sprite) +static void AnimBounceBallShrink(struct Sprite *sprite) { switch (sprite->data[0]) { case 0: InitSpritePosToAnimAttacker(sprite, 1); - gSprites[GetAnimBattlerSpriteId(0)].invisible = 1; + gSprites[GetAnimBattlerSpriteId(ANIM_ATTACKER)].invisible = TRUE; ++sprite->data[0]; break; case 1: @@ -993,7 +994,7 @@ void sub_810EC34(struct Sprite *sprite) } } -void sub_810EC94(struct Sprite *sprite) +static void AnimBounceBallLand(struct Sprite *sprite) { switch (sprite->data[0]) { @@ -1011,23 +1012,23 @@ void sub_810EC94(struct Sprite *sprite) sprite->pos2.y -= 10; if (sprite->pos1.y + sprite->pos2.y < -32) { - gSprites[GetAnimBattlerSpriteId(0)].invisible = 0; + gSprites[GetAnimBattlerSpriteId(ANIM_ATTACKER)].invisible = FALSE; DestroyAnimSprite(sprite); } break; } } -void sub_810ED28(struct Sprite *sprite) +static void AnimDiveBall(struct Sprite *sprite) { InitSpritePosToAnimAttacker(sprite, 1); sprite->data[0] = gBattleAnimArgs[2]; sprite->data[1] = gBattleAnimArgs[3]; - sprite->callback = sub_810ED70; - gSprites[GetAnimBattlerSpriteId(0)].invisible = 1; + sprite->callback = AnimDiveBall_Step1; + gSprites[GetAnimBattlerSpriteId(ANIM_ATTACKER)].invisible = TRUE; } -void sub_810ED70(struct Sprite *sprite) +void AnimDiveBall_Step1(struct Sprite *sprite) { if (sprite->data[0] > 0) { @@ -1040,24 +1041,24 @@ void sub_810ED70(struct Sprite *sprite) } else { - sprite->invisible = 1; + sprite->invisible = TRUE; if (sprite->data[3]++ > 20) - sprite->callback = sub_810EDD0; + sprite->callback = AnimDiveBall_Step2; } } -void sub_810EDD0(struct Sprite *sprite) +static void AnimDiveBall_Step2(struct Sprite *sprite) { sprite->pos2.y += sprite->data[2] >> 8; if (sprite->pos1.y + sprite->pos2.y > -32) - sprite->invisible = 0; + sprite->invisible = FALSE; if (sprite->pos2.y > 0) DestroyAnimSprite(sprite); } -void sub_810EE14(struct Sprite *sprite) +static void AnimDiveWaterSplash(struct Sprite *sprite) { u32 matrixNum; int t1, t2; @@ -1111,7 +1112,8 @@ void sub_810EE14(struct Sprite *sprite) } } -void sub_810EEF8(struct Sprite *sprite) +// Launches a water droplet away from the specified battler. Used by Astonish and Dive +static void AnimSprayWaterDroplet(struct Sprite *sprite) { int v1 = 0x1ff & Random2(); int v2 = 0x7f & Random2(); @@ -1142,10 +1144,10 @@ void sub_810EEF8(struct Sprite *sprite) sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimTarget, 1) + 32; } - sprite->callback = sub_810EFA8; + sprite->callback = AnimSprayWaterDroplet_Step; } -void sub_810EFA8(struct Sprite *sprite) +static void AnimSprayWaterDroplet_Step(struct Sprite *sprite) { if (sprite->data[2] == 0) { @@ -1168,14 +1170,14 @@ void sub_810EFA8(struct Sprite *sprite) DestroyAnimSprite(sprite); } -void sub_810F004(struct Sprite *sprite) +static void sub_810F004(struct Sprite *sprite) { sprite->data[6] = 0; sprite->data[7] = 64; sprite->callback = sub_810F018; } -void sub_810F018(struct Sprite *sprite) +static void sub_810F018(struct Sprite *sprite) { switch (sprite->data[0]) { @@ -1194,7 +1196,7 @@ void sub_810F018(struct Sprite *sprite) } } -void sub_810F084(struct Sprite *sprite) +static void AnimSkyAttackBird(struct Sprite *sprite) { u16 rotation; s16 posx = sprite->pos1.x; @@ -1214,10 +1216,10 @@ void sub_810F084(struct Sprite *sprite) TrySetSpriteRotScale(sprite, 1, 0x100, 0x100, rotation); - sprite->callback = sub_810F140; + sprite->callback = AnimSkyAttackBird_Step; } -void sub_810F140(struct Sprite *sprite) +void AnimSkyAttackBird_Step(struct Sprite *sprite) { sprite->data[4] += sprite->data[6]; sprite->data[5] += sprite->data[7]; @@ -1234,13 +1236,13 @@ void unref_sub_810F184(u8 taskId) { if (gBattleAnimArgs[0] == 0) { - u8 spriteId = GetAnimBattlerSpriteId(0); - gSprites[spriteId].invisible = 1; + u8 spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER); + gSprites[spriteId].invisible = TRUE; } else { - u8 spriteId = GetAnimBattlerSpriteId(0); - gSprites[spriteId].invisible = 0; + u8 spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER); + gSprites[spriteId].invisible = FALSE; } DestroyAnimVisualTask(taskId); } diff --git a/src/ghost.c b/src/battle_anim_ghost.c similarity index 81% rename from src/ghost.c rename to src/battle_anim_ghost.c index 93c442b92..b8de6b0e1 100644 --- a/src/ghost.c +++ b/src/battle_anim_ghost.c @@ -10,62 +10,62 @@ #include "trig.h" #include "util.h" -static void sub_811160C(struct Sprite *); -static void sub_8111674(struct Sprite *); -static void sub_81116E8(struct Sprite *); +static void AnimConfuseRayBallBounce(struct Sprite *); +static void AnimConfuseRayBallBounce_Step1(struct Sprite *); +static void AnimConfuseRayBallBounce_Step2(struct Sprite *); static void sub_8111764(struct Sprite *); -static void sub_81117F4(struct Sprite *); -static void sub_8111814(struct Sprite *); -static void sub_8111914(u8 taskId); -static void sub_811196C(u8 taskId); -static void InitAnimShadowBall(struct Sprite *); -static void AnimShadowBallStep(struct Sprite *); -static void sub_8111B9C(struct Sprite *); -static void sub_8111BB4(struct Sprite *); -static void sub_8111D78(u8 taskId); -static void sub_8111E78(u8 taskId); -static void sub_81120DC(u8 taskId); -static void sub_8112170(u8 taskId); -static void sub_8112264(struct Sprite *); -static void sub_8112384(struct Sprite *); -static void sub_81125E0(u8 taskId); -static void sub_811280C(u8 taskId); -static void sub_8112994(u8 taskId); -static void sub_81129F0(struct Sprite *); -static void sub_8112A4C(struct Sprite *); -static void sub_8112ACC(struct Sprite *); -static void sub_8112B44(struct Sprite *); -static void sub_8112B78(struct Sprite *); -static void sub_8112C4C(struct Sprite *); -static void sub_8112D10(u8 taskId); -static void sub_8112E9C(struct Sprite *); +static void AnimConfuseRayBallSpiral(struct Sprite *); +static void AnimConfuseRayBallSpiral_Step(struct Sprite *); +static void AnimTask_NightShadeClone_Step1(u8 taskId); +static void AnimTask_NightShadeClone_Step2(u8 taskId); +static void AnimShadowBall(struct Sprite *); +static void AnimShadowBall_Step(struct Sprite *); +static void AnimLick(struct Sprite *); +static void AnimLick_Step(struct Sprite *); +static void AnimTask_NightmareClone_Step(u8 taskId); +static void AnimTask_SpiteTargetShadow_Step1(u8 taskId); +static void AnimTask_SpiteTargetShadow_Step2(u8 taskId); +static void AnimTask_SpiteTargetShadow_Step3(u8 taskId); +static void AnimDestinyBondWhiteShadow(struct Sprite *); +static void AnimDestinyBondWhiteShadow_Step(struct Sprite *); +static void AnimTask_DestinyBondWhiteShadow_Step(u8 taskId); +static void AnimTask_CurseStretchingBlackBg_Step1(u8 taskId); +static void AnimTask_CurseStretchingBlackBg_Step2(u8 taskId); +static void AnimCurseNail(struct Sprite *); +static void AnimCurseNail_Step1(struct Sprite *); +static void AnimCurseNail_Step2(struct Sprite *); +static void AnimCurseNail_End(struct Sprite *); +static void AnimGhostStatusSprite(struct Sprite *); +static void AnimGhostStatusSprite_Step(struct Sprite *); +static void AnimTask_GrudgeFlames_Step(u8 taskId); +static void AnimGrudgeFlame(struct Sprite *); static void sub_8112F60(struct Sprite *); static void sub_8112FB8(struct Sprite *); -const union AffineAnimCmd gUnknown_08596CF8[] = +static const union AffineAnimCmd sAffineAnim_ConfuseRayBallBounce[] = { AFFINEANIMCMD_FRAME(0x1E, 0x1E, 10, 5), AFFINEANIMCMD_FRAME(0xFFE2, 0xFFE2, 10, 5), AFFINEANIMCMD_JUMP(0), }; -const union AffineAnimCmd *const gUnknown_08596D10[] = +static const union AffineAnimCmd *const sAffineAnims_ConfuseRayBallBounce[] = { - gUnknown_08596CF8, + sAffineAnim_ConfuseRayBallBounce, }; -const struct SpriteTemplate gUnknown_08596D14 = +const struct SpriteTemplate gConfuseRayBallBounceSpriteTemplate = { .tileTag = ANIM_TAG_YELLOW_BALL, .paletteTag = ANIM_TAG_YELLOW_BALL, .oam = &gOamData_AffineDouble_ObjNormal_16x16, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_08596D10, - .callback = sub_811160C, + .affineAnims = sAffineAnims_ConfuseRayBallBounce, + .callback = AnimConfuseRayBallBounce, }; -const struct SpriteTemplate gUnknown_08596D2C = +const struct SpriteTemplate gConfuseRayBallSpiralSpriteTemplate = { .tileTag = ANIM_TAG_YELLOW_BALL, .paletteTag = ANIM_TAG_YELLOW_BALL, @@ -73,18 +73,18 @@ const struct SpriteTemplate gUnknown_08596D2C = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_81117F4, + .callback = AnimConfuseRayBallSpiral, }; -const union AffineAnimCmd gUnknown_08596D44[] = +static const union AffineAnimCmd sAffineAnim_ShadowBall[] = { AFFINEANIMCMD_FRAME(0x0, 0x0, 10, 1), AFFINEANIMCMD_JUMP(0), }; -const union AffineAnimCmd *const gUnknown_08596D54[] = +static const union AffineAnimCmd *const sAffineAnims_ShadowBall[] = { - gUnknown_08596D44, + sAffineAnim_ShadowBall, }; const struct SpriteTemplate gShadowBallSpriteTemplate = @@ -94,11 +94,11 @@ const struct SpriteTemplate gShadowBallSpriteTemplate = .oam = &gOamData_AffineNormal_ObjNormal_32x32, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_08596D54, - .callback = InitAnimShadowBall, + .affineAnims = sAffineAnims_ShadowBall, + .callback = AnimShadowBall, }; -const union AnimCmd gUnknown_08596D70[] = +static const union AnimCmd sAnim_Lick[] = { ANIMCMD_FRAME(0, 2), ANIMCMD_FRAME(8, 2), @@ -108,34 +108,35 @@ const union AnimCmd gUnknown_08596D70[] = ANIMCMD_END, }; -const union AnimCmd *const gUnknown_08596D88[] = +static const union AnimCmd *const sAnims_Lick[] = { - gUnknown_08596D70, + sAnim_Lick, }; -const struct SpriteTemplate gUnknown_08596D8C = +const struct SpriteTemplate gLickSpriteTemplate = { .tileTag = ANIM_TAG_LICK, .paletteTag = ANIM_TAG_LICK, .oam = &gOamData_AffineOff_ObjNormal_16x32, - .anims = gUnknown_08596D88, + .anims = sAnims_Lick, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_8111B9C, + .callback = AnimLick, }; -const union AffineAnimCmd gUnknown_08596DA4[] = +static const union AffineAnimCmd gUnknown_08596DA4[] = { AFFINEANIMCMD_FRAME(0x200, 0x200, 0, 0), AFFINEANIMCMD_END, }; -const union AffineAnimCmd *const gUnknown_08596DB4[] = +// Unused +static const union AffineAnimCmd *const gUnknown_08596DB4[] = { gUnknown_08596DA4, }; -const struct SpriteTemplate gUnknown_08596DB8 = +const struct SpriteTemplate gDestinyBondWhiteShadowSpriteTemplate = { .tileTag = ANIM_TAG_WHITE_SHADOW, .paletteTag = ANIM_TAG_WHITE_SHADOW, @@ -143,10 +144,10 @@ const struct SpriteTemplate gUnknown_08596DB8 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_8112264, + .callback = AnimDestinyBondWhiteShadow, }; -const struct SpriteTemplate gUnknown_08596DD0 = +const struct SpriteTemplate gCurseNailSpriteTemplate = { .tileTag = ANIM_TAG_NAIL, .paletteTag = ANIM_TAG_NAIL, @@ -154,10 +155,10 @@ const struct SpriteTemplate gUnknown_08596DD0 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_81129F0, + .callback = AnimCurseNail, }; -const struct SpriteTemplate gBattleAnimSpriteTemplate_8596DE8 = +const struct SpriteTemplate gCurseGhostSpriteTemplate = { .tileTag = ANIM_TAG_GHOSTLY_SPIRIT, .paletteTag = ANIM_TAG_GHOSTLY_SPIRIT, @@ -165,10 +166,10 @@ const struct SpriteTemplate gBattleAnimSpriteTemplate_8596DE8 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_8112B78, + .callback = AnimGhostStatusSprite, }; -const struct SpriteTemplate gBattleAnimSpriteTemplate_8596E00 = +const struct SpriteTemplate gNightmareDevilSpriteTemplate = { .tileTag = ANIM_TAG_DEVIL, .paletteTag = ANIM_TAG_DEVIL, @@ -176,10 +177,10 @@ const struct SpriteTemplate gBattleAnimSpriteTemplate_8596E00 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_8112B78, + .callback = AnimGhostStatusSprite, }; -const union AnimCmd gUnknown_08596E18[] = +static const union AnimCmd sAnim_GrudgeFlame[] = { ANIMCMD_FRAME(0, 4), ANIMCMD_FRAME(8, 4), @@ -188,22 +189,23 @@ const union AnimCmd gUnknown_08596E18[] = ANIMCMD_JUMP(0), }; -const union AnimCmd *const gUnknown_08596E2C[] = +static const union AnimCmd *const sAnims_GrudgeFlame[] = { - gUnknown_08596E18, + sAnim_GrudgeFlame, }; -const struct SpriteTemplate gUnknown_08596E30 = +const struct SpriteTemplate gGrudgeFlameSpriteTemplate = { .tileTag = ANIM_TAG_PURPLE_FLAME, .paletteTag = ANIM_TAG_PURPLE_FLAME, .oam = &gOamData_AffineOff_ObjBlend_16x32, - .anims = gUnknown_08596E2C, + .anims = sAnims_GrudgeFlame, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_8112E9C, + .callback = AnimGrudgeFlame, }; +// Unused const struct SpriteTemplate gUnknown_08596E48 = { .tileTag = 0, @@ -215,7 +217,7 @@ const struct SpriteTemplate gUnknown_08596E48 = .callback = sub_8112F60, }; -static void sub_811160C(struct Sprite *sprite) +static void AnimConfuseRayBallBounce(struct Sprite *sprite) { InitSpritePosToAnimAttacker(sprite, 1); sprite->data[0] = gBattleAnimArgs[2]; @@ -224,20 +226,20 @@ static void sub_811160C(struct Sprite *sprite) sprite->data[3] = sprite->pos1.y; sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3); sub_80A6FD4(sprite); - sprite->callback = sub_8111674; + sprite->callback = AnimConfuseRayBallBounce_Step1; sprite->data[6] = 16; SetGpuReg(REG_OFFSET_BLDCNT, (BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_ALL)); SetGpuReg(REG_OFFSET_BLDALPHA, sprite->data[6]); } -static void sub_8111674(struct Sprite *sprite) +static void AnimConfuseRayBallBounce_Step1(struct Sprite *sprite) { s16 r0; s16 r2; sub_8111764(sprite); if (AnimTranslateLinear(sprite)) { - sprite->callback = sub_81116E8; + sprite->callback = AnimConfuseRayBallBounce_Step2; return; } @@ -250,10 +252,10 @@ static void sub_8111674(struct Sprite *sprite) return; if (r0 <= 0) return; - PlaySE12WithPanning(SE_W109, gUnknown_02038440); + PlaySE12WithPanning(SE_W109, gAnimCustomPanning); } -static void sub_81116E8(struct Sprite *sprite) +static void AnimConfuseRayBallBounce_Step2(struct Sprite *sprite) { s16 r2; s16 r0; @@ -311,14 +313,14 @@ static void sub_8111764(struct Sprite *sprite) } } -static void sub_81117F4(struct Sprite *sprite) +static void AnimConfuseRayBallSpiral(struct Sprite *sprite) { InitSpritePosToAnimTarget(sprite, TRUE); - sprite->callback = sub_8111814; + sprite->callback = AnimConfuseRayBallSpiral_Step; sprite->callback(sprite); } -static void sub_8111814(struct Sprite *sprite) +static void AnimConfuseRayBallSpiral_Step(struct Sprite *sprite) { u16 temp1; sprite->pos2.x = Sin(sprite->data[0], 32); @@ -336,12 +338,13 @@ static void sub_8111814(struct Sprite *sprite) DestroyAnimSprite(sprite); } -void sub_811188C(u8 taskId) +// Creates a large transparent clone of the attacker centered on their position which shrinks to original size +void AnimTask_NightShadeClone(u8 taskId) { u8 spriteId; SetGpuReg(REG_OFFSET_BLDCNT, (BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_ALL)); SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(0, 0x10)); - spriteId = GetAnimBattlerSpriteId(0); + spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER); PrepareBattlerSpriteForRotScale(spriteId, ST_OAM_OBJ_BLEND); SetSpriteRotScale(spriteId, 128, 128, 0); gSprites[spriteId].invisible = FALSE; @@ -349,10 +352,10 @@ void sub_811188C(u8 taskId) gTasks[taskId].data[1] = *gBattleAnimArgs; gTasks[taskId].data[2] = 0; gTasks[taskId].data[3] = 16; - gTasks[taskId].func = sub_8111914; + gTasks[taskId].func = AnimTask_NightShadeClone_Step1; } -static void sub_8111914(u8 taskId) +static void AnimTask_NightShadeClone_Step1(u8 taskId) { gTasks[taskId].data[10] += 1; if (gTasks[taskId].data[10] == 3) @@ -364,11 +367,11 @@ static void sub_8111914(u8 taskId) if (gTasks[taskId].data[2] != 9) return; - gTasks[taskId].func = sub_811196C; + gTasks[taskId].func = AnimTask_NightShadeClone_Step2; } } -static void sub_811196C(u8 taskId) +static void AnimTask_NightShadeClone_Step2(u8 taskId) { u8 spriteId; if (gTasks[taskId].data[1] > 0) @@ -377,7 +380,7 @@ static void sub_811196C(u8 taskId) return; } - spriteId = GetAnimBattlerSpriteId(0); + spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER); gTasks[taskId].data[0] += 8; if (gTasks[taskId].data[0] <= 0xFF) { @@ -397,7 +400,7 @@ static void sub_811196C(u8 taskId) // arg 0: duration step 1 (attacker -> center) // arg 1: duration step 2 (spin center) // arg 2: duration step 3 (center -> target) -static void InitAnimShadowBall(struct Sprite *sprite) +static void AnimShadowBall(struct Sprite *sprite) { s16 oldPosX = sprite->pos1.x; s16 oldPosY = sprite->pos1.y; @@ -412,10 +415,10 @@ static void InitAnimShadowBall(struct Sprite *sprite) sprite->data[5] = sprite->pos1.y << 4; sprite->data[6] = ((oldPosX - sprite->pos1.x) << 4) / (gBattleAnimArgs[0] << 1); sprite->data[7] = ((oldPosY - sprite->pos1.y) << 4) / (gBattleAnimArgs[0] << 1); - sprite->callback = AnimShadowBallStep; + sprite->callback = AnimShadowBall_Step; } -static void AnimShadowBallStep(struct Sprite *sprite) +static void AnimShadowBall_Step(struct Sprite *sprite) { switch (sprite->data[0]) { @@ -459,13 +462,13 @@ static void AnimShadowBallStep(struct Sprite *sprite) } } -static void sub_8111B9C(struct Sprite *sprite) +static void AnimLick(struct Sprite *sprite) { InitSpritePosToAnimTarget(sprite, TRUE); - sprite->callback = sub_8111BB4; + sprite->callback = AnimLick_Step; } -static void sub_8111BB4(struct Sprite *sprite) +static void AnimLick_Step(struct Sprite *sprite) { bool8 r5 = FALSE; bool8 r6 = FALSE; @@ -512,12 +515,13 @@ static void sub_8111BB4(struct Sprite *sprite) } } -void sub_8111C50(u8 taskId) +// Creates a transparent clone of the target which drifts up and away to the side +void AnimTask_NightmareClone(u8 taskId) { struct Task *task; task = &gTasks[taskId]; - task->data[0] = CloneBattlerSpriteWithBlend(1); + task->data[0] = CloneBattlerSpriteWithBlend(ANIM_TARGET); if (task->data[0] < 0) { DestroyAnimVisualTask(taskId); @@ -544,10 +548,10 @@ void sub_8111C50(u8 taskId) gSprites[task->data[0]].data[4] = 0; StoreSpriteCallbackInData6(&gSprites[task->data[0]], SpriteCallbackDummy); gSprites[task->data[0]].callback = TranslateSpriteLinearFixedPoint; - task->func = sub_8111D78; + task->func = AnimTask_NightmareClone_Step; } -static void sub_8111D78(u8 taskId) +static void AnimTask_NightmareClone_Step(u8 taskId) { struct Task *task; @@ -584,17 +588,18 @@ static void sub_8111D78(u8 taskId) } } -void sub_8111E50(u8 taskId) +// Creates a blended copy of the target that wavers in front of them +void AnimTask_SpiteTargetShadow(u8 taskId) { struct Task *task; task = &gTasks[taskId]; task->data[15] = 0; - task->func = sub_8111E78; + task->func = AnimTask_SpiteTargetShadow_Step1; task->func(taskId); } -static void sub_8111E78(u8 taskId) +static void AnimTask_SpiteTargetShadow_Step1(u8 taskId) { s16 startLine; struct Task *task = &gTasks[taskId]; @@ -610,7 +615,7 @@ static void sub_8111E78(u8 taskId) } else { - task->data[0] = CloneBattlerSpriteWithBlend(1); + task->data[0] = CloneBattlerSpriteWithBlend(ANIM_TARGET); if (task->data[0] < 0) { FreeSpritePaletteByTag(ANIM_TAG_BENT_SPOON); @@ -626,7 +631,7 @@ static void sub_8111E78(u8 taskId) task->data[1] = 0; task->data[2] = 0; task->data[3] = 16; - task->data[13] = GetAnimBattlerSpriteId(1); + task->data[13] = GetAnimBattlerSpriteId(ANIM_TARGET); task->data[4] = (gSprites[task->data[13]].oam.paletteNum + 16) * 16; if (position == 1) { u16 mask = DISPCNT_BG1_ON; @@ -674,7 +679,7 @@ static void sub_8111E78(u8 taskId) else SetGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_BG2_ON); - task->func = sub_81120DC; + task->func = AnimTask_SpiteTargetShadow_Step2; task->data[15]++; break; default: @@ -683,7 +688,7 @@ static void sub_8111E78(u8 taskId) } } -static void sub_81120DC(u8 taskId) +static void AnimTask_SpiteTargetShadow_Step2(u8 taskId) { struct Task *task = &gTasks[taskId]; task->data[1]++; @@ -698,12 +703,12 @@ static void sub_81120DC(u8 taskId) if (task->data[1] == 128) { task->data[15] = 0; - task->func = sub_8112170; + task->func = AnimTask_SpiteTargetShadow_Step3; task->func(taskId); } } -static void sub_8112170(u8 taskId) +static void AnimTask_SpiteTargetShadow_Step3(u8 taskId) { struct Task *task = &gTasks[taskId]; u8 rank = GetBattlerSpriteBGPriorityRank(gBattleAnimTarget); @@ -712,7 +717,7 @@ static void sub_8112170(u8 taskId) { case 0: gScanlineEffect.state = 3; - task->data[14] = GetAnimBattlerSpriteId(1); + task->data[14] = GetAnimBattlerSpriteId(ANIM_TARGET); if (rank == 1) ClearGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_BG1_ON); else @@ -739,7 +744,7 @@ static void sub_8112170(u8 taskId) task->data[15]++; } -static void sub_8112264(struct Sprite *sprite) +static void AnimDestinyBondWhiteShadow(struct Sprite *sprite) { s16 battler1X, battler1Y; s16 battler2X, battler2Y; @@ -772,11 +777,11 @@ static void sub_8112264(struct Sprite *sprite) sprite->oam.priority = 2; sprite->pos1.x = battler1X; sprite->pos1.y = battler1Y; - sprite->callback = sub_8112384; - sprite->invisible = 1; + sprite->callback = AnimDestinyBondWhiteShadow_Step; + sprite->invisible = TRUE; } -static void sub_8112384(struct Sprite *sprite) +static void AnimDestinyBondWhiteShadow_Step(struct Sprite *sprite) { if (sprite->data[4]) { @@ -789,7 +794,7 @@ static void sub_8112384(struct Sprite *sprite) } } -void sub_81123C4(u8 taskId) +void AnimTask_DestinyBondWhiteShadow(u8 taskId) { struct Task *task; s16 battler; @@ -811,13 +816,13 @@ void sub_81123C4(u8 taskId) baseY = GetBattlerSpriteCoordAttr(gBattleAnimAttacker, BATTLER_COORD_ATTR_BOTTOM); if (!IsContest()) { - for (battler = 0; battler < 4; battler++) + for (battler = 0; battler < MAX_BATTLERS_COUNT; battler++) { if (battler != gBattleAnimAttacker && battler != (gBattleAnimAttacker ^ 2) && IsBattlerSpriteVisible(battler)) { - spriteId = CreateSprite(&gUnknown_08596DB8, baseX, baseY, 55); + spriteId = CreateSprite(&gDestinyBondWhiteShadowSpriteTemplate, baseX, baseY, 55); if (spriteId != MAX_SPRITES) { x = GetBattlerSpriteCoord(battler, 2); @@ -829,7 +834,7 @@ void sub_81123C4(u8 taskId) gSprites[spriteId].data[4] = gBattleAnimArgs[1]; gSprites[spriteId].data[5] = x; gSprites[spriteId].data[6] = y; - gSprites[spriteId].callback = sub_8112384; + gSprites[spriteId].callback = AnimDestinyBondWhiteShadow_Step; task->data[task->data[12] + 13] = spriteId; task->data[12]++; @@ -839,7 +844,7 @@ void sub_81123C4(u8 taskId) } else { - spriteId = CreateSprite(&gUnknown_08596DB8, baseX, baseY, 55); + spriteId = CreateSprite(&gDestinyBondWhiteShadowSpriteTemplate, baseX, baseY, 55); if (spriteId != MAX_SPRITES) { x = 48; @@ -851,17 +856,17 @@ void sub_81123C4(u8 taskId) gSprites[spriteId].data[4] = gBattleAnimArgs[1]; gSprites[spriteId].data[5] = x; gSprites[spriteId].data[6] = y; - gSprites[spriteId].callback = sub_8112384; + gSprites[spriteId].callback = AnimDestinyBondWhiteShadow_Step; task->data[13] = spriteId; task->data[12] = 1; } } - task->func = sub_81125E0; + task->func = AnimTask_DestinyBondWhiteShadow_Step; } -static void sub_81125E0(u8 taskId) +static void AnimTask_DestinyBondWhiteShadow_Step(u8 taskId) { u16 i; struct Task *task = &gTasks[taskId]; @@ -938,7 +943,7 @@ static void sub_81125E0(u8 taskId) } } -void sub_8112758(u8 taskId) +void AnimTask_CurseStretchingBlackBg(u8 taskId) { s16 startX, startY; s16 leftDistance, topDistance, bottomDistance, rightDistance; @@ -971,10 +976,10 @@ void sub_8112758(u8 taskId) gTasks[taskId].data[4] = bottomDistance; gTasks[taskId].data[5] = startX; gTasks[taskId].data[6] = startY; - gTasks[taskId].func = sub_811280C; + gTasks[taskId].func = AnimTask_CurseStretchingBlackBg_Step1; } -static void sub_811280C(u8 taskId) +static void AnimTask_CurseStretchingBlackBg_Step1(u8 taskId) { s16 step; s16 leftDistance, rightDistance, topDistance, bottomDistance; @@ -1006,14 +1011,14 @@ static void sub_811280C(u8 taskId) bottom = 112; selectedPalettes = sub_80A75AC(1, 0, 0, 0, 0, 0, 0); BeginNormalPaletteFade(selectedPalettes, 0, 16, 16, RGB(0, 0, 0)); - gTasks[taskId].func = sub_8112994; + gTasks[taskId].func = AnimTask_CurseStretchingBlackBg_Step2; } gBattle_WIN0H = (left << 8) | right; gBattle_WIN0V = (top << 8) | bottom; } -static void sub_8112994(u8 taskId) +static void AnimTask_CurseStretchingBlackBg_Step2(u8 taskId) { if (!gPaletteFade.active) { @@ -1029,7 +1034,7 @@ static void sub_8112994(u8 taskId) } } -static void sub_81129F0(struct Sprite *sprite) +static void AnimCurseNail(struct Sprite *sprite) { s16 xDelta; s16 xDelta2; @@ -1050,10 +1055,10 @@ static void sub_81129F0(struct Sprite *sprite) sprite->pos1.x += xDelta; sprite->data[1] = xDelta2; sprite->data[0] = 60; - sprite->callback = sub_8112A4C; + sprite->callback = AnimCurseNail_Step1; } -static void sub_8112A4C(struct Sprite *sprite) +static void AnimCurseNail_Step1(struct Sprite *sprite) { u16 var0; @@ -1074,7 +1079,7 @@ static void sub_8112A4C(struct Sprite *sprite) { sprite->data[0] = 30; sprite->callback = WaitAnimForDuration; - StoreSpriteCallbackInData6(sprite, sub_8112ACC); + StoreSpriteCallbackInData6(sprite, AnimCurseNail_Step2); } else { @@ -1084,7 +1089,7 @@ static void sub_8112A4C(struct Sprite *sprite) } } -static void sub_8112ACC(struct Sprite *sprite) +static void AnimCurseNail_Step2(struct Sprite *sprite) { if (sprite->data[0] == 0) { @@ -1105,13 +1110,13 @@ static void sub_8112ACC(struct Sprite *sprite) SetGpuReg(REG_OFFSET_BLDALPHA, (16 - sprite->data[2]) | (sprite->data[2] << 8)); if (sprite->data[2] == 16) { - sprite->invisible = 1; - sprite->callback = sub_8112B44; + sprite->invisible = TRUE; + sprite->callback = AnimCurseNail_End; } } } -static void sub_8112B44(struct Sprite *sprite) +static void AnimCurseNail_End(struct Sprite *sprite) { SetGpuReg(REG_OFFSET_BLDCNT, 0); SetGpuReg(REG_OFFSET_BLDALPHA, 0); @@ -1120,7 +1125,7 @@ static void sub_8112B44(struct Sprite *sprite) DestroyAnimSprite(sprite); } -static void sub_8112B78(struct Sprite *sprite) +static void AnimGhostStatusSprite(struct Sprite *sprite) { u16 coeffB; u16 coeffA; @@ -1156,20 +1161,20 @@ static void sub_8112B78(struct Sprite *sprite) sprite->data[6] = BLDALPHA_BLEND(coeffA, coeffB); if (coeffB == 16 && coeffA == 0) { - sprite->invisible = 1; - sprite->callback = sub_8112C4C; + sprite->invisible = TRUE; + sprite->callback = AnimGhostStatusSprite_Step; } } } -static void sub_8112C4C(struct Sprite *sprite) +static void AnimGhostStatusSprite_Step(struct Sprite *sprite) { SetGpuReg(REG_OFFSET_BLDCNT, 0); SetGpuReg(REG_OFFSET_BLDALPHA, 0); DestroyAnimSprite(sprite); } -void sub_8112C6C(u8 taskId) +void AnimTask_GrudgeFlames(u8 taskId) { struct Task *task = &gTasks[taskId]; @@ -1186,10 +1191,10 @@ void sub_8112C6C(u8 taskId) SetGpuReg(REG_OFFSET_BLDCNT, (BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_ALL)); SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(0, 0x10)); task->data[8] = 0; - task->func = sub_8112D10; + task->func = AnimTask_GrudgeFlames_Step; } -static void sub_8112D10(u8 taskId) +static void AnimTask_GrudgeFlames_Step(u8 taskId) { u16 i; u8 spriteId; @@ -1200,7 +1205,7 @@ static void sub_8112D10(u8 taskId) case 0: for (i = 0; i < 6; i++) { - spriteId = CreateSprite(&gUnknown_08596E30, task->data[9], task->data[10], task->data[6]); + spriteId = CreateSprite(&gGrudgeFlameSpriteTemplate, task->data[9], task->data[10], task->data[6]); if (spriteId != MAX_SPRITES) { gSprites[spriteId].data[0] = taskId; @@ -1274,7 +1279,7 @@ static void sub_8112D10(u8 taskId) } } -static void sub_8112E9C(struct Sprite *sprite) +static void AnimGrudgeFlame(struct Sprite *sprite) { u16 index; @@ -1304,7 +1309,7 @@ static void sub_8112E9C(struct Sprite *sprite) static void sub_8112F60(struct Sprite *sprite) { - sprite->invisible = 1; + sprite->invisible = TRUE; sprite->data[5] = gBattlerSpriteIds[gBattleAnimAttacker]; sprite->data[0] = 128; sprite->data[1] = 10; diff --git a/src/ground.c b/src/battle_anim_ground.c similarity index 65% rename from src/ground.c rename to src/battle_anim_ground.c index 36dbd31f3..875ecbd75 100644 --- a/src/ground.c +++ b/src/battle_anim_ground.c @@ -6,72 +6,72 @@ #include "trig.h" #include "constants/rgb.h" -void AnimBonemerangProjectile(struct Sprite *); -void AnimBoneHitProjectile(struct Sprite *); -void AnimDirtScatter(struct Sprite *); -void AnimMudSportDirt(struct Sprite *); -void AnimFissureDirtPlumeParticle(struct Sprite *); -void AnimDigDirtMound(struct Sprite *); -static void AnimBonemerangProjectileStep(struct Sprite *); -static void AnimBonemerangProjectileEnd(struct Sprite *); +static void AnimBonemerangProjectile(struct Sprite *); +static void AnimBoneHitProjectile(struct Sprite *); +static void AnimDirtScatter(struct Sprite *); +static void AnimMudSportDirt(struct Sprite *); +static void AnimDirtPlumeParticle(struct Sprite *); +static void AnimDirtPlumeParticle_Step(struct Sprite *); +static void AnimDigDirtMound(struct Sprite *); +static void AnimBonemerangProjectile_Step(struct Sprite *); +static void AnimBonemerangProjectile_End(struct Sprite *); static void AnimMudSportDirtRising(struct Sprite *); static void AnimMudSportDirtFalling(struct Sprite *); -static void sub_8114CFC(u8); -static void sub_8114EB4(u8); -static void sub_8114F54(u8); -static void sub_8114FD8(u8); +static void AnimTask_DigBounceMovement(u8); +static void AnimTask_DigEndBounceMovementSetInvisible(u8); +static void AnimTask_DigSetVisibleUnderground(u8); +static void AnimTask_DigRiseUpFromHole(u8); static void sub_81150E0(u8, s16, s16); -static void AnimFissureDirtPlumeParticleStep(struct Sprite *); -static void sub_81153AC(u8); -static void sub_81154A4(u8); -static void sub_8115588(struct Task *); +static void AnimTask_ShakeTerrain(u8); +static void AnimTask_ShakeBattlers(u8); +static void SetBattlersXOffsetForShake(struct Task *); static void sub_81156D0(u8); -const union AffineAnimCmd gUnknown_08597150[] = +static const union AffineAnimCmd sAffineAnim_Bonemerang[] = { AFFINEANIMCMD_FRAME(0x0, 0x0, 15, 1), AFFINEANIMCMD_JUMP(0), }; -const union AffineAnimCmd gUnknown_08597160[] = +static const union AffineAnimCmd sAffineAnim_SpinningBone[] = { AFFINEANIMCMD_FRAME(0x0, 0x0, 20, 1), AFFINEANIMCMD_JUMP(0), }; -const union AffineAnimCmd *const gUnknown_08597170[] = +static const union AffineAnimCmd *const sAffineAnims_Bonemerang[] = { - gUnknown_08597150, + sAffineAnim_Bonemerang, }; -const union AffineAnimCmd *const gUnknown_08597174[] = +static const union AffineAnimCmd *const sAffineAnims_SpinningBone[] = { - gUnknown_08597160, + sAffineAnim_SpinningBone, }; -const struct SpriteTemplate gUnknown_08597178 = +const struct SpriteTemplate gBonemerangSpriteTemplate = { .tileTag = ANIM_TAG_BONE, .paletteTag = ANIM_TAG_BONE, .oam = &gOamData_AffineNormal_ObjNormal_32x32, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_08597170, + .affineAnims = sAffineAnims_Bonemerang, .callback = AnimBonemerangProjectile, }; -const struct SpriteTemplate gUnknown_08597190 = +const struct SpriteTemplate gSpinningBoneSpriteTemplate = { .tileTag = ANIM_TAG_BONE, .paletteTag = ANIM_TAG_BONE, .oam = &gOamData_AffineNormal_ObjNormal_32x32, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_08597174, + .affineAnims = sAffineAnims_SpinningBone, .callback = AnimBoneHitProjectile, }; -const struct SpriteTemplate gUnknown_085971A8 = +const struct SpriteTemplate gSandAttackDirtSpriteTemplate = { .tileTag = ANIM_TAG_MUD_SAND, .paletteTag = ANIM_TAG_MUD_SAND, @@ -82,29 +82,29 @@ const struct SpriteTemplate gUnknown_085971A8 = .callback = AnimDirtScatter, }; -const union AnimCmd gUnknown_085971C0[] = +static const union AnimCmd sAnim_MudSlapMud[] = { ANIMCMD_FRAME(1, 1), ANIMCMD_END, }; -const union AnimCmd *const gUnknown_085971C8[] = +static const union AnimCmd *const sAnims_MudSlapMud[] = { - gUnknown_085971C0, + sAnim_MudSlapMud, }; -const struct SpriteTemplate gUnknown_085971CC = +const struct SpriteTemplate gMudSlapMudSpriteTemplate = { .tileTag = ANIM_TAG_MUD_SAND, .paletteTag = ANIM_TAG_MUD_SAND, .oam = &gOamData_AffineOff_ObjNormal_16x16, - .anims = gUnknown_085971C8, + .anims = sAnims_MudSlapMud, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, .callback = AnimDirtScatter, }; -const struct SpriteTemplate gUnknown_085971E4 = +const struct SpriteTemplate gMudsportMudSpriteTemplate = { .tileTag = ANIM_TAG_MUD_SAND, .paletteTag = ANIM_TAG_MUD_SAND, @@ -115,7 +115,7 @@ const struct SpriteTemplate gUnknown_085971E4 = .callback = AnimMudSportDirt, }; -const struct SpriteTemplate gUnknown_085971FC = +const struct SpriteTemplate gDirtPlumeSpriteTemplate = { .tileTag = ANIM_TAG_MUD_SAND, .paletteTag = ANIM_TAG_MUD_SAND, @@ -123,10 +123,10 @@ const struct SpriteTemplate gUnknown_085971FC = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = AnimFissureDirtPlumeParticle, + .callback = AnimDirtPlumeParticle, }; -const struct SpriteTemplate gUnknown_08597214 = +const struct SpriteTemplate gDirtMoundSpriteTemplate = { .tileTag = ANIM_TAG_DIRT_MOUND, .paletteTag = ANIM_TAG_DIRT_MOUND, @@ -139,7 +139,7 @@ const struct SpriteTemplate gUnknown_08597214 = // Moves a bone projectile towards the target mon, which moves like // a boomerang. After hitting the target mon, it comes back to the user. -void AnimBonemerangProjectile(struct Sprite *sprite) +static void AnimBonemerangProjectile(struct Sprite *sprite) { sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2); sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3); @@ -148,10 +148,10 @@ void AnimBonemerangProjectile(struct Sprite *sprite) sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3); sprite->data[5] = -40; InitAnimArcTranslation(sprite); - sprite->callback = AnimBonemerangProjectileStep; + sprite->callback = AnimBonemerangProjectile_Step; } -static void AnimBonemerangProjectileStep(struct Sprite *sprite) +static void AnimBonemerangProjectile_Step(struct Sprite *sprite) { if (TranslateAnimHorizontalArc(sprite)) { @@ -164,11 +164,11 @@ static void AnimBonemerangProjectileStep(struct Sprite *sprite) sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimAttacker, 3); sprite->data[5] = 40; InitAnimArcTranslation(sprite); - sprite->callback = AnimBonemerangProjectileEnd; + sprite->callback = AnimBonemerangProjectile_End; } } -static void AnimBonemerangProjectileEnd(struct Sprite *sprite) +static void AnimBonemerangProjectile_End(struct Sprite *sprite) { if (TranslateAnimHorizontalArc(sprite)) DestroyAnimSprite(sprite); @@ -181,7 +181,7 @@ static void AnimBonemerangProjectileEnd(struct Sprite *sprite) // arg 2: target x pixel offset // arg 3: target y pixel offset // arg 4: duration -void AnimBoneHitProjectile(struct Sprite *sprite) +static void AnimBoneHitProjectile(struct Sprite *sprite) { InitSpritePosToAnimTarget(sprite, TRUE); if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER) @@ -200,7 +200,7 @@ void AnimBoneHitProjectile(struct Sprite *sprite) // arg 2: duration // arg 3: target x pixel offset // arg 4: target y pixel offset -void AnimDirtScatter(struct Sprite *sprite) +static void AnimDirtScatter(struct Sprite *sprite) { u8 targetXPos, targetYPos; s16 xOffset, yOffset; @@ -229,7 +229,7 @@ void AnimDirtScatter(struct Sprite *sprite) // arg 0: 0 = dirt is rising into the air, 1 = dirt is falling down // arg 1: initial x pixel offset // arg 2: initial y pixel offset -void AnimMudSportDirt(struct Sprite *sprite) +static void AnimMudSportDirt(struct Sprite *sprite) { sprite->oam.tileNum++; if (gBattleAnimArgs[0] == 0) @@ -285,19 +285,19 @@ static void AnimMudSportDirtFalling(struct Sprite *sprite) } } -void sub_8114CBC(u8 taskId) +void AnimTask_DigDownMovement(u8 taskId) { struct Task *task = &gTasks[taskId]; - if (gBattleAnimArgs[0] == 0) - task->func = sub_8114CFC; + if (gBattleAnimArgs[0] == FALSE) + task->func = AnimTask_DigBounceMovement; else - task->func = sub_8114EB4; + task->func = AnimTask_DigEndBounceMovementSetInvisible; task->func(taskId); } -static void sub_8114CFC(u8 taskId) +static void AnimTask_DigBounceMovement(u8 taskId) { u8 var0; struct Task *task = &gTasks[taskId]; @@ -305,7 +305,7 @@ static void sub_8114CFC(u8 taskId) switch (task->data[0]) { case 0: - task->data[10] = GetAnimBattlerSpriteId(0); + task->data[10] = GetAnimBattlerSpriteId(ANIM_ATTACKER); task->data[11] = GetBattlerSpriteBGPriorityRank(gBattleAnimAttacker); if (task->data[11] == 1) { @@ -324,7 +324,7 @@ static void sub_8114CFC(u8 taskId) if (task->data[14] < 0) task->data[14] = 0; - gSprites[task->data[10]].invisible = 1; + gSprites[task->data[10]].invisible = TRUE; task->data[0]++; break; case 1: @@ -363,15 +363,15 @@ static void sub_8114CFC(u8 taskId) break; case 4: DestroyAnimVisualTask(taskId); - gSprites[task->data[10]].invisible = 1; + gSprites[task->data[10]].invisible = TRUE; break; } } -static void sub_8114EB4(u8 taskId) +static void AnimTask_DigEndBounceMovementSetInvisible(u8 taskId) { - u8 spriteId = GetAnimBattlerSpriteId(0); - gSprites[spriteId].invisible = 1; + u8 spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER); + gSprites[spriteId].invisible = TRUE; gSprites[spriteId].pos2.x = 0; gSprites[spriteId].pos2.y = 0; @@ -383,27 +383,27 @@ static void sub_8114EB4(u8 taskId) DestroyAnimVisualTask(taskId); } -void sub_8114F14(u8 taskId) +void AnimTask_DigUpMovement(u8 taskId) { struct Task *task = &gTasks[taskId]; - if (gBattleAnimArgs[0] == 0) - task->func = sub_8114F54; + if (gBattleAnimArgs[0] == FALSE) + task->func = AnimTask_DigSetVisibleUnderground; else - task->func = sub_8114FD8; + task->func = AnimTask_DigRiseUpFromHole; task->func(taskId); } -static void sub_8114F54(u8 taskId) +static void AnimTask_DigSetVisibleUnderground(u8 taskId) { struct Task *task = &gTasks[taskId]; switch (task->data[0]) { case 0: - task->data[10] = GetAnimBattlerSpriteId(0); - gSprites[task->data[10]].invisible = 0; + task->data[10] = GetAnimBattlerSpriteId(ANIM_ATTACKER); + gSprites[task->data[10]].invisible = FALSE; gSprites[task->data[10]].pos2.x = 0; gSprites[task->data[10]].pos2.y = 160 - gSprites[task->data[10]].pos1.y; task->data[0]++; @@ -413,7 +413,7 @@ static void sub_8114F54(u8 taskId) } } -static void sub_8114FD8(u8 taskId) +static void AnimTask_DigRiseUpFromHole(u8 taskId) { u8 var0; struct Task *task = &gTasks[taskId]; @@ -421,7 +421,7 @@ static void sub_8114FD8(u8 taskId) switch (task->data[0]) { case 0: - task->data[10] = GetAnimBattlerSpriteId(0); + task->data[10] = GetAnimBattlerSpriteId(ANIM_ATTACKER); task->data[11] = GetBattlerSpriteBGPriorityRank(gBattleAnimAttacker); if (task->data[11] == 1) task->data[12] = gBattle_BG1_X; @@ -501,7 +501,7 @@ static void sub_81150E0(u8 useBG1, s16 y, s16 endY) // arg 3: target y offset // arg 4: wave amplitude // arg 5: duration -void AnimFissureDirtPlumeParticle(struct Sprite *sprite) +void AnimDirtPlumeParticle(struct Sprite *sprite) { s8 battler; s16 xOffset; @@ -525,10 +525,10 @@ void AnimFissureDirtPlumeParticle(struct Sprite *sprite) sprite->data[4] = sprite->pos1.y + gBattleAnimArgs[3]; sprite->data[5] = gBattleAnimArgs[4]; InitAnimArcTranslation(sprite); - sprite->callback = AnimFissureDirtPlumeParticleStep; + sprite->callback = AnimDirtPlumeParticle_Step; } -static void AnimFissureDirtPlumeParticleStep(struct Sprite *sprite) +static void AnimDirtPlumeParticle_Step(struct Sprite *sprite) { if (TranslateAnimHorizontalArc(sprite)) DestroyAnimSprite(sprite); @@ -540,7 +540,7 @@ static void AnimFissureDirtPlumeParticleStep(struct Sprite *sprite) // arg 0: which mon (0 = attacker, 1 = target) // arg 1: oam tile num (0 = left half of image, 1 = right half of image) // arg 2: duration -void AnimDigDirtMound(struct Sprite *sprite) +static void AnimDigDirtMound(struct Sprite *sprite) { s8 battler; @@ -557,168 +557,192 @@ void AnimDigDirtMound(struct Sprite *sprite) sprite->callback = WaitAnimForDuration; } -void sub_81152DC(u8 taskId) + +#define tState data[0] +#define tDelay data[1] +#define tTimer data[2] +#define tMaxTime data[3] +#define tbattlerSpriteIds(i) data[9 + (i)] +#define tNumBattlers data[13] // AnimTask_ShakeBattlers +#define tInitialX data[13] // AnimTask_ShakeTerrain +#define tHorizOffset data[14] +#define tInitHorizOffset data[15] + +// Shakes battler(s) or the battle terrain back and forth horizontally. Used by e.g. Earthquake, Eruption +// arg0: What to shake. 0-3 for any specific battler, MAX_BATTLERS_COUNT for all battlers, MAX_BATTLERS_COUNT + 1 for the terrain +// arg1: Shake intensity, used to calculate horizontal pixel offset (if 0, use move power instead) +// arg2: Length of time to shake for +void AnimTask_HorizontalShake(u8 taskId) { u16 i; struct Task *task = &gTasks[taskId]; - if (gBattleAnimArgs[1]) - task->data[14] = task->data[15] = gBattleAnimArgs[1] + 3; + if (gBattleAnimArgs[1] != 0) + task->tHorizOffset = task->tInitHorizOffset = gBattleAnimArgs[1] + 3; else - task->data[14] = task->data[15] = (gAnimMovePower / 10) + 3; + task->tHorizOffset = task->tInitHorizOffset = (gAnimMovePower / 10) + 3; - task->data[3] = gBattleAnimArgs[2]; + task->tMaxTime = gBattleAnimArgs[2]; switch (gBattleAnimArgs[0]) { - case 5: - task->data[13] = gBattle_BG3_X; - task->func = sub_81153AC; + case MAX_BATTLERS_COUNT + 1: // Shake terrain + task->tInitialX = gBattle_BG3_X; + task->func = AnimTask_ShakeTerrain; break; - case 4: - task->data[13] = 0; + case MAX_BATTLERS_COUNT: // Shake all battlers + task->tNumBattlers = 0; for (i = 0; i < MAX_BATTLERS_COUNT; i++) { if (IsBattlerSpriteVisible(i)) { - task->data[task->data[13] + 9] = gBattlerSpriteIds[i]; - task->data[13]++; + task->tbattlerSpriteIds(task->tNumBattlers) = gBattlerSpriteIds[i]; + task->tNumBattlers++; } } - task->func = sub_81154A4; + task->func = AnimTask_ShakeBattlers; break; - default: - task->data[9] = GetAnimBattlerSpriteId(gBattleAnimArgs[0]); - if (task->data[9] == 0xFF) + default: // Shake specific battler + task->tbattlerSpriteIds(0) = GetAnimBattlerSpriteId(gBattleAnimArgs[0]); + if (task->tbattlerSpriteIds(0) == 0xFF) { DestroyAnimVisualTask(taskId); } else { - task->data[13] = 1; - task->func = sub_81154A4; + task->tNumBattlers = 1; + task->func = AnimTask_ShakeBattlers; } - break; } } -static void sub_81153AC(u8 taskId) +static void AnimTask_ShakeTerrain(u8 taskId) { struct Task *task = &gTasks[taskId]; - switch (task->data[0]) + switch (task->tState) { case 0: - if (++task->data[1] > 1) + if (++task->tDelay > 1) { - task->data[1] = 0; - if ((task->data[2] & 1) == 0) - gBattle_BG3_X = task->data[13] + task->data[15]; + task->tDelay = 0; + if ((task->tTimer & 1) == 0) + gBattle_BG3_X = task->tInitialX + task->tInitHorizOffset; else - gBattle_BG3_X = task->data[13] - task->data[15]; + gBattle_BG3_X = task->tInitialX - task->tInitHorizOffset; - if (++task->data[2] == task->data[3]) + if (++task->tTimer == task->tMaxTime) { - task->data[2] = 0; - task->data[14]--; - task->data[0]++; + task->tTimer = 0; + task->tHorizOffset--; + task->tState++; } } break; case 1: - if (++task->data[1] > 1) + if (++task->tDelay > 1) { - task->data[1] = 0; - if ((task->data[2] & 1) == 0) - gBattle_BG3_X = task->data[13] + task->data[14]; + task->tDelay = 0; + if ((task->tTimer & 1) == 0) + gBattle_BG3_X = task->tInitialX + task->tHorizOffset; else - gBattle_BG3_X = task->data[13] - task->data[14]; + gBattle_BG3_X = task->tInitialX - task->tHorizOffset; - if (++task->data[2] == 4) + if (++task->tTimer == 4) { - task->data[2] = 0; - if (--task->data[14] == 0) - task->data[0]++; + task->tTimer = 0; + if (--task->tHorizOffset == 0) + task->tState++; } } break; case 2: - gBattle_BG3_X = task->data[13]; + gBattle_BG3_X = task->tInitialX; DestroyAnimVisualTask(taskId); break; } } -static void sub_81154A4(u8 taskId) +static void AnimTask_ShakeBattlers(u8 taskId) { u16 i; struct Task *task = &gTasks[taskId]; - switch (task->data[0]) + switch (task->tState) { case 0: - if (++task->data[1] > 1) + if (++task->tDelay > 1) { - task->data[1] = 0; - sub_8115588(task); - if (++task->data[2] == task->data[3]) + task->tDelay = 0; + SetBattlersXOffsetForShake(task); + if (++task->tTimer == task->tMaxTime) { - task->data[2] = 0; - task->data[14]--; - task->data[0]++; + task->tTimer = 0; + task->tHorizOffset--; + task->tState++; } } break; case 1: - if (++task->data[1] > 1) + if (++task->tDelay > 1) { - task->data[1] = 0; - sub_8115588(task); - if (++task->data[2] == 4) + task->tDelay = 0; + SetBattlersXOffsetForShake(task); + if (++task->tTimer == 4) { - task->data[2] = 0; - if (--task->data[14] == 0) - task->data[0]++; + task->tTimer = 0; + if (--task->tHorizOffset == 0) + task->tState++; } } break; case 2: - for (i = 0; i < task->data[13]; i++) - gSprites[task->data[9 + i]].pos2.x = 0; + for (i = 0; i < task->tNumBattlers; i++) + gSprites[task->tbattlerSpriteIds(i)].pos2.x = 0; DestroyAnimVisualTask(taskId); break; } } -static void sub_8115588(struct Task *task) +static void SetBattlersXOffsetForShake(struct Task *task) { u16 i; u16 xOffset; - if ((task->data[2] & 1) == 0) - xOffset = (task->data[14] / 2) + (task->data[14] & 1); + if ((task->tTimer & 1) == 0) + xOffset = (task->tHorizOffset / 2) + (task->tHorizOffset & 1); else - xOffset = -(task->data[14] / 2); + xOffset = -(task->tHorizOffset / 2); - for (i = 0; i < task->data[13]; i++) + for (i = 0; i < task->tNumBattlers; i++) { - gSprites[task->data[9 + i]].pos2.x = xOffset; + gSprites[task->tbattlerSpriteIds(i)].pos2.x = xOffset; } } +#undef tState +#undef tDelay +#undef tTimer +#undef tMaxTime +#undef tbattlerSpriteIds +#undef tNumBattlers +#undef tInitialX +#undef tHorizOffset +#undef tInitHorizOffset + void AnimTask_IsPowerOver99(u8 taskId) { gBattleAnimArgs[15] = gAnimMovePower > 99; DestroyAnimVisualTask(taskId); } -void sub_8115628(u8 taskId) +void AnimTask_PositionFissureBgOnBattler(u8 taskId) { struct Task *newTask; - u8 battler = (gBattleAnimArgs[0] & 1) ? gBattleAnimTarget : gBattleAnimAttacker; + u8 battler = (gBattleAnimArgs[0] & ANIM_TARGET) ? gBattleAnimTarget : gBattleAnimAttacker; - if (gBattleAnimArgs[0] > 1) + if (gBattleAnimArgs[0] > ANIM_TARGET) battler ^= 2; newTask = &gTasks[CreateTask(sub_81156D0, gBattleAnimArgs[1])]; diff --git a/src/ice.c b/src/battle_anim_ice.c similarity index 78% rename from src/ice.c rename to src/battle_anim_ice.c index cc8b1d333..24ddf3b32 100644 --- a/src/ice.c +++ b/src/battle_anim_ice.c @@ -14,54 +14,54 @@ #include "constants/rgb.h" struct HailStruct { - s32 unk0:10; - s32 unk1:10; - s32 unk2:8; + s32 x:10; + s32 y:10; + s32 bPosition:8; s32 unk3:4; }; static void sub_810B6C4(struct Sprite *); -void sub_810B848(struct Sprite *); -void AnimIcePunchSwirlingParticle(struct Sprite *); -void AnimIceBeamParticle(struct Sprite *); -void AnimIceEffectParticle(struct Sprite *); -void AnimFlickerIceEffectParticle(struct Sprite *); -void AnimSwirlingSnowball_Step1(struct Sprite *); -void AnimSwirlingSnowball_Step2(struct Sprite *); -void AnimSwirlingSnowball_Step3(struct Sprite *); -void AnimSwirlingSnowball_End(struct Sprite *); -void AnimMoveParticleBeyondTarget(struct Sprite *); -void AnimWiggleParticleTowardsTarget(struct Sprite *); -void AnimWaveFromCenterOfTarget(struct Sprite *); -void InitSwirlingFogAnim(struct Sprite *); -void AnimSwirlingFogAnim(struct Sprite *); -void AnimThrowMistBall(struct Sprite *); -void InitPoisonGasCloudAnim(struct Sprite *); -void MovePoisonGasCloud(struct Sprite *); -void AnimHailBegin(struct Sprite *); -void AnimHailContinue(struct Sprite *); -void InitIceBallAnim(struct Sprite *); -void AnimThrowIceBall(struct Sprite *); -void InitIceBallParticle(struct Sprite *); -void AnimIceBallParticle(struct Sprite *); -void AnimTask_Haze2(u8); -void AnimTask_OverlayFogTiles(u8); -void AnimTask_Hail2(u8); -bool8 GenerateHailParticle(u8 hailStructId, u8 affineAnimNum, u8 taskId, u8 c); +static void sub_810B848(struct Sprite *); +static void AnimIcePunchSwirlingParticle(struct Sprite *); +static void AnimIceBeamParticle(struct Sprite *); +static void AnimIceEffectParticle(struct Sprite *); +static void AnimFlickerIceEffectParticle(struct Sprite *); +static void AnimSwirlingSnowball(struct Sprite *); +static void AnimSwirlingSnowball_Step1(struct Sprite *); +static void AnimSwirlingSnowball_Step2(struct Sprite *); +static void AnimSwirlingSnowball_End(struct Sprite *); +static void AnimMoveParticleBeyondTarget(struct Sprite *); +static void AnimWiggleParticleTowardsTarget(struct Sprite *); +static void AnimWaveFromCenterOfTarget(struct Sprite *); +static void InitSwirlingFogAnim(struct Sprite *); +static void AnimSwirlingFogAnim(struct Sprite *); +static void AnimThrowMistBall(struct Sprite *); +static void InitPoisonGasCloudAnim(struct Sprite *); +static void MovePoisonGasCloud(struct Sprite *); +static void AnimHailBegin(struct Sprite *); +static void AnimHailContinue(struct Sprite *); +static void InitIceBallAnim(struct Sprite *); +static void AnimThrowIceBall(struct Sprite *); +static void InitIceBallParticle(struct Sprite *); +static void AnimIceBallParticle(struct Sprite *); +static void AnimTask_Haze2(u8); +static void AnimTask_OverlayFogTiles(u8); +static void AnimTask_Hail2(u8); +static bool8 GenerateHailParticle(u8 hailStructId, u8 affineAnimNum, u8 taskId, u8 c); -const union AnimCmd gUnknown_08595A48[] = +static const union AnimCmd gUnknown_08595A48[] = { ANIMCMD_FRAME(0, 5, .hFlip = TRUE), ANIMCMD_FRAME(1, 5, .hFlip = TRUE), ANIMCMD_JUMP(0), }; -const union AnimCmd *const gUnknown_08595A54[] = +static const union AnimCmd *const gUnknown_08595A54[] = { gUnknown_08595A48, }; -// unknown sprite template +// Unused const struct SpriteTemplate gUnknown_08595A58 = { .tileTag = ANIM_TAG_ICE_CRYSTALS, @@ -73,140 +73,141 @@ const struct SpriteTemplate gUnknown_08595A58 = .callback = sub_810B6C4, }; -const union AnimCmd gUnknown_08595A70[] = +static const union AnimCmd gUnknown_08595A70[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -const union AnimCmd gUnknown_08595A78[] = +static const union AnimCmd sAnim_IceCrystalLarge[] = { ANIMCMD_FRAME(4, 1), ANIMCMD_END, }; -const union AnimCmd gUnknown_08595A80[] = +static const union AnimCmd sAnim_IceCrystalSmall[] = { ANIMCMD_FRAME(6, 1), ANIMCMD_END, }; -const union AnimCmd gUnknown_08595A88[] = +static const union AnimCmd sAnim_Snowball[] = { ANIMCMD_FRAME(7, 1), ANIMCMD_END, }; -const union AnimCmd gUnknown_08595A90[] = +static const union AnimCmd sAnim_BlizzardIceCrystal[] = { ANIMCMD_FRAME(8, 1), ANIMCMD_END, }; -const union AnimCmd gUnknown_08595A98[] = +static const union AnimCmd sAnim_SmallBubblePair[] = { ANIMCMD_FRAME(12, 6), ANIMCMD_FRAME(13, 6), ANIMCMD_JUMP(0), }; -const union AnimCmd *const gUnknown_08595AA4[] = +// Unused +static const union AnimCmd *const gUnknown_08595AA4[] = { gUnknown_08595A70, }; -const union AnimCmd *const gUnknown_08595AA8[] = +static const union AnimCmd *const sAnims_IceCrystalLarge[] = { - gUnknown_08595A78, + sAnim_IceCrystalLarge, }; -const union AnimCmd *const gUnknown_08595AAC[] = +static const union AnimCmd *const sAnims_IceCrystalSmall[] = { - gUnknown_08595A80, + sAnim_IceCrystalSmall, }; -const union AnimCmd *const gUnknown_08595AB0[] = +static const union AnimCmd *const sAnims_Snowball[] = { - gUnknown_08595A88, + sAnim_Snowball, }; -const union AnimCmd *const gUnknown_08595AB4[] = +static const union AnimCmd *const sAnims_BlizzardIceCrystal[] = { - gUnknown_08595A90, + sAnim_BlizzardIceCrystal, }; -const union AnimCmd *const gUnknown_08595AB8[] = +const union AnimCmd *const gAnims_SmallBubblePair[] = { - gUnknown_08595A98, + sAnim_SmallBubblePair, }; -const union AffineAnimCmd gUnknown_08595ABC[] = +static const union AffineAnimCmd sAffineAnim_IceCrystalSpiralInwardLarge[] = { AFFINEANIMCMD_FRAME(0x0, 0x0, 40, 1), AFFINEANIMCMD_JUMP(0), }; -const union AffineAnimCmd *const gUnknown_08595ACC[] = +static const union AffineAnimCmd *const sAffineAnims_IceCrystalSpiralInwardLarge[] = { - gUnknown_08595ABC, + sAffineAnim_IceCrystalSpiralInwardLarge, }; -const struct SpriteTemplate gUnknown_08595AD0 = +const struct SpriteTemplate gIceCrystalSpiralInwardLarge = { .tileTag = ANIM_TAG_ICE_CRYSTALS, .paletteTag = ANIM_TAG_ICE_CRYSTALS, .oam = &gOamData_AffineDouble_ObjBlend_8x16, - .anims = gUnknown_08595AA8, + .anims = sAnims_IceCrystalLarge, .images = NULL, - .affineAnims = gUnknown_08595ACC, + .affineAnims = sAffineAnims_IceCrystalSpiralInwardLarge, .callback = AnimIcePunchSwirlingParticle, }; -const struct SpriteTemplate gUnknown_08595AE8 = +const struct SpriteTemplate gIceCrystalSpiralInwardSmall = { .tileTag = ANIM_TAG_ICE_CRYSTALS, .paletteTag = ANIM_TAG_ICE_CRYSTALS, .oam = &gOamData_AffineOff_ObjBlend_8x8, - .anims = gUnknown_08595AAC, + .anims = sAnims_IceCrystalSmall, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, .callback = AnimIcePunchSwirlingParticle, }; -const union AffineAnimCmd gUnknown_08595B00[] = +static const union AffineAnimCmd sAffineAnim_IceBeamInnerCrystal[] = { AFFINEANIMCMD_FRAME(0x0, 0x0, 10, 1), AFFINEANIMCMD_JUMP(0), }; -const union AffineAnimCmd *const gUnknown_08595B10[] = +static const union AffineAnimCmd *const sAffineAnims_IceBeamInnerCrystal[] = { - gUnknown_08595B00, + sAffineAnim_IceBeamInnerCrystal, }; -const struct SpriteTemplate gUnknown_08595B14 = +const struct SpriteTemplate gIceBeamInnerCrystalSpriteTemplate = { .tileTag = ANIM_TAG_ICE_CRYSTALS, .paletteTag = ANIM_TAG_ICE_CRYSTALS, .oam = &gOamData_AffineNormal_ObjBlend_8x16, - .anims = gUnknown_08595AA8, + .anims = sAnims_IceCrystalLarge, .images = NULL, - .affineAnims = gUnknown_08595B10, + .affineAnims = sAffineAnims_IceBeamInnerCrystal, .callback = AnimIceBeamParticle, }; -const struct SpriteTemplate gUnknown_08595B2C = +const struct SpriteTemplate gIceBeamOuterCrystalSpriteTemplate = { .tileTag = ANIM_TAG_ICE_CRYSTALS, .paletteTag = ANIM_TAG_ICE_CRYSTALS, .oam = &gOamData_AffineOff_ObjBlend_8x8, - .anims = gUnknown_08595AAC, + .anims = sAnims_IceCrystalSmall, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, .callback = AnimIceBeamParticle, }; -const union AffineAnimCmd gUnknown_08595B44[] = +static const union AffineAnimCmd sAffineAnim_IceCrystalHit[] = { AFFINEANIMCMD_FRAME(0xCE, 0xCE, 0, 0), AFFINEANIMCMD_FRAME(0x5, 0x5, 0, 10), @@ -214,67 +215,67 @@ const union AffineAnimCmd gUnknown_08595B44[] = AFFINEANIMCMD_END, }; -const union AffineAnimCmd *const gUnknown_08595B64[] = +static const union AffineAnimCmd *const sAffineAnims_IceCrystalHit[] = { - gUnknown_08595B44, + sAffineAnim_IceCrystalHit, }; -const struct SpriteTemplate gUnknown_08595B68 = +const struct SpriteTemplate gIceCrystalHitLargeSpriteTemplate = { .tileTag = ANIM_TAG_ICE_CRYSTALS, .paletteTag = ANIM_TAG_ICE_CRYSTALS, .oam = &gOamData_AffineNormal_ObjBlend_8x16, - .anims = gUnknown_08595AA8, + .anims = sAnims_IceCrystalLarge, .images = NULL, - .affineAnims = gUnknown_08595B64, + .affineAnims = sAffineAnims_IceCrystalHit, .callback = AnimIceEffectParticle, }; -const struct SpriteTemplate gUnknown_08595B80 = +const struct SpriteTemplate gIceCrystalHitSmallSpriteTemplate = { .tileTag = ANIM_TAG_ICE_CRYSTALS, .paletteTag = ANIM_TAG_ICE_CRYSTALS, .oam = &gOamData_AffineNormal_ObjBlend_8x8, - .anims = gUnknown_08595AAC, + .anims = sAnims_IceCrystalSmall, .images = NULL, - .affineAnims = gUnknown_08595B64, + .affineAnims = sAffineAnims_IceCrystalHit, .callback = AnimIceEffectParticle, }; -const struct SpriteTemplate gUnknown_08595B98 = +const struct SpriteTemplate gSwirlingSnowballSpriteTemplate = { .tileTag = ANIM_TAG_ICE_CRYSTALS, .paletteTag = ANIM_TAG_ICE_CRYSTALS, .oam = &gOamData_AffineOff_ObjNormal_8x8, - .anims = gUnknown_08595AB0, + .anims = sAnims_Snowball, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = AnimSwirlingSnowball_Step1, + .callback = AnimSwirlingSnowball, }; -const struct SpriteTemplate gUnknown_08595BB0 = +const struct SpriteTemplate gBlizzardIceCrystalSpriteTemplate = { .tileTag = ANIM_TAG_ICE_CRYSTALS, .paletteTag = ANIM_TAG_ICE_CRYSTALS, .oam = &gOamData_AffineOff_ObjNormal_16x16, - .anims = gUnknown_08595AB4, + .anims = sAnims_BlizzardIceCrystal, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, .callback = AnimMoveParticleBeyondTarget, }; -const struct SpriteTemplate gUnknown_08595BC8 = +const struct SpriteTemplate gPowderSnowSnowballSpriteTemplate = { .tileTag = ANIM_TAG_ICE_CRYSTALS, .paletteTag = ANIM_TAG_ICE_CRYSTALS, .oam = &gOamData_AffineOff_ObjNormal_8x8, - .anims = gUnknown_08595AB0, + .anims = sAnims_Snowball, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, .callback = AnimMoveParticleBeyondTarget, }; -const union AnimCmd gUnknown_08595BE0[] = +static const union AnimCmd sAnim_IceGroundSpike[] = { ANIMCMD_FRAME(0, 5), ANIMCMD_FRAME(2, 5), @@ -286,62 +287,62 @@ const union AnimCmd gUnknown_08595BE0[] = ANIMCMD_END, }; -const union AnimCmd *const gUnknown_08595C00[] = +static const union AnimCmd *const sAnims_IceGroundSpike[] = { - gUnknown_08595BE0, + sAnim_IceGroundSpike, }; -const struct SpriteTemplate gUnknown_08595C04 = +const struct SpriteTemplate gIceGroundSpikeSpriteTemplate = { .tileTag = ANIM_TAG_ICE_SPIKES, .paletteTag = ANIM_TAG_ICE_SPIKES, .oam = &gOamData_AffineOff_ObjBlend_8x16, - .anims = gUnknown_08595C00, + .anims = sAnims_IceGroundSpike, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, .callback = AnimWaveFromCenterOfTarget, }; -const union AnimCmd gUnknown_08595C1C[] = +static const union AnimCmd sAnim_Cloud[] = { ANIMCMD_FRAME(0, 8), ANIMCMD_FRAME(8, 8), ANIMCMD_JUMP(0), }; -const union AnimCmd *const gUnknown_08595C28[] = +static const union AnimCmd *const sAnims_Cloud[] = { - gUnknown_08595C1C, + sAnim_Cloud, }; -const struct SpriteTemplate gUnknown_08595C2C = +const struct SpriteTemplate gMistCloudSpriteTemplate = { .tileTag = ANIM_TAG_MIST_CLOUD, .paletteTag = ANIM_TAG_MIST_CLOUD, .oam = &gOamData_AffineOff_ObjBlend_32x16, - .anims = gUnknown_08595C28, + .anims = sAnims_Cloud, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, .callback = InitSwirlingFogAnim, }; -const struct SpriteTemplate gUnknown_08595C44 = +const struct SpriteTemplate gSmogCloudSpriteTemplate = { .tileTag = ANIM_TAG_PURPLE_GAS_CLOUD, .paletteTag = ANIM_TAG_PURPLE_GAS_CLOUD, .oam = &gOamData_AffineOff_ObjBlend_32x16, - .anims = gUnknown_08595C28, + .anims = sAnims_Cloud, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, .callback = InitSwirlingFogAnim, }; -const u8 gUnknown_08595C5C[] = +static const u8 sUnknown_08595C5C[] = { 0, 1, 2, 2, 2, 2, 3, 4, 4, 4, 5, 6, 6, 6, 6, 7, 8, 8, 8, 9, }; -const struct SpriteTemplate gUnknown_08595C70 = +const struct SpriteTemplate gMistBallSpriteTemplate = { .tileTag = ANIM_TAG_SMALL_BUBBLES, .paletteTag = ANIM_TAG_SMALL_BUBBLES, @@ -352,101 +353,101 @@ const struct SpriteTemplate gUnknown_08595C70 = .callback = AnimThrowMistBall, }; -const u8 gUnknown_08595C88[] = +static const u8 sUnknown_08595C88[] = { 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, }; -const struct SpriteTemplate gUnknown_08595C9C = +const struct SpriteTemplate gPoisonGasCloudSpriteTemplate = { .tileTag = ANIM_TAG_PURPLE_GAS_CLOUD, .paletteTag = ANIM_TAG_PURPLE_GAS_CLOUD, .oam = &gOamData_AffineOff_ObjBlend_32x16, - .anims = gUnknown_08595C28, + .anims = sAnims_Cloud, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, .callback = InitPoisonGasCloudAnim, }; -const struct HailStruct gUnknown_08595CB4[] = +static const struct HailStruct sHailCoordData[] = { - {100, 120, 0, 2}, - {85, 120, 0, 0}, - {242, 120, 1, 1}, - {66, 120, 2, 1}, - {182, 120, 3, 0}, - {60, 120, 0, 2}, - {214, 120, 1, 0}, - {113, 120, 0, 1}, - {210, 120, 3, 1}, - {38, 120, 2, 0}, + {.x = 100, .y = 120, .bPosition = B_POSITION_PLAYER_LEFT, .unk3 = 2}, + {.x = 85, .y = 120, .bPosition = B_POSITION_PLAYER_LEFT, .unk3 = 0}, + {.x = 242, .y = 120, .bPosition = B_POSITION_OPPONENT_LEFT, .unk3 = 1}, + {.x = 66, .y = 120, .bPosition = B_POSITION_PLAYER_RIGHT, .unk3 = 1}, + {.x = 182, .y = 120, .bPosition = B_POSITION_OPPONENT_RIGHT, .unk3 = 0}, + {.x = 60, .y = 120, .bPosition = B_POSITION_PLAYER_LEFT, .unk3 = 2}, + {.x = 214, .y = 120, .bPosition = B_POSITION_OPPONENT_LEFT, .unk3 = 0}, + {.x = 113, .y = 120, .bPosition = B_POSITION_PLAYER_LEFT, .unk3 = 1}, + {.x = 210, .y = 120, .bPosition = B_POSITION_OPPONENT_RIGHT, .unk3 = 1}, + {.x = 38, .y = 120, .bPosition = B_POSITION_PLAYER_RIGHT, .unk3 = 0}, }; -const union AffineAnimCmd gUnknown_08595CDC[] = +static const union AffineAnimCmd sAffineAnim_HailParticle_0[] = { AFFINEANIMCMD_FRAME(0x100, 0x100, 0, 0), AFFINEANIMCMD_END, }; -const union AffineAnimCmd gUnknown_08595CEC[] = +static const union AffineAnimCmd sAffineAnim_HailParticle_1[] = { AFFINEANIMCMD_FRAME(0xF0, 0xF0, 0, 0), AFFINEANIMCMD_END, }; -const union AffineAnimCmd gUnknown_08595CFC[] = +static const union AffineAnimCmd sAffineAnim_HailParticle_2[] = { AFFINEANIMCMD_FRAME(0xE0, 0xE0, 0, 0), AFFINEANIMCMD_END, }; -const union AffineAnimCmd gUnknown_08595D0C[] = +static const union AffineAnimCmd sAffineAnim_WeatherBallIceDown[] = { AFFINEANIMCMD_FRAME(0x150, 0x150, 0, 0), AFFINEANIMCMD_END, }; -const union AffineAnimCmd *const gUnknown_08595D1C[] = +static const union AffineAnimCmd *const sAffineAnims_HailParticle[] = { - gUnknown_08595CDC, - gUnknown_08595CEC, - gUnknown_08595CFC, + sAffineAnim_HailParticle_0, + sAffineAnim_HailParticle_1, + sAffineAnim_HailParticle_2, }; -const union AffineAnimCmd *const gUnknown_08595D28[] = +static const union AffineAnimCmd *const sAffineAnims_WeatherBallIceDown[] = { - gUnknown_08595D0C, + sAffineAnim_WeatherBallIceDown, }; -const struct SpriteTemplate gUnknown_08595D2C = +const struct SpriteTemplate gHailParticleSpriteTemplate = { .tileTag = ANIM_TAG_HAIL, .paletteTag = ANIM_TAG_HAIL, .oam = &gOamData_AffineNormal_ObjNormal_16x16, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_08595D1C, + .affineAnims = sAffineAnims_HailParticle, .callback = AnimHailBegin, }; -const struct SpriteTemplate gUnknown_08595D44 = +const struct SpriteTemplate gWeatherBallIceDownSpriteTemplate = { .tileTag = ANIM_TAG_HAIL, .paletteTag = ANIM_TAG_HAIL, .oam = &gOamData_AffineNormal_ObjNormal_16x16, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_08595D28, - .callback = sub_80A8EE4, + .affineAnims = sAffineAnims_WeatherBallIceDown, + .callback = AnimWeatherBallDown, }; -const union AnimCmd gUnknown_08595D5C[] = +static const union AnimCmd sAnim_IceBallChunk_0[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -const union AnimCmd gUnknown_08595D64[] = +static const union AnimCmd sAnim_IceBallChunk_1[] = { ANIMCMD_FRAME(16, 4), ANIMCMD_FRAME(32, 4), @@ -455,74 +456,74 @@ const union AnimCmd gUnknown_08595D64[] = ANIMCMD_END, }; -const union AnimCmd *const gUnknown_08595D78[] = +static const union AnimCmd *const sAnims_IceBallChunk[] = { - gUnknown_08595D5C, - gUnknown_08595D64, + sAnim_IceBallChunk_0, + sAnim_IceBallChunk_1, }; -const union AffineAnimCmd gUnknown_08595D80[] = +static const union AffineAnimCmd sAffineAnim_IceBallChunk_0[] = { AFFINEANIMCMD_FRAME(0xE0, 0xE0, 0, 0), AFFINEANIMCMD_END, }; -const union AffineAnimCmd gUnknown_08595D90[] = +static const union AffineAnimCmd sAffineAnim_IceBallChunk_1[] = { AFFINEANIMCMD_FRAME(0x118, 0x118, 0, 0), AFFINEANIMCMD_END, }; -const union AffineAnimCmd gUnknown_08595DA0[] = +static const union AffineAnimCmd sAffineAnim_IceBallChunk_2[] = { AFFINEANIMCMD_FRAME(0x150, 0x150, 0, 0), AFFINEANIMCMD_END, }; -const union AffineAnimCmd gUnknown_08595DB0[] = +static const union AffineAnimCmd sAffineAnim_IceBallChunk_3[] = { AFFINEANIMCMD_FRAME(0x180, 0x180, 0, 0), AFFINEANIMCMD_END, }; -const union AffineAnimCmd gUnknown_08595DC0[] = +static const union AffineAnimCmd sAffineAnim_IceBallChunk_4[] = { AFFINEANIMCMD_FRAME(0x1C0, 0x1C0, 0, 0), AFFINEANIMCMD_END, }; -const union AffineAnimCmd *const gUnknown_08595DD0[] = +static const union AffineAnimCmd *const sAffineAnims_IceBallChunk[] = { - gUnknown_08595D80, - gUnknown_08595D90, - gUnknown_08595DA0, - gUnknown_08595DB0, - gUnknown_08595DC0, + sAffineAnim_IceBallChunk_0, + sAffineAnim_IceBallChunk_1, + sAffineAnim_IceBallChunk_2, + sAffineAnim_IceBallChunk_3, + sAffineAnim_IceBallChunk_4, }; -const struct SpriteTemplate gUnknown_08595DE4 = +const struct SpriteTemplate gIceBallChunkSpriteTemplate = { .tileTag = ANIM_TAG_ICE_CHUNK, .paletteTag = ANIM_TAG_ICE_CHUNK, .oam = &gOamData_AffineDouble_ObjNormal_32x32, - .anims = gUnknown_08595D78, + .anims = sAnims_IceBallChunk, .images = NULL, - .affineAnims = gUnknown_08595DD0, + .affineAnims = sAffineAnims_IceBallChunk, .callback = InitIceBallAnim, }; -const struct SpriteTemplate gUnknown_08595DFC = +const struct SpriteTemplate gIceBallImpactShardSpriteTemplate = { .tileTag = ANIM_TAG_ICE_CRYSTALS, .paletteTag = ANIM_TAG_ICE_CRYSTALS, .oam = &gOamData_AffineOff_ObjNormal_8x8, - .anims = gUnknown_08595AAC, + .anims = sAnims_IceCrystalSmall, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, .callback = InitIceBallParticle, }; -// probably unused +// Unused static void sub_810B6C4(struct Sprite *sprite) { s16 targetX, targetY, attackerX, attackerY; @@ -562,7 +563,7 @@ static void sub_810B6C4(struct Sprite *sprite) sprite->callback = sub_810B848; } -void sub_810B848(struct Sprite *sprite) +static void sub_810B848(struct Sprite *sprite) { if (sprite->data[0] != 0) { @@ -583,7 +584,7 @@ void sub_810B848(struct Sprite *sprite) // Animates the swirling ice crystals in Ice Punch. // arg 0: initial position angle around circle (0-256) -void AnimIcePunchSwirlingParticle(struct Sprite *sprite) +static void AnimIcePunchSwirlingParticle(struct Sprite *sprite) { sprite->data[0] = gBattleAnimArgs[0]; sprite->data[1] = 60; @@ -601,7 +602,7 @@ void AnimIcePunchSwirlingParticle(struct Sprite *sprite) // arg 2: target x offset // arg 3: target y offset // arg 4: duration -void AnimIceBeamParticle(struct Sprite *sprite) +static void AnimIceBeamParticle(struct Sprite *sprite) { InitSpritePosToAnimAttacker(sprite, TRUE); sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2); @@ -622,7 +623,7 @@ void AnimIceBeamParticle(struct Sprite *sprite) // arg 0: target x offset // arg 1: target y offset // arg 2: ??? unknown boolean -void AnimIceEffectParticle(struct Sprite *sprite) +static void AnimIceEffectParticle(struct Sprite *sprite) { if (gBattleAnimArgs[2] == 0) { @@ -642,7 +643,7 @@ void AnimIceEffectParticle(struct Sprite *sprite) sprite->callback = RunStoredCallbackWhenAffineAnimEnds; } -void AnimFlickerIceEffectParticle(struct Sprite *sprite) +static void AnimFlickerIceEffectParticle(struct Sprite *sprite) { sprite->invisible ^= 1; sprite->data[0] += 1; @@ -657,7 +658,7 @@ void AnimFlickerIceEffectParticle(struct Sprite *sprite) // arg 3: target y offset // arg 4: particle speed // arg 5: multiple targets? (boolean) -void AnimSwirlingSnowball_Step1(struct Sprite *sprite) +static void AnimSwirlingSnowball(struct Sprite *sprite) { int i; s16 tempDataHolder[8]; @@ -710,10 +711,10 @@ void AnimSwirlingSnowball_Step1(struct Sprite *sprite) sprite->data[i] = tempDataHolder[i]; sprite->callback = sub_80A718C; - StoreSpriteCallbackInData6(sprite, AnimSwirlingSnowball_Step2); + StoreSpriteCallbackInData6(sprite, AnimSwirlingSnowball_Step1); } -void AnimSwirlingSnowball_Step2(struct Sprite *sprite) +static void AnimSwirlingSnowball_Step1(struct Sprite *sprite) { s16 tempVar; @@ -728,11 +729,11 @@ void AnimSwirlingSnowball_Step2(struct Sprite *sprite) sprite->data[3] = Sin(sprite->data[0], tempVar); sprite->data[4] = Cos(sprite->data[0], 0xF); sprite->data[5] = 0; - sprite->callback = AnimSwirlingSnowball_Step3; + sprite->callback = AnimSwirlingSnowball_Step2; sprite->callback(sprite); } -void AnimSwirlingSnowball_Step3(struct Sprite *sprite) +static void AnimSwirlingSnowball_Step2(struct Sprite *sprite) { s16 tempVar; tempVar = GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER ? 20 : -20; @@ -756,7 +757,7 @@ void AnimSwirlingSnowball_Step3(struct Sprite *sprite) } } -void AnimSwirlingSnowball_End(struct Sprite *sprite) +static void AnimSwirlingSnowball_End(struct Sprite *sprite) { sprite->data[0] = 1; AnimFastTranslateLinear(sprite); @@ -777,7 +778,7 @@ void AnimSwirlingSnowball_End(struct Sprite *sprite) // arg 5: wave amplitude // arg 6: wave frequency // arg 7: multiple targets? (boolean) -void AnimMoveParticleBeyondTarget(struct Sprite *sprite) +static void AnimMoveParticleBeyondTarget(struct Sprite *sprite) { int i; s16 tempDataHolder[8]; @@ -835,7 +836,7 @@ void AnimMoveParticleBeyondTarget(struct Sprite *sprite) } // Moves particles in a sine wave towards the target. -void AnimWiggleParticleTowardsTarget(struct Sprite *sprite) +static void AnimWiggleParticleTowardsTarget(struct Sprite *sprite) { AnimFastTranslateLinear(sprite); if (sprite->data[0] == 0) @@ -856,7 +857,7 @@ void AnimWiggleParticleTowardsTarget(struct Sprite *sprite) // arg 0: initial x pixel offset // arg 1: initial y pixel offset // arg 2: ??? unknown boolean -void AnimWaveFromCenterOfTarget(struct Sprite *sprite) +static void AnimWaveFromCenterOfTarget(struct Sprite *sprite) { if (sprite->data[0] == 0) { @@ -891,7 +892,7 @@ void AnimWaveFromCenterOfTarget(struct Sprite *sprite) // arg 3: duration // arg 4: animate on opponent? (boolean) // arg 5: ??? unknown boolean -void InitSwirlingFogAnim(struct Sprite *sprite) +static void InitSwirlingFogAnim(struct Sprite *sprite) { s16 tempVar; u8 battler; @@ -959,7 +960,7 @@ void InitSwirlingFogAnim(struct Sprite *sprite) } // Animates swirling fog initialized by InitSwirlingFogAnim. -void AnimSwirlingFogAnim(struct Sprite *sprite) +static void AnimSwirlingFogAnim(struct Sprite *sprite) { if (!AnimTranslateLinear(sprite)) { @@ -979,8 +980,8 @@ void AnimSwirlingFogAnim(struct Sprite *sprite) } } -// Fades mons to black and places foggy overlay in Haze. -void AnimTask_Haze1(u8 taskId) +// Adds moving foggy overlay. Used by Haze. +void AnimTask_HazeScrollingFog(u8 taskId) { struct BattleAnimBgData animBg; @@ -999,13 +1000,13 @@ void AnimTask_Haze1(u8 taskId) sub_80A6B30(&animBg); LoadBgTiles(animBg.bgId, gWeatherFogHorizontalTiles, 0x800, animBg.tilesOffset); - sub_80A6D60(&animBg, gBattleAnimFogTilemap, 0); + AnimLoadCompressedBgTilemapHandleContest(&animBg, gBattleAnimFogTilemap, 0); LoadPalette(&gUnknown_083970E8, animBg.paletteId * 16, 32); gTasks[taskId].func = AnimTask_Haze2; } -void AnimTask_Haze2(u8 taskId) +static void AnimTask_Haze2(u8 taskId) { struct BattleAnimBgData animBg; @@ -1019,7 +1020,7 @@ void AnimTask_Haze2(u8 taskId) { gTasks[taskId].data[10] = 0; gTasks[taskId].data[9]++; - gTasks[taskId].data[11] = gUnknown_08595C5C[gTasks[taskId].data[9]]; + gTasks[taskId].data[11] = sUnknown_08595C5C[gTasks[taskId].data[9]]; SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(gTasks[taskId].data[11], 16 - gTasks[taskId].data[11])); if (gTasks[taskId].data[11] == 9) @@ -1079,7 +1080,7 @@ void AnimTask_Haze2(u8 taskId) // arg 3: target y offset // arg 4: duration // arg 5: ??? unknown (seems to vibrate target mon somehow) -void AnimThrowMistBall(struct Sprite *sprite) +static void AnimThrowMistBall(struct Sprite *sprite) { sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET); @@ -1106,14 +1107,14 @@ void AnimTask_LoadMistTiles(u8 taskId) sub_80A6B30(&animBg); LoadBgTiles(animBg.bgId, gWeatherFogHorizontalTiles, 0x800, animBg.tilesOffset); - sub_80A6D60(&animBg, gBattleAnimFogTilemap, 0); + AnimLoadCompressedBgTilemapHandleContest(&animBg, gBattleAnimFogTilemap, 0); LoadPalette(&gUnknown_083970E8, animBg.paletteId * 16, 32); gTasks[taskId].data[15] = -1; gTasks[taskId].func = AnimTask_OverlayFogTiles; } -void AnimTask_OverlayFogTiles(u8 taskId) +static void AnimTask_OverlayFogTiles(u8 taskId) { struct BattleAnimBgData animBg; @@ -1124,7 +1125,7 @@ void AnimTask_OverlayFogTiles(u8 taskId) { case 0: gTasks[taskId].data[9] += 1; - gTasks[taskId].data[11] = gUnknown_08595C88[gTasks[taskId].data[9]]; + gTasks[taskId].data[11] = sUnknown_08595C88[gTasks[taskId].data[9]]; SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(gTasks[taskId].data[11], 17 - gTasks[taskId].data[11])); if (gTasks[taskId].data[11] == 5) { @@ -1183,7 +1184,7 @@ void AnimTask_OverlayFogTiles(u8 taskId) // arg 5: ??? unknown // arg 6: ??? unknown // arg 7: ??? unknown boolean -void InitPoisonGasCloudAnim(struct Sprite *sprite) +static void InitPoisonGasCloudAnim(struct Sprite *sprite) { sprite->data[0] = gBattleAnimArgs[0]; @@ -1230,7 +1231,7 @@ void InitPoisonGasCloudAnim(struct Sprite *sprite) sprite->callback = MovePoisonGasCloud; } -void MovePoisonGasCloud(struct Sprite *sprite) +static void MovePoisonGasCloud(struct Sprite *sprite) { int value; @@ -1329,15 +1330,14 @@ void MovePoisonGasCloud(struct Sprite *sprite) } } -// Creates Hail. -void AnimTask_Hail1(u8 taskId) +void AnimTask_Hail(u8 taskId) { struct Task *task = &gTasks[taskId]; task->func = AnimTask_Hail2; } -void AnimTask_Hail2(u8 taskId) +static void AnimTask_Hail2(u8 taskId) { struct Task *task = &gTasks[taskId]; switch (task->data[0]) @@ -1382,17 +1382,17 @@ void AnimTask_Hail2(u8 taskId) } } -bool8 GenerateHailParticle(u8 hailStructId, u8 affineAnimNum, u8 taskId, u8 c) +static bool8 GenerateHailParticle(u8 hailStructId, u8 affineAnimNum, u8 taskId, u8 c) { u8 id; s16 battlerX, battlerY; s16 spriteX; bool8 possibleBool = FALSE; - s8 unk = gUnknown_08595CB4[hailStructId].unk3; + s8 unk = sHailCoordData[hailStructId].unk3; if (unk != 2) { - id = GetBattlerAtPosition(gUnknown_08595CB4[hailStructId].unk2); + id = GetBattlerAtPosition(sHailCoordData[hailStructId].bPosition); if (IsBattlerSpriteVisible(id)) { possibleBool = TRUE; @@ -1412,17 +1412,17 @@ bool8 GenerateHailParticle(u8 hailStructId, u8 affineAnimNum, u8 taskId, u8 c) } else { - battlerX = (gUnknown_08595CB4[hailStructId].unk0); - battlerY = (gUnknown_08595CB4[hailStructId].unk1); + battlerX = (sHailCoordData[hailStructId].x); + battlerY = (sHailCoordData[hailStructId].y); } } else { - battlerX = (gUnknown_08595CB4[hailStructId].unk0); - battlerY = (gUnknown_08595CB4[hailStructId].unk1); + battlerX = (sHailCoordData[hailStructId].x); + battlerY = (sHailCoordData[hailStructId].y); } spriteX = battlerX - ((battlerY + 8) / 2); - id = CreateSprite(&gUnknown_08595D2C, spriteX, -8, 18); + id = CreateSprite(&gHailParticleSpriteTemplate, spriteX, -8, 18); if (id == MAX_SPRITES) { return FALSE; @@ -1440,7 +1440,7 @@ bool8 GenerateHailParticle(u8 hailStructId, u8 affineAnimNum, u8 taskId, u8 c) } } -void AnimHailBegin(struct Sprite *sprite) +static void AnimHailBegin(struct Sprite *sprite) { u8 spriteId; @@ -1452,7 +1452,7 @@ void AnimHailBegin(struct Sprite *sprite) if (sprite->data[0] == 1 && sprite->data[5] == 0) { - spriteId = CreateSprite(&gUnknown_08595B68, + spriteId = CreateSprite(&gIceCrystalHitLargeSpriteTemplate, sprite->data[3], sprite->data[4], sprite->subpriority); sprite->data[0] = spriteId; @@ -1474,7 +1474,7 @@ void AnimHailBegin(struct Sprite *sprite) } } -void AnimHailContinue(struct Sprite *sprite) +static void AnimHailContinue(struct Sprite *sprite) { if (++sprite->data[0] == 20) { @@ -1491,7 +1491,7 @@ void AnimHailContinue(struct Sprite *sprite) // arg 3: target y offset // arg 4: duration // arg 5: arc height (negative) -void InitIceBallAnim(struct Sprite *sprite) +static void InitIceBallAnim(struct Sprite *sprite) { u8 animNum = gAnimDisableStructPtr->rolloutTimerStartValue - gAnimDisableStructPtr->rolloutTimer - 1; @@ -1516,7 +1516,7 @@ void InitIceBallAnim(struct Sprite *sprite) } // Throws the ball of ice in Ice Ball. -void AnimThrowIceBall(struct Sprite *sprite) +static void AnimThrowIceBall(struct Sprite *sprite) { if (!TranslateAnimHorizontalArc(sprite)) return; @@ -1527,7 +1527,7 @@ void AnimThrowIceBall(struct Sprite *sprite) } // Initializes the particles that scatter at the end of the Ice Ball animation. -void InitIceBallParticle(struct Sprite *sprite) +static void InitIceBallParticle(struct Sprite *sprite) { s16 randA, randB; @@ -1546,7 +1546,7 @@ void InitIceBallParticle(struct Sprite *sprite) } // Animates the particles created by InitIceBallParticle. -void AnimIceBallParticle(struct Sprite *sprite) +static void AnimIceBallParticle(struct Sprite *sprite) { sprite->data[3] += sprite->data[1]; sprite->data[4] += sprite->data[2]; @@ -1562,8 +1562,7 @@ void AnimIceBallParticle(struct Sprite *sprite) DestroyAnimSprite(sprite); } -// Counter for Ice Ball. -void AnimTask_GetRolloutCounter(u8 taskId) +void AnimTask_GetIceBallCounter(u8 taskId) { u8 arg = gBattleAnimArgs[0]; diff --git a/src/battle_anim_mon_movement.c b/src/battle_anim_mon_movement.c index 250a0459f..e789e4680 100644 --- a/src/battle_anim_mon_movement.c +++ b/src/battle_anim_mon_movement.c @@ -6,27 +6,27 @@ #include "trig.h" // This file's functions. -void AnimTask_ShakeMonStep(u8 taskId); -void AnimTask_ShakeMon2Step(u8 taskId); -void AnimTask_ShakeMonInPlaceStep(u8 taskId); -void AnimTask_ShakeAndSinkMonStep(u8 taskId); -void sub_80D57B8(u8 taskId); +static void AnimTask_ShakeMon_Step(u8 taskId); +static void AnimTask_ShakeMon2_Step(u8 taskId); +static void AnimTask_ShakeMonInPlace_Step(u8 taskId); +static void AnimTask_ShakeAndSinkMon_Step(u8 taskId); +static void AnimTask_TranslateMonElliptical_Step(u8 taskId); static void DoHorizontalLunge(struct Sprite *sprite); static void ReverseHorizontalLungeDirection(struct Sprite *sprite); static void DoVerticalDip(struct Sprite *sprite); static void ReverseVerticalDipDirection(struct Sprite* sprite); static void SlideMonToOriginalPos(struct Sprite *sprite); -static void SlideMonToOriginalPosStep(struct Sprite *sprite); +static void SlideMonToOriginalPos_Step(struct Sprite *sprite); static void SlideMonToOffset(struct Sprite *sprite); -static void sub_80D5B48(struct Sprite *sprite); -static void sub_80D5C20(struct Sprite *sprite); -void AnimTask_WindUpLungePart1(u8 taskId); -void AnimTask_WindUpLungePart2(u8 taskId); -void AnimTask_SwayMonStep(u8 taskId); -void AnimTask_ScaleMonAndRestoreStep(u8 taskId); -void sub_80D6308(u8 taskId); -void sub_80D646C(u8 taskId); -void sub_80A8B3C(u8 taskId); +static void SlideMonToOffsetAndBack(struct Sprite *sprite); +static void SlideMonToOffsetAndBack_End(struct Sprite *sprite); +static void AnimTask_WindUpLunge_Step1(u8 taskId); +static void AnimTask_WindUpLunge_Step2(u8 taskId); +static void AnimTask_SwayMonStep(u8 taskId); +static void AnimTask_ScaleMonAndRestore_Step(u8 taskId); +static void AnimTask_RotateMonSpriteToSide_Step(u8 taskId); +static void AnimTask_ShakeTargetBasedOnMovePowerOrDmg_Step(u8 taskId); +static void AnimTask_SlideOffScreen_Step(u8 taskId); const struct SpriteTemplate gHorizontalLungeSpriteTemplate = { @@ -72,7 +72,7 @@ const struct SpriteTemplate gSlideMonToOffsetSpriteTemplate = .callback = SlideMonToOffset, }; -const struct SpriteTemplate gUnknown_0857FE88 = +const struct SpriteTemplate gSlideMonToOffsetAndBackSpriteTemplate = { .tileTag = 0, .paletteTag = 0, @@ -80,7 +80,7 @@ const struct SpriteTemplate gUnknown_0857FE88 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_80D5B48, + .callback = SlideMonToOffsetAndBack, }; // Task to facilitate simple shaking of a pokemon's picture in battle. @@ -107,11 +107,11 @@ void AnimTask_ShakeMon(u8 taskId) gTasks[taskId].data[3] = gBattleAnimArgs[4]; gTasks[taskId].data[4] = gBattleAnimArgs[1]; gTasks[taskId].data[5] = gBattleAnimArgs[2]; - gTasks[taskId].func = AnimTask_ShakeMonStep; - AnimTask_ShakeMonStep(taskId); + gTasks[taskId].func = AnimTask_ShakeMon_Step; + AnimTask_ShakeMon_Step(taskId); } -void AnimTask_ShakeMonStep(u8 taskId) +static void AnimTask_ShakeMon_Step(u8 taskId) { if (gTasks[taskId].data[3] == 0) { @@ -159,7 +159,7 @@ void AnimTask_ShakeMon2(u8 taskId) bool8 destroy = FALSE; u8 battlerId; - if (gBattleAnimArgs[0] < 4) + if (gBattleAnimArgs[0] < MAX_BATTLERS_COUNT) { spriteId = GetAnimBattlerSpriteId(gBattleAnimArgs[0]); if (spriteId == 0xff) @@ -211,11 +211,11 @@ void AnimTask_ShakeMon2(u8 taskId) gTasks[taskId].data[3] = gBattleAnimArgs[4]; gTasks[taskId].data[4] = gBattleAnimArgs[1]; gTasks[taskId].data[5] = gBattleAnimArgs[2]; - gTasks[taskId].func = AnimTask_ShakeMon2Step; + gTasks[taskId].func = AnimTask_ShakeMon2_Step; gTasks[taskId].func(taskId); } -void AnimTask_ShakeMon2Step(u8 taskId) +static void AnimTask_ShakeMon2_Step(u8 taskId) { if (gTasks[taskId].data[3] == 0) { @@ -270,11 +270,11 @@ void AnimTask_ShakeMonInPlace(u8 taskId) gTasks[taskId].data[4] = gBattleAnimArgs[4]; gTasks[taskId].data[5] = gBattleAnimArgs[1] * 2; gTasks[taskId].data[6] = gBattleAnimArgs[2] * 2; - gTasks[taskId].func = AnimTask_ShakeMonInPlaceStep; + gTasks[taskId].func = AnimTask_ShakeMonInPlace_Step; gTasks[taskId].func(taskId); } -void AnimTask_ShakeMonInPlaceStep(u8 taskId) +static void AnimTask_ShakeMonInPlace_Step(u8 taskId) { if (gTasks[taskId].data[3] == 0) { @@ -326,11 +326,11 @@ void AnimTask_ShakeAndSinkMon(u8 taskId) gTasks[taskId].data[2] = gBattleAnimArgs[2]; gTasks[taskId].data[3] = gBattleAnimArgs[3]; gTasks[taskId].data[4] = gBattleAnimArgs[4]; - gTasks[taskId].func = AnimTask_ShakeAndSinkMonStep; + gTasks[taskId].func = AnimTask_ShakeAndSinkMon_Step; gTasks[taskId].func(taskId); } -void AnimTask_ShakeAndSinkMonStep(u8 taskId) +static void AnimTask_ShakeAndSinkMon_Step(u8 taskId) { s16 x; u8 spriteId; @@ -383,11 +383,11 @@ void AnimTask_TranslateMonElliptical(u8 taskId) gTasks[taskId].data[2] = gBattleAnimArgs[2]; gTasks[taskId].data[3] = gBattleAnimArgs[3]; gTasks[taskId].data[4] = wavePeriod; - gTasks[taskId].func = sub_80D57B8; + gTasks[taskId].func = AnimTask_TranslateMonElliptical_Step; gTasks[taskId].func(taskId); } -void sub_80D57B8(u8 taskId) +static void AnimTask_TranslateMonElliptical_Step(u8 taskId) { u8 spriteId = gTasks[taskId].data[0]; gSprites[spriteId].pos2.x = Sin(gTasks[taskId].data[5], gTasks[taskId].data[1]); @@ -511,10 +511,10 @@ static void SlideMonToOriginalPos(struct Sprite *sprite) sprite->data[7] = gBattleAnimArgs[1]; sprite->data[7] |= monSpriteId << 8; - sprite->callback = SlideMonToOriginalPosStep; + sprite->callback = SlideMonToOriginalPos_Step; } -static void SlideMonToOriginalPosStep(struct Sprite *sprite) +static void SlideMonToOriginalPos_Step(struct Sprite *sprite) { s8 monSpriteId; u8 lo; @@ -584,19 +584,17 @@ static void SlideMonToOffset(struct Sprite *sprite) sprite->callback = TranslateMonSpriteLinearFixedPoint; } -static void sub_80D5B48(struct Sprite *sprite) +static void SlideMonToOffsetAndBack(struct Sprite *sprite) { u8 spriteId; u8 battlerId; sprite->invisible = TRUE; - if (!gBattleAnimArgs[0]) - { + + if (gBattleAnimArgs[0] == ANIM_ATTACKER) battlerId = gBattleAnimAttacker; - } else - { battlerId = gBattleAnimTarget; - } + spriteId = gBattlerSpriteIds[battlerId]; if (GetBattlerSide(battlerId)) { @@ -622,13 +620,13 @@ static void sub_80D5B48(struct Sprite *sprite) } else { - StoreSpriteCallbackInData6(sprite, sub_80D5C20); + StoreSpriteCallbackInData6(sprite, SlideMonToOffsetAndBack_End); } sprite->callback = TranslateMonSpriteLinearFixedPoint; } -static void sub_80D5C20(struct Sprite *sprite) +static void SlideMonToOffsetAndBack_End(struct Sprite *sprite) { gSprites[sprite->data[5]].pos2.x = 0; gSprites[sprite->data[5]].pos2.y = 0; @@ -661,10 +659,10 @@ void AnimTask_WindUpLunge(u8 taskId) gTasks[taskId].data[5] = (gBattleAnimArgs[5] << 8) / gBattleAnimArgs[6]; gTasks[taskId].data[6] = gBattleAnimArgs[6]; gTasks[taskId].data[7] = wavePeriod; - gTasks[taskId].func = AnimTask_WindUpLungePart1; + gTasks[taskId].func = AnimTask_WindUpLunge_Step1; } -void AnimTask_WindUpLungePart1(u8 taskId) +static void AnimTask_WindUpLunge_Step1(u8 taskId) { u8 spriteId; spriteId = gTasks[taskId].data[0]; @@ -674,11 +672,11 @@ void AnimTask_WindUpLungePart1(u8 taskId) gTasks[taskId].data[10] += gTasks[taskId].data[7]; if (--gTasks[taskId].data[3] == 0) { - gTasks[taskId].func = AnimTask_WindUpLungePart2; + gTasks[taskId].func = AnimTask_WindUpLunge_Step2; } } -void AnimTask_WindUpLungePart2(u8 taskId) +static void AnimTask_WindUpLunge_Step2(u8 taskId) { u8 spriteId; if (gTasks[taskId].data[4] > 0) @@ -698,16 +696,17 @@ void AnimTask_WindUpLungePart2(u8 taskId) } } -void sub_80D5DB0(u8 taskId) +// To move a mon off-screen when pushed out by Roar/Whirlwind +void AnimTask_SlideOffScreen(u8 taskId) { u8 spriteId; switch (gBattleAnimArgs[0]) { - case 0: - case 1: + case ANIM_ATTACKER: + case ANIM_TARGET: spriteId = GetAnimBattlerSpriteId(gBattleAnimArgs[0]); break; - case 2: + case ANIM_ATK_PARTNER: if (!IsBattlerSpriteVisible(BATTLE_PARTNER(gBattleAnimAttacker))) { DestroyAnimVisualTask(taskId); @@ -715,7 +714,7 @@ void sub_80D5DB0(u8 taskId) } spriteId = gBattlerSpriteIds[BATTLE_PARTNER(gBattleAnimAttacker)]; break; - case 3: + case ANIM_DEF_PARTNER: if (!IsBattlerSpriteVisible(BATTLE_PARTNER(gBattleAnimTarget))) { DestroyAnimVisualTask(taskId); @@ -736,10 +735,10 @@ void sub_80D5DB0(u8 taskId) { gTasks[taskId].data[1] = -gBattleAnimArgs[1]; } - gTasks[taskId].func = sub_80A8B3C; + gTasks[taskId].func = AnimTask_SlideOffScreen_Step; } -void sub_80A8B3C(u8 taskId) +static void AnimTask_SlideOffScreen_Step(u8 taskId) { u8 spriteId = gTasks[taskId].data[0]; gSprites[spriteId].pos2.x += gTasks[taskId].data[1]; @@ -780,7 +779,7 @@ void AnimTask_SwayMon(u8 taskId) gTasks[taskId].func = AnimTask_SwayMonStep; } -void AnimTask_SwayMonStep(u8 taskId) +static void AnimTask_SwayMonStep(u8 taskId) { s16 sineValue; u8 spriteId; @@ -842,10 +841,10 @@ void AnimTask_ScaleMonAndRestore(u8 taskId) gTasks[taskId].data[4] = spriteId; gTasks[taskId].data[10] = 0x100; gTasks[taskId].data[11] = 0x100; - gTasks[taskId].func = AnimTask_ScaleMonAndRestoreStep; + gTasks[taskId].func = AnimTask_ScaleMonAndRestore_Step; } -void AnimTask_ScaleMonAndRestoreStep(u8 taskId) +static void AnimTask_ScaleMonAndRestore_Step(u8 taskId) { u8 spriteId; gTasks[taskId].data[10] += gTasks[taskId].data[0]; @@ -870,7 +869,7 @@ void AnimTask_ScaleMonAndRestoreStep(u8 taskId) } } -void sub_80D6134(u8 taskId) +void AnimTask_RotateMonSpriteToSide(u8 taskId) { u8 spriteId; spriteId = GetAnimBattlerSpriteId(gBattleAnimArgs[2]); @@ -911,17 +910,18 @@ void sub_80D6134(u8 taskId) gTasks[taskId].data[4] *= -1; } } - gTasks[taskId].func = sub_80D6308; + gTasks[taskId].func = AnimTask_RotateMonSpriteToSide_Step; } -void sub_80D622C(u8 taskId) +// Rotates mon to side and back to original position. For Peck and when a held item activates +void AnimTask_RotateMonToSideAndRestore(u8 taskId) { u8 spriteId; spriteId = GetAnimBattlerSpriteId(gBattleAnimArgs[2]); PrepareBattlerSpriteForRotScale(spriteId, ST_OAM_OBJ_NORMAL); gTasks[taskId].data[1] = 0; gTasks[taskId].data[2] = gBattleAnimArgs[0]; - if (gBattleAnimArgs[2] == 0) + if (gBattleAnimArgs[2] == ANIM_ATTACKER) { if (GetBattlerSide(gBattleAnimAttacker)) { @@ -949,10 +949,10 @@ void sub_80D622C(u8 taskId) gTasks[taskId].data[7] = 1; gTasks[taskId].data[3] *= -1; gTasks[taskId].data[4] *= -1; - gTasks[taskId].func = sub_80D6308; + gTasks[taskId].func = AnimTask_RotateMonSpriteToSide_Step; } -void sub_80D6308(u8 taskId) +static void AnimTask_RotateMonSpriteToSide_Step(u8 taskId) { gTasks[taskId].data[3] += gTasks[taskId].data[4]; SetSpriteRotScale(gTasks[taskId].data[5], 0x100, 0x100, gTasks[taskId].data[3]); @@ -979,7 +979,7 @@ void sub_80D6308(u8 taskId) } } -void sub_80D6388(u8 taskId) +void AnimTask_ShakeTargetBasedOnMovePowerOrDmg(u8 taskId) { if (!gBattleAnimArgs[0]) { @@ -1010,16 +1010,16 @@ void sub_80D6388(u8 taskId) gTasks[taskId].data[12] = 0; gTasks[taskId].data[10] = gBattleAnimArgs[3]; gTasks[taskId].data[11] = gBattleAnimArgs[4]; - gTasks[taskId].data[7] = GetAnimBattlerSpriteId(1); + gTasks[taskId].data[7] = GetAnimBattlerSpriteId(ANIM_TARGET); gTasks[taskId].data[8] = gSprites[gTasks[taskId].data[7]].pos2.x; gTasks[taskId].data[9] = gSprites[gTasks[taskId].data[7]].pos2.y; gTasks[taskId].data[0] = 0; gTasks[taskId].data[1] = gBattleAnimArgs[1]; gTasks[taskId].data[2] = gBattleAnimArgs[2]; - gTasks[taskId].func = sub_80D646C; + gTasks[taskId].func = AnimTask_ShakeTargetBasedOnMovePowerOrDmg_Step; } -void sub_80D646C(u8 taskId) +static void AnimTask_ShakeTargetBasedOnMovePowerOrDmg_Step(u8 taskId) { struct Task *task = &gTasks[taskId]; if (++task->data[0] > task->data[1]) diff --git a/src/battle_anim_mons.c b/src/battle_anim_mons.c index 7691d4742..cf7ddea90 100644 --- a/src/battle_anim_mons.c +++ b/src/battle_anim_mons.c @@ -27,7 +27,7 @@ static void AnimThrowProjectile_Step(struct Sprite *sprite); static void sub_80A8DFC(struct Sprite *sprite); static void sub_80A8E88(struct Sprite *sprite); static u16 GetBattlerYDeltaFromSpriteId(u8 spriteId); -static void AnimTask_BlendMonInAndOutSetup(struct Task *task); +static void AnimTask_BlendPalInAndOutSetup(struct Task *task); static void sub_80A7AFC(u8 taskId); static void sub_80A8CAC(u8 taskId); static void AnimTask_BlendMonInAndOutStep(u8 taskId); @@ -943,7 +943,7 @@ void AnimLoadCompressedBgTilemap(u32 bgId, const void *src) CopyBgTilemapBufferToVram(bgId); } -void sub_80A6D60(struct BattleAnimBgData *unk, const void *src, u32 arg2) +void AnimLoadCompressedBgTilemapHandleContest(struct BattleAnimBgData *unk, const void *src, u32 arg2) { InitAnimBgTilemapBuffer(unk->bgId, src); if (IsContest() == TRUE) @@ -1517,7 +1517,7 @@ static void AnimThrowProjectile_Step(struct Sprite *sprite) DestroyAnimSprite(sprite); } -void AnimSnoreZ(struct Sprite *sprite) +void AnimTravelDiagonally(struct Sprite *sprite) { bool8 r4; u8 battlerId, coordType; @@ -1532,7 +1532,7 @@ void AnimSnoreZ(struct Sprite *sprite) r4 = FALSE; coordType = BATTLER_COORD_Y; } - if (!gBattleAnimArgs[5]) + if (gBattleAnimArgs[5] == ANIM_ATTACKER) { InitSpritePosToAnimAttacker(sprite, r4); battlerId = gBattleAnimAttacker; @@ -1579,7 +1579,8 @@ void obj_delete_but_dont_free_vram(struct Sprite *sprite) DestroySprite(sprite); } -void sub_80A7A74(u8 taskId) +// Only used to fade Moonlight moon sprite in +void AnimTask_AlphaFadeIn(u8 taskId) { s16 v1 = 0; s16 v2 = 0; @@ -1648,10 +1649,10 @@ void AnimTask_BlendMonInAndOut(u8 task) return; } gTasks[task].data[0] = (gSprites[spriteId].oam.paletteNum * 0x10) + 0x101; - AnimTask_BlendMonInAndOutSetup(&gTasks[task]); + AnimTask_BlendPalInAndOutSetup(&gTasks[task]); } -static void AnimTask_BlendMonInAndOutSetup(struct Task *task) +static void AnimTask_BlendPalInAndOutSetup(struct Task *task) { task->data[1] = gBattleAnimArgs[1]; task->data[2] = 0; @@ -1698,7 +1699,8 @@ static void AnimTask_BlendMonInAndOutStep(u8 taskId) } } -void sub_80A7CB4(u8 task) +// See AnimTask_BlendMonInAndOut. Same, but ANIM_TAG_* instead of mon +void AnimTask_BlendPalInAndOutByTag(u8 task) { u8 palette = IndexOfSpritePaletteTag(gBattleAnimArgs[0]); @@ -1708,7 +1710,7 @@ void sub_80A7CB4(u8 task) return; } gTasks[task].data[0] = (palette * 0x10) + 0x101; - AnimTask_BlendMonInAndOutSetup(&gTasks[task]); + AnimTask_BlendPalInAndOutSetup(&gTasks[task]); } void PrepareAffineAnimInTaskData(struct Task *task, u8 spriteId, const union AffineAnimCmd *affineAnimCmds) @@ -1929,7 +1931,7 @@ void AnimTask_GetFrustrationPowerLevel(u8 taskId) powerLevel = 2; else powerLevel = 3; - gBattleAnimArgs[7] = powerLevel; + gBattleAnimArgs[ARG_RET_ID] = powerLevel; DestroyAnimVisualTask(taskId); } @@ -2018,20 +2020,20 @@ u8 sub_80A8394(u16 species, bool8 isBackpic, u8 a3, s16 x, s16 y, u8 subpriority u16 sheet = LoadSpriteSheet(&sUnknown_08525FC0[a3]); u16 palette = AllocSpritePalette(sUnknown_08525F90[a3].paletteTag); - if (gMonSpritesGfxPtr != NULL && gMonSpritesGfxPtr->field_17C == NULL) - gMonSpritesGfxPtr->field_17C = AllocZeroed(0x2000); + if (gMonSpritesGfxPtr != NULL && gMonSpritesGfxPtr->buffer == NULL) + gMonSpritesGfxPtr->buffer = AllocZeroed(0x2000); if (!isBackpic) { LoadCompressedPalette(GetMonSpritePalFromSpeciesAndPersonality(species, trainerId, personality), (palette * 0x10) + 0x100, 0x20); if (a10 == 1 || sub_80688F8(5, battlerId) == 1 || gBattleSpritesDataPtr->battlerData[battlerId].transformSpecies != 0) LoadSpecialPokePic_DontHandleDeoxys(&gMonFrontPicTable[species], - gMonSpritesGfxPtr->field_17C, + gMonSpritesGfxPtr->buffer, species, personality, TRUE); else LoadSpecialPokePic_2(&gMonFrontPicTable[species], - gMonSpritesGfxPtr->field_17C, + gMonSpritesGfxPtr->buffer, species, personality, TRUE); @@ -2041,20 +2043,20 @@ u8 sub_80A8394(u16 species, bool8 isBackpic, u8 a3, s16 x, s16 y, u8 subpriority LoadCompressedPalette(GetMonSpritePalFromSpeciesAndPersonality(species, trainerId, personality), (palette * 0x10) + 0x100, 0x20); if (a10 == 1 || sub_80688F8(5, battlerId) == 1 || gBattleSpritesDataPtr->battlerData[battlerId].transformSpecies != 0) LoadSpecialPokePic_DontHandleDeoxys(&gMonBackPicTable[species], - gMonSpritesGfxPtr->field_17C, + gMonSpritesGfxPtr->buffer, species, personality, FALSE); else LoadSpecialPokePic_2(&gMonBackPicTable[species], - gMonSpritesGfxPtr->field_17C, + gMonSpritesGfxPtr->buffer, species, personality, FALSE); } - RequestDma3Copy(gMonSpritesGfxPtr->field_17C, (void *)(OBJ_VRAM0 + (sheet * 0x20)), 0x800, 1); - FREE_AND_SET_NULL(gMonSpritesGfxPtr->field_17C); + RequestDma3Copy(gMonSpritesGfxPtr->buffer, (void *)(OBJ_VRAM0 + (sheet * 0x20)), 0x800, 1); + FREE_AND_SET_NULL(gMonSpritesGfxPtr->buffer); if (!isBackpic) spriteId = CreateSprite(&sUnknown_08525F90[a3], x, y + gMonFrontPicCoords[species].y_offset, subpriority); @@ -2287,7 +2289,8 @@ void sub_80A8AEC(struct Sprite *sprite) sprite->callback = TranslateSpriteLinearAndFlicker; } -void sub_80A8B64(struct Sprite *sprite) +// Used by Detect/Disable +void AnimSpinningSparkle(struct Sprite *sprite) { SetSpriteCoordsToAnimAttackerCoords(sprite); if (GetBattlerSide(gBattleAnimAttacker)) @@ -2299,7 +2302,10 @@ void sub_80A8B64(struct Sprite *sprite) StoreSpriteCallbackInData6(sprite, DestroyAnimSprite); } -void sub_80A8BC4(u8 taskId) +// Slides attacker to right and back with a cloned trace of the specified color +// arg0: Trace palette blend color +// arg1: Trace palette blend coeff +void AnimTask_AttackerPunchWithTrace(u8 taskId) { u16 src; u16 dest; @@ -2383,7 +2389,7 @@ static void sub_80A8DFC(struct Sprite *sprite) } } -void sub_80A8E30(struct Sprite *sprite) +void AnimWeatherBallUp(struct Sprite *sprite) { sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET); @@ -2407,7 +2413,7 @@ static void sub_80A8E88(struct Sprite *sprite) DestroyAnimSprite(sprite); } -void sub_80A8EE4(struct Sprite *sprite) +void AnimWeatherBallDown(struct Sprite *sprite) { int x; sprite->data[0] = gBattleAnimArgs[2]; diff --git a/src/normal.c b/src/battle_anim_normal.c similarity index 57% rename from src/normal.c rename to src/battle_anim_normal.c index 7864dd9a3..f7df9a4a9 100644 --- a/src/normal.c +++ b/src/battle_anim_normal.c @@ -6,37 +6,36 @@ #include "trig.h" #include "constants/rgb.h" -void AnimConfusionDuck(struct Sprite *); -void AnimSimplePaletteBlend(struct Sprite *); -u32 UnpackSelectedBattleAnimPalettes(s16); -void sub_81158A4(struct Sprite *); -void sub_81159B4(struct Sprite *); -void sub_81160A4(struct Sprite *); -void sub_8116388(struct Sprite *); -void sub_8116420(struct Sprite *); -void sub_8116458(struct Sprite *); -void sub_81164F0(struct Sprite *); -void sub_8116560(struct Sprite *); -void sub_81165A8(struct Sprite *); -static void AnimConfusionDuckStep(struct Sprite *); -static void AnimSimplePaletteBlendStep(struct Sprite *); -static void sub_81158F8(struct Sprite *); -static void sub_8115984(struct Sprite *); -static void sub_8115A54(u8, u8, u8); -static void sub_8115AA4(u8); -static void sub_8115BC8(u8, u8, u8); -static void sub_8115C18(u8); -static void sub_8115CD0(u8, u8, u8); -static void sub_8115D2C(u8); -static void sub_8115E00(u8); -static void sub_8115EB8(u8); -static void sub_8116148(struct Sprite *); -static void sub_81161F4(void); -static void sub_81162F8(u8); -static void sub_81163D0(struct Sprite *); -static void sub_81165E4(struct Sprite *); +static void AnimConfusionDuck(struct Sprite *); +static void AnimSimplePaletteBlend(struct Sprite *); +static void AnimSimplePaletteBlend_Step(struct Sprite *); +static void AnimComplexPaletteBlend(struct Sprite *); +static void AnimComplexPaletteBlend_Step1(struct Sprite *); +static void AnimComplexPaletteBlend_Step2(struct Sprite *); +static void sub_81159B4(struct Sprite *); +static void AnimShakeMonOrBattleTerrain(struct Sprite *); +static void AnimShakeMonOrBattleTerrain_Step(struct Sprite *); +static void AnimShakeMonOrBattleTerrain_UpdateCoordOffsetEnabled(void); +static void AnimHitSplatBasic(struct Sprite *); +static void AnimHitSplatPersistent(struct Sprite *); +static void AnimHitSplatHandleInvert(struct Sprite *); +static void AnimHitSplatRandom(struct Sprite *); +static void AnimHitSplatOnMonEdge(struct Sprite *); +static void AnimCrossImpact(struct Sprite *); +static void AnimFlashingHitSplat(struct Sprite *); +static void AnimFlashingHitSplat_Step(struct Sprite *); +static void AnimConfusionDuck_Step(struct Sprite *); +static void BlendColorCycle(u8, u8, u8); +static void AnimTask_BlendColorCycleLoop(u8); +static void BlendColorCycleExclude(u8, u8, u8); +static void AnimTask_BlendColorCycleExcludeLoop(u8); +static void BlendColorCycleByTag(u8, u8, u8); +static void AnimTask_BlendColorCycleByTagLoop(u8); +static void AnimTask_FlashAnimTagWithColor_Step1(u8); +static void AnimTask_FlashAnimTagWithColor_Step2(u8); +static void AnimTask_ShakeBattleTerrain_Step(u8); -const union AnimCmd gUnknown_0859722C[] = +static const union AnimCmd sAnim_ConfusionDuck_0[] = { ANIMCMD_FRAME(0, 8), ANIMCMD_FRAME(4, 8), @@ -45,7 +44,7 @@ const union AnimCmd gUnknown_0859722C[] = ANIMCMD_JUMP(0), }; -const union AnimCmd gUnknown_08597240[] = +static const union AnimCmd sAnim_ConfusionDuck_1[] = { ANIMCMD_FRAME(0, 8, .hFlip = TRUE), ANIMCMD_FRAME(4, 8), @@ -54,10 +53,10 @@ const union AnimCmd gUnknown_08597240[] = ANIMCMD_JUMP(0), }; -const union AnimCmd *const gUnknown_08597254[] = +static const union AnimCmd *const sAnims_ConfusionDuck[] = { - gUnknown_0859722C, - gUnknown_08597240, + sAnim_ConfusionDuck_0, + sAnim_ConfusionDuck_1, }; const struct SpriteTemplate gConfusionDuckSpriteTemplate = @@ -65,7 +64,7 @@ const struct SpriteTemplate gConfusionDuckSpriteTemplate = .tileTag = ANIM_TAG_DUCK, .paletteTag = ANIM_TAG_DUCK, .oam = &gOamData_AffineOff_ObjNormal_16x16, - .anims = gUnknown_08597254, + .anims = sAnims_ConfusionDuck, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, .callback = AnimConfusionDuck, @@ -90,10 +89,10 @@ const struct SpriteTemplate gComplexPaletteBlendSpriteTemplate = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_81158A4, + .callback = AnimComplexPaletteBlend, }; -const union AnimCmd gUnknown_085972A4[] = +static const union AnimCmd gUnknown_085972A4[] = { ANIMCMD_FRAME(0, 3), ANIMCMD_FRAME(16, 3), @@ -103,11 +102,12 @@ const union AnimCmd gUnknown_085972A4[] = ANIMCMD_JUMP(0), }; -const union AnimCmd *const gUnknown_085972BC[] = +static const union AnimCmd *const gUnknown_085972BC[] = { gUnknown_085972A4, }; +// Unused const struct SpriteTemplate gUnknown_085972C0 = { .tileTag = ANIM_TAG_SPARKLE_4, @@ -119,7 +119,7 @@ const struct SpriteTemplate gUnknown_085972C0 = .callback = sub_81159B4, }; -const struct SpriteTemplate gBattleAnimSpriteTemplate_85972D8 = +const struct SpriteTemplate gShakeMonOrTerrainSpriteTemplate = { .tileTag = 0, .paletteTag = 0, @@ -127,42 +127,42 @@ const struct SpriteTemplate gBattleAnimSpriteTemplate_85972D8 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_81160A4, + .callback = AnimShakeMonOrBattleTerrain, }; -const union AffineAnimCmd gUnknown_085972F0[] = +static const union AffineAnimCmd sAffineAnim_HitSplat_0[] = { AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 8), AFFINEANIMCMD_END, }; -const union AffineAnimCmd gUnknown_08597300[] = +static const union AffineAnimCmd sAffineAnim_HitSplat_1[] = { AFFINEANIMCMD_FRAME(0xD8, 0xD8, 0, 0), AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 8), AFFINEANIMCMD_END, }; -const union AffineAnimCmd gUnknown_08597318[] = +static const union AffineAnimCmd sAffineAnim_HitSplat_2[] = { AFFINEANIMCMD_FRAME(0xB0, 0xB0, 0, 0), AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 8), AFFINEANIMCMD_END, }; -const union AffineAnimCmd gUnknown_08597330[] = +static const union AffineAnimCmd sAffineAnim_HitSplat_3[] = { AFFINEANIMCMD_FRAME(0x80, 0x80, 0, 0), AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 8), AFFINEANIMCMD_END, }; -const union AffineAnimCmd *const gUnknown_08597348[] = +static const union AffineAnimCmd *const sAffineAnims_HitSplat[] = { - gUnknown_085972F0, - gUnknown_08597300, - gUnknown_08597318, - gUnknown_08597330, + sAffineAnim_HitSplat_0, + sAffineAnim_HitSplat_1, + sAffineAnim_HitSplat_2, + sAffineAnim_HitSplat_3, }; const struct SpriteTemplate gBasicHitSplatSpriteTemplate = @@ -172,55 +172,55 @@ const struct SpriteTemplate gBasicHitSplatSpriteTemplate = .oam = &gOamData_AffineNormal_ObjBlend_32x32, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_08597348, - .callback = sub_8116388, + .affineAnims = sAffineAnims_HitSplat, + .callback = AnimHitSplatBasic, }; -const struct SpriteTemplate gBattleAnimSpriteTemplate_8597370 = +const struct SpriteTemplate gHandleInvertHitSplatSpriteTemplate = { .tileTag = ANIM_TAG_IMPACT, .paletteTag = ANIM_TAG_IMPACT, .oam = &gOamData_AffineNormal_ObjBlend_32x32, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_08597348, - .callback = sub_8116420, + .affineAnims = sAffineAnims_HitSplat, + .callback = AnimHitSplatHandleInvert, }; -const struct SpriteTemplate gUnknown_08597388 = +const struct SpriteTemplate gWaterHitSplatSpriteTemplate = { .tileTag = ANIM_TAG_WATER_IMPACT, .paletteTag = ANIM_TAG_WATER_IMPACT, .oam = &gOamData_AffineNormal_ObjBlend_32x32, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_08597348, - .callback = sub_8116388, + .affineAnims = sAffineAnims_HitSplat, + .callback = AnimHitSplatBasic, }; -const struct SpriteTemplate gUnknown_085973A0 = +const struct SpriteTemplate gRandomPosHitSplatSpriteTemplate = { .tileTag = ANIM_TAG_IMPACT, .paletteTag = ANIM_TAG_IMPACT, .oam = &gOamData_AffineNormal_ObjBlend_32x32, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_08597348, - .callback = sub_8116458, + .affineAnims = sAffineAnims_HitSplat, + .callback = AnimHitSplatRandom, }; -const struct SpriteTemplate gBattleAnimSpriteTemplate_85973B8 = +const struct SpriteTemplate gMonEdgeHitSplatSpriteTemplate = { .tileTag = ANIM_TAG_IMPACT, .paletteTag = ANIM_TAG_IMPACT, .oam = &gOamData_AffineNormal_ObjBlend_32x32, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_08597348, - .callback = sub_81164F0, + .affineAnims = sAffineAnims_HitSplat, + .callback = AnimHitSplatOnMonEdge, }; -const struct SpriteTemplate gUnknown_085973D0 = +const struct SpriteTemplate gCrossImpactSpriteTemplate = { .tileTag = ANIM_TAG_CROSS_IMPACT, .paletteTag = ANIM_TAG_CROSS_IMPACT, @@ -228,29 +228,29 @@ const struct SpriteTemplate gUnknown_085973D0 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_8116560, + .callback = AnimCrossImpact, }; -const struct SpriteTemplate gUnknown_085973E8 = +const struct SpriteTemplate gFlashingHitSplatSpriteTemplate = { .tileTag = ANIM_TAG_IMPACT, .paletteTag = ANIM_TAG_IMPACT, .oam = &gOamData_AffineNormal_ObjNormal_32x32, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_08597348, - .callback = sub_81165A8, + .affineAnims = sAffineAnims_HitSplat, + .callback = AnimFlashingHitSplat, }; -const struct SpriteTemplate gUnknown_08597400 = +const struct SpriteTemplate gPersistHitSplatSpriteTemplate = { .tileTag = ANIM_TAG_IMPACT, .paletteTag = ANIM_TAG_IMPACT, .oam = &gOamData_AffineNormal_ObjBlend_32x32, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_08597348, - .callback = sub_81163D0, + .affineAnims = sAffineAnims_HitSplat, + .callback = AnimHitSplatPersistent, }; // Moves a spinning duck around the mon's head. @@ -259,7 +259,7 @@ const struct SpriteTemplate gUnknown_08597400 = // arg 2: initial wave offset // arg 3: wave period (higher means faster wave) // arg 4: duration -void AnimConfusionDuck(struct Sprite *sprite) +static void AnimConfusionDuck(struct Sprite *sprite) { sprite->pos1.x += gBattleAnimArgs[0]; sprite->pos1.y += gBattleAnimArgs[1]; @@ -277,11 +277,11 @@ void AnimConfusionDuck(struct Sprite *sprite) } sprite->data[3] = gBattleAnimArgs[4]; - sprite->callback = AnimConfusionDuckStep; + sprite->callback = AnimConfusionDuck_Step; sprite->callback(sprite); } -static void AnimConfusionDuckStep(struct Sprite *sprite) +static void AnimConfusionDuck_Step(struct Sprite *sprite) { sprite->pos2.x = Cos(sprite->data[0], 30); sprite->pos2.y = Sin(sprite->data[0], 10); @@ -302,12 +302,12 @@ static void AnimConfusionDuckStep(struct Sprite *sprite) // arg 2: start blend amount // arg 3: end blend amount // arg 4: blend color -void AnimSimplePaletteBlend(struct Sprite *sprite) +static void AnimSimplePaletteBlend(struct Sprite *sprite) { u32 selectedPalettes = UnpackSelectedBattleAnimPalettes(gBattleAnimArgs[0]); BeginNormalPaletteFade(selectedPalettes, gBattleAnimArgs[1], gBattleAnimArgs[2], gBattleAnimArgs[3], gBattleAnimArgs[4]); - sprite->invisible = 1; - sprite->callback = AnimSimplePaletteBlendStep; + sprite->invisible = TRUE; + sprite->callback = AnimSimplePaletteBlend_Step; } // Unpacks a bitfield and returns a bitmask of its selected palettes. @@ -331,13 +331,13 @@ u32 UnpackSelectedBattleAnimPalettes(s16 selector) return sub_80A75AC(battleBackground, attacker, target, attackerPartner, targetPartner, arg5, arg6); } -static void AnimSimplePaletteBlendStep(struct Sprite *sprite) +static void AnimSimplePaletteBlend_Step(struct Sprite *sprite) { if (!gPaletteFade.active) DestroyAnimSprite(sprite); } -void sub_81158A4(struct Sprite *sprite) +static void AnimComplexPaletteBlend(struct Sprite *sprite) { u32 selectedPalettes; @@ -352,11 +352,11 @@ void sub_81158A4(struct Sprite *sprite) selectedPalettes = UnpackSelectedBattleAnimPalettes(sprite->data[7]); BlendPalettes(selectedPalettes, gBattleAnimArgs[4], gBattleAnimArgs[3]); - sprite->invisible = 1; - sprite->callback = sub_81158F8; + sprite->invisible = TRUE; + sprite->callback = AnimComplexPaletteBlend_Step1; } -static void sub_81158F8(struct Sprite *sprite) +static void AnimComplexPaletteBlend_Step1(struct Sprite *sprite) { u32 selectedPalettes; @@ -371,7 +371,7 @@ static void sub_81158F8(struct Sprite *sprite) if (sprite->data[2] == 0) { - sprite->callback = sub_8115984; + sprite->callback = AnimComplexPaletteBlend_Step2; return; } @@ -386,7 +386,7 @@ static void sub_81158F8(struct Sprite *sprite) sprite->data[2]--; } -static void sub_8115984(struct Sprite *sprite) +static void AnimComplexPaletteBlend_Step2(struct Sprite *sprite) { u32 selectedPalettes; @@ -398,7 +398,7 @@ static void sub_8115984(struct Sprite *sprite) } } -void sub_81159B4(struct Sprite *sprite) +static void sub_81159B4(struct Sprite *sprite) { sprite->pos1.x += gBattleAnimArgs[0]; sprite->pos1.y += gBattleAnimArgs[1]; @@ -413,55 +413,71 @@ void sub_81159B4(struct Sprite *sprite) sprite->callback(sprite); } -void sub_8115A04(u8 taskId) +// Task data for AnimTask_BlendColorCycle, AnimTask_BlendColorCycleExclude, and AnimTask_BlendColorCycleByTag +#define tPalSelector data[0] // AnimTask_BlendColorCycle +#define tPalTag data[0] // AnimTask_BlendColorCycleByTag +#define tDelay data[1] +#define tNumBlends data[2] +#define tInitialBlendY data[3] +#define tTargetBlendY data[4] +#define tBlendColor data[5] +#define tRestoreBlend data[8] +#define tPalSelectorHi data[9] +#define tPalSelectorLo data[10] + +// Blends mon/screen to designated color or back alternately tNumBlends times +// Many uses of this task only set a tNumBlends of 2, which has the effect of blending to a color and back once +void AnimTask_BlendColorCycle(u8 taskId) { - gTasks[taskId].data[0] = gBattleAnimArgs[0]; - gTasks[taskId].data[1] = gBattleAnimArgs[1]; - gTasks[taskId].data[2] = gBattleAnimArgs[2]; - gTasks[taskId].data[3] = gBattleAnimArgs[3]; - gTasks[taskId].data[4] = gBattleAnimArgs[4]; - gTasks[taskId].data[5] = gBattleAnimArgs[5]; - gTasks[taskId].data[8] = 0; - sub_8115A54(taskId, 0, gTasks[taskId].data[4]); - gTasks[taskId].func = sub_8115AA4; + gTasks[taskId].tPalSelector = gBattleAnimArgs[0]; + gTasks[taskId].tDelay = gBattleAnimArgs[1]; + gTasks[taskId].tNumBlends = gBattleAnimArgs[2]; + gTasks[taskId].tInitialBlendY = gBattleAnimArgs[3]; + gTasks[taskId].tTargetBlendY = gBattleAnimArgs[4]; + gTasks[taskId].tBlendColor = gBattleAnimArgs[5]; + gTasks[taskId].tRestoreBlend = FALSE; + BlendColorCycle(taskId, 0, gTasks[taskId].tTargetBlendY); + gTasks[taskId].func = AnimTask_BlendColorCycleLoop; } -static void sub_8115A54(u8 taskId, u8 initialBlendAmount, u8 targetBlendAmount) +static void BlendColorCycle(u8 taskId, u8 startBlendAmount, u8 targetBlendAmount) { - u32 selectedPalettes = UnpackSelectedBattleAnimPalettes(gTasks[taskId].data[0]); + u32 selectedPalettes = UnpackSelectedBattleAnimPalettes(gTasks[taskId].tPalSelector); BeginNormalPaletteFade( selectedPalettes, - gTasks[taskId].data[1], - initialBlendAmount, + gTasks[taskId].tDelay, + startBlendAmount, targetBlendAmount, - gTasks[taskId].data[5]); + gTasks[taskId].tBlendColor); - gTasks[taskId].data[2]--; - gTasks[taskId].data[8] ^= 1; + gTasks[taskId].tNumBlends--; + gTasks[taskId].tRestoreBlend ^= 1; } -static void sub_8115AA4(u8 taskId) +static void AnimTask_BlendColorCycleLoop(u8 taskId) { - u8 initialBlendAmount, targetBlendAmount; + u8 startBlendAmount, targetBlendAmount; if (!gPaletteFade.active) { - if (gTasks[taskId].data[2] > 0) + if (gTasks[taskId].tNumBlends > 0) { - if (gTasks[taskId].data[8] == 0) + if (!gTasks[taskId].tRestoreBlend) { - initialBlendAmount = gTasks[taskId].data[3]; - targetBlendAmount = gTasks[taskId].data[4]; + // Blend to designated color + startBlendAmount = gTasks[taskId].tInitialBlendY; + targetBlendAmount = gTasks[taskId].tTargetBlendY; } else { - initialBlendAmount = gTasks[taskId].data[4]; - targetBlendAmount = gTasks[taskId].data[3]; + // Blend back to original color + startBlendAmount = gTasks[taskId].tTargetBlendY; + targetBlendAmount = gTasks[taskId].tInitialBlendY; } - if (gTasks[taskId].data[2] == 1) + if (gTasks[taskId].tNumBlends == 1) targetBlendAmount = 0; - sub_8115A54(taskId, initialBlendAmount, targetBlendAmount); + BlendColorCycle(taskId, startBlendAmount, targetBlendAmount); } else { @@ -470,18 +486,19 @@ static void sub_8115AA4(u8 taskId) } } -void sub_8115B0C(u8 taskId) +// See AnimTask_BlendColorCycle. Same, but excludes Attacker and Target +void AnimTask_BlendColorCycleExclude(u8 taskId) { int battler; u32 selectedPalettes = 0; gTasks[taskId].data[0] = gBattleAnimArgs[0]; - gTasks[taskId].data[1] = gBattleAnimArgs[1]; - gTasks[taskId].data[2] = gBattleAnimArgs[2]; - gTasks[taskId].data[3] = gBattleAnimArgs[3]; - gTasks[taskId].data[4] = gBattleAnimArgs[4]; - gTasks[taskId].data[5] = gBattleAnimArgs[5]; - gTasks[taskId].data[8] = 0; + gTasks[taskId].tDelay = gBattleAnimArgs[1]; + gTasks[taskId].tNumBlends = gBattleAnimArgs[2]; + gTasks[taskId].tInitialBlendY = gBattleAnimArgs[3]; + gTasks[taskId].tTargetBlendY = gBattleAnimArgs[4]; + gTasks[taskId].tBlendColor = gBattleAnimArgs[5]; + gTasks[taskId].tRestoreBlend = 0; for (battler = 0; battler < gBattlersCount; battler++) { @@ -492,48 +509,50 @@ void sub_8115B0C(u8 taskId) if (gBattleAnimArgs[0] == 1) selectedPalettes |= 0xE; - gTasks[taskId].data[9] = selectedPalettes >> 16; - gTasks[taskId].data[10] = selectedPalettes & 0xFF; - sub_8115BC8(taskId, 0, gTasks[taskId].data[4]); - gTasks[taskId].func = sub_8115C18; + gTasks[taskId].tPalSelectorHi = selectedPalettes >> 16; + gTasks[taskId].tPalSelectorLo = selectedPalettes & 0xFF; + BlendColorCycleExclude(taskId, 0, gTasks[taskId].tTargetBlendY); + gTasks[taskId].func = AnimTask_BlendColorCycleExcludeLoop; } -static void sub_8115BC8(u8 taskId, u8 initialBlendAmount, u8 targetBlendAmount) +static void BlendColorCycleExclude(u8 taskId, u8 startBlendAmount, u8 targetBlendAmount) { - u32 selectedPalettes = ((u16)gTasks[taskId].data[9] << 16) | (u16)gTasks[taskId].data[10]; + u32 selectedPalettes = ((u16)gTasks[taskId].tPalSelectorHi << 16) | (u16)gTasks[taskId].tPalSelectorLo; BeginNormalPaletteFade( selectedPalettes, - gTasks[taskId].data[1], - initialBlendAmount, + gTasks[taskId].tDelay, + startBlendAmount, targetBlendAmount, - gTasks[taskId].data[5]); + gTasks[taskId].tBlendColor); - gTasks[taskId].data[2]--; - gTasks[taskId].data[8] ^= 1; + gTasks[taskId].tNumBlends--; + gTasks[taskId].tRestoreBlend ^= 1; } -static void sub_8115C18(u8 taskId) +static void AnimTask_BlendColorCycleExcludeLoop(u8 taskId) { - u8 initialBlendAmount, targetBlendAmount; + u8 startBlendAmount, targetBlendAmount; if (!gPaletteFade.active) { - if (gTasks[taskId].data[2] > 0) + if (gTasks[taskId].tNumBlends > 0) { - if (gTasks[taskId].data[8] == 0) + if (!gTasks[taskId].tRestoreBlend) { - initialBlendAmount = gTasks[taskId].data[3]; - targetBlendAmount = gTasks[taskId].data[4]; + // Blend to designated color + startBlendAmount = gTasks[taskId].tInitialBlendY; + targetBlendAmount = gTasks[taskId].tTargetBlendY; } else { - initialBlendAmount = gTasks[taskId].data[4]; - targetBlendAmount = gTasks[taskId].data[3]; + // Blend back to original color + startBlendAmount = gTasks[taskId].tTargetBlendY; + targetBlendAmount = gTasks[taskId].tInitialBlendY; } - if (gTasks[taskId].data[2] == 1) + if (gTasks[taskId].tNumBlends == 1) targetBlendAmount = 0; - sub_8115BC8(taskId, initialBlendAmount, targetBlendAmount); + BlendColorCycleExclude(taskId, startBlendAmount, targetBlendAmount); } else { @@ -542,58 +561,61 @@ static void sub_8115C18(u8 taskId) } } -void sub_8115C80(u8 taskId) +// See AnimTask_BlendColorCycle. Same, but selects palette by ANIM_TAG_* +void AnimTask_BlendColorCycleByTag(u8 taskId) { u8 paletteIndex; - gTasks[taskId].data[0] = gBattleAnimArgs[0]; - gTasks[taskId].data[1] = gBattleAnimArgs[1]; - gTasks[taskId].data[2] = gBattleAnimArgs[2]; - gTasks[taskId].data[3] = gBattleAnimArgs[3]; - gTasks[taskId].data[4] = gBattleAnimArgs[4]; - gTasks[taskId].data[5] = gBattleAnimArgs[5]; - gTasks[taskId].data[8] = 0; + gTasks[taskId].tPalTag = gBattleAnimArgs[0]; + gTasks[taskId].tDelay = gBattleAnimArgs[1]; + gTasks[taskId].tNumBlends = gBattleAnimArgs[2]; + gTasks[taskId].tInitialBlendY = gBattleAnimArgs[3]; + gTasks[taskId].tTargetBlendY = gBattleAnimArgs[4]; + gTasks[taskId].tBlendColor = gBattleAnimArgs[5]; + gTasks[taskId].tRestoreBlend = FALSE; - sub_8115CD0(taskId, 0, gTasks[taskId].data[4]); - gTasks[taskId].func = sub_8115D2C; + BlendColorCycleByTag(taskId, 0, gTasks[taskId].tTargetBlendY); + gTasks[taskId].func = AnimTask_BlendColorCycleByTagLoop; } -static void sub_8115CD0(u8 taskId, u8 initialBlendAmount, u8 targetBlendAmount) +static void BlendColorCycleByTag(u8 taskId, u8 startBlendAmount, u8 targetBlendAmount) { - u8 paletteIndex = IndexOfSpritePaletteTag(gTasks[taskId].data[0]); + u8 paletteIndex = IndexOfSpritePaletteTag(gTasks[taskId].tPalTag); BeginNormalPaletteFade( 1 << (paletteIndex + 16), - gTasks[taskId].data[1], - initialBlendAmount, + gTasks[taskId].tDelay, + startBlendAmount, targetBlendAmount, - gTasks[taskId].data[5]); + gTasks[taskId].tBlendColor); - gTasks[taskId].data[2]--; - gTasks[taskId].data[8] ^= 1; + gTasks[taskId].tNumBlends--; + gTasks[taskId].tRestoreBlend ^= 1; } -static void sub_8115D2C(u8 taskId) +static void AnimTask_BlendColorCycleByTagLoop(u8 taskId) { - u8 initialBlendAmount, targetBlendAmount; + u8 startBlendAmount, targetBlendAmount; if (!gPaletteFade.active) { - if (gTasks[taskId].data[2] > 0) + if (gTasks[taskId].tNumBlends > 0) { - if (gTasks[taskId].data[8] == 0) + if (!gTasks[taskId].tRestoreBlend) { - initialBlendAmount = gTasks[taskId].data[3]; - targetBlendAmount = gTasks[taskId].data[4]; + // Blend to designated color + startBlendAmount = gTasks[taskId].tInitialBlendY; + targetBlendAmount = gTasks[taskId].tTargetBlendY; } else { - initialBlendAmount = gTasks[taskId].data[4]; - targetBlendAmount = gTasks[taskId].data[3]; + // Blend back to original color + startBlendAmount = gTasks[taskId].tTargetBlendY; + targetBlendAmount = gTasks[taskId].tInitialBlendY; } - if (gTasks[taskId].data[2] == 1) + if (gTasks[taskId].tNumBlends == 1) targetBlendAmount = 0; - sub_8115CD0(taskId, initialBlendAmount, targetBlendAmount); + BlendColorCycleByTag(taskId, startBlendAmount, targetBlendAmount); } else { @@ -602,7 +624,19 @@ static void sub_8115D2C(u8 taskId) } } -void sub_8115D94(u8 taskId) +#undef tPalSelector +#undef tPalTag +#undef tDelay +#undef tNumBlends +#undef tInitialBlendY +#undef tTargetBlendY +#undef tBlendColor +#undef tRestoreBlend +#undef tPalSelectorHi +#undef tPalSelectorLo + +// Flashes the specified anim tag with given color. Used e.g. to flash the particles red in Hyper Beam +void AnimTask_FlashAnimTagWithColor(u8 taskId) { u8 paletteIndex; @@ -623,10 +657,10 @@ void sub_8115D94(u8 taskId) gBattleAnimArgs[4], gBattleAnimArgs[3]); - gTasks[taskId].func = sub_8115E00; + gTasks[taskId].func = AnimTask_FlashAnimTagWithColor_Step1; } -static void sub_8115E00(u8 taskId) +static void AnimTask_FlashAnimTagWithColor_Step1(u8 taskId) { u32 selectedPalettes; @@ -641,7 +675,7 @@ static void sub_8115E00(u8 taskId) if (gTasks[taskId].data[2] == 0) { - gTasks[taskId].func = sub_8115EB8; + gTasks[taskId].func = AnimTask_FlashAnimTagWithColor_Step2; return; } @@ -670,7 +704,7 @@ static void sub_8115E00(u8 taskId) gTasks[taskId].data[2]--; } -static void sub_8115EB8(u8 taskId) +static void AnimTask_FlashAnimTagWithColor_Step2(u8 taskId) { u32 selectedPalettes; @@ -682,7 +716,7 @@ static void sub_8115EB8(u8 taskId) } } -void sub_8115F10(u8 taskId) +void AnimTask_InvertScreenColor(u8 taskId) { u32 selectedPalettes = 0; u8 attackerBattler = gBattleAnimAttacker; @@ -746,11 +780,11 @@ void sub_8115F94(u8 taskId) } } -void sub_81160A4(struct Sprite *sprite) +static void AnimShakeMonOrBattleTerrain(struct Sprite *sprite) { u16 var0; - sprite->invisible = 1; + sprite->invisible = TRUE; sprite->data[0] = -gBattleAnimArgs[0]; sprite->data[1] = gBattleAnimArgs[1]; sprite->data[2] = gBattleAnimArgs[1]; @@ -776,12 +810,12 @@ void sub_81160A4(struct Sprite *sprite) sprite->data[5] = gBattleAnimArgs[3]; var0 = sprite->data[5] - 2; if (var0 < 2) - sub_81161F4(); + AnimShakeMonOrBattleTerrain_UpdateCoordOffsetEnabled(); - sprite->callback = sub_8116148; + sprite->callback = AnimShakeMonOrBattleTerrain_Step; } -static void sub_8116148(struct Sprite *sprite) +static void AnimShakeMonOrBattleTerrain_Step(struct Sprite *sprite) { u8 i; u16 var0; @@ -807,61 +841,73 @@ static void sub_8116148(struct Sprite *sprite) if (var0 < 2) { for (i = 0; i < gBattlersCount; i++) - gSprites[gBattlerSpriteIds[i]].coordOffsetEnabled = 0; + gSprites[gBattlerSpriteIds[i]].coordOffsetEnabled = FALSE; } DestroyAnimSprite(sprite); } } -static void sub_81161F4(void) +static void AnimShakeMonOrBattleTerrain_UpdateCoordOffsetEnabled(void) { - gSprites[gBattlerSpriteIds[gBattleAnimAttacker]].coordOffsetEnabled = 0; - gSprites[gBattlerSpriteIds[gBattleAnimTarget]].coordOffsetEnabled = 0; + gSprites[gBattlerSpriteIds[gBattleAnimAttacker]].coordOffsetEnabled = FALSE; + gSprites[gBattlerSpriteIds[gBattleAnimTarget]].coordOffsetEnabled = FALSE; if (gBattleAnimArgs[4] == 2) { - gSprites[gBattlerSpriteIds[gBattleAnimAttacker]].coordOffsetEnabled = 1; - gSprites[gBattlerSpriteIds[gBattleAnimTarget]].coordOffsetEnabled = 1; + gSprites[gBattlerSpriteIds[gBattleAnimAttacker]].coordOffsetEnabled = TRUE; + gSprites[gBattlerSpriteIds[gBattleAnimTarget]].coordOffsetEnabled = TRUE; } else { if (gBattleAnimArgs[4] == 0) - gSprites[gBattlerSpriteIds[gBattleAnimAttacker]].coordOffsetEnabled = 1; + gSprites[gBattlerSpriteIds[gBattleAnimAttacker]].coordOffsetEnabled = TRUE; else - gSprites[gBattlerSpriteIds[gBattleAnimTarget]].coordOffsetEnabled = 1; + gSprites[gBattlerSpriteIds[gBattleAnimTarget]].coordOffsetEnabled = TRUE; } } -void sub_81162A4(u8 taskId) +// Task data for AnimTask_ShakeBattleTerrain +#define tXOffset data[0] +#define tYOffset data[1] +#define tNumShakes data[2] +#define tTimer data[3] +#define tShakeDelay data[8] + +// Can shake battle terrain back and forth on the X or down and back to original pos on Y (cant shake up from orig pos) +// arg0: x offset of shake +// arg1: y offset of shake +// arg2: number of shakes +// arg3: time between shakes +void AnimTask_ShakeBattleTerrain(u8 taskId) { - gTasks[taskId].data[0] = gBattleAnimArgs[0]; - gTasks[taskId].data[1] = gBattleAnimArgs[1]; - gTasks[taskId].data[2] = gBattleAnimArgs[2]; - gTasks[taskId].data[3] = gBattleAnimArgs[3]; - gTasks[taskId].data[8] = gBattleAnimArgs[3]; + gTasks[taskId].tXOffset = gBattleAnimArgs[0]; + gTasks[taskId].tYOffset = gBattleAnimArgs[1]; + gTasks[taskId].tNumShakes = gBattleAnimArgs[2]; + gTasks[taskId].tTimer = gBattleAnimArgs[3]; + gTasks[taskId].tShakeDelay = gBattleAnimArgs[3]; gBattle_BG3_X = gBattleAnimArgs[0]; gBattle_BG3_Y = gBattleAnimArgs[1]; - gTasks[taskId].func = sub_81162F8; + gTasks[taskId].func = AnimTask_ShakeBattleTerrain_Step; gTasks[taskId].func(taskId); } -static void sub_81162F8(u8 taskId) +static void AnimTask_ShakeBattleTerrain_Step(u8 taskId) { - if (gTasks[taskId].data[3] == 0) + if (gTasks[taskId].tTimer == 0) { - if (gBattle_BG3_X == gTasks[taskId].data[0]) - gBattle_BG3_X = -gTasks[taskId].data[0]; + if (gBattle_BG3_X == gTasks[taskId].tXOffset) + gBattle_BG3_X = -gTasks[taskId].tXOffset; else - gBattle_BG3_X = gTasks[taskId].data[0]; + gBattle_BG3_X = gTasks[taskId].tXOffset; - if (gBattle_BG3_Y == -gTasks[taskId].data[1]) + if (gBattle_BG3_Y == -gTasks[taskId].tYOffset) gBattle_BG3_Y = 0; else - gBattle_BG3_Y = -gTasks[taskId].data[1]; + gBattle_BG3_Y = -gTasks[taskId].tYOffset; - gTasks[taskId].data[3] = gTasks[taskId].data[8]; - if (--gTasks[taskId].data[2] == 0) + gTasks[taskId].tTimer = gTasks[taskId].tShakeDelay; + if (--gTasks[taskId].tNumShakes == 0) { gBattle_BG3_X = 0; gBattle_BG3_Y = 0; @@ -870,14 +916,20 @@ static void sub_81162F8(u8 taskId) } else { - gTasks[taskId].data[3]--; + gTasks[taskId].tTimer--; } } -void sub_8116388(struct Sprite *sprite) +#undef tXOffset +#undef tYOffset +#undef tNumShakes +#undef tTimer +#undef tShakeDelay + +static void AnimHitSplatBasic(struct Sprite *sprite) { StartSpriteAffineAnim(sprite, gBattleAnimArgs[3]); - if (gBattleAnimArgs[2] == 0) + if (gBattleAnimArgs[2] == ANIM_ATTACKER) InitSpritePosToAnimAttacker(sprite, 1); else InitSpritePosToAnimTarget(sprite, TRUE); @@ -886,34 +938,37 @@ void sub_8116388(struct Sprite *sprite) StoreSpriteCallbackInData6(sprite, DestroyAnimSprite); } -static void sub_81163D0(struct Sprite *sprite) +// Same as basic hit splat but takes a length of time to persist for (arg4) +static void AnimHitSplatPersistent(struct Sprite *sprite) { StartSpriteAffineAnim(sprite, gBattleAnimArgs[3]); - if (gBattleAnimArgs[2] == 0) + if (gBattleAnimArgs[2] == ANIM_ATTACKER) InitSpritePosToAnimAttacker(sprite, 1); else InitSpritePosToAnimTarget(sprite, TRUE); sprite->data[0] = gBattleAnimArgs[4]; sprite->callback = RunStoredCallbackWhenAffineAnimEnds; - StoreSpriteCallbackInData6(sprite, sub_810E2C8); + StoreSpriteCallbackInData6(sprite, DestroyAnimSpriteAfterTimer); } -void sub_8116420(struct Sprite *sprite) +// For paired hit splats whose position is inverted when used by the opponent on the player. +// Used by Twineedle and Spike Cannon +static void AnimHitSplatHandleInvert(struct Sprite *sprite) { if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER && !IsContest()) gBattleAnimArgs[1] = -gBattleAnimArgs[1]; - sub_8116388(sprite); + AnimHitSplatBasic(sprite); } -void sub_8116458(struct Sprite *sprite) +static void AnimHitSplatRandom(struct Sprite *sprite) { if (gBattleAnimArgs[1] == -1) gBattleAnimArgs[1] = Random2() & 3; StartSpriteAffineAnim(sprite, gBattleAnimArgs[1]); - if (gBattleAnimArgs[0] == 0) + if (gBattleAnimArgs[0] == ANIM_ATTACKER) InitSpritePosToAnimAttacker(sprite, 0); else InitSpritePosToAnimTarget(sprite, FALSE); @@ -925,7 +980,7 @@ void sub_8116458(struct Sprite *sprite) sprite->callback = RunStoredCallbackWhenAffineAnimEnds; } -void sub_81164F0(struct Sprite *sprite) +static void AnimHitSplatOnMonEdge(struct Sprite *sprite) { sprite->data[0] = GetAnimBattlerSpriteId(gBattleAnimArgs[0]); sprite->pos1.x = gSprites[sprite->data[0]].pos1.x + gSprites[sprite->data[0]].pos2.x; @@ -937,9 +992,9 @@ void sub_81164F0(struct Sprite *sprite) sprite->callback = RunStoredCallbackWhenAffineAnimEnds; } -void sub_8116560(struct Sprite *sprite) +static void AnimCrossImpact(struct Sprite *sprite) { - if (gBattleAnimArgs[2] == 0) + if (gBattleAnimArgs[2] == ANIM_ATTACKER) InitSpritePosToAnimAttacker(sprite, 1); else InitSpritePosToAnimTarget(sprite, TRUE); @@ -949,18 +1004,18 @@ void sub_8116560(struct Sprite *sprite) sprite->callback = WaitAnimForDuration; } -void sub_81165A8(struct Sprite *sprite) +static void AnimFlashingHitSplat(struct Sprite *sprite) { StartSpriteAffineAnim(sprite, gBattleAnimArgs[3]); - if (gBattleAnimArgs[2] == 0) + if (gBattleAnimArgs[2] == ANIM_ATTACKER) InitSpritePosToAnimAttacker(sprite, 1); else InitSpritePosToAnimTarget(sprite, TRUE); - sprite->callback = sub_81165E4; + sprite->callback = AnimFlashingHitSplat_Step; } -static void sub_81165E4(struct Sprite *sprite) +static void AnimFlashingHitSplat_Step(struct Sprite *sprite) { sprite->invisible ^= 1; if (sprite->data[0]++ > 12) diff --git a/src/poison.c b/src/battle_anim_poison.c similarity index 61% rename from src/poison.c rename to src/battle_anim_poison.c index 42e7d6a58..bc5624249 100644 --- a/src/poison.c +++ b/src/battle_anim_poison.c @@ -3,19 +3,17 @@ #include "trig.h" #include "constants/rgb.h" -void sub_810DBAC(struct Sprite *); -void sub_810DC2C(struct Sprite *); -void sub_810DCD0(struct Sprite *); -void sub_810DD50(struct Sprite *); -void AnimBubbleEffect(struct Sprite *); -static void sub_810DC10(struct Sprite *); -static void sub_810DCB4(struct Sprite *); -static void sub_810DD24(struct Sprite *); -static void AnimBubbleEffectStep(struct Sprite *); +static void AnimSludgeProjectile(struct Sprite *); +static void AnimSludgeProjectile_Step(struct Sprite *); +static void AnimAcidPoisonBubble(struct Sprite *); +static void AnimAcidPoisonBubble_Step(struct Sprite *); +static void AnimSludgeBombHitParticle(struct Sprite *); +static void AnimSludgeBombHitParticle_Step(struct Sprite *); +static void AnimAcidPoisonDroplet(struct Sprite *); +static void AnimBubbleEffect(struct Sprite *); +static void AnimBubbleEffect_Step(struct Sprite *); -extern const union AnimCmd *const gUnknown_08595200[]; - -const union AnimCmd gUnknown_0859611C[] = +static const union AnimCmd sAnim_ToxicBubble[] = { ANIMCMD_FRAME(0, 5), ANIMCMD_FRAME(8, 5), @@ -24,56 +22,56 @@ const union AnimCmd gUnknown_0859611C[] = ANIMCMD_END, }; -const union AnimCmd *const gUnknown_08596130[] = +static const union AnimCmd *const sAnims_ToxicBubble[] = { - gUnknown_0859611C, + sAnim_ToxicBubble, }; -const struct SpriteTemplate gUnknown_08596134 = +const struct SpriteTemplate gToxicBubbleSpriteTemplate = { .tileTag = ANIM_TAG_TOXIC_BUBBLE, .paletteTag = ANIM_TAG_TOXIC_BUBBLE, .oam = &gOamData_AffineOff_ObjNormal_16x32, - .anims = gUnknown_08596130, + .anims = sAnims_ToxicBubble, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, .callback = AnimSpriteOnMonPos, }; -const union AnimCmd gUnknown_0859614C[] = +static const union AnimCmd sAnim_PoisonProjectile[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -const union AnimCmd gUnknown_08596154[] = +static const union AnimCmd sAnim_AcidPoisonDroplet[] = { ANIMCMD_FRAME(4, 1), ANIMCMD_END, }; -const union AnimCmd gUnknown_0859615C[] = +static const union AnimCmd sAnim_SludgeBombHit[] = { ANIMCMD_FRAME(8, 1), ANIMCMD_END, }; -const union AnimCmd *const gUnknown_08596164[] = +static const union AnimCmd *const sAnims_PoisonProjectile[] = { - gUnknown_0859614C, + sAnim_PoisonProjectile, }; -const union AnimCmd *const gUnknown_08596168[] = +static const union AnimCmd *const sAnims_AcidPoisonDroplet[] = { - gUnknown_08596154, + sAnim_AcidPoisonDroplet, }; -const union AnimCmd *const gUnknown_0859616C[] = +static const union AnimCmd *const sAnims_SludgeBombHit[] = { - gUnknown_0859615C, + sAnim_SludgeBombHit, }; -const union AffineAnimCmd gUnknown_08596170[] = +static const union AffineAnimCmd sAffineAnim_PoisonProjectile[] = { AFFINEANIMCMD_FRAME(0x160, 0x160, 0, 0), AFFINEANIMCMD_FRAME(0xFFF6, 0xFFF6, 0, 10), @@ -81,88 +79,88 @@ const union AffineAnimCmd gUnknown_08596170[] = AFFINEANIMCMD_JUMP(0), }; -const union AffineAnimCmd gUnknown_08596190[] = +static const union AffineAnimCmd sAffineAnim_SludgeBombHit[] = { AFFINEANIMCMD_FRAME(0xEC, 0xEC, 0, 0), AFFINEANIMCMD_END, }; -const union AffineAnimCmd *const gUnknown_085961A0[] = +static const union AffineAnimCmd *const sAffineAnims_PoisonProjectile[] = { - gUnknown_08596170, + sAffineAnim_PoisonProjectile, }; -const union AffineAnimCmd *const gUnknown_085961A4[] = +static const union AffineAnimCmd *const sAffineAnims_SludgeBombHit[] = { - gUnknown_08596190, + sAffineAnim_SludgeBombHit, }; -const struct SpriteTemplate gUnknown_085961A8 = +const struct SpriteTemplate gSludgeProjectileSpriteTemplate = { .tileTag = ANIM_TAG_POISON_BUBBLE, .paletteTag = ANIM_TAG_POISON_BUBBLE, .oam = &gOamData_AffineDouble_ObjNormal_16x16, - .anims = gUnknown_08596164, + .anims = sAnims_PoisonProjectile, .images = NULL, - .affineAnims = gUnknown_085961A0, - .callback = sub_810DBAC, + .affineAnims = sAffineAnims_PoisonProjectile, + .callback = AnimSludgeProjectile, }; -const struct SpriteTemplate gUnknown_085961C0 = +const struct SpriteTemplate gAcidPoisonBubbleSpriteTemplate = { .tileTag = ANIM_TAG_POISON_BUBBLE, .paletteTag = ANIM_TAG_POISON_BUBBLE, .oam = &gOamData_AffineDouble_ObjNormal_16x16, - .anims = gUnknown_08596164, + .anims = sAnims_PoisonProjectile, .images = NULL, - .affineAnims = gUnknown_085961A0, - .callback = sub_810DC2C, + .affineAnims = sAffineAnims_PoisonProjectile, + .callback = AnimAcidPoisonBubble, }; -const struct SpriteTemplate gUnknown_085961D8 = +const struct SpriteTemplate gSludgeBombHitParticleSpriteTemplate = { .tileTag = ANIM_TAG_POISON_BUBBLE, .paletteTag = ANIM_TAG_POISON_BUBBLE, .oam = &gOamData_AffineNormal_ObjNormal_16x16, - .anims = gUnknown_0859616C, + .anims = sAnims_SludgeBombHit, .images = NULL, - .affineAnims = gUnknown_085961A4, - .callback = sub_810DCD0, + .affineAnims = sAffineAnims_SludgeBombHit, + .callback = AnimSludgeBombHitParticle, }; -const union AffineAnimCmd gUnknown_085961F0[] = +static const union AffineAnimCmd sAffineAnim_AcidPoisonDroplet[] = { AFFINEANIMCMD_FRAME(0xFFF0, 0x10, 0, 6), AFFINEANIMCMD_FRAME(0x10, 0xFFF0, 0, 6), AFFINEANIMCMD_JUMP(0), }; -const union AffineAnimCmd *const gUnknown_08596208[] = +const union AffineAnimCmd *const gAffineAnims_Droplet[] = { - gUnknown_085961F0, + sAffineAnim_AcidPoisonDroplet, }; -const struct SpriteTemplate gUnknown_0859620C = +const struct SpriteTemplate gAcidPoisonDropletSpriteTemplate = { .tileTag = ANIM_TAG_POISON_BUBBLE, .paletteTag = ANIM_TAG_POISON_BUBBLE, .oam = &gOamData_AffineDouble_ObjNormal_16x16, - .anims = gUnknown_08596168, + .anims = sAnims_AcidPoisonDroplet, .images = NULL, - .affineAnims = gUnknown_08596208, - .callback = sub_810DD50, + .affineAnims = gAffineAnims_Droplet, + .callback = AnimAcidPoisonDroplet, }; -const union AffineAnimCmd gUnknown_08596224[] = +static const union AffineAnimCmd sAffineAnim_Bubble[] = { AFFINEANIMCMD_FRAME(0x9C, 0x9C, 0, 0), AFFINEANIMCMD_FRAME(0x5, 0x5, 0, 20), AFFINEANIMCMD_END, }; -const union AffineAnimCmd *const gUnknown_0859623C[] = +static const union AffineAnimCmd *const sAffineAnims_Bubble[] = { - gUnknown_08596224, + sAffineAnim_Bubble, }; const struct SpriteTemplate gPoisonBubbleSpriteTemplate = @@ -170,9 +168,9 @@ const struct SpriteTemplate gPoisonBubbleSpriteTemplate = .tileTag = ANIM_TAG_POISON_BUBBLE, .paletteTag = ANIM_TAG_POISON_BUBBLE, .oam = &gOamData_AffineNormal_ObjNormal_16x16, - .anims = gUnknown_08596164, + .anims = sAnims_PoisonProjectile, .images = NULL, - .affineAnims = gUnknown_0859623C, + .affineAnims = sAffineAnims_Bubble, .callback = AnimBubbleEffect, }; @@ -181,13 +179,13 @@ const struct SpriteTemplate gWaterBubbleSpriteTemplate = .tileTag = ANIM_TAG_SMALL_BUBBLES, .paletteTag = ANIM_TAG_SMALL_BUBBLES, .oam = &gOamData_AffineNormal_ObjBlend_16x16, - .anims = gUnknown_08595200, + .anims = gAnims_WaterBubble, .images = NULL, - .affineAnims = gUnknown_0859623C, + .affineAnims = sAffineAnims_Bubble, .callback = AnimBubbleEffect, }; -void sub_810DBAC(struct Sprite *sprite) +static void AnimSludgeProjectile(struct Sprite *sprite) { if (!gBattleAnimArgs[3]) StartSpriteAnim(sprite, 2); @@ -201,16 +199,16 @@ void sub_810DBAC(struct Sprite *sprite) InitAnimArcTranslation(sprite); - sprite->callback = sub_810DC10; + sprite->callback = AnimSludgeProjectile_Step; } -static void sub_810DC10(struct Sprite *sprite) +static void AnimSludgeProjectile_Step(struct Sprite *sprite) { if (TranslateAnimHorizontalArc(sprite)) DestroyAnimSprite(sprite); } -void sub_810DC2C(struct Sprite *sprite) +static void AnimAcidPoisonBubble(struct Sprite *sprite) { s16 l1, l2; if (!gBattleAnimArgs[3]) @@ -229,16 +227,16 @@ void sub_810DC2C(struct Sprite *sprite) InitAnimArcTranslation(sprite); - sprite->callback = sub_810DCB4; + sprite->callback = AnimAcidPoisonBubble_Step; } -static void sub_810DCB4(struct Sprite *sprite) +static void AnimAcidPoisonBubble_Step(struct Sprite *sprite) { if (TranslateAnimHorizontalArc(sprite)) DestroyAnimSprite(sprite); } -void sub_810DCD0(struct Sprite *sprite) +static void AnimSludgeBombHitParticle(struct Sprite *sprite) { sprite->data[0] = gBattleAnimArgs[2]; sprite->data[1] = sprite->pos1.x; @@ -251,10 +249,10 @@ void sub_810DCD0(struct Sprite *sprite) sprite->data[5] = sprite->data[1] / gBattleAnimArgs[2]; sprite->data[6] = sprite->data[2] / gBattleAnimArgs[2]; - sprite->callback = sub_810DD24; + sprite->callback = AnimSludgeBombHitParticle_Step; } -static void sub_810DD24(struct Sprite *sprite) +static void AnimSludgeBombHitParticle_Step(struct Sprite *sprite) { TranslateSpriteLinearFixedPoint(sprite); @@ -265,7 +263,7 @@ static void sub_810DD24(struct Sprite *sprite) DestroyAnimSprite(sprite); } -void sub_810DD50(struct Sprite *sprite) +static void AnimAcidPoisonDroplet(struct Sprite *sprite) { SetAverageBattlerPositions(gBattleAnimTarget, TRUE, &sprite->pos1.x, &sprite->pos1.y); @@ -289,7 +287,7 @@ void sub_810DD50(struct Sprite *sprite) // arg 0: initial x pixel offset // arg 1: initial y pixel offset // arg 2: 0 = single-target, 1 = multi-target -void AnimBubbleEffect(struct Sprite *sprite) +static void AnimBubbleEffect(struct Sprite *sprite) { if (!gBattleAnimArgs[2]) { @@ -306,10 +304,10 @@ void AnimBubbleEffect(struct Sprite *sprite) sprite->pos1.y += gBattleAnimArgs[1]; } - sprite->callback = AnimBubbleEffectStep; + sprite->callback = AnimBubbleEffect_Step; } -static void AnimBubbleEffectStep(struct Sprite *sprite) +static void AnimBubbleEffect_Step(struct Sprite *sprite) { sprite->data[0] = (sprite->data[0] + 0xB) & 0xFF; sprite->pos2.x = Sin(sprite->data[0], 4); diff --git a/src/psychic.c b/src/battle_anim_psychic.c similarity index 76% rename from src/psychic.c rename to src/battle_anim_psychic.c index 656608740..7918698fc 100644 --- a/src/psychic.c +++ b/src/battle_anim_psychic.c @@ -8,51 +8,51 @@ #include "constants/rgb.h" #include "constants/songs.h" -void sub_810F1EC(struct Sprite *); -void sub_810F58C(struct Sprite *); -void sub_810F634(struct Sprite *); -void sub_810F6B0(struct Sprite *); -void sub_810FBA8(struct Sprite *); -void sub_810FDF0(struct Sprite *); -void sub_8110240(struct Sprite *); -static void sub_810F340(struct Sprite *); -static void sub_810F3C8(struct Sprite *); -static void sub_810F400(struct Sprite *); -static void sub_810F46C(struct Sprite *); -static void sub_810F524(struct Sprite *); -static void sub_810F740(struct Sprite *); -static void sub_810F774(struct Sprite *); -static void sub_810F810(u8); -static void sub_810F898(u8); -static void sub_810F9D4(u8); -static void sub_810FD3C(u8); -static void sub_810FF34(u8); -static void sub_8110134(u8); +static void AnimDefensiveWall(struct Sprite *); +static void AnimDefensiveWall_Step1(struct Sprite *); +static void AnimDefensiveWall_Step2(struct Sprite *); +static void AnimDefensiveWall_Step3(struct Sprite *); +static void AnimDefensiveWall_Step4(struct Sprite *); +static void AnimDefensiveWall_Step5(struct Sprite *); +static void AnimWallSparkle(struct Sprite *); +static void AnimBentSpoon(struct Sprite *); +static void AnimQuestionMark(struct Sprite *); +static void AnimQuestionMark_Step1(struct Sprite *); +static void AnimQuestionMark_Step2(struct Sprite *); +static void AnimRedX(struct Sprite *); +static void AnimSkillSwapOrb(struct Sprite *); +static void AnimPsychoBoost(struct Sprite *); +static void AnimTask_MeditateStretchAttacker_Step(u8); +static void AnimTask_Teleport_Step(u8); +static void AnimTask_ImprisonOrbs_Step(u8); +static void AnimTask_SkillSwap_Step(u8); +static void AnimTask_ExtrasensoryDistortion_Step(u8); +static void AnimTask_TransparentCloneGrowAndShrink_Step(u8); -const union AffineAnimCmd gUnknown_0859652C[] = +static const union AffineAnimCmd sAffineAnim_PsychUpSpiral[] = { AFFINEANIMCMD_FRAME(0x100, 0x100, 0, 0), AFFINEANIMCMD_FRAME(0xFFFE, 0xFFFE, -10, 120), AFFINEANIMCMD_END, }; -const union AffineAnimCmd *const gUnknown_08596544[] = +static const union AffineAnimCmd *const sAffineAnims_PsychUpSpiral[] = { - gUnknown_0859652C, + sAffineAnim_PsychUpSpiral, }; -const struct SpriteTemplate gUnknown_08596548 = +const struct SpriteTemplate gPsychUpSpiralSpriteTemplate = { .tileTag = ANIM_TAG_SPIRAL, .paletteTag = ANIM_TAG_SPIRAL, .oam = &gOamData_AffineNormal_ObjBlend_64x64, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_08596544, + .affineAnims = sAffineAnims_PsychUpSpiral, .callback = AnimSpriteOnMonPos, }; -const struct SpriteTemplate gUnknown_08596560 = +const struct SpriteTemplate gLightScreenWallSpriteTemplate = { .tileTag = ANIM_TAG_GREEN_LIGHT_WALL, .paletteTag = ANIM_TAG_GREEN_LIGHT_WALL, @@ -60,10 +60,10 @@ const struct SpriteTemplate gUnknown_08596560 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_810F1EC, + .callback = AnimDefensiveWall, }; -const struct SpriteTemplate gUnknown_08596578 = +const struct SpriteTemplate gReflectWallSpriteTemplate = { .tileTag = ANIM_TAG_BLUE_LIGHT_WALL, .paletteTag = ANIM_TAG_BLUE_LIGHT_WALL, @@ -71,10 +71,10 @@ const struct SpriteTemplate gUnknown_08596578 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_810F1EC, + .callback = AnimDefensiveWall, }; -const struct SpriteTemplate gUnknown_08596590 = +const struct SpriteTemplate gMirrorCoatWallSpriteTemplate = { .tileTag = ANIM_TAG_RED_LIGHT_WALL, .paletteTag = ANIM_TAG_RED_LIGHT_WALL, @@ -82,10 +82,10 @@ const struct SpriteTemplate gUnknown_08596590 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_810F1EC, + .callback = AnimDefensiveWall, }; -const struct SpriteTemplate gUnknown_085965A8 = +const struct SpriteTemplate gBarrierWallSpriteTemplate = { .tileTag = ANIM_TAG_GRAY_LIGHT_WALL, .paletteTag = ANIM_TAG_GRAY_LIGHT_WALL, @@ -93,10 +93,10 @@ const struct SpriteTemplate gUnknown_085965A8 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_810F1EC, + .callback = AnimDefensiveWall, }; -const struct SpriteTemplate gUnknown_085965C0 = +const struct SpriteTemplate gMagicCoatWallSpriteTemplate = { .tileTag = ANIM_TAG_ORANGE_LIGHT_WALL, .paletteTag = ANIM_TAG_ORANGE_LIGHT_WALL, @@ -104,10 +104,10 @@ const struct SpriteTemplate gUnknown_085965C0 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_810F1EC, + .callback = AnimDefensiveWall, }; -const union AnimCmd gUnknown_085965D8[] = +static const union AnimCmd sAnim_ReflectSparkle[] = { ANIMCMD_FRAME(0, 3), ANIMCMD_FRAME(16, 3), @@ -117,23 +117,23 @@ const union AnimCmd gUnknown_085965D8[] = ANIMCMD_END, }; -const union AnimCmd *const gUnknown_085965F0[] = +static const union AnimCmd *const sAnims_ReflectSparkle[] = { - gUnknown_085965D8, + sAnim_ReflectSparkle, }; -const struct SpriteTemplate gUnknown_085965F4 = +const struct SpriteTemplate gReflectSparkleSpriteTemplate = { .tileTag = ANIM_TAG_SPARKLE_4, .paletteTag = ANIM_TAG_SPARKLE_4, .oam = &gOamData_AffineOff_ObjNormal_32x32, - .anims = gUnknown_085965F0, + .anims = sAnims_ReflectSparkle, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_810F58C, + .callback = AnimWallSparkle, }; -const union AnimCmd gUnknown_0859660C[] = +static const union AnimCmd sAnim_SpecialScreenSparkle[] = { ANIMCMD_FRAME(0, 5), ANIMCMD_FRAME(4, 5), @@ -142,23 +142,23 @@ const union AnimCmd gUnknown_0859660C[] = ANIMCMD_END, }; -const union AnimCmd *const gUnknown_08596620[] = +static const union AnimCmd *const sAnims_SpecialScreenSparkle[] = { - gUnknown_0859660C, + sAnim_SpecialScreenSparkle, }; -const struct SpriteTemplate gUnknown_08596624 = +const struct SpriteTemplate gSpecialScreenSparkleSpriteTemplate = { .tileTag = ANIM_TAG_SPARKLE_3, .paletteTag = ANIM_TAG_SPARKLE_3, .oam = &gOamData_AffineOff_ObjNormal_16x16, - .anims = gUnknown_08596620, + .anims = sAnims_SpecialScreenSparkle, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_810F58C, + .callback = AnimWallSparkle, }; -const struct SpriteTemplate gUnknown_0859663C = +const struct SpriteTemplate gGoldRingSpriteTemplate = { .tileTag = ANIM_TAG_GOLD_RING, .paletteTag = ANIM_TAG_GOLD_RING, @@ -169,7 +169,7 @@ const struct SpriteTemplate gUnknown_0859663C = .callback = TranslateAnimSpriteToTargetMonLocation, }; -const union AnimCmd gUnknown_08596654[] = +static const union AnimCmd sAnim_BentSpoon_0[] = { ANIMCMD_FRAME(8, 60, .hFlip = TRUE), ANIMCMD_FRAME(16, 5, .hFlip = TRUE), @@ -189,7 +189,7 @@ const union AnimCmd gUnknown_08596654[] = ANIMCMD_END, }; -const union AnimCmd gUnknown_08596694[] = +static const union AnimCmd sAnim_BentSpoon_1[] = { ANIMCMD_FRAME(8, 60), ANIMCMD_FRAME(16, 5), @@ -209,24 +209,24 @@ const union AnimCmd gUnknown_08596694[] = ANIMCMD_END, }; -const union AnimCmd *const gUnknown_085966D4[] = +static const union AnimCmd *const sAnims_BentSpoon[] = { - gUnknown_08596654, - gUnknown_08596694, + sAnim_BentSpoon_0, + sAnim_BentSpoon_1, }; -const struct SpriteTemplate gUnknown_085966DC = +const struct SpriteTemplate gBentSpoonSpriteTemplate = { .tileTag = ANIM_TAG_BENT_SPOON, .paletteTag = ANIM_TAG_BENT_SPOON, .oam = &gOamData_AffineOff_ObjNormal_16x32, - .anims = gUnknown_085966D4, + .anims = sAnims_BentSpoon, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_810F634, + .callback = AnimBentSpoon, }; -const union AnimCmd gUnknown_085966F4[] = +static const union AnimCmd sAnim_QuestionMark[] = { ANIMCMD_FRAME(0, 6), ANIMCMD_FRAME(16, 6), @@ -238,12 +238,12 @@ const union AnimCmd gUnknown_085966F4[] = ANIMCMD_END, }; -const union AnimCmd *const gUnknown_08596714[] = +static const union AnimCmd *const sAnims_QuestionMark[] = { - gUnknown_085966F4, + sAnim_QuestionMark, }; -const union AffineAnimCmd gUnknown_08596718[] = +static const union AffineAnimCmd sAffineAnim_QuestionMark[] = { AFFINEANIMCMD_FRAME(0, 0, 4, 4), AFFINEANIMCMD_FRAME(0, 0, -4, 8), @@ -252,23 +252,23 @@ const union AffineAnimCmd gUnknown_08596718[] = AFFINEANIMCMD_END, }; -const union AffineAnimCmd *const gUnknown_08596740[] = +static const union AffineAnimCmd *const sAffineAnims_QuestionMark[] = { - gUnknown_08596718, + sAffineAnim_QuestionMark, }; -const struct SpriteTemplate gUnknown_08596744 = +const struct SpriteTemplate gQuestionMarkSpriteTemplate = { .tileTag = ANIM_TAG_AMNESIA, .paletteTag = ANIM_TAG_AMNESIA, .oam = &gOamData_AffineOff_ObjNormal_32x32, - .anims = gUnknown_08596714, + .anims = sAnims_QuestionMark, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_810F6B0, + .callback = AnimQuestionMark, }; -const union AffineAnimCmd gUnknown_0859675C[] = +static const union AffineAnimCmd sAffineAnim_MeditateStretchAttacker[] = { AFFINEANIMCMD_FRAME(-8, 10, 0, 16), AFFINEANIMCMD_FRAME(18, -18, 0, 16), @@ -276,14 +276,14 @@ const union AffineAnimCmd gUnknown_0859675C[] = AFFINEANIMCMD_END, }; -const union AffineAnimCmd gUnknown_0859677C[] = +static const union AffineAnimCmd sAffineAnim_Teleport[] = { AFFINEANIMCMD_FRAME(64, -4, 0, 20), AFFINEANIMCMD_FRAME(0, 0, 0, -56), AFFINEANIMCMD_END, }; -const struct SpriteTemplate gUnknown_08596794 = +const struct SpriteTemplate gImprisonOrbSpriteTemplate = { .tileTag = ANIM_TAG_HOLLOW_ORB, .paletteTag = ANIM_TAG_HOLLOW_ORB, @@ -294,25 +294,25 @@ const struct SpriteTemplate gUnknown_08596794 = .callback = SpriteCallbackDummy, }; -const struct SpriteTemplate gUnknown_085967AC = +const struct SpriteTemplate gRedXSpriteTemplate = { - .tileTag = 10250, - .paletteTag = 10250, + .tileTag = ANIM_TAG_X_SIGN, + .paletteTag = ANIM_TAG_X_SIGN, .oam = &gOamData_AffineOff_ObjNormal_64x64, .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_810FBA8, + .callback = AnimRedX, }; -const union AffineAnimCmd gUnknown_085967C4[] = +static const union AffineAnimCmd sAffineAnim_SkillSwapOrb_0[] = { AFFINEANIMCMD_FRAME(0xFFF8, 0xFFF8, 0, 8), AFFINEANIMCMD_FRAME(0x8, 0x8, 0, 8), AFFINEANIMCMD_JUMP(0), }; -const union AffineAnimCmd gUnknown_085967DC[] = +static const union AffineAnimCmd sAffineAnim_SkillSwapOrb_1[] = { AFFINEANIMCMD_FRAME(0xF0, 0xF0, 0, 0), AFFINEANIMCMD_FRAME(0xFFF8, 0xFFF8, 0, 6), @@ -321,7 +321,7 @@ const union AffineAnimCmd gUnknown_085967DC[] = AFFINEANIMCMD_JUMP(1), }; -const union AffineAnimCmd gUnknown_08596804[] = +static const union AffineAnimCmd sAffineAnim_SkillSwapOrb_2[] = { AFFINEANIMCMD_FRAME(0xD0, 0xD0, 0, 0), AFFINEANIMCMD_FRAME(0xFFF8, 0xFFF8, 0, 4), @@ -330,7 +330,7 @@ const union AffineAnimCmd gUnknown_08596804[] = AFFINEANIMCMD_JUMP(1), }; -const union AffineAnimCmd gUnknown_0859682C[] = +static const union AffineAnimCmd sAffineAnim_SkillSwapOrb_3[] = { AFFINEANIMCMD_FRAME(0xB0, 0xB0, 0, 0), AFFINEANIMCMD_FRAME(0xFFF8, 0xFFF8, 0, 2), @@ -339,49 +339,49 @@ const union AffineAnimCmd gUnknown_0859682C[] = AFFINEANIMCMD_JUMP(1), }; -const union AffineAnimCmd *const gUnknown_08596854[] = +static const union AffineAnimCmd *const sAffineAnims_SkillSwapOrb[] = { - gUnknown_085967C4, - gUnknown_085967DC, - gUnknown_08596804, - gUnknown_0859682C, + sAffineAnim_SkillSwapOrb_0, + sAffineAnim_SkillSwapOrb_1, + sAffineAnim_SkillSwapOrb_2, + sAffineAnim_SkillSwapOrb_3, }; -const struct SpriteTemplate gUnknown_08596864 = +const struct SpriteTemplate gSkillSwapOrbSpriteTemplate = { .tileTag = ANIM_TAG_BLUEGREEN_ORB, .paletteTag = ANIM_TAG_BLUEGREEN_ORB, .oam = &gOamData_AffineNormal_ObjNormal_16x16, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_08596854, - .callback = sub_810FDF0, + .affineAnims = sAffineAnims_SkillSwapOrb, + .callback = AnimSkillSwapOrb, }; -const union AffineAnimCmd gUnknown_0859687C[] = +static const union AffineAnimCmd sAffineAnim_LusterPurgeCircle[] = { AFFINEANIMCMD_FRAME(0x20, 0x20, 0, 0), AFFINEANIMCMD_FRAME(0x4, 0x4, 0, 120), AFFINEANIMCMD_END_ALT(1), }; -const union AffineAnimCmd *const gUnknown_08596894[] = +static const union AffineAnimCmd *const sAffineAnims_LusterPurgeCircle[] = { - gUnknown_0859687C, + sAffineAnim_LusterPurgeCircle, }; -const struct SpriteTemplate gUnknown_08596898 = +const struct SpriteTemplate gLusterPurgeCircleSpriteTemplate = { .tileTag = ANIM_TAG_WHITE_CIRCLE_OF_LIGHT, .paletteTag = ANIM_TAG_WHITE_CIRCLE_OF_LIGHT, .oam = &gOamData_AffineDouble_ObjBlend_64x64, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_08596894, + .affineAnims = sAffineAnims_LusterPurgeCircle, .callback = AnimSpriteOnMonPos, }; -const union AffineAnimCmd gUnknown_085968B0[] = +static const union AffineAnimCmd sAffineAnim_PsychoBoostOrb_0[] = { AFFINEANIMCMD_FRAME(0x20, 0x20, 0, 0), AFFINEANIMCMD_FRAME(0x10, 0x10, 0, 17), @@ -396,30 +396,31 @@ const union AffineAnimCmd gUnknown_085968B0[] = AFFINEANIMCMD_END, }; -const union AffineAnimCmd gUnknown_08596908[] = +static const union AffineAnimCmd sAffineAnim_PsychoBoostOrb_1[] = { AFFINEANIMCMD_FRAME(0xFFEC, 0x18, 0, 15), AFFINEANIMCMD_END, }; -const union AffineAnimCmd *const gUnknown_08596918[] = +static const union AffineAnimCmd *const sAffineAnims_PsychoBoostOrb[] = { - gUnknown_085968B0, - gUnknown_08596908, + sAffineAnim_PsychoBoostOrb_0, + sAffineAnim_PsychoBoostOrb_1, }; -const struct SpriteTemplate gUnknown_08596920 = +const struct SpriteTemplate gPsychoBoostOrbSpriteTemplate = { .tileTag = ANIM_TAG_CIRCLE_OF_LIGHT, .paletteTag = ANIM_TAG_CIRCLE_OF_LIGHT, .oam = &gOamData_AffineDouble_ObjBlend_64x64, .anims = gDummySpriteAnimTable, .images = NULL, - .affineAnims = gUnknown_08596918, - .callback = sub_8110240, + .affineAnims = sAffineAnims_PsychoBoostOrb, + .callback = AnimPsychoBoost, }; -void sub_810F1EC(struct Sprite *sprite) +// For the rectangular wall sprite used by Reflect, Mirror Coat, etc +static void AnimDefensiveWall(struct Sprite *sprite) { u8 isContest = IsContest(); @@ -472,16 +473,16 @@ void sub_810F1EC(struct Sprite *sprite) if (isContest) { sprite->pos1.y += 9; - sprite->callback = sub_810F3C8; + sprite->callback = AnimDefensiveWall_Step2; sprite->callback(sprite); } else { - sprite->callback = sub_810F340; + sprite->callback = AnimDefensiveWall_Step1; } } -static void sub_810F340(struct Sprite *sprite) +static void AnimDefensiveWall_Step1(struct Sprite *sprite) { u8 battler = GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT); if (!sprite->data[7]) @@ -491,26 +492,26 @@ static void sub_810F340(struct Sprite *sprite) } if (IsBattlerSpriteVisible(battler)) - gSprites[gBattlerSpriteIds[battler]].invisible = 1; + gSprites[gBattlerSpriteIds[battler]].invisible = TRUE; battler = BATTLE_PARTNER(battler); if (IsBattlerSpriteVisible(battler)) - gSprites[gBattlerSpriteIds[battler]].invisible = 1; + gSprites[gBattlerSpriteIds[battler]].invisible = TRUE; - sprite->callback = sub_810F3C8; + sprite->callback = AnimDefensiveWall_Step2; sprite->callback(sprite); } -static void sub_810F3C8(struct Sprite *sprite) +static void AnimDefensiveWall_Step2(struct Sprite *sprite) { SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(sprite->data[3], 16 - sprite->data[3])); if (sprite->data[3] == 13) - sprite->callback = sub_810F400; + sprite->callback = AnimDefensiveWall_Step3; else sprite->data[3]++; } -static void sub_810F400(struct Sprite *sprite) +static void AnimDefensiveWall_Step3(struct Sprite *sprite) { u16 color; u16 startOffset; @@ -528,11 +529,11 @@ static void sub_810F400(struct Sprite *sprite) gPlttBufferFaded[startOffset + 1] = color; if (++sprite->data[2] == 16) - sprite->callback = sub_810F46C; + sprite->callback = AnimDefensiveWall_Step4; } } -static void sub_810F46C(struct Sprite *sprite) +static void AnimDefensiveWall_Step4(struct Sprite *sprite) { SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(sprite->data[3], 16 - sprite->data[3])); @@ -544,19 +545,19 @@ static void sub_810F46C(struct Sprite *sprite) u8 battler = battlerCopy = GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT); if (IsBattlerSpriteVisible(battler)) - gSprites[gBattlerSpriteIds[battler]].invisible = 0; + gSprites[gBattlerSpriteIds[battler]].invisible = FALSE; battler = BATTLE_PARTNER(battlerCopy); if (IsBattlerSpriteVisible(battler)) - gSprites[gBattlerSpriteIds[battler]].invisible = 0; + gSprites[gBattlerSpriteIds[battler]].invisible = FALSE; } - sprite->invisible = 1; - sprite->callback = sub_810F524; + sprite->invisible = TRUE; + sprite->callback = AnimDefensiveWall_Step5; } } -static void sub_810F524(struct Sprite *sprite) +static void AnimDefensiveWall_Step5(struct Sprite *sprite) { if (!IsContest()) { @@ -577,7 +578,8 @@ static void sub_810F524(struct Sprite *sprite) sprite->callback = DestroyAnimSprite; } -void sub_810F58C(struct Sprite *sprite) +// Animates the sparkle that appears during Reflect or Light Screen/Mirror Coat +static void AnimWallSparkle(struct Sprite *sprite) { if (sprite->data[0] == 0) { @@ -601,7 +603,7 @@ void sub_810F58C(struct Sprite *sprite) } else { - if (gBattleAnimArgs[2] == 0) + if (gBattleAnimArgs[2] == ANIM_ATTACKER) InitSpritePosToAnimAttacker(sprite, respectMonPicOffsets); else InitSpritePosToAnimTarget(sprite, respectMonPicOffsets); @@ -616,7 +618,7 @@ void sub_810F58C(struct Sprite *sprite) } } -void sub_810F634(struct Sprite *sprite) +static void AnimBentSpoon(struct Sprite *sprite) { sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET); @@ -639,7 +641,8 @@ void sub_810F634(struct Sprite *sprite) sprite->callback = RunStoredCallbackWhenAnimEnds; } -void sub_810F6B0(struct Sprite *sprite) +// Used by Amnesia +static void AnimQuestionMark(struct Sprite *sprite) { s16 x = GetBattlerSpriteCoordAttr(gBattleAnimAttacker, BATTLER_COORD_ATTR_WIDTH) / 2; s16 y = GetBattlerSpriteCoordAttr(gBattleAnimAttacker, BATTLER_COORD_ATTR_HEIGHT) / -2; @@ -653,20 +656,20 @@ void sub_810F6B0(struct Sprite *sprite) if (sprite->pos1.y < 16) sprite->pos1.y = 16; - StoreSpriteCallbackInData6(sprite, sub_810F740); + StoreSpriteCallbackInData6(sprite, AnimQuestionMark_Step1); sprite->callback = RunStoredCallbackWhenAnimEnds; } -static void sub_810F740(struct Sprite *sprite) +static void AnimQuestionMark_Step1(struct Sprite *sprite) { sprite->oam.affineMode = ST_OAM_AFFINE_NORMAL; - sprite->affineAnims = gUnknown_08596740; + sprite->affineAnims = sAffineAnims_QuestionMark; sprite->data[0] = 0; InitSpriteAffineAnim(sprite); - sprite->callback = sub_810F774; + sprite->callback = AnimQuestionMark_Step2; } -static void sub_810F774(struct Sprite *sprite) +static void AnimQuestionMark_Step2(struct Sprite *sprite) { switch (sprite->data[0]) { @@ -686,22 +689,22 @@ static void sub_810F774(struct Sprite *sprite) } } -void sub_810F7D4(u8 taskId) +void AnimTask_MeditateStretchAttacker(u8 taskId) { struct Task *task = &gTasks[taskId]; u8 spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER); task->data[0] = spriteId; - PrepareAffineAnimInTaskData(task, spriteId, gUnknown_0859675C); - task->func = sub_810F810; + PrepareAffineAnimInTaskData(task, spriteId, sAffineAnim_MeditateStretchAttacker); + task->func = AnimTask_MeditateStretchAttacker_Step; } -static void sub_810F810(u8 taskId) +static void AnimTask_MeditateStretchAttacker_Step(u8 taskId) { if (!RunAffineAnimFromTaskData(&gTasks[taskId])) DestroyAnimVisualTask(taskId); } -void sub_810F83C(u8 taskId) +void AnimTask_Teleport(u8 taskId) { struct Task *task = &gTasks[taskId]; u8 spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER); @@ -710,11 +713,11 @@ void sub_810F83C(u8 taskId) task->data[2] = 0; task->data[3] = GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER ? 4 : 8; - PrepareAffineAnimInTaskData(task, task->data[0], gUnknown_0859677C); - task->func = sub_810F898; + PrepareAffineAnimInTaskData(task, task->data[0], sAffineAnim_Teleport); + task->func = AnimTask_Teleport_Step; } -static void sub_810F898(u8 taskId) +static void AnimTask_Teleport_Step(u8 taskId) { struct Task *task = &gTasks[taskId]; @@ -733,7 +736,7 @@ static void sub_810F898(u8 taskId) } else { - gSprites[task->data[0]].invisible = 1; + gSprites[task->data[0]].invisible = TRUE; gSprites[task->data[0]].pos1.x = 272; ResetSpriteRotScale(task->data[0]); DestroyAnimVisualTask(taskId); @@ -742,7 +745,7 @@ static void sub_810F898(u8 taskId) } } -void sub_810F940(u8 taskId) +void AnimTask_ImprisonOrbs(u8 taskId) { u16 var0, var1; @@ -760,10 +763,10 @@ void sub_810F940(u8 taskId) SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT2_ALL | BLDCNT_EFFECT_BLEND); SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(16, 0)); - task->func = sub_810F9D4; + task->func = AnimTask_ImprisonOrbs_Step; } -static void sub_810F9D4(u8 taskId) +static void AnimTask_ImprisonOrbs_Step(u8 taskId) { u16 i; u8 spriteId; @@ -775,7 +778,7 @@ static void sub_810F9D4(u8 taskId) if (++task->data[1] > 8) { task->data[1] = 0; - spriteId = CreateSprite(&gUnknown_08596794, task->data[13], task->data[14], 0); + spriteId = CreateSprite(&gImprisonOrbSpriteTemplate, task->data[13], task->data[14], 0); task->data[task->data[2] + 8] = spriteId; if (spriteId != MAX_SPRITES) { @@ -844,9 +847,9 @@ static void sub_810FB60(struct Sprite *sprite) sprite->data[1]++; } -void sub_810FBA8(struct Sprite *sprite) +static void AnimRedX(struct Sprite *sprite) { - if (gBattleAnimArgs[0] == 0) + if (gBattleAnimArgs[0] == ANIM_ATTACKER) { sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2); sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET); @@ -856,13 +859,13 @@ void sub_810FBA8(struct Sprite *sprite) sprite->callback = sub_810FB60; } -void sub_810FBF0(u8 taskId) +void AnimTask_SkillSwap(u8 taskId) { struct Task *task = &gTasks[taskId]; if (IsContest()) { - if (gBattleAnimArgs[0] == 1) + if (gBattleAnimArgs[0] == ANIM_TARGET) { task->data[10] = -10; task->data[11] = GetBattlerSpriteCoordAttr(gBattleAnimTarget, BATTLER_COORD_ATTR_RIGHT) - 8; @@ -900,10 +903,10 @@ void sub_810FBF0(u8 taskId) } task->data[1] = 6; - task->func = sub_810FD3C; + task->func = AnimTask_SkillSwap_Step; } -static void sub_810FD3C(u8 taskId) +static void AnimTask_SkillSwap_Step(u8 taskId) { u8 spriteId; struct Task *task = &gTasks[taskId]; @@ -914,7 +917,7 @@ static void sub_810FD3C(u8 taskId) if (++task->data[1] > 6) { task->data[1] = 0; - spriteId = CreateSprite(&gUnknown_08596864, task->data[11], task->data[12], 0); + spriteId = CreateSprite(&gSkillSwapOrbSpriteTemplate, task->data[11], task->data[12], 0); if (spriteId != 64) { gSprites[spriteId].data[0] = 16; @@ -937,7 +940,7 @@ static void sub_810FD3C(u8 taskId) } } -void sub_810FDF0(struct Sprite *sprite) +static void AnimSkillSwapOrb(struct Sprite *sprite) { if (TranslateAnimHorizontalArc(sprite)) { @@ -946,7 +949,9 @@ void sub_810FDF0(struct Sprite *sprite) } } -void sub_810FE14(u8 taskId) +// The scanline effect that distorts the target during Extrasensory by segmenting the mon vertically and shifting the slices +// arg0: Stage. Stage 0 is a slight right distortion, 1 is a medium left distortion, and 2 is a severe right distortion +void AnimTask_ExtrasensoryDistortion(u8 taskId) { s16 i; u8 yOffset; @@ -1004,10 +1009,10 @@ void sub_810FE14(u8 taskId) scanlineParams.initState = 1; scanlineParams.unused9 = 0; ScanlineEffect_SetParams(scanlineParams); - task->func = sub_810FF34; + task->func = AnimTask_ExtrasensoryDistortion_Step; } -static void sub_810FF34(u8 taskId) +static void AnimTask_ExtrasensoryDistortion_Step(u8 taskId) { s16 sineIndex, i; struct Task *task = &gTasks[taskId]; @@ -1044,7 +1049,9 @@ static void sub_810FF34(u8 taskId) } } -void sub_8110034(u8 taskId) +// Creates a cloned transparent sprite of the battler that grows and then shrinks back to original size. Used by Extrasensory +// arg0: battler +void AnimTask_TransparentCloneGrowAndShrink(u8 taskId) { s16 spriteId; s16 matrixNum; @@ -1075,10 +1082,10 @@ void sub_8110034(u8 taskId) task->data[13] = GetAnimBattlerSpriteId(gBattleAnimArgs[0]); task->data[14] = matrixNum; task->data[15] = spriteId; - task->func = sub_8110134; + task->func = AnimTask_TransparentCloneGrowAndShrink_Step; } -static void sub_8110134(u8 taskId) +static void AnimTask_TransparentCloneGrowAndShrink_Step(u8 taskId) { struct Task *task = &gTasks[taskId]; @@ -1111,7 +1118,7 @@ static void sub_8110134(u8 taskId) } } -void sub_8110240(struct Sprite *sprite) +static void AnimPsychoBoost(struct Sprite *sprite) { switch (sprite->data[0]) { @@ -1144,7 +1151,7 @@ void sub_8110240(struct Sprite *sprite) if (sprite->data[1] == 0) { sprite->data[0]++; - sprite->invisible = 1; + sprite->invisible = TRUE; } } diff --git a/src/rock.c b/src/battle_anim_rock.c similarity index 71% rename from src/rock.c rename to src/battle_anim_rock.c index 28566f1b7..1f22d2976 100644 --- a/src/rock.c +++ b/src/battle_anim_rock.c @@ -9,75 +9,72 @@ #include "constants/rgb.h" #include "constants/songs.h" -extern const union AnimCmd *const gUnknown_085950E0[]; -extern const union AnimCmd *const gUnknown_085954D0[]; - -void sub_81109F0(struct Sprite *); -void sub_8110AB4(struct Sprite *); -void AnimDirtParticleAcrossScreen(struct Sprite *); -void AnimRaiseSprite(struct Sprite *); -void sub_81110A4(u8 taskId); -void sub_811131C(struct Sprite *); -void sub_8111388(struct Sprite *); -void sub_8111418(struct Sprite *); -void sub_8111444(struct Sprite *); -void sub_8110B38(struct Sprite *); -static void sub_8110A70(struct Sprite *); -static void sub_8110B80(struct Sprite *sprite); -static void sub_8110CB0(u8 taskId); +static void AnimFallingRock(struct Sprite *); +static void AnimFallingRock_Step(struct Sprite *); +static void AnimRockFragment(struct Sprite *); +static void AnimFlyingSandCrescent(struct Sprite *); +static void AnimRaiseSprite(struct Sprite *); +static void AnimTask_Rollout_Step(u8 taskId); +static void AnimRolloutParticle(struct Sprite *); +static void AnimRockTomb(struct Sprite *); +static void AnimRockTomb_Step(struct Sprite *sprite); +static void AnimRockBlastRock(struct Sprite *); +static void AnimRockScatter(struct Sprite *); +static void AnimRockScatter_Step(struct Sprite *sprite); +static void AnimParticleInVortex(struct Sprite *); +static void AnimParticleInVortex_Step(struct Sprite *sprite); +static void AnimTask_LoadSandstormBackground_Step(u8 taskId); static void sub_8111214(struct Task *task); -static u8 sub_811135C(void); -static void sub_81113C8(struct Sprite *sprite); -static void sub_811149C(struct Sprite *sprite); +static u8 GetRolloutCounter(void); -const union AnimCmd gUnknown_08596AE0[] = +static const union AnimCmd sAnim_FlyingRock_0[] = { ANIMCMD_FRAME(32, 1), ANIMCMD_END, }; -const union AnimCmd gUnknown_08596AE8[] = +static const union AnimCmd sAnim_FlyingRock_1[] = { ANIMCMD_FRAME(48, 1), ANIMCMD_END, }; -const union AnimCmd gUnknown_08596AF0[] = +static const union AnimCmd sAnim_FlyingRock_2[] = { ANIMCMD_FRAME(64, 1), ANIMCMD_END, }; -const union AnimCmd *const gUnknown_08596AF8[] = +static const union AnimCmd *const sAnims_FlyingRock[] = { - gUnknown_08596AE0, - gUnknown_08596AE8, - gUnknown_08596AF0, + sAnim_FlyingRock_0, + sAnim_FlyingRock_1, + sAnim_FlyingRock_2, }; -const struct SpriteTemplate gUnknown_08596B04 = +const struct SpriteTemplate gFallingRockSpriteTemplate = { .tileTag = ANIM_TAG_ROCKS, .paletteTag = ANIM_TAG_ROCKS, .oam = &gOamData_AffineOff_ObjNormal_32x32, - .anims = gUnknown_08596AF8, + .anims = sAnims_FlyingRock, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_81109F0, + .callback = AnimFallingRock, }; -const struct SpriteTemplate gUnknown_08596B1C = +const struct SpriteTemplate gRockFragmentSpriteTemplate = { .tileTag = ANIM_TAG_ROCKS, .paletteTag = ANIM_TAG_ROCKS, .oam = &gOamData_AffineOff_ObjNormal_32x32, - .anims = gUnknown_08596AF8, + .anims = sAnims_FlyingRock, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_8110AB4, + .callback = AnimRockFragment, }; -const struct SpriteTemplate gUnknown_08596B34 = +const struct SpriteTemplate gSwirlingDirtSpriteTemplate = { .tileTag = ANIM_TAG_MUD_SAND, .paletteTag = ANIM_TAG_MUD_SAND, @@ -85,10 +82,10 @@ const struct SpriteTemplate gUnknown_08596B34 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_8110B38, + .callback = AnimParticleInVortex, }; -const union AffineAnimCmd gUnknown_08596B4C[] = +static const union AffineAnimCmd sAffineAnim_Whirlpool[] = { AFFINEANIMCMD_FRAME(0xC0, 0xC0, 0, 0), AFFINEANIMCMD_FRAME(0x2, 0xFFFD, 0, 5), @@ -96,34 +93,34 @@ const union AffineAnimCmd gUnknown_08596B4C[] = AFFINEANIMCMD_JUMP(1), }; -const union AffineAnimCmd *const gUnknown_08596B6C[] = +static const union AffineAnimCmd *const sAffineAnims_Whirlpool[] = { - gUnknown_08596B4C, + sAffineAnim_Whirlpool, }; -const struct SpriteTemplate gUnknown_08596B70 = +const struct SpriteTemplate gWhirlpoolSpriteTemplate = { .tileTag = ANIM_TAG_WATER_ORB, .paletteTag = ANIM_TAG_WATER_ORB, .oam = &gOamData_AffineNormal_ObjBlend_16x16, - .anims = gUnknown_085950E0, + .anims = gAnims_WaterMudOrb, .images = NULL, - .affineAnims = gUnknown_08596B6C, - .callback = sub_8110B38, + .affineAnims = sAffineAnims_Whirlpool, + .callback = AnimParticleInVortex, }; -const struct SpriteTemplate gUnknown_08596B88 = +const struct SpriteTemplate gFireSpinSpriteTemplate = { .tileTag = ANIM_TAG_SMALL_EMBER, .paletteTag = ANIM_TAG_SMALL_EMBER, .oam = &gOamData_AffineOff_ObjNormal_32x32, - .anims = gUnknown_085954D0, + .anims = gAnims_BasicFire, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_8110B38, + .callback = AnimParticleInVortex, }; -const struct SpriteTemplate gBattleAnimSpriteTemplate_8596BA0 = +const struct SpriteTemplate gFlyingSandCrescentSpriteTemplate = { .tileTag = ANIM_TAG_FLYING_DIRT, .paletteTag = ANIM_TAG_FLYING_DIRT, @@ -131,86 +128,86 @@ const struct SpriteTemplate gBattleAnimSpriteTemplate_8596BA0 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = AnimDirtParticleAcrossScreen, + .callback = AnimFlyingSandCrescent, }; -const struct Subsprite gUnknown_08596BB8[] = +static const struct Subsprite sFlyingSandSubsprites[] = { {.x = -16, .y = 0, .shape = SPRITE_SHAPE(32x16), .size = SPRITE_SIZE(32x16), .tileOffset = 0, .priority = 1}, {.x = 16, .y = 0, .shape = SPRITE_SHAPE(32x16), .size = SPRITE_SIZE(32x16), .tileOffset = 8, .priority = 1}, }; -const struct SubspriteTable gUnknown_08596BC0[] = +static const struct SubspriteTable sFlyingSandSubspriteTable[] = { - {ARRAY_COUNT(gUnknown_08596BB8), gUnknown_08596BB8}, + {ARRAY_COUNT(sFlyingSandSubsprites), sFlyingSandSubsprites}, }; -const union AnimCmd gUnknown_08596BC8[] = +static const union AnimCmd sAnim_BasicRock_0[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -const union AnimCmd gUnknown_08596BD0[] = +static const union AnimCmd sAnim_BasicRock_1[] = { ANIMCMD_FRAME(16, 1), ANIMCMD_END, }; -const union AnimCmd gUnknown_08596BD8[] = +static const union AnimCmd sAnim_WeatherBallRockDown_0[] = { ANIMCMD_FRAME(32, 1), ANIMCMD_END, }; -const union AnimCmd gUnknown_08596BE0[] = +static const union AnimCmd sAnim_WeatherBallRockDown_1[] = { ANIMCMD_FRAME(48, 1), ANIMCMD_END, }; -const union AnimCmd gUnknown_08596BE8[] = +static const union AnimCmd sAnim_TwisterRock_0[] = { ANIMCMD_FRAME(64, 1), ANIMCMD_END, }; -const union AnimCmd gUnknown_08596BF0[] = +static const union AnimCmd sAnim_TwisterRock_1[] = { ANIMCMD_FRAME(80, 1), ANIMCMD_END, }; -const union AnimCmd *const gUnknown_08596BF8[] = +static const union AnimCmd *const sAnims_BasicRock[] = { - gUnknown_08596BC8, - gUnknown_08596BD0, + sAnim_BasicRock_0, + sAnim_BasicRock_1, }; -const union AnimCmd *const gUnknown_08596C00[] = +static const union AnimCmd *const sAnims_WeatherBallRockDown[] = { - gUnknown_08596BD8, - gUnknown_08596BE0, + sAnim_WeatherBallRockDown_0, + sAnim_WeatherBallRockDown_1, }; -const union AnimCmd *const gUnknown_08596C08[] = +static const union AnimCmd *const sAnims_TwisterRock[] = { - gUnknown_08596BE8, - gUnknown_08596BF0, + sAnim_TwisterRock_0, + sAnim_TwisterRock_1, }; -const struct SpriteTemplate gUnknown_08596C10 = +const struct SpriteTemplate gAncientPowerRockSpriteTemplate = { .tileTag = ANIM_TAG_ROCKS, .paletteTag = ANIM_TAG_ROCKS, .oam = &gOamData_AffineOff_ObjNormal_32x32, - .anims = gUnknown_08596BF8, + .anims = sAnims_BasicRock, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, .callback = AnimRaiseSprite, }; -const struct SpriteTemplate gUnknown_08596C28 = +const struct SpriteTemplate gRolloutMudSpriteTemplate = { .tileTag = ANIM_TAG_MUD_SAND, .paletteTag = ANIM_TAG_MUD_SAND, @@ -218,10 +215,10 @@ const struct SpriteTemplate gUnknown_08596C28 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_811131C, + .callback = AnimRolloutParticle, }; -const struct SpriteTemplate gUnknown_08596C40 = +const struct SpriteTemplate gRolloutRockSpriteTemplate = { .tileTag = ANIM_TAG_ROCKS, .paletteTag = ANIM_TAG_ROCKS, @@ -229,83 +226,83 @@ const struct SpriteTemplate gUnknown_08596C40 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_811131C, + .callback = AnimRolloutParticle, }; -const struct SpriteTemplate gUnknown_08596C58 = +const struct SpriteTemplate gRockTombRockSpriteTemplate = { .tileTag = ANIM_TAG_ROCKS, .paletteTag = ANIM_TAG_ROCKS, .oam = &gOamData_AffineOff_ObjNormal_32x32, - .anims = gUnknown_08596BF8, + .anims = sAnims_BasicRock, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_8111388, + .callback = AnimRockTomb, }; -const union AffineAnimCmd gUnknown_08596C70[] = +static const union AffineAnimCmd sAffineAnim_BasicRock_0[] = { AFFINEANIMCMD_FRAME(0x0, 0x0, -5, 5), AFFINEANIMCMD_JUMP(0), }; -const union AffineAnimCmd gUnknown_08596C80[] = +static const union AffineAnimCmd sAffineAnim_BasicRock_1[] = { AFFINEANIMCMD_FRAME(0x0, 0x0, 5, 5), AFFINEANIMCMD_JUMP(0), }; -const union AffineAnimCmd *const gUnknown_08596C90[] = +static const union AffineAnimCmd *const sAffineAnims_BasicRock[] = { - gUnknown_08596C70, - gUnknown_08596C80, + sAffineAnim_BasicRock_0, + sAffineAnim_BasicRock_1, }; -const struct SpriteTemplate gUnknown_08596C98 = +const struct SpriteTemplate gRockBlastRockSpriteTemplate = { .tileTag = ANIM_TAG_ROCKS, .paletteTag = ANIM_TAG_ROCKS, .oam = &gOamData_AffineNormal_ObjNormal_32x32, - .anims = gUnknown_08596BF8, + .anims = sAnims_BasicRock, .images = NULL, - .affineAnims = gUnknown_08596C90, - .callback = sub_8111418, + .affineAnims = sAffineAnims_BasicRock, + .callback = AnimRockBlastRock, }; -const struct SpriteTemplate gUnknown_08596CB0 = +const struct SpriteTemplate gRockScatterSpriteTemplate = { .tileTag = ANIM_TAG_ROCKS, .paletteTag = ANIM_TAG_ROCKS, .oam = &gOamData_AffineNormal_ObjNormal_32x32, - .anims = gUnknown_08596BF8, + .anims = sAnims_BasicRock, .images = NULL, - .affineAnims = gUnknown_08596C90, - .callback = sub_8111444, + .affineAnims = sAffineAnims_BasicRock, + .callback = AnimRockScatter, }; -const struct SpriteTemplate gUnknown_08596CC8 = +const struct SpriteTemplate gTwisterRockSpriteTemplate = { .tileTag = ANIM_TAG_ROCKS, .paletteTag = ANIM_TAG_ROCKS, .oam = &gOamData_AffineOff_ObjNormal_32x32, - .anims = gUnknown_08596C08, + .anims = sAnims_TwisterRock, .images = NULL, - .affineAnims = gUnknown_08596C90, + .affineAnims = sAffineAnims_BasicRock, .callback = AnimMoveTwisterParticle, }; -const struct SpriteTemplate gUnknown_08596CE0 = +const struct SpriteTemplate gWeatherBallRockDownSpriteTemplate = { .tileTag = ANIM_TAG_ROCKS, .paletteTag = ANIM_TAG_ROCKS, .oam = &gOamData_AffineNormal_ObjNormal_32x32, - .anims = gUnknown_08596C00, + .anims = sAnims_WeatherBallRockDown, .images = NULL, - .affineAnims = gUnknown_08596C90, - .callback = sub_80A8EE4, + .affineAnims = sAffineAnims_BasicRock, + .callback = AnimWeatherBallDown, }; -void sub_81109F0(struct Sprite *sprite) +static void AnimFallingRock(struct Sprite *sprite) { if (gBattleAnimArgs[3] != 0) SetAverageBattlerPositions(gBattleAnimTarget, 0, &sprite->pos1.x, &sprite->pos1.y); @@ -323,12 +320,12 @@ void sub_81109F0(struct Sprite *sprite) sprite->data[4] = -70; sprite->data[5] = gBattleAnimArgs[2]; - StoreSpriteCallbackInData6(sprite, sub_8110A70); + StoreSpriteCallbackInData6(sprite, AnimFallingRock_Step); sprite->callback = TranslateSpriteInEllipseOverDuration; sprite->callback(sprite); } -static void sub_8110A70(struct Sprite *sprite) +static void AnimFallingRock_Step(struct Sprite *sprite) { sprite->pos1.x += sprite->data[5]; @@ -343,7 +340,8 @@ static void sub_8110A70(struct Sprite *sprite) sprite->callback(sprite); } -void sub_8110AB4(struct Sprite *sprite) +// Animates the rock particles that are shown on the impact for Rock Blast / Rock Smash +static void AnimRockFragment(struct Sprite *sprite) { StartSpriteAnim(sprite, gBattleAnimArgs[5]); AnimateSprite(sprite); @@ -369,9 +367,10 @@ void sub_8110AB4(struct Sprite *sprite) StoreSpriteCallbackInData6(sprite, DestroySpriteAndMatrix); } -void sub_8110B38(struct Sprite *sprite) +// Swirls particle in vortex. Used for moves like Fire Spin or Sand Tomb +static void AnimParticleInVortex(struct Sprite *sprite) { - if (gBattleAnimArgs[6] == 0) + if (gBattleAnimArgs[6] == ANIM_ATTACKER) InitSpritePosToAnimAttacker(sprite, 0); else InitSpritePosToAnimTarget(sprite, FALSE); @@ -381,10 +380,10 @@ void sub_8110B38(struct Sprite *sprite) sprite->data[2] = gBattleAnimArgs[4]; sprite->data[3] = gBattleAnimArgs[5]; - sprite->callback = sub_8110B80; + sprite->callback = AnimParticleInVortex_Step; } -static void sub_8110B80(struct Sprite *sprite) +static void AnimParticleInVortex_Step(struct Sprite *sprite) { sprite->data[4] += sprite->data[1]; sprite->pos2.y = -(sprite->data[4] >> 8); @@ -417,18 +416,18 @@ void AnimTask_LoadSandstormBackground(u8 taskId) SetGpuReg(REG_OFFSET_BG1VOFS, gBattle_BG1_Y); sub_80A6B30(&animBg); - AnimLoadCompressedBgGfx(animBg.bgId, gUnknown_08D8D58C, animBg.tilesOffset); - sub_80A6D60(&animBg, gUnknown_08D8D410, 0); + AnimLoadCompressedBgGfx(animBg.bgId, gBattleAnimBgImage_Sandstorm, animBg.tilesOffset); + AnimLoadCompressedBgTilemapHandleContest(&animBg, gBattleAnimBgTilemap_Sandstorm, 0); LoadCompressedPalette(gBattleAnimSpritePal_FlyingDirt, animBg.paletteId * 16, 32); if (gBattleAnimArgs[0] && GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER) var0 = 1; gTasks[taskId].data[0] = var0; - gTasks[taskId].func = sub_8110CB0; + gTasks[taskId].func = AnimTask_LoadSandstormBackground_Step; } -static void sub_8110CB0(u8 taskId) +static void AnimTask_LoadSandstormBackground_Step(u8 taskId) { struct BattleAnimBgData animBg; @@ -499,7 +498,7 @@ static void sub_8110CB0(u8 taskId) // arg 1: projectile speed // arg 2: y pixel drop // arg 3: ??? unknown (possibly a color bit) -void AnimDirtParticleAcrossScreen(struct Sprite *sprite) +static void AnimFlyingSandCrescent(struct Sprite *sprite) { if (sprite->data[0] == 0) { @@ -516,7 +515,7 @@ void AnimDirtParticleAcrossScreen(struct Sprite *sprite) } sprite->pos1.y = gBattleAnimArgs[0]; - SetSubspriteTables(sprite, gUnknown_08596BC0); + SetSubspriteTables(sprite, sFlyingSandSubspriteTable); sprite->data[1] = gBattleAnimArgs[1]; sprite->data[2] = gBattleAnimArgs[2]; sprite->data[0]++; @@ -550,7 +549,7 @@ void AnimDirtParticleAcrossScreen(struct Sprite *sprite) // arg 2: terminal y offset // arg 3: duration // arg 4: sprite size [1,5] -void AnimRaiseSprite(struct Sprite *sprite) +static void AnimRaiseSprite(struct Sprite *sprite) { StartSpriteAnim(sprite, gBattleAnimArgs[4]); InitSpritePosToAnimAttacker(sprite, 0); @@ -563,10 +562,10 @@ void AnimRaiseSprite(struct Sprite *sprite) StoreSpriteCallbackInData6(sprite, DestroyAnimSprite); } -void sub_8110F74(u8 taskId) +void AnimTask_Rollout(u8 taskId) { u16 var0, var1, var2, var3; - u8 var4; + u8 rolloutCounter; int var5; s16 pan1, pan2; struct Task *task; @@ -581,11 +580,11 @@ void sub_8110F74(u8 taskId) if (BATTLE_PARTNER(gBattleAnimAttacker) == gBattleAnimTarget) var3 = var1; - var4 = sub_811135C(); - if (var4 == 1) + rolloutCounter = GetRolloutCounter(); + if (rolloutCounter == 1) task->data[8] = 32; else - task->data[8] = 48 - (var4 * 8); + task->data[8] = 48 - (rolloutCounter * 8); task->data[0] = 0; task->data[11] = 0; @@ -610,13 +609,13 @@ void sub_8110F74(u8 taskId) task->data[13] = pan1; task->data[14] = (pan2 - pan1) / task->data[8]; - task->data[1] = var4; - task->data[15] = GetAnimBattlerSpriteId(0); + task->data[1] = rolloutCounter; + task->data[15] = GetAnimBattlerSpriteId(ANIM_ATTACKER); - task->func = sub_81110A4; + task->func = AnimTask_Rollout_Step; } -void sub_81110A4(u8 taskId) +static void AnimTask_Rollout_Step(u8 taskId) { struct Task *task; @@ -684,28 +683,28 @@ void sub_81110A4(u8 taskId) static void sub_8111214(struct Task *task) { const struct SpriteTemplate *spriteTemplate; - int var0; + int tileOffset; u16 x, y; u8 spriteId; switch (task->data[1]) { case 1: - spriteTemplate = &gUnknown_08596C28; - var0 = 0; + spriteTemplate = &gRolloutMudSpriteTemplate; + tileOffset = 0; break; case 2: case 3: - spriteTemplate = &gUnknown_08596C40; - var0 = 80; + spriteTemplate = &gRolloutRockSpriteTemplate; + tileOffset = 80; break; case 4: - spriteTemplate = &gUnknown_08596C40; - var0 = 64; + spriteTemplate = &gRolloutRockSpriteTemplate; + tileOffset = 64; break; case 5: - spriteTemplate = &gUnknown_08596C40; - var0 = 48; + spriteTemplate = &gRolloutRockSpriteTemplate; + tileOffset = 48; break; default: return; @@ -722,7 +721,7 @@ static void sub_8111214(struct Task *task) gSprites[spriteId].data[2] = ((task->data[12] * 20) + x) + (task->data[1] * 3); gSprites[spriteId].data[4] = y; gSprites[spriteId].data[5] = -16 - (task->data[1] * 2); - gSprites[spriteId].oam.tileNum += var0; + gSprites[spriteId].oam.tileNum += tileOffset; InitAnimArcTranslation(&gSprites[spriteId]); task->data[11]++; @@ -731,11 +730,11 @@ static void sub_8111214(struct Task *task) task->data[12] *= -1; } -void sub_811131C(struct Sprite *sprite) +static void AnimRolloutParticle(struct Sprite *sprite) { if (TranslateAnimHorizontalArc(sprite)) { - u8 taskId = FindTaskIdByFunc(sub_81110A4); + u8 taskId = FindTaskIdByFunc(AnimTask_Rollout_Step); if (taskId != 0xFF) gTasks[taskId].data[11]--; @@ -743,7 +742,7 @@ void sub_811131C(struct Sprite *sprite) } } -static u8 sub_811135C(void) +static u8 GetRolloutCounter(void) { u8 retVal = gAnimDisableStructPtr->rolloutTimerStartValue - gAnimDisableStructPtr->rolloutTimer; u8 var0 = retVal - 1; @@ -753,7 +752,7 @@ static u8 sub_811135C(void) return retVal; } -void sub_8111388(struct Sprite *sprite) +static void AnimRockTomb(struct Sprite *sprite) { StartSpriteAnim(sprite, gBattleAnimArgs[4]); @@ -762,13 +761,13 @@ void sub_8111388(struct Sprite *sprite) sprite->data[3] -= gBattleAnimArgs[2]; sprite->data[0] = 3; sprite->data[1] = gBattleAnimArgs[3]; - sprite->callback = sub_81113C8; - sprite->invisible = 1; + sprite->callback = AnimRockTomb_Step; + sprite->invisible = TRUE; } -static void sub_81113C8(struct Sprite *sprite) +static void AnimRockTomb_Step(struct Sprite *sprite) { - sprite->invisible = 0; + sprite->invisible = FALSE; if (sprite->data[3] != 0) { sprite->pos2.y = sprite->data[2] + sprite->data[3]; @@ -786,7 +785,7 @@ static void sub_81113C8(struct Sprite *sprite) } } -void sub_8111418(struct Sprite *sprite) +static void AnimRockBlastRock(struct Sprite *sprite) { if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_OPPONENT) StartSpriteAffineAnim(sprite, 1); @@ -794,7 +793,7 @@ void sub_8111418(struct Sprite *sprite) TranslateAnimSpriteToTargetMonLocation(sprite); } -void sub_8111444(struct Sprite *sprite) +static void AnimRockScatter(struct Sprite *sprite) { sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimTarget, 0); sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimTarget, 1); @@ -806,10 +805,10 @@ void sub_8111444(struct Sprite *sprite) sprite->data[5] = gBattleAnimArgs[2]; StartSpriteAnim(sprite, gBattleAnimArgs[3]); - sprite->callback = sub_811149C; + sprite->callback = AnimRockScatter_Step; } -static void sub_811149C(struct Sprite *sprite) +static void AnimRockScatter_Step(struct Sprite *sprite) { sprite->data[0] += 8; sprite->data[3] += sprite->data[1]; @@ -825,20 +824,20 @@ static void sub_811149C(struct Sprite *sprite) void AnimTask_GetSeismicTossDamageLevel(u8 taskId) { if (gAnimMoveDmg < 33) - gBattleAnimArgs[7] = 0; + gBattleAnimArgs[ARG_RET_ID] = 0; if ((u32)gAnimMoveDmg - 33 < 33) - gBattleAnimArgs[7] = 1; + gBattleAnimArgs[ARG_RET_ID] = 1; if (gAnimMoveDmg > 65) - gBattleAnimArgs[7] = 2; + gBattleAnimArgs[ARG_RET_ID] = 2; DestroyAnimVisualTask(taskId); } -void sub_811152C(u8 taskId) +void AnimTask_MoveSeismicTossBg(u8 taskId) { if (gTasks[taskId].data[0] == 0) { - sub_80A6DAC(0); + sub_80A6DAC(FALSE); gTasks[taskId].data[1] = 200; } @@ -847,18 +846,18 @@ void sub_811152C(u8 taskId) if (gTasks[taskId].data[0] == 120) { - sub_80A6DAC(1); + sub_80A6DAC(TRUE); DestroyAnimVisualTask(taskId); } gTasks[taskId].data[0]++; } -void sub_8111590(u8 taskId) +void AnimTask_SeismicTossBgAccelerateDownAtEnd(u8 taskId) { if (gTasks[taskId].data[0] == 0) { - sub_80A6DAC(0); + sub_80A6DAC(FALSE); gTasks[taskId].data[0]++; gTasks[taskId].data[2] = gBattle_BG3_Y; } @@ -870,7 +869,7 @@ void sub_8111590(u8 taskId) if (gBattleAnimArgs[7] == 0xFFF) { gBattle_BG3_Y = 0; - sub_80A6DAC(1); + sub_80A6DAC(TRUE); DestroyAnimVisualTask(taskId); } } diff --git a/src/smokescreen.c b/src/battle_anim_smokescreen.c similarity index 77% rename from src/smokescreen.c rename to src/battle_anim_smokescreen.c index 7d83251bc..a8c043e67 100644 --- a/src/smokescreen.c +++ b/src/battle_anim_smokescreen.c @@ -41,17 +41,17 @@ const u8 gUnknown_0831C604[] = [NATURE_QUIRKY] = 0, }; -static const struct CompressedSpriteSheet gSmokescreenImpactSpriteSheet = +static const struct CompressedSpriteSheet sSmokescreenImpactSpriteSheet = { .data = gSmokescreenImpactTiles, .size = 0x180, .tag = 55019 }; -static const struct CompressedSpritePalette gSmokescreenlImpactSpritePalette = +static const struct CompressedSpritePalette sSmokescreenImpactSpritePalette = { .data = gSmokescreenImpactPalette, .tag = 55019 }; -static const struct OamData gUnknown_0831C630 = +static const struct OamData sOamData_SmokescreenImpact = { .y = 0, .affineMode = ST_OAM_AFFINE_OFF, @@ -68,7 +68,7 @@ static const struct OamData gUnknown_0831C630 = .affineParam = 0 }; -static const union AnimCmd gUnknown_0831C638[] = +static const union AnimCmd sAnim_SmokescreenImpact_0[] = { ANIMCMD_FRAME(0, 4), ANIMCMD_FRAME(4, 4), @@ -76,7 +76,7 @@ static const union AnimCmd gUnknown_0831C638[] = ANIMCMD_END }; -static const union AnimCmd gUnknown_0831C648[] = +static const union AnimCmd sAnim_SmokescreenImpact_1[] = { ANIMCMD_FRAME(0, 4, .hFlip = TRUE), ANIMCMD_FRAME(4, 4, .hFlip = TRUE), @@ -84,7 +84,7 @@ static const union AnimCmd gUnknown_0831C648[] = ANIMCMD_END }; -static const union AnimCmd gUnknown_0831C658[] = +static const union AnimCmd sAnim_SmokescreenImpact_2[] = { ANIMCMD_FRAME(0, 4, .vFlip = TRUE), ANIMCMD_FRAME(4, 4, .vFlip = TRUE), @@ -92,7 +92,7 @@ static const union AnimCmd gUnknown_0831C658[] = ANIMCMD_END }; -static const union AnimCmd gUnknown_0831C668[] = +static const union AnimCmd sAnim_SmokescreenImpact_3[] = { ANIMCMD_FRAME(0, 4, .hFlip = TRUE, .vFlip = TRUE), ANIMCMD_FRAME(4, 4, .hFlip = TRUE, .vFlip = TRUE), @@ -100,20 +100,20 @@ static const union AnimCmd gUnknown_0831C668[] = ANIMCMD_END }; -static const union AnimCmd *const gUnknown_0831C678[] = +static const union AnimCmd *const sAnims_SmokescreenImpact[] = { - gUnknown_0831C638, - gUnknown_0831C648, - gUnknown_0831C658, - gUnknown_0831C668, + sAnim_SmokescreenImpact_0, + sAnim_SmokescreenImpact_1, + sAnim_SmokescreenImpact_2, + sAnim_SmokescreenImpact_3, }; -static const struct SpriteTemplate gSmokescreenImpactSpriteTemplate = +static const struct SpriteTemplate sSmokescreenImpactSpriteTemplate = { .tileTag = 55019, .paletteTag = 55019, - .oam = &gUnknown_0831C630, - .anims = gUnknown_0831C678, + .oam = &sOamData_SmokescreenImpact, + .anims = sAnims_SmokescreenImpact, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCB_DestroySprite @@ -158,34 +158,34 @@ u8 SmokescreenImpact(s16 x, s16 y, u8 a3) u8 spriteId1, spriteId2, spriteId3, spriteId4; struct Sprite *mainSprite; - if (GetSpriteTileStartByTag(gSmokescreenImpactSpriteSheet.tag) == 0xFFFF) + if (GetSpriteTileStartByTag(sSmokescreenImpactSpriteSheet.tag) == 0xFFFF) { - LoadCompressedSpriteSheetUsingHeap(&gSmokescreenImpactSpriteSheet); - LoadCompressedSpritePaletteUsingHeap(&gSmokescreenlImpactSpritePalette); + LoadCompressedSpriteSheetUsingHeap(&sSmokescreenImpactSpriteSheet); + LoadCompressedSpritePaletteUsingHeap(&sSmokescreenImpactSpritePalette); } mainSpriteId = CreateInvisibleSpriteWithCallback(SmokescreenImpact_Callback); mainSprite = &gSprites[mainSpriteId]; mainSprite->data[1] = a3; - spriteId1 = CreateSprite(&gSmokescreenImpactSpriteTemplate, x - 16, y - 16, 2); + spriteId1 = CreateSprite(&sSmokescreenImpactSpriteTemplate, x - 16, y - 16, 2); gSprites[spriteId1].data[0] = mainSpriteId; mainSprite->data[0]++; AnimateSprite(&gSprites[spriteId1]); - spriteId2 = CreateSprite(&gSmokescreenImpactSpriteTemplate, x, y - 16, 2); + spriteId2 = CreateSprite(&sSmokescreenImpactSpriteTemplate, x, y - 16, 2); gSprites[spriteId2].data[0] = mainSpriteId; mainSprite->data[0]++; StartSpriteAnim(&gSprites[spriteId2], 1); AnimateSprite(&gSprites[spriteId2]); - spriteId3 = CreateSprite(&gSmokescreenImpactSpriteTemplate, x - 16, y, 2); + spriteId3 = CreateSprite(&sSmokescreenImpactSpriteTemplate, x - 16, y, 2); gSprites[spriteId3].data[0] = mainSpriteId; mainSprite->data[0]++; StartSpriteAnim(&gSprites[spriteId3], 2); AnimateSprite(&gSprites[spriteId3]); - spriteId4 = CreateSprite(&gSmokescreenImpactSpriteTemplate, x, y, 2); + spriteId4 = CreateSprite(&sSmokescreenImpactSpriteTemplate, x, y, 2); gSprites[spriteId4].data[0] = mainSpriteId; mainSprite->data[0]++; StartSpriteAnim(&gSprites[spriteId4], 3); @@ -198,8 +198,8 @@ static void SmokescreenImpact_Callback(struct Sprite *sprite) { if (!sprite->data[0]) { - FreeSpriteTilesByTag(gSmokescreenImpactSpriteSheet.tag); - FreeSpritePaletteByTag(gSmokescreenlImpactSpritePalette.tag); + FreeSpriteTilesByTag(sSmokescreenImpactSpriteSheet.tag); + FreeSpritePaletteByTag(sSmokescreenImpactSpritePalette.tag); if (!sprite->data[1]) DestroySprite(sprite); else diff --git a/src/battle_anim_sound_tasks.c b/src/battle_anim_sound_tasks.c index 573feb41c..8efc987b8 100644 --- a/src/battle_anim_sound_tasks.c +++ b/src/battle_anim_sound_tasks.c @@ -10,10 +10,10 @@ // this file's functions static void sub_8158B98(u8 taskId); static void sub_8158C04(u8 taskId); -static void sub_8158D08(u8 taskId); -static void sub_8158FF4(u8 taskId); -static void sub_815913C(u8 taskId); -static void sub_8159308(u8 taskId); +static void SoundTask_LoopSEAdjustPanning_Step(u8 taskId); +static void SoundTask_PlayDoubleCry_Step(u8 taskId); +static void SoundTask_PlayCryWithEcho_Step(u8 taskId); +static void SoundTask_AdjustPanningVar_Step(u8 taskId); // task start void sub_8158B30(u8 taskId) @@ -73,7 +73,7 @@ static void sub_8158C04(u8 taskId) // task end // task start -void sub_8158C58(u8 taskId) +void SoundTask_LoopSEAdjustPanning(u8 taskId) { u16 songId = gBattleAnimArgs[0]; s8 targetPan = gBattleAnimArgs[2]; @@ -97,11 +97,11 @@ void sub_8158C58(u8 taskId) gTasks[taskId].data[11] = sourcePan; gTasks[taskId].data[12] = r9; - gTasks[taskId].func = sub_8158D08; - sub_8158D08(taskId); + gTasks[taskId].func = SoundTask_LoopSEAdjustPanning_Step; + SoundTask_LoopSEAdjustPanning_Step(taskId); } -static void sub_8158D08(u8 taskId) +static void SoundTask_LoopSEAdjustPanning_Step(u8 taskId) { if (gTasks[taskId].data[12]++ == gTasks[taskId].data[6]) { @@ -119,7 +119,7 @@ static void sub_8158D08(u8 taskId) u16 dPan, oldPan; gTasks[taskId].data[10] = 0; dPan = gTasks[taskId].data[3]; - oldPan = gTasks[taskId].data[11] ; + oldPan = gTasks[taskId].data[11]; gTasks[taskId].data[11] = dPan + oldPan; gTasks[taskId].data[11] = KeepPanInRange(gTasks[taskId].data[11], oldPan); } @@ -127,7 +127,7 @@ static void sub_8158D08(u8 taskId) // task end // task start -void sub_8158D8C(u8 taskId) +void SoundTask_PlayCryHighPitch(u8 taskId) { u16 species = 0; s8 pan = BattleAnimAdjustPanning(SOUND_PAN_ATTACKER); @@ -173,7 +173,7 @@ void sub_8158D8C(u8 taskId) // task end // task start -void sub_8158E9C(u8 taskId) +void SoundTask_PlayDoubleCry(u8 taskId) { u16 species = 0; s8 pan = BattleAnimAdjustPanning(SOUND_PAN_ATTACKER); @@ -222,7 +222,7 @@ void sub_8158E9C(u8 taskId) else PlayCry3(species, pan, 7); - gTasks[taskId].func = sub_8158FF4; + gTasks[taskId].func = SoundTask_PlayDoubleCry_Step; } else { @@ -230,7 +230,7 @@ void sub_8158E9C(u8 taskId) } } -static void sub_8158FF4(u8 taskId) +static void SoundTask_PlayDoubleCry_Step(u8 taskId) { u16 species = gTasks[taskId].data[1]; s8 pan = gTasks[taskId].data[2]; @@ -261,7 +261,7 @@ static void sub_8158FF4(u8 taskId) } // task end -void sub_8159078(u8 taskId) +void SoundTask_WaitForCry(u8 taskId) { if (gTasks[taskId].data[9] < 2) { @@ -275,7 +275,7 @@ void sub_8159078(u8 taskId) } // task start -void sub_81590B8(u8 taskId) +void SoundTask_PlayCryWithEcho(u8 taskId) { u16 species; s8 pan; @@ -292,12 +292,12 @@ void sub_81590B8(u8 taskId) gTasks[taskId].data[2] = pan; if (species != SPECIES_NONE) - gTasks[taskId].func = sub_815913C; + gTasks[taskId].func = SoundTask_PlayCryWithEcho_Step; else DestroyAnimVisualTask(taskId); } -static void sub_815913C(u8 taskId) +static void SoundTask_PlayCryWithEcho_Step(u8 taskId) { u16 species = gTasks[taskId].data[1]; s8 pan = gTasks[taskId].data[2]; @@ -332,7 +332,7 @@ static void sub_815913C(u8 taskId) } // task end -void sub_8159210(u8 taskId) +void SoundTask_PlaySE1WithPanning(u8 taskId) { u16 songId = gBattleAnimArgs[0]; s8 pan = BattleAnimAdjustPanning(gBattleAnimArgs[1]); @@ -341,7 +341,7 @@ void sub_8159210(u8 taskId) DestroyAnimVisualTask(taskId); } -void sub_8159244(u8 taskId) +void SoundTask_PlaySE2WithPanning(u8 taskId) { u16 songId = gBattleAnimArgs[0]; s8 pan = BattleAnimAdjustPanning(gBattleAnimArgs[1]); @@ -350,7 +350,9 @@ void sub_8159244(u8 taskId) DestroyAnimVisualTask(taskId); } -void sub_8159278(u8 taskId) +// Adjusts panning and assigns it to gAnimCustomPanning. Doesnt play sound. +// Used by Confuse Ray and Will-O-Wisp (see uses of gAnimCustomPanning) +void SoundTask_AdjustPanningVar(u8 taskId) { s8 targetPan = gBattleAnimArgs[1]; s8 panIncrement = gBattleAnimArgs[2]; @@ -367,11 +369,11 @@ void sub_8159278(u8 taskId) gTasks[taskId].data[10] = 0; gTasks[taskId].data[11] = sourcePan; - gTasks[taskId].func = sub_8159308; - sub_8159308(taskId); + gTasks[taskId].func = SoundTask_AdjustPanningVar_Step; + SoundTask_AdjustPanningVar_Step(taskId); } -void sub_8159308(u8 taskId) +static void SoundTask_AdjustPanningVar_Step(u8 taskId) { u16 panIncrement = gTasks[taskId].data[3]; @@ -384,7 +386,7 @@ void sub_8159308(u8 taskId) gTasks[taskId].data[11] = KeepPanInRange(gTasks[taskId].data[11], oldPan); } - gUnknown_02038440 = gTasks[taskId].data[11]; + gAnimCustomPanning = gTasks[taskId].data[11]; if (gTasks[taskId].data[11] == gTasks[taskId].data[2]) DestroyAnimVisualTask(taskId); } diff --git a/src/battle_anim_special.c b/src/battle_anim_special.c index 6ff5ee893..bf0d1d438 100755 --- a/src/battle_anim_special.c +++ b/src/battle_anim_special.c @@ -514,7 +514,7 @@ static void sub_8170660(u8 taskId) } } -static void sub_8170834(u8 *paletteId1, u8 *paletteId2, u8 battler) +static void LoadHealthboxPalsForLevelUp(u8 *paletteId1, u8 *paletteId2, u8 battler) { u8 healthBoxSpriteId; u8 spriteId1, spriteId2; @@ -536,14 +536,14 @@ static void sub_8170834(u8 *paletteId1, u8 *paletteId2, u8 battler) gSprites[spriteId2].oam.paletteNum = *paletteId2; } -void sub_8170920(u8 taskId) +void AnimTask_LoadHealthboxPalsForLevelUp(u8 taskId) { u8 paletteId1, paletteId2; - sub_8170834(&paletteId1, &paletteId2, gBattleAnimAttacker); + LoadHealthboxPalsForLevelUp(&paletteId1, &paletteId2, gBattleAnimAttacker); DestroyAnimVisualTask(taskId); } -static void sub_817094C(u8 battler) +static void FreeHealthboxPalsForLevelUp(u8 battler) { u8 healthBoxSpriteId; u8 spriteId1, spriteId2; @@ -562,13 +562,13 @@ static void sub_817094C(u8 battler) gSprites[spriteId2].oam.paletteNum = paletteId2; } -void sub_81709EC(u8 taskId) +void AnimTask_FreeHealthboxPalsForLevelUp(u8 taskId) { - sub_817094C(gBattleAnimAttacker); + FreeHealthboxPalsForLevelUp(gBattleAnimAttacker); DestroyAnimVisualTask(taskId); } -void sub_8170A0C(u8 taskId) +void AnimTask_FlashHealthboxOnLevelUp(u8 taskId) { gTasks[taskId].data[10] = gBattleAnimArgs[0]; gTasks[taskId].data[11] = gBattleAnimArgs[1]; @@ -612,7 +612,7 @@ static void sub_8170A38(u8 taskId) } } -void sub_8170B04(u8 taskId) +void AnimTask_SwitchOutShrinkMon(u8 taskId) { u8 spriteId; @@ -633,13 +633,13 @@ void sub_8170B04(u8 taskId) break; case 2: ResetSpriteRotScale(spriteId); - gSprites[spriteId].invisible = 1; + gSprites[spriteId].invisible = TRUE; DestroyAnimVisualTask(taskId); break; } } -void sub_8170BB0(u8 taskId) +void AnimTask_SwitchOutBallEffect(u8 taskId) { u8 spriteId; u16 ball; @@ -674,14 +674,14 @@ void sub_8170BB0(u8 taskId) } } -void sub_8170CFC(u8 taskId) +void AnimTask_LoadBallGfx(u8 taskId) { u8 ballId = ItemIdToBallId(gLastUsedItem); LoadBallGfx(ballId); DestroyAnimVisualTask(taskId); } -void sub_8170D24(u8 taskId) +void AnimTask_FreeBallGfx(u8 taskId) { u8 ballId = ItemIdToBallId(gLastUsedItem); FreeBallGfx(ballId); @@ -730,7 +730,7 @@ u8 ItemIdToBallId(u16 ballItem) } } -void sub_8170E04(u8 taskId) +void AnimTask_ThrowBall(u8 taskId) { u8 ballId; u8 spriteId; @@ -753,7 +753,8 @@ static void sub_8170EF0(u8 taskId) DestroyAnimVisualTask(taskId); } -void sub_8170F2C(u8 taskId) +// Safari Ball / Wally's ball throw +void AnimTask_ThrowBallSpecial(u8 taskId) { int x, y; u8 ballId; @@ -895,7 +896,7 @@ static void sub_8171240(struct Sprite *sprite) break; case 2: ResetSpriteRotScale(spriteId); - gSprites[spriteId].invisible = 1; + gSprites[spriteId].invisible = TRUE; gTasks[taskId].data[0]++; break; default: @@ -1228,7 +1229,7 @@ static void sub_81718D8(struct Sprite *sprite) } break; case 2: - sprite->invisible = 1; + sprite->invisible = TRUE; sprite->data[0]++; break; default: @@ -1312,7 +1313,7 @@ static void sub_8171AE4(struct Sprite *sprite) break; } - gSprites[gBattlerSpriteIds[gBattleAnimTarget]].invisible = 0; + gSprites[gBattlerSpriteIds[gBattleAnimTarget]].invisible = FALSE; StartSpriteAffineAnim(&gSprites[gBattlerSpriteIds[gBattleAnimTarget]], 1); AnimateSprite(&gSprites[gBattlerSpriteIds[gBattleAnimTarget]]); gSprites[gBattlerSpriteIds[gBattleAnimTarget]].data[1] = 0x1000; @@ -1323,7 +1324,7 @@ static void sub_8171BAC(struct Sprite *sprite) int next = FALSE; if (sprite->animEnded) - sprite->invisible = 1; + sprite->invisible = TRUE; if (gSprites[gBattlerSpriteIds[gBattleAnimTarget]].affineAnimEnded) { @@ -1910,7 +1911,8 @@ static void sub_8172B90(u8 taskId) } } -void sub_8172BF0(u8 taskId) +// arg0: TRUE to swap to mon, FALSE to swap to substitute +void AnimTask_SwapMonSpriteToFromSubstitute(u8 taskId) { u8 spriteId; u32 x; @@ -1968,7 +1970,7 @@ void sub_8172BF0(u8 taskId) } } -void sub_8172D98(u8 taskId) +void AnimTask_SubstituteFadeToInvisible(u8 taskId) { u8 spriteId; @@ -2008,7 +2010,7 @@ void AnimTask_IsAttackerBehindSubstitute(u8 taskId) DestroyAnimVisualTask(taskId); } -void AnimTask_TargetToEffectBattler(u8 taskId) +void AnimTask_SetTargetToEffectBattler(u8 taskId) { gBattleAnimTarget = gEffectBattler; DestroyAnimVisualTask(taskId); @@ -2103,7 +2105,7 @@ static void sub_8172FEC(u8 taskId) gSprites[spriteId].callback = sub_8173250; gSprites[spriteId].pos2.x = -32; gSprites[spriteId].pos2.y = 32; - gSprites[spriteId].invisible = 1; + gSprites[spriteId].invisible = TRUE; if (gTasks[taskId].data[11] == 0) { if (GetBattlerSide(battler) == B_SIDE_PLAYER) @@ -2161,7 +2163,7 @@ static void sub_8173250(struct Sprite *sprite) } else { - sprite->invisible = 0; + sprite->invisible = FALSE; sprite->pos2.x += 5; sprite->pos2.y -= 5; if (sprite->pos2.x > 32) @@ -2213,7 +2215,7 @@ static void sub_81733D4(struct Sprite *sprite) if (TranslateAnimHorizontalArc(sprite)) { sprite->data[0] = 0; - sprite->invisible = 1; + sprite->invisible = TRUE; sprite->callback = sub_8173400; } } @@ -2230,7 +2232,7 @@ static void sub_8173400(struct Sprite *sprite) } } -void sub_817345C(u8 taskId) +void AnimTask_SetAttackerTargetLeftPos(u8 taskId) { switch (gBattleAnimArgs[0]) { diff --git a/src/battle_anim_status_effects.c b/src/battle_anim_status_effects.c index 003b6d2ef..56a8afa53 100644 --- a/src/battle_anim_status_effects.c +++ b/src/battle_anim_status_effects.c @@ -19,10 +19,10 @@ extern const struct OamData gOamData_AffineOff_ObjBlend_64x64; // This file's functions. static void sub_80A9DB4(u8 taskId); -static void sub_80A9FD0(u8 taskId); -static void sub_80AA020(u8 taskId); -static void sub_80AA0D0(u8 taskId); -static void sub_80AA124(u8 taskId); +static void AnimTask_FrozenIceCube_Step1(u8 taskId); +static void AnimTask_FrozenIceCube_Step2(u8 taskId); +static void AnimTask_FrozenIceCube_Step3(u8 taskId); +static void AnimTask_FrozenIceCube_Step4(u8 taskId); static void Task_DoStatusAnimation(u8 taskId); static void sub_80A9E44(struct Sprite *sprite); static void sub_80A9E78(struct Sprite *sprite); @@ -42,6 +42,7 @@ static const union AnimCmd *const sSpriteAnimTable_853EDF8[] = sSpriteAnim_853EDE4 }; +// Unused const struct SpriteTemplate gUnknown_0853EDFC = { .tileTag = ANIM_TAG_ORB, @@ -53,6 +54,7 @@ const struct SpriteTemplate gUnknown_0853EDFC = .callback = sub_80A8AEC, }; +// Unused const struct SpriteTemplate gUnknown_0853EE14 = { .tileTag = ANIM_TAG_ORB, @@ -64,37 +66,37 @@ const struct SpriteTemplate gUnknown_0853EE14 = .callback = sub_80A8A6C, }; -static const union AnimCmd sSpriteAnim_853EE2C[] = +static const union AnimCmd sAnim_WeatherBallNormal[] = { ANIMCMD_FRAME(0, 3), ANIMCMD_JUMP(0) }; -static const union AnimCmd *const sSpriteAnimTable_853EE34[] = +static const union AnimCmd *const sAnims_WeatherBallNormal[] = { - sSpriteAnim_853EE2C + sAnim_WeatherBallNormal }; -const struct SpriteTemplate gUnknown_0853EE38 = +const struct SpriteTemplate gWeatherBallUpSpriteTemplate = { .tileTag = ANIM_TAG_WEATHER_BALL, .paletteTag = ANIM_TAG_WEATHER_BALL, .oam = &gOamData_AffineOff_ObjNormal_32x32, - .anims = sSpriteAnimTable_853EE34, + .anims = sAnims_WeatherBallNormal, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_80A8E30, + .callback = AnimWeatherBallUp, }; -const struct SpriteTemplate gUnknown_0853EE50 = +const struct SpriteTemplate gWeatherBallNormalDownSpriteTemplate = { .tileTag = ANIM_TAG_WEATHER_BALL, .paletteTag = ANIM_TAG_WEATHER_BALL, .oam = &gOamData_AffineOff_ObjNormal_32x32, - .anims = sSpriteAnimTable_853EE34, + .anims = sAnims_WeatherBallNormal, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_80A8EE4, + .callback = AnimWeatherBallDown, }; static const union AnimCmd sSpriteAnim_853EE68[] = @@ -112,7 +114,7 @@ static const union AnimCmd *const sSpriteAnimTable_853EE80[] = sSpriteAnim_853EE68 }; -const struct SpriteTemplate gUnknown_0853EE84 = +const struct SpriteTemplate gSpinningSparkleSpriteTemplate = { .tileTag = ANIM_TAG_SPARKLE_4, .paletteTag = ANIM_TAG_SPARKLE_4, @@ -120,9 +122,10 @@ const struct SpriteTemplate gUnknown_0853EE84 = .anims = sSpriteAnimTable_853EE80, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_80A8B64, + .callback = AnimSpinningSparkle, }; +// Unused const struct SpriteTemplate gUnknown_0853EE9C = { .tileTag = ANIM_TAG_MONSTER_FOOT, @@ -159,6 +162,7 @@ static const union AnimCmd *const sSpriteAnimTable_853EECC[] = sSpriteAnim_853EEC4 }; +// Unused const struct SpriteTemplate gUnknown_0853EED8 = { .tileTag = ANIM_TAG_IMPACT, @@ -204,7 +208,7 @@ const struct SpriteTemplate gUnknown_0853EF18 = .callback = sub_80A8A6C, }; -static const struct Subsprite gUnknown_0853EF30[] = +static const struct Subsprite sFrozenIceCubeSubsprites[] = { { .x = -16, @@ -240,12 +244,12 @@ static const struct Subsprite gUnknown_0853EF30[] = }, }; -static const struct SubspriteTable gUnknown_0853EF40[] = +static const struct SubspriteTable sFrozenIceCubeSubspriteTable[] = { - {ARRAY_COUNT(gUnknown_0853EF30), gUnknown_0853EF30}, + {ARRAY_COUNT(sFrozenIceCubeSubsprites), sFrozenIceCubeSubsprites}, }; -static const struct SpriteTemplate gUnknown_0853EF48 = +static const struct SpriteTemplate gFrozenIceCubeSpriteTemplate = { .tileTag = ANIM_TAG_ICE_CUBE, .paletteTag = ANIM_TAG_ICE_CUBE, @@ -267,7 +271,7 @@ static const struct SpriteTemplate gUnknown_0853EF60 = .callback = sub_80A9E44, }; -// code +// Unused u8 sub_80A9C70(u8 battlerId, bool8 b) { u8 battlerSpriteId = gBattlerSpriteIds[battlerId]; @@ -376,7 +380,7 @@ static void sub_80A9E78(struct Sprite *sprite) } } -void sub_80A9EF4(u8 taskId) +void AnimTask_FrozenIceCube(u8 taskId) { s16 x = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2) - 32; s16 y = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET) - 36; @@ -386,20 +390,20 @@ void sub_80A9EF4(u8 taskId) x -= 6; SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_ALL); SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(0, 16)); - spriteId = CreateSprite(&gUnknown_0853EF48, x, y, 4); + spriteId = CreateSprite(&gFrozenIceCubeSpriteTemplate, x, y, 4); if (GetSpriteTileStartByTag(ANIM_TAG_ICE_CUBE) == 0xFFFF) gSprites[spriteId].invisible = TRUE; - SetSubspriteTables(&gSprites[spriteId], gUnknown_0853EF40); + SetSubspriteTables(&gSprites[spriteId], sFrozenIceCubeSubspriteTable); gTasks[taskId].data[15] = spriteId; - gTasks[taskId].func = sub_80A9FD0; + gTasks[taskId].func = AnimTask_FrozenIceCube_Step1; } -static void sub_80A9FD0(u8 taskId) +static void AnimTask_FrozenIceCube_Step1(u8 taskId) { gTasks[taskId].data[1]++; if (gTasks[taskId].data[1] == 10) { - gTasks[taskId].func = sub_80AA020; + gTasks[taskId].func = AnimTask_FrozenIceCube_Step2; gTasks[taskId].data[1] = 0; } else @@ -410,7 +414,7 @@ static void sub_80A9FD0(u8 taskId) } } -static void sub_80AA020(u8 taskId) +static void AnimTask_FrozenIceCube_Step2(u8 taskId) { u8 palIndex = IndexOfSpritePaletteTag(ANIM_TAG_ICE_CUBE); @@ -436,19 +440,19 @@ static void sub_80AA020(u8 taskId) if (gTasks[taskId].data[4] == 2) { gTasks[taskId].data[1] = 9; - gTasks[taskId].func = sub_80AA0D0; + gTasks[taskId].func = AnimTask_FrozenIceCube_Step3; } } } } } -static void sub_80AA0D0(u8 taskId) +static void AnimTask_FrozenIceCube_Step3(u8 taskId) { gTasks[taskId].data[1]--; if (gTasks[taskId].data[1] == -1) { - gTasks[taskId].func = sub_80AA124; + gTasks[taskId].func = AnimTask_FrozenIceCube_Step4; gTasks[taskId].data[1] = 0; } else @@ -459,7 +463,7 @@ static void sub_80AA0D0(u8 taskId) } } -static void sub_80AA124(u8 taskId) +static void AnimTask_FrozenIceCube_Step4(u8 taskId) { gTasks[taskId].data[1]++; if (gTasks[taskId].data[1] == 37) diff --git a/src/battle_anim_utility_funcs.c b/src/battle_anim_utility_funcs.c index eff2bc3c7..dcef7d483 100644 --- a/src/battle_anim_utility_funcs.c +++ b/src/battle_anim_utility_funcs.c @@ -25,18 +25,18 @@ static EWRAM_DATA struct AnimStatsChangeData *sAnimStatsChangeData = {0}; static void StartBlendAnimSpriteColor(u8, u32); static void AnimTask_BlendSpriteColor_Step2(u8); -static void sub_81169A0(u8); -static void sub_81169F8(u8); -static void sub_8116AD0(struct Sprite*); -static void sub_8116D64(u8); +static void AnimTask_HardwarePaletteFade_Step(u8); +static void AnimTask_TraceMonBlended_Step(u8); +static void AnimMonTrace(struct Sprite*); +static void AnimTask_DrawFallingWhiteLinesOnAttacker_Step(u8); static void sub_8116F04(u8); static void sub_81170EC(u8); static void sub_81172EC(u8); -static void sub_8117500(u8); +static void AnimTask_Flash_Step(u8); static void sub_81175C4(u32, u16); -static void sub_81176D8(u8); +static void AnimTask_UpdateSlidingBg(u8); static void sub_8117A60(u8); -static void ExtremSpeedMoveTarget_Step(u8); +static void AnimTask_WaitAndRestoreVisibility(u8); const u16 gUnknown_08597418 = RGB(31, 31, 31); @@ -45,7 +45,7 @@ const u16 gUnknown_08597418 = RGB(31, 31, 31); const u8 gUnknown_0859741A[] = {REG_OFFSET_BG0CNT, REG_OFFSET_BG1CNT, REG_OFFSET_BG2CNT, REG_OFFSET_BG3CNT}; const u8 gUnknown_0859741E[] = {REG_OFFSET_BG0CNT, REG_OFFSET_BG1CNT, REG_OFFSET_BG2CNT, REG_OFFSET_BG3CNT}; -void sub_8116620(u8 taskId) +void AnimTask_BlendBattleAnimPal(u8 taskId) { u32 selectedPalettes = UnpackSelectedBattleAnimPalettes(gBattleAnimArgs[0]); selectedPalettes |= sub_80A76C4((gBattleAnimArgs[0] >> 7) & 1, @@ -55,7 +55,7 @@ void sub_8116620(u8 taskId) StartBlendAnimSpriteColor(taskId, selectedPalettes); } -void sub_8116664(u8 taskId) +void AnimTask_BlendBattleAnimPalExclude(u8 taskId) { u8 battler; u32 selectedPalettes; @@ -68,13 +68,13 @@ void sub_8116664(u8 taskId) case 2: selectedPalettes = 0; // fall through - case 0: + case ANIM_ATTACKER: animBattlers[0] = gBattleAnimAttacker; break; case 3: selectedPalettes = 0; // fall through - case 1: + case ANIM_TARGET: animBattlers[0] = gBattleAnimTarget; break; case 4: @@ -193,7 +193,7 @@ static void AnimTask_BlendSpriteColor_Step2(u8 taskId) } } -void sub_8116960(u8 taskId) +void AnimTask_HardwarePaletteFade(u8 taskId) { BeginHardwarePaletteFade( gBattleAnimArgs[0], @@ -202,16 +202,17 @@ void sub_8116960(u8 taskId) gBattleAnimArgs[3], gBattleAnimArgs[4]); - gTasks[taskId].func = sub_81169A0; + gTasks[taskId].func = AnimTask_HardwarePaletteFade_Step; } -static void sub_81169A0(u8 taskId) +static void AnimTask_HardwarePaletteFade_Step(u8 taskId) { if (!gPaletteFade.active) DestroyAnimVisualTask(taskId); } -void sub_81169C0(u8 taskId) +// Used to leave blended traces of a mon, usually to imply speed as in Agility or Aerial Ace +void AnimTask_TraceMonBlended(u8 taskId) { struct Task *task = &gTasks[taskId]; @@ -221,10 +222,10 @@ void sub_81169C0(u8 taskId) task->data[3] = gBattleAnimArgs[2]; task->data[4] = gBattleAnimArgs[3]; task->data[5] = 0; - task->func = sub_81169F8; + task->func = AnimTask_TraceMonBlended_Step; } -static void sub_81169F8(u8 taskId) +static void AnimTask_TraceMonBlended_Step(u8 taskId) { struct Task *task = &gTasks[taskId]; @@ -243,7 +244,7 @@ static void sub_81169F8(u8 taskId) gSprites[task->data[6]].data[0] = task->data[3]; gSprites[task->data[6]].data[1] = taskId; gSprites[task->data[6]].data[2] = 5; - gSprites[task->data[6]].callback = sub_8116AD0; + gSprites[task->data[6]].callback = AnimMonTrace; task->data[5]++; } @@ -257,7 +258,7 @@ static void sub_81169F8(u8 taskId) } } -static void sub_8116AD0(struct Sprite *sprite) +static void AnimMonTrace(struct Sprite *sprite) { if (sprite->data[0]) { @@ -270,7 +271,8 @@ static void sub_8116AD0(struct Sprite *sprite) } } -void sub_8116B14(u8 taskId) +// Only used by Curse for non-Ghost mons +void AnimTask_DrawFallingWhiteLinesOnAttacker(u8 taskId) { u16 species; int spriteId, newSpriteId; @@ -326,10 +328,10 @@ void sub_8116B14(u8 taskId) species = GetMonData(&gPlayerParty[gBattlerPartyIndexes[gBattleAnimAttacker]], MON_DATA_SPECIES); } - spriteId = GetAnimBattlerSpriteId(0); + spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER); newSpriteId = sub_80A89C8(gBattleAnimAttacker, spriteId, species); sub_80A6B30(&unknownStruct); - sub_80A6D60(&unknownStruct, gUnknown_08C20684, 0); + AnimLoadCompressedBgTilemapHandleContest(&unknownStruct, gUnknown_08C20684, 0); AnimLoadCompressedBgGfx(unknownStruct.bgId, gUnknown_08C20668, unknownStruct.tilesOffset); LoadPalette(&gUnknown_08597418, unknownStruct.paletteId * 16 + 1, 2); @@ -337,10 +339,10 @@ void sub_8116B14(u8 taskId) gBattle_BG1_Y = -gSprites[spriteId].pos1.y + 32; gTasks[taskId].data[0] = newSpriteId; gTasks[taskId].data[6] = var0; - gTasks[taskId].func = sub_8116D64; + gTasks[taskId].func = AnimTask_DrawFallingWhiteLinesOnAttacker_Step; } -static void sub_8116D64(u8 taskId) +static void AnimTask_DrawFallingWhiteLinesOnAttacker_Step(u8 taskId) { struct BattleAnimBgData unknownStruct; struct Sprite *sprite; @@ -468,9 +470,9 @@ static void sub_81170EC(u8 taskId) sub_80A6B30(&unknownStruct); if (sAnimStatsChangeData->data[0] == 0) - sub_80A6D60(&unknownStruct, gBattleStatMask1_Tilemap, 0); + AnimLoadCompressedBgTilemapHandleContest(&unknownStruct, gBattleStatMask1_Tilemap, 0); else - sub_80A6D60(&unknownStruct, gBattleStatMask2_Tilemap, 0); + AnimLoadCompressedBgTilemapHandleContest(&unknownStruct, gBattleStatMask2_Tilemap, 0); AnimLoadCompressedBgGfx(unknownStruct.bgId, gBattleStatMask_Gfx, unknownStruct.tilesOffset); switch (sAnimStatsChangeData->data[1]) @@ -599,7 +601,7 @@ static void sub_81172EC(u8 taskId) } } -void sub_8117494(u8 taskId) +void AnimTask_Flash(u8 taskId) { u32 selectedPalettes = sub_80A76C4(1, 1, 1, 1); sub_81175C4(selectedPalettes, 0); @@ -611,10 +613,10 @@ void sub_8117494(u8 taskId) gTasks[taskId].data[0] = 0; gTasks[taskId].data[1] = 0; - gTasks[taskId].func = sub_8117500; + gTasks[taskId].func = AnimTask_Flash_Step; } -static void sub_8117500(u8 taskId) +static void AnimTask_Flash_Step(u8 taskId) { u16 i; struct Task *task = &gTasks[taskId]; @@ -681,7 +683,7 @@ static void sub_81175C4(u32 selectedPalettes, u16 color) } } -void sub_8117610(u8 taskId) +void AnimTask_BlendNonAttackerPalettes(u8 taskId) { u32 battler; int j; @@ -699,12 +701,12 @@ void sub_8117610(u8 taskId) StartBlendAnimSpriteColor(taskId, selectedPalettes); } -void sub_8117660(u8 taskId) +void AnimTask_StartSlidingBg(u8 taskId) { u8 newTaskId; sub_80A6DAC(0); - newTaskId = CreateTask(sub_81176D8, 5); + newTaskId = CreateTask(AnimTask_UpdateSlidingBg, 5); if (gBattleAnimArgs[2] && GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER) { gBattleAnimArgs[0] = -gBattleAnimArgs[0]; @@ -718,7 +720,7 @@ void sub_8117660(u8 taskId) DestroyAnimVisualTask(taskId); } -static void sub_81176D8(u8 taskId) +static void AnimTask_UpdateSlidingBg(u8 taskId) { gTasks[taskId].data[10] += gTasks[taskId].data[1]; gTasks[taskId].data[11] += gTasks[taskId].data[2]; @@ -738,35 +740,39 @@ static void sub_81176D8(u8 taskId) void AnimTask_GetAttackerSide(u8 taskId) { - gBattleAnimArgs[7] = GetBattlerSide(gBattleAnimAttacker); + gBattleAnimArgs[ARG_RET_ID] = GetBattlerSide(gBattleAnimAttacker); DestroyAnimVisualTask(taskId); } void AnimTask_GetTargetSide(u8 taskId) { - gBattleAnimArgs[7] = GetBattlerSide(gBattleAnimTarget); + gBattleAnimArgs[ARG_RET_ID] = GetBattlerSide(gBattleAnimTarget); DestroyAnimVisualTask(taskId); } void AnimTask_GetTargetIsAttackerPartner(u8 taskId) { - gBattleAnimArgs[7] = BATTLE_PARTNER(gBattleAnimAttacker) == gBattleAnimTarget; + gBattleAnimArgs[ARG_RET_ID] = BATTLE_PARTNER(gBattleAnimAttacker) == gBattleAnimTarget; DestroyAnimVisualTask(taskId); } -void sub_81177E4(u8 taskId) +#define tInvisible gBattleAnimArgs[0]; + +// For hiding or subsequently revealing all other battlers +void AnimTask_SetAllNonAttackersInvisiblity(u8 taskId) { u16 battler; for (battler = 0; battler < MAX_BATTLERS_COUNT; battler++) { if (battler != gBattleAnimAttacker && IsBattlerSpriteVisible(battler)) - gSprites[gBattlerSpriteIds[battler]].invisible = gBattleAnimArgs[0]; + gSprites[gBattlerSpriteIds[battler]].invisible = tInvisible; } DestroyAnimVisualTask(taskId); } +#undef tInvisible void sub_8117854(u8 taskId, int unused, u16 arg2, u8 battler1, u8 arg4, u8 arg5, u8 arg6, u8 arg7, const u32 *gfx, const u32 *tilemap, const u32 *palette) { @@ -819,7 +825,7 @@ void sub_8117854(u8 taskId, int unused, u16 arg2, u8 battler1, u8 arg4, u8 arg5, spriteId2 = sub_80A89C8(battler2, gBattlerSpriteIds[battler2], species); sub_80A6B30(&unknownStruct); - sub_80A6D60(&unknownStruct, tilemap, 0); + AnimLoadCompressedBgTilemapHandleContest(&unknownStruct, tilemap, 0); AnimLoadCompressedBgGfx(unknownStruct.bgId, gfx, unknownStruct.tilesOffset); LoadCompressedPalette(palette, unknownStruct.paletteId * 16, 32); @@ -902,20 +908,19 @@ void AnimTask_GetBattleTerrain(u8 taskId) DestroyAnimVisualTask(taskId); } -void sub_8117C44(u8 taskId) +void AnimTask_AllocBackupPalBuffer(u8 taskId) { - gMonSpritesGfxPtr->field_17C = AllocZeroed(0x2000); + gMonSpritesGfxPtr->buffer = AllocZeroed(0x2000); DestroyAnimVisualTask(taskId); } -void sub_8117C70(u8 taskId) +void AnimTask_FreeBackupPalBuffer(u8 taskId) { - Free(gMonSpritesGfxPtr->field_17C); - gMonSpritesGfxPtr->field_17C = NULL; + FREE_AND_SET_NULL(gMonSpritesGfxPtr->buffer); DestroyAnimVisualTask(taskId); } -void sub_8117CA0(u8 taskId) +void AnimTask_CopyPalUnfadedToBackup(u8 taskId) { u32 selectedPalettes; int paletteIndex = 0; @@ -938,11 +943,11 @@ void sub_8117CA0(u8 taskId) paletteIndex = gBattleAnimTarget + 16; } - memcpy(&gMonSpritesGfxPtr->field_17C[gBattleAnimArgs[1] * 16], &gPlttBufferUnfaded[paletteIndex * 16], 32); + memcpy(&gMonSpritesGfxPtr->buffer[gBattleAnimArgs[1] * 16], &gPlttBufferUnfaded[paletteIndex * 16], 32); DestroyAnimVisualTask(taskId); } -void sub_8117D3C(u8 taskId) +void AnimTask_CopyPalUnfadedFromBackup(u8 taskId) { u32 selectedPalettes; int paletteIndex = 0; @@ -965,11 +970,11 @@ void sub_8117D3C(u8 taskId) paletteIndex = gBattleAnimTarget + 16; } - memcpy(&gPlttBufferUnfaded[paletteIndex * 16], &gMonSpritesGfxPtr->field_17C[gBattleAnimArgs[1] * 16], 32); + memcpy(&gPlttBufferUnfaded[paletteIndex * 16], &gMonSpritesGfxPtr->buffer[gBattleAnimArgs[1] * 16], 32); DestroyAnimVisualTask(taskId); } -void sub_8117DD8(u8 taskId) +void AnimTask_CopyPalFadedToUnfaded(u8 taskId) { u32 selectedPalettes; int paletteIndex = 0; @@ -999,14 +1004,14 @@ void sub_8117DD8(u8 taskId) void AnimTask_IsContest(u8 taskId) { if (IsContest()) - gBattleAnimArgs[7] = 1; + gBattleAnimArgs[ARG_RET_ID] = TRUE; else - gBattleAnimArgs[7] = 0; + gBattleAnimArgs[ARG_RET_ID] = FALSE; DestroyAnimVisualTask(taskId); } -void sub_8117E94(u8 taskId) +void AnimTask_SetAnimAttackerAndTargetForEffectTgt(u8 taskId) { gBattleAnimAttacker = gBattlerTarget; gBattleAnimTarget = gEffectBattler; @@ -1016,27 +1021,27 @@ void sub_8117E94(u8 taskId) void AnimTask_IsTargetSameSide(u8 taskId) { if (GetBattlerSide(gBattleAnimAttacker) == GetBattlerSide(gBattleAnimTarget)) - gBattleAnimArgs[7] = 1; + gBattleAnimArgs[ARG_RET_ID] = TRUE; else - gBattleAnimArgs[7] = 0; + gBattleAnimArgs[ARG_RET_ID] = FALSE; DestroyAnimVisualTask(taskId); } -void sub_8117F10(u8 taskId) +void AnimTask_SetAnimTargetToBattlerTarget(u8 taskId) { gBattleAnimTarget = gBattlerTarget; DestroyAnimVisualTask(taskId); } -void sub_8117F30(u8 taskId) +void AnimTask_SetAnimAttackerAndTargetForEffectAtk(u8 taskId) { gBattleAnimAttacker = gBattlerAttacker; gBattleAnimTarget = gEffectBattler; DestroyAnimVisualTask(taskId); } -void AnimTask_ExtremeSpeedMoveTarget(u8 taskId) +void AnimTask_SetAttackerInvisibleWaitForSignal(u8 taskId) { if (IsContest()) { @@ -1045,13 +1050,13 @@ void AnimTask_ExtremeSpeedMoveTarget(u8 taskId) else { gTasks[taskId].data[0] = gBattleSpritesDataPtr->battlerData[gBattleAnimAttacker].invisible; - gBattleSpritesDataPtr->battlerData[gBattleAnimAttacker].invisible = 1; - gTasks[taskId].func = ExtremSpeedMoveTarget_Step; + gBattleSpritesDataPtr->battlerData[gBattleAnimAttacker].invisible = TRUE; + gTasks[taskId].func = AnimTask_WaitAndRestoreVisibility; gAnimVisualTaskCount--; } } -static void ExtremSpeedMoveTarget_Step(u8 taskId) +static void AnimTask_WaitAndRestoreVisibility(u8 taskId) { if (gBattleAnimArgs[7] == 0x1000) { diff --git a/src/water.c b/src/battle_anim_water.c similarity index 75% rename from src/water.c rename to src/battle_anim_water.c index a2fe4c56f..5810b6bdc 100644 --- a/src/water.c +++ b/src/battle_anim_water.c @@ -13,56 +13,52 @@ #include "constants/battle.h" #include "constants/rgb.h" -void sub_810721C(struct Sprite *); -void sub_8107228(struct Sprite *); -void sub_8107260(struct Sprite *); -void sub_8107380(struct Sprite *); -void sub_8107408(struct Sprite *); -void sub_8107430(struct Sprite *); -void sub_810744C(struct Sprite *); -void sub_81074E4(struct Sprite *); -void sub_81075EC(struct Sprite *); -void sub_8107674(struct Sprite *); -void sub_8107730(struct Sprite *); -void sub_81077A4(struct Sprite *); -void sub_81077C0(struct Sprite *); -void sub_8107894(struct Sprite *); -void sub_81078D0(struct Sprite *); -void sub_810790C(struct Sprite *); -void sub_8108034(struct Sprite *); -void sub_8108098(struct Sprite *); -void sub_810851C(struct Sprite *); -void sub_81087C0(struct Sprite *); -void sub_810886C(struct Sprite *); -void sub_8108B2C(struct Sprite *); -void sub_8108B94(struct Sprite *); -void sub_8108BE0(struct Sprite *); -void sub_8108C08(struct Sprite *); -void sub_8108C54(struct Sprite *); -void AnimWaterPulseRing_Step(struct Sprite *); -void sub_810756C(u8); -void sub_81076F4(u8); -void sub_8107B84(u8); -void sub_8107CC4(u8); -void sub_8107D58(u8); -void sub_8108140(u8); -void sub_810862C(u8); -void sub_8108978(u8); -u8 sub_8108384(void); -void sub_8108408(struct Task*, u8); -void sub_810871C(struct Task*, u8); -void sub_8108AC0(struct Task*); -void sub_8108D54(struct Sprite*, int, int); +static void AnimRainDrop(struct Sprite *); +static void AnimRainDrop_Step(struct Sprite *); +static void AnimWaterBubbleProjectile(struct Sprite *); +static void AnimWaterBubbleProjectile_Step1(struct Sprite *); +static void AnimWaterBubbleProjectile_Step2(struct Sprite *); +static void AnimWaterBubbleProjectile_Step3(struct Sprite *); +static void AnimAuroraBeamRings(struct Sprite *); +static void AnimAuroraBeamRings_Step(struct Sprite *); +static void AnimToTargetInSinWave(struct Sprite *); +static void AnimToTargetInSinWave_Step(struct Sprite *); +static void AnimHydroCannonCharge(struct Sprite *); +static void AnimHydroCannonCharge_Step(struct Sprite *); +static void AnimHydroCannonBeam(struct Sprite *); +static void AnimWaterGunDroplet(struct Sprite *); +static void AnimSmallBubblePair(struct Sprite *); +static void AnimSmallBubblePair_Step(struct Sprite *); +static void AnimSmallDriftingBubbles(struct Sprite *); +static void AnimSmallDriftingBubbles_Step(struct Sprite *); +static void AnimSmallWaterOrb(struct Sprite *); +static void AnimWaterSpoutRain(struct Sprite *); +static void AnimWaterSpoutRainHit(struct Sprite *); +static void AnimWaterSportDroplet(struct Sprite *); +static void AnimWaterSportDroplet_Step(struct Sprite *); +static void AnimWaterPulseBubble(struct Sprite *); +static void AnimWaterPulseBubble_Step(struct Sprite *); +static void AnimWaterPulseRingBubble(struct Sprite *); +static void AnimWaterPulseRing_Step(struct Sprite *); +static void AnimTask_RotateAuroraRingColors_Step(u8); +static void AnimTask_RunSinAnimTimer(u8); +static void AnimTask_CreateSurfWave_Step1(u8); +static void AnimTask_CreateSurfWave_Step2(u8); +static void AnimTask_SurfWaveScanlineEffect(u8); +static void AnimTask_WaterSpoutLaunch_Step(u8); +static void AnimTask_WaterSpoutRain_Step(u8); +static u8 GetWaterSpoutPowerForAnim(void); +static void CreateWaterSpoutLaunchDroplets(struct Task*, u8); +static void CreateWaterSpoutRainDroplet(struct Task*, u8); +static void AnimTask_WaterSport_Step(u8); +static void CreateWaterSportDroplet(struct Task*); +static void CreateWaterPulseRingBubbles(struct Sprite*, int, int); -extern const union AffineAnimCmd *const gGrowingRingAffineAnimTable[]; -extern const union AffineAnimCmd *const gUnknown_08596208[]; -extern const union AnimCmd *const gUnknown_08595AB8[]; - -// what is this? +// Both unused const u8 gUnknown_8593C80[] = INCBIN_U8("graphics/unknown/unknown_593C80.4bpp"); const u8 gUnknown_8593FFC[] = INCBIN_U8("graphics/unknown/unknown_593FFC.bin"); -const union AnimCmd gUnknown_08594FFC[] = +static const union AnimCmd sAnim_RainDrop[] = { ANIMCMD_FRAME(0, 2), ANIMCMD_FRAME(8, 2), @@ -74,35 +70,35 @@ const union AnimCmd gUnknown_08594FFC[] = ANIMCMD_END, }; -const union AnimCmd *const gUnknown_0859501C[] = +static const union AnimCmd *const sAnims_RainDrop[] = { - gUnknown_08594FFC, + sAnim_RainDrop, }; -const struct SpriteTemplate gUnknown_08595020 = +const struct SpriteTemplate gRainDropSpriteTemplate = { .tileTag = ANIM_TAG_RAIN_DROPS, .paletteTag = ANIM_TAG_RAIN_DROPS, .oam = &gOamData_AffineOff_ObjNormal_16x32, - .anims = gUnknown_0859501C, + .anims = sAnims_RainDrop, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_810721C, + .callback = AnimRainDrop, }; -const union AffineAnimCmd gUnknown_08595038[] = +static const union AffineAnimCmd sAffineAnim_WaterBubbleProjectile[] = { AFFINEANIMCMD_FRAME(0xFFFB, 0xFFFB, 0, 10), AFFINEANIMCMD_FRAME(0x5, 0x5, 0, 10), AFFINEANIMCMD_JUMP(0), }; -const union AffineAnimCmd *const gUnknown_08595050[] = +static const union AffineAnimCmd *const sAffineAnims_WaterBubbleProjectile[] = { - gUnknown_08595038, + sAffineAnim_WaterBubbleProjectile, }; -const union AnimCmd gUnknown_08595054[] = +static const union AnimCmd sAnim_WaterBubbleProjectile[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_FRAME(4, 5), @@ -110,65 +106,64 @@ const union AnimCmd gUnknown_08595054[] = ANIMCMD_END, }; -const union AnimCmd *const gUnknown_08595064[] = +static const union AnimCmd *const sAnims_WaterBubbleProjectile[] = { - gUnknown_08595054, + sAnim_WaterBubbleProjectile, }; -const struct SpriteTemplate gBattleAnimSpriteTemplate_8595068 = +const struct SpriteTemplate gWaterBubbleProjectileSpriteTemplate = { .tileTag = ANIM_TAG_BUBBLE, .paletteTag = ANIM_TAG_BUBBLE, .oam = &gOamData_AffineNormal_ObjBlend_16x16, - .anims = gUnknown_08595064, + .anims = sAnims_WaterBubbleProjectile, .images = NULL, - .affineAnims = gUnknown_08595050, - .callback = sub_8107260, + .affineAnims = sAffineAnims_WaterBubbleProjectile, + .callback = AnimWaterBubbleProjectile, }; -const union AnimCmd gUnknown_08595080[] = +static const union AnimCmd sAnim_AuroraBeamRing_0[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -const union AnimCmd gUnknown_08595088[] = +static const union AnimCmd sAnim_AuroraBeamRing_1[] = { ANIMCMD_FRAME(4, 1), ANIMCMD_END, }; -const union AnimCmd *const gUnknown_08595090[] = +static const union AnimCmd *const sAnims_AuroraBeamRing[] = { - gUnknown_08595080, - gUnknown_08595088, + sAnim_AuroraBeamRing_0, + sAnim_AuroraBeamRing_1, }; -const union AffineAnimCmd gUnknown_08595098[] = +static const union AffineAnimCmd sAffineAnim_AuroraBeamRing[] = { AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 1), AFFINEANIMCMD_FRAME(0x60, 0x60, 0, 1), AFFINEANIMCMD_END, }; -const union AffineAnimCmd *const gUnknown_085950B0[] = +static const union AffineAnimCmd *const sAffineAnims_AuroraBeamRing[] = { - gUnknown_08595098, + sAffineAnim_AuroraBeamRing, }; -// Multi-colored rings used in Aurora Beam. -const struct SpriteTemplate gUnknown_085950B4 = +const struct SpriteTemplate gAuroraBeamRingSpriteTemplate = { .tileTag = ANIM_TAG_RAINBOW_RINGS, .paletteTag = ANIM_TAG_RAINBOW_RINGS, .oam = &gOamData_AffineDouble_ObjNormal_8x16, - .anims = gUnknown_08595090, + .anims = sAnims_AuroraBeamRing, .images = NULL, - .affineAnims = gUnknown_085950B0, - .callback = sub_810744C, + .affineAnims = sAffineAnims_AuroraBeamRing, + .callback = AnimAuroraBeamRings, }; -const union AnimCmd gUnknown_085950CC[] = +static const union AnimCmd sAnim_WaterMudOrb[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_FRAME(4, 1), @@ -177,34 +172,34 @@ const union AnimCmd gUnknown_085950CC[] = ANIMCMD_JUMP(0), }; -const union AnimCmd *const gUnknown_085950E0[] = +const union AnimCmd *const gAnims_WaterMudOrb[] = { - gUnknown_085950CC, + sAnim_WaterMudOrb, }; -const struct SpriteTemplate gUnknown_085950E4 = +const struct SpriteTemplate gHydroPumpOrbSpriteTemplate = { .tileTag = ANIM_TAG_WATER_ORB, .paletteTag = ANIM_TAG_WATER_ORB, .oam = &gOamData_AffineOff_ObjBlend_16x16, - .anims = gUnknown_085950E0, + .anims = gAnims_WaterMudOrb, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_81075EC, + .callback = AnimToTargetInSinWave, }; -const struct SpriteTemplate gUnknown_085950FC = +const struct SpriteTemplate gMudShotOrbSpriteTemplate = { .tileTag = ANIM_TAG_BROWN_ORB, .paletteTag = ANIM_TAG_BROWN_ORB, .oam = &gOamData_AffineOff_ObjBlend_16x16, - .anims = gUnknown_085950E0, + .anims = gAnims_WaterMudOrb, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_81075EC, + .callback = AnimToTargetInSinWave, }; -const struct SpriteTemplate gUnknown_08595114 = +const struct SpriteTemplate gSignalBeamRedOrbSpriteTemplate = { .tileTag = ANIM_TAG_GLOWY_RED_ORB, .paletteTag = ANIM_TAG_GLOWY_RED_ORB, @@ -212,10 +207,10 @@ const struct SpriteTemplate gUnknown_08595114 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_81075EC, + .callback = AnimToTargetInSinWave, }; -const struct SpriteTemplate gUnknown_0859512C = +const struct SpriteTemplate gSignalBeamGreenOrbSpriteTemplate = { .tileTag = ANIM_TAG_GLOWY_GREEN_ORB, .paletteTag = ANIM_TAG_GLOWY_GREEN_ORB, @@ -223,10 +218,10 @@ const struct SpriteTemplate gUnknown_0859512C = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_81075EC, + .callback = AnimToTargetInSinWave, }; -const union AnimCmd gUnknown_08595144[] = +static const union AnimCmd sAnim_FlamethrowerFlame[] = { ANIMCMD_FRAME(16, 2), ANIMCMD_FRAME(32, 2), @@ -234,23 +229,23 @@ const union AnimCmd gUnknown_08595144[] = ANIMCMD_JUMP(0), }; -const union AnimCmd *const gUnknown_08595154[] = +static const union AnimCmd *const sAnims_FlamethrowerFlame[] = { - gUnknown_08595144, + sAnim_FlamethrowerFlame, }; -const struct SpriteTemplate gUnknown_08595158 = +const struct SpriteTemplate gFlamethrowerFlameSpriteTemplate = { .tileTag = ANIM_TAG_SMALL_EMBER, .paletteTag = ANIM_TAG_SMALL_EMBER, .oam = &gOamData_AffineOff_ObjNormal_32x32, - .anims = gUnknown_08595154, + .anims = sAnims_FlamethrowerFlame, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_81075EC, + .callback = AnimToTargetInSinWave, }; -const struct SpriteTemplate gUnknown_08595170 = +const struct SpriteTemplate gPsywaveRingSpriteTemplate = { .tileTag = ANIM_TAG_BLUE_RING, .paletteTag = ANIM_TAG_BLUE_RING, @@ -258,10 +253,10 @@ const struct SpriteTemplate gUnknown_08595170 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gGrowingRingAffineAnimTable, - .callback = sub_81075EC, + .callback = AnimToTargetInSinWave, }; -const union AffineAnimCmd gUnknown_08595188[] = +static const union AffineAnimCmd sAffineAnim_HydroCannonCharge[] = { AFFINEANIMCMD_FRAME(0x3, 0x3, 10, 50), AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 10), @@ -269,100 +264,100 @@ const union AffineAnimCmd gUnknown_08595188[] = AFFINEANIMCMD_END, }; -const union AffineAnimCmd gUnknown_085951A8[] = +static const union AffineAnimCmd sAffineAnim_HydroCannonBeam[] = { AFFINEANIMCMD_FRAME(0x150, 0x150, 0, 0), AFFINEANIMCMD_END, }; -const union AffineAnimCmd *const gUnknown_085951B8[] = +static const union AffineAnimCmd *const sAffineAnims_HydroCannonCharge[] = { - gUnknown_08595188, + sAffineAnim_HydroCannonCharge, }; -const union AffineAnimCmd *const gUnknown_085951BC[] = +static const union AffineAnimCmd *const sAffineAnims_HydroCannonBeam[] = { - gUnknown_085951A8, + sAffineAnim_HydroCannonBeam, }; -const struct SpriteTemplate gUnknown_085951C0 = +const struct SpriteTemplate gHydroCannonChargeSpriteTemplate = { .tileTag = ANIM_TAG_WATER_ORB, .paletteTag = ANIM_TAG_WATER_ORB, .oam = &gOamData_AffineDouble_ObjBlend_16x16, - .anims = gUnknown_085950E0, + .anims = gAnims_WaterMudOrb, .images = NULL, - .affineAnims = gUnknown_085951B8, - .callback = sub_8107730, + .affineAnims = sAffineAnims_HydroCannonCharge, + .callback = AnimHydroCannonCharge, }; -const struct SpriteTemplate gUnknown_085951D8 = +const struct SpriteTemplate gHydroCannonBeamSpriteTemplate = { .tileTag = ANIM_TAG_WATER_ORB, .paletteTag = ANIM_TAG_WATER_ORB, .oam = &gOamData_AffineDouble_ObjBlend_16x16, - .anims = gUnknown_085950E0, + .anims = gAnims_WaterMudOrb, .images = NULL, - .affineAnims = gUnknown_085951BC, - .callback = sub_81077C0, + .affineAnims = sAffineAnims_HydroCannonBeam, + .callback = AnimHydroCannonBeam, }; -const union AnimCmd gUnknown_085951F0[] = +static const union AnimCmd sAnim_WaterBubble[] = { ANIMCMD_FRAME(0, 1), ANIMCMD_END, }; -const union AnimCmd gUnknown_085951F8[] = +static const union AnimCmd sAnim_WaterGunDroplet[] = { ANIMCMD_FRAME(4, 1), ANIMCMD_END, }; -const union AnimCmd *const gUnknown_08595200[] = +const union AnimCmd *const gAnims_WaterBubble[] = { - gUnknown_085951F0, + sAnim_WaterBubble, }; -const union AnimCmd *const gUnknown_08595204[] = +static const union AnimCmd *const sAnims_WaterGunDroplet[] = { - gUnknown_085951F8, + sAnim_WaterGunDroplet, }; -const struct SpriteTemplate gUnknown_08595208 = +const struct SpriteTemplate gWaterGunProjectileSpriteTemplate = { .tileTag = ANIM_TAG_SMALL_BUBBLES, .paletteTag = ANIM_TAG_SMALL_BUBBLES, .oam = &gOamData_AffineOff_ObjBlend_16x16, - .anims = gUnknown_08595200, + .anims = gAnims_WaterBubble, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, .callback = AnimThrowProjectile, }; -const struct SpriteTemplate gUnknown_08595220 = +const struct SpriteTemplate gWaterGunDropletSpriteTemplate = { .tileTag = ANIM_TAG_SMALL_BUBBLES, .paletteTag = ANIM_TAG_SMALL_BUBBLES, .oam = &gOamData_AffineDouble_ObjBlend_16x16, - .anims = gUnknown_08595204, + .anims = sAnims_WaterGunDroplet, .images = NULL, - .affineAnims = gUnknown_08596208, - .callback = sub_8107894, + .affineAnims = gAffineAnims_Droplet, + .callback = AnimWaterGunDroplet, }; -const struct SpriteTemplate gUnknown_08595238 = +const struct SpriteTemplate gSmallBubblePairSpriteTemplate = { - .tileTag = ANIM_TAG_ICE_CRYSTALS, + .tileTag = ANIM_TAG_ICE_CRYSTALS, // ice_crystals_4, which are bubbles .paletteTag = ANIM_TAG_ICE_CRYSTALS, .oam = &gOamData_AffineOff_ObjNormal_8x8, - .anims = gUnknown_08595AB8, + .anims = gAnims_SmallBubblePair, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_81078D0, + .callback = AnimSmallBubblePair, }; -const struct SpriteTemplate gUnknown_08595250 = +const struct SpriteTemplate gSmallDriftingBubblesSpriteTemplate = { .tileTag = ANIM_TAG_SMALL_BUBBLES, .paletteTag = ANIM_TAG_SMALL_BUBBLES, @@ -370,10 +365,11 @@ const struct SpriteTemplate gUnknown_08595250 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_8108034, + .callback = AnimSmallDriftingBubbles, }; -const struct SpriteTemplate gUnknown_08595268 = +// Used by Water Spout / Water Sport +const struct SpriteTemplate gSmallWaterOrbSpriteTemplate = { .tileTag = ANIM_TAG_GLOWY_BLUE_ORB, .paletteTag = ANIM_TAG_GLOWY_BLUE_ORB, @@ -381,105 +377,103 @@ const struct SpriteTemplate gUnknown_08595268 = .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_810851C, + .callback = AnimSmallWaterOrb, }; -const union AnimCmd gUnknown_08595280[] = +static const union AnimCmd sAnim_WaterPulseBubble_0[] = { ANIMCMD_FRAME(8, 1), ANIMCMD_END, }; -const union AnimCmd gUnknown_08595288[] = +static const union AnimCmd sAnim_WaterPulseBubble_1[] = { ANIMCMD_FRAME(9, 1), ANIMCMD_END, }; -const union AnimCmd gUnknown_08595290[] = +static const union AnimCmd sAnim_WeatherBallWaterDown[] = { ANIMCMD_FRAME(4, 1), ANIMCMD_END, }; -const union AnimCmd *const gUnknown_08595298[] = +static const union AnimCmd *const sAnims_WaterPulseBubble[] = { - gUnknown_08595280, - gUnknown_08595288, + sAnim_WaterPulseBubble_0, + sAnim_WaterPulseBubble_1, }; -const union AnimCmd *const gUnknown_085952A0[] = +static const union AnimCmd *const sAnims_WeatherBallWaterDown[] = { - gUnknown_08595290, + sAnim_WeatherBallWaterDown, }; -const union AffineAnimCmd gUnknown_085952A4[] = +static const union AffineAnimCmd sAffineAnim_WaterPulseRingBubble_0[] = { AFFINEANIMCMD_FRAME(0x100, 0x100, 0, 0), AFFINEANIMCMD_FRAME(0xFFF6, 0xFFF6, 0, 15), AFFINEANIMCMD_END, }; -const union AffineAnimCmd gUnknown_085952BC[] = +static const union AffineAnimCmd sAffineAnim_WaterPulseRingBubble_1[] = { AFFINEANIMCMD_FRAME(0xE0, 0xE0, 0, 0), AFFINEANIMCMD_FRAME(0xFFF8, 0xFFF8, 0, 15), AFFINEANIMCMD_END, }; -const union AffineAnimCmd gUnknown_085952D4[] = +static const union AffineAnimCmd sAffineAnim_WeatherBallWaterDown[] = { AFFINEANIMCMD_FRAME(0x150, 0x150, 0, 0), AFFINEANIMCMD_FRAME(0x0, 0x0, 0, 15), AFFINEANIMCMD_END, }; -const union AffineAnimCmd *const gUnknown_085952EC[] = +static const union AffineAnimCmd *const sAffineAnims_WaterPulseRingBubble[] = { - gUnknown_085952A4, - gUnknown_085952BC, + sAffineAnim_WaterPulseRingBubble_0, + sAffineAnim_WaterPulseRingBubble_1, }; -const union AffineAnimCmd *const gUnknown_085952F4[] = +static const union AffineAnimCmd *const sAffineAnims_WeatherBallWaterDown[] = { - gUnknown_085952D4, + sAffineAnim_WeatherBallWaterDown, }; -const struct SpriteTemplate gUnknown_085952F8 = +const struct SpriteTemplate gWaterPulseBubbleSpriteTemplate = { .tileTag = ANIM_TAG_SMALL_BUBBLES, .paletteTag = ANIM_TAG_SMALL_BUBBLES, .oam = &gOamData_AffineOff_ObjNormal_8x8, - .anims = gUnknown_08595298, + .anims = sAnims_WaterPulseBubble, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_8108BE0, + .callback = AnimWaterPulseBubble, }; -const struct SpriteTemplate gUnknown_08595310 = +const struct SpriteTemplate gWaterPulseRingBubbleSpriteTemplate = { .tileTag = ANIM_TAG_SMALL_BUBBLES, .paletteTag = ANIM_TAG_SMALL_BUBBLES, .oam = &gOamData_AffineNormal_ObjNormal_8x8, - .anims = gUnknown_08595298, + .anims = sAnims_WaterPulseBubble, .images = NULL, - .affineAnims = gUnknown_085952EC, - .callback = sub_8108C54, + .affineAnims = sAffineAnims_WaterPulseRingBubble, + .callback = AnimWaterPulseRingBubble, }; -const struct SpriteTemplate gUnknown_08595328 = +const struct SpriteTemplate gWeatherBallWaterDownSpriteTemplate = { .tileTag = ANIM_TAG_SMALL_BUBBLES, .paletteTag = ANIM_TAG_SMALL_BUBBLES, .oam = &gOamData_AffineNormal_ObjNormal_16x16, - .anims = gUnknown_085952A0, + .anims = sAnims_WeatherBallWaterDown, .images = NULL, - .affineAnims = gUnknown_085952F4, - .callback = sub_80A8EE4, + .affineAnims = sAffineAnims_WeatherBallWaterDown, + .callback = AnimWeatherBallDown, }; -extern const struct SpriteTemplate gUnknown_08597388; - void AnimTask_CreateRaindrops(u8 taskId) { u8 x, y; @@ -495,18 +489,18 @@ void AnimTask_CreateRaindrops(u8 taskId) { x = Random2() % 240; y = Random2() % 80; - CreateSprite(&gUnknown_08595020, x, y, 4); + CreateSprite(&gRainDropSpriteTemplate, x, y, 4); } if (gTasks[taskId].data[0] == gTasks[taskId].data[3]) DestroyAnimVisualTask(taskId); } -void sub_810721C(struct Sprite *sprite) +static void AnimRainDrop(struct Sprite *sprite) { - sprite->callback = sub_8107228; + sprite->callback = AnimRainDrop_Step; } -void sub_8107228(struct Sprite *sprite) +static void AnimRainDrop_Step(struct Sprite *sprite) { if (++sprite->data[0] <= 13) { @@ -517,7 +511,8 @@ void sub_8107228(struct Sprite *sprite) DestroySprite(sprite); } -void sub_8107260(struct Sprite *sprite) +// For water bubbles that move to a dest, as in Bubble/Bubblebeam +static void AnimWaterBubbleProjectile(struct Sprite *sprite) { u8 spriteId; @@ -550,11 +545,11 @@ void sub_8107260(struct Sprite *sprite) gSprites[spriteId].data[2] = gBattleAnimArgs[5]; gSprites[spriteId].data[3] = (u8)gBattleAnimArgs[4] * 256; gSprites[spriteId].data[4] = gBattleAnimArgs[6]; - sprite->callback = sub_8107380; + sprite->callback = AnimWaterBubbleProjectile_Step1; sprite->callback(sprite); } -void sub_8107380(struct Sprite *sprite) +static void AnimWaterBubbleProjectile_Step1(struct Sprite *sprite) { u8 otherSpriteId = sprite->data[5]; u8 timer = gSprites[otherSpriteId].data[4]; @@ -571,26 +566,26 @@ void sub_8107380(struct Sprite *sprite) } else { - sprite->callback = sub_8107408; + sprite->callback = AnimWaterBubbleProjectile_Step2; DestroySprite(&gSprites[otherSpriteId]); } } -void sub_8107408(struct Sprite *sprite) +static void AnimWaterBubbleProjectile_Step2(struct Sprite *sprite) { sprite->animPaused = FALSE; sprite->callback = RunStoredCallbackWhenAnimEnds; - StoreSpriteCallbackInData6(sprite, sub_8107430); + StoreSpriteCallbackInData6(sprite, AnimWaterBubbleProjectile_Step3); } -void sub_8107430(struct Sprite *sprite) +static void AnimWaterBubbleProjectile_Step3(struct Sprite *sprite) { sprite->data[0] = 10; sprite->callback = WaitAnimForDuration; StoreSpriteCallbackInData6(sprite, DestroySpriteAndMatrix); } -void sub_810744C(struct Sprite *sprite) +static void AnimAuroraBeamRings(struct Sprite *sprite) { s16 unkArg; @@ -605,14 +600,14 @@ void sub_810744C(struct Sprite *sprite) sprite->data[3] = sprite->pos1.y; sprite->data[4] = GetBattlerSpriteCoord(gBattleAnimTarget, 3) + gBattleAnimArgs[3]; InitAnimLinearTranslation(sprite); - sprite->callback = sub_81074E4; + sprite->callback = AnimAuroraBeamRings_Step; sprite->affineAnimPaused = TRUE; sprite->callback(sprite); } -void sub_81074E4(struct Sprite *sprite) +static void AnimAuroraBeamRings_Step(struct Sprite *sprite) { - if ((u16)gBattleAnimArgs[ARG_RET_ID] == 0xFFFF) + if ((u16)gBattleAnimArgs[7] == 0xFFFF) { StartSpriteAnim(sprite, 1); sprite->affineAnimPaused = FALSE; @@ -621,15 +616,16 @@ void sub_81074E4(struct Sprite *sprite) DestroyAnimSprite(sprite); } -void sub_8107528(u8 taskId) +// Updates the palette on the rainbow rings used in Aurora Beam to make them appear to be rotating counterclockwise +void AnimTask_RotateAuroraRingColors(u8 taskId) { gTasks[taskId].data[0] = gBattleAnimArgs[0]; gTasks[taskId].data[2] = IndexOfSpritePaletteTag(ANIM_TAG_RAINBOW_RINGS) * 16 + 256; - gTasks[taskId].func = sub_810756C; + gTasks[taskId].func = AnimTask_RotateAuroraRingColors_Step; } #ifdef NONMATCHING -void sub_810756C(u8 taskId) +static void AnimTask_RotateAuroraRingColors_Step(u8 taskId) { int i; u16 palIndex; @@ -653,7 +649,7 @@ void sub_810756C(u8 taskId) } #else NAKED -void sub_810756C(u8 taskId) +static void AnimTask_RotateAuroraRingColors_Step(u8 taskId) { asm_unified("push {r4-r7,lr}\n\ lsls r0, 24\n\ @@ -721,7 +717,8 @@ _081075DE:\n\ } #endif -void sub_81075EC(struct Sprite *sprite) +// For animating undulating beam attacks (e.g. Flamethrower, Hydro Pump, Signal Beam) +static void AnimToTargetInSinWave(struct Sprite *sprite) { u16 retArg; @@ -734,8 +731,8 @@ void sub_81075EC(struct Sprite *sprite) InitAnimLinearTranslation(sprite); sprite->data[5] = 0xD200 / sprite->data[0]; sprite->data[7] = gBattleAnimArgs[3]; - retArg = gBattleAnimArgs[ARG_RET_ID]; - if (gBattleAnimArgs[ARG_RET_ID] > 127) + retArg = gBattleAnimArgs[7]; + if (gBattleAnimArgs[7] > 127) { sprite->data[6] = (retArg - 127) * 256; sprite->data[7] = -sprite->data[7]; @@ -744,11 +741,11 @@ void sub_81075EC(struct Sprite *sprite) { sprite->data[6] = retArg * 256; } - sprite->callback = sub_8107674; + sprite->callback = AnimToTargetInSinWave_Step; sprite->callback(sprite); } -void sub_8107674(struct Sprite *sprite) +static void AnimToTargetInSinWave_Step(struct Sprite *sprite) { if (AnimTranslateLinear(sprite)) DestroyAnimSprite(sprite); @@ -764,21 +761,22 @@ void sub_8107674(struct Sprite *sprite) } } -void sub_81076C8(u8 taskId) +void AnimTask_StartSinAnimTimer(u8 taskId) { gTasks[taskId].data[0] = gBattleAnimArgs[0]; - gBattleAnimArgs[ARG_RET_ID] = 0; - gTasks[taskId].func = sub_81076F4; + gBattleAnimArgs[7] = 0; + gTasks[taskId].func = AnimTask_RunSinAnimTimer; } -void sub_81076F4(u8 taskId) +static void AnimTask_RunSinAnimTimer(u8 taskId) { - gBattleAnimArgs[ARG_RET_ID] = (gBattleAnimArgs[ARG_RET_ID] + 3) & 0xFF; + gBattleAnimArgs[7] = (gBattleAnimArgs[7] + 3) & 0xFF; if (--gTasks[taskId].data[0] == 0) DestroyAnimVisualTask(taskId); } -void sub_8107730(struct Sprite *sprite) +// Flashing blue orbs grow in size near the attacker. First stage of Hydro Cannon +static void AnimHydroCannonCharge(struct Sprite *sprite) { u8 priority; @@ -804,16 +802,17 @@ void sub_8107730(struct Sprite *sprite) sprite->pos2.x = -10; sprite->subpriority = priority + 2; } - sprite->callback = sub_81077A4; + sprite->callback = AnimHydroCannonCharge_Step; } -void sub_81077A4(struct Sprite *sprite) +static void AnimHydroCannonCharge_Step(struct Sprite *sprite) { if (sprite->affineAnimEnded) DestroyAnimSprite(sprite); } -void sub_81077C0(struct Sprite *sprite) +// Flashing blue orbs move from the attacker to the target. Second stage of Hydro Cannon +static void AnimHydroCannonBeam(struct Sprite *sprite) { bool8 animType; u8 coordType; @@ -841,7 +840,8 @@ void sub_81077C0(struct Sprite *sprite) StoreSpriteCallbackInData6(sprite, DestroyAnimSprite); } -void sub_8107894(struct Sprite *sprite) +// Water droplet appears and drips down. Used by Water Gun on impact +static void AnimWaterGunDroplet(struct Sprite *sprite) { InitSpritePosToAnimTarget(sprite, TRUE); sprite->data[0] = gBattleAnimArgs[4]; @@ -851,17 +851,17 @@ void sub_8107894(struct Sprite *sprite) StoreSpriteCallbackInData6(sprite, DestroyAnimSprite); } -void sub_81078D0(struct Sprite *sprite) +static void AnimSmallBubblePair(struct Sprite *sprite) { - if (gBattleAnimArgs[3]) + if (gBattleAnimArgs[3] != ANIM_ATTACKER) InitSpritePosToAnimTarget(sprite, TRUE); else InitSpritePosToAnimAttacker(sprite, TRUE); sprite->data[7] = gBattleAnimArgs[2]; - sprite->callback = sub_810790C; + sprite->callback = AnimSmallBubblePair_Step; } -void sub_810790C(struct Sprite *sprite) +static void AnimSmallBubblePair_Step(struct Sprite *sprite) { sprite->data[0] = (sprite->data[0] + 11) & 0xFF; sprite->pos2.x = Sin(sprite->data[0], 4); @@ -886,20 +886,20 @@ void AnimTask_CreateSurfWave(u8 taskId) { SetAnimBgAttribute(1, BG_ANIM_CHAR_BASE_BLOCK, 1); if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_OPPONENT) - AnimLoadCompressedBgTilemap(animBg.bgId, gUnknown_08D95E00); + AnimLoadCompressedBgTilemap(animBg.bgId, gBattleAnimBgTilemap_SurfOpponent); else - AnimLoadCompressedBgTilemap(animBg.bgId, gUnknown_08D960D0); + AnimLoadCompressedBgTilemap(animBg.bgId, gBattleAnimBgTilemap_SurfPlayer); } else { - sub_80A6D60(&animBg, gUnknown_08D963A4, 1); + AnimLoadCompressedBgTilemapHandleContest(&animBg, gBattleAnimBgTilemap_SurfContest, 1); } AnimLoadCompressedBgGfx(animBg.bgId, gBattleAnimBgImage_Surf, animBg.tilesOffset); if (gBattleAnimArgs[0] == 0) LoadCompressedPalette(gBattleAnimBgPalette_Surf, animBg.paletteId * 16, 32); else LoadCompressedPalette(gBattleAnimBackgroundImageMuddyWater_Pal, animBg.paletteId * 16, 32); - taskId2 = CreateTask(sub_8107D58, gTasks[taskId].priority + 1); + taskId2 = CreateTask(AnimTask_SurfWaveScanlineEffect, gTasks[taskId].priority + 1); gTasks[taskId].data[15] = taskId2; gTasks[taskId2].data[0] = 0; gTasks[taskId2].data[1] = 0x1000; @@ -941,7 +941,7 @@ void AnimTask_CreateSurfWave(u8 taskId) gTasks[taskId2].data[5] = 0; } gTasks[taskId].data[6] = 1; - gTasks[taskId].func = sub_8107B84; + gTasks[taskId].func = AnimTask_CreateSurfWave_Step1; } #else NAKED @@ -990,22 +990,22 @@ void AnimTask_CreateSurfWave(u8 taskId) bne _081079D0\n\ mov r0, sp\n\ ldrb r0, [r0, 0x9]\n\ - ldr r1, =gUnknown_08D95E00\n\ + ldr r1, =gBattleAnimBgTilemap_SurfOpponent\n\ bl AnimLoadCompressedBgTilemap\n\ b _081079EA\n\ .pool\n\ _081079D0:\n\ mov r0, sp\n\ ldrb r0, [r0, 0x9]\n\ - ldr r1, =gUnknown_08D960D0\n\ + ldr r1, =gBattleAnimBgTilemap_SurfPlayer\n\ bl AnimLoadCompressedBgTilemap\n\ b _081079EA\n\ .pool\n\ _081079E0:\n\ - ldr r1, =gUnknown_08D963A4\n\ + ldr r1, =gBattleAnimBgTilemap_SurfContest\n\ mov r0, sp\n\ movs r2, 0x1\n\ - bl sub_80A6D60\n\ + bl AnimLoadCompressedBgTilemapHandleContest\n\ _081079EA:\n\ mov r0, sp\n\ ldrb r0, [r0, 0x9]\n\ @@ -1034,7 +1034,7 @@ _08107A24:\n\ movs r2, 0x20\n\ bl LoadCompressedPalette\n\ _08107A32:\n\ - ldr r0, =sub_8107D58\n\ + ldr r0, =AnimTask_SurfWaveScanlineEffect\n\ ldr r4, =gTasks\n\ mov r2, r10\n\ lsls r5, r2, 2\n\ @@ -1157,7 +1157,7 @@ _08107B58:\n\ adds r0, r1\n\ movs r1, 0x1\n\ strh r1, [r0, 0x14]\n\ - ldr r1, =sub_8107B84\n\ + ldr r1, =AnimTask_CreateSurfWave_Step1\n\ str r1, [r0]\n\ add sp, 0x10\n\ pop {r3-r5}\n\ @@ -1172,7 +1172,7 @@ _08107B58:\n\ #endif #ifdef NONMATCHING -void sub_8107B84(u8 taskId) +static void AnimTask_CreateSurfWave_Step1(u8 taskId) { struct BattleAnimBgData animBg; u8 i; @@ -1217,12 +1217,12 @@ void sub_8107B84(u8 taskId) if (!(gTasks[gTasks[taskId].data[15]].data[1] & 0x1F)) { gTasks[taskId].data[0] = gTasks[gTasks[taskId].data[15]].data[1] & 0x1F; - gTasks[taskId].func = sub_8107CC4; + gTasks[taskId].func = AnimTask_CreateSurfWave_Step2; } } #else NAKED -void sub_8107B84(u8 taskId) +static void AnimTask_CreateSurfWave_Step1(u8 taskId) { asm_unified("push {r4-r7,lr}\n\ sub sp, 0x10\n\ @@ -1371,7 +1371,7 @@ _08107C86:\n\ cmp r3, 0\n\ bne _08107CA8\n\ strh r3, [r2, 0x8]\n\ - ldr r0, =sub_8107CC4\n\ + ldr r0, =AnimTask_CreateSurfWave_Step2\n\ str r0, [r2]\n\ _08107CA8:\n\ add sp, 0x10\n\ @@ -1382,7 +1382,7 @@ _08107CA8:\n\ } #endif -void sub_8107CC4(u8 taskId) +static void AnimTask_CreateSurfWave_Step2(u8 taskId) { u16 *BGptrX = &gBattle_BG1_X; u16 *BGptrY = &gBattle_BG1_Y; @@ -1405,7 +1405,7 @@ void sub_8107CC4(u8 taskId) } } -void sub_8107D58(u8 taskId) +static void AnimTask_SurfWaveScanlineEffect(u8 taskId) { s16 i; struct ScanlineEffectParams params; @@ -1471,7 +1471,7 @@ void sub_8107D58(u8 taskId) } } -void sub_8108034(struct Sprite *sprite) +static void AnimSmallDriftingBubbles(struct Sprite *sprite) { s16 randData; s16 randData2; @@ -1484,10 +1484,10 @@ void sub_8108034(struct Sprite *sprite) randData2 = 256 - randData2; sprite->data[1] = randData; sprite->data[2] = randData2; - sprite->callback = sub_8108098; + sprite->callback = AnimSmallDriftingBubbles_Step; } -void sub_8108098(struct Sprite *sprite) +static void AnimSmallDriftingBubbles_Step(struct Sprite *sprite) { sprite->data[3] += sprite->data[1]; sprite->data[4] += sprite->data[2]; @@ -1500,18 +1500,18 @@ void sub_8108098(struct Sprite *sprite) DestroyAnimSprite(sprite); } -void sub_81080E4(u8 taskId) +void AnimTask_WaterSpoutLaunch(u8 taskId) { struct Task *task = &gTasks[taskId]; task->data[15] = GetAnimBattlerSpriteId(ANIM_ATTACKER); task->data[5] = gSprites[task->data[15]].pos1.y; - task->data[1] = sub_8108384(); + task->data[1] = GetWaterSpoutPowerForAnim(); PrepareBattlerSpriteForRotScale(task->data[15], ST_OAM_OBJ_NORMAL); - task->func = sub_8108140; + task->func = AnimTask_WaterSpoutLaunch_Step; } -void sub_8108140(u8 taskId) +static void AnimTask_WaterSpoutLaunch_Step(u8 taskId) { struct Task *task = &gTasks[taskId]; @@ -1560,7 +1560,7 @@ void sub_8108140(u8 taskId) } break; case 4: - sub_8108408(task, taskId); + CreateWaterSpoutLaunchDroplets(task, taskId); task->data[0]++; case 5: if (++task->data[3] > 1) @@ -1596,7 +1596,9 @@ void sub_8108140(u8 taskId) } } -u8 sub_8108384(void) +// Returns a value 0-3 relative to which quarter HP the attacker is in +// A higher number results in more water sprites during the Water Spout animation +static u8 GetWaterSpoutPowerForAnim(void) { u8 i; u16 hp; @@ -1628,7 +1630,7 @@ u8 sub_8108384(void) return 3; } -void sub_8108408(struct Task *task, u8 taskId) +static void CreateWaterSpoutLaunchDroplets(struct Task *task, u8 taskId) { s16 i; s16 attackerCoordX = GetBattlerSpriteCoord(gBattleAnimAttacker, 2); @@ -1642,7 +1644,7 @@ void sub_8108408(struct Task *task, u8 taskId) increment = 1; for (i = 0; i < 20; i += increment) { - spriteId = CreateSprite(&gUnknown_08595268, attackerCoordX, attackerCoordY, subpriority); + spriteId = CreateSprite(&gSmallWaterOrbSpriteTemplate, attackerCoordX, attackerCoordY, subpriority); if (spriteId != MAX_SPRITES) { gSprites[spriteId].data[1] = i; @@ -1653,7 +1655,7 @@ void sub_8108408(struct Task *task, u8 taskId) gSprites[spriteId].data[6] = taskId; gSprites[spriteId].data[7] = 2; if (task->data[2] & 1) - sub_810851C(&gSprites[spriteId]); + AnimSmallWaterOrb(&gSprites[spriteId]); task->data[2]++; } trigIndex = (trigIndex + increment * 2); @@ -1661,7 +1663,7 @@ void sub_8108408(struct Task *task, u8 taskId) } } -void sub_810851C(struct Sprite *sprite) +static void AnimSmallWaterOrb(struct Sprite *sprite) { switch (sprite->data[0]) { @@ -1683,11 +1685,11 @@ void sub_810851C(struct Sprite *sprite) } } -void sub_81085C8(u8 taskId) +void AnimTask_WaterSpoutRain(u8 taskId) { struct Task *task = &gTasks[taskId]; - task->data[1] = sub_8108384(); + task->data[1] = GetWaterSpoutPowerForAnim(); if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_PLAYER) { task->data[4] = 136; @@ -1701,10 +1703,10 @@ void sub_81085C8(u8 taskId) task->data[5] = 98; task->data[7] = task->data[4] + 49; task->data[12] = task->data[1] * 5 + 5; - task->func = sub_810862C; + task->func = AnimTask_WaterSpoutRain_Step; } -void sub_810862C(u8 taskId) +static void AnimTask_WaterSpoutRain_Step(u8 taskId) { struct Task *task = &gTasks[taskId]; u8 taskId2; @@ -1715,21 +1717,21 @@ void sub_810862C(u8 taskId) if (++task->data[2] > 2) { task->data[2] = 0; - sub_810871C(task, taskId); + CreateWaterSpoutRainDroplet(task, taskId); } if (task->data[10] != 0 && task->data[13] == 0) { - gBattleAnimArgs[0] = 1; + gBattleAnimArgs[0] = ANIM_TARGET; gBattleAnimArgs[1] = 0; gBattleAnimArgs[2] = 12; - taskId2 = CreateTask(sub_81152DC, 80); + taskId2 = CreateTask(AnimTask_HorizontalShake, 80); if (taskId2 != 0xFF) { gTasks[taskId2].func(taskId2); gAnimVisualTaskCount++; } - gBattleAnimArgs[0] = 3; - taskId2 = CreateTask(sub_81152DC, 80); + gBattleAnimArgs[0] = ANIM_DEF_PARTNER; + taskId2 = CreateTask(AnimTask_HorizontalShake, 80); if (taskId2 != 0xFF) { gTasks[taskId2].func(taskId2); @@ -1747,14 +1749,14 @@ void sub_810862C(u8 taskId) } } -void sub_810871C(struct Task *task, u8 taskId) +static void CreateWaterSpoutRainDroplet(struct Task *task, u8 taskId) { u16 yPosArg = ((gSineTable[task->data[8]] + 3) >> 4) + task->data[6]; - u8 spriteId = CreateSprite(&gUnknown_08595268, task->data[7], 0, 0); + u8 spriteId = CreateSprite(&gSmallWaterOrbSpriteTemplate, task->data[7], 0, 0); if (spriteId != MAX_SPRITES) { - gSprites[spriteId].callback = sub_81087C0; + gSprites[spriteId].callback = AnimWaterSpoutRain; gSprites[spriteId].data[5] = yPosArg; gSprites[spriteId].data[6] = taskId; gSprites[spriteId].data[7] = 9; @@ -1762,10 +1764,10 @@ void sub_810871C(struct Task *task, u8 taskId) } task->data[11]++; task->data[8] = (task->data[8] + 39) & 0xFF; - task->data[7] = ((task->data[7] * 0x41c64e6d + 0x3039) % task->data[5]) + task->data[4]; + task->data[7] = (ISO_RANDOMIZE2(task->data[7]) % task->data[5]) + task->data[4]; } -void sub_81087C0(struct Sprite *sprite) +static void AnimWaterSpoutRain(struct Sprite *sprite) { if (sprite->data[0] == 0) { @@ -1773,20 +1775,20 @@ void sub_81087C0(struct Sprite *sprite) if (sprite->pos1.y >= sprite->data[5]) { gTasks[sprite->data[6]].data[10] = 1; - sprite->data[1] = CreateSprite(&gUnknown_08597388, sprite->pos1.x, sprite->pos1.y, 1); + sprite->data[1] = CreateSprite(&gWaterHitSplatSpriteTemplate, sprite->pos1.x, sprite->pos1.y, 1); if (sprite->data[1] != MAX_SPRITES) { StartSpriteAffineAnim(&gSprites[sprite->data[1]], 3); gSprites[sprite->data[1]].data[6] = sprite->data[6]; gSprites[sprite->data[1]].data[7] = sprite->data[7]; - gSprites[sprite->data[1]].callback = sub_810886C; + gSprites[sprite->data[1]].callback = AnimWaterSpoutRainHit; } DestroySprite(sprite); } } } -void sub_810886C(struct Sprite *sprite) +static void AnimWaterSpoutRainHit(struct Sprite *sprite) { if (++sprite->data[1] > 1) { @@ -1801,7 +1803,7 @@ void sub_810886C(struct Sprite *sprite) } } -void sub_81088E4(u8 taskId) +void AnimTask_WaterSport(u8 taskId) { struct Task *task = &gTasks[taskId]; @@ -1815,22 +1817,22 @@ void sub_81088E4(u8 taskId) task->data[9] = -32; task->data[1] = 0; task->data[0] = 0; - task->func = sub_8108978; + task->func = AnimTask_WaterSport_Step; } -void sub_8108978(u8 taskId) +static void AnimTask_WaterSport_Step(u8 taskId) { struct Task *task = &gTasks[taskId]; switch (task->data[0]) { case 0: - sub_8108AC0(task); + CreateWaterSportDroplet(task); if (task->data[10] != 0) task->data[0]++; break; case 1: - sub_8108AC0(task); + CreateWaterSportDroplet(task); if (++task->data[1] > 16) { task->data[1] = 0; @@ -1838,7 +1840,7 @@ void sub_8108978(u8 taskId) } break; case 2: - sub_8108AC0(task); + CreateWaterSportDroplet(task); task->data[5] += task->data[7] * 6; if (!(task->data[5] >= -16 && task->data[5] <= 256)) { @@ -1856,13 +1858,13 @@ void sub_8108978(u8 taskId) } break; case 3: - sub_8108AC0(task); + CreateWaterSportDroplet(task); task->data[6] -= task->data[7] * 2; if (++task->data[1] > 7) task->data[0]++; break; case 4: - sub_8108AC0(task); + CreateWaterSportDroplet(task); task->data[5] -= task->data[7] * 6; if (!(task->data[5] >= -16 && task->data[5] <= 256)) { @@ -1872,7 +1874,7 @@ void sub_8108978(u8 taskId) } break; case 5: - sub_8108AC0(task); + CreateWaterSportDroplet(task); task->data[6] -= task->data[7] * 2; if (++task->data[1] > 7) task->data[0] = 2; @@ -1887,14 +1889,14 @@ void sub_8108978(u8 taskId) } } -void sub_8108AC0(struct Task *task) +static void CreateWaterSportDroplet(struct Task *task) { u8 spriteId; if (++task->data[2] > 1) { task->data[2] = 0; - spriteId = CreateSprite(&gUnknown_08595268, task->data[3], task->data[4], 10); + spriteId = CreateSprite(&gSmallWaterOrbSpriteTemplate, task->data[3], task->data[4], 10); if (spriteId != MAX_SPRITES) { gSprites[spriteId].data[0] = 16; @@ -1902,13 +1904,13 @@ void sub_8108AC0(struct Task *task) gSprites[spriteId].data[4] = task->data[6]; gSprites[spriteId].data[5] = task->data[9]; InitAnimArcTranslation(&gSprites[spriteId]); - gSprites[spriteId].callback = sub_8108B2C; + gSprites[spriteId].callback = AnimWaterSportDroplet; task->data[8]++; } } } -void sub_8108B2C(struct Sprite *sprite) +static void AnimWaterSportDroplet(struct Sprite *sprite) { if (TranslateAnimHorizontalArc(sprite)) { @@ -1919,11 +1921,11 @@ void sub_8108B2C(struct Sprite *sprite) sprite->data[4] = (Random2() & 0x1F) - 16 + sprite->pos1.y; sprite->data[5] = ~(Random2() & 7); InitAnimArcTranslation(sprite); - sprite->callback = sub_8108B94; + sprite->callback = AnimWaterSportDroplet_Step; } } -void sub_8108B94(struct Sprite *sprite) +static void AnimWaterSportDroplet_Step(struct Sprite *sprite) { u16 i; @@ -1931,7 +1933,7 @@ void sub_8108B94(struct Sprite *sprite) { for (i = 0; i < NUM_TASKS; i++) { - if (gTasks[i].func == sub_8108978) + if (gTasks[i].func == AnimTask_WaterSport_Step) { gTasks[i].data[10] = 1; gTasks[i].data[8]--; @@ -1941,7 +1943,7 @@ void sub_8108B94(struct Sprite *sprite) } } -void sub_8108BE0(struct Sprite *sprite) +static void AnimWaterPulseBubble(struct Sprite *sprite) { sprite->pos1.x = gBattleAnimArgs[0]; sprite->pos1.y = gBattleAnimArgs[1]; @@ -1949,10 +1951,10 @@ void sub_8108BE0(struct Sprite *sprite) sprite->data[1] = gBattleAnimArgs[3]; sprite->data[2] = gBattleAnimArgs[4]; sprite->data[3] = gBattleAnimArgs[5]; - sprite->callback = sub_8108C08; + sprite->callback = AnimWaterPulseBubble_Step; } -void sub_8108C08(struct Sprite *sprite) +static void AnimWaterPulseBubble_Step(struct Sprite *sprite) { sprite->data[4] -= sprite->data[0]; sprite->pos2.y = sprite->data[4] / 10; @@ -1962,7 +1964,7 @@ void sub_8108C08(struct Sprite *sprite) DestroyAnimSprite(sprite); } -void sub_8108C54(struct Sprite *sprite) +static void AnimWaterPulseRingBubble(struct Sprite *sprite) { sprite->data[3] += sprite->data[1]; sprite->data[4] += sprite->data[2]; @@ -1985,7 +1987,7 @@ void AnimWaterPulseRing(struct Sprite *sprite) sprite->callback = AnimWaterPulseRing_Step; } -void AnimWaterPulseRing_Step(struct Sprite *sprite) +static void AnimWaterPulseRing_Step(struct Sprite *sprite) { int xDiff = sprite->data[1] - sprite->pos1.x; int yDiff = sprite->data[2] - sprite->pos1.y; @@ -1995,7 +1997,7 @@ void AnimWaterPulseRing_Step(struct Sprite *sprite) if (++sprite->data[5] == sprite->data[4]) { sprite->data[5] = 0; - sub_8108D54(sprite, xDiff, yDiff); + CreateWaterPulseRingBubbles(sprite, xDiff, yDiff); } if (sprite->data[3] == sprite->data[0]) DestroyAnimSprite(sprite); @@ -2003,7 +2005,7 @@ void AnimWaterPulseRing_Step(struct Sprite *sprite) } #ifdef NONMATCHING -void sub_8108D54(struct Sprite *sprite, int xDiff, int yDiff) +static void CreateWaterPulseRingBubbles(struct Sprite *sprite, int xDiff, int yDiff) { s16 something = sprite->data[0] / 2; s16 combinedX = sprite->pos1.x + sprite->pos2.x; @@ -2015,7 +2017,7 @@ void sub_8108D54(struct Sprite *sprite, int xDiff, int yDiff) for (i = 0; i <= 0; i++) { - spriteId = CreateSprite(&gUnknown_08595310, combinedX, combinedY + something, 130); + spriteId = CreateSprite(&gWaterPulseRingBubbleSpriteTemplate, combinedX, combinedY + something, 130); gSprites[spriteId].data[0] = 20; gSprites[spriteId].data[1] = randomSomethingY; gSprites[spriteId].subpriority = GetBattlerSpriteSubpriority(gBattleAnimAttacker) - 1; @@ -2026,7 +2028,7 @@ void sub_8108D54(struct Sprite *sprite, int xDiff, int yDiff) } for (i = 0; i <= 0; i++) { - spriteId = CreateSprite(&gUnknown_08595310, combinedX, combinedY - something, 130); + spriteId = CreateSprite(&gWaterPulseRingBubbleSpriteTemplate, combinedX, combinedY - something, 130); gSprites[spriteId].data[0] = 20; gSprites[spriteId].data[1] = randomSomethingY; gSprites[spriteId].subpriority = GetBattlerSpriteSubpriority(gBattleAnimAttacker) - 1; @@ -2038,7 +2040,7 @@ void sub_8108D54(struct Sprite *sprite, int xDiff, int yDiff) } #else NAKED -void sub_8108D54(struct Sprite *sprite, int xDiff, int yDiff) +static void CreateWaterPulseRingBubbles(struct Sprite *sprite, int xDiff, int yDiff) { asm_unified("push {r4-r7,lr}\n\ mov r7, r10\n\ @@ -2108,7 +2110,7 @@ void sub_8108D54(struct Sprite *sprite, int xDiff, int yDiff) lsls r1, 16\n\ mov r10, r1\n\ _08108DE2:\n\ - ldr r0, =gUnknown_08595310\n\ + ldr r0, =gWaterPulseRingBubbleSpriteTemplate\n\ mov r2, r8\n\ asrs r1, r2, 16\n\ mov r3, r10\n\ @@ -2163,7 +2165,7 @@ _08108E32:\n\ lsls r1, 16\n\ mov r10, r1\n\ _08108E58:\n\ - ldr r0, =gUnknown_08595310\n\ + ldr r0, =gWaterPulseRingBubbleSpriteTemplate\n\ mov r2, r8\n\ asrs r1, r2, 16\n\ mov r3, r10\n\ diff --git a/src/battle_gfx_sfx_util.c b/src/battle_gfx_sfx_util.c index 341cd4a6a..50001cebe 100644 --- a/src/battle_gfx_sfx_util.c +++ b/src/battle_gfx_sfx_util.c @@ -1226,8 +1226,8 @@ void FreeMonSpritesGfx(void) if (gMonSpritesGfxPtr == NULL) return; - if (gMonSpritesGfxPtr->field_17C != NULL) - FREE_AND_SET_NULL(gMonSpritesGfxPtr->field_17C); + if (gMonSpritesGfxPtr->buffer != NULL) + FREE_AND_SET_NULL(gMonSpritesGfxPtr->buffer); if (gMonSpritesGfxPtr->field_178 != NULL) FREE_AND_SET_NULL(gMonSpritesGfxPtr->field_178); diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 685626a85..17f76f1a1 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -2064,7 +2064,7 @@ static void Cmd_resultmessage(void) gPotentialItemEffectBattler = gBattlerTarget; gMoveResultFlags &= ~(MOVE_RESULT_FOE_ENDURED | MOVE_RESULT_FOE_HUNG_ON); BattleScriptPushCursor(); - gBattlescriptCurrInstr = BattleScript_HangedOnMsg; + gBattlescriptCurrInstr = BattleScript_FocusBandActivates; return; default: if (gMoveResultFlags & MOVE_RESULT_DOESNT_AFFECT_FOE) @@ -2093,7 +2093,7 @@ static void Cmd_resultmessage(void) gPotentialItemEffectBattler = gBattlerTarget; gMoveResultFlags &= ~(MOVE_RESULT_FOE_ENDURED | MOVE_RESULT_FOE_HUNG_ON); BattleScriptPushCursor(); - gBattlescriptCurrInstr = BattleScript_HangedOnMsg; + gBattlescriptCurrInstr = BattleScript_FocusBandActivates; return; } else if (gMoveResultFlags & MOVE_RESULT_FAILED) diff --git a/src/data/graphics/pokemon.h b/src/data/graphics/pokemon.h index b25b209eb..7b523bc23 100644 --- a/src/data/graphics/pokemon.h +++ b/src/data/graphics/pokemon.h @@ -1,4 +1,4 @@ -const u32 gMonFrontPic_CircledQuestionMark[] = INCBIN_U32("graphics/pokemon/circled_question_mark/anim_front.4bpp.lz"); +const u32 gMonFrontPic_CircledQuestionMark[] = INCBIN_U32("graphics/pokemon/question_mark/circled/anim_front.4bpp.lz"); const u32 gMonFrontPic_Bulbasaur[] = INCBIN_U32("graphics/pokemon/bulbasaur/anim_front.4bpp.lz"); const u32 gMonFrontPic_Ivysaur[] = INCBIN_U32("graphics/pokemon/ivysaur/anim_front.4bpp.lz"); const u32 gMonFrontPic_Venusaur[] = INCBIN_U32("graphics/pokemon/venusaur/anim_front.4bpp.lz"); @@ -199,7 +199,7 @@ const u32 gMonFrontPic_Umbreon[] = INCBIN_U32("graphics/pokemon/umbreon/anim_fro const u32 gMonFrontPic_Murkrow[] = INCBIN_U32("graphics/pokemon/murkrow/anim_front.4bpp.lz"); const u32 gMonFrontPic_Slowking[] = INCBIN_U32("graphics/pokemon/slowking/anim_front.4bpp.lz"); const u32 gMonFrontPic_Misdreavus[] = INCBIN_U32("graphics/pokemon/misdreavus/anim_front.4bpp.lz"); -const u32 gMonFrontPic_UnownA[] = INCBIN_U32("graphics/pokemon/unown/anim_front_a.4bpp.lz"); +const u32 gMonFrontPic_UnownA[] = INCBIN_U32("graphics/pokemon/unown/a/anim_front.4bpp.lz"); const u32 gMonFrontPic_Wobbuffet[] = INCBIN_U32("graphics/pokemon/wobbuffet/anim_front.4bpp.lz"); const u32 gMonFrontPic_Girafarig[] = INCBIN_U32("graphics/pokemon/girafarig/anim_front.4bpp.lz"); const u32 gMonFrontPic_Pineco[] = INCBIN_U32("graphics/pokemon/pineco/anim_front.4bpp.lz"); @@ -250,7 +250,7 @@ const u32 gMonFrontPic_Tyranitar[] = INCBIN_U32("graphics/pokemon/tyranitar/anim const u32 gMonFrontPic_Lugia[] = INCBIN_U32("graphics/pokemon/lugia/anim_front.4bpp.lz"); const u32 gMonFrontPic_HoOh[] = INCBIN_U32("graphics/pokemon/ho_oh/anim_front.4bpp.lz"); const u32 gMonFrontPic_Celebi[] = INCBIN_U32("graphics/pokemon/celebi/anim_front.4bpp.lz"); -const u32 gMonFrontPic_DoubleQuestionMark[] = INCBIN_U32("graphics/pokemon/double_question_mark/anim_front.4bpp.lz"); +const u32 gMonFrontPic_DoubleQuestionMark[] = INCBIN_U32("graphics/pokemon/question_mark/double/anim_front.4bpp.lz"); const u32 gMonFrontPic_Treecko[] = INCBIN_U32("graphics/pokemon/treecko/anim_front.4bpp.lz"); const u32 gMonFrontPic_Grovyle[] = INCBIN_U32("graphics/pokemon/grovyle/anim_front.4bpp.lz"); const u32 gMonFrontPic_Sceptile[] = INCBIN_U32("graphics/pokemon/sceptile/anim_front.4bpp.lz"); @@ -387,33 +387,33 @@ const u32 gMonFrontPic_Jirachi[] = INCBIN_U32("graphics/pokemon/jirachi/anim_fro const u32 gMonFrontPic_Deoxys[] = INCBIN_U32("graphics/pokemon/deoxys/anim_front.4bpp.lz"); const u32 gMonFrontPic_Chimecho[] = INCBIN_U32("graphics/pokemon/chimecho/anim_front.4bpp.lz"); const u32 gMonFrontPic_Egg[] = INCBIN_U32("graphics/pokemon/egg/anim_front.4bpp.lz"); -const u32 gMonFrontPic_UnownB[] = INCBIN_U32("graphics/pokemon/unown/anim_front_b.4bpp.lz"); -const u32 gMonFrontPic_UnownC[] = INCBIN_U32("graphics/pokemon/unown/anim_front_c.4bpp.lz"); -const u32 gMonFrontPic_UnownD[] = INCBIN_U32("graphics/pokemon/unown/anim_front_d.4bpp.lz"); -const u32 gMonFrontPic_UnownE[] = INCBIN_U32("graphics/pokemon/unown/anim_front_e.4bpp.lz"); -const u32 gMonFrontPic_UnownF[] = INCBIN_U32("graphics/pokemon/unown/anim_front_f.4bpp.lz"); -const u32 gMonFrontPic_UnownG[] = INCBIN_U32("graphics/pokemon/unown/anim_front_g.4bpp.lz"); -const u32 gMonFrontPic_UnownH[] = INCBIN_U32("graphics/pokemon/unown/anim_front_h.4bpp.lz"); -const u32 gMonFrontPic_UnownI[] = INCBIN_U32("graphics/pokemon/unown/anim_front_i.4bpp.lz"); -const u32 gMonFrontPic_UnownJ[] = INCBIN_U32("graphics/pokemon/unown/anim_front_j.4bpp.lz"); -const u32 gMonFrontPic_UnownK[] = INCBIN_U32("graphics/pokemon/unown/anim_front_k.4bpp.lz"); -const u32 gMonFrontPic_UnownL[] = INCBIN_U32("graphics/pokemon/unown/anim_front_l.4bpp.lz"); -const u32 gMonFrontPic_UnownM[] = INCBIN_U32("graphics/pokemon/unown/anim_front_m.4bpp.lz"); -const u32 gMonFrontPic_UnownN[] = INCBIN_U32("graphics/pokemon/unown/anim_front_n.4bpp.lz"); -const u32 gMonFrontPic_UnownO[] = INCBIN_U32("graphics/pokemon/unown/anim_front_o.4bpp.lz"); -const u32 gMonFrontPic_UnownP[] = INCBIN_U32("graphics/pokemon/unown/anim_front_p.4bpp.lz"); -const u32 gMonFrontPic_UnownQ[] = INCBIN_U32("graphics/pokemon/unown/anim_front_q.4bpp.lz"); -const u32 gMonFrontPic_UnownR[] = INCBIN_U32("graphics/pokemon/unown/anim_front_r.4bpp.lz"); -const u32 gMonFrontPic_UnownS[] = INCBIN_U32("graphics/pokemon/unown/anim_front_s.4bpp.lz"); -const u32 gMonFrontPic_UnownT[] = INCBIN_U32("graphics/pokemon/unown/anim_front_t.4bpp.lz"); -const u32 gMonFrontPic_UnownU[] = INCBIN_U32("graphics/pokemon/unown/anim_front_u.4bpp.lz"); -const u32 gMonFrontPic_UnownV[] = INCBIN_U32("graphics/pokemon/unown/anim_front_v.4bpp.lz"); -const u32 gMonFrontPic_UnownW[] = INCBIN_U32("graphics/pokemon/unown/anim_front_w.4bpp.lz"); -const u32 gMonFrontPic_UnownX[] = INCBIN_U32("graphics/pokemon/unown/anim_front_x.4bpp.lz"); -const u32 gMonFrontPic_UnownY[] = INCBIN_U32("graphics/pokemon/unown/anim_front_y.4bpp.lz"); -const u32 gMonFrontPic_UnownZ[] = INCBIN_U32("graphics/pokemon/unown/anim_front_z.4bpp.lz"); -const u32 gMonFrontPic_UnownExclamationMark[] = INCBIN_U32("graphics/pokemon/unown/anim_front_exclamation_mark.4bpp.lz"); -const u32 gMonFrontPic_UnownQuestionMark[] = INCBIN_U32("graphics/pokemon/unown/anim_front_question_mark.4bpp.lz"); +const u32 gMonFrontPic_UnownB[] = INCBIN_U32("graphics/pokemon/unown/b/anim_front.4bpp.lz"); +const u32 gMonFrontPic_UnownC[] = INCBIN_U32("graphics/pokemon/unown/c/anim_front.4bpp.lz"); +const u32 gMonFrontPic_UnownD[] = INCBIN_U32("graphics/pokemon/unown/d/anim_front.4bpp.lz"); +const u32 gMonFrontPic_UnownE[] = INCBIN_U32("graphics/pokemon/unown/e/anim_front.4bpp.lz"); +const u32 gMonFrontPic_UnownF[] = INCBIN_U32("graphics/pokemon/unown/f/anim_front.4bpp.lz"); +const u32 gMonFrontPic_UnownG[] = INCBIN_U32("graphics/pokemon/unown/g/anim_front.4bpp.lz"); +const u32 gMonFrontPic_UnownH[] = INCBIN_U32("graphics/pokemon/unown/h/anim_front.4bpp.lz"); +const u32 gMonFrontPic_UnownI[] = INCBIN_U32("graphics/pokemon/unown/i/anim_front.4bpp.lz"); +const u32 gMonFrontPic_UnownJ[] = INCBIN_U32("graphics/pokemon/unown/j/anim_front.4bpp.lz"); +const u32 gMonFrontPic_UnownK[] = INCBIN_U32("graphics/pokemon/unown/k/anim_front.4bpp.lz"); +const u32 gMonFrontPic_UnownL[] = INCBIN_U32("graphics/pokemon/unown/l/anim_front.4bpp.lz"); +const u32 gMonFrontPic_UnownM[] = INCBIN_U32("graphics/pokemon/unown/m/anim_front.4bpp.lz"); +const u32 gMonFrontPic_UnownN[] = INCBIN_U32("graphics/pokemon/unown/n/anim_front.4bpp.lz"); +const u32 gMonFrontPic_UnownO[] = INCBIN_U32("graphics/pokemon/unown/o/anim_front.4bpp.lz"); +const u32 gMonFrontPic_UnownP[] = INCBIN_U32("graphics/pokemon/unown/p/anim_front.4bpp.lz"); +const u32 gMonFrontPic_UnownQ[] = INCBIN_U32("graphics/pokemon/unown/q/anim_front.4bpp.lz"); +const u32 gMonFrontPic_UnownR[] = INCBIN_U32("graphics/pokemon/unown/r/anim_front.4bpp.lz"); +const u32 gMonFrontPic_UnownS[] = INCBIN_U32("graphics/pokemon/unown/s/anim_front.4bpp.lz"); +const u32 gMonFrontPic_UnownT[] = INCBIN_U32("graphics/pokemon/unown/t/anim_front.4bpp.lz"); +const u32 gMonFrontPic_UnownU[] = INCBIN_U32("graphics/pokemon/unown/u/anim_front.4bpp.lz"); +const u32 gMonFrontPic_UnownV[] = INCBIN_U32("graphics/pokemon/unown/v/anim_front.4bpp.lz"); +const u32 gMonFrontPic_UnownW[] = INCBIN_U32("graphics/pokemon/unown/w/anim_front.4bpp.lz"); +const u32 gMonFrontPic_UnownX[] = INCBIN_U32("graphics/pokemon/unown/x/anim_front.4bpp.lz"); +const u32 gMonFrontPic_UnownY[] = INCBIN_U32("graphics/pokemon/unown/y/anim_front.4bpp.lz"); +const u32 gMonFrontPic_UnownZ[] = INCBIN_U32("graphics/pokemon/unown/z/anim_front.4bpp.lz"); +const u32 gMonFrontPic_UnownExclamationMark[] = INCBIN_U32("graphics/pokemon/unown/exclamation_mark/anim_front.4bpp.lz"); +const u32 gMonFrontPic_UnownQuestionMark[] = INCBIN_U32("graphics/pokemon/unown/question_mark/anim_front.4bpp.lz"); const u32 gMonFrontPic_Turtwig[] = INCBIN_U32("graphics/pokemon/turtwig/anim_front.4bpp.lz"); const u32 gMonFrontPic_Grotle[] = INCBIN_U32("graphics/pokemon/grotle/anim_front.4bpp.lz"); const u32 gMonFrontPic_Torterra[] = INCBIN_U32("graphics/pokemon/torterra/anim_front.4bpp.lz"); @@ -848,7 +848,7 @@ const u32 gMonFrontPic_Zeraora[] = INCBIN_U32("graphics/pokemon/zeraora/front.4b const u32 gMonFrontPic_Meltan[] = INCBIN_U32("graphics/pokemon/meltan/front.4bpp.lz"); const u32 gMonFrontPic_Melmetal[] = INCBIN_U32("graphics/pokemon/melmetal/front.4bpp.lz"); -const u32 gMonBackPic_CircledQuestionMark[] = INCBIN_U32("graphics/pokemon/circled_question_mark/back.4bpp.lz"); +const u32 gMonBackPic_CircledQuestionMark[] = INCBIN_U32("graphics/pokemon/question_mark/circled/back.4bpp.lz"); const u32 gMonBackPic_Bulbasaur[] = INCBIN_U32("graphics/pokemon/bulbasaur/back.4bpp.lz"); const u32 gMonBackPic_Ivysaur[] = INCBIN_U32("graphics/pokemon/ivysaur/back.4bpp.lz"); const u32 gMonBackPic_Venusaur[] = INCBIN_U32("graphics/pokemon/venusaur/back.4bpp.lz"); @@ -1049,7 +1049,7 @@ const u32 gMonBackPic_Umbreon[] = INCBIN_U32("graphics/pokemon/umbreon/back.4bpp const u32 gMonBackPic_Murkrow[] = INCBIN_U32("graphics/pokemon/murkrow/back.4bpp.lz"); const u32 gMonBackPic_Slowking[] = INCBIN_U32("graphics/pokemon/slowking/back.4bpp.lz"); const u32 gMonBackPic_Misdreavus[] = INCBIN_U32("graphics/pokemon/misdreavus/back.4bpp.lz"); -const u32 gMonBackPic_UnownA[] = INCBIN_U32("graphics/pokemon/unown/back_a.4bpp.lz"); +const u32 gMonBackPic_UnownA[] = INCBIN_U32("graphics/pokemon/unown/a/back.4bpp.lz"); const u32 gMonBackPic_Wobbuffet[] = INCBIN_U32("graphics/pokemon/wobbuffet/back.4bpp.lz"); const u32 gMonBackPic_Girafarig[] = INCBIN_U32("graphics/pokemon/girafarig/back.4bpp.lz"); const u32 gMonBackPic_Pineco[] = INCBIN_U32("graphics/pokemon/pineco/back.4bpp.lz"); @@ -1100,7 +1100,7 @@ const u32 gMonBackPic_Tyranitar[] = INCBIN_U32("graphics/pokemon/tyranitar/back. const u32 gMonBackPic_Lugia[] = INCBIN_U32("graphics/pokemon/lugia/back.4bpp.lz"); const u32 gMonBackPic_HoOh[] = INCBIN_U32("graphics/pokemon/ho_oh/back.4bpp.lz"); const u32 gMonBackPic_Celebi[] = INCBIN_U32("graphics/pokemon/celebi/back.4bpp.lz"); -const u32 gMonBackPic_DoubleQuestionMark[] = INCBIN_U32("graphics/pokemon/double_question_mark/back.4bpp.lz"); +const u32 gMonBackPic_DoubleQuestionMark[] = INCBIN_U32("graphics/pokemon/question_mark/double/back.4bpp.lz"); const u32 gMonBackPic_Treecko[] = INCBIN_U32("graphics/pokemon/treecko/back.4bpp.lz"); const u32 gMonBackPic_Grovyle[] = INCBIN_U32("graphics/pokemon/grovyle/back.4bpp.lz"); const u32 gMonBackPic_Sceptile[] = INCBIN_U32("graphics/pokemon/sceptile/back.4bpp.lz"); @@ -1236,33 +1236,33 @@ const u32 gMonBackPic_Latios[] = INCBIN_U32("graphics/pokemon/latios/back.4bpp.l const u32 gMonBackPic_Jirachi[] = INCBIN_U32("graphics/pokemon/jirachi/back.4bpp.lz"); const u32 gMonBackPic_Deoxys[] = INCBIN_U32("graphics/pokemon/deoxys/back.4bpp.lz"); const u32 gMonBackPic_Chimecho[] = INCBIN_U32("graphics/pokemon/chimecho/back.4bpp.lz"); -const u32 gMonBackPic_UnownB[] = INCBIN_U32("graphics/pokemon/unown/back_b.4bpp.lz"); -const u32 gMonBackPic_UnownC[] = INCBIN_U32("graphics/pokemon/unown/back_c.4bpp.lz"); -const u32 gMonBackPic_UnownD[] = INCBIN_U32("graphics/pokemon/unown/back_d.4bpp.lz"); -const u32 gMonBackPic_UnownE[] = INCBIN_U32("graphics/pokemon/unown/back_e.4bpp.lz"); -const u32 gMonBackPic_UnownF[] = INCBIN_U32("graphics/pokemon/unown/back_f.4bpp.lz"); -const u32 gMonBackPic_UnownG[] = INCBIN_U32("graphics/pokemon/unown/back_g.4bpp.lz"); -const u32 gMonBackPic_UnownH[] = INCBIN_U32("graphics/pokemon/unown/back_h.4bpp.lz"); -const u32 gMonBackPic_UnownI[] = INCBIN_U32("graphics/pokemon/unown/back_i.4bpp.lz"); -const u32 gMonBackPic_UnownJ[] = INCBIN_U32("graphics/pokemon/unown/back_j.4bpp.lz"); -const u32 gMonBackPic_UnownK[] = INCBIN_U32("graphics/pokemon/unown/back_k.4bpp.lz"); -const u32 gMonBackPic_UnownL[] = INCBIN_U32("graphics/pokemon/unown/back_l.4bpp.lz"); -const u32 gMonBackPic_UnownM[] = INCBIN_U32("graphics/pokemon/unown/back_m.4bpp.lz"); -const u32 gMonBackPic_UnownN[] = INCBIN_U32("graphics/pokemon/unown/back_n.4bpp.lz"); -const u32 gMonBackPic_UnownO[] = INCBIN_U32("graphics/pokemon/unown/back_o.4bpp.lz"); -const u32 gMonBackPic_UnownP[] = INCBIN_U32("graphics/pokemon/unown/back_p.4bpp.lz"); -const u32 gMonBackPic_UnownQ[] = INCBIN_U32("graphics/pokemon/unown/back_q.4bpp.lz"); -const u32 gMonBackPic_UnownR[] = INCBIN_U32("graphics/pokemon/unown/back_r.4bpp.lz"); -const u32 gMonBackPic_UnownS[] = INCBIN_U32("graphics/pokemon/unown/back_s.4bpp.lz"); -const u32 gMonBackPic_UnownT[] = INCBIN_U32("graphics/pokemon/unown/back_t.4bpp.lz"); -const u32 gMonBackPic_UnownU[] = INCBIN_U32("graphics/pokemon/unown/back_u.4bpp.lz"); -const u32 gMonBackPic_UnownV[] = INCBIN_U32("graphics/pokemon/unown/back_v.4bpp.lz"); -const u32 gMonBackPic_UnownW[] = INCBIN_U32("graphics/pokemon/unown/back_w.4bpp.lz"); -const u32 gMonBackPic_UnownX[] = INCBIN_U32("graphics/pokemon/unown/back_x.4bpp.lz"); -const u32 gMonBackPic_UnownY[] = INCBIN_U32("graphics/pokemon/unown/back_y.4bpp.lz"); -const u32 gMonBackPic_UnownZ[] = INCBIN_U32("graphics/pokemon/unown/back_z.4bpp.lz"); -const u32 gMonBackPic_UnownExclamationMark[] = INCBIN_U32("graphics/pokemon/unown/back_exclamation_mark.4bpp.lz"); -const u32 gMonBackPic_UnownQuestionMark[] = INCBIN_U32("graphics/pokemon/unown/back_question_mark.4bpp.lz"); +const u32 gMonBackPic_UnownB[] = INCBIN_U32("graphics/pokemon/unown/b/back.4bpp.lz"); +const u32 gMonBackPic_UnownC[] = INCBIN_U32("graphics/pokemon/unown/c/back.4bpp.lz"); +const u32 gMonBackPic_UnownD[] = INCBIN_U32("graphics/pokemon/unown/d/back.4bpp.lz"); +const u32 gMonBackPic_UnownE[] = INCBIN_U32("graphics/pokemon/unown/e/back.4bpp.lz"); +const u32 gMonBackPic_UnownF[] = INCBIN_U32("graphics/pokemon/unown/f/back.4bpp.lz"); +const u32 gMonBackPic_UnownG[] = INCBIN_U32("graphics/pokemon/unown/g/back.4bpp.lz"); +const u32 gMonBackPic_UnownH[] = INCBIN_U32("graphics/pokemon/unown/h/back.4bpp.lz"); +const u32 gMonBackPic_UnownI[] = INCBIN_U32("graphics/pokemon/unown/i/back.4bpp.lz"); +const u32 gMonBackPic_UnownJ[] = INCBIN_U32("graphics/pokemon/unown/j/back.4bpp.lz"); +const u32 gMonBackPic_UnownK[] = INCBIN_U32("graphics/pokemon/unown/k/back.4bpp.lz"); +const u32 gMonBackPic_UnownL[] = INCBIN_U32("graphics/pokemon/unown/l/back.4bpp.lz"); +const u32 gMonBackPic_UnownM[] = INCBIN_U32("graphics/pokemon/unown/m/back.4bpp.lz"); +const u32 gMonBackPic_UnownN[] = INCBIN_U32("graphics/pokemon/unown/n/back.4bpp.lz"); +const u32 gMonBackPic_UnownO[] = INCBIN_U32("graphics/pokemon/unown/o/back.4bpp.lz"); +const u32 gMonBackPic_UnownP[] = INCBIN_U32("graphics/pokemon/unown/p/back.4bpp.lz"); +const u32 gMonBackPic_UnownQ[] = INCBIN_U32("graphics/pokemon/unown/q/back.4bpp.lz"); +const u32 gMonBackPic_UnownR[] = INCBIN_U32("graphics/pokemon/unown/r/back.4bpp.lz"); +const u32 gMonBackPic_UnownS[] = INCBIN_U32("graphics/pokemon/unown/s/back.4bpp.lz"); +const u32 gMonBackPic_UnownT[] = INCBIN_U32("graphics/pokemon/unown/t/back.4bpp.lz"); +const u32 gMonBackPic_UnownU[] = INCBIN_U32("graphics/pokemon/unown/u/back.4bpp.lz"); +const u32 gMonBackPic_UnownV[] = INCBIN_U32("graphics/pokemon/unown/v/back.4bpp.lz"); +const u32 gMonBackPic_UnownW[] = INCBIN_U32("graphics/pokemon/unown/w/back.4bpp.lz"); +const u32 gMonBackPic_UnownX[] = INCBIN_U32("graphics/pokemon/unown/x/back.4bpp.lz"); +const u32 gMonBackPic_UnownY[] = INCBIN_U32("graphics/pokemon/unown/y/back.4bpp.lz"); +const u32 gMonBackPic_UnownZ[] = INCBIN_U32("graphics/pokemon/unown/z/back.4bpp.lz"); +const u32 gMonBackPic_UnownExclamationMark[] = INCBIN_U32("graphics/pokemon/unown/exclamation_mark/back.4bpp.lz"); +const u32 gMonBackPic_UnownQuestionMark[] = INCBIN_U32("graphics/pokemon/unown/question_mark/back.4bpp.lz"); const u32 gMonBackPic_Turtwig[] = INCBIN_U32("graphics/pokemon/turtwig/back.4bpp.lz"); const u32 gMonBackPic_Grotle[] = INCBIN_U32("graphics/pokemon/grotle/back.4bpp.lz"); const u32 gMonBackPic_Torterra[] = INCBIN_U32("graphics/pokemon/torterra/back.4bpp.lz"); @@ -1697,7 +1697,7 @@ const u32 gMonBackPic_Zeraora[] = INCBIN_U32("graphics/pokemon/zeraora/back.4bpp const u32 gMonBackPic_Meltan[] = INCBIN_U32("graphics/pokemon/meltan/back.4bpp.lz"); const u32 gMonBackPic_Melmetal[] = INCBIN_U32("graphics/pokemon/melmetal/back.4bpp.lz"); -const u32 gMonPalette_CircledQuestionMark[] = INCBIN_U32("graphics/pokemon/circled_question_mark/normal.gbapal.lz"); +const u32 gMonPalette_CircledQuestionMark[] = INCBIN_U32("graphics/pokemon/question_mark/circled/normal.gbapal.lz"); const u32 gMonPalette_Bulbasaur[] = INCBIN_U32("graphics/pokemon/bulbasaur/normal.gbapal.lz"); const u32 gMonPalette_Ivysaur[] = INCBIN_U32("graphics/pokemon/ivysaur/normal.gbapal.lz"); const u32 gMonPalette_Venusaur[] = INCBIN_U32("graphics/pokemon/venusaur/normal.gbapal.lz"); @@ -1949,7 +1949,7 @@ const u32 gMonPalette_Tyranitar[] = INCBIN_U32("graphics/pokemon/tyranitar/norma const u32 gMonPalette_Lugia[] = INCBIN_U32("graphics/pokemon/lugia/normal.gbapal.lz"); const u32 gMonPalette_HoOh[] = INCBIN_U32("graphics/pokemon/ho_oh/normal.gbapal.lz"); const u32 gMonPalette_Celebi[] = INCBIN_U32("graphics/pokemon/celebi/normal.gbapal.lz"); -const u32 gMonPalette_DoubleQuestionMark[] = INCBIN_U32("graphics/pokemon/double_question_mark/normal.gbapal.lz"); +const u32 gMonPalette_DoubleQuestionMark[] = INCBIN_U32("graphics/pokemon/question_mark/double/normal.gbapal.lz"); const u32 gMonPalette_Treecko[] = INCBIN_U32("graphics/pokemon/treecko/normal.gbapal.lz"); const u32 gMonPalette_Grovyle[] = INCBIN_U32("graphics/pokemon/grovyle/normal.gbapal.lz"); const u32 gMonPalette_Sceptile[] = INCBIN_U32("graphics/pokemon/sceptile/normal.gbapal.lz"); @@ -2520,7 +2520,7 @@ const u32 gMonPalette_Zeraora[] = INCBIN_U32("graphics/pokemon/zeraora/normal.gb const u32 gMonPalette_Meltan[] = INCBIN_U32("graphics/pokemon/meltan/normal.gbapal.lz"); const u32 gMonPalette_Melmetal[] = INCBIN_U32("graphics/pokemon/melmetal/normal.gbapal.lz"); -const u32 gMonShinyPalette_CircledQuestionMark[] = INCBIN_U32("graphics/pokemon/circled_question_mark/shiny.gbapal.lz"); +const u32 gMonShinyPalette_CircledQuestionMark[] = INCBIN_U32("graphics/pokemon/question_mark/circled/shiny.gbapal.lz"); const u32 gMonShinyPalette_Bulbasaur[] = INCBIN_U32("graphics/pokemon/bulbasaur/shiny.gbapal.lz"); const u32 gMonShinyPalette_Ivysaur[] = INCBIN_U32("graphics/pokemon/ivysaur/shiny.gbapal.lz"); const u32 gMonShinyPalette_Venusaur[] = INCBIN_U32("graphics/pokemon/venusaur/shiny.gbapal.lz"); @@ -2772,7 +2772,7 @@ const u32 gMonShinyPalette_Tyranitar[] = INCBIN_U32("graphics/pokemon/tyranitar/ const u32 gMonShinyPalette_Lugia[] = INCBIN_U32("graphics/pokemon/lugia/shiny.gbapal.lz"); const u32 gMonShinyPalette_HoOh[] = INCBIN_U32("graphics/pokemon/ho_oh/shiny.gbapal.lz"); const u32 gMonShinyPalette_Celebi[] = INCBIN_U32("graphics/pokemon/celebi/shiny.gbapal.lz"); -const u32 gMonShinyPalette_DoubleQuestionMark[] = INCBIN_U32("graphics/pokemon/double_question_mark/shiny.gbapal.lz"); +const u32 gMonShinyPalette_DoubleQuestionMark[] = INCBIN_U32("graphics/pokemon/question_mark/double/shiny.gbapal.lz"); const u32 gMonShinyPalette_Treecko[] = INCBIN_U32("graphics/pokemon/treecko/shiny.gbapal.lz"); const u32 gMonShinyPalette_Grovyle[] = INCBIN_U32("graphics/pokemon/grovyle/shiny.gbapal.lz"); const u32 gMonShinyPalette_Sceptile[] = INCBIN_U32("graphics/pokemon/sceptile/shiny.gbapal.lz"); @@ -3882,7 +3882,7 @@ const u8 gMonIcon_Umbreon[] = INCBIN_U8("graphics/pokemon/umbreon/icon.4bpp"); const u8 gMonIcon_Murkrow[] = INCBIN_U8("graphics/pokemon/murkrow/icon.4bpp"); const u8 gMonIcon_Slowking[] = INCBIN_U8("graphics/pokemon/slowking/icon.4bpp"); const u8 gMonIcon_Misdreavus[] = INCBIN_U8("graphics/pokemon/misdreavus/icon.4bpp"); -const u8 gMonIcon_UnownA[] = INCBIN_U8("graphics/pokemon/unown/icon_a.4bpp"); +const u8 gMonIcon_UnownA[] = INCBIN_U8("graphics/pokemon/unown/a/icon.4bpp"); const u8 gMonIcon_Wobbuffet[] = INCBIN_U8("graphics/pokemon/wobbuffet/icon.4bpp"); const u8 gMonIcon_Girafarig[] = INCBIN_U8("graphics/pokemon/girafarig/icon.4bpp"); const u8 gMonIcon_Pineco[] = INCBIN_U8("graphics/pokemon/pineco/icon.4bpp"); @@ -4069,33 +4069,33 @@ const u8 gMonIcon_Jirachi[] = INCBIN_U8("graphics/pokemon/jirachi/icon.4bpp"); const u8 gMonIcon_Deoxys[] = INCBIN_U8("graphics/pokemon/deoxys/icon.4bpp"); const u8 gMonIcon_Chimecho[] = INCBIN_U8("graphics/pokemon/chimecho/icon.4bpp"); const u8 gMonIcon_Egg[] = INCBIN_U8("graphics/pokemon/egg/icon.4bpp"); -const u8 gMonIcon_UnownB[] = INCBIN_U8("graphics/pokemon/unown/icon_b.4bpp"); -const u8 gMonIcon_UnownC[] = INCBIN_U8("graphics/pokemon/unown/icon_c.4bpp"); -const u8 gMonIcon_UnownD[] = INCBIN_U8("graphics/pokemon/unown/icon_d.4bpp"); -const u8 gMonIcon_UnownE[] = INCBIN_U8("graphics/pokemon/unown/icon_e.4bpp"); -const u8 gMonIcon_UnownF[] = INCBIN_U8("graphics/pokemon/unown/icon_f.4bpp"); -const u8 gMonIcon_UnownG[] = INCBIN_U8("graphics/pokemon/unown/icon_g.4bpp"); -const u8 gMonIcon_UnownH[] = INCBIN_U8("graphics/pokemon/unown/icon_h.4bpp"); -const u8 gMonIcon_UnownI[] = INCBIN_U8("graphics/pokemon/unown/icon_i.4bpp"); -const u8 gMonIcon_UnownJ[] = INCBIN_U8("graphics/pokemon/unown/icon_j.4bpp"); -const u8 gMonIcon_UnownK[] = INCBIN_U8("graphics/pokemon/unown/icon_k.4bpp"); -const u8 gMonIcon_UnownL[] = INCBIN_U8("graphics/pokemon/unown/icon_l.4bpp"); -const u8 gMonIcon_UnownM[] = INCBIN_U8("graphics/pokemon/unown/icon_m.4bpp"); -const u8 gMonIcon_UnownN[] = INCBIN_U8("graphics/pokemon/unown/icon_n.4bpp"); -const u8 gMonIcon_UnownO[] = INCBIN_U8("graphics/pokemon/unown/icon_o.4bpp"); -const u8 gMonIcon_UnownP[] = INCBIN_U8("graphics/pokemon/unown/icon_p.4bpp"); -const u8 gMonIcon_UnownQ[] = INCBIN_U8("graphics/pokemon/unown/icon_q.4bpp"); -const u8 gMonIcon_UnownR[] = INCBIN_U8("graphics/pokemon/unown/icon_r.4bpp"); -const u8 gMonIcon_UnownS[] = INCBIN_U8("graphics/pokemon/unown/icon_s.4bpp"); -const u8 gMonIcon_UnownT[] = INCBIN_U8("graphics/pokemon/unown/icon_t.4bpp"); -const u8 gMonIcon_UnownU[] = INCBIN_U8("graphics/pokemon/unown/icon_u.4bpp"); -const u8 gMonIcon_UnownV[] = INCBIN_U8("graphics/pokemon/unown/icon_v.4bpp"); -const u8 gMonIcon_UnownW[] = INCBIN_U8("graphics/pokemon/unown/icon_w.4bpp"); -const u8 gMonIcon_UnownX[] = INCBIN_U8("graphics/pokemon/unown/icon_x.4bpp"); -const u8 gMonIcon_UnownY[] = INCBIN_U8("graphics/pokemon/unown/icon_y.4bpp"); -const u8 gMonIcon_UnownZ[] = INCBIN_U8("graphics/pokemon/unown/icon_z.4bpp"); -const u8 gMonIcon_UnownExclamationMark[] = INCBIN_U8("graphics/pokemon/unown/icon_exclamation_mark.4bpp"); -const u8 gMonIcon_UnownQuestionMark[] = INCBIN_U8("graphics/pokemon/unown/icon_question_mark.4bpp"); +const u8 gMonIcon_UnownB[] = INCBIN_U8("graphics/pokemon/unown/b/icon.4bpp"); +const u8 gMonIcon_UnownC[] = INCBIN_U8("graphics/pokemon/unown/c/icon.4bpp"); +const u8 gMonIcon_UnownD[] = INCBIN_U8("graphics/pokemon/unown/d/icon.4bpp"); +const u8 gMonIcon_UnownE[] = INCBIN_U8("graphics/pokemon/unown/e/icon.4bpp"); +const u8 gMonIcon_UnownF[] = INCBIN_U8("graphics/pokemon/unown/f/icon.4bpp"); +const u8 gMonIcon_UnownG[] = INCBIN_U8("graphics/pokemon/unown/g/icon.4bpp"); +const u8 gMonIcon_UnownH[] = INCBIN_U8("graphics/pokemon/unown/h/icon.4bpp"); +const u8 gMonIcon_UnownI[] = INCBIN_U8("graphics/pokemon/unown/i/icon.4bpp"); +const u8 gMonIcon_UnownJ[] = INCBIN_U8("graphics/pokemon/unown/j/icon.4bpp"); +const u8 gMonIcon_UnownK[] = INCBIN_U8("graphics/pokemon/unown/k/icon.4bpp"); +const u8 gMonIcon_UnownL[] = INCBIN_U8("graphics/pokemon/unown/l/icon.4bpp"); +const u8 gMonIcon_UnownM[] = INCBIN_U8("graphics/pokemon/unown/m/icon.4bpp"); +const u8 gMonIcon_UnownN[] = INCBIN_U8("graphics/pokemon/unown/n/icon.4bpp"); +const u8 gMonIcon_UnownO[] = INCBIN_U8("graphics/pokemon/unown/o/icon.4bpp"); +const u8 gMonIcon_UnownP[] = INCBIN_U8("graphics/pokemon/unown/p/icon.4bpp"); +const u8 gMonIcon_UnownQ[] = INCBIN_U8("graphics/pokemon/unown/q/icon.4bpp"); +const u8 gMonIcon_UnownR[] = INCBIN_U8("graphics/pokemon/unown/r/icon.4bpp"); +const u8 gMonIcon_UnownS[] = INCBIN_U8("graphics/pokemon/unown/s/icon.4bpp"); +const u8 gMonIcon_UnownT[] = INCBIN_U8("graphics/pokemon/unown/t/icon.4bpp"); +const u8 gMonIcon_UnownU[] = INCBIN_U8("graphics/pokemon/unown/u/icon.4bpp"); +const u8 gMonIcon_UnownV[] = INCBIN_U8("graphics/pokemon/unown/v/icon.4bpp"); +const u8 gMonIcon_UnownW[] = INCBIN_U8("graphics/pokemon/unown/w/icon.4bpp"); +const u8 gMonIcon_UnownX[] = INCBIN_U8("graphics/pokemon/unown/x/icon.4bpp"); +const u8 gMonIcon_UnownY[] = INCBIN_U8("graphics/pokemon/unown/y/icon.4bpp"); +const u8 gMonIcon_UnownZ[] = INCBIN_U8("graphics/pokemon/unown/z/icon.4bpp"); +const u8 gMonIcon_UnownExclamationMark[] = INCBIN_U8("graphics/pokemon/unown/exclamation_mark/icon.4bpp"); +const u8 gMonIcon_UnownQuestionMark[] = INCBIN_U8("graphics/pokemon/unown/question_mark/icon.4bpp"); const u8 gMonIcon_Turtwig[] = INCBIN_U8("graphics/pokemon/turtwig/icon.4bpp"); const u8 gMonIcon_Grotle[] = INCBIN_U8("graphics/pokemon/grotle/icon.4bpp"); const u8 gMonIcon_Torterra[] = INCBIN_U8("graphics/pokemon/torterra/icon.4bpp"); diff --git a/src/field_effect.c b/src/field_effect.c index 7195f3f4a..c4e9fc40a 100644 --- a/src/field_effect.c +++ b/src/field_effect.c @@ -932,177 +932,47 @@ void FreeResourcesAndDestroySprite(struct Sprite *sprite, u8 spriteId) FreeAndDestroyMonPicSprite(spriteId); } -#ifdef NONMATCHING +// r, g, b are between 0 and 16 void MultiplyInvertedPaletteRGBComponents(u16 i, u8 r, u8 g, u8 b) { int curRed; int curGreen; int curBlue; + u16 outPal; - curRed = gPlttBufferUnfaded[i] & 0x1f; - curGreen = (gPlttBufferUnfaded[i] & (0x1f << 5)) >> 5; - curBlue = (gPlttBufferUnfaded[i] & (0x1f << 10)) >> 10; + outPal = gPlttBufferUnfaded[i]; + curRed = outPal & 0x1f; + curGreen = (outPal & (0x1f << 5)) >> 5; + curBlue = (outPal & (0x1f << 10)) >> 10; curRed += (((0x1f - curRed) * r) >> 4); curGreen += (((0x1f - curGreen) * g) >> 4); curBlue += (((0x1f - curBlue) * b) >> 4); - gPlttBufferFaded[i] = RGB(curRed, curGreen, curBlue); + outPal = curRed; + outPal |= curGreen << 5; + outPal |= curBlue << 10; + gPlttBufferFaded[i] = outPal; } +// r, g, b are between 0 and 16 void MultiplyPaletteRGBComponents(u16 i, u8 r, u8 g, u8 b) { int curRed; int curGreen; int curBlue; + u16 outPal; - curRed = gPlttBufferUnfaded[i] & 0x1f; - curGreen = (gPlttBufferUnfaded[i] & (0x1f << 5)) >> 5; - curBlue = (gPlttBufferUnfaded[i] & (0x1f << 10)) >> 10; + outPal = gPlttBufferUnfaded[i]; + curRed = outPal & 0x1f; + curGreen = (outPal & (0x1f << 5)) >> 5; + curBlue = (outPal & (0x1f << 10)) >> 10; curRed -= ((curRed * r) >> 4); curGreen -= ((curGreen * g) >> 4); curBlue -= ((curBlue * b) >> 4); - gPlttBufferFaded[i] = RGB(curRed, curGreen, curBlue); + outPal = curRed; + outPal |= curGreen << 5; + outPal |= curBlue << 10; + gPlttBufferFaded[i] = outPal; } -#else -NAKED -void MultiplyInvertedPaletteRGBComponents(u16 i, u8 r, u8 g, u8 b) -{ - asm(".syntax unified\n" - "\tpush {r4-r7,lr}\n" - "\tmov r7, r9\n" - "\tmov r6, r8\n" - "\tpush {r6,r7}\n" - "\tlsls r0, 16\n" - "\tlsls r1, 24\n" - "\tlsrs r1, 24\n" - "\tlsls r2, 24\n" - "\tlsrs r2, 24\n" - "\tlsls r3, 24\n" - "\tlsrs r3, 24\n" - "\tldr r4, _08085D00 @ =gPlttBufferUnfaded\n" - "\tlsrs r0, 15\n" - "\tadds r4, r0, r4\n" - "\tldrh r4, [r4]\n" - "\tmovs r5, 0x1F\n" - "\tmov r9, r5\n" - "\tmov r8, r4\n" - "\tmov r6, r8\n" - "\tands r6, r5\n" - "\tmov r8, r6\n" - "\tmovs r6, 0xF8\n" - "\tlsls r6, 2\n" - "\tands r6, r4\n" - "\tlsrs r6, 5\n" - "\tmovs r5, 0xF8\n" - "\tlsls r5, 7\n" - "\tands r4, r5\n" - "\tlsrs r4, 10\n" - "\tmov r7, r9\n" - "\tmov r5, r8\n" - "\tsubs r7, r5\n" - "\tmov r12, r7\n" - "\tmov r7, r12\n" - "\tmuls r7, r1\n" - "\tadds r1, r7, 0\n" - "\tasrs r1, 4\n" - "\tadd r8, r1\n" - "\tmov r5, r9\n" - "\tsubs r1, r5, r6\n" - "\tmuls r1, r2\n" - "\tasrs r1, 4\n" - "\tadds r6, r1\n" - "\tsubs r5, r4\n" - "\tmov r9, r5\n" - "\tmov r1, r9\n" - "\tmuls r1, r3\n" - "\tasrs r1, 4\n" - "\tadds r4, r1\n" - "\tmov r7, r8\n" - "\tlsls r7, 16\n" - "\tlsls r6, 21\n" - "\torrs r6, r7\n" - "\tlsls r4, 26\n" - "\torrs r4, r6\n" - "\tlsrs r4, 16\n" - "\tldr r1, _08085D04 @ =gPlttBufferFaded\n" - "\tadds r0, r1\n" - "\tstrh r4, [r0]\n" - "\tpop {r3,r4}\n" - "\tmov r8, r3\n" - "\tmov r9, r4\n" - "\tpop {r4-r7}\n" - "\tpop {r0}\n" - "\tbx r0\n" - "\t.align 2, 0\n" - "_08085D00: .4byte gPlttBufferUnfaded\n" - "_08085D04: .4byte gPlttBufferFaded\n" - ".syntax divided"); -} - -NAKED -void MultiplyPaletteRGBComponents(u16 i, u8 r, u8 g, u8 b) -{ - asm(".syntax unified\n" - "\tpush {r4-r6,lr}\n" - "\tmov r6, r8\n" - "\tpush {r6}\n" - "\tlsls r0, 16\n" - "\tlsls r1, 24\n" - "\tlsrs r1, 24\n" - "\tlsls r2, 24\n" - "\tlsrs r2, 24\n" - "\tlsls r3, 24\n" - "\tlsrs r3, 24\n" - "\tldr r4, _08085D78 @ =gPlttBufferUnfaded\n" - "\tlsrs r0, 15\n" - "\tadds r4, r0, r4\n" - "\tldrh r4, [r4]\n" - "\tmovs r5, 0x1F\n" - "\tmov r8, r5\n" - "\tmov r6, r8\n" - "\tands r6, r4\n" - "\tmov r8, r6\n" - "\tmovs r5, 0xF8\n" - "\tlsls r5, 2\n" - "\tands r5, r4\n" - "\tlsrs r5, 5\n" - "\tmovs r6, 0xF8\n" - "\tlsls r6, 7\n" - "\tands r4, r6\n" - "\tlsrs r4, 10\n" - "\tmov r6, r8\n" - "\tmuls r6, r1\n" - "\tadds r1, r6, 0\n" - "\tasrs r1, 4\n" - "\tmov r6, r8\n" - "\tsubs r6, r1\n" - "\tadds r1, r5, 0\n" - "\tmuls r1, r2\n" - "\tasrs r1, 4\n" - "\tsubs r5, r1\n" - "\tadds r1, r4, 0\n" - "\tmuls r1, r3\n" - "\tasrs r1, 4\n" - "\tsubs r4, r1\n" - "\tlsls r6, 16\n" - "\tlsls r5, 21\n" - "\torrs r5, r6\n" - "\tlsls r4, 26\n" - "\torrs r4, r5\n" - "\tlsrs r4, 16\n" - "\tldr r1, _08085D7C @ =gPlttBufferFaded\n" - "\tadds r0, r1\n" - "\tstrh r4, [r0]\n" - "\tpop {r3}\n" - "\tmov r8, r3\n" - "\tpop {r4-r6}\n" - "\tpop {r0}\n" - "\tbx r0\n" - "\t.align 2, 0\n" - "_08085D78: .4byte gPlttBufferUnfaded\n" - "_08085D7C: .4byte gPlttBufferFaded\n" - ".syntax divided"); -} -#endif bool8 FldEff_PokecenterHeal(void) { diff --git a/src/field_weather_effect.c b/src/field_weather_effect.c index 5a48f3434..26a7adf27 100644 --- a/src/field_weather_effect.c +++ b/src/field_weather_effect.c @@ -559,8 +559,7 @@ static void StartRainSpriteFall(struct Sprite *sprite) if (sprite->tRandom == 0) sprite->tRandom = 361; - // Standard RNG sequence. - rand = sprite->tRandom * 1103515245 + 12345; + rand = ISO_RANDOMIZE2(sprite->tRandom); sprite->tRandom = ((rand & 0x7FFF0000) >> 16) % 600; numFallingFrames = sRainSpriteFallingDurations[gWeatherPtr->isDownpour][0]; diff --git a/src/graphics.c b/src/graphics.c index e8cdbcd35..f78bef136 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -727,9 +727,9 @@ const u32 gBattleAnimSpritePal_PinkHeart[] = INCBIN_U32("graphics/battle_anims/s const u32 gBattleAnimSpritePal_MagentaHeart[] = INCBIN_U32("graphics/battle_anims/sprites/magenta_heart.gbapal.lz"); const u32 gBattleAnimSpritePal_RedHeart[] = INCBIN_U32("graphics/battle_anims/sprites/red_heart.gbapal.lz"); -const u32 gUnknown_08C232E0[] = INCBIN_U32("graphics/battle_anims/backgrounds/attract.4bpp.lz"); -const u32 gUnknown_08C23D50[] = INCBIN_U32("graphics/battle_anims/backgrounds/attract.gbapal.lz"); -const u32 gUnknown_08C23D78[] = INCBIN_U32("graphics/battle_anims/backgrounds/attract.bin.lz"); +const u32 gBattleAnimBgImage_Attract[] = INCBIN_U32("graphics/battle_anims/backgrounds/attract.4bpp.lz"); +const u32 gBattleAnimBgPalette_Attract[] = INCBIN_U32("graphics/battle_anims/backgrounds/attract.gbapal.lz"); +const u32 gBattleAnimBgTilemap_Attract[] = INCBIN_U32("graphics/battle_anims/backgrounds/attract.bin.lz"); const u32 gBattleAnimSpriteGfx_RedOrb[] = INCBIN_U32("graphics/battle_anims/sprites/red_orb.4bpp.lz"); const u32 gBattleAnimSpritePal_RedOrb[] = INCBIN_U32("graphics/battle_anims/sprites/red_orb.gbapal.lz"); @@ -745,8 +745,8 @@ const u32 gBattleAnimSpriteGfx_Finger2[] = INCBIN_U32("graphics/battle_anims/spr const u32 gBattleAnimSpriteGfx_MovementWaves[] = INCBIN_U32("graphics/battle_anims/sprites/movement_waves.4bpp.lz"); const u32 gBattleAnimSpritePal_MovementWaves[] = INCBIN_U32("graphics/battle_anims/sprites/movement_waves.gbapal.lz"); -const u32 gUnknown_08C249D0[] = INCBIN_U32("graphics/battle_anims/backgrounds/scary_face.gbapal.lz"); -const u32 gUnknown_08C249F8[] = INCBIN_U32("graphics/battle_anims/backgrounds/scary_face.4bpp.lz"); +const u32 gBattleAnimBgPalette_ScaryFace[] = INCBIN_U32("graphics/battle_anims/backgrounds/scary_face.gbapal.lz"); +const u32 gBattleAnimBgImage_ScaryFace[] = INCBIN_U32("graphics/battle_anims/backgrounds/scary_face.4bpp.lz"); const u32 gBattleAnimSpritePal_EyeSparkle[] = INCBIN_U32("graphics/battle_anims/sprites/eye_sparkle.gbapal.lz"); const u32 gBattleAnimSpriteGfx_EyeSparkle[] = INCBIN_U32("graphics/battle_anims/sprites/eye_sparkle.4bpp.lz"); @@ -839,9 +839,9 @@ const u32 gBattleAnimBgPalette_Bug[] = INCBIN_U32("graphics/battle_anims/backgro const u32 gBattleAnimBgImage_Highspeed[] = INCBIN_U32("graphics/battle_anims/backgrounds/highspeed.4bpp.lz"); const u32 gBattleAnimBgTilemap_HighspeedPlayer[] = INCBIN_U32("graphics/battle_anims/backgrounds/highspeed_player.bin.lz"); -const u32 gUnknown_08C2A634[] = INCBIN_U32("graphics/battle_anims/masks/morning_sun.4bpp.lz"); -const u32 gUnknown_08C2A6D4[] = INCBIN_U32("graphics/battle_anims/masks/morning_sun.gbapal.lz"); -const u32 gUnknown_08C2A6EC[] = INCBIN_U32("graphics/battle_anims/masks/morning_sun.bin.lz"); +const u32 gBattleAnimMaskImage_LightBeam[] = INCBIN_U32("graphics/battle_anims/masks/light_beam.4bpp.lz"); +const u32 gBattleAnimMaskPalette_LightBeam[] = INCBIN_U32("graphics/battle_anims/masks/light_beam.gbapal.lz"); +const u32 gBattleAnimMaskTilemap_LightBeam[] = INCBIN_U32("graphics/battle_anims/masks/light_beam.bin.lz"); const u32 gBattleAnimBgTilemap_GuillotineOpponent[] = INCBIN_U32("graphics/battle_anims/backgrounds/guillotine_opponent.bin.lz"); const u32 gBattleAnimBgTilemap_GuillotinePlayer[] = INCBIN_U32("graphics/battle_anims/backgrounds/guillotine_player.bin.lz"); @@ -993,8 +993,8 @@ const u32 gUnknown_08D85A1C[] = INCBIN_U32("graphics/battle_frontier/battle_tile const u32 gBattleAnimSpriteGfx_FlyingDirt[] = INCBIN_U32("graphics/battle_anims/sprites/flying_dirt.4bpp.lz"); -const u32 gUnknown_08D8D410[] = INCBIN_U32("graphics/battle_anims/backgrounds/sandstorm_brew.bin.lz"); -const u32 gUnknown_08D8D58C[] = INCBIN_U32("graphics/battle_anims/backgrounds/sandstorm_brew.4bpp.lz"); +const u32 gBattleAnimBgTilemap_Sandstorm[] = INCBIN_U32("graphics/battle_anims/backgrounds/sandstorm_brew.bin.lz"); +const u32 gBattleAnimBgImage_Sandstorm[] = INCBIN_U32("graphics/battle_anims/backgrounds/sandstorm_brew.4bpp.lz"); const u32 gBattleAnimSpritePal_FlyingDirt[] = INCBIN_U32("graphics/battle_anims/sprites/flying_dirt.gbapal.lz"); @@ -1111,11 +1111,9 @@ const u32 gBattleAnimSpritePal_CrossImpact[] = INCBIN_U32("graphics/battle_anims const u32 gBattleAnimBgImage_Surf[] = INCBIN_U32("graphics/battle_anims/backgrounds/water.4bpp.lz"); const u32 gBattleAnimBgPalette_Surf[] = INCBIN_U32("graphics/battle_anims/backgrounds/water.gbapal.lz"); -const u32 gUnknown_08D95E00[] = INCBIN_U32("graphics/unknown/unknown_D95E00.bin.lz"); - -const u32 gUnknown_08D960D0[] = INCBIN_U32("graphics/unknown/unknown_D960D0.bin.lz"); - -const u32 gUnknown_08D963A4[] = INCBIN_U32("graphics/unknown/unknown_D963A4.bin.lz"); +const u32 gBattleAnimBgTilemap_SurfOpponent[] = INCBIN_U32("graphics/battle_anims/backgrounds/water_opponent.bin.lz"); +const u32 gBattleAnimBgTilemap_SurfPlayer[] = INCBIN_U32("graphics/battle_anims/backgrounds/water_player.bin.lz"); +const u32 gBattleAnimBgTilemap_SurfContest[] = INCBIN_U32("graphics/battle_anims/backgrounds/water_contest.bin.lz"); const u32 gBattleAnimSpritePal_Slash2[] = INCBIN_U32("graphics/battle_anims/sprites/slash_2.gbapal.lz"); diff --git a/src/intro.c b/src/intro.c index 7c2303dcc..72aefd737 100644 --- a/src/intro.c +++ b/src/intro.c @@ -90,7 +90,7 @@ extern const struct CompressedSpriteSheet gBattleAnimPicTable[]; extern const struct CompressedSpritePalette gBattleAnimPaletteTable[]; -extern const struct SpriteTemplate gUnknown_08596C10[]; +extern const struct SpriteTemplate gAncientPowerRockSpriteTemplate[]; //ewram EWRAM_DATA u16 gIntroCharacterGender = 0; @@ -1782,7 +1782,7 @@ static void CreateGroudonRockSprites(u8 a0) for (i = 0; i < 6; i++) { - spriteId = CreateSprite(gUnknown_08596C10, gIntroGroudonRockData[i][0], 0xA0, i); + spriteId = CreateSprite(gAncientPowerRockSpriteTemplate, gIntroGroudonRockData[i][0], 0xA0, i); gSprites[spriteId].callback = SpriteCB_IntroGroudonRocks; gSprites[spriteId].oam.priority = 0; gSprites[spriteId].data[1] = i; diff --git a/src/lottery_corner.c b/src/lottery_corner.c index bb3bb7a5c..5f68ad516 100644 --- a/src/lottery_corner.c +++ b/src/lottery_corner.c @@ -35,7 +35,7 @@ void SetRandomLotteryNumber(u16 i) u32 var = Random(); while (--i != 0xFFFF) - var = var * 1103515245 + 12345; + var = ISO_RANDOMIZE2(var); SetLotteryNumber(var); } diff --git a/src/pokemon_jump.c b/src/pokemon_jump.c index feb1986c6..ec03a0305 100755 --- a/src/pokemon_jump.c +++ b/src/pokemon_jump.c @@ -1674,8 +1674,7 @@ static void sub_802BF7C(void) static int sub_802C098(void) { - // The number 1103515245 comes from the example implementation of rand and srand - gUnknown_02022CFC->unk24 = gUnknown_02022CFC->unk24 * 1103515245 + 24691; + gUnknown_02022CFC->unk24 = ISO_RANDOMIZE1(gUnknown_02022CFC->unk24); return gUnknown_02022CFC->unk24 >> 16; } diff --git a/src/random.c b/src/random.c index b570a7bc3..de923fba6 100644 --- a/src/random.c +++ b/src/random.c @@ -1,9 +1,6 @@ #include "global.h" #include "random.h" -// The number 1103515245 comes from the example implementation of rand and srand -// in the ISO C standard. - EWRAM_DATA static u8 sUnknown = 0; EWRAM_DATA static u32 sRandCount = 0; @@ -13,7 +10,7 @@ u32 gRng2Value; u16 Random(void) { - gRngValue = 1103515245 * gRngValue + 24691; + gRngValue = ISO_RANDOMIZE1(gRngValue); sRandCount++; return gRngValue >> 16; } @@ -31,6 +28,6 @@ void SeedRng2(u16 seed) u16 Random2(void) { - gRng2Value = 1103515245 * gRng2Value + 24691; + gRng2Value = ISO_RANDOMIZE1(gRng2Value); return gRng2Value >> 16; } diff --git a/src/script_pokemon_util_80F87D8.c b/src/script_pokemon_util_80F87D8.c index 243125448..134004fd0 100755 --- a/src/script_pokemon_util_80F87D8.c +++ b/src/script_pokemon_util_80F87D8.c @@ -434,7 +434,7 @@ void ScriptRandom(void) if (gLinkContestFlags & LINK_CONTEST_FLAG_IS_LINK) { - gContestRngValue = 1103515245 * gContestRngValue + 24691; + gContestRngValue = ISO_RANDOMIZE1(gContestRngValue); random = gContestRngValue >> 16; scriptPtr = &gSpecialVar_Result; } @@ -448,7 +448,7 @@ void ScriptRandom(void) u16 GetContestRand(void) { - gContestRngValue = 1103515245 * gContestRngValue + 24691; + gContestRngValue = ISO_RANDOMIZE1(gContestRngValue); return gContestRngValue >> 16; } diff --git a/src/time_events.c b/src/time_events.c index bd51f0c2d..3f56d3ab5 100644 --- a/src/time_events.c +++ b/src/time_events.c @@ -33,7 +33,7 @@ void UpdateMirageRnd(u16 days) s32 rnd = GetMirageRnd(); while (days) { - rnd = 1103515245 * rnd + 12345; + rnd = ISO_RANDOMIZE2(rnd); days--; } SetMirageRnd(rnd); diff --git a/src/wild_encounter.c b/src/wild_encounter.c index 52aac17f3..21f871751 100644 --- a/src/wild_encounter.c +++ b/src/wild_encounter.c @@ -127,12 +127,9 @@ static bool8 CheckFeebas(void) return FALSE; } -// The number 1103515245 comes from the example implementation of rand and srand -// in the ISO C standard. - static u16 FeebasRandom(void) { - sFeebasRngValue = (1103515245 * sFeebasRngValue) + 12345; + sFeebasRngValue = ISO_RANDOMIZE2(sFeebasRngValue); return sFeebasRngValue >> 16; } diff --git a/sym_ewram.txt b/sym_ewram.txt index eca090dbd..5e6eef5ef 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -79,7 +79,7 @@ .include "src/safari_zone.o" .include "src/item_use.o" .include "src/battle_anim_effects_1.o" - .include "src/dragon.o" + .include "src/battle_anim_dragon.o" .include "src/battle_anim_utility_funcs.o" .include "src/battle_intro.o" .include "src/easy_chat.o"