Remove last few red audio variables

This commit is contained in:
dannye 2021-03-29 00:42:28 -05:00
parent c1278c478e
commit 3508dc8e1d
28 changed files with 114 additions and 124 deletions

View file

@ -4,7 +4,7 @@ PlayBattleMusic::
ld [wLowHealthAlarm], a ld [wLowHealthAlarm], a
ld [wMusicFade], a ld [wMusicFade], a
dec a ; SFX_STOP_ALL_MUSIC dec a ; SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a ; ld [wNewSoundID], a
call PlayMusic call PlayMusic
call DelayFrame call DelayFrame
ld c, 0 ; BANK(Music_GymLeaderBattle) ld c, 0 ; BANK(Music_GymLeaderBattle)

View file

@ -11,7 +11,7 @@ PlayPokedexRatingSfx::
.gotSfxPointer .gotSfxPointer
push bc push bc
ld a, SFX_STOP_ALL_MUSIC ld a, SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a ; ld [wNewSoundID], a
call PlaySoundWaitForCurrent call PlaySoundWaitForCurrent
pop bc pop bc
ld b, $0 ld b, $0

View file

@ -2208,10 +2208,11 @@ GetMoveSound:
; jr .done ; jr .done
.NotCryMove .NotCryMove
; todo: fix sound modifiers
ld a, [hli] ld a, [hli]
ld [wFrequencyModifier], a ; ld [wFrequencyModifier], a
ld a, [hli] ld a, [hli]
ld [wTempoModifier], a ; ld [wTempoModifier], a
.done .done
ld a, b ld a, b
ret ret
@ -2636,8 +2637,9 @@ PlayApplyingAttackSound:
ld b, $1 ld b, $1
ld c, GSSFX_NOT_VERY_EFFECTIVE ; SFX_NOT_VERY_EFFECTIVE ld c, GSSFX_NOT_VERY_EFFECTIVE ; SFX_NOT_VERY_EFFECTIVE
.playSound .playSound
ld [wFrequencyModifier], a ; todo: fix sound modifiers
; ld [wFrequencyModifier], a
ld a, b ld a, b
ld [wTempoModifier], a ; ld [wTempoModifier], a
ld a, c ld a, c
jp PlaySound jp PlaySound

View file

@ -60,10 +60,10 @@ PrintBeginningBattleText:
call PrintText call PrintText
.playSFX .playSFX
xor a ; xor a
ld [wFrequencyModifier], a ; ld [wFrequencyModifier], a
ld a, $80 ; ld a, $80
ld [wTempoModifier], a ; ld [wTempoModifier], a
ld a, SFX_SILPH_SCOPE ld a, SFX_SILPH_SCOPE
call PlaySound call PlaySound
jp WaitForSoundToFinish jp WaitForSoundToFinish

View file

@ -776,9 +776,9 @@ FaintEnemyPokemon:
ld a, [wIsInBattle] ld a, [wIsInBattle]
dec a dec a
jr z, .wild_win jr z, .wild_win
xor a ; xor a
ld [wFrequencyModifier], a ; ld [wFrequencyModifier], a
ld [wTempoModifier], a ; ld [wTempoModifier], a
ld a, SFX_FAINT_FALL ld a, SFX_FAINT_FALL
call PlaySoundWaitForCurrent call PlaySoundWaitForCurrent
@ -965,7 +965,7 @@ TrainerDefeatedText:
PlayBattleVictoryMusic: PlayBattleVictoryMusic:
push af push af
ld a, SFX_STOP_ALL_MUSIC ld a, SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a ; ld [wNewSoundID], a
call PlaySoundWaitForCurrent call PlaySoundWaitForCurrent
ld c, 0 ; BANK(Music_DefeatedTrainer) ld c, 0 ; BANK(Music_DefeatedTrainer)
pop af pop af
@ -6899,8 +6899,8 @@ _LoadTrainerPic:
; unreferenced ; unreferenced
ResetCryModifiers: ResetCryModifiers:
xor a xor a
ld [wFrequencyModifier], a ; ld [wFrequencyModifier], a
ld [wTempoModifier], a ; ld [wTempoModifier], a
jp PlaySound jp PlaySound
; animates the mon "growing" out of the pokeball ; animates the mon "growing" out of the pokeball

View file

@ -53,7 +53,7 @@ BillsHouseInitiatedText::
text_promptbutton text_promptbutton
text_asm text_asm
ld a, SFX_STOP_ALL_MUSIC ld a, SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a ; ld [wNewSoundID], a
call PlaySound call PlaySound
ld c, 16 ld c, 16
call DelayFrames call DelayFrames

View file

@ -25,11 +25,11 @@ DisplayPokemonCenterDialogue_::
farcall AnimateHealingMachine ; do the healing machine animation farcall AnimateHealingMachine ; do the healing machine animation
xor a xor a
ld [wAudioFadeOutControl], a ld [wAudioFadeOutControl], a
ld a, [wAudioSavedROMBank] ; ld a, [wAudioSavedROMBank]
ld [wAudioROMBank], a ; ld [wAudioROMBank], a
ld a, [wMapMusicSoundID] ld a, [wMapMusicSoundID]
ld [wLastMusicSoundID], a ld [wLastMusicSoundID], a
ld [wNewSoundID], a ; ld [wNewSoundID], a
call PlayMusic call PlayMusic
ld hl, PokemonFightingFitText ld hl, PokemonFightingFitText
call PrintText call PrintText

View file

@ -1808,7 +1808,10 @@ PlayedFluteHadEffectText:
ld a, SFX_POKEFLUTE ld a, SFX_POKEFLUTE
ld c, 0 ; BANK(SFX_Pokeflute) ld c, 0 ; BANK(SFX_Pokeflute)
call PlaySound call PlaySound
call WaitForSoundToFinish ;.musicWaitLoop ; wait for music to finish playing
; ld a, [wChannelSoundIDs + Ch3]
; cp SFX_POKEFLUTE
; jr z, .musicWaitLoop
call PlayDefaultMusic ; start playing normal music again call PlayDefaultMusic ; start playing normal music again
.done .done
jp TextScriptEnd ; end text jp TextScriptEnd ; end text

View file

@ -826,10 +826,10 @@ TradeCenter_Trade:
ld [wTradedEnemyMonSpecies], a ld [wTradedEnemyMonSpecies], a
ld a, 10 ld a, 10
ld [wAudioFadeOutControl], a ld [wAudioFadeOutControl], a
ld a, 0 ; BANK(Music_SafariZone) ; ld a, 0 ; BANK(Music_SafariZone)
ld [wAudioSavedROMBank], a ; ld [wAudioSavedROMBank], a
ld a, MUSIC_SAFARI_ZONE ld a, MUSIC_SAFARI_ZONE
ld [wNewSoundID], a ; ld [wNewSoundID], a
call PlayMusic call PlayMusic
ld c, 100 ld c, 100
call DelayFrames call DelayFrames
@ -917,10 +917,10 @@ CableClub_Run:
ldh [hJoy5], a ldh [hJoy5], a
ld a, 10 ld a, 10
ld [wAudioFadeOutControl], a ld [wAudioFadeOutControl], a
ld a, 0 ; BANK(Music_Celadon) ; ld a, 0 ; BANK(Music_Celadon)
ld [wAudioSavedROMBank], a ; ld [wAudioSavedROMBank], a
ld a, MUSIC_CELADON ld a, MUSIC_CELADON
ld [wNewSoundID], a ; ld [wNewSoundID], a
jp PlayMusic jp PlayMusic
EmptyFunc: EmptyFunc:

View file

