sync engine code with pokeyellow

This commit is contained in:
YamaArashi 2016-06-11 21:30:05 -07:00
parent a51037eeee
commit fd2235e678
47 changed files with 385 additions and 350 deletions

View file

@ -383,29 +383,29 @@ MoveAnimation:
call SetAnimationPalette
ld a,[wAnimationID]
and a
jr z,.AnimationFinished
jr z, .animationFinished
; if throwing a Poké Ball, skip the regular animation code
cp a,TOSS_ANIM
jr nz,.MoveAnimation
ld de,.AnimationFinished
jr nz, .moveAnimation
ld de, .animationFinished
push de
jp TossBallAnimation
.MoveAnimation
.moveAnimation
; check if battle animations are disabled in the options
ld a,[wOptions]
bit 7,a
jr nz,.AnimationsDisabled
jr nz, .animationsDisabled
call ShareMoveAnimations
call PlayAnimation
jr .next4
.AnimationsDisabled
.animationsDisabled
ld c,30
call DelayFrames
.next4
call PlayApplyingAttackAnimation ; shake the screen or flash the pic in and out (to show damage)
.AnimationFinished
.animationFinished
call WaitForSoundToFinish
xor a
ld [wSubAnimSubEntryAddr],a
@ -431,13 +431,13 @@ ShareMoveAnimations:
cp a,AMNESIA
ld b,CONF_ANIM
jr z,.Replace
jr z, .replaceAnim
cp a,REST
ld b,SLP_ANIM
ret nz
.Replace
.replaceAnim
ld a,b
ld [wAnimationID],a
ret
@ -1845,13 +1845,13 @@ AnimationMinimizeMon:
ld hl, wTempPic
push hl
xor a
ld bc, $310
ld bc, 7 * 7 * $10
call FillMemory
pop hl
ld de, $194
add hl, de
ld de, MinimizedMonSprite
ld c, $5
ld c, MinimizedMonSpriteEnd - MinimizedMonSprite
.loop
ld a, [de]
ld [hli], a
@ -1865,6 +1865,7 @@ AnimationMinimizeMon:
MinimizedMonSprite:
INCBIN "gfx/minimized_mon_sprite.1bpp"
MinimizedMonSpriteEnd:
AnimationSlideMonDownAndHide:
; Slides the mon's sprite down and disappears. Used in Acid Armor.
@ -2308,7 +2309,6 @@ GetMoveSoundB:
ld b, a
ret
; get the sound of the (move id - 1) in a
GetMoveSound:
ld hl,MoveSoundTable
ld e,a
@ -2363,6 +2363,7 @@ IsCryMove:
ret
MoveSoundTable:
; ID, pitch mod, tempo mod
db SFX_POUND, $00,$80 ; POUND
db SFX_BATTLE_0C, $10,$80 ; KARATE_CHOP
db SFX_DOUBLESLAP, $00,$80 ; DOUBLESLAP