Insert Crystal audio engine and music

most credit goes to Sanqui
This commit is contained in:
dannye 2017-05-07 15:30:08 -05:00
parent 832c28eaea
commit 87eed68710
586 changed files with 193763 additions and 6447 deletions

View file

@ -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