summaryrefslogtreecommitdiff
path: root/macros/code.asm
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2020-07-03 16:37:47 -0400
committerRangi <remy.oukaour+rangi42@gmail.com>2020-07-03 16:37:47 -0400
commit9878f01e29b1443d6c894c1332cbf381fa12646e (patch)
tree8e763ca94f2b90faaa470416055c320dbdb89cbf /macros/code.asm
parentccb01731fe8cd44ae4c8840ee8ddc02e6bdea97e (diff)
Organize macros/ like pokecrystal
While doing so I replaced the StopAllMusic macro with a SFX_STOP_ALL_MUSIC constant and applied it throughout the code.
Diffstat (limited to 'macros/code.asm')
-rwxr-xr-xmacros/code.asm9
1 files changed, 9 insertions, 0 deletions
diff --git a/macros/code.asm b/macros/code.asm
new file mode 100755
index 00000000..8b7d6184
--- /dev/null
+++ b/macros/code.asm
@@ -0,0 +1,9 @@
+; Syntactic sugar macros
+
+lb: MACRO ; r, hi, lo
+ ld \1, ((\2) & $ff) << 8 + ((\3) & $ff)
+ENDM
+
+ldPal: MACRO
+ ld \1, \2 << 6 | \3 << 4 | \4 << 2 | \5
+ENDM