mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-06 15:45:24 +13:00
Fix battle sound pitch/tempo modifiers
This commit is contained in:
parent
b2afaae7ab
commit
17044ab7eb
6 changed files with 200 additions and 43 deletions
|
|
@ -288,6 +288,48 @@ endr
|
|||
pop hl
|
||||
ret
|
||||
|
||||
PlayBattleSound::
|
||||
push hl
|
||||
push de
|
||||
push bc
|
||||
push af
|
||||
|
||||
push af
|
||||
ld a, c
|
||||
ld [wCryPitch], a
|
||||
ld a, b
|
||||
ld [wCryPitch + 1], a
|
||||
ld a, e
|
||||
ld [wCryLength], a
|
||||
ld a, d
|
||||
ld [wCryLength + 1], a
|
||||
pop af
|
||||
|
||||
ld e, a
|
||||
xor a
|
||||
ld d, a
|
||||
|
||||
ldh a, [hLoadedROMBank]
|
||||
push af
|
||||
|
||||
ld a, BANK(_PlayBattleSound)
|
||||
ldh [hLoadedROMBank], a
|
||||
ld [MBC1RomBank], a
|
||||
|
||||
ld a, e
|
||||
ld [wCurSFX], a
|
||||
call _PlayBattleSound
|
||||
|
||||
pop af
|
||||
ldh [hLoadedROMBank], a
|
||||
ld [MBC1RomBank], a
|
||||
|
||||
pop af
|
||||
pop bc
|
||||
pop de
|
||||
pop hl
|
||||
ret
|
||||
|
||||
PlaySFX::
|
||||
; Play sound effect de.
|
||||
; Sound effects are ordered by priority (highest to lowest)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue