mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-22 07:02:17 +13:00
Insert Crystal audio engine and music
most credit goes to Sanqui
This commit is contained in:
parent
832c28eaea
commit
87eed68710
586 changed files with 193763 additions and 6447 deletions
|
|
@ -200,7 +200,7 @@ PlayAnimation:
|
|||
push hl
|
||||
push de
|
||||
call GetMoveSound
|
||||
call PlaySound
|
||||
call nc, AnimPlaySFX
|
||||
pop de
|
||||
pop hl
|
||||
.skipPlayingSound
|
||||
|
|
@ -256,6 +256,15 @@ PlayAnimation:
|
|||
.AnimationOver
|
||||
ret
|
||||
|
||||
AnimPlaySFX:
|
||||
push de
|
||||
ld e, a
|
||||
xor a
|
||||
ld d, a
|
||||
call PlaySFX
|
||||
pop de
|
||||
ret
|
||||
|
||||
LoadSubanimation:
|
||||
ld a,[wSubAnimAddrPtr + 1]
|
||||
ld h,a
|
||||
|
|
@ -551,7 +560,7 @@ PlaySubanimation:
|
|||
cp a,$FF
|
||||
jr z,.skipPlayingSound
|
||||
call GetMoveSound
|
||||
call PlaySound
|
||||
call nc, AnimPlaySFX
|
||||
.skipPlayingSound
|
||||
ld hl,wOAMBuffer ; base address of OAM buffer
|
||||
ld a,l
|
||||
|
|
@ -2328,18 +2337,28 @@ GetMoveSound:
|
|||
.next
|
||||
ld a,[wEnemyMonSpecies]
|
||||
.Continue
|
||||
push hl
|
||||
call GetCryData
|
||||
ld b,a
|
||||
pop hl
|
||||
ld a,[wFrequencyModifier]
|
||||
add [hl]
|
||||
ld [wFrequencyModifier],a
|
||||
inc hl
|
||||
ld a,[wTempoModifier]
|
||||
add [hl]
|
||||
ld [wTempoModifier],a
|
||||
jr .done
|
||||
push af
|
||||
ld a, 1
|
||||
ld [wSFXDontWait], a
|
||||
pop af
|
||||
call PlayCry
|
||||
xor a
|
||||
ld [wSFXDontWait], a
|
||||
ld a, b
|
||||
scf
|
||||
ret
|
||||
;push hl
|
||||
;call GetCryData
|
||||
;ld b,a
|
||||
;pop hl
|
||||
;ld a,[wFrequencyModifier]
|
||||
;add [hl]
|
||||
;ld [wFrequencyModifier],a
|
||||
;inc hl
|
||||
;ld a,[wTempoModifier]
|
||||
;add [hl]
|
||||
;ld [wTempoModifier],a
|
||||
;jr .done
|
||||
.NotCryMove
|
||||
ld a,[hli]
|
||||
ld [wFrequencyModifier],a
|
||||
|
|
@ -3011,24 +3030,27 @@ PlayApplyingAttackSound:
|
|||
; 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, [wDamageMultipliers]
|
||||
ld a, [wDamageMultipliers] ; effectiveness
|
||||
and $7f
|
||||
ret z
|
||||
cp 10
|
||||
ld a, $20
|
||||
ld b, $30
|
||||
ld c, SFX_DAMAGE
|
||||
ld c, GSSFX_DAMAGE ; SFX_DAMAGE
|
||||
jr z, .playSound
|
||||
ld a, $e0
|
||||
ld b, $ff
|
||||
ld c, SFX_SUPER_EFFECTIVE
|
||||
ld c, GSSFX_SUPER_EFFECTIVE ; SFX_SUPER_EFFECTIVE
|
||||
jr nc, .playSound
|
||||
ld a, $50
|
||||
ld b, $1
|
||||
ld c, SFX_NOT_VERY_EFFECTIVE
|
||||
ld c, GSSFX_NOT_VERY_EFFECTIVE ; SFX_NOT_VERY_EFFECTIVE
|
||||
.playSound
|
||||
ld [wFrequencyModifier], a
|
||||
ld a, b
|
||||
ld [wTempoModifier], a
|
||||
ld a, c
|
||||
jp PlaySound
|
||||
jp PlaySound
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue