Expand description
glyph-tiles: a tileset made from the font’s glyphs, for a game that
wants a sprite skin before it has art (as the game’s test-tileset
does): each tile is a square of a palette color with up to a few glyphs
stamped on it, centred, in another; a tile with no background is clear
but for its glyphs (a piece drawn over the ground). Tiles are laid out
in the order shuyi.ron lists them, columns to a row, so tile i is
at column i % columns, row i / columns.
The same font, palette and list always give the same pixels: generated from the game’s own data, not art.
Constants§
- MAX_
GLYPHS - The most glyphs one tile may have.
Functions§
- render
- Draws the tileset
rulesdescribes with the font atlasatlas(its pictureatlas_image) and the colors ofpalette. Fails on a color the palette lacks, a glyph the atlas lacks, or a tile of no glyphs, too many, or too many to fit. - render_
files - The tileset of
rules, read from the files they name underroot. - run
- Runs the command: draws the tileset and writes it to
rules.outunderroot; returns what to print. - tile_
origin - The pixel of the top-left corner of tile
indexofrules.