mirror of
https://github.com/thornAvery/kep-hack.git
synced 2025-11-13 08:44:49 +13:00
Fix collision sfx during surfing
This commit is contained in:
parent
735d5bd4c2
commit
c52ab8fb90
|
|
@ -771,19 +771,19 @@ HandleBlackOut::
|
||||||
jp SpecialEnterMap
|
jp SpecialEnterMap
|
||||||
|
|
||||||
StopMusic::
|
StopMusic::
|
||||||
xor a
|
xor a
|
||||||
ld [wMusicFadeID], a
|
ld [wMusicFadeID], a
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [wMusicFade], a
|
ld [wMusicFade], a
|
||||||
.wait0
|
.wait0
|
||||||
ld a, [wMusicFadeCount]
|
ld a, [wMusicFadeCount]
|
||||||
and a
|
and a
|
||||||
jr z, .wait0
|
jr z, .wait0
|
||||||
.wait1
|
.wait1
|
||||||
ld a, [wMusicFadeCount]
|
ld a, [wMusicFadeCount]
|
||||||
and a
|
and a
|
||||||
jr nz, .wait1
|
jr nz, .wait1
|
||||||
ret
|
ret
|
||||||
; ld [wAudioFadeOutControl], a
|
; ld [wAudioFadeOutControl], a
|
||||||
; ld a, $ff
|
; ld a, $ff
|
||||||
; ld [wNewSoundID], a
|
; ld [wNewSoundID], a
|
||||||
|
|
@ -1261,9 +1261,9 @@ CollisionCheckOnLand::
|
||||||
;cp SFX_COLLISION ; check if collision sound is already playing
|
;cp SFX_COLLISION ; check if collision sound is already playing
|
||||||
; curSFX is not cleared for some reason.
|
; curSFX is not cleared for some reason.
|
||||||
|
|
||||||
; ch5 on?
|
; ch5 on?
|
||||||
ld hl, wChannel5 + wChannel1Flags1 - wChannel1 ; + CHANNEL_FLAGS1
|
ld hl, wChannel5 + wChannel1Flags1 - wChannel1 ; + CHANNEL_FLAGS1
|
||||||
bit 0, [hl]
|
bit 0, [hl]
|
||||||
|
|
||||||
jr nz, .setCarry
|
jr nz, .setCarry
|
||||||
ld a, SFX_COLLISION
|
ld a, SFX_COLLISION
|
||||||
|
|
@ -1967,9 +1967,15 @@ CollisionCheckOnWater::
|
||||||
jr z, .stopSurfing ; stop surfing if the tile is passable
|
jr z, .stopSurfing ; stop surfing if the tile is passable
|
||||||
jr .loop
|
jr .loop
|
||||||
.collision
|
.collision
|
||||||
ld a, [wChannelSoundIDs + Ch4]
|
;ld a, [wChannelSoundIDs + Ch4]
|
||||||
cp SFX_COLLISION ; check if collision sound is already playing
|
;cp SFX_COLLISION ; check if collision sound is already playing
|
||||||
jr z, .setCarry
|
; curSFX is not cleared for some reason.
|
||||||
|
|
||||||
|
; ch5 on?
|
||||||
|
ld hl, wChannel5 + wChannel1Flags1 - wChannel1 ; + CHANNEL_FLAGS1
|
||||||
|
bit 0, [hl]
|
||||||
|
|
||||||
|
jr nz, .setCarry
|
||||||
ld a, SFX_COLLISION
|
ld a, SFX_COLLISION
|
||||||
call PlaySound ; play collision sound (if it's not already playing)
|
call PlaySound ; play collision sound (if it's not already playing)
|
||||||
.setCarry
|
.setCarry
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue