diff options
author | libjet <libj3t@gmail.com> | 2020-02-19 17:26:28 +0000 |
---|---|---|
committer | libjet <libj3t@gmail.com> | 2020-02-19 17:26:28 +0000 |
commit | 336fe6b368c74bb95ff0d165c1b04cda18ac1fc2 (patch) | |
tree | cf0db088a4c67cc3fa9c1a8d0e8a6f256bf4e3dc /home/delay.asm | |
parent | 4f1d434564bf3b6c1c469ebb3e33e1475d7e2136 (diff) |
Update some included files at the start of home.asm
Diffstat (limited to 'home/delay.asm')
-rw-r--r-- | home/delay.asm | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/home/delay.asm b/home/delay.asm index b9b7ac1f..4ad25ef2 100644 --- a/home/delay.asm +++ b/home/delay.asm @@ -1,16 +1,19 @@ -DelayFrame:: ; 32e - ld a, $1 - ld [$ceea], a -.asm_333 - halt - ld a, [$ceea] +DelayFrame:: +; Wait for one frame + ld a, 1 + ld [wVBlankOccurred], a + +; Wait for the next VBlank, halting to conserve battery +.halt + halt ; rgbasm adds a nop after this instruction by default + ld a, [wVBlankOccurred] and a - jr nz, .asm_333 + jr nz, .halt ret -DelayFrames:: ; 33c -.loop +DelayFrames:: +; Wait c frames call DelayFrame dec c - jr nz, .loop + jr nz, DelayFrames ret |