From 5f79dcee3bcb02f746f13bef89780b711dc121f0 Mon Sep 17 00:00:00 2001 From: Joe DiPrima Date: Mon, 3 Aug 2026 20:36:57 -0500 Subject: [PATCH] #118: flashing lamps draw ON TOP of the MFD imagery -- the invite is visible The glass windows paint buttons UNDER the display surface (only a sliver of edge protrudes), so the RIO flash commands were arriving ([lamp] 0xb <- 0x37 FLASHING in every trace) while the operator "never saw it flash" -- the blink was a few masked pixels. Lamps carrying RIO flash bits (state & 3) now re-draw their full face above the surface with the tick-phased shade: the gotoEngineering / engEject invites read like the pod's backlit keys. Co-Authored-By: Claude Fable 5 --- engine/MUNGA_L4/L4GLASSWIN.cpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/engine/MUNGA_L4/L4GLASSWIN.cpp b/engine/MUNGA_L4/L4GLASSWIN.cpp index 6c1e816..d3adff6 100644 --- a/engine/MUNGA_L4/L4GLASSWIN.cpp +++ b/engine/MUNGA_L4/L4GLASSWIN.cpp @@ -809,6 +809,32 @@ static void SelectObject(dc, oldBrush); SelectObject(dc, oldPen); DeleteObject(pen); + + // FLASHING lamps re-draw ON TOP of the surface (#118): the alarm + // invites (gotoEngineering / engEject, RIO flash bits state&3) were + // invisible under the imagery -- only the few protruding edge pixels + // blinked, and the operator "never saw it flash". The pod's keys + // were physical backlit buttons BESIDE the screen; when one carries + // a FLASH state, give it its full face back so the invite reads. + for (int i = 0; i < w->buttonCount; ++i) + { + const GButton &b = w->buttons[i]; + int state = PadRIO::GetLampState(b.address); + if ((state & 3) == 0) + continue; // not flashing + int shade = LampBrightnessOf(state, tick); + COLORREF bright = (b.color == ClrYellow) ? RGB(245, 210, 60) + : (b.color == ClrBlue) ? RGB(205, 228, 255) + : RGB(230, 70, 70); + COLORREF dim = (b.color == ClrYellow) ? RGB(70, 60, 24) + : (b.color == ClrBlue) ? RGB(70, 86, 120) + : RGB(64, 40, 40); + HBRUSH face = CreateSolidBrush((shade >= 2) ? bright : dim); + RECT r = b.rect; + FillRect(dc, &r, face); + DeleteObject(face); + FrameRect(dc, &r, (HBRUSH)GetStockObject(WHITE_BRUSH)); + } } BitBlt(winDC, 0, 0, client.right - client.left, client.bottom - client.top,