From: Lukas Krickl Date: Mon, 23 Dec 2024 16:30:05 +0000 (+0100) Subject: Room loading now disables lcd to draw new room. X-Git-Url: https://git.krickl.dev/?a=commitdiff_plain;h=d0c3d27d3a01cd01c0586cfc452ed486237f9cc8;p=gbrg%2F.git Room loading now disables lcd to draw new room. This should eventually become a smooth transition --- diff --git a/src/map.s b/src/map.s index fa030de..ff6481e 100644 --- a/src/map.s +++ b/src/map.s @@ -112,7 +112,9 @@ room_goto_player_pos: room_goto: ; TODO: save current tables back - ; TODO: weird oob reads when calling room_load_from + call disableinterrutpts + call vblank_wait + call lcd_off ld hl, curr_room_exits ; ptr to exit table ld a, [hl+] @@ -129,14 +131,18 @@ room_goto: ld d, a ld a, [hl] ld e, a - + call room_load_from ; its player's turn again ld a, WHO_PLAYER ld [who], a + + call lcd_on + call enableinterrupts ret + ; loads actors from ; [curr_room_init_act] diff --git a/src/video.s b/src/video.s index 21a4244..d80eb5d 100644 --- a/src/video.s +++ b/src/video.s @@ -119,3 +119,4 @@ copy_tiles: call memcpy ret +