summaryrefslogtreecommitdiff
path: root/macros/gfx.asm
diff options
context:
space:
mode:
authorRangi <35663410+Rangi42@users.noreply.github.com>2020-10-30 12:26:04 -0400
committerGitHub <noreply@github.com>2020-10-30 12:26:04 -0400
commitd831e40b99853c8e29e3939bb100b6ecf03b1028 (patch)
tree7d97e9277ee405a77046481100bf11adbc325367 /macros/gfx.asm
parent26ddba8cfd8f035c06bd6419b64a6c4d7dbc226f (diff)
parentdb72c5103e807c4960ff62ca1764cac151288586 (diff)
Merge pull request #64 from Rangi42/unreferenced
Comment, remove, or revise many unreferenced labels
Diffstat (limited to 'macros/gfx.asm')
-rw-r--r--macros/gfx.asm8
1 files changed, 8 insertions, 0 deletions
diff --git a/macros/gfx.asm b/macros/gfx.asm
index 2c67cfc8..b42b1440 100644
--- a/macros/gfx.asm
+++ b/macros/gfx.asm
@@ -1,5 +1,13 @@
+assert_valid_rgb: MACRO
+rept _NARG
+ assert 0 <= (\1) && (\1) <= 31, "RGB channel must be 0-31"
+ shift
+endr
+ENDM
+
RGB: MACRO
rept _NARG / 3
+ assert_valid_rgb \1, \2, \3
dw palred (\1) + palgreen (\2) + palblue (\3)
shift 3
endr