Insert Crystal audio engine and music

most credit goes to Sanqui
This commit is contained in:
dannye 2017-05-07 15:30:08 -05:00
parent 832c28eaea
commit 87eed68710
586 changed files with 193763 additions and 6447 deletions

View file

@ -17,9 +17,9 @@ ShakeElevator:
add d
ld [hSCY], a
push bc
ld c, BANK(SFX_Collision_1)
ld c, 0 ; BANK(SFX_Collision_1)
ld a, SFX_COLLISION
call PlayMusic
call PlaySound
pop bc
ld c, 2
call DelayFrames
@ -29,9 +29,9 @@ ShakeElevator:
ld [hSCY], a
ld a, $ff
call PlaySound
ld c, BANK(SFX_Safari_Zone_PA)
ld c, 0 ; BANK(SFX_Safari_Zone_PA)
ld a, SFX_SAFARI_ZONE_PA
call PlayMusic
call PlaySound
.musicLoop
ld a, [wChannelSoundIDs + Ch4]
cp SFX_SAFARI_ZONE_PA

View file

@ -1,4 +1,7 @@
AnimateHealingMachine:
xor a
call PlayMusic
ld de, PokeCenterFlashingMonitorAndHealBall
ld hl, vChars0 + $7c0
lb bc, BANK(PokeCenterFlashingMonitorAndHealBall), $03 ; loads one too many tiles
@ -15,15 +18,17 @@ AnimateHealingMachine:
ld hl, wOAMBuffer + $84
ld de, PokeCenterOAMData
call CopyHealingMachineOAM
ld a, 4
ld [wAudioFadeOutControl], a
ld a, $ff
ld [wNewSoundID], a
call PlaySound
.waitLoop
ld a, [wAudioFadeOutControl]
and a ; is fade-out finished?
jr nz, .waitLoop ; if not, check again
; ld a, 4
; ld [wAudioFadeOutControl], a
; ld a, $ff
; ld [wNewSoundID], a
; call PlaySound
;.waitLoop
; ld a, [wAudioFadeOutControl]
; and a ; is fade-out finished?
; jr nz, .waitLoop ; if not, check again
ld a, [wPartyCount]
ld b, a
.partyLoop
@ -35,24 +40,25 @@ AnimateHealingMachine:
dec b
jr nz, .partyLoop
ld a, [wAudioROMBank]
cp BANK(Audio3_UpdateMusic)
cp $1f ; 0 ; BANK(Audio3_UpdateMusic) XXXXX
ld [wAudioSavedROMBank], a
jr nz, .next
ld a, $ff
ld [wNewSoundID], a
call PlaySound
ld a, BANK(Music_PkmnHealed)
ld a, 0 ; BANK(Music_PkmnHealed)
ld [wAudioROMBank], a
.next
ld a, MUSIC_PKMN_HEALED
ld [wNewSoundID], a
call PlaySound
call PlayMusic
ld d, $28
call FlashSprite8Times
.waitLoop2
ld a, [wChannelSoundIDs]
cp MUSIC_PKMN_HEALED ; is the healed music still playing?
jr z, .waitLoop2 ; if so, check gain
ld a, [Channel1MusicID]
and a
jr nz, .waitLoop2
ld c, 32
call DelayFrames
pop af
@ -60,6 +66,8 @@ AnimateHealingMachine:
pop hl
pop af
ld [hl], a
jp UpdateSprites
PokeCenterFlashingMonitorAndHealBall:

View file

@ -117,6 +117,9 @@ UpdateNPCSprite:
ld hl, wMapSpriteData
add l
ld l, a
jr nc, .nc
inc h
.nc
ld a, [hl] ; read movement byte 2
ld [wCurSpriteMovement2], a
ld h, $c1

View file

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

View file

@ -30,7 +30,7 @@ DisplayPokemonCenterDialogue_:
ld a, [wMapMusicSoundID]
ld [wLastMusicSoundID], a
ld [wNewSoundID], a
call PlaySound
call PlayMusic
ld hl, PokemonFightingFitText
call PrintText
ld a, $14