Gitea #6: secondary MFD Damage/Critical/Heat cycling -- reconstruct the

NotifyOfDisplayModeChange override (vtbl+0x4C @4d1ae4) + wire desktop 'N'

The secondary screen's schematic selector was mislabeled: @004d1ae4 (the
bits-18..20 ModeSecondary* mask swap) was reconstructed as a non-virtual
"SetControlMode" that nothing called, so the desktop stayed pinned on the
Damage view.  The binary's L4 vtable @0051e440 pins the truth:

  +0x48 = @004d1acc  <- CycleControlModeMessageHandler (FUN_004afbe0):
          forwards to the base RET no-op @004b048c.  A BAS/MID/ADV
          control-mode change never touches the secondary view
          (empirically confirmed: BT_MODECYCLE_TEST cycles the CONTROL
          MODE lamp, mask bits 18-20 unchanged, schematic stays ARMOR).
  +0x4C = @004d1ae4  <- CycleDisplayModeMessageHandler (FUN_004afcac):
          THE Damage/Critical/Heat selector, indexed by displayMode
          (table @0051dbe4 = ModeSecondaryDamage/Critical/Heat).

Authentic pod inputs (streamed type-6 .CTL EventMappings, dumped via the
new BT_CTRLMAP_LOG EVENT records): secondary-panel button 0x15 -> msg
0x15 CycleDisplayMode (manual p13, the "'Mech status Info center" bottom
left of the secondary screen), button 0x18 -> msg 0x14 CycleControlMode
(manual p6, top right), 0x10/0x11 -> ZoomIn/Out.  The DOS keyboard
fallbacks (Keypress 0x13d/0x13e = extended F3/F4) are dead under the
WinTesla VK map, hence the desktop pin.

Port wiring (the M/ModeCycle pattern): key N / pad RightThumb -> action
DisplayCycle -> gBTDisplayCycle -> CycleDisplayModeNow() -- the same body
the pod console button message drives.  Both .MAP profiles + the
compiled-in default updated.

Verified live (docked gauges + BT_SHOT, BT_VIEWCYCLE_TEST): the sec
panel cycles ARMOR DAMAGE silhouette -> CRITICAL DAMAGE subsystem list
-> HEAT DAMAGE colored list, mask 0x450421 -> 0x490421 -> 0x510421; M
control-mode cycling un-regressed (BAS/MID/ADV lamp cycles, view pinned).

Diags: BT_MODE_LOG, BT_VIEWCYCLE_TEST=<frame>, BT_MODECYCLE_TEST=<frame>,
BT_CTRLMAP_LOG now dumps EVENT records.  KB: gauges-hud secondary-view
section rewritten, CLASSMAP +0x48/+0x4C slots, decomp-reference env
gates, GAUGE_COMPOSITE phase-4 entry resolved.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
arcattack
2026-07-19 16:28:38 -05:00
co-authored by Claude Fable 5
parent 2ae9bd43ae
commit 1d6339b226
14 changed files with 229 additions and 39 deletions
+36 -7
View File
@@ -521,7 +521,13 @@ void
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// @004afcac -- cycle the HUD display mode (0 -> 1 -> 2 -> 0).
// @004afcac -- cycle the DISPLAY mode (0 -> 1 -> 2 -> 0). Gitea #6: this is
// the secondary screen's Damage/Critical/Heat schematic cycle -- the L4
// NotifyOfDisplayModeChange override (vtbl+0x4C, @004d1ae4) swaps the
// ModeSecondary* mask bits 18..20. The pod input was the "'Mech status Info
// center" button (manual p13, bottom left of the secondary screen); the DOS
// keyboard fallback was extended-F4 (Keypress 0x13e), dead under the WinTesla
// VK map.
//
void
MechControlsMapper::CycleDisplayModeMessageHandler(
@@ -533,16 +539,30 @@ void
if (message->dataContents > 0)
{
displayMode = displayMode + 1;
if (displayMode > 2)
{
displayMode = 0;
}
NotifyOfDisplayModeChange(displayMode); // vtable+0x4c
CycleDisplayModeNow();
}
Check_Fpu();
}
//
// The display-cycle body, shared by the console-button message handler above
// and the desktop 'N' key (mech4 key poll -> gBTDisplayCycle) -- the same
// split as CycleControlModeNow.
//
void
MechControlsMapper::CycleDisplayModeNow()
{
displayMode = displayMode + 1;
if (displayMode > 2)
{
displayMode = 0;
}
NotifyOfDisplayModeChange(displayMode); // vtable+0x4c
DEBUG_STREAM << "[mode] display mode -> " << displayMode
<< " (0=Damage 1=Critical 2=Heat)" << std::endl;
Check_Fpu();
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// @004afce8 -- toggle voice assist on the Mech's pilot subsystem.
@@ -759,6 +779,7 @@ void
// CONTROL MODE gauge tracks).
{
extern int gBTModeCycle;
extern int gBTDisplayCycle;
extern float gBTTwistAxis;
extern int gBTTorsoRecenter;
if (gBTModeCycle)
@@ -766,6 +787,14 @@ void
gBTModeCycle = 0;
CycleControlModeNow();
}
// Gitea #6: 'N' cycles the secondary screen's schematic
// (Damage -> Critical -> Heat) -- the same body the pod's
// status-info-center button message drives.
if (gBTDisplayCycle)
{
gBTDisplayCycle = 0;
CycleDisplayModeNow();
}
// TORSO ELEVATION (pitch): the pod stick's Y axis -- every
// control mode routes stickPosition.y into
// Torso::SetAnalogElevationAxis below, so the bridge feeds