HUD ironing (task #38): authentic Lock producer + simple-X mode

- LOCK rules transcribed from the exported HudSimulation
  (part_013.c:5619-5634): lock requires a target AND your own HUD host
  zone damage < 0.75 (_DAT_004b7ec4 -- a shot-up targeting computer
  drops lock) AND the targeted zone damage < 1.0 (_DAT_004b7ec8;
  whole-mech target checks zone 0 -- a wreck's dead zone can't
  re-lock). Box and ring are now separate signals like the binary:
  gBTHudLockState 1 = target held (hotbox draws), 2 = LOCKED (+ the
  spinning ring).
- SIMPLE-X mode: the ctor's [0x99] minimal-reticle list transcribed
  (@4689-4705: green +-0.02..0.08 cross on the aim translate); Draw
  switches master <-> simple X on the PrimaryHudOn element bit (0x20),
  completing the recovered Execute's state-list logic.
- Canopy diagnosis sharpened (open-questions): blx_cop is the torso
  segment's inside-skeleton mesh enclosing the eye; the black box =
  the skeleton render branch missing its texture + PUNCH cutout (the
  canopy windows are punch texels). A rendering-branch task; stays
  hidden by default.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
arcattack
2026-07-08 23:12:58 -05:00
co-authored by Claude Fable 5
parent 18d49491b7
commit 24ea7f13af
5 changed files with 82 additions and 14 deletions
+32 -2
View File
@@ -1049,6 +1049,7 @@ BTReticleRenderable::BTReticleRenderable(Entity *entity, Scalar *range_attr)
lockSpinDeg= 0.0f;
masterList = dpl2d_NewDisplayList();
simpleXList = dpl2d_NewDisplayList();
aimDotList = dpl2d_NewDisplayList();
rangeCaretR = dpl2d_NewDisplayList();
rangeCaretB = dpl2d_NewDisplayList();
@@ -1207,6 +1208,30 @@ BTReticleRenderable::BTReticleRenderable(Entity *entity, Scalar *range_attr)
dpl2d_SetLineWidth(rightArrow, 1.0f);
dpl2d_End(rightArrow); dpl2d_Compile(rightArrow);
//
// The SIMPLE X [0x99] (ctor @4689-4705 [T1]): the minimal reticle used
// when PrimaryHudOn is OFF -- a small green cross (arms +-0.02..0.08)
// riding the same aim translate. Draw switches master <-> this on the
// element-mask bit (the recovered Execute's state-list logic @4cdd9d).
//
dpl2d_Begin(simpleXList, 1);
dpl2d_SetLineWidth(simpleXList, 1.0f);
dpl2d_FullScreenClip(simpleXList);
dpl2d_SetColor(simpleXList, 0.0f, 0.75f, 0.0f);
dpl2d_CallList(simpleXList, aimDotList); // slews with the crosshair
dpl2d_OpenLines(simpleXList);
dpl2d_AddPoint(simpleXList, -0.08f, 0.0f);
dpl2d_AddPoint(simpleXList, -0.02f, 0.0f);
dpl2d_AddPoint(simpleXList, 0.02f, 0.0f);
dpl2d_AddPoint(simpleXList, 0.08f, 0.0f);
dpl2d_AddPoint(simpleXList, 0.0f, -0.08f);
dpl2d_AddPoint(simpleXList, 0.0f, -0.02f);
dpl2d_AddPoint(simpleXList, 0.0f, 0.02f);
dpl2d_AddPoint(simpleXList, 0.0f, 0.08f);
dpl2d_CloseLines(simpleXList);
dpl2d_End(simpleXList);
dpl2d_Compile(simpleXList);
// empty placeholders (filled per frame / on lock)
dpl2d_Begin(crossList, 1); dpl2d_End(crossList); dpl2d_Compile(crossList);
dpl2d_Begin(aimDotList, 1); dpl2d_End(aimDotList); dpl2d_Compile(aimDotList);
@@ -1393,7 +1418,7 @@ void
// -- the 3D marker chain remains deferred.)
{
extern int gBTHudLockState;
const int locked = (gBTHudLockState != 0);
const int locked = (gBTHudLockState == 2); // the Lock attr rule, not just a target
if (locked != lockShown)
{
lockShown = locked;
@@ -1449,7 +1474,12 @@ void
dpl2d_Compile(crossList);
}
dpl2d_ExecuteList(masterList, device);
// the STATE-list switch (Execute @4cdd9d [T1]): PrimaryHudOn (element mask
// 0x20) selects the full HUD; off = just the simple aim cross.
{
extern int gBTHudPrimary;
dpl2d_ExecuteList(gBTHudPrimary ? masterList : simpleXList, device);
}
}
//