• src/doors/syncdoom/render

    From Rob Swindell (on Debian L@VERT to Git commit to main/sbbs/m on Saturday, June 20, 2026 14:04:00
    https://gitlab.synchro.net/main/sbbs/-/commit/0edcaaf3875843a4b90510f6
    Modified Files:
    src/doors/syncdoom/render_text.c
    Log Message:
    syncdoom: skip redundant per-cell SGR in the text/block renderer

    The text tier emitted a full color escape for every cell. Track the last foreground/background actually sent and emit only the component(s) that
    changed -- a flat run now emits just the glyph -- cutting output bytes
    sharply over a BBS link with identical on-screen results. The cache is
    reset at each \033[0m (row end) and at frame start, where the terminal is
    back to its default colors. Also drops the now-unused buffer_append_format.

    Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian L@VERT to Git commit to main/sbbs/m on Sunday, June 21, 2026 04:35:00
    https://gitlab.synchro.net/main/sbbs/-/commit/8a376082e81588c93192188e
    Modified Files:
    src/doors/syncdoom/render_text.c render_text.h syncdoom.c
    Log Message:
    syncdoom: cell-diff text renderer -> flicker-free, lower bandwidth

    The text tier re-painted the entire screen every frame; the big frame segments over TCP, so the terminal showed a half-updated row before the stats overlay (at
    the end of the frame) arrived -> the overlay strobed, and every frame was a full
    redraw.

    render_text.c now diffs: a shared put_cell() sink (replacing the per-cell output_colors/glyph) keeps a SHADOW of each terminal cell's (fg,bg,glyph) signature and re-emits a cell only when it changed (absolute cursor positioning instead of per-row newlines; the SGR cache carries across the frame). rt_config sizes the shadow + forces a full repaint on any tier/charset/geometry change; rt_render_frame clears + repaints on force, else emits only the deltas. The dither is held STATIC (the noise texture no longer cycles) so a cell's signature
    is stable frame-to-frame -- otherwise every cell would read as changed. Ctrl-N still toggles dithering on/off; it's just spatial now, not animated.

    HUD exclusion (rt_exclude_add/clear + rt_invalidate): the door registers the stats overlay's cell rectangle before each render, so the game diff never emits those cells -> the overlay is never repainted under, killing the flicker without
    sacrificing a row. rt_invalidate() resyncs the shadow after the door clears a label row behind the renderer's back.

    Validated (harness + pyte): renders identically to the old full redraw; only the
    forced repaints clear-screen (2 of 316 frames), near-static frames drop to 0-500 B (the diff skipping unchanged cells), and the overlay stays intact over the game with exclusion on. Text tiers only; JXL/sixel untouched.

    Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net