@ -10,7 +10,7 @@ EvolveMon:
ld [wLowHealthAlarm], a ld [wLowHealthAlarm], a
; ld [wChannelSoundIDs + Ch5], a ; ld [wChannelSoundIDs + Ch5], a
dec a ; SFX_STOP_ALL_MUSIC dec a ; SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a ; ld [wNewSoundID], a
call PlaySound call PlaySound
ld a, $1 ld a, $1
ldh [hAutoBGTransferEnabled], a ldh [hAutoBGTransferEnabled], a
@ -68,7 +68,7 @@ EvolveMon:
.done .done
ld [wWholeScreenPaletteMonSpecies], a ld [wWholeScreenPaletteMonSpecies], a
ld a, SFX_STOP_ALL_MUSIC ld a, SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a ; ld [wNewSoundID], a
call PlaySound call PlaySound
ld a, [wWholeScreenPaletteMonSpecies] ld a, [wWholeScreenPaletteMonSpecies]
call PlayCry call PlayCry

View file

@ -330,11 +330,11 @@ PlayShootingStar:
ld c, 40 ld c, 40
call DelayFrames call DelayFrames
.next .next
ld a, 0 ; BANK(Music_IntroBattle) ; ld a, 0 ; BANK(Music_IntroBattle)
ld [wAudioROMBank], a ; ld [wAudioROMBank], a
ld [wAudioSavedROMBank], a ; ld [wAudioSavedROMBank], a
ld a, MUSIC_INTRO_BATTLE ld a, MUSIC_INTRO_BATTLE
ld [wNewSoundID], a ; ld [wNewSoundID], a
call PlayMusic call PlayMusic
call IntroClearMiddleOfScreen call IntroClearMiddleOfScreen
call ClearSprites call ClearSprites

View file

@ -128,9 +128,9 @@ OakSpeech:
call ResetPlayerSpriteData call ResetPlayerSpriteData
ldh a, [hLoadedROMBank] ldh a, [hLoadedROMBank]
push af push af
ld a, 0 ; BANK(Music_PalletTown) ; ld a, 0 ; BANK(Music_PalletTown)
ld [wAudioROMBank], a ; ld [wAudioROMBank], a
ld [wAudioSavedROMBank], a ; ld [wAudioSavedROMBank], a
ld a, 10 ld a, 10
call StopMusic call StopMusic

View file

@ -17,9 +17,9 @@ SetDefaultNamesBeforeTitlescreen::
ld [hli], a ld [hli], a
ld [hli], a ld [hli], a
ld [hl], a ld [hl], a
ld a, 0 ; BANK(Music_TitleScreen) ; ld a, 0 ; BANK(Music_TitleScreen)
ld [wAudioROMBank], a ; ld [wAudioROMBank], a
ld [wAudioSavedROMBank], a ; ld [wAudioSavedROMBank], a
DisplayTitleScreen: DisplayTitleScreen:
call GBPalWhiteOut call GBPalWhiteOut
@ -213,7 +213,7 @@ ENDC
call Delay3 call Delay3
call WaitForSoundToFinish call WaitForSoundToFinish
ld a, MUSIC_TITLE_SCREEN ld a, MUSIC_TITLE_SCREEN
ld [wNewSoundID], a ; ld [wNewSoundID], a
call PlayMusic call PlayMusic
xor a xor a
ld [wUnusedCC5B], a ld [wUnusedCC5B], a

View file

