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 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
3430f87305
commit
e13e8af44b
@@ -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
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user