summaryrefslogtreecommitdiff
path: root/asm/macros/window.inc
diff options
context:
space:
mode:
authorDiegoisawesome <diego@domoreaweso.me>2016-11-01 10:56:23 -0500
committerDiegoisawesome <diego@domoreaweso.me>2016-11-01 10:56:23 -0500
commitf09f9cef752c37e3cc0686573c1fdb29da842772 (patch)
tree22bee285750a6739643859eb6afd52be4ded87e1 /asm/macros/window.inc
parent442002dada4183c96b5ec09fcde8486aa5ba29b1 (diff)
parent4db33778ad3faa64d994f46358a28c22c393f7c6 (diff)
Merge remote-tracking branch 'refs/remotes/pret/master'
Diffstat (limited to 'asm/macros/window.inc')
-rw-r--r--asm/macros/window.inc31
1 files changed, 31 insertions, 0 deletions
diff --git a/asm/macros/window.inc b/asm/macros/window.inc
new file mode 100644
index 000000000..04c148114
--- /dev/null
+++ b/asm/macros/window.inc
@@ -0,0 +1,31 @@
+ .macro window_template bg_id, x, y, width, height, palette, vram_tile_offset
+ .byte \bg_id
+ .byte \x
+ .byte \y
+ .byte \width
+ .byte \height
+ .byte \palette
+ .2byte \vram_tile_offset
+ .endm
+
+ .macro glyph_width_func font_id, func
+ .4byte \font_id
+ .4byte \func
+ .endm
+
+ .macro keypad_icon tile_offset, width, height
+ .2byte \tile_offset
+ .byte \width
+ .byte \height
+ .endm
+
+ .macro font_info func, max_glyph_width, glyph_height, glyph_spacing, line_spacing, text_color, shadow_color, bg_color
+ .4byte \func
+ .byte \max_glyph_width
+ .byte \glyph_height
+ .byte \glyph_spacing
+ .byte \line_spacing
+ .byte \text_color << 4 @ low nybble seems unused
+ .byte (\shadow_color << 4) | \bg_color
+ .2byte 0 @ padding
+ .endm