Gauges: trigger-config joystick is LIVE -- @004c6ee0 is LinkToEntity, not SetColor

The weapon panel's btjoy trigger-config display (ConfigMapGauge) never rendered
because the reconstruction labelled @004c6ee0 as "SetColor(int)" and, finding no
caller, concluded the gauge was authentically dormant (task #6), gating it
behind a BT_CONFIGMAP dev env.

The user challenged this (the PROGRAM/TRIGGER CONFIG button implies the display
visualizes your config).  Re-verification found the old analysis failed twice:
the "no caller" search looked for direct calls to a VIRTUAL, and its slot math
used the wrong vtable copy.  The real ConfigMapGauge vtable @0051a1b8, matched
against the T0 GaugeBase virtual roster (GAUGE.h), pins @004c6ee0 at slot 9
(+0x24) == GaugeBase::LinkToEntity, and @0x94 is the linkedEntity -- the
Execute gate is "not yet linked", not "disabled".  The engine broadcasts
LinkToEntity(viewpointEntity) to every gauge at viewpoint bind (APP.cpp:1277 ->
GaugeRenderer::LinkToEntity GAUGREND.cpp:3011), arming the gate -- the joystick
DOES render in the shipped game, showing per-trigger mapping state (solid =
mapped, matching the DOSBox reference).

Port fix: SetColor(int color) -> LinkToEntity(Entity*), color -> linkedEntity,
BT_CONFIGMAP dev enable deleted (the authentic path lights it).  Render-verified
with no env override: the joystick + mapped-trigger lamp draw on weapon panels.

KB swept per the correction mandate: gauges-hud.md, decomp-reference.md,
open-questions.md, GAUGE_COMPOSITE.md, VEHICLE_SUBSYSTEMS.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
arcattack
2026-07-21 08:49:58 -05:00
co-authored by Claude Opus 4.8
parent 77cc62886f
commit 89b4f53046
7 changed files with 55 additions and 34 deletions
+4 -1
View File
@@ -292,7 +292,10 @@ From the weapon `.SUB` records + the charge-curve `.data` constants (PE-parsed a
MechWeapon defaults destination=&fireImpulse@0x31C per @004b99a8). Subsystem+0x110: 0/-1 config-session
flag written by handler 9 (reader unknown).
- ConfigMapGauge @004c6d80/@004c6f1c: table DAT_00518eb4 = {y,btn} {0x0d,0x45}{0x25,0x46}{0x3d,0x40}
{0x55,0x47}, blit x=0xc; SetColor @004c6ee0 has NO caller (gauge dormant in the shipped build).
{0x55,0x47}, blit x=0xc; @004c6ee0 = the virtual GaugeBase::LinkToEntity override (vtbl @0051a1b8
slot 9 +0x24; @0x94 = linkedEntity, the Execute gate), broadcast at viewpoint bind (APP.cpp:1277 →
GAUGREND.cpp:3011) — the gauge IS live in the shipped build (old "SetColor/no-caller/dormant" claim
was wrong; corrected 2026-07-21).
## 6. Env-var gates (runtime; default OFF unless noted)
+14 -7
View File
@@ -328,15 +328,22 @@ authentically ANIMATES 0→1 through each reload. (The census's four other writ
@004b9c9c is the MechWeapon/projectile base body.) The launcher panel's other live indicators:
AMMO DIGITS (AmmoBin::ammoCount via the complete-type bridges), jam/fire lamps, eject wipe.
## ConfigMapGauge (the weapon panel's regroup lamp column) — authentically DORMANT
## ConfigMapGauge (the weapon panel's trigger-config joystick) — LIVE via LinkToEntity (2026-07-21)
The per-weapon btjoy.pcc joystick image + 4 cm_* state lamps (off/other/only/both) showing,
for each mappable fire button (Pinky/ThumbLow/Trigger/ThumbHigh), whether THIS panel's weapon
is bound to it. **The shipped binary never enables it [T1, task #6]:** no caller of SetColor
@004c6ee0 exists, so color==0 and Execute early-outs. The state loop is reconstructed
(btl4gau2.cpp; table DAT_00518eb4 PE-recovered; sampler = LBE4ControlsManager::
buttonGroup[btn].GetMapState — NOT the ModeManager, the old guard note was wrong) behind the
PORT dev enable `BT_CONFIGMAP=1`. The regroup MECHANISM itself (ConfigureMappables/
ChooseButton, task #6) is live regardless of the gauge.
is bound to it. **CORRECTION — the old "authentically DORMANT" claim [task #6] was WRONG.**
@004c6ee0 is NOT an uncalled `SetColor(int)`: it is the virtual **`GaugeBase::LinkToEntity`
override** (vtbl slot 9, +0x24 — verified against the binary vtable @0051a1b8 and the T0
GaugeBase virtual roster, GAUGE.h), and `@0x94` is the **linkedEntity**, not a colour. The
engine broadcasts `LinkToEntity(viewpointEntity)` to every gauge when the viewpoint binds
(APP.cpp:1277 → GaugeRenderer::LinkToEntity GAUGREND.cpp:3011), arming the Execute gate — the
joystick DOES render in the shipped game (matches the DOSBox reference: solid circle = the
mapped trigger, hollow = unmapped). The "no caller" analysis failed twice: it looked for
direct calls to a virtual, and its slot math used the wrong vtable copy. Port fix: renamed
SetColor→LinkToEntity / color→linkedEntity, deleted the `BT_CONFIGMAP` dev enable (no longer
needed — the authentic path lights it). Sampler = LBE4ControlsManager::
buttonGroup[btn].GetMapState (table DAT_00518eb4 PE-recovered); the regroup MECHANISM
(ConfigureMappables/ChooseButton, task #6) was always live.
## Authentically-static (do NOT "fix")
Degradation/Failure temps are fixed markers; AmbientTemperature 300; CoolantMassLeakRate 0 on a
+9 -7
View File
@@ -341,13 +341,15 @@ register. ⚠ The audit also flags the damage-economy item as SELF-CONTRADICTOR
old hostEntity/subsystemId2 labels were wrong; MechWeapon ctor defaults the destination
to &fireImpulse per @004b99a8); dev harness = HOLD 'G' (BT_CONFIG_SLOT selects the
weapon; BT_CONFIG_TEST scripts a headless session).
* **ConfigMapGauge finding [T1]**: the shipped binary NEVER enables it — no caller of
SetColor @004c6ee0 exists (the only child accesses are BecameActive/SetEnable forwards),
so color stays 0 and Execute early-outs: the gauge is authentically DORMANT in BTL4OPT.
The state loop is now reconstructed anyway (@004c6f1c: 4 {y,button} pairs from
DAT_00518eb4 = {13,Pinky}{37,ThumbLow}{61,Trigger}{85,ThumbHigh}, x=0xc;
buttonGroup[btn].GetMapState(controlDestination, subsys, controlMessageID, 0x10000) →
cm_off/cm_other/cm_only/cm_both), behind the PORT dev enable BT_CONFIGMAP=1.
* **ConfigMapGauge finding [T1] — CORRECTED 2026-07-21**: the old "authentically DORMANT /
no SetColor caller" claim was WRONG. @004c6ee0 is the virtual GaugeBase::LinkToEntity
override (vtbl @0051a1b8 slot 9 +0x24; @0x94 = linkedEntity, the Execute gate), and the
engine broadcasts LinkToEntity(viewpointEntity) at viewpoint bind (APP.cpp:1277 →
GAUGREND.cpp:3011) — the gauge IS live in the shipped game. The state loop
(@004c6f1c: 4 {y,button} pairs from DAT_00518eb4 = {13,Pinky}{37,ThumbLow}{61,Trigger}
{85,ThumbHigh}, x=0xc; buttonGroup[btn].GetMapState(controlDestination, subsys,
controlMessageID, 0x10000) → cm_off/cm_other/cm_only/cm_both) now runs on the authentic
LinkToEntity path; the BT_CONFIGMAP dev enable was deleted.
* **Bonus [T1]**: the binary MechWeapon ATTRIBUTE table @0x511890 has ELEVEN entries
(0x12 PercentDone .. 0x1C WeaponState) — future gauge-wave feeds; the "TriggerState is
the only MechWeapon attribute" claim was wrong (fixed in mechweap.hpp).