From 9f99d2385d42c0c1b791ab5e45dacf83749ba2cc Mon Sep 17 00:00:00 2001 From: Lukas Krickl Date: Sat, 2 Aug 2025 12:20:17 +0200 Subject: [PATCH] map: added separate call for clearing act_sg --- src/map.s | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/map.s b/src/map.s index d59ea47..57c6126 100644 --- a/src/map.s +++ b/src/map.s @@ -3,6 +3,16 @@ map_init: ld hl, map_c_header + ; inits a new floor + ; inputs: + ; hl: map ptr + ; calls map_load after but also clerars act_sg +map_init_floor: + ; clear act save data + push hl + call act_save_init + pop hl + ; loads a new map ; inputs: ; hl: map ptr @@ -11,11 +21,6 @@ map_init: ; TODO: do not touch lcd or interrupts if ; they were not enabled! map_load: - ; clear act save data - push hl - call act_save_init - pop hl - ; backup the map header ld a, l ld [map_header], a -- 2.30.2