summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi@gmail.com>2021-05-09 13:35:59 -0400
committerRangi <remy.oukaour+rangi@gmail.com>2021-05-09 13:35:59 -0400
commit3114573de4cbdb07ae36b0f0f4ee1b30a63471a4 (patch)
tree8ddce9a5bde8d74a425d5e0402dd0915ba98f4eb /macros
parentf17cbee7a98c2f81d14ed26707157bddbcfce755 (diff)
Use rgbds 0.5.1 features
rgbfix now warns about overwriting non-zero bytes
Diffstat (limited to 'macros')
-rw-r--r--macros/data.asm8
-rw-r--r--macros/gfx.asm4
-rw-r--r--macros/maps.asm22
3 files changed, 9 insertions, 25 deletions
diff --git a/macros/data.asm b/macros/data.asm
index 97eb568..48465fd 100644
--- a/macros/data.asm
+++ b/macros/data.asm
@@ -33,18 +33,14 @@ ENDM
dn: MACRO ; nybbles
rept _NARG / 2
db ((\1) << 4) | (\2)
- shift
- shift
+ shift 2
endr
ENDM
dc: MACRO ; "crumbs"
rept _NARG / 4
db ((\1) << 6) | ((\2) << 4) | ((\3) << 2) | (\4)
- shift
- shift
- shift
- shift
+ shift 4
endr
ENDM
diff --git a/macros/gfx.asm b/macros/gfx.asm
index ff07ba4..bad051a 100644
--- a/macros/gfx.asm
+++ b/macros/gfx.asm
@@ -1,9 +1,7 @@
RGB: MACRO
rept _NARG / 3
dw palred (\1) + palgreen (\2) + palblue (\3)
- shift
- shift
- shift
+ shift 3
endr
ENDM
diff --git a/macros/maps.asm b/macros/maps.asm
index c25942a..9411a25 100644
--- a/macros/maps.asm
+++ b/macros/maps.asm
@@ -157,23 +157,13 @@ object_event: MACRO
; * if h1 == -1, h2 is treated as a time-of-day value:
; a combo of MORN, DAY, and/or NITE, or -1 to always appear
;\9: object type function
-;\10: unknown 1
-;\11: unknown 2
-;\12: sight range
-;\13: unknown 3
-;\14: unknown 4
+;\<10>: unknown 1
+;\<11>: unknown 2
+;\<12>: sight range
+;\<13>: unknown 3
+;\<14>: unknown 4
db \3, \2 + 4, \1 + 4, \4
dn \5, \6
- db \7, \8
- shift
- db \8
- shift
- db \8, \9
- shift
- db \9
- shift
- db \9
- shift
- db \9
+ db \7, \8, \9, \<10>, \<11>, \<12>, \<13>, \<14>
_NUM_OBJECT_EVENTS = _NUM_OBJECT_EVENTS + 1
ENDM