Cockpit: green MFD phosphor tint + 4-above/4-below button strips
- MFD tint 0xFFFF (white) -> BT_MFD_GREEN (0x07E0, pure green in R5G6B5) for the five mono MFDs, matching the pod's green monochrome phosphor screens and RP412's FillSplitMFD (green<<8 == 0x00FF00). Applied to both the cockpit (kBTCockpitSurfaces) and the dev composite (kBTGaugeSurfaces); the radar/secondary stays palette-colour (it is authentically multi-colour, not mono). - Button strips are now 4 ABOVE + 4 BELOW each MFD (the authentic pod layout), not 4+4 stacked to one side. The MFD surfaces are inset by kBtnStripH (top MFDs down, bottom MFDs up) so both strips land on-canvas; the same constant drives the surface inset and the button builder so they stay aligned. Verified: L4MFDSPLIT cockpit renders green MFDs with 4+4 button strips; BT_PLATFORM=pod renders identically on a dev box (the pod's true multi-surface path needs >=2 adapters and stays guarded off). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
+30
-18
@@ -290,14 +290,17 @@ struct BTGaugeSurfaceDesc
|
||||
// buffer, so past ~1.5x you magnify, not sharpen.
|
||||
static const float kBTPanelW = 1320.0f;
|
||||
static const float kBTPanelH = 480.0f;
|
||||
// (BT_MFD_GREEN defined below with the cockpit table -- the pod MFDs are green
|
||||
// monochrome phosphor; tint the dev-composite the same as the cockpit.)
|
||||
#define BT_MFD_GREEN 0x07E0
|
||||
static const BTGaugeSurfaceDesc kBTGaugeSurfaces[6] =
|
||||
{
|
||||
{ "Heat", 0xFFFF, 0.0f / kBTPanelW, 0.0f, 320.0f / kBTPanelW, 0.5f, 0 },
|
||||
{ "Mfd2", 0xFFFF, 320.0f / kBTPanelW, 0.0f, 320.0f / kBTPanelW, 0.5f, 0 },
|
||||
{ "Mfd1", 0xFFFF, 0.0f / kBTPanelW, 0.5f, 320.0f / kBTPanelW, 0.5f, 0 },
|
||||
{ "Mfd3", 0xFFFF, 320.0f / kBTPanelW, 0.5f, 320.0f / kBTPanelW, 0.5f, 0 },
|
||||
{ "sec", -1, 640.0f / kBTPanelW, 0.0f, 360.0f / kBTPanelW, 1.0f, 1 },
|
||||
{ "Comm", 0xFFFF, 1000.0f / kBTPanelW, 0.0f, 320.0f / kBTPanelW, 0.5f, 0 },
|
||||
{ "Heat", BT_MFD_GREEN, 0.0f / kBTPanelW, 0.0f, 320.0f / kBTPanelW, 0.5f, 0 },
|
||||
{ "Mfd2", BT_MFD_GREEN, 320.0f / kBTPanelW, 0.0f, 320.0f / kBTPanelW, 0.5f, 0 },
|
||||
{ "Mfd1", BT_MFD_GREEN, 0.0f / kBTPanelW, 0.5f, 320.0f / kBTPanelW, 0.5f, 0 },
|
||||
{ "Mfd3", BT_MFD_GREEN, 320.0f / kBTPanelW, 0.5f, 320.0f / kBTPanelW, 0.5f, 0 },
|
||||
{ "sec", -1, 640.0f / kBTPanelW, 0.0f, 360.0f / kBTPanelW, 1.0f, 1 },
|
||||
{ "Comm", BT_MFD_GREEN, 1000.0f / kBTPanelW, 0.0f, 320.0f / kBTPanelW, 0.5f, 0 },
|
||||
};
|
||||
|
||||
//
|
||||
@@ -315,14 +318,21 @@ static const float kMfdW = 320.0f / 1920.0f; // 0.16667
|
||||
static const float kMfdH = 240.0f / 1080.0f; // 0.22222
|
||||
static const float kRadW = 324.0f / 1920.0f; // 0.16875
|
||||
static const float kRadH = 432.0f / 1080.0f; // 0.40000
|
||||
// Room reserved above AND below each MFD glass for its 4+4 button strip -- the
|
||||
// top MFDs are inset DOWN by this, the bottom MFDs UP, so both strips are
|
||||
// on-canvas (RP412's pane = display + 2*strip_h).
|
||||
static const float kBtnStripH = 38.0f / 1080.0f; // ~0.035
|
||||
// MONO MFD TINT: BT_MFD_GREEN (0x07E0, pure green in R5G6B5) -- defined above
|
||||
// with the dev-composite table; RP412 renders the mono MFDs pure green too
|
||||
// (FillSplitMFD: `green << 8` == 0x00FF00).
|
||||
static const BTGaugeSurfaceDesc kBTCockpitSurfaces[6] =
|
||||
{
|
||||
{ "Heat", 0xFFFF, 0.0f, 0.0f, kMfdW, kMfdH, 0 }, // UL
|
||||
{ "Mfd2", 0xFFFF, (1.0f - kMfdW) * 0.5f, 0.0f, kMfdW, kMfdH, 0 }, // UC
|
||||
{ "Comm", 0xFFFF, 1.0f - kMfdW, 0.0f, kMfdW, kMfdH, 0 }, // UR
|
||||
{ "Mfd1", 0xFFFF, 0.0f, 1.0f - kMfdH, kMfdW, kMfdH, 0 }, // LL
|
||||
{ "Mfd3", 0xFFFF, 1.0f - kMfdW, 1.0f - kMfdH, kMfdW, kMfdH, 0 }, // LR
|
||||
{ "sec", -1, (1.0f - kRadW) * 0.5f, 1.0f - kRadH, kRadW, kRadH, 1 }, // radar, bottom center
|
||||
{ "Heat", BT_MFD_GREEN, 0.0f, kBtnStripH, kMfdW, kMfdH, 0 }, // UL
|
||||
{ "Mfd2", BT_MFD_GREEN, (1.0f - kMfdW) * 0.5f, kBtnStripH, kMfdW, kMfdH, 0 }, // UC
|
||||
{ "Comm", BT_MFD_GREEN, 1.0f - kMfdW, kBtnStripH, kMfdW, kMfdH, 0 }, // UR
|
||||
{ "Mfd1", BT_MFD_GREEN, 0.0f, 1.0f - kMfdH - kBtnStripH, kMfdW, kMfdH, 0 }, // LL
|
||||
{ "Mfd3", BT_MFD_GREEN, 1.0f - kMfdW, 1.0f - kMfdH - kBtnStripH, kMfdW, kMfdH, 0 }, // LR
|
||||
{ "sec", -1, (1.0f - kRadW) * 0.5f, 1.0f - kRadH, kRadW, kRadH, 1 }, // radar, bottom center
|
||||
};
|
||||
|
||||
// L4MFDSPLIT: the single-window cockpit (RP412's flag). Distinct from the
|
||||
@@ -488,12 +498,14 @@ static int BTBuildCockpitButtons(float W, float H, BTCockpitBtn *out, int maxOut
|
||||
|
||||
if (bank.style == 0)
|
||||
{
|
||||
// 4+4 grid; strip height ~ glass/8 clamped, width = glass/4.
|
||||
float striph = sh / 6.0f; if (striph < 14.0f) striph = 14.0f; if (striph > 44.0f) striph = 44.0f;
|
||||
// 4 buttons ABOVE the glass, 4 BELOW -- the authentic pod strip
|
||||
// (RP412 MFDStrips). The MFD surfaces are inset by kBtnStripH so
|
||||
// both rows land on-canvas; addresses descend from the anchor,
|
||||
// row-major (top strip = anchor-0..3, bottom strip = anchor-4..7).
|
||||
float striph = kBtnStripH * H;
|
||||
float bw = sw / 4.0f;
|
||||
// the two rows sit toward the screen interior
|
||||
float row0y = bank.topRow ? (sy + sh) : (sy - 2.0f * striph);
|
||||
float row1y = bank.topRow ? (sy + sh + striph) : (sy - striph);
|
||||
float rowAboveY = sy - striph; // above the glass
|
||||
float rowBelowY = sy + sh; // below the glass
|
||||
for (int i = 0; i < 8 && n < maxOut; ++i)
|
||||
{
|
||||
int row = i / 4, col = i % 4;
|
||||
@@ -501,7 +513,7 @@ static int BTBuildCockpitButtons(float W, float H, BTCockpitBtn *out, int maxOut
|
||||
bt.unit = bank.anchorA - i;
|
||||
bt.amber = 0;
|
||||
bt.x = sx + col * bw;
|
||||
bt.y = (row == 0) ? row0y : row1y;
|
||||
bt.y = (row == 0) ? rowAboveY : rowBelowY;
|
||||
bt.w = bw - 2.0f;
|
||||
bt.h = striph - 2.0f;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user