@ -162,11 +162,11 @@ PewterMuseumGuyMovementScriptPointerTable::
dw PewterMovementScript_Done dw PewterMovementScript_Done
PewterMovementScript_WalkToMuseum: PewterMovementScript_WalkToMuseum:
ld a, 0 ; BANK(Music_MuseumGuy) ; ld a, 0 ; BANK(Music_MuseumGuy)
ld [wAudioROMBank], a ; ld [wAudioROMBank], a
ld [wAudioSavedROMBank], a ; ld [wAudioSavedROMBank], a
ld a, MUSIC_MUSEUM_GUY ld a, MUSIC_MUSEUM_GUY
ld [wNewSoundID], a ; ld [wNewSoundID], a
call PlayMusic call PlayMusic
ld a, [wSpriteIndex] ld a, [wSpriteIndex]
swap a swap a
@ -218,11 +218,11 @@ PewterGymGuyMovementScriptPointerTable::
dw PewterMovementScript_Done dw PewterMovementScript_Done
PewterMovementScript_WalkToGym: PewterMovementScript_WalkToGym:
ld a, 0 ; BANK(Music_MuseumGuy) ; ld a, 0 ; BANK(Music_MuseumGuy)
ld [wAudioROMBank], a ; ld [wAudioROMBank], a
ld [wAudioSavedROMBank], a ; ld [wAudioSavedROMBank], a
ld a, MUSIC_MUSEUM_GUY ld a, MUSIC_MUSEUM_GUY
ld [wNewSoundID], a ; ld [wNewSoundID], a
call PlayMusic call PlayMusic
ld a, [wSpriteIndex] ld a, [wSpriteIndex]
swap a swap a

View file

@ -39,18 +39,18 @@ AnimateHealingMachine:
call DelayFrames call DelayFrames
dec b dec b
jr nz, .partyLoop jr nz, .partyLoop
ld a, [wAudioROMBank] ; ld a, [wAudioROMBank]
cp $1f ; BANK("Audio Engine 3") ; cp BANK("Audio Engine 3")
ld [wAudioSavedROMBank], a ; ld [wAudioSavedROMBank], a
jr nz, .next ; jr nz, .next
ld a, SFX_STOP_ALL_MUSIC ; ld a, SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a ; ld [wNewSoundID], a
call PlaySound ; call PlaySound
ld a, 0 ; BANK(Music_PkmnHealed) ; ld a, 0 ; BANK(Music_PkmnHealed)
ld [wAudioROMBank], a ; ld [wAudioROMBank], a
.next ;.next
ld a, MUSIC_PKMN_HEALED ld a, MUSIC_PKMN_HEALED
ld [wNewSoundID], a ; ld [wNewSoundID], a
call PlayMusic call PlayMusic
ld d, $28 ld d, $28
call FlashSprite8Times call FlashSprite8Times

View file

@ -32,19 +32,19 @@ PlayDefaultMusicCommon::
.next .next
ld b, a ld b, a
ld a, d ; ld a, d
and a ; should current music be faded out first? ; and a ; should current music be faded out first?
ld a, 0 ; BANK(Music_BikeRiding) ; ld a, 0 ; BANK(Music_BikeRiding)
jr nz, .next2 ; jr nz, .next2
; Only change the audio ROM bank if the current music isn't going to be faded ; Only change the audio ROM bank if the current music isn't going to be faded
; out before the default music begins. ; out before the default music begins.
ld [wAudioROMBank], a ; ld [wAudioROMBank], a
.next2 ;.next2
; [wAudioSavedROMBank] will be copied to [wAudioROMBank] after fading out the ; [wAudioSavedROMBank] will be copied to [wAudioROMBank] after fading out the
; current music (if the current music is faded out). ; current music (if the current music is faded out).
ld [wAudioSavedROMBank], a ; ld [wAudioSavedROMBank], a
jr .next3 jr .next3
.walking .walking
@ -69,7 +69,7 @@ PlayDefaultMusicCommon::
ld a, b ld a, b
ld [wLastMusicSoundID], a ld [wLastMusicSoundID], a
ld [wNewSoundID], a ; ld [wNewSoundID], a
ld [wMusicFadeID], a ld [wMusicFadeID], a
ret ret

View file

