From 9b8f8c08c827505004b6c11853020d71dee67f48 Mon Sep 17 00:00:00 2001 From: villadelfia Date: Wed, 18 Oct 2023 02:01:35 +0000 Subject: [PATCH] Update 'src/main.asm' --- src/main.asm | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/main.asm b/src/main.asm index a4e09f0..08bff8e 100644 --- a/src/main.asm +++ b/src/main.asm @@ -73,19 +73,11 @@ EventLoop:: EventLoopPostHandler:: ; Wait for vblank. -: ldh a, [rLY] - cp a, 144 - jr nz, :- + wait_vblank ; Do OAM DMA. - call hOAMDMA - - ; Call the current state's vblank handler. - ld a, [wStateVBlankHandler] - ld l, a - ld a, [wStateVBlankHandler + 1] - ld h, a - jp hl + ; This will chain jump into the vblank handler. + jp hOAMDMA ; The VBlank Handler is expected to end with jp EventLoop.