Expand description
One-bit output by role (ADR-0008 §4): a fixed set of 8 × 8 Patterns,
and the pattern map (palette@onebit.ron, beside the palette) that
gives each of a skin’s palette roles a foreground and a background
pattern, with the groups of roles that tell things apart and must stay
distinct. As a format (ADR-0007): PatternMapRon. check is what
shuyi check --target checks of a one-bit target; the renderer that
draws with the map is shuyi_ui::frame::onebit.
(
roles: {
"text": (fg: Black, bg: White),
"team.player": (fg: White),
"team.enemy": (fg: Dither50),
"team.ally": (fg: Inverted(DiagonalUp)),
},
distinct: [["team.player", "team.enemy", "team.ally"]],
text: ["text"],
)Structs§
- Pattern
- A pattern of 8 × 8 pixels: one of the
Basepatterns, or one of them inverted. A pattern map spells itDither50orInverted(Dither50). - Pattern
MapDef - A pattern map: each palette role’s patterns on a one-bit target, the groups of roles that must stay distinct, and the roles text is drawn in.
- Pattern
MapRon - A pattern map file (
pattern-map,.ron), read asPatternMapDef::from_sourcesays. - Problem
- What
checkfound wrong with a pattern map. - Role
Patterns - A role’s two patterns:
fgfor what is drawn in its colour (a glyph, a rectangle, a sprite painted in it),bgfor a cell’s background in it (fgagain, if the map doesn’t say).
Enums§
- Base
- One of the fixed patterns, before any inversion: black and white solids, three ordered dithers, and four kinds of line.
- Rule
- Which rule a
Problembreaks. - Severity
- How bad a
Problemis.
Constants§
- BAYER
- The Bayer 8 × 8 order, by row then column: the dithers’ thresholds. A
dither with
kblack pixels is black where the order is belowk.
Functions§
- check
- What is wrong with
mapas the one-bit look ofpalette(ADR-0008 §4), in this order: - dither
- Bayer ordered dither of a grey
darknessfrom 0 (white) to 255 (black): black where4 × order + 2 < darkness, so 64 isBase::Dither25, 128Base::Dither50and 192Base::Dither75exactly, and the levels between fall evenly. - map_
path - Where a palette’s pattern map is: beside it, its name with
@onebit(skin/palette.ron→skin/palette@onebit.ron).
Type Aliases§
- Rows
- The eight rows of a pattern: a row’s highest bit is its left pixel, a set bit white, as in the Playdate’s frame buffer.