diff options
author | PikalaxALT <PikalaxALT@gmail.com> | 2016-01-29 18:36:31 -0500 |
---|---|---|
committer | PikalaxALT <PikalaxALT@gmail.com> | 2016-01-29 18:36:31 -0500 |
commit | 2bf93c5905319e9181f87b3f83cd3bce7b9feeca (patch) | |
tree | 3ebf17c8879e5d6243d81aac8f1c36eb226fac26 /macros/predef.asm | |
parent | ed3f9395f6d45f6554ed9d9c49c41ea86a8e2447 (diff) |
Import stuff from pokecrystal; diff gold and silver
Diffstat (limited to 'macros/predef.asm')
-rw-r--r-- | macros/predef.asm | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/macros/predef.asm b/macros/predef.asm new file mode 100644 index 00000000..b99c6e1f --- /dev/null +++ b/macros/predef.asm @@ -0,0 +1,20 @@ +add_predef: MACRO +\1Predef:: + dwb \1, BANK(\1) +ENDM + +predef_id: MACRO +; Some functions load the predef id +; without immediately calling Predef. + ld a, (\1Predef - PredefPointers) / 3 +ENDM + +predef: MACRO + predef_id \1 + call Predef +ENDM + +predef_jump: MACRO + predef_id \1 + jp Predef +ENDM |