mapgen: Fixed collision flags not being set when overwriting door patterns
authorLukas Krickl <lukas@krickl.dev>
Wed, 30 Jul 2025 04:30:26 +0000 (06:30 +0200)
committerLukas Krickl <lukas@krickl.dev>
Wed, 30 Jul 2025 04:30:26 +0000 (06:30 +0200)
src/mapgen.s

index 2ab91b74bcf88308c2f4108670c2985c24ee45c8..3e138fdb0de52b7fc7edb13ffcfbe4354ecc35a0 100644 (file)
@@ -282,6 +282,8 @@ mapgen_draw_room_pattern_row:
 @x_loop:
     ld a, [bc]
                call mapgen_fix_door_adjacent_to_collider
+               ; save result pattern value
+               push af
 
     ; read from tile and flag tables and write to map
 
@@ -291,7 +293,7 @@ mapgen_draw_room_pattern_row:
     ld [hl+], a ; write tile
     
     ; read pattern again
-    ld a, [bc] 
+               pop af
     
     ; now flags table
     mapgen_read_value_from_table room_pattern_flags_translation