projects
/
gbrg
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
800fc8d
)
map: Added disable scroll object
author
Lukas Krickl
<lukas@krickl.dev>
Sat, 20 Sep 2025 18:03:20 +0000
(20:03 +0200)
committer
Lukas Krickl
<lukas@krickl.dev>
Sat, 20 Sep 2025 18:03:20 +0000
(20:03 +0200)
src/map.s
patch
|
blob
|
history
src/mapobj.s
patch
|
blob
|
history
diff --git
a/src/map.s
b/src/map.s
index 09b1c5c7dbf76635b66f8645c3252a38b137026e..35e5addc4682a25daa4dc82bf5ebda6359f34b1c 100644
(file)
--- 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 2ceab5d0a7d4f458c24af1e800b0f0f744359a3e..98487c07dfd0863ece7ed2f835b3b8a6bc2cebc7 100644
(file)
--- 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