mirror of
https://github.com/thornAvery/kep-hack.git
synced 2025-11-15 01:26:40 +13:00
Fix pokeflute in battle sfx
and other small improvements
This commit is contained in:
parent
5f87413b23
commit
c1278c478e
|
|
@ -117,6 +117,9 @@ INCLUDE "audio/sfx/battle_36.asm"
|
||||||
INCLUDE "audio/sfx/level_up.asm"
|
INCLUDE "audio/sfx/level_up.asm"
|
||||||
INCLUDE "audio/sfx/caught_mon.asm"
|
INCLUDE "audio/sfx/caught_mon.asm"
|
||||||
|
|
||||||
|
INCLUDE "audio/sfx/pokeflute_ch5_ch6.asm"
|
||||||
|
INCLUDE "audio/sfx/pokeflute_ch7.asm"
|
||||||
|
|
||||||
|
|
||||||
SECTION "Sound Effects 3", ROMX
|
SECTION "Sound Effects 3", ROMX
|
||||||
|
|
||||||
|
|
@ -151,16 +154,15 @@ INCLUDE "audio/pokedex_rating_sfx.asm"
|
||||||
SECTION "Audio Engine 1", ROMX
|
SECTION "Audio Engine 1", ROMX
|
||||||
|
|
||||||
INCLUDE "crysaudio/engine.asm"
|
INCLUDE "crysaudio/engine.asm"
|
||||||
;INCLUDE "crysaudio/trainer_encounters.asm"
|
|
||||||
|
|
||||||
INCLUDE "crysaudio/red_pointers.asm"
|
INCLUDE "crysaudio/music_pointers_red.asm"
|
||||||
;INCLUDE "crysaudio/music_pointers.asm"
|
;INCLUDE "crysaudio/music_pointers.asm"
|
||||||
|
|
||||||
INCLUDE "crysaudio/music/nothing.asm"
|
INCLUDE "crysaudio/music/nothing.asm"
|
||||||
|
|
||||||
INCLUDE "crysaudio/cry_pointers.asm"
|
INCLUDE "crysaudio/cry_pointers.asm"
|
||||||
|
|
||||||
INCLUDE "crysaudio/rbsfx.asm"
|
INCLUDE "crysaudio/sfx_pointers_red.asm"
|
||||||
;INCLUDE "crysaudio/sfx_pointers.asm"
|
;INCLUDE "crysaudio/sfx_pointers.asm"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -163,7 +163,7 @@ Audio2_PlayNextNote:
|
||||||
ld a, c
|
ld a, c
|
||||||
cp Ch5
|
cp Ch5
|
||||||
jr nz, .beginChecks
|
jr nz, .beginChecks
|
||||||
ld a, [wLowHealthAlarmOrig] ; low health alarm enabled?
|
ld a, [wLowHealthAlarm] ; low health alarm enabled?
|
||||||
bit 7, a
|
bit 7, a
|
||||||
ret nz
|
ret nz
|
||||||
.beginChecks
|
.beginChecks
|
||||||
|
|
@ -976,7 +976,7 @@ Audio2_ResetCryModifiers:
|
||||||
ld a, c
|
ld a, c
|
||||||
cp Ch5
|
cp Ch5
|
||||||
jr nz, .skip
|
jr nz, .skip
|
||||||
ld a, [wLowHealthAlarmOrig]
|
ld a, [wLowHealthAlarm]
|
||||||
bit 7, a
|
bit 7, a
|
||||||
jr z, .skip
|
jr z, .skip
|
||||||
xor a
|
xor a
|
||||||
|
|
|
||||||
|
|
@ -165,3 +165,6 @@ SFX_Battle_36::
|
||||||
|
|
||||||
SFX_Silph_Scope::
|
SFX_Silph_Scope::
|
||||||
audio_header SFX_Silph_Scope, Ch5
|
audio_header SFX_Silph_Scope, Ch5
|
||||||
|
|
||||||
|
SFX_PokefluteInBattle::
|
||||||
|
audio_header SFX_PokefluteInBattle, Ch5, Ch6, Ch7
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
Music_DoLowHealthAlarm::
|
Music_DoLowHealthAlarm::
|
||||||
ld a, [wLowHealthAlarmOrig]
|
ld a, [wLowHealthAlarm]
|
||||||
cp $ff
|
cp $ff
|
||||||
jr z, .disableAlarm
|
jr z, .disableAlarm
|
||||||
|
|
||||||
|
|
@ -21,19 +21,19 @@ Music_DoLowHealthAlarm::
|
||||||
.asm_2138a
|
.asm_2138a
|
||||||
ld a, $86
|
ld a, $86
|
||||||
ld [wChannelSoundIDs + Ch5], a ;disable sound channel?
|
ld [wChannelSoundIDs + Ch5], a ;disable sound channel?
|
||||||
ld a, [wLowHealthAlarmOrig]
|
ld a, [wLowHealthAlarm]
|
||||||
and $7f ;decrement alarm timer.
|
and $7f ;decrement alarm timer.
|
||||||
dec a
|
dec a
|
||||||
|
|
||||||
.asm_21395
|
.asm_21395
|
||||||
; reset the timer and enable flag.
|
; reset the timer and enable flag.
|
||||||
set 7, a
|
set 7, a
|
||||||
ld [wLowHealthAlarmOrig], a
|
ld [wLowHealthAlarm], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.disableAlarm
|
.disableAlarm
|
||||||
xor a
|
xor a
|
||||||
ld [wLowHealthAlarmOrig], a ;disable alarm
|
ld [wLowHealthAlarm], a ;disable alarm
|
||||||
ld [wChannelSoundIDs + Ch5], a ;re-enable sound channel?
|
ld [wChannelSoundIDs + Ch5], a ;re-enable sound channel?
|
||||||
ld de, .toneDataSilence
|
ld de, .toneDataSilence
|
||||||
jr .playTone
|
jr .playTone
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
PlayBattleMusic::
|
PlayBattleMusic::
|
||||||
xor a
|
xor a
|
||||||
ld [wAudioFadeOutControl], a
|
ld [wAudioFadeOutControl], a
|
||||||
ld [wLowHealthAlarmOrig], 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
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,6 @@ PlayPokedexRatingSfx::
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld c, [hl]
|
ld c, [hl]
|
||||||
call PlaySound
|
call PlaySound
|
||||||
call WaitForSoundToFinish
|
|
||||||
jp PlayDefaultMusic
|
jp PlayDefaultMusic
|
||||||
|
|
||||||
PokedexRatingSfxPointers:
|
PokedexRatingSfxPointers:
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
SFX_Pokeflute_Ch5:
|
SFX_PokefluteInBattle_Ch5:
|
||||||
tempo 256
|
tempo 256
|
||||||
|
|
||||||
|
|
||||||
SFX_Pokeflute_Ch6:
|
SFX_PokefluteInBattle_Ch6:
|
||||||
execute_music
|
execute_music
|
||||||
note_type 8, 0, 0
|
note_type 8, 0, 0
|
||||||
rest 5
|
rest 5
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
SFX_Pokeflute_Ch7:
|
SFX_PokefluteInBattle_Ch7:
|
||||||
execute_music
|
execute_music
|
||||||
vibrato 16, 1, 4
|
vibrato 16, 1, 4
|
||||||
note_type 8, 1, 0
|
note_type 8, 1, 0
|
||||||
|
|
|
||||||
|
|
@ -214,6 +214,8 @@ const_value = 1
|
||||||
const SFX_SLOTS_NEW_SPIN
|
const SFX_SLOTS_NEW_SPIN
|
||||||
const SFX_SHOOTING_STAR
|
const SFX_SHOOTING_STAR
|
||||||
|
|
||||||
|
const SFX_POKEFLUTE_IN_BATTLE
|
||||||
|
|
||||||
const GSSFX_NOT_VERY_EFFECTIVE
|
const GSSFX_NOT_VERY_EFFECTIVE
|
||||||
const GSSFX_DAMAGE
|
const GSSFX_DAMAGE
|
||||||
const GSSFX_SUPER_EFFECTIVE
|
const GSSFX_SUPER_EFFECTIVE
|
||||||
|
|
|
||||||
|
|
@ -692,9 +692,9 @@ FadeMusic:
|
||||||
xor a
|
xor a
|
||||||
ld [wVolume], a
|
ld [wVolume], a
|
||||||
; did we just get on a bike?
|
; did we just get on a bike?
|
||||||
ld a, [wWalkBikeSurfState] ; XXX
|
; ld a, [wPlayerState]
|
||||||
cp 1 ; PLAYER_BIKE
|
; cp PLAYER_BIKE
|
||||||
jr z, .bicycle
|
; jr z, .bicycle
|
||||||
push bc
|
push bc
|
||||||
; restart sound
|
; restart sound
|
||||||
call MusicFadeRestart
|
call MusicFadeRestart
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ Music_PkmnHealed_Ch1::
|
||||||
;toggle_perfect_pitch
|
;toggle_perfect_pitch
|
||||||
note_type 12, 8, 1
|
note_type 12, 8, 1
|
||||||
rest 2
|
rest 2
|
||||||
octave 3
|
|
||||||
pitch_slide 1, 4, B_
|
pitch_slide 1, 4, B_
|
||||||
note B_, 2
|
note B_, 2
|
||||||
pitch_slide 1, 3, E_
|
pitch_slide 1, 3, E_
|
||||||
|
|
|
||||||
|
|
@ -112,6 +112,8 @@ SFX:
|
||||||
dba SFX_Slots_New_Spin
|
dba SFX_Slots_New_Spin
|
||||||
dba SFX_Shooting_Star
|
dba SFX_Shooting_Star
|
||||||
|
|
||||||
|
dba SFX_PokefluteInBattle
|
||||||
|
|
||||||
dba Sfx_NotVeryEffective
|
dba Sfx_NotVeryEffective
|
||||||
dba Sfx_Damage
|
dba Sfx_Damage
|
||||||
dba Sfx_SuperEffective
|
dba Sfx_SuperEffective
|
||||||
|
|
@ -1,75 +0,0 @@
|
||||||
; What music plays when a trainer notices you
|
|
||||||
|
|
||||||
TrainerEncounterMusic::
|
|
||||||
; entries correspond to trainer classes (see constants/trainer_constants.asm)
|
|
||||||
db MUSIC_HIKER_ENCOUNTER ; none
|
|
||||||
db MUSIC_YOUNGSTER_ENCOUNTER ; falkner
|
|
||||||
db MUSIC_LASS_ENCOUNTER ; whitney
|
|
||||||
db MUSIC_YOUNGSTER_ENCOUNTER ; bugsy
|
|
||||||
db MUSIC_OFFICER_ENCOUNTER ; morty
|
|
||||||
db MUSIC_OFFICER_ENCOUNTER ; pryce
|
|
||||||
db MUSIC_LASS_ENCOUNTER ; jasmine
|
|
||||||
db MUSIC_OFFICER_ENCOUNTER ; chuck
|
|
||||||
db MUSIC_BEAUTY_ENCOUNTER ; clair
|
|
||||||
db MUSIC_RIVAL_ENCOUNTER ; rival1
|
|
||||||
db MUSIC_HIKER_ENCOUNTER ; pokemon_prof
|
|
||||||
db MUSIC_HIKER_ENCOUNTER ; will
|
|
||||||
db MUSIC_HIKER_ENCOUNTER ; cal
|
|
||||||
db MUSIC_OFFICER_ENCOUNTER ; bruno
|
|
||||||
db MUSIC_HIKER_ENCOUNTER ; karen
|
|
||||||
db MUSIC_HIKER_ENCOUNTER ; koga
|
|
||||||
db MUSIC_OFFICER_ENCOUNTER ; champion
|
|
||||||
db MUSIC_YOUNGSTER_ENCOUNTER ; brock
|
|
||||||
db MUSIC_LASS_ENCOUNTER ; misty
|
|
||||||
db MUSIC_OFFICER_ENCOUNTER ; lt_surge
|
|
||||||
db MUSIC_ROCKET_ENCOUNTER ; scientist
|
|
||||||
db MUSIC_OFFICER_ENCOUNTER ; erika
|
|
||||||
db MUSIC_YOUNGSTER_ENCOUNTER ; youngster
|
|
||||||
db MUSIC_YOUNGSTER_ENCOUNTER ; schoolboy
|
|
||||||
db MUSIC_YOUNGSTER_ENCOUNTER ; bird_keeper
|
|
||||||
db MUSIC_LASS_ENCOUNTER ; lass
|
|
||||||
db MUSIC_LASS_ENCOUNTER ; janine
|
|
||||||
db MUSIC_HIKER_ENCOUNTER ; cooltrainerm
|
|
||||||
db MUSIC_BEAUTY_ENCOUNTER ; cooltrainerf
|
|
||||||
db MUSIC_BEAUTY_ENCOUNTER ; beauty
|
|
||||||
db MUSIC_POKEMANIAC_ENCOUNTER ; pokemaniac
|
|
||||||
db MUSIC_ROCKET_ENCOUNTER ; gruntm
|
|
||||||
db MUSIC_HIKER_ENCOUNTER ; gentleman
|
|
||||||
db MUSIC_BEAUTY_ENCOUNTER ; skier
|
|
||||||
db MUSIC_BEAUTY_ENCOUNTER ; teacher
|
|
||||||
db MUSIC_BEAUTY_ENCOUNTER ; sabrina
|
|
||||||
db MUSIC_YOUNGSTER_ENCOUNTER ; bug_catcher
|
|
||||||
db MUSIC_HIKER_ENCOUNTER ; fisher
|
|
||||||
db MUSIC_HIKER_ENCOUNTER ; swimmerm
|
|
||||||
db MUSIC_BEAUTY_ENCOUNTER ; swimmerf
|
|
||||||
db MUSIC_HIKER_ENCOUNTER ; sailor
|
|
||||||
db MUSIC_POKEMANIAC_ENCOUNTER ; super_nerd
|
|
||||||
db MUSIC_RIVAL_ENCOUNTER ; rival2
|
|
||||||
db MUSIC_HIKER_ENCOUNTER ; guitarist
|
|
||||||
db MUSIC_HIKER_ENCOUNTER ; hiker
|
|
||||||
db MUSIC_HIKER_ENCOUNTER ; biker
|
|
||||||
db MUSIC_OFFICER_ENCOUNTER ; blaine
|
|
||||||
db MUSIC_POKEMANIAC_ENCOUNTER ; burglar
|
|
||||||
db MUSIC_HIKER_ENCOUNTER ; firebreather
|
|
||||||
db MUSIC_POKEMANIAC_ENCOUNTER ; juggler
|
|
||||||
db MUSIC_HIKER_ENCOUNTER ; blackbelt_t
|
|
||||||
db MUSIC_ROCKET_ENCOUNTER ; executivem
|
|
||||||
db MUSIC_YOUNGSTER_ENCOUNTER ; psychic_t
|
|
||||||
db MUSIC_LASS_ENCOUNTER ; picnicker
|
|
||||||
db MUSIC_YOUNGSTER_ENCOUNTER ; camper
|
|
||||||
db MUSIC_ROCKET_ENCOUNTER ; executivef
|
|
||||||
db MUSIC_SAGE_ENCOUNTER ; sage
|
|
||||||
db MUSIC_SAGE_ENCOUNTER ; medium
|
|
||||||
db MUSIC_HIKER_ENCOUNTER ; boarder
|
|
||||||
db MUSIC_HIKER_ENCOUNTER ; pokefanm
|
|
||||||
db MUSIC_KIMONO_ENCOUNTER ; kimono_girl
|
|
||||||
db MUSIC_LASS_ENCOUNTER ; twins
|
|
||||||
db MUSIC_BEAUTY_ENCOUNTER ; pokefanf
|
|
||||||
db MUSIC_HIKER_ENCOUNTER ; red
|
|
||||||
db MUSIC_RIVAL_ENCOUNTER ; blue
|
|
||||||
db MUSIC_HIKER_ENCOUNTER ; officer
|
|
||||||
db MUSIC_ROCKET_ENCOUNTER ; gruntf
|
|
||||||
db MUSIC_HIKER_ENCOUNTER ; mysticalman
|
|
||||||
db MUSIC_HIKER_ENCOUNTER ; unused
|
|
||||||
db MUSIC_HIKER_ENCOUNTER ; unused
|
|
||||||
db MUSIC_HIKER_ENCOUNTER ; unused
|
|
||||||
|
|
@ -2183,6 +2183,7 @@ GetMoveSound:
|
||||||
.next
|
.next
|
||||||
ld a, [wEnemyMonSpecies]
|
ld a, [wEnemyMonSpecies]
|
||||||
.Continue
|
.Continue
|
||||||
|
|
||||||
push af
|
push af
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [wSFXDontWait], a
|
ld [wSFXDontWait], a
|
||||||
|
|
@ -2205,6 +2206,7 @@ GetMoveSound:
|
||||||
; add [hl]
|
; add [hl]
|
||||||
; ld [wTempoModifier], a
|
; ld [wTempoModifier], a
|
||||||
; jr .done
|
; jr .done
|
||||||
|
|
||||||
.NotCryMove
|
.NotCryMove
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [wFrequencyModifier], a
|
ld [wFrequencyModifier], a
|
||||||
|
|
|
||||||
|
|
@ -781,10 +781,16 @@ FaintEnemyPokemon:
|
||||||
ld [wTempoModifier], a
|
ld [wTempoModifier], a
|
||||||
ld a, SFX_FAINT_FALL
|
ld a, SFX_FAINT_FALL
|
||||||
call PlaySoundWaitForCurrent
|
call PlaySoundWaitForCurrent
|
||||||
|
|
||||||
|
; using WaitForSoundToFinish causes a noticeable delay
|
||||||
|
; so use a smaller hard-coded delay for now
|
||||||
|
ld c, 10
|
||||||
|
call DelayFrames
|
||||||
;.sfxwait
|
;.sfxwait
|
||||||
; ld a, [wChannelSoundIDs + Ch5]
|
; ld a, [wChannelSoundIDs + Ch5]
|
||||||
; cp SFX_FAINT_FALL
|
; cp SFX_FAINT_FALL
|
||||||
; jr z, .sfxwait
|
; jr z, .sfxwait
|
||||||
|
|
||||||
ld a, SFX_FAINT_THUD
|
ld a, SFX_FAINT_THUD
|
||||||
call PlaySound
|
call PlaySound
|
||||||
call WaitForSoundToFinish
|
call WaitForSoundToFinish
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,12 @@ SafariZoneGameOver:
|
||||||
ld c, 0 ; BANK(SFX_Safari_Zone_PA)
|
ld c, 0 ; BANK(SFX_Safari_Zone_PA)
|
||||||
ld a, SFX_SAFARI_ZONE_PA
|
ld a, SFX_SAFARI_ZONE_PA
|
||||||
call PlaySound
|
call PlaySound
|
||||||
|
|
||||||
call WaitForSoundToFinish
|
call WaitForSoundToFinish
|
||||||
|
;.waitForMusicToPlay
|
||||||
|
; ld a, [wChannelSoundIDs + Ch5]
|
||||||
|
; cp SFX_SAFARI_ZONE_PA
|
||||||
|
; jr nz, .waitForMusicToPlay
|
||||||
|
|
||||||
ld a, TEXT_SAFARI_GAME_OVER
|
ld a, TEXT_SAFARI_GAME_OVER
|
||||||
ldh [hSpriteIndexOrTextID], a
|
ldh [hSpriteIndexOrTextID], a
|
||||||
|
|
|
||||||
|
|
@ -1735,11 +1735,16 @@ ItemUsePokeflute:
|
||||||
and $80
|
and $80
|
||||||
jr nz, .skipMusic
|
jr nz, .skipMusic
|
||||||
call WaitForSoundToFinish ; wait for sound to end
|
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
|
;.musicWaitLoop ; wait for music to finish playing
|
||||||
; ld a, [wChannelSoundIDs + Ch7]
|
; ld a, [wChannelSoundIDs + Ch7]
|
||||||
; and a ; music off?
|
; and a ; music off?
|
||||||
; jr nz, .musicWaitLoop
|
; jr nz, .musicWaitLoop
|
||||||
|
|
||||||
.skipMusic
|
.skipMusic
|
||||||
ld hl, FluteWokeUpText
|
ld hl, FluteWokeUpText
|
||||||
jp PrintText
|
jp PrintText
|
||||||
|
|
|
||||||
|
|
@ -147,6 +147,8 @@ HandlePokedexSideMenu:
|
||||||
call PlayCry
|
call PlayCry
|
||||||
pop af
|
pop af
|
||||||
ld [wd11e], a
|
ld [wd11e], a
|
||||||
|
; call GetCryData
|
||||||
|
; call PlaySound
|
||||||
jr .handleMenuInput
|
jr .handleMenuInput
|
||||||
|
|
||||||
.choseArea
|
.choseArea
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,9 @@ AnimateHealingMachine:
|
||||||
ld a, [wChannel1MusicID]
|
ld a, [wChannel1MusicID]
|
||||||
and a
|
and a
|
||||||
jr nz, .waitLoop2
|
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
|
ld c, 32
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
|
|
|
||||||
|
|
@ -122,6 +122,7 @@ _LeaveMapAnim::
|
||||||
.playerNotStandingOnWarpPadOrHole
|
.playerNotStandingOnWarpPadOrHole
|
||||||
ld a, $4
|
ld a, $4
|
||||||
call StopMusic
|
call StopMusic
|
||||||
|
call WaitForSongToFinish
|
||||||
ld a, [wd732]
|
ld a, [wd732]
|
||||||
bit 6, a ; is the last used pokemon center the destination?
|
bit 6, a ; is the last used pokemon center the destination?
|
||||||
jr z, .flyAnimation
|
jr z, .flyAnimation
|
||||||
|
|
|
||||||
|
|
@ -224,11 +224,12 @@ BillsPCDeposit:
|
||||||
jp c, BillsPCMenu
|
jp c, BillsPCMenu
|
||||||
call DisplayDepositWithdrawMenu
|
call DisplayDepositWithdrawMenu
|
||||||
jp nc, BillsPCMenu
|
jp nc, BillsPCMenu
|
||||||
call WaitForSoundToFinish
|
|
||||||
ld a, [wcf91]
|
ld a, [wcf91]
|
||||||
|
|
||||||
call PlayCry
|
call PlayCry
|
||||||
; call GetCryData
|
; call GetCryData
|
||||||
; call PlaySoundWaitForCurrent
|
; call PlaySoundWaitForCurrent
|
||||||
|
|
||||||
ld a, PARTY_TO_BOX
|
ld a, PARTY_TO_BOX
|
||||||
ld [wMoveMonType], a
|
ld [wMoveMonType], a
|
||||||
call MoveMon
|
call MoveMon
|
||||||
|
|
@ -278,11 +279,12 @@ BillsPCWithdraw:
|
||||||
ld a, [wWhichPokemon]
|
ld a, [wWhichPokemon]
|
||||||
ld hl, wBoxMonNicks
|
ld hl, wBoxMonNicks
|
||||||
call GetPartyMonName
|
call GetPartyMonName
|
||||||
call WaitForSoundToFinish
|
|
||||||
ld a, [wcf91]
|
ld a, [wcf91]
|
||||||
|
|
||||||
call PlayCry
|
call PlayCry
|
||||||
; call GetCryData
|
; call GetCryData
|
||||||
; call PlaySoundWaitForCurrent
|
; call PlaySoundWaitForCurrent
|
||||||
|
|
||||||
xor a ; BOX_TO_PARTY
|
xor a ; BOX_TO_PARTY
|
||||||
ld [wMoveMonType], a
|
ld [wMoveMonType], a
|
||||||
call MoveMon
|
call MoveMon
|
||||||
|
|
|
||||||
|
|
@ -61,14 +61,16 @@ PlayDefaultMusicCommon::
|
||||||
.next4
|
.next4
|
||||||
ld a, c
|
ld a, c
|
||||||
ld [wAudioFadeOutControl], a
|
ld [wAudioFadeOutControl], a
|
||||||
|
and a
|
||||||
|
jr nz, .next5
|
||||||
|
inc a
|
||||||
|
.next5
|
||||||
|
ld [wMusicFade], a
|
||||||
|
|
||||||
ld a, b
|
ld a, b
|
||||||
ld [wLastMusicSoundID], a
|
ld [wLastMusicSoundID], a
|
||||||
ld [wNewSoundID], a
|
ld [wNewSoundID], a
|
||||||
|
|
||||||
ld [wMusicFadeID], a
|
ld [wMusicFadeID], a
|
||||||
ld a, 8
|
|
||||||
ld [wMusicFade], a
|
|
||||||
;call FadeMusic ; called in updatemusic
|
|
||||||
ret
|
ret
|
||||||
|
|
||||||
;UpdateMusic6Times::
|
;UpdateMusic6Times::
|
||||||
|
|
|
||||||
|
|
@ -760,6 +760,7 @@ HandleBlackOut::
|
||||||
call GBFadeOutToBlack
|
call GBFadeOutToBlack
|
||||||
ld a, $08
|
ld a, $08
|
||||||
call StopMusic
|
call StopMusic
|
||||||
|
call WaitForSongToFinish
|
||||||
ld hl, wd72e
|
ld hl, wd72e
|
||||||
res 5, [hl]
|
res 5, [hl]
|
||||||
ld a, BANK(ResetStatusAndHalveMoneyOnBlackout) ; also BANK(SpecialWarpIn) and BANK(SpecialEnterMap)
|
ld a, BANK(ResetStatusAndHalveMoneyOnBlackout) ; also BANK(SpecialWarpIn) and BANK(SpecialEnterMap)
|
||||||
|
|
@ -1256,17 +1257,16 @@ CollisionCheckOnLand::
|
||||||
call CheckTilePassable
|
call CheckTilePassable
|
||||||
jr nc, .noCollision
|
jr nc, .noCollision
|
||||||
.collision
|
.collision
|
||||||
|
|
||||||
; ld a, [wChannelSoundIDs + Ch5]
|
; ld a, [wChannelSoundIDs + Ch5]
|
||||||
; cp SFX_COLLISION ; check if collision sound is already playing
|
; cp SFX_COLLISION ; check if collision sound is already playing
|
||||||
; jr z, .setCarry
|
; jr z, .setCarry
|
||||||
|
|
||||||
; 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
|
||||||
call PlaySound ; play collision sound (if it's not already playing)
|
call PlaySound ; play collision sound (if it's not already playing)
|
||||||
.setCarry
|
.setCarry
|
||||||
|
|
@ -1945,17 +1945,16 @@ 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 + Ch5]
|
; ld a, [wChannelSoundIDs + Ch5]
|
||||||
; cp SFX_COLLISION ; check if collision sound is already playing
|
; cp SFX_COLLISION ; check if collision sound is already playing
|
||||||
; jr z, .setCarry
|
; jr z, .setCarry
|
||||||
|
|
||||||
; 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
|
||||||
call PlaySound ; play collision sound (if it's not already playing)
|
call PlaySound ; play collision sound (if it's not already playing)
|
||||||
.setCarry
|
.setCarry
|
||||||
|
|
@ -2307,6 +2306,10 @@ LoadMapHeader::
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [wMapMusicSoundID], a ; music 1
|
ld [wMapMusicSoundID], a ; music 1
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
|
|
||||||
|
; give vanilla red a fair shot at running our savs
|
||||||
|
ld a, BANK("Audio Engine 1")
|
||||||
|
|
||||||
ld [wMapMusicROMBank], a ; music 2
|
ld [wMapMusicROMBank], a ; music 2
|
||||||
pop af
|
pop af
|
||||||
ldh [hLoadedROMBank], a
|
ldh [hLoadedROMBank], a
|
||||||
|
|
|
||||||
|
|
@ -65,6 +65,11 @@ PewterJigglypuffText:
|
||||||
call IsSongPlaying
|
call IsSongPlaying
|
||||||
pop hl
|
pop hl
|
||||||
jr c, .spinMovementLoop
|
jr c, .spinMovementLoop
|
||||||
|
; ld a, [wChannelSoundIDs]
|
||||||
|
; ld b, a
|
||||||
|
; ld a, [wChannelSoundIDs + Ch2]
|
||||||
|
; or b
|
||||||
|
; jr nz, .spinMovementLoop
|
||||||
|
|
||||||
ld c, 48
|
ld c, 48
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,13 @@ MomHealPokemon:
|
||||||
ld a, MUSIC_PKMN_HEALED
|
ld a, MUSIC_PKMN_HEALED
|
||||||
ld [wNewSoundID], a
|
ld [wNewSoundID], a
|
||||||
call PlayMusic
|
call PlayMusic
|
||||||
|
|
||||||
call WaitForSongToFinish
|
call WaitForSongToFinish
|
||||||
|
;.next
|
||||||
|
; ld a, [wChannelSoundIDs]
|
||||||
|
; cp MUSIC_PKMN_HEALED
|
||||||
|
; jr z, .next
|
||||||
|
|
||||||
ld a, [wMapMusicSoundID]
|
ld a, [wMapMusicSoundID]
|
||||||
ld [wNewSoundID], a
|
ld [wNewSoundID], a
|
||||||
call PlayMusic
|
call PlayMusic
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,13 @@ SSAnne7RubText:
|
||||||
ld a, MUSIC_PKMN_HEALED
|
ld a, MUSIC_PKMN_HEALED
|
||||||
ld [wNewSoundID], a
|
ld [wNewSoundID], a
|
||||||
call PlayMusic
|
call PlayMusic
|
||||||
|
|
||||||
call WaitForSongToFinish
|
call WaitForSongToFinish
|
||||||
|
;.asm_61910
|
||||||
|
; ld a, [wChannelSoundIDs]
|
||||||
|
; cp MUSIC_PKMN_HEALED
|
||||||
|
; jr z, .asm_61910
|
||||||
|
|
||||||
call PlayDefaultMusic
|
call PlayDefaultMusic
|
||||||
SetEvent EVENT_RUBBED_CAPTAINS_BACK
|
SetEvent EVENT_RUBBED_CAPTAINS_BACK
|
||||||
ld hl, wd72d
|
ld hl, wd72d
|
||||||
|
|
|
||||||
7
wram.asm
7
wram.asm
|
|
@ -25,7 +25,7 @@ wTempoModifier::
|
||||||
|
|
||||||
wSFXDontWait:: ds 1
|
wSFXDontWait:: ds 1
|
||||||
|
|
||||||
wMusic::
|
; crysaudio start
|
||||||
|
|
||||||
; nonzero if playing
|
; nonzero if playing
|
||||||
wMusicPlaying:: db
|
wMusicPlaying:: db
|
||||||
|
|
@ -123,10 +123,7 @@ wCurSFX::
|
||||||
|
|
||||||
wAudioEnd::
|
wAudioEnd::
|
||||||
|
|
||||||
wMapMusic:: db
|
; crysaudio end
|
||||||
|
|
||||||
;wDontPlayMapMusicOnReload:: db
|
|
||||||
wMusicEnd::
|
|
||||||
|
|
||||||
|
|
||||||
SECTION "Sprite State Data", WRAM0
|
SECTION "Sprite State Data", WRAM0
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue