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:
Rangi 2020-07-07 18:50:58 -04:00
parent 51ac538c25
commit bbf2f51a02
35 changed files with 1754 additions and 1758 deletions

31
home/delay.asm Normal file
View 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