Update 'src/main.asm'
This commit is contained in:
parent
1f7f17a353
commit
9b8f8c08c8
14
src/main.asm
14
src/main.asm
|
@ -73,19 +73,11 @@ EventLoop::
|
||||||
EventLoopPostHandler::
|
EventLoopPostHandler::
|
||||||
|
|
||||||
; Wait for vblank.
|
; Wait for vblank.
|
||||||
: ldh a, [rLY]
|
wait_vblank
|
||||||
cp a, 144
|
|
||||||
jr nz, :-
|
|
||||||
|
|
||||||
; Do OAM DMA.
|
; Do OAM DMA.
|
||||||
call hOAMDMA
|
; This will chain jump into the vblank handler.
|
||||||
|
jp hOAMDMA
|
||||||
; Call the current state's vblank handler.
|
|
||||||
ld a, [wStateVBlankHandler]
|
|
||||||
ld l, a
|
|
||||||
ld a, [wStateVBlankHandler + 1]
|
|
||||||
ld h, a
|
|
||||||
jp hl
|
|
||||||
|
|
||||||
; The VBlank Handler is expected to end with jp EventLoop.
|
; The VBlank Handler is expected to end with jp EventLoop.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue