projects
/
gbrg
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4f476e2
)
actor: added mask for tile postions
author
Lukas Krickl
<lukas@krickl.dev>
Wed, 15 Jan 2025 04:48:43 +0000
(
05:48
+0100)
committer
Lukas Krickl
<lukas@krickl.dev>
Wed, 15 Jan 2025 04:48:43 +0000
(
05:48
+0100)
src/actor.s
patch
|
blob
|
history
src/wram.s
patch
|
blob
|
history
diff --git
a/src/actor.s
b/src/actor.s
index a8b63ec221db32413989273ebf839a1c8ad3a12d..aa681205cb584e29838b2f3b362346039315e4d1 100644
(file)
--- a/
src/actor.s
+++ b/
src/actor.s
@@
-171,6
+171,15
@@
actor_anim_verify:
call anim_clear
ret
+ ; truncates the position
+ ; to only use the high nibble
+ ; inputs:
+ ; hl: ptr to y/x
+ ; returns:
+ ; hl: trunacted y/x
+anim_truncate_pos:
+ ret
+
; marks the current actor's tile
; as occupied by an actor
; also removes the flag from the actor's current tile
diff --git
a/src/wram.s
b/src/wram.s
index 58e3e264148ca20127c88fac567bfc6a65f3a734..d259311c0d96445ecf36be539170d59594966f5e 100644
(file)
--- a/
src/wram.s
+++ b/
src/wram.s
@@
-113,6
+113,8
@@
damage_anim: .adv 1
.de room_exit_table, 2 ; list of ptrs to new rooms
.de room_size, 0
+#define TILE_POS_MASK 0xF0
+
; room flags
.se 1
; set if a tile is a wall