@ -97,9 +97,9 @@ rLCDC_DEFAULT EQU %11100011
predef LoadSGB predef LoadSGB
ld a, 0 ; BANK(SFX_Shooting_Star) ; ld a, 0 ; BANK(SFX_Shooting_Star)
ld [wAudioROMBank], a ; ld [wAudioROMBank], a
ld [wAudioSavedROMBank], a ; ld [wAudioSavedROMBank], a
ld a, $9c ld a, $9c
ldh [hAutoBGTransferDest + 1], a ldh [hAutoBGTransferDest + 1], a
xor a xor a
@ -126,12 +126,12 @@ ClearVram::
StopAllSounds:: StopAllSounds::
ld a, 0 ; BANK("Audio Engine 1") ; ld a, 0 ; BANK("Audio Engine 1")
ld [wAudioROMBank], a ; ld [wAudioROMBank], a
ld [wAudioSavedROMBank], a ; ld [wAudioSavedROMBank], a
xor a xor a
ld [wAudioFadeOutControl], a ld [wAudioFadeOutControl], a
ld [wNewSoundID], a ; ld [wNewSoundID], a
ld [wLastMusicSoundID], a ld [wLastMusicSoundID], a
dec a dec a
jp PlaySound jp PlaySound

View file

@ -409,9 +409,9 @@ PlayTrainerMusic::
ld [wAudioFadeOutControl], a ld [wAudioFadeOutControl], a
ld a, SFX_STOP_ALL_MUSIC ld a, SFX_STOP_ALL_MUSIC
call PlaySound call PlaySound
ld a, 0 ; BANK(Music_MeetEvilTrainer) ; ld a, 0 ; BANK(Music_MeetEvilTrainer)
ld [wAudioROMBank], a ; ld [wAudioROMBank], a
ld [wAudioSavedROMBank], a ; ld [wAudioSavedROMBank], a
ld a, [wEngagedTrainerClass] ld a, [wEngagedTrainerClass]
ld b, a ld b, a
ld hl, EvilTrainerList ld hl, EvilTrainerList
@ -436,7 +436,7 @@ PlayTrainerMusic::
.maleTrainer .maleTrainer
ld a, MUSIC_MEET_MALE_TRAINER ld a, MUSIC_MEET_MALE_TRAINER
.PlaySound .PlaySound
ld [wNewSoundID], a ; ld [wNewSoundID], a
jp PlayMusic jp PlayMusic
INCLUDE "data/trainers/encounter_types.asm" INCLUDE "data/trainers/encounter_types.asm"

View file

@ -69,7 +69,7 @@ ENDC
and a and a
jr z, .asm_19512 jr z, .asm_19512
ld a, SFX_STOP_ALL_MUSIC ld a, SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a ; ld [wNewSoundID], a
call PlaySound call PlaySound
.asm_19512 .asm_19512
ld c, 0 ; BANK(Music_MeetRival) ld c, 0 ; BANK(Music_MeetRival)
@ -176,7 +176,7 @@ CeruleanCityScript2:
ldh [hSpriteIndexOrTextID], a ldh [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld a, SFX_STOP_ALL_MUSIC ld a, SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a ; ld [wNewSoundID], a
call PlaySound call PlaySound
farcall Music_RivalAlternateStart farcall Music_RivalAlternateStart
ld a, $1 ld a, $1

View file

@ -511,7 +511,7 @@ OaksLabScript15:
ldh [hJoyHeld], a ldh [hJoyHeld], a
call EnableAutoTextBoxDrawing call EnableAutoTextBoxDrawing
ld a, SFX_STOP_ALL_MUSIC ld a, SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a ; ld [wNewSoundID], a
call PlaySound call PlaySound
farcall Music_RivalAlternateStart farcall Music_RivalAlternateStart
ld a, $15 ld a, $15
@ -612,7 +612,7 @@ OaksLabScript16:
call FillMemory call FillMemory
ld [hl], $ff ld [hl], $ff
ld a, SFX_STOP_ALL_MUSIC ld a, SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a ; ld [wNewSoundID], a
call PlaySound call PlaySound
farcall Music_RivalAlternateStart farcall Music_RivalAlternateStart
ld a, $1 ld a, $1

View file

@ -27,7 +27,7 @@ ENDC
call ArePlayerCoordsInArray call ArePlayerCoordsInArray
ret nc ret nc
ld a, SFX_STOP_ALL_MUSIC ld a, SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a ; ld [wNewSoundID], a
call PlaySound call PlaySound
ld c, 0 ; BANK(Music_MeetRival) ld c, 0 ; BANK(Music_MeetRival)
ld a, MUSIC_MEET_RIVAL ld a, MUSIC_MEET_RIVAL
@ -81,7 +81,7 @@ PokemonTower2Script1:
ldh [hSpriteIndex], a ldh [hSpriteIndex], a
call MoveSprite call MoveSprite
ld a, SFX_STOP_ALL_MUSIC ld a, SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a ; ld [wNewSoundID], a
call PlaySound call PlaySound
farcall Music_RivalAlternateStart farcall Music_RivalAlternateStart
ld a, $2 ld a, $2

View file

@ -29,7 +29,7 @@ MomHealPokemon:
call ReloadMapData call ReloadMapData
predef HealParty predef HealParty
ld a, MUSIC_PKMN_HEALED ld a, MUSIC_PKMN_HEALED
ld [wNewSoundID], a ; ld [wNewSoundID], a
call PlayMusic call PlayMusic
call WaitForSongToFinish call WaitForSongToFinish
@ -39,7 +39,7 @@ MomHealPokemon:
; jr z, .next ; jr z, .next
ld a, [wMapMusicSoundID] ld a, [wMapMusicSoundID]
ld [wNewSoundID], a ; ld [wNewSoundID], a
call PlayMusic call PlayMusic
call GBFadeInFromWhite call GBFadeInFromWhite
ld hl, MomHealText2 ld hl, MomHealText2

View file

@ -89,7 +89,7 @@ Route22Script0:
and a and a
jr z, .asm_50f4e jr z, .asm_50f4e
ld a, SFX_STOP_ALL_MUSIC ld a, SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a ; ld [wNewSoundID], a
call PlaySound call PlaySound
.asm_50f4e .asm_50f4e
ld c, 0 ; BANK(Music_MeetRival) ld c, 0 ; BANK(Music_MeetRival)
@ -168,7 +168,7 @@ Route22Script2:
ldh [hSpriteIndexOrTextID], a ldh [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld a, SFX_STOP_ALL_MUSIC ld a, SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a ; ld [wNewSoundID], a
call PlaySound call PlaySound
farcall Music_RivalAlternateStart farcall Music_RivalAlternateStart
ld a, [wcf0d] ld a, [wcf0d]
@ -242,11 +242,11 @@ Route22Script_5104e:
and a and a
jr z, .skipYVisibilityTesta jr z, .skipYVisibilityTesta
ld a, SFX_STOP_ALL_MUSIC ld a, SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a ; ld [wNewSoundID], a
call PlaySound call PlaySound
.skipYVisibilityTesta .skipYVisibilityTesta
ld a, SFX_STOP_ALL_MUSIC ld a, SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a ; ld [wNewSoundID], a
call PlaySound call PlaySound
farcall Music_RivalAlternateTempo farcall Music_RivalAlternateTempo
ld a, $2 ld a, $2
@ -327,7 +327,7 @@ Route22Script5:
ldh [hSpriteIndexOrTextID], a ldh [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld a, SFX_STOP_ALL_MUSIC ld a, SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a ; ld [wNewSoundID], a
call PlaySound call PlaySound
farcall Music_RivalAlternateStartAndTempo farcall Music_RivalAlternateStartAndTempo
ld a, [wcf0d] ld a, [wcf0d]

View file

@ -25,7 +25,7 @@ SSAnne2Script0:
call ArePlayerCoordsInArray call ArePlayerCoordsInArray
ret nc ret nc
ld a, SFX_STOP_ALL_MUSIC ld a, SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a ; ld [wNewSoundID], a
call PlaySound call PlaySound
ld c, 0 ; BANK(Music_MeetRival) ld c, 0 ; BANK(Music_MeetRival)
ld a, MUSIC_MEET_RIVAL ld a, MUSIC_MEET_RIVAL
@ -145,7 +145,7 @@ SSAnne2Script2:
ldh [hSpriteIndex], a ldh [hSpriteIndex], a
call MoveSprite call MoveSprite
ld a, SFX_STOP_ALL_MUSIC ld a, SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a ; ld [wNewSoundID], a
call PlaySound call PlaySound
farcall Music_RivalAlternateStart farcall Music_RivalAlternateStart
ld a, $3 ld a, $3

View file

@ -44,18 +44,18 @@ SSAnne7Text1:
SSAnne7RubText: SSAnne7RubText:
text_far _SSAnne7RubText text_far _SSAnne7RubText
text_asm text_asm
ld a, [wAudioROMBank] ; ld a, [wAudioROMBank]
cp $1f ; BANK("Audio Engine 3") ; cp BANK("Audio Engine 3")
ld [wAudioSavedROMBank], a ; ld [wAudioSavedROMBank], a
jr nz, .asm_61908 ; jr nz, .asm_61908
ld a, SFX_STOP_ALL_MUSIC ; ld a, SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a ; ld [wNewSoundID], a
call PlaySound ; call PlaySound
ld a, 0 ; BANK(Music_PkmnHealed) ; ld a, 0 ; BANK(Music_PkmnHealed)
ld [wAudioROMBank], a ; ld [wAudioROMBank], a
.asm_61908 ;.asm_61908
ld a, MUSIC_PKMN_HEALED ld a, MUSIC_PKMN_HEALED
ld [wNewSoundID], a ; ld [wNewSoundID], a
call PlayMusic call PlayMusic
call WaitForSongToFinish call WaitForSongToFinish

View file

@ -131,7 +131,7 @@ SilphCo7Script0:
ld a, PLAYER_DIR_DOWN ld a, PLAYER_DIR_DOWN
ld [wPlayerMovingDirection], a ld [wPlayerMovingDirection], a
ld a, SFX_STOP_ALL_MUSIC ld a, SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a ; ld [wNewSoundID], a
call PlaySound call PlaySound
ld c, 0 ; BANK(Music_MeetRival) ld c, 0 ; BANK(Music_MeetRival)
ld a, MUSIC_MEET_RIVAL ld a, MUSIC_MEET_RIVAL
@ -220,7 +220,7 @@ SilphCo7Script4:
ldh [hSpriteIndexOrTextID], a ldh [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
ld a, SFX_STOP_ALL_MUSIC ld a, SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a ; ld [wNewSoundID], a
call PlaySound call PlaySound
farcall Music_RivalAlternateStart farcall Music_RivalAlternateStart
ld de, MovementData_51d1d ld de, MovementData_51d1d

View file

@ -40,7 +40,7 @@ VermilionDock_1db9b:
SetEventForceReuseHL EVENT_SS_ANNE_LEFT SetEventForceReuseHL EVENT_SS_ANNE_LEFT
ld a, SFX_STOP_ALL_MUSIC ld a, SFX_STOP_ALL_MUSIC
ld [wJoyIgnore], a ld [wJoyIgnore], a
ld [wNewSoundID], a ; ld [wNewSoundID], a
call PlaySound call PlaySound
ld c, 0 ; BANK(Music_Surfing) ld c, 0 ; BANK(Music_Surfing)
ld a, MUSIC_SURFING ld a, MUSIC_SURFING

View file

@ -8,23 +8,6 @@ INCLUDE "vram.asm"
SECTION "WRAM", WRAM0 SECTION "WRAM", WRAM0
wNewSoundID::
ds 1
wAudioROMBank::
ds 1
wAudioSavedROMBank::
ds 1
wFrequencyModifier::
ds 1
wTempoModifier::
ds 1
wSFXDontWait:: ds 1
; crysaudio start ; crysaudio start
; nonzero if playing ; nonzero if playing
@ -121,6 +104,8 @@ wCurSFX::
; id of sfx currently playing ; id of sfx currently playing
db db
wSFXDontWait:: ds 1
wAudioEnd:: wAudioEnd::
; crysaudio end ; crysaudio end