Glass cockpit: per-display windows (BT_GLASS_PANELS)
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>
This commit is contained in:
@@ -7,6 +7,15 @@
|
||||
|
||||
|
||||
class L4graphicsPort;
|
||||
class GaugeRenderer;
|
||||
|
||||
// GLASS: resolve the gauge renderer / main window. DEFINED in game/btl4main.cpp
|
||||
// off the REAL app + window pointers it holds as locals -- NOT off the
|
||||
// `application`/`ghWnd` globals, which are duplicate-defined and bind
|
||||
// non-deterministically per link under /FORCE (the "duplicate-symbol race" --
|
||||
// CMakeLists.txt:186), so a newly-added engine TU (L4GLASSWIN) can read NULL.
|
||||
GaugeRenderer *BTResolveGaugeRenderer();
|
||||
void *BTResolveMainWindow(); // HWND (kept void* -- no windows.h dependency)
|
||||
|
||||
//########################################################################
|
||||
//######################### Video16BitBuffered ###########################
|
||||
@@ -306,6 +315,17 @@ public:
|
||||
void DrawDevSurface(LPDIRECT3DDEVICE9 device, int slot, int mask, int paletteID,
|
||||
int monoTint, float dstX, float dstY, float dstW, float dstH,
|
||||
int rotateCCW = 0);
|
||||
|
||||
// GLASS (per-display windows, L4GLASSWIN): CPU-expand ONE gauge surface (a
|
||||
// bit-plane of the shared pixelBuffer) into a 32-bit BGRA image for GDI
|
||||
// StretchDIBits -- no D3D. Same pixel rule as DrawDevSurface: monoTint < 0 ->
|
||||
// palette-expand via palette[paletteID]; else fill (word & mask) ? monoTint : 0
|
||||
// (monoTint is a 0x00RRGGBB value here, NOT R5G6B5). rotateQuadrant: 0 = native
|
||||
// (outW=bufW, outH=bufH); 1 = 90 CCW / 3 = 90 CW -> transposed (outW=bufH,
|
||||
// outH=bufW), for the portrait secondary CRT. `dst` must hold >= bufW*bufH
|
||||
// dwords; the image is written TOP-DOWN. *outW/*outH receive the produced size.
|
||||
void ExpandPlaneToBGRA(int mask, int paletteID, int monoTint, int rotateQuadrant,
|
||||
unsigned long *dst, int *outW, int *outH);
|
||||
};
|
||||
|
||||
//########################################################################
|
||||
|
||||
Reference in New Issue
Block a user