Expand description
Decoded sprite cache: sprite sheet decoding, tile extraction, and runtime lookup.
The SpriteCache is built from TilesetOptions
and provides O(1) lookup of decoded RGBA8 sprites by codepoint.
Structs§
- Sprite
- A decoded, ready-to-blit sprite.
- Sprite
Cache - Cache of decoded sprites, keyed by Unicode codepoint.
- Sprite
Tint - The complete recolouring one sprite goes through in one cell: the sheet’s own treatment, then the cell’s tint.
Functions§
- warn_
sprite_ needs_ span - Warns, at most once per glyph, that
glyph’s sprite is larger than one cell but was drawn without a span reserving the cells it covers. - warn_
tint_ needs_ sprite - Warns, at most once per glyph, that
glyphcarries a tint but resolved to a bitmap font glyph rather than a sprite, so the tint was silently dropped.