https://gitlab.synchro.net/main/sbbs/-/commit/690b1cf09a31afdcc4656864
Added Files:
src/doors/termgfx/geometry.c geometry.h
Modified Files:
src/doors/syncduke/syncduke.h syncduke_config.c syncduke_input.c syncduke_io.c src/doors/termgfx/CMakeLists.txt term.c xtrn/syncduke/syncduke.example.ini
Log Message:
syncduke: JXL fill+center via shared termgfx geometry; widescreen fixes
Start extracting the doors' image geometry into termgfx so SyncDuke and SyncDOOM
stop diverging. New termgfx/geometry.{c,h} holds the scale-to-fill + center math
that previously lived only in syncdoom.c (compute_geometry):
- termgfx_geom_fit() -- fit a source into the canvas, aspect-preserving,
scaled to fill, capped at scale_max, thin-bar stretch.
- termgfx_geom_center() -- pixel offset (APC DX/DY) + 1-based cell origin. SyncDOOM will adopt these next; this commit wires SyncDuke.
SyncDuke's JXL tier was a small, top-left 640x480 image because it never learned
the real graphics canvas and blit 1:1 at DX/DY 0,0. Now:
- the shared probe also sends ESC[?2;1S (XTSMGRAPHICS); SyncDuke parses the
reply for SyncTERM's true graphics-canvas pixels (syncduke_canvas_w/h).
- the JXL tier fills that canvas (capped at [video] scale_max, default 1280 to
match SyncDOOM, configurable in syncduke.ini) and centers via the APC DX/DY.
- the sixel cursor-centering reuses termgfx_geom_center too.
The sixel/out-sizing/mouse paths are unchanged (cell size unknown on SyncTERM ->
top-left fallback, exactly as before).
Two widescreen fixes while here:
- F4 tier switch now clears the screen UNCONDITIONALLY (it used to ride on the
popup label, which is suppressed under the Ctrl-S stats overlay) -- a JXL->
sixel switch with stats up no longer leaves the old larger image showing.
- the live stats strip right-justifies to the real terminal width (term px /
cell) instead of the capped image width, so it sits at the right edge in a
wide window instead of mid-canvas.
Co-Authored-By: Claude Opus 4.8 <
noreply@anthropic.com>
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net