aboutsummaryrefslogtreecommitdiffstats
path: root/macros/predef.asm
diff options
context:
space:
mode:
authordannye <33dannye@gmail.com>2020-11-04 00:06:44 -0600
committerdannye <33dannye@gmail.com>2020-11-04 00:06:44 -0600
commit5647ca687b92954dcf37a6ea6bfbc9a341c32de4 (patch)
treedde1937a1bfdb3a835f4155e1c2eb8f1aaf86f63 /macros/predef.asm
parentMerge pull request #55 from Deokishisu/patch-1 (diff)
downloadpokeyellow-5647ca687b92954dcf37a6ea6bfbc9a341c32de4.tar.gz
pokeyellow-5647ca687b92954dcf37a6ea6bfbc9a341c32de4.tar.xz
pokeyellow-5647ca687b92954dcf37a6ea6bfbc9a341c32de4.zip
Sync with pokered
Diffstat (limited to 'macros/predef.asm')
-rw-r--r--macros/predef.asm36
1 files changed, 36 insertions, 0 deletions
diff --git a/macros/predef.asm b/macros/predef.asm
new file mode 100644
index 00000000..f4e7f609
--- /dev/null
+++ b/macros/predef.asm
@@ -0,0 +1,36 @@
+predef_id: MACRO
+ ld a, (\1Predef - PredefPointers) / 3
+ENDM
+
+predef: MACRO
+ predef_id \1
+ call Predef
+ENDM
+
+predef_jump: MACRO
+ predef_id \1
+ jp Predef
+ENDM
+
+
+tx_pre_id: MACRO
+ ld a, (\1_id - TextPredefs) / 2 + 1
+ENDM
+
+tx_pre: MACRO
+ tx_pre_id \1
+ call PrintPredefTextID
+ENDM
+
+tx_pre_jump: MACRO
+ tx_pre_id \1
+ jp PrintPredefTextID
+ENDM
+
+db_tx_pre: MACRO
+ db (\1_id - TextPredefs) / 2 + 1
+ENDM
+
+predef_const: MACRO
+ const \1PredefID
+ENDM