mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-06 15:45:24 +13:00
commented audio code
This commit is contained in:
parent
40c1ecb437
commit
2b01815999
42 changed files with 1740 additions and 1515 deletions
|
|
@ -33,7 +33,7 @@ ShakeElevator: ; 7bf15 (1e:7f15)
|
|||
ld a, SFX_SAFARI_ZONE_PA
|
||||
call PlayMusic
|
||||
.musicLoop
|
||||
ld a, [wc02a]
|
||||
ld a, [wChannelSoundIDs + CH4]
|
||||
cp $b9
|
||||
jr z, .musicLoop
|
||||
call UpdateSprites
|
||||
|
|
|
|||
|
|
@ -15,44 +15,44 @@ AnimateHealingMachine: ; 70433 (1c:4433)
|
|||
ld hl, wOAMBuffer + $84
|
||||
ld de, PokeCenterOAMData
|
||||
call CopyHealingMachineOAM
|
||||
ld a, $4
|
||||
ld [wMusicHeaderPointer], a
|
||||
ld a, 4
|
||||
ld [wAudioFadeOutControl], a
|
||||
ld a, $ff
|
||||
ld [wc0ee], a
|
||||
ld [wNewSoundID], a
|
||||
call PlaySound
|
||||
.asm_70464
|
||||
ld a, [wMusicHeaderPointer]
|
||||
and a
|
||||
jr nz, .asm_70464
|
||||
.waitLoop
|
||||
ld a, [wAudioFadeOutControl]
|
||||
and a ; is fade-out finished?
|
||||
jr nz, .waitLoop ; if not, check again
|
||||
ld a, [wPartyCount]
|
||||
ld b, a
|
||||
.asm_7046e
|
||||
.partyLoop
|
||||
call CopyHealingMachineOAM
|
||||
ld a, SFX_HEALING_MACHINE
|
||||
call PlaySound
|
||||
ld c, 30
|
||||
call DelayFrames
|
||||
dec b
|
||||
jr nz, .asm_7046e
|
||||
ld a, [wc0ef]
|
||||
jr nz, .partyLoop
|
||||
ld a, [wAudioROMBank]
|
||||
cp BANK(Audio3_UpdateMusic)
|
||||
ld [wc0f0], a
|
||||
jr nz, .asm_70495
|
||||
ld [wAudioSavedROMBank], a
|
||||
jr nz, .next
|
||||
ld a, $ff
|
||||
ld [wc0ee], a
|
||||
ld [wNewSoundID], a
|
||||
call PlaySound
|
||||
ld a, BANK(Music_PkmnHealed)
|
||||
ld [wc0ef], a
|
||||
.asm_70495
|
||||
ld [wAudioROMBank], a
|
||||
.next
|
||||
ld a, MUSIC_PKMN_HEALED
|
||||
ld [wc0ee], a
|
||||
ld [wNewSoundID], a
|
||||
call PlaySound
|
||||
ld d, $28
|
||||
call FlashSprite8Times
|
||||
.asm_704a2
|
||||
ld a, [wc026]
|
||||
cp MUSIC_PKMN_HEALED
|
||||
jr z, .asm_704a2
|
||||
.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
|
||||
pop af
|
||||
|
|
|
|||
|
|
@ -163,10 +163,10 @@ PewterMuseumGuyMovementScriptPointerTable: ; 1a510 (6:6510)
|
|||
|
||||
PewterMovementScript_WalkToMuseum: ; 1a514 (6:6514)
|
||||
ld a, BANK(Music_MuseumGuy)
|
||||
ld [wc0ef], a
|
||||
ld [wc0f0], a
|
||||
ld [wAudioROMBank], a
|
||||
ld [wAudioSavedROMBank], a
|
||||
ld a, MUSIC_MUSEUM_GUY
|
||||
ld [wc0ee], a
|
||||
ld [wNewSoundID], a
|
||||
call PlaySound
|
||||
ld a, [wSpriteIndex]
|
||||
swap a
|
||||
|
|
@ -219,10 +219,10 @@ PewterGymGuyMovementScriptPointerTable: ; 1a57d (6:657d)
|
|||
|
||||
PewterMovementScript_WalkToGym: ; 1a581 (6:6581)
|
||||
ld a, BANK(Music_MuseumGuy)
|
||||
ld [wc0ef], a
|
||||
ld [wc0f0], a
|
||||
ld [wAudioROMBank], a
|
||||
ld [wAudioSavedROMBank], a
|
||||
ld a, MUSIC_MUSEUM_GUY
|
||||
ld [wc0ee], a
|
||||
ld [wNewSoundID], a
|
||||
call PlaySound
|
||||
ld a, [wSpriteIndex]
|
||||
swap a
|
||||
|
|
|
|||
|
|
@ -24,12 +24,12 @@ DisplayPokemonCenterDialogue_: ; 6fe6 (1:6fe6)
|
|||
predef HealParty
|
||||
callba AnimateHealingMachine ; do the healing machine animation
|
||||
xor a
|
||||
ld [wMusicHeaderPointer], a
|
||||
ld a, [wc0f0]
|
||||
ld [wc0ef], a
|
||||
ld a, [wd35b]
|
||||
ld [wcfca], a
|
||||
ld [wc0ee], a
|
||||
ld [wAudioFadeOutControl], a
|
||||
ld a, [wAudioSavedROMBank]
|
||||
ld [wAudioROMBank], a
|
||||
ld a, [wMapMusicSoundID]
|
||||
ld [wLastMusicSoundID], a
|
||||
ld [wNewSoundID], a
|
||||
call PlaySound
|
||||
ld hl, PokemonFightingFitText
|
||||
call PrintText
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue