This commit is contained in:
dannye 2023-04-19 21:08:01 -05:00
commit 8021cbdf04
530 changed files with 153841 additions and 14088 deletions

View file

@ -794,12 +794,11 @@ HandleBlackOut::
jp SpecialEnterMap
StopMusic::
ld [wAudioFadeOutControl], a
ld a, SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a
call PlaySound
ld [wMusicFade], a
xor a
ld [wMusicFadeID], a
.wait
ld a, [wAudioFadeOutControl]
ld a, [wMusicFade]
and a
jr nz, .wait
jp StopAllSounds
@ -1267,9 +1266,16 @@ CollisionCheckOnLand::
call CheckTilePassable
jr nc, .noCollision
.collision
ld a, [wChannelSoundIDs + CHAN5]
cp SFX_COLLISION ; check if collision sound is already playing
jr z, .setCarry
; ld a, [wChannelSoundIDs + CHAN5]
; cp SFX_COLLISION ; check if collision sound is already playing
; jr z, .setCarry
; ch5 on?
ld hl, wChannel5 + wChannel1Flags1 - wChannel1 ; + CHANNEL_FLAGS1
bit 0, [hl]
jr nz, .setCarry
ld a, SFX_COLLISION
call PlaySound ; play collision sound (if it's not already playing)
.setCarry
@ -1948,9 +1954,16 @@ CollisionCheckOnWater::
jr z, .stopSurfing ; stop surfing if the tile is passable
jr .loop
.collision
ld a, [wChannelSoundIDs + CHAN5]
cp SFX_COLLISION ; check if collision sound is already playing
jr z, .setCarry
; ld a, [wChannelSoundIDs + CHAN5]
; cp SFX_COLLISION ; check if collision sound is already playing
; jr z, .setCarry
; ch5 on?
ld hl, wChannel5 + wChannel1Flags1 - wChannel1 ; + CHANNEL_FLAGS1
bit 0, [hl]
jr nz, .setCarry
ld a, SFX_COLLISION
call PlaySound ; play collision sound (if it's not already playing)
.setCarry
@ -2302,6 +2315,10 @@ LoadMapHeader::
ld a, [hli]
ld [wMapMusicSoundID], a ; music 1
ld a, [hl]
; give vanilla red a fair shot at running our savs
ld a, BANK("Audio Engine 1")
ld [wMapMusicROMBank], a ; music 2
pop af
ldh [hLoadedROMBank], a
@ -2373,7 +2390,7 @@ LoadMapData::
ld a, [wFlags_D733]
bit 1, a
jr nz, .restoreRomBank
call UpdateMusic6Times
; call UpdateMusic6Times
call PlayDefaultMusicFadeOutCurrent
.restoreRomBank
pop af