From 974b472832f42b1f9c6e65cd1a501c4952118fac Mon Sep 17 00:00:00 2001 From: Lukas Krickl Date: Sat, 20 Sep 2025 20:03:20 +0200 Subject: [PATCH] map: Added disable scroll object --- src/map.s | 1 + src/mapobj.s | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/src/map.s b/src/map.s index 09b1c5c..35e5add 100644 --- a/src/map.s +++ b/src/map.s @@ -237,4 +237,5 @@ l1_map: l1_objs: modef MOT_SET_PAT, 0, 3, pat_center_grass modef MOT_SET_PAT, 0, 5, pat_empty + modef MOT_DISABLE_SCROLL, 0, 0x20, 0 modef MOT_NOP, 0, 0xFF, 0 diff --git a/src/mapobj.s b/src/mapobj.s index 2ceab5d..98487c0 100644 --- a/src/mapobj.s +++ b/src/mapobj.s @@ -92,12 +92,18 @@ mo_set_pat: ; inputs: ; de: map object ptr mo_disable_scroll: + ld a, [game_flags] + or a, GPF_NO_SCROLL + ld [game_flags], a ret ; enables map scrolling ; inputs: ; de: map object ptr mo_enable_scroll: + ld a, [game_flags] + and a, ~GPF_NO_SCROLL & 0xFF + ld [game_flags], a ret ; spawns a collision rectangle -- 2.30.2