shpn_tool icon indicating copy to clipboard operation
shpn_tool copied to clipboard

Add Latin-1 Supplement support

Open 07151129 opened this issue 4 years ago • 0 comments

SJIS cannot encode Latin diacritics (accented characters). Our encoding support needs to be extended to this end.

  • [ ] Add c2 a1, c2 bf, e2 80 94, c3 80 -- c3 bf UTF-8 sequence recognition to glyph.c as half-width characters.

  • [ ] When encoding strings, in mk_strtab_str, recognise there characters, and write them directly, similarly to how buf_for_esc rewrites escapes. This will result in a mixed SJIS-UTF encoding in text.

  • [ ] Add monochrome png -> tileset sprite encoding. One 16x16 glyph object is represented by one tileset, i.e. four 8x8 sized tiles. A single tile has 4bpp pitch linear encoding of palette indices. We can assume indices 0 for transparent, 0xf for white (or primary colour when selected), 1 for border colour (black/white). The tiles are linearly written in memory in the following order: 1 2 3 4

  • [ ] Embed the tiles into GBA binary. Can simply use PROVIDE ld script statement to reference it in C, and feed the data/file offset via AGB_BINS_OFFSETS in agb/patch.mk.

  • [ ] When decoding strings in render_sjis, map the utf sequences to a linear character index.

  • [ ] Use the index to copy into vram from the tiles in rom.

07151129 avatar May 07 '21 18:05 07151129