mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 19:47:35 +01:00
Finish documenting move anim scripts
This commit is contained in:
parent
e633b57593
commit
afa1ae2209
@ -1340,7 +1340,7 @@ 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 gPsychUpSpiralSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 0, 0
|
||||
@ -2054,8 +2054,8 @@ 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
|
||||
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
|
||||
@ -2098,7 +2098,7 @@ Move_MEAN_LOOK:
|
||||
|
||||
Move_ROCK_THROW:
|
||||
loadspritegfx ANIM_TAG_ROCKS
|
||||
createsprite gBattleAnimSpriteTemplate_85972D8, ANIM_TARGET, 2, 6, 1, 15, 1
|
||||
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
|
||||
@ -2120,7 +2120,7 @@ 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 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
|
||||
@ -2625,7 +2625,7 @@ Move_FISSURE:
|
||||
delay 50
|
||||
fadetobg BG_FISSURE
|
||||
waitbgfadeout
|
||||
createvisualtask sub_8115628, 5, ANIM_TARGET, 5, -1
|
||||
createvisualtask AnimTask_PositionFissureBgOnBattler, 5, ANIM_TARGET, 5, -1
|
||||
waitbgfadein
|
||||
delay 40
|
||||
restorebg
|
||||
@ -2833,12 +2833,12 @@ SkullBashSetUp:
|
||||
waitforvisualfinish
|
||||
goto SkullBashEnd
|
||||
SkullBashSetUpHeadDown:
|
||||
createsprite gUnknown_0857FE88, ANIM_ATTACKER, 2, 0, -24, 0, 0, 10, 0
|
||||
createsprite gSlideMonToOffsetAndBackSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, -24, 0, 0, 10, 0
|
||||
playsewithpan SE_W036, SOUND_PAN_ATTACKER
|
||||
waitforvisualfinish
|
||||
createvisualtask AminTask_DipMonSpriteToSide, 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:
|
||||
@ -2900,7 +2900,7 @@ Move_GLARE:
|
||||
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 AnimTask_BlendBattleAnimPal, 5, 1, 0, 16, 0, RGB_BLACK
|
||||
end
|
||||
@ -2910,7 +2910,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
|
||||
@ -2943,7 +2943,7 @@ SkyAttackSetUpAgainstOpponent:
|
||||
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 AnimTask_BlendBattleAnimPal, 10, 2, 1, 8, 0, RGB_BLACK
|
||||
@ -2954,7 +2954,7 @@ SkyAttackSetUpAgainstPartner:
|
||||
delay 20
|
||||
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
|
||||
@ -3183,9 +3183,9 @@ Move_DESTINY_BOND:
|
||||
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
|
||||
@ -3365,7 +3365,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
|
||||
@ -3378,7 +3378,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
|
||||
@ -3661,7 +3661,7 @@ Move_SUPERPOWER:
|
||||
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
|
||||
createsprite gShakeMonOrTerrainSpriteTemplate, ANIM_ATTACKER, 2, 4, 1, 180, 1
|
||||
createvisualtask SoundTask_PlaySE2WithPanning, 5, SE_W089, 0
|
||||
delay 40
|
||||
createsprite gSuperpowerRockSpriteTemplate, ANIM_ATTACKER, 41, 200, 96, 1, 120
|
||||
@ -3737,7 +3737,7 @@ 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, ANIM_TARGET, 1
|
||||
playsewithpan SE_W233, SOUND_PAN_TARGET
|
||||
@ -3754,10 +3754,10 @@ BrickBreakShatteredWall:
|
||||
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
|
||||
@ -3840,7 +3840,7 @@ 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
|
||||
@ -3916,7 +3916,7 @@ Move_LUSTER_PURGE:
|
||||
playsewithpan SE_W076, SOUND_PAN_ATTACKER
|
||||
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)
|
||||
@ -3939,7 +3939,7 @@ Move_LUSTER_PURGE:
|
||||
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 AnimTask_BlendBattleAnimPalExclude, 5, 5, 2, 16, 0, RGB_WHITEALPHA
|
||||
createvisualtask AnimTask_HorizontalShake, 5, ANIM_TARGET, 5, 14
|
||||
waitforvisualfinish
|
||||
clearmonbg ANIM_ATTACKER
|
||||
@ -4377,7 +4377,7 @@ Move_HOWL:
|
||||
createvisualtask AnimTask_DeepInhale, 2, 0
|
||||
delay 12
|
||||
call RoarEffect
|
||||
createvisualtask sub_8158D8C, 2, ANIM_ATTACKER, 3
|
||||
createvisualtask SoundTask_PlayCryHighPitch, 2, ANIM_ATTACKER, 3
|
||||
waitforvisualfinish
|
||||
delay 30
|
||||
end
|
||||
@ -4472,7 +4472,7 @@ 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 AnimTask_SetAllNonAttackersInvisiblity, 5, TRUE
|
||||
waitforvisualfinish
|
||||
@ -4487,7 +4487,7 @@ Move_CALM_MIND:
|
||||
waitforvisualfinish
|
||||
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
|
||||
@ -4522,10 +4522,10 @@ 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, ANIM_TAG_HOLLOW_ORB, 19456, 14, 0, 3
|
||||
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
|
||||
@ -4808,7 +4808,7 @@ Move_THUNDER:
|
||||
delay 10
|
||||
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 AnimTask_InvertScreenColor, 2, 257, 257, 257
|
||||
delay 1
|
||||
@ -4962,7 +4962,7 @@ Move_ROAR:
|
||||
monbg ANIM_ATTACKER
|
||||
monbgprio_28 ANIM_ATTACKER
|
||||
setalpha 8, 8
|
||||
createvisualtask sub_8158E9C, 2, ANIM_ATTACKER, 2
|
||||
createvisualtask SoundTask_PlayDoubleCry, 2, ANIM_ATTACKER, 2
|
||||
createvisualtask AnimTask_ScaleMonAndRestore, 5, -5, -5, 10, ANIM_ATTACKER, 1
|
||||
call RoarEffect
|
||||
delay 20
|
||||
@ -4987,7 +4987,7 @@ RoarEffect:
|
||||
|
||||
Move_GROWL:
|
||||
loadspritegfx ANIM_TAG_NOISE_LINE
|
||||
createvisualtask sub_8158E9C, 2, ANIM_ATTACKER, 255
|
||||
createvisualtask SoundTask_PlayDoubleCry, 2, ANIM_ATTACKER, 255
|
||||
call RoarEffect
|
||||
delay 10
|
||||
createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 1, 0, 9, 1
|
||||
@ -5012,7 +5012,7 @@ 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
|
||||
@ -5174,7 +5174,7 @@ Move_FAINT_ATTACK:
|
||||
delay 1
|
||||
setarg 7, 0x1000
|
||||
delay 32
|
||||
createvisualtask sub_8113888, 2
|
||||
createvisualtask AnimTask_InitAttackerFadeFromInvisible, 2
|
||||
monbg ANIM_ATTACKER
|
||||
createvisualtask AnimTask_AttackerFadeFromInvisible, 2, 1
|
||||
waitforvisualfinish
|
||||
@ -5350,7 +5350,7 @@ 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
|
||||
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
|
||||
@ -5399,14 +5399,14 @@ Move_AURORA_BEAM:
|
||||
waitbgfadein
|
||||
playsewithpan SE_W062, SOUND_PAN_ATTACKER
|
||||
setarg 7, 0
|
||||
createvisualtask sub_8107528, 10, 130
|
||||
createvisualtask AnimTask_RotateAuroraRingColors, 10, 130
|
||||
call AuroraBeamCreateRings
|
||||
createvisualtask AnimTask_ShakeMon2, 5, ANIM_TARGET, 1, 0, 17, 1
|
||||
call AuroraBeamCreateRings
|
||||
call AuroraBeamCreateRings
|
||||
call AuroraBeamCreateRings
|
||||
setarg 7, -1
|
||||
createsoundtask sub_8158C58, SE_W062B, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 3, 6, 0, 10
|
||||
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 AuroraBeamCreateRings
|
||||
call AuroraBeamCreateRings
|
||||
@ -6872,7 +6872,7 @@ Move_ANCIENT_POWER:
|
||||
loadspritegfx ANIM_TAG_IMPACT
|
||||
monbg ANIM_DEF_PARTNER
|
||||
setalpha 12, 8
|
||||
createsprite gBattleAnimSpriteTemplate_85972D8, ANIM_ATTACKER, 2, 4, 1, 10, 1
|
||||
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
|
||||
@ -7130,7 +7130,7 @@ 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
|
||||
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
|
||||
@ -7176,7 +7176,7 @@ Move_PSYWAVE:
|
||||
playsewithpan SE_W060, SOUND_PAN_ATTACKER
|
||||
call SetPsychicBackground
|
||||
createvisualtask AnimTask_StartSinAnimTimer, 5, 100
|
||||
createsoundtask sub_8158C58, SE_W100, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 2, 9, 0, 10
|
||||
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)
|
||||
@ -7293,14 +7293,14 @@ Move_METAL_CLAW:
|
||||
playsewithpan SE_W013, SOUND_PAN_TARGET
|
||||
createsprite gClawSlashSpriteTemplate, ANIM_TARGET, 2, -10, -10, 0
|
||||
createsprite gClawSlashSpriteTemplate, ANIM_TARGET, 2, -10, 10, 0
|
||||
createsprite gBattleAnimSpriteTemplate_85972D8, ANIM_ATTACKER, 2, -4, 1, 10, 3, 1
|
||||
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 gClawSlashSpriteTemplate, ANIM_TARGET, 2, 10, -10, 1
|
||||
createsprite gClawSlashSpriteTemplate, ANIM_TARGET, 2, 10, 10, 1
|
||||
createsprite gBattleAnimSpriteTemplate_85972D8, ANIM_ATTACKER, 2, -4, 1, 10, 3, 1
|
||||
createsprite gShakeMonOrTerrainSpriteTemplate, ANIM_ATTACKER, 2, -4, 1, 10, 3, 1
|
||||
waitforvisualfinish
|
||||
end
|
||||
|
||||
@ -7353,7 +7353,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
|
||||
@ -7638,7 +7638,7 @@ 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 gCurseNailSpriteTemplate, ANIM_ATTACKER, 2
|
||||
@ -7741,12 +7741,12 @@ 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 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
|
||||
HealBellRing:
|
||||
createvisualtask sub_8116664, 10, 4, 3, 8, 0, RGB(12, 24, 30)
|
||||
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
|
||||
@ -7775,7 +7775,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
|
||||
@ -8026,7 +8026,7 @@ 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
|
||||
@ -8047,7 +8047,7 @@ Move_TRI_ATTACK:
|
||||
delay 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 AnimTask_InvertScreenColor, 2, 257, 257, 257
|
||||
@ -8058,7 +8058,7 @@ Move_TRI_ATTACK:
|
||||
delay 1
|
||||
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 AnimTask_InvertScreenColor, 2, 257, 257, 257
|
||||
waitforvisualfinish
|
||||
@ -8075,7 +8075,7 @@ 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
|
||||
createvisualtask SoundTask_AdjustPanningVar, 2, SOUND_PAN_ATTACKER, SOUND_PAN_ATTACKER, 1, 0
|
||||
createsprite gWillOWispOrbSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 0
|
||||
delay 3
|
||||
createsprite gWillOWispOrbSpriteTemplate, ANIM_ATTACKER, 3, 0, 0, 1
|
||||
@ -8084,7 +8084,7 @@ Move_WILL_O_WISP:
|
||||
delay 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
|
||||
@ -8363,7 +8363,7 @@ 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 AnimTask_FlashAnimTagWithColor, 2, ANIM_TAG_ORBS, 1, 12, RGB(31, 0, 0), 16, 0, 0
|
||||
call HyperBeamOrbs
|
||||
@ -8501,11 +8501,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
|
||||
@ -8637,7 +8637,7 @@ Move_DRAGON_CLAW:
|
||||
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 gBattleAnimSpriteTemplate_85972D8, ANIM_ATTACKER, 2, -4, 1, 10, 3, 1
|
||||
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 gFireSpinSpriteTemplate, ANIM_ATTACKER, 2, 0, 33, 576, 20, 8, 42, ANIM_ATTACKER
|
||||
@ -8650,7 +8650,7 @@ Move_DRAGON_CLAW:
|
||||
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 gBattleAnimSpriteTemplate_85972D8, ANIM_ATTACKER, 2, -4, 1, 10, 3, 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 gFireSpinSpriteTemplate, ANIM_ATTACKER, 2, 0, 28, 528, 30, 13, 50, ANIM_ATTACKER
|
||||
@ -9162,7 +9162,7 @@ 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
|
||||
@ -9201,7 +9201,7 @@ SilverWindContinue:
|
||||
delay 0
|
||||
restorebg
|
||||
waitbgfadeout
|
||||
createvisualtask sub_8116664, 10, 1, 0, 4, 0, RGB_BLACK
|
||||
createvisualtask AnimTask_BlendBattleAnimPalExclude, 10, ANIM_TARGET, 0, 4, 0, RGB_BLACK
|
||||
setarg 7, -1
|
||||
waitbgfadein
|
||||
end
|
||||
@ -9286,14 +9286,14 @@ 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
|
||||
@ -9339,12 +9339,12 @@ Move_OVERHEAT:
|
||||
delay 8
|
||||
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
|
||||
@ -9352,11 +9352,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
|
||||
|
||||
@ -9426,11 +9426,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
|
||||
@ -9572,10 +9572,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
|
||||
@ -9583,7 +9583,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
|
||||
@ -10543,15 +10543,15 @@ 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
|
||||
createvisualtask AnimTask_SetAnimAttackerAndTargetForEffectTgt, 2
|
||||
call SnatchMoveTrySwapFromSubstitute
|
||||
delay 1
|
||||
createvisualtask AnimTask_SwayMon, 2, 0, 5, 5120, 4, ANIM_TARGET
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
@ -143,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);
|
||||
|
@ -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)
|
||||
|
@ -78,6 +78,7 @@ void AnimThoughtBubble(struct Sprite *);
|
||||
void AnimMetronomeFinger(struct Sprite *);
|
||||
void AnimFollowMeFinger(struct Sprite *);
|
||||
void AnimTauntFinger(struct Sprite *);
|
||||
static void AnimTask_MoonlightEndFadeStep(u8 taskId);
|
||||
static void AnimMovePowderParticleStep(struct Sprite *);
|
||||
static void AnimSolarbeamSmallOrbStep(struct Sprite *);
|
||||
static void AnimAbsorptionOrbStep(struct Sprite *);
|
||||
@ -4987,10 +4988,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 +5011,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_MoonlightEndFadeStep;
|
||||
gTasks[taskId].func(taskId);
|
||||
}
|
||||
|
||||
void AnimTask_FadeScreenBlueStep(u8 taskId)
|
||||
static void AnimTask_MoonlightEndFadeStep(u8 taskId)
|
||||
{
|
||||
struct Task* task = &gTasks[taskId];
|
||||
switch (task->data[0])
|
||||
|
@ -3010,12 +3010,12 @@ void AnimTask_LoadMusicNotesPals(u8 taskId)
|
||||
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);
|
||||
gMonSpritesGfxPtr->buffer = AllocZeroed(0x2000);
|
||||
LZDecompressWram(gBattleAnimSpritePal_MusicNotes2, gMonSpritesGfxPtr->buffer);
|
||||
for (i = 0; i < NUM_MUSIC_NOTE_PAL_TAGS; i++)
|
||||
LoadPalette(&gMonSpritesGfxPtr->field_17C[i * 32], (u16)((paletteNums[i] << 4) + 0x100), 32);
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@ static void ReverseVerticalDipDirection(struct Sprite* sprite);
|
||||
static void SlideMonToOriginalPos(struct Sprite *sprite);
|
||||
static void SlideMonToOriginalPosStep(struct Sprite *sprite);
|
||||
static void SlideMonToOffset(struct Sprite *sprite);
|
||||
static void sub_80D5B48(struct Sprite *sprite);
|
||||
static void SlideMonToOffsetAndBack(struct Sprite *sprite);
|
||||
static void sub_80D5C20(struct Sprite *sprite);
|
||||
void AnimTask_WindUpLungePart1(u8 taskId);
|
||||
void AnimTask_WindUpLungePart2(u8 taskId);
|
||||
@ -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.
|
||||
@ -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] == ANIM_ATTACKER)
|
||||
{
|
||||
battlerId = gBattleAnimAttacker;
|
||||
}
|
||||
else
|
||||
{
|
||||
battlerId = gBattleAnimTarget;
|
||||
}
|
||||
|
||||
spriteId = gBattlerSpriteIds[battlerId];
|
||||
if (GetBattlerSide(battlerId))
|
||||
{
|
||||
|
@ -34,7 +34,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);
|
||||
@ -1594,7 +1594,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;
|
||||
@ -1663,10 +1664,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;
|
||||
@ -1713,7 +1714,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]);
|
||||
|
||||
@ -1723,7 +1725,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)
|
||||
@ -2033,20 +2035,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);
|
||||
@ -2056,20 +2058,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);
|
||||
|
@ -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];
|
||||
@ -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);
|
||||
@ -275,7 +275,7 @@ void SoundTask_WaitForCry(u8 taskId)
|
||||
}
|
||||
|
||||
// task start
|
||||
void sub_81590B8(u8 taskId)
|
||||
void SoundTask_PlayCryWithEcho(u8 taskId)
|
||||
{
|
||||
u16 species;
|
||||
s8 pan;
|
||||
@ -350,7 +350,9 @@ void SoundTask_PlaySE2WithPanning(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];
|
||||
@ -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);
|
||||
}
|
||||
|
@ -2010,7 +2010,7 @@ void AnimTask_IsAttackerBehindSubstitute(u8 taskId)
|
||||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
|
||||
void AnimTask_TargetToEffectBattler(u8 taskId)
|
||||
void AnimTask_SetTargetToEffectBattler(u8 taskId)
|
||||
{
|
||||
gBattleAnimTarget = gEffectBattler;
|
||||
DestroyAnimVisualTask(taskId);
|
||||
|
@ -55,7 +55,7 @@ void AnimTask_BlendBattleAnimPal(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:
|
||||
@ -908,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;
|
||||
@ -944,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;
|
||||
@ -971,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;
|
||||
@ -1012,7 +1011,7 @@ void AnimTask_IsContest(u8 taskId)
|
||||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
|
||||
void sub_8117E94(u8 taskId)
|
||||
void AnimTask_SetAnimAttackerAndTargetForEffectTgt(u8 taskId)
|
||||
{
|
||||
gBattleAnimAttacker = gBattlerTarget;
|
||||
gBattleAnimTarget = gEffectBattler;
|
||||
@ -1035,7 +1034,7 @@ void AnimTask_SetAnimTargetToBattlerTarget(u8 taskId)
|
||||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
|
||||
void sub_8117F30(u8 taskId)
|
||||
void AnimTask_SetAnimAttackerAndTargetForEffectAtk(u8 taskId)
|
||||
{
|
||||
gBattleAnimAttacker = gBattlerAttacker;
|
||||
gBattleAnimTarget = gEffectBattler;
|
||||
|
@ -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);
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
static void AnimMegahornHorn(struct Sprite *);
|
||||
static void AnimLeechLifeNeedle(struct Sprite *);
|
||||
void AnimTranslateWebThread(struct Sprite *);
|
||||
static void AnimTranslateWebThread(struct Sprite *);
|
||||
static void AnimStringWrap(struct Sprite *);
|
||||
void sub_811067C(struct Sprite *);
|
||||
void AnimTranslateStinger(struct Sprite *);
|
||||
@ -254,7 +254,7 @@ static void AnimLeechLifeNeedle(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;
|
||||
|
20
src/dark.c
20
src/dark.c
@ -256,7 +256,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)
|
||||
@ -901,7 +901,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);
|
||||
@ -928,7 +928,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;
|
||||
@ -938,10 +938,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:
|
||||
@ -980,13 +980,13 @@ void AnimTask_SetGreyscaleOrOriginalPal(u8 taskId)
|
||||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
|
||||
void sub_8114960(u8 taskId)
|
||||
void GetIsDoomDesireHitTurn(u8 taskId)
|
||||
{
|
||||
if (gAnimMoveTurn < 2)
|
||||
gBattleAnimArgs[ARG_RET_ID] = 0;
|
||||
gBattleAnimArgs[ARG_RET_ID] = FALSE;
|
||||
|
||||
if (gAnimMoveTurn == 2)
|
||||
gBattleAnimArgs[ARG_RET_ID] = 1;
|
||||
gBattleAnimArgs[ARG_RET_ID] = TRUE;
|
||||
|
||||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
|
@ -324,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];
|
||||
|
22
src/fight.c
22
src/fight.c
@ -16,8 +16,8 @@ void sub_810D1B4(struct Sprite *);
|
||||
static void AnimSpinningKickOrPunch(struct Sprite *);
|
||||
static void AnimStompFoot(struct Sprite *);
|
||||
static void AnimDizzyPunchDuck(struct Sprite *);
|
||||
void sub_810D40C(struct Sprite *);
|
||||
void sub_810D4F4(struct Sprite *);
|
||||
static void AnimBrickBreakWall(struct Sprite *);
|
||||
static void AnimBrickBreakWallShard(struct Sprite *);
|
||||
static void AnimSuperpowerOrb(struct Sprite *);
|
||||
static void AnimSuperpowerRock(struct Sprite *);
|
||||
static void AnimSuperpowerFireball(struct Sprite *);
|
||||
@ -231,7 +231,7 @@ const struct SpriteTemplate gDizzyPunchDuckSpriteTemplate =
|
||||
.callback = AnimDizzyPunchDuck,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gUnknown_08595F90 =
|
||||
const struct SpriteTemplate gBrickBreakWallSpriteTemplate =
|
||||
{
|
||||
.tileTag = ANIM_TAG_BLUE_LIGHT_WALL,
|
||||
.paletteTag = ANIM_TAG_BLUE_LIGHT_WALL,
|
||||
@ -239,10 +239,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,
|
||||
@ -250,7 +250,7 @@ const struct SpriteTemplate gUnknown_08595FA8 =
|
||||
.anims = gDummySpriteAnimTable,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = sub_810D4F4,
|
||||
.callback = AnimBrickBreakWallShard,
|
||||
};
|
||||
|
||||
const union AffineAnimCmd gUnknown_08595FC0[] =
|
||||
@ -691,9 +691,10 @@ static void AnimDizzyPunchDuck(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);
|
||||
@ -744,9 +745,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];
|
||||
|
46
src/fire.c
46
src/fire.c
@ -446,12 +446,15 @@ const struct SpriteTemplate gWillOWispFireSpriteTemplate =
|
||||
.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,
|
||||
};
|
||||
@ -1131,7 +1134,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
|
||||
@ -1288,33 +1291,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;
|
||||
|
@ -250,7 +250,7 @@ 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)
|
||||
@ -941,7 +941,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;
|
||||
|
@ -737,12 +737,12 @@ void AnimTask_IsPowerOver99(u8 taskId)
|
||||
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])];
|
||||
|
174
src/normal.c
174
src/normal.c
@ -11,7 +11,7 @@ void AnimSimplePaletteBlend(struct Sprite *);
|
||||
u32 UnpackSelectedBattleAnimPalettes(s16);
|
||||
void sub_81158A4(struct Sprite *);
|
||||
void sub_81159B4(struct Sprite *);
|
||||
void sub_81160A4(struct Sprite *);
|
||||
static void AnimShakeMonOrBattleTerrain(struct Sprite *);
|
||||
static void AnimBasicHitSplat(struct Sprite *);
|
||||
void sub_8116420(struct Sprite *);
|
||||
static void AnimHitSplatRandom(struct Sprite *);
|
||||
@ -22,12 +22,12 @@ static void AnimConfusionDuckStep(struct Sprite *);
|
||||
static void AnimSimplePaletteBlendStep(struct Sprite *);
|
||||
static void sub_81158F8(struct Sprite *);
|
||||
static void sub_8115984(struct Sprite *);
|
||||
static void BlendColorInCycle(u8, u8, u8);
|
||||
static void AnimTask_BlendColorInCycleLoop(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 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 sub_8115E00(u8);
|
||||
static void sub_8115EB8(u8);
|
||||
static void sub_8116148(struct Sprite *);
|
||||
@ -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,7 +127,7 @@ const struct SpriteTemplate gBattleAnimSpriteTemplate_85972D8 =
|
||||
.anims = gDummySpriteAnimTable,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = sub_81160A4,
|
||||
.callback = AnimShakeMonOrBattleTerrain,
|
||||
};
|
||||
|
||||
const union AffineAnimCmd gUnknown_085972F0[] =
|
||||
@ -416,14 +416,17 @@ void sub_81159B4(struct Sprite *sprite)
|
||||
sprite->callback(sprite);
|
||||
}
|
||||
|
||||
// Task data for AnimTask_BlendColorCycle
|
||||
#define tPalSelector data[0]
|
||||
// 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
|
||||
@ -436,11 +439,11 @@ void AnimTask_BlendColorCycle(u8 taskId)
|
||||
gTasks[taskId].tTargetBlendY = gBattleAnimArgs[4];
|
||||
gTasks[taskId].tBlendColor = gBattleAnimArgs[5];
|
||||
gTasks[taskId].tRestoreBlend = FALSE;
|
||||
BlendColorInCycle(taskId, 0, gTasks[taskId].tTargetBlendY);
|
||||
gTasks[taskId].func = AnimTask_BlendColorInCycleLoop;
|
||||
BlendColorCycle(taskId, 0, gTasks[taskId].tTargetBlendY);
|
||||
gTasks[taskId].func = AnimTask_BlendColorCycleLoop;
|
||||
}
|
||||
|
||||
static void BlendColorInCycle(u8 taskId, u8 startBlendAmount, u8 targetBlendAmount)
|
||||
static void BlendColorCycle(u8 taskId, u8 startBlendAmount, u8 targetBlendAmount)
|
||||
{
|
||||
u32 selectedPalettes = UnpackSelectedBattleAnimPalettes(gTasks[taskId].tPalSelector);
|
||||
BeginNormalPaletteFade(
|
||||
@ -454,14 +457,14 @@ static void BlendColorInCycle(u8 taskId, u8 startBlendAmount, u8 targetBlendAmou
|
||||
gTasks[taskId].tRestoreBlend ^= 1;
|
||||
}
|
||||
|
||||
static void AnimTask_BlendColorInCycleLoop(u8 taskId)
|
||||
static void AnimTask_BlendColorCycleLoop(u8 taskId)
|
||||
{
|
||||
u8 startBlendAmount, targetBlendAmount;
|
||||
if (!gPaletteFade.active)
|
||||
{
|
||||
if (gTasks[taskId].tNumBlends > 0)
|
||||
{
|
||||
if (gTasks[taskId].tRestoreBlend == FALSE)
|
||||
if (!gTasks[taskId].tRestoreBlend)
|
||||
{
|
||||
// Blend to designated color
|
||||
startBlendAmount = gTasks[taskId].tInitialBlendY;
|
||||
@ -477,7 +480,7 @@ static void AnimTask_BlendColorInCycleLoop(u8 taskId)
|
||||
if (gTasks[taskId].tNumBlends == 1)
|
||||
targetBlendAmount = 0;
|
||||
|
||||
BlendColorInCycle(taskId, startBlendAmount, targetBlendAmount);
|
||||
BlendColorCycle(taskId, startBlendAmount, targetBlendAmount);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -486,26 +489,19 @@ static void AnimTask_BlendColorInCycleLoop(u8 taskId)
|
||||
}
|
||||
}
|
||||
|
||||
#undef tPalSelector
|
||||
#undef tDelay
|
||||
#undef tNumBlends
|
||||
#undef tInitialBlendY
|
||||
#undef tTargetBlendY
|
||||
#undef tBlendColor
|
||||
#undef tFirstBlendDone
|
||||
|
||||
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++)
|
||||
{
|
||||
@ -516,48 +512,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
|
||||
{
|
||||
@ -566,58 +564,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
|
||||
{
|
||||
@ -626,6 +627,17 @@ static void sub_8115D2C(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)
|
||||
{
|
||||
@ -771,7 +783,7 @@ void sub_8115F94(u8 taskId)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_81160A4(struct Sprite *sprite)
|
||||
static void AnimShakeMonOrBattleTerrain(struct Sprite *sprite)
|
||||
{
|
||||
u16 var0;
|
||||
|
||||
|
@ -744,7 +744,7 @@ static void sub_810F898(u8 taskId)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_810F940(u8 taskId)
|
||||
void AnimTask_ImprisonOrbs(u8 taskId)
|
||||
{
|
||||
u16 var0, var1;
|
||||
|
||||
|
@ -836,7 +836,7 @@ void AnimTask_GetSeismicTossDamageLevel(u8 taskId)
|
||||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
|
||||
void sub_811152C(u8 taskId)
|
||||
void AnimTask_MoveSeismicTossBg(u8 taskId)
|
||||
{
|
||||
if (gTasks[taskId].data[0] == 0)
|
||||
{
|
||||
@ -856,7 +856,7 @@ void sub_811152C(u8 taskId)
|
||||
gTasks[taskId].data[0]++;
|
||||
}
|
||||
|
||||
void sub_8111590(u8 taskId)
|
||||
void AnimTask_SeismicTossBgAccelerateDownAtEnd(u8 taskId)
|
||||
{
|
||||
if (gTasks[taskId].data[0] == 0)
|
||||
{
|
||||
|
@ -621,7 +621,8 @@ 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;
|
||||
|
Loading…
Reference in New Issue
Block a user