jep-hack/home/delay.asm
Zeta_Null 2f8a41f833 First Commit
Upload literally everything from the pokecrystal16 expand-move-ID branch
2023-09-10 12:35:35 -04:00

21 lines
273 B
NASM

DelayFrame::
; Wait for one frame
ld a, 1
ld [wVBlankOccurred], a
; Wait for the next VBlank, halting to conserve battery
.halt
halt
nop
ld a, [wVBlankOccurred]
and a
jr nz, .halt
ret
DelayFrames::
; Wait c frames
call DelayFrame
dec c
jr nz, DelayFrames
ret