Merge pull request #223 from pret/audio-macros

Audio macros
This commit is contained in:
Daniel Harding 2020-02-05 17:59:01 -06:00 committed by GitHub
commit 5048f24816
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
455 changed files with 25712 additions and 25656 deletions

View file

@ -872,7 +872,7 @@ FaintEnemyPokemon:
ld a, SFX_FAINT_FALL
call PlaySoundWaitForCurrent
.sfxwait
ld a, [wChannelSoundIDs + Ch4]
ld a, [wChannelSoundIDs + Ch5]
cp SFX_FAINT_FALL
jr z, .sfxwait
ld a, SFX_FAINT_THUD
@ -956,7 +956,7 @@ EndLowHealthAlarm:
; the low health alarm and prevents it from reactivating until the next battle.
xor a
ld [wLowHealthAlarm], a ; turn off low health alarm
ld [wChannelSoundIDs + Ch4], a
ld [wChannelSoundIDs + Ch5], a
inc a
ld [wLowHealthAlarmDisabled], a ; prevent it from reactivating
ret
@ -1954,7 +1954,7 @@ DrawPlayerHUDAndHPBar:
ld [hl], $0
ret z
xor a
ld [wChannelSoundIDs + Ch4], a
ld [wChannelSoundIDs + Ch5], a
ret
.setLowHealthAlarm
ld hl, wLowHealthAlarm

View file

@ -46,7 +46,7 @@ EndOfBattle:
.resetVariables
xor a
ld [wLowHealthAlarm], a ;disable low health alarm
ld [wChannelSoundIDs + Ch4], a
ld [wChannelSoundIDs + Ch5], a
ld [wIsInBattle], a
ld [wBattleType], a
ld [wMoveMissed], a

View file

@ -8,7 +8,7 @@ EvolveMon:
push af
xor a
ld [wLowHealthAlarm], a
ld [wChannelSoundIDs + Ch4], a
ld [wChannelSoundIDs + Ch5], a
dec a
ld [wNewSoundID], a
call PlaySound

View file

@ -71,7 +71,7 @@ SafariZoneGameOver:
ld a, SFX_SAFARI_ZONE_PA
call PlayMusic
.waitForMusicToPlay
ld a, [wChannelSoundIDs + Ch4]
ld a, [wChannelSoundIDs + Ch5]
cp SFX_SAFARI_ZONE_PA
jr nz, .waitForMusicToPlay
ld a, TEXT_SAFARI_GAME_OVER

View file

@ -990,7 +990,7 @@ ItemUseMedicine:
.notFullHP ; if the pokemon's current HP doesn't equal its max HP
xor a
ld [wLowHealthAlarm], a ;disable low health alarm
ld [wChannelSoundIDs + Ch4], a
ld [wChannelSoundIDs + Ch5], a
push hl
push de
ld bc, wPartyMon1MaxHP - (wPartyMon1HP + 1)
@ -1777,7 +1777,7 @@ ItemUsePokeflute:
call WaitForSoundToFinish ; wait for sound to end
callba Music_PokeFluteInBattle ; play in-battle pokeflute music
.musicWaitLoop ; wait for music to finish playing
ld a, [wChannelSoundIDs + Ch6]
ld a, [wChannelSoundIDs + Ch7]
and a ; music off?
jr nz, .musicWaitLoop
.skipMusic
@ -1850,7 +1850,7 @@ PlayedFluteHadEffectText:
ld c, BANK(SFX_Pokeflute)
call PlayMusic
.musicWaitLoop ; wait for music to finish playing
ld a, [wChannelSoundIDs + Ch2]
ld a, [wChannelSoundIDs + Ch3]
cp SFX_POKEFLUTE
jr z, .musicWaitLoop
call PlayDefaultMusic ; start playing normal music again

View file

@ -33,7 +33,7 @@ ShakeElevator:
ld a, SFX_SAFARI_ZONE_PA
call PlayMusic
.musicLoop
ld a, [wChannelSoundIDs + Ch4]
ld a, [wChannelSoundIDs + Ch5]
cp SFX_SAFARI_ZONE_PA
jr z, .musicLoop
call UpdateSprites