From e13e8af44b45ed2869bb19e1660a3e2904e72e1e Mon Sep 17 00:00:00 2001 From: arcattack Date: Thu, 9 Jul 2026 08:55:51 -0500 Subject: [PATCH] dpl2d OpenLines = SEPARATE SEGMENT PAIRS + pip spacing 0.03 (user screenshot) User screenshot showed three artifacts, all one root cause: my dpl2d executor drew OpenLines/CloseLines vertex runs as a connected LINESTRIP. Every ctor use of OpenLines is SEGMENT PAIRS (4 crosshair arms, one pair per ladder tick, the compass stem, the lock ring's 4 ticks, threat marks) -- the strip joined ticks into zigzags ("squiggly lines" on both ladders), hung diagonals off the crosshair arms, and drew chords across the lock ring. Now D3DPT_LINELIST (one line per pair). Also PIP_SPACING: _DAT_004cdce8 is a DOUBLE = 0.03 (read from the exe); my 0.01 guess overlapped the 0.028-wide pips (user: "pips are overlapping"). Reference-screenshot pairs sit side-by-side, matching. Co-Authored-By: Claude Fable 5 --- game/reconstructed/btl4vid.cpp | 4 +++- game/reconstructed/dpl2d.cpp | 15 +++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/game/reconstructed/btl4vid.cpp b/game/reconstructed/btl4vid.cpp index 841cdf8..3306f2b 100644 --- a/game/reconstructed/btl4vid.cpp +++ b/game/reconstructed/btl4vid.cpp @@ -84,7 +84,9 @@ static const char * const sernoParameter = "%serno%"; // @0051d194 // // Radial spacing between adjacent weapon pips along the reticle (_DAT_004cdce8). // -static const float PIP_SPACING = 0.01f; // _DAT_004cdce8 +static const float PIP_SPACING = 0.03f; // _DAT_004cdce8 (a DOUBLE: 0.03 -- + // verified from the exe; the 0.01 guess + // overlapped the 0.028-wide pips) // // One-character serial number stamped into %serno% material names; advances diff --git a/game/reconstructed/dpl2d.cpp b/game/reconstructed/dpl2d.cpp index cc03bb9..2a05372 100644 --- a/game/reconstructed/dpl2d.cpp +++ b/game/reconstructed/dpl2d.cpp @@ -12,7 +12,7 @@ // OpenDisplayList(mode) .. CloseDisplayList .. FlushDisplayList // // AddOpenPolypoint(2)/AddClosePolypoint(3) -- a POINT set // // AddOpenPolyline(4)/AddClosePolyline(5) -- a CLOSED loop // -// AddOpenLines(6)/AddCloseLines(7) -- an OPEN line strip // +// AddOpenLines(6)/AddCloseLines(7) -- SEPARATE SEGMENT PAIRS // // AddPoint(8, x, y) -- vertex of the open prim // // AddCircle(9, x, y, r, fill) // // AddSetColor(0xF, r, g, b) // @@ -99,7 +99,7 @@ namespace enum Kind { kPoints, // vertex run: a point per vertex - kLineStrip, // vertex run: open strip + kLineStrip, // vertex run: SEGMENT PAIRS (LINELIST; task #44) kPolyLoop, // vertex run: closed loop kCircleFill, kCircleOutline, @@ -383,9 +383,16 @@ namespace } else if (cmd.kind == Command::kLineStrip) { + // SEPARATE SEGMENTS (task #44): OpenLines/CloseLines points come in + // PAIRS -- every ctor use is segment pairs (the 4 cross arms, one + // pair per ladder tick, the compass stem, the lock ring's 4 ticks, + // each threat mark). Drawing them as a connected STRIP joined the + // ticks into zigzags, hung diagonals off the crosshair arms, and + // drew chords across the lock ring (user screenshot). LINELIST = + // one line per point pair, the binary's semantics. if (verts.size() >= 2) - device->DrawPrimitiveUP(D3DPT_LINESTRIP, - (UINT)verts.size() - 1, &verts[0], sizeof(Vertex2D)); + device->DrawPrimitiveUP(D3DPT_LINELIST, + (UINT)(verts.size() / 2), &verts[0], sizeof(Vertex2D)); } else // kPolyLoop -- closed {