The main game window becomes the cockpit shell (enlarged, clipping children); every display folds in as a chrome-less child pane in the pod interior arrangement: [ MFD UL ] [ MFD UC ] [ MFD UR ] [ plasma (reduced) ][ viewscreen (centered) ] [ MFD LL ] [ Map ] [ MFD LR ] The 3D scene presents into a black STATIC viewscreen child via Present's hDestWindowOverride (new gMainPresentWindow global) - no swap-chain changes, and STATIC's transparent hit-testing keeps mouse input over the 3D view flowing to the game window. MFDSplitView gains a parent/child mode; PlasmaScreen::Position reparents the glass into the shell. Main window class background goes black for the cockpit gaps. Verified by screenshot: live green gauges (LIFT CUT / BOOST / CHUTE / trigger-program screens) with their red button strips, the 3D canyon in the centered viewscreen, plasma score glass at its left, map with lit amber preset lamps - one window, 976x1132 client at 50% scale. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
61 lines
1.4 KiB
C++
61 lines
1.4 KiB
C++
#pragma once
|
|
|
|
#include "l4vb8.h"
|
|
|
|
//########################################################################
|
|
//############################ PlasmaScreen ##############################
|
|
//########################################################################
|
|
//
|
|
// The cockpit's 128x32 plasma display rendered as a desktop window
|
|
// instead of streamed to serial hardware. The gauge system draws into
|
|
// the same Video8BitBuffered surface it always has; Update() just blits
|
|
// the buffer into a small "glass" window in plasma orange.
|
|
//
|
|
// Selected with L4PLASMA=SCREEN. L4PLASMASCALE sets the pixel size
|
|
// (default 4 -> a 512x128 window).
|
|
//
|
|
class PlasmaScreen :
|
|
public Video8BitBuffered
|
|
{
|
|
public:
|
|
enum
|
|
{
|
|
plasmaWidth=128,
|
|
plasmaHeight=32
|
|
};
|
|
|
|
PlasmaScreen();
|
|
|
|
~PlasmaScreen();
|
|
|
|
Logical
|
|
TestInstance() const;
|
|
|
|
Logical
|
|
Update(Logical forceall);
|
|
|
|
void
|
|
WaitForUpdate();
|
|
|
|
// Reposition/resize the live glass (client-area size; the paint
|
|
// stretches to fit, so this also rescales it). With a parent the
|
|
// glass becomes a chrome-less child pane of the cockpit window.
|
|
// Used by SVGA16's split-view layout; no-op when no plasma exists.
|
|
static void
|
|
Position(void *parent, int x, int y, int client_width, int client_height);
|
|
|
|
protected:
|
|
static PlasmaScreen
|
|
*activeInstance;
|
|
|
|
void
|
|
CreateGlassWindow();
|
|
|
|
void
|
|
*window; // HWND, kept untyped so this header stays lean
|
|
void
|
|
*bitmapInfo; // BITMAPINFOHEADER + 256-entry orange palette
|
|
int
|
|
scale;
|
|
};
|