diff options
Diffstat (limited to 'engine/battle/animations.asm')
-rwxr-xr-x | engine/battle/animations.asm | 66 |
1 files changed, 35 insertions, 31 deletions
diff --git a/engine/battle/animations.asm b/engine/battle/animations.asm index d4cebb44..dc08e0e1 100755 --- a/engine/battle/animations.asm +++ b/engine/battle/animations.asm @@ -407,7 +407,7 @@ MoveAnimation: ; 78d5e (1e:4d5e) ld c,30 call DelayFrames .next4 - call Func_78dbd ; reload pic and flash the pic in and out (to show damage) + call PlayApplyingAttackAnimation ; shake the screen or flash the pic in and out (to show damage) .AnimationFinished call WaitForSoundToFinish xor a @@ -445,56 +445,58 @@ ShareMoveAnimations: ; 78da6 (1e:4da6) ld [W_ANIMATIONID],a ret -Func_78dbd: ; 78dbd (1e:4dbd) - ld a,[wcc5b] +PlayApplyingAttackAnimation: ; 78dbd (1e:4dbd) +; Generic animation that shows after the move's individual animation +; Different animation depending on whether the move has an additional effect and on whose turn it is + ld a,[wAnimationType] and a ret z dec a add a ld c,a ld b,0 - ld hl,PointerTable_78dcf + ld hl,AnimationTypePointerTable add hl,bc ld a,[hli] ld h,[hl] ld l,a jp [hl] -PointerTable_78dcf: ; 78dcf (1e:4dcf) - dw Func_78ddb - dw Func_78de3 - dw Func_78deb - dw Func_78df0 - dw Func_78df6 - dw Func_78dfe +AnimationTypePointerTable: ; 78dcf (1e:4dcf) + dw ShakeScreenVertically ; enemy mon has used a damaging move without a side effect + dw ShakeScreenHorizontallyHeavy ; enemy mon has used a damaging move with a side effect + dw ShakeScreenHorizontallySlow ; enemy mon has used a non-damaging move + dw BlinkEnemyMonSprite ; player mon has used a damaging move without a side effect + dw ShakeScreenHorizontallyLight ; player mon has used a damaging move with a side effect + dw ShakeScreenHorizontallySlow2 ; player mon has used a non-damaging move -Func_78ddb: ; 78ddb (1e:4ddb) - call Func_79e6a +ShakeScreenVertically: ; 78ddb (1e:4ddb) + call PlayApplyingAttackSound ld b, $8 - jp Func_79209 + jp AnimationShakeScreenVertically -Func_78de3: ; 78de3 (1e:4de3) - call Func_79e6a +ShakeScreenHorizontallyHeavy: ; 78de3 (1e:4de3) + call PlayApplyingAttackSound ld b, $8 - jp Func_79210 + jp AnimationShakeScreenHorizontallyFast -Func_78deb: ; 78deb (1e:4deb) +ShakeScreenHorizontallySlow: ; 78deb (1e:4deb) ld bc, $602 - jr Func_78e01 + jr AnimationShakeScreenHorizontallySlow -Func_78df0: ; 78df0 (1e:4df0) - call Func_79e6a +BlinkEnemyMonSprite: ; 78df0 (1e:4df0) + call PlayApplyingAttackSound jp AnimationBlinkEnemyMon -Func_78df6: ; 78df6 (1e:4df6) - call Func_79e6a +ShakeScreenHorizontallyLight: ; 78df6 (1e:4df6) + call PlayApplyingAttackSound ld b, $2 - jp Func_79210 + jp AnimationShakeScreenHorizontallyFast -Func_78dfe: ; 78dfe (1e:4dfe) +ShakeScreenHorizontallySlow2: ; 78dfe (1e:4dfe) ld bc, $302 -Func_78e01: ; 78e01 (1e:4e01) +AnimationShakeScreenHorizontallySlow: ; 78e01 (1e:4e01) push bc push bc .asm_78e03 @@ -516,7 +518,7 @@ Func_78e01: ; 78e01 (1e:4e01) jr nz, .asm_78e11 pop bc dec c - jr nz, Func_78e01 + jr nz, AnimationShakeScreenHorizontallySlow ret Func_78e23: ; 78e23 (1e:4e23) @@ -1225,14 +1227,14 @@ Func_791fc: ; 791fc (1e:51fc) ld b, $5 -Func_79209: ; 79209 (1e:5209) +AnimationShakeScreenVertically: ; 79209 (1e:5209) predef_jump Func_480ff AnimationShakeScreen: ; 7920e (1e:520e) ; Shakes the screen for a while. Used in Earthquake/Fissure/etc. animations. ld b, $8 -Func_79210: ; 79210 (1e:5210) +AnimationShakeScreenHorizontallyFast: ; 79210 (1e:5210) predef_jump Func_48125 AnimationWaterDropletsEverywhere: ; 79215 (1e:5215) @@ -2929,9 +2931,11 @@ TossBallAnimation: ; 79e16 (1e:5e16) ld [W_ANIMATIONID],a jp PlayAnimation -Func_79e6a: ; 79e6a (1e:5e6a) +PlayApplyingAttackSound: ; 79e6a (1e:5e6a) +; play a different sound depending if move is not very effective, neutral, or super-effective +; don't play any sound at all if move is ineffective call WaitForSoundToFinish - ld a, [wd05b] + ld a, [wDamageMultipliers] and $7f ret z cp $a |