mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-22 15:12:18 +13:00
Move all code out of home.asm into home/
This results in 64 home/*.asm files, comparable to pokecrystal's 57.
This commit is contained in:
parent
51ac538c25
commit
bbf2f51a02
35 changed files with 1754 additions and 1758 deletions
31
home/delay.asm
Normal file
31
home/delay.asm
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
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 + Ch5
|
||||
xor a
|
||||
or [hl]
|
||||
inc hl
|
||||
or [hl]
|
||||
inc hl
|
||||
inc hl
|
||||
or [hl]
|
||||
jr nz, .waitLoop
|
||||
pop hl
|
||||
ret
|
||||
Loading…
Add table
Add a link
Reference in a new issue