• src/doors/syncdoom/render_text.c render_text.h syncdoom.c

    From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Sun Jun 21 04:35:45 2026
    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