Files
BT411/engine/MUNGA_L4/L4PLASMAWIN.h
T
CydandClaude Fable 5 db9ac947f7 Displays: on-screen cockpit buttons + desktop plasma + the glass preset (steps 2d/2e)
NEW gated TUs: L4PADPANEL (GDI top-level window, all-W APIs: the pod button
banks -- upper/lower aux, 12 secondary, specials/hat/handle, 63 buttons --
clickable via PadRIO::SetScreenButton with lamp-lit faces from GetLampState,
10 Hz repaint; created by the PadRIO ctor on BT_PAD_PANEL=1) and L4PLASMAWIN
(PlasmaWindow : Video8BitBuffered -- the gauge renderer draws the 128x32
plasma into its pixelBuffer through the SAME code path as the serial device;
Update() blits orange-on-black at L4PLASMASCALE, default x4).  Gated seams:
L4GREND.cpp L4PLASMA=SCREEN branch; btl4main.cpp -platform glass preset
(PAD,KEYBOARD + BT_DEV_GAUGES + SCREEN plasma + panel; env always overrides;
non-glass builds log+fall back to DEV); run.cmd glass token.  MFD surfaces
need NO new code: the existing dock-bottom / BT_DEV_GAUGES_WINDOW=1 /
BT_DEV_GAUGES_DOCK=1 modes are the display story.

Verified live: -platform glass boots GLASS profile, panel + plasma windows
up, pad detected, dev gauges awake, mission loop clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-17 22:21:22 -05:00

50 lines
1.2 KiB
C++

#pragma once
//###########################################################################
//
// L4PLASMAWIN -- the desktop plasma display (BT_GLASS only).
//
// PlasmaWindow renders the pod's 128x32 serial plasma marquee (pilot-name /
// rank display) into a small orange-on-black desktop window instead of a
// serial device. It derives from Video8BitBuffered exactly like the serial
// PlasmaDisplay, so the L4GaugeRenderer draws into its 8-bit pixelBuffer
// with the same code path; Update() (the per-frame external-display flush)
// blits the buffer to the window at L4PLASMASCALE x zoom (default 4).
// Selected with L4PLASMA=SCREEN (the gated branch in L4GREND.cpp); any
// other L4PLASMA value keeps the serial device.
//
//###########################################################################
#include "l4vb8.h"
class PlasmaWindow :
public Video8BitBuffered
{
public:
enum
{
plasmaWidth = 128,
plasmaHeight = 32
};
PlasmaWindow();
~PlasmaWindow();
Logical
Update(Logical force_all);
void
WaitForUpdate();
protected:
void
EnsureWindow();
void
*window; // HWND (kept void* -- no <windows.h> in headers)
int
scale;
unsigned long
*blitBuffer; // plasmaWidth*plasmaHeight BGRA staging
};