Update 'src/main.asm'
This commit is contained in:
parent
97cb802152
commit
fb022aa6d7
12
src/main.asm
12
src/main.asm
|
@ -7,9 +7,8 @@ INCLUDE "res/tiles.inc"
|
||||||
INCLUDE "res/gameplay_map.inc"
|
INCLUDE "res/gameplay_map.inc"
|
||||||
|
|
||||||
|
|
||||||
SECTION "Globals", WRAM0
|
SECTION "Globals", HRAM
|
||||||
wStateEventHandler:: ds 2
|
hGameState:: ds 1
|
||||||
wStateVBlankHandler:: ds 2
|
|
||||||
|
|
||||||
|
|
||||||
SECTION "Stack", WRAM0
|
SECTION "Stack", WRAM0
|
||||||
|
@ -65,11 +64,8 @@ EventLoop::
|
||||||
call HandleTimers
|
call HandleTimers
|
||||||
|
|
||||||
; Call the current state's event handler.
|
; Call the current state's event handler.
|
||||||
ld a, [wStateEventHandler]
|
ldh a, [hGameState]
|
||||||
ld l, a
|
jp nz, GamePlayEventLoopHandler
|
||||||
ld a, [wStateEventHandler + 1]
|
|
||||||
ld h, a
|
|
||||||
jp hl
|
|
||||||
EventLoopPostHandler::
|
EventLoopPostHandler::
|
||||||
|
|
||||||
; Wait for vblank.
|
; Wait for vblank.
|
||||||
|
|
Loading…
Reference in New Issue