https://gitlab.synchro.net/main/sbbs/-/commit/8c2fab334d40bc78a9954d36
Modified Files:
src/doors/syncduke/syncduke.h syncduke_input.c syncduke_io.c src/doors/termgfx/term.c
Log Message:
syncduke: center the sixel/image in the terminal canvas (port from syncdoom)
SyncDUKE drew its image at the top-left (ESC[H), while SyncDOOM centers it.
The difference only shows on terminals that honor the cursor as the sixel origin
(e.g. Windows Terminal); SyncTERM ignores the cursor under DECSDM ?80l and anchors 0,0, so both doors look top-left there.
Port SyncDOOM's approach: probe the cell-pixel size (ESC[16t) in addition to the
window pixels (ESC[14t), then center the out_w x out_h image in the pixel canvas
and position the cursor at the resulting cell (ESC[row;colH). Without a cell size
(SyncTERM doesn't answer ESC[16t) we fall back to the top-left -- byte-for-byte the old behavior -- so the main platform is unchanged. The mouse steering now derives its center column and half-width from the same shared geometry helper, so
pointer-to-turn mapping tracks the centered image instead of assuming a top-left,
8px-cell layout.
- termgfx/term.c: add ESC[16t to the shared probe (SyncTERM ignores it).
- syncduke_input.c: parse the ESC[16t reply; mouse steer uses image geometry.
- syncduke.h: cell-size accessors + syncduke_image_geometry().
- syncduke_io.c: syncduke_image_geometry() + center the image-tier cursor.
Co-Authored-By: Claude Opus 4.8 <
noreply@anthropic.com>
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net