mirror of
https://github.com/pret/pokeyellow.git
synced 2026-05-21 18:37:03 -05:00
33 lines
413 B
NASM
33 lines
413 B
NASM
DelayFrames::
|
|
; wait c frames
|
|
call DelayFrame
|
|
dec c
|
|
jr nz, DelayFrames
|
|
ret
|
|
|
|
PlaySoundWaitForCurrent::
|
|
push af
|
|
call WaitForSoundToFinish
|
|
pop af
|
|
jp PlaySound
|
|
|
|
; Wait for sound to finish playing
|
|
WaitForSoundToFinish::
|
|
ld a, [wLowHealthAlarm]
|
|
and $80
|
|
ret nz
|
|
push hl
|
|
.waitLoop
|
|
ld hl, wChannelSoundIDs + CHAN5
|
|
xor a
|
|
or [hl]
|
|
inc hl
|
|
or [hl]
|
|
inc hl
|
|
inc hl
|
|
or [hl]
|
|
and a
|
|
jr nz, .waitLoop
|
|
pop hl
|
|
ret
|