summaryrefslogtreecommitdiff
path: root/macros.asm
diff options
context:
space:
mode:
authordannye <33dannye@gmail.com>2021-03-13 23:03:51 -0600
committerhuderlem <huderlem@gmail.com>2021-03-14 10:46:32 -0500
commitdf5be0b603917a14ddf59b800462182b2a94363d (patch)
tree6ca2bddd855b13de221ff3cbc4ef19ea5ebc191e /macros.asm
parentd2fd9503da799885ba73357638e6ccbb8a3226a2 (diff)
Update audio macros
Diffstat (limited to 'macros.asm')
-rw-r--r--macros.asm29
1 files changed, 19 insertions, 10 deletions
diff --git a/macros.asm b/macros.asm
index 40637b7..633d6eb 100644
--- a/macros.asm
+++ b/macros.asm
@@ -1,3 +1,22 @@
+; Constant enumeration is useful for mons, maps, etc.
+const_def: MACRO
+if _NARG >= 1
+const_value = \1
+else
+const_value = 0
+endc
+if _NARG >= 2
+const_inc = \2
+else
+const_inc = 1
+endc
+ENDM
+
+const: MACRO
+\1 EQU const_value
+const_value = const_value + const_inc
+ENDM
+
INCLUDE "macros/pokedex.asm"
INCLUDE "macros/scrolling_text.asm"
INCLUDE "macros/sound.asm"
@@ -81,16 +100,6 @@ bigBCD6: MACRO
dn ((\1) / 100000000000) % 10, ((\1) / 10000000000) % 10
ENDM
-; Constant enumeration is useful for mons, maps, etc.
-const_def: MACRO
-const_value = 0
-ENDM
-
-const: MACRO
-\1 EQU const_value
-const_value = const_value + 1
-ENDM
-
;\1 = X
;\2 = Y
;\3 = Reference Background Map (e.g. vBGMap or vBGWin)