https://gitlab.synchro.net/main/sbbs/-/commit/4716b0bdbe4bdd5273090354
Added Files:
src/doors/termgfx/gfxgate.c gfxgate.h src/doors/termgfx/test/test_gfxgate.c
Modified Files:
src/doors/termgfx/CMakeLists.txt termgfx_termio.c src/doors/termgfx/test/CMakeLists.txt
Log Message:
termgfx: share the no-graphics gate, and let the sysop word it
A door that renders only through sixel or JXL has to turn away a terminal
that can do neither. That decision lived inside termgfx_termio's two
present paths, duplicated between them, so the doors running their own
present loop never inherited it and drew for whatever was on the other
end.
Extract it to gfxgate.{c,h}: a verdict function taking the four
capability facts plus a timestamp, and the notice text. It keeps no clock
and does no I/O of its own, so a door emits through whatever output path
it already owns -- the same contract as idle.h and stats.h. TERMGFX_GFX_SETTLE_MS moves here as well, next to the gate whose window
it is.
The notice is now the sysop's to word, through [text] in <door>.ini. no_graphics replaces the wording in a line; no_graphics_file sends a file verbatim, so it can run to several lines or be ANSI art; and the default
file name nographics.txt is picked up whenever it exists, so the wording
can be replaced with no key set at all. A file is bracketed with an SGR
reset, or a half-attributed .ans would leak into the BBS prompt the
player lands back on.
Also here for the doors to use: the wording of the prompt that holds the
notice on screen to be read, deliberately separate from the notice so
that replacing one cannot silently drop the other, and a default for how
long to wait.
termgfx_termio's behavior is unchanged.
Co-Authored-By: Claude Opus 5 (1M context) <
[email protected]>
--- SBBSecho 3.37-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)