From d0c3d27d3a01cd01c0586cfc452ed486237f9cc8 Mon Sep 17 00:00:00 2001 From: Lukas Krickl Date: Mon, 23 Dec 2024 17:30:05 +0100 Subject: [PATCH] Room loading now disables lcd to draw new room. This should eventually become a smooth transition --- src/map.s | 10 ++++++++-- src/video.s | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) 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 + -- 2.30.2