Break the desktop glass cockpit's secondary displays out of the single combined pad panel + D3D gauge strip into ONE window per pod display, each carrying that display's surface with its RIO button bank, arranged pod-faithfully around the main view. New TU engine/MUNGA_L4/L4GLASSWIN.* (BT_GLASS-only), selected by the -platform glass preset via the new runtime gate BT_GLASS_PANELS (=0 falls back to the legacy single panel + dock). - Surfaces are CPU-expanded from the shared gauge buffer (SVGA16::ExpandPlaneToBGRA, no D3D) and StretchDIBits'd in -- the D3D dev-composite path (dock / window / overlay) stands down while active. - Buttons sit UNDER the imagery: big hidden click targets that reach into the display, with only a small protruding edge showing as a lamp light. Red MFD banks tile the top/bottom; radar rails run the sides + a bottom row; a Flight Controls window hosts the no-display banks. - Windows: Heat / Engineering / Comm / Left Weapons / Right Weapons / radar + Flight Controls; edge-to-edge (no in-client margin/title; OS caption labels each). - Fix blank surfaces: application/ghWnd are duplicate-defined and bind non-deterministically under /FORCE, so the fresh L4GLASSWIN TU read NULL. Reach the renderer/window via BTResolveGaugeRenderer/BTResolveMainWindow defined in btl4main.cpp off the real btl4App/hWnd pointers. New gotcha: reconstruction-gotchas.md S6 duplicate-GLOBAL corollary. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
42 lines
1.8 KiB
C
42 lines
1.8 KiB
C
#pragma once
|
|
|
|
//###########################################################################
|
|
//
|
|
// L4GLASSWIN -- per-display glass cockpit windows (BT_GLASS only; this TU is
|
|
// only in the build when the gate is on -- see CMakeLists.txt).
|
|
//
|
|
// Under `-platform glass` with BT_GLASS_PANELS=1 (the glass preset default),
|
|
// each pod SECONDARY display gets its OWN desktop window carrying that
|
|
// display's surface AND its RIO button bank placed AROUND it, mirroring the
|
|
// physical pod cockpit:
|
|
//
|
|
// Heat (UL) / Mfd2 (UC) / Comm (UR) / Mfd1 (LL) / Mfd3 (LR) -- red MFD
|
|
// banks split 4 buttons ABOVE / 4 BELOW the surface;
|
|
// sec radar (center, portrait) -- yellow
|
|
// Secondary buttons split LEFT / RIGHT of the surface;
|
|
// Flight Controls -- the
|
|
// no-display banks (throttle 0x38-3F, joystick/fire 0x40-47, panic).
|
|
//
|
|
// Each window is a GDI window (like L4PADPANEL + L4PLASMAWIN): the surface is
|
|
// CPU-expanded from the shared gauge pixelBuffer (SVGA16::ExpandPlaneToBGRA)
|
|
// and StretchDIBits'd in -- NO D3D, so the whole D3D dev-composite path
|
|
// (dock / separate window / overlay) stands down while these are up. Clicks
|
|
// inject through PadRIO::SetScreenButton; lamps render from GetLampState.
|
|
// Created / destroyed by the PadRIO ctor / dtor.
|
|
//
|
|
//###########################################################################
|
|
|
|
void
|
|
BTGlassPanels_Create();
|
|
void
|
|
BTGlassPanels_Destroy();
|
|
|
|
//
|
|
// True when BT_GLASS_PANELS mode is selected (default ON under `-platform
|
|
// glass`, OFF otherwise). Read by the render loop / L4VB16 dev-composite to
|
|
// suppress the single L4PADPANEL and the D3D gauge compositing. Cheap +
|
|
// cached; safe to call before the windows exist.
|
|
//
|
|
int
|
|
BTGlassPanelsActive();
|