https://gitlab.synchro.net/main/sbbs/-/commit/3f084da749bab8f33df32ce4
Modified Files:
src/doors/syncretro/main.c syncretro.h syncretro_binds.c syncretro_binds.h syncretro_input.c syncretro_io.c
Log Message:
syncretro: add the text render tiers and the F4 tier cycle
SyncRetro drew sixels or nothing. A terminal without them -- conhost, PuTTY, anything old -- got a door it could not play. termgfx already has the block-character renderer the sibling doors use; wire it in, and let F4 walk
the tiers so a player can pick what looks best on his own screen rather than taking ours.
The cycle is built from what the CLIENT can do, never from a menu of
everything we can emit:
sixel only if DA1 answered param 4. A terminal that did not say so
starts on TEXT instead of having sixels printed at it as
garbage.
half-block one glyph, two pixels. Renders in EITHER charset (CP437 0xDF,
UTF-8 U+2580), so every client gets it.
blocks+shades 2x2 detail from the classic CP437 block/shade glyphs only --
it renders on font-limited terminals where the quadrant
glyphs come out as missing-glyph boxes.
quadrant 2x2, exact (U+2596-259F). UTF-8 CLIENTS ONLY.
sextant 2x3 (U+1FB00). UTF-8 CLIENTS ONLY.
The last two are withheld from a CP437 client on purpose: cycling SyncTERM through them would step it through two screens of missing-glyph boxes. The charset comes from termgfx/charset.c ($SBBSNODE/terminal.ini), so the door follows the client rather than guessing.
F4 has no byte form. It arrives as SS3 "ESC O S", as a CSI ending in 'S' (xterm's modified form, and kitty's), as ESC[14~, or -- on SyncTERM with physical-key reports -- as evdev keycode 62 and no escape sequence at all.
All four spellings land in one place. The tier switch erases the screen and throws away the cell-diff shadow: a sixel is pixels laid over the grid and
the text tiers write cells, so neither overwrites the other, and a shadow
that still believes it knows the screen would leave half a picture behind.
The text path takes the same DSR-ACK backpressure and the same byte
accounting as the sixel path -- pacing is about what the TERMINAL has drawn, not about what we drew it with -- and reserves the bottom row, which belongs
to the stats strip.
The stats strip now names the live tier (it used to say "sixel" always, which with a tier cycle would simply be a lie), and it erases to end-of-line with
its own background set, so BCE paints the row into a clean full-width bar and wipes the tail of a longer previous readout in the same stroke. Erasing first -- which is what it did -- cleared the row to black and then painted a short cyan stub on it. The sibling doors have always had this the right way round.
The pause screen sheds ornaments when the terminal is too short: adding F4 to the key list was, by itself, enough to push the bottom border off an 80x24 screen.
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net