summaryrefslogtreecommitdiff
path: root/macros.asm
diff options
context:
space:
mode:
authoryenatch <yenatch@gmail.com>2015-01-27 15:03:14 -0800
committeryenatch <yenatch@gmail.com>2015-01-27 15:03:14 -0800
commit5aec11492d2b269a658b31646d09328f56ff59d1 (patch)
treef9bf7acd3455a67aa54c9c1711ba0e8343268c8a /macros.asm
parentf036cdf13b0e215cd9a14cc9dba24f821a9679c0 (diff)
Add a "mobile" directive for dummied-out mobile adapter functions.
Diffstat (limited to 'macros.asm')
-rw-r--r--macros.asm21
1 files changed, 16 insertions, 5 deletions
diff --git a/macros.asm b/macros.asm
index 81d5f2e79..031c211ed 100644
--- a/macros.asm
+++ b/macros.asm
@@ -8,6 +8,8 @@ INCLUDE "macros/movement.asm"
INCLUDE "macros/map.asm"
INCLUDE "macros/predef.asm"
INCLUDE "macros/rst.asm"
+INCLUDE "macros/mobile.asm"
+
RGB: MACRO
@@ -46,15 +48,24 @@ dn: MACRO
endr
ENDM
+dx: MACRO
+x = 8 * ((\1) - 1)
+ rept \1
+ db ((\2) >> x) & $ff
+x = x + -8
+ endr
+ ENDM
+
dt: MACRO ; three-byte (big-endian)
- db ((\1) >> 16) & $ff
- db ((\1) >> 8) & $ff
- db (\1) & $ff
+ dx 3, \1
+ ENDM
+
+dd: MACRO ; four-byte (big-endian)
+ dx 4, \1
ENDM
bigdw: MACRO ; big-endian word
- db (\1) / $100
- db (\1) % $100
+ dx 2, \1
ENDM