diff options
author | Rangi <remy.oukaour+rangi42@gmail.com> | 2021-05-02 10:12:45 -0400 |
---|---|---|
committer | Rangi <remy.oukaour+rangi42@gmail.com> | 2021-05-02 10:12:45 -0400 |
commit | 375c8a7f9ae3d202ee0ad884a2836a788fee2cd6 (patch) | |
tree | b88ba07feaa4a7fb73cfd42bd70142fd0b7d0fe4 /data | |
parent | 8df79ce02873f3f7faca8a2aeec8b4db6e7f3086 (diff) |
Use rgbds 0.5.0 features
Diffstat (limited to 'data')
-rw-r--r-- | data/text_chars.asm | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/data/text_chars.asm b/data/text_chars.asm index f53aa16..de9c630 100644 --- a/data/text_chars.asm +++ b/data/text_chars.asm @@ -257,23 +257,19 @@ text_chars_widths:: db 0 db 0 -def_tile: macro +macro def_tile ; The image is 2bpp, 8x8 tiles, but the characters themselves are 16x10... -_x = \1 -_y = \2 -_pos = $20 * (_x + 8 * _y) ; Max char width = 2 tiles, width = 8 chars -_pos = _pos + 4 * _y ; Characters are 2 pixels taller than a tile -_pos = _pos + $f0 * (_y / 4) ; Every 4 rows skip a whole tile + def _x = \1 + def _y = \2 + def _pos = $20 * (_x + 8 * _y) ; Max char width = 2 tiles, width = 8 chars + def _pos = _pos + 4 * _y ; Characters are 2 pixels taller than a tile + def _pos = _pos + $f0 * (_y / 4) ; Every 4 rows skip a whole tile dw _pos endm text_chars_offsets:: -y = 0 -rept 32 ; height of image in characters -x = 0 -rept 8 ; width of image in characters +for y, 32 ; height of image in characters +for x, 8 ; width of image in characters def_tile x, y -x = x + 1 endr -y = y + 1 endr |