map: added separate call for clearing act_sg
authorLukas Krickl <lukas@krickl.dev>
Sat, 2 Aug 2025 10:20:17 +0000 (12:20 +0200)
committerLukas Krickl <lukas@krickl.dev>
Sat, 2 Aug 2025 10:20:17 +0000 (12:20 +0200)
src/map.s

index d59ea47042ed09444c79b4512262ab2ca3a6c1cc..57c61269185f98f2d1727960b15e1ec11db742e1 100644 (file)
--- 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