Cockpit: 1920x1080 single-window MFD arrangement (L4MFDSPLIT=1, RP412 layout)

The RP412 single-window cockpit, adapted to reuse BT's working D3D
surface compositor (DrawDevSurface) instead of RP's GDI child-window
panes -- same visual outcome, far lower risk (no L4VIDEO present-routing
rewrite):

- L4VB16.cpp: kBTCockpitSurfaces places the six instrument surfaces at
  RP412's exact 1920x1080 fractional positions (Heat=UL, Mfd2=UC,
  Comm=UR, Mfd1=LL, Mfd3=LR, radar=center-bottom portrait);
  BTDrawGaugeSurfaces parameterized by surface table; BTDrawCockpitPanel
  composites them over the full-window 3D as the pod bezels frame the
  viewscreen. Hooked in L4VIDEO before EndScene (L4MFDSPLIT-gated).
- btl4main.cpp: L4MFDSPLIT sizes the window to the 1920x1080 canvas
  (scaled to fit the work area; -res overrides) and wakes the gauge
  renderer (L4GAUGE) + PAD controls.

Fixed two more pre-existing latent gauge crashes that only fire when the
gauge renderer is woken off-pod (would hit the real pod too), previously
gated only on BT_DEV_GAUGES -- extended the safety nets to L4MFDSPLIT:
  * gauge.h: NULL gauge-attribute-source binds a static zero instead of
    AV'ing in GaugeConnectionDirectOf ctor (crashed building HeatSink
    cluster's VertTwoPartBar at ConfigureForModel).
  * GAUGE.cpp: SEH-guarded gauge Execute (disable a faulting gauge, not
    crash). GAUGREND.cpp: skip unresolved primitives + activate all MFD
    pages so every surface renders.

Verified: L4MFDSPLIT boots the cockpit; all six surfaces render framing
the 3D viewscreen; survives coolant-loop + gauge activation.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Cyd
2026-07-16 20:39:41 -05:00
co-authored by Claude Fable 5
parent 2bb9b602bb
commit 0c964c0ee7
5 changed files with 105 additions and 5 deletions
+5
View File
@@ -8560,6 +8560,11 @@ void DPLRenderer::ExecuteImplementation(RendererComplexity, RendererOrigin::Inte
extern void BTDrawGaugeInset(LPDIRECT3DDEVICE9 device);
BTDrawGaugeInset(mDevice);
// SINGLE-WINDOW COCKPIT (L4MFDSPLIT=1): frame the 3D with the six instrument
// surfaces in the RP412 arrangement (no-op unless L4MFDSPLIT is set).
extern void BTDrawCockpitPanel(LPDIRECT3DDEVICE9 device);
BTDrawCockpitPanel(mDevice);
hr = mDevice->EndScene();
// DEV-COMPOSITE: default mode -- render the 6 cockpit surfaces into a SEPARATE window