Fix pokeflute in battle sfx

and other small improvements
This commit is contained in:
dannye 2021-03-28 23:23:45 -05:00
parent 5f87413b23
commit c1278c478e
28 changed files with 108 additions and 131 deletions

View file

@ -2183,6 +2183,7 @@ GetMoveSound:
.next
ld a, [wEnemyMonSpecies]
.Continue
push af
ld a, 1
ld [wSFXDontWait], a
@ -2193,18 +2194,19 @@ GetMoveSound:
ld a, b
scf
ret
;push hl
;call GetCryData
;ld b, a
;pop hl
;ld a, [wFrequencyModifier]
;add [hl]
;ld [wFrequencyModifier], a
;inc hl
;ld a, [wTempoModifier]
;add [hl]
;ld [wTempoModifier], a
;jr .done
; push hl
; call GetCryData
; ld b, a
; pop hl
; ld a, [wFrequencyModifier]
; add [hl]
; ld [wFrequencyModifier], a
; inc hl
; ld a, [wTempoModifier]
; add [hl]
; ld [wTempoModifier], a
; jr .done
.NotCryMove
ld a, [hli]
ld [wFrequencyModifier], a

View file

@ -781,10 +781,16 @@ FaintEnemyPokemon:
ld [wTempoModifier], a
ld a, SFX_FAINT_FALL
call PlaySoundWaitForCurrent
; using WaitForSoundToFinish causes a noticeable delay
; so use a smaller hard-coded delay for now
ld c, 10
call DelayFrames
;.sfxwait
; ld a, [wChannelSoundIDs + Ch5]
; cp SFX_FAINT_FALL
; jr z, .sfxwait
ld a, SFX_FAINT_THUD
call PlaySound
call WaitForSoundToFinish

View file

@ -36,7 +36,12 @@ SafariZoneGameOver:
ld c, 0 ; BANK(SFX_Safari_Zone_PA)
ld a, SFX_SAFARI_ZONE_PA
call PlaySound
call WaitForSoundToFinish
;.waitForMusicToPlay
; ld a, [wChannelSoundIDs + Ch5]
; cp SFX_SAFARI_ZONE_PA
; jr nz, .waitForMusicToPlay
ld a, TEXT_SAFARI_GAME_OVER
ldh [hSpriteIndexOrTextID], a

View file

@ -1735,11 +1735,16 @@ ItemUsePokeflute:
and $80
jr nz, .skipMusic
call WaitForSoundToFinish ; wait for sound to end
;farcall Music_PokeFluteInBattle ; play in-battle pokeflute music ; XXX
ld a, SFX_POKEFLUTE_IN_BATTLE
call PlaySound
call WaitForSoundToFinish
; farcall Music_PokeFluteInBattle ; play in-battle pokeflute music
;.musicWaitLoop ; wait for music to finish playing
; ld a, [wChannelSoundIDs + Ch7]
; and a ; music off?
; jr nz, .musicWaitLoop
.skipMusic
ld hl, FluteWokeUpText
jp PrintText

View file

@ -147,6 +147,8 @@ HandlePokedexSideMenu:
call PlayCry
pop af
ld [wd11e], a
; call GetCryData
; call PlaySound
jr .handleMenuInput
.choseArea

View file

@ -58,6 +58,9 @@ AnimateHealingMachine:
ld a, [wChannel1MusicID]
and a
jr nz, .waitLoop2
; ld a, [wChannelSoundIDs]
; cp MUSIC_PKMN_HEALED ; is the healed music still playing?
; jr z, .waitLoop2 ; if so, check gain
ld c, 32
call DelayFrames

View file

@ -122,6 +122,7 @@ _LeaveMapAnim::
.playerNotStandingOnWarpPadOrHole
ld a, $4
call StopMusic
call WaitForSongToFinish
ld a, [wd732]
bit 6, a ; is the last used pokemon center the destination?
jr z, .flyAnimation

View file

@ -224,11 +224,12 @@ BillsPCDeposit:
jp c, BillsPCMenu
call DisplayDepositWithdrawMenu
jp nc, BillsPCMenu
call WaitForSoundToFinish
ld a, [wcf91]
call PlayCry
;call GetCryData
;call PlaySoundWaitForCurrent
; call GetCryData
; call PlaySoundWaitForCurrent
ld a, PARTY_TO_BOX
ld [wMoveMonType], a
call MoveMon
@ -278,11 +279,12 @@ BillsPCWithdraw:
ld a, [wWhichPokemon]
ld hl, wBoxMonNicks
call GetPartyMonName
call WaitForSoundToFinish
ld a, [wcf91]
call PlayCry
;call GetCryData
;call PlaySoundWaitForCurrent
; call GetCryData
; call PlaySoundWaitForCurrent
xor a ; BOX_TO_PARTY
ld [wMoveMonType], a
call MoveMon