aboutsummaryrefslogtreecommitdiffstats
path: root/macros/coords.asm
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2020-07-14 10:21:18 -0400
committerRangi <remy.oukaour+rangi42@gmail.com>2020-07-14 13:32:09 -0400
commitf37cf959c930ae9595f9f71ce0d9b17dcf5421d0 (patch)
tree33cc0d34fec73e972f4fb040b8b31f59b7e69805 /macros/coords.asm
parentMerge pull request #269 from Rangi42/master (diff)
downloadpokeyellow-f37cf959c930ae9595f9f71ce0d9b17dcf5421d0.tar.gz
pokeyellow-f37cf959c930ae9595f9f71ce0d9b17dcf5421d0.tar.xz
pokeyellow-f37cf959c930ae9595f9f71ce0d9b17dcf5421d0.zip
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