mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-22 15:12:18 +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
|
|
@ -771,15 +771,28 @@ HandleBlackOut::
|
|||
jp SpecialEnterMap
|
||||
|
||||
StopMusic::
|
||||
ld [wAudioFadeOutControl], a
|
||||
ld a, $ff
|
||||
ld [wNewSoundID], a
|
||||
call PlaySound
|
||||
.wait
|
||||
ld a, [wAudioFadeOutControl]
|
||||
and a
|
||||
jr nz, .wait
|
||||
jp StopAllSounds
|
||||
xor a
|
||||
ld [MusicFadeID], a
|
||||
ld a, 1
|
||||
ld [MusicFade], a
|
||||
.wait0
|
||||
ld a, [MusicFadeCount]
|
||||
and a
|
||||
jr z, .wait0
|
||||
.wait1
|
||||
ld a, [MusicFadeCount]
|
||||
and a
|
||||
jr nz, .wait1
|
||||
ret
|
||||
; ld [wAudioFadeOutControl], a
|
||||
; ld a, $ff
|
||||
; ld [wNewSoundID], a
|
||||
; call PlaySound
|
||||
;.wait
|
||||
; ld a, [wAudioFadeOutControl]
|
||||
; and a
|
||||
; jr nz, .wait
|
||||
; jp StopAllSounds
|
||||
|
||||
HandleFlyWarpOrDungeonWarp::
|
||||
call UpdateSprites
|
||||
|
|
@ -1244,9 +1257,15 @@ CollisionCheckOnLand::
|
|||
call CheckTilePassable
|
||||
jr nc,.noCollision
|
||||
.collision
|
||||
ld a,[wChannelSoundIDs + Ch4]
|
||||
cp SFX_COLLISION ; check if collision sound is already playing
|
||||
jr z,.setCarry
|
||||
;ld a,[wChannelSoundIDs + Ch4]
|
||||
;cp SFX_COLLISION ; check if collision sound is already playing
|
||||
; curSFX is not cleared for some reason.
|
||||
|
||||
; ch5 on?
|
||||
ld hl, Channel5 + Channel1Flags - Channel1
|
||||
bit 0, [hl]
|
||||
|
||||
jr nz,.setCarry
|
||||
ld a,SFX_COLLISION
|
||||
call PlaySound ; play collision sound (if it's not already playing)
|
||||
.setCarry
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue