Files
RP412/MUNGA_L4/L4PLASMASCREEN.h
T
CydandClaude Fable 5 775ee130a7 Default layout now emulates the pod interior
[ MFD UL ] [ MFD UC ] [ MFD UR ]
  [ plasma (reduced) ][ main screen (centered) ]
  [ MFD LL ] [   Map  ] [ MFD LR ]

SVGA16 moves the main game window into the middle band (centered under
the MFD columns) and shrinks the plasma glass to fill the space at its
left via a new PlasmaScreen::Position hook (the glass paint stretches to
the client area, so resizing rescales it). Lower row sits below the
main screen band.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-12 14:40:32 -05:00

60 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). Used by SVGA16's
// split-view layout; no-op when no plasma screen exists.
static void
Position(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;
};