#118: REMOVE the full-face flash overlays -- the MFD corruption, root-caused

The operator's three captures decode as ONE mistake drawn two ways: the
cockpit compositor deliberately draws the side buttons as BIG rects tucked
UNDER the display surfaces (step 2), with only the protruding edge visible
-- the edge IS the port's lamp light (the pod's backlit keys sat beside the
CRT; there is no in-display face to light).  My on-top "flash overlay"
(86a6bbb L4VB16, 5f79dce L4GLASSWIN) violated that design: drawn after
DrawDevSurface without resetting the bound texture state it rendered the
gauge atlas as green striped garbage at the button rects; with the state
reset it drew honest full faces -- solid flashing red covering that whole
portion of the MFD.  Both overlays removed; the original step-2 rendering
(which already tick-animates lamp shades) is the whole story.

Pixel-verified through the full stress (4 gens dead, autofire jams, leak
warning): weapon pages pristine end to end, and the 0x27 edge lamp
square-waves 34.0 <-> 28.9 across consecutive captures -- the invite
flashes at its authentic scale.

(The eject-wipe gauge -- the OTHER corrupting draw, visible in the earliest
sighting -- stays re-stubbed pending a real RE of FUN_004c5fb8's draw op.)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Joe DiPrima
2026-08-03 21:05:28 -05:00
co-authored by Claude Fable 5
parent 3ec30ee28a
commit 78722542fd
2 changed files with 11 additions and 54 deletions
+8 -29
View File
@@ -1180,35 +1180,14 @@ void BTDrawCockpitPanels(LPDIRECT3DDEVICE9 device)
}
}
// 3b) FLASHING lamps re-draw ON TOP of the surfaces (#118): the alarm
// invites (gotoEngineering / engEject, RIO flash bits state & 3)
// were invisible under the imagery -- only the protruding edge
// pixels blinked, and the operator "never saw it flash". The pod's
// keys were physical backlit buttons beside the CRT; when one
// carries a FLASH state, give it its full face back.
for (int i = 0; i < L.buttonCount; i++)
{
const BTCockpitBtn &b = L.buttons[i];
int state = CkLampState(b.address);
if ((state & 3) == 0) continue; // not flashing
int shade = BTLampBrightnessOf(state, tick);
{
static int s_flog = -1;
if (s_flog < 0) s_flog = (getenv("BT_LAMP_LOG") != 0) ? 1 : 0;
static unsigned long s_lastLog = 0;
if (s_flog && tick - s_lastLog > 1000)
{
s_lastLog = tick;
DEBUG_STREAM << "[ckflash] addr 0x" << std::hex << b.address
<< " state 0x" << state << std::dec << " shade " << shade
<< " at (" << b.x << "," << b.y << ")\n" << std::flush;
}
}
D3DCOLOR fill, border;
CkLampColors(b.colorClass, shade, b.inert, &fill, &border);
CkFill(device, b.x, b.y, b.w, b.h, border);
CkFill(device, b.x + 1, b.y + 1, b.w - 2, b.h - 2, fill);
}
// (NO full-face "flash overlay" here -- twice field-broken 2026-08-03.
// The side buttons are BIG rects deliberately tucked UNDER the surfaces;
// step 2 already animates their lamp shades, and the protruding edge IS
// the port's lamp light (the pod's backlit keys sat beside the CRT --
// there is no in-display face to light). An on-top redraw either covers
// the MFD imagery with flashing faces, or -- drawn without resetting the
// texture state DrawDevSurface leaves bound -- smears the gauge atlas as
// striped garbage (operator captures: green stripes, then red faces).)
// 4) Flight-block labels (on top; the blue faces aren't covered by surfaces).
for (int i = 0; i < L.buttonCount; i++)