Skip to main content

Module console

Module console 

Source
Expand description

The console’s size, which the game picks (ConsoleSpec), and how it fits the window (game ADR-0012).

Structs§

ConsoleSpec
A console’s size: cols × rows cells of cell_w × cell_h logical pixels. The frame (GlyphBuffer) keeps the spec it was made with; the game picks one when it starts (game ADR-0070 §6).
Layout
Where the console goes in a window: integer scale and the top-left pixel offset that centres it. Everything around it is letterbox.

Functions§

layout
Fits a spec console into a screen_w × screen_h window: the largest integer scale that fits (at least 1, so a too-small window crops the edges evenly), centred on whole pixels so glyphs stay crisp.