summaryrefslogtreecommitdiff
path: root/macros/coords.asm
diff options
context:
space:
mode:
authorRangi <35663410+Rangi42@users.noreply.github.com>2020-07-15 12:26:16 -0400
committerGitHub <noreply@github.com>2020-07-15 12:26:16 -0400
commite18e5d50b5e154c1a7c94a2a1f39a3a99daa689a (patch)
treed8a157ae5aa323a00873efe79eb4693327b8bb70 /macros/coords.asm
parentaa97e196dd5b37e89db5ddf154dc7aea9b02a045 (diff)
parent93d0697f37aca8ed7a21298a980876af6d43268b (diff)
Merge pull request #273 from Rangi42/master
Clean up some data, using macros for multiline list entries
Diffstat (limited to 'macros/coords.asm')
-rw-r--r--macros/coords.asm6
1 files changed, 6 insertions, 0 deletions
diff --git a/macros/coords.asm b/macros/coords.asm
index 94808ba5..7cbbca3d 100644
--- a/macros/coords.asm
+++ b/macros/coords.asm
@@ -48,6 +48,12 @@ owcoord: MACRO
ld \1, wOverworldMap + ((\2) + 3) + (((\3) + 3) * ((\4) + (3 * 2)))
ENDM
+event_displacement: MACRO
+; map width, x blocks, y blocks
+ dw (wOverworldMap + 7 + (\1) + ((\1) + 6) * ((\3) >> 1) + ((\2) >> 1))
+ db \3, \2
+ENDM
+
dwcoord: MACRO
; x, y
validate_coords \1, \2