From 800fc8d82ef00389dbc44e523bb6b0b0de7bd3d6 Mon Sep 17 00:00:00 2001 From: Lukas Krickl Date: Sat, 20 Sep 2025 19:49:21 +0200 Subject: [PATCH] video: Added despawn logic for actors going off-screen --- src/video.s | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/video.s b/src/video.s index fc61a84..0aad5f0 100644 --- a/src/video.s +++ b/src/video.s @@ -80,6 +80,14 @@ scroll_up_adjust: add a, 1 ld [hl+], a ; hl = page y pos hi + ; check if off-screen + pop de + push de + push af + cp a, 0x70 + call nc, actor_despawn + pop af + ld a, [hl] adc a, 0 ld [hl], a -- 2.30.2