Expand description
The glyph skin: a grid map drawn with colored glyphs (game ADR-0018,
game ADR-0024, game ADR-0029). A tile is two 8 × 16 cells: a 16 × 16 pixel
square. That size is known only here. A GlyphStyle changes how
ranges, flashes, the cursor and the threat marks show on those tiles.
Re-exports§
pub use style::CursorLook;pub use style::FlashLook;pub use style::GlyphStyle;pub use style::RangeLook;pub use style::ThreatLook;
Modules§
- cursor
- How the glyph skin draws the cursor (game ADR-0024): thin corner marks around the tile, or a glow on it.
- style
- How the glyph skin shows what lies on its tiles: the ranges, a flash,
the cursor and the threat marks, and the room it leaves at the sides
of its area.
GlyphStyle::PLAINis the glyph skin’s own look; another style keeps its tiles, its terrain glyphs and its paint order and changes only these (a one-bit screen’s look: ranges as fills, a flash inverted, flat cursor marks).
Structs§
- Glyph
Skin - A grid map as colored glyphs: each tile its terrain’s two glyphs, the ranges tinting their background (in its plain style).
- Layout
- Where a scene’s tiles go in an area of cells.
Constants§
- OVERLAY_
BLEND - How far ranges tint a tile’s background toward their color (about 75%). Tunable.
- TILE_
W_ CELLS - Cells per map tile, across (a tile is two glyphs wide, game ADR-0018).
Functions§
- cell_of
- The console cell of the left glyph of
tileongrid, a grid of this skin’s tiles (Layout::grid), orNoneif the tile isn’t drawn: where a game’s unit painter writes a unit’s glyphs. - draw_
terrain - Draws terrain
idon the tile whose left cell is(x, y): its two glyphs in its colors. Nothing for a terrain the game lacks. - draw_
tiles - Draws every tile in the plain style (
GlyphStyle::draw_tiles): its terrain (tiles off the map are left as they are, blank); a tile whose terrain just changed flashes, its background tinted towards its glyph color, fading out; then its ranges tint it, the first laid on undermost; and a tile that would change is drawn as the terrain it would become instead. - tile_px
- A map tile in console pixels, across × down: for a skin that paints its units over this skin’s ground (game ADR-0049).
- tile_
to_ cell - The console cell of the left glyph of
tile, orNoneif the tile is outside the layout. The only place the “two cells per tile” rule lives (game ADR-0018). - view_
tiles - How many tiles, across × down, fit in an area of
areacells: two cells to a tile across, one down. An odd cell is left over.