Map loads now always disable interrupts and the lcd.
In the future maybe we should only disable lcd if we are swapping out
tilesets.
During a map load it would probably be enough to wait for blank
for each row of tiles loaded.
call video_init
call audio_init
- call map_init
call lcd_on
call vblank_wait
call enableinterrupts
+
+ ; init initial map
+ call map_init
; main for gameply
#ifndef TEST_BUILD
; loads a new map
; inputs:
; hl: map ptr
+ ; disables and enables interrupts
+ ; and lcd
+ ; TODO: do not touch lcd or interrupts if
+ ; they were not enabled!
map_load:
+ ; disable interruts
+ ; wait for next blank
+ ; disable lcd
+ call disableinterrutpts
+ call next_vblank_wait
+ call lcd_off
+
push hl
call map_draw_area_title
pop hl
call map_draw_all
+ ; restore lcd and interrupts
+ call lcd_on
+ call vblank_wait
+ call enableinterrupts
+
ret
; draws map title to UI (SCRN1)