Gitea #10 audit fixes: HUD attr table re-based (@5110b8, one-record shift) + BT_SHOT dock capture
- hud.hpp/hud.cpp/CLASSMAP.md: the binary HUD AttributePointers table starts at @5110b8 with a FULL id-3 FlickerRate record (the old transcription read it as a label and shifted every offset one slot). Re-based member names/offsets: rotationOfTorsoHorizontal@0x1DC (<- Torso+0x1D8 twist), limits@0x1E0/0x1E4, speed@0x1E8, rangeToTarget@0x1EC, @0x1F0 unbound, Visible@0x1F4 (init 1), Lock@0x1F8 (init 0), HotBoxVector P3D@0x1FC, ThreatVector P3D@0x208, CompassHeading Scalar@0x214 (= yaw euler[0] + twist, HudSimulation :5676). Cross-checked vs ctor @004b7f94 + HudSimulation @004b7830 (Lock rule writes @0x1F8 :5622/:5633; range default 1200 + 500 m/s slide @0x1EC). SetCompassHeading renamed SetThreatVector (@004b7810 writes @0x208 = the threat vector; no port caller). No behavioral change: the reticle feeds via port globals and the CFG never binds HUD attrs. Resolves the gauges-hud open question (Gitea #10 entry b). - L4VIDEO.cpp: BT_SHOT capture moved AFTER BTDrawGaugeInset -- the 2026-07-18 reorder had left it before the dock blit, so BT_DEV_GAUGES_DOCK screenshots silently omitted the gauge panel. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
6783619069
commit
904c75aff9
+32
-22
@@ -126,17 +126,21 @@ HUD::HUD(
|
||||
Check(owner);
|
||||
Check_Pointer(subsystem_resource);
|
||||
|
||||
flickerRate = 0.0f; // @0x1D8 (overwritten below from resource)
|
||||
torsoLimitRight = 0.0f; // @0x1DC
|
||||
torsoLimitLeft = 0.0f; // @0x1E0
|
||||
torsoSpeed = 0.0f; // @0x1E4
|
||||
rangeToTarget = 0.0f; // @0x1E8
|
||||
targetRange = 0.0f; // @0x1EC
|
||||
lockFlag = True; // @0x1F4 = 1
|
||||
visible = False; // @0x1F8
|
||||
threatVector = HudZeroVector; // @0x1FC
|
||||
compassHeading = HudZeroVector; // @0x208
|
||||
hotBoxScalar = 0.0f; // @0x214
|
||||
// (member names re-based 2026-07-19 per the re-dumped attr table @005110b8;
|
||||
// the ctor @004b7f94 zeroes [0x76..0x7b] then sets [0x7d]=1 / [0x7e]=0 --
|
||||
// note [0x7c]=@0x1F0 is left uninitialized in the binary)
|
||||
flickerRate = 0.0f; // @0x1D8 (overwritten below from resource)
|
||||
rotationOfTorsoHorizontal = 0.0f; // @0x1DC
|
||||
torsoLimitRight = 0.0f; // @0x1E0
|
||||
torsoLimitLeft = 0.0f; // @0x1E4
|
||||
torsoSpeed = 0.0f; // @0x1E8
|
||||
rangeToTarget = 0.0f; // @0x1EC
|
||||
scratch1F0 = 0; // @0x1F0 (binary leaves it uninitialized; zeroed here)
|
||||
visible = True; // @0x1F4 = 1 ("Visible" starts shown)
|
||||
lockFlag = False; // @0x1F8 = 0 ("Lock" starts un-locked)
|
||||
hotBoxVector = HudZeroVector; // @0x1FC
|
||||
threatVector = HudZeroVector; // @0x208
|
||||
compassHeading = 0.0f; // @0x214
|
||||
blinkTimer = 0.0f; // @0x218
|
||||
flickerTimer = 0.0f; // @0x21C
|
||||
blinkState = True; // @0x224 = 1
|
||||
@@ -162,12 +166,14 @@ HUD::HUD(
|
||||
// owner+0x438 is the torso-orientation source -- a Mech RAW OFFSET that does not
|
||||
// hold a valid pointer in the reconstructed Mech layout (and isn't linked yet at
|
||||
// subsystem-construction time), so dereferencing it crashes. Default the
|
||||
// torso/range readouts to 0; HudSimulation refreshes them per-frame once the link
|
||||
// torso/twist readouts to 0; HudSimulation refreshes them per-frame once the link
|
||||
// is live. TODO: wire a real Mech torso-orientation-source accessor.
|
||||
// (binary snapshot @004b7f94: [0x77]@0x1DC <- linked+0x1D8 twist, [0x78]@0x1E0
|
||||
// <- +0x1DC limitR, [0x79]@0x1E4 <- +0x1E0 limitL, [0x7a]@0x1E8 <- +0x1E8 speed)
|
||||
linkedEntity = 0; // @0x234
|
||||
rotationOfTorsoHorizontal = 0.0f;
|
||||
torsoLimitRight = 0.0f;
|
||||
torsoLimitLeft = 0.0f;
|
||||
rangeToTarget = 0.0f;
|
||||
torsoSpeed = 0.0f;
|
||||
|
||||
Check_Fpu();
|
||||
@@ -203,14 +209,17 @@ Logical
|
||||
}
|
||||
|
||||
//###########################################################################
|
||||
// SetCompassHeading -- @004b7810
|
||||
// SetThreatVector -- @004b7810
|
||||
//
|
||||
// Copies a Point3D into compassHeading (@0x208).
|
||||
// Copies a Point3D into threatVector (@0x208). Renamed 2026-07-19 (Gitea
|
||||
// #10): the re-dumped attr table @005110b8 binds "ThreatVector" (attr 12) to
|
||||
// @0x208 -- the old SetCompassHeading label was the one-slot transcription
|
||||
// shift (the compass is the Scalar @0x214). No port caller.
|
||||
//
|
||||
void
|
||||
HUD::SetCompassHeading(const Point3D &heading)
|
||||
HUD::SetThreatVector(const Point3D &threat)
|
||||
{
|
||||
compassHeading = heading; // FUN_00408440(this+0x208, &heading)
|
||||
threatVector = threat; // FUN_00408440(this+0x208, &threat)
|
||||
}
|
||||
|
||||
//###########################################################################
|
||||
@@ -299,11 +308,12 @@ Logical
|
||||
// 0 -> set HUD flag bit 0x1 on the graphic, clear bit 0x2
|
||||
// 3 -> set bit 0x2, clear bit 0x1 (and gate on mech +0x410)
|
||||
// writes the resulting "active" flag to *(mech +0x374).
|
||||
// 5. Target line-of-sight: if a target entity (mech +0x388) exists and is
|
||||
// not over the heat limits, computes targetRange (@0x1EC) as the distance
|
||||
// between the HUD anchor (mech +0x37C) and the target (+0x100); sets
|
||||
// visible (@0x1F8); otherwise blanks. A default range 1200.0 is used
|
||||
// when there is no target.
|
||||
// 5. Target lock + range: if a target entity (mech +0x388) exists and the
|
||||
// own/target zone-damage limits pass (:5619-5634, the Lock rule), sets
|
||||
// lockFlag (@0x1F8, "Lock"); rangeToTarget (@0x1EC, "RangeToTarget") is
|
||||
// the distance between the HUD anchor (mech +0x37C) and the target
|
||||
// (+0x100), sliding at 500 m/s (:5652-5670), default 1200.0 with no
|
||||
// target; the compass Scalar @0x214 = yaw euler[0] + torso twist (:5676).
|
||||
// 6. Torso-horizon slew: horizontalTorsoOffset (@0x294) is moved toward the
|
||||
// commanded torso heading at up to MaxTorsoSlew (500/sec), clamped to
|
||||
// +/- horizontalLimit (@0x29C), then written to the graphic at
|
||||
|
||||
Reference in New Issue
Block a user