actor: when an enemy dies it now changes the tile type
authorLukas Krickl <lukas@krickl.dev>
Fri, 6 Feb 2026 06:51:47 +0000 (07:51 +0100)
committerLukas Krickl <lukas@krickl.dev>
Fri, 6 Feb 2026 06:51:47 +0000 (07:51 +0100)
src/actor.s

index efe03c17577969f4fd7c42123abf9952812e341d..ede45aca72f118d9bd61180788349fec28b32ef3 100644 (file)
@@ -330,13 +330,32 @@ act_die:
        ; actor dealloc
        ; sets type to 0
        ; and clears tact
+       ;       updates tile type
+       ; requests redraw
        ; inputs:
        ;               de: bat
 act_die_clear_tact:
        xor a, a
        ld [de], a ; set type == 0
-
+       
+       push de
        call act_clear_tact
+       pop de
+       
+       ld hl, act_pos_y
+       add hl, de
+       ld a, [hl+]
+       ld b, a
+       ld a, [hl]
+       ld c, a
+       call map_get_tile
+
+       ld a, TT_BLOOD
+       ld [hl], a
+
+       ld a, [draw_flags]
+       or a, DRAW_F_REDRAW_MAP
+       ld [draw_flags], a
 
